[SCM] gpac/master: Imported Upstream version 0.5.2-426-gc5ad4e4+dfsg5

rbalint at users.alioth.debian.org rbalint at users.alioth.debian.org
Wed Jul 8 08:05:20 UTC 2015


The following commit has been merged in the master branch:
commit 9d9fdafdd91723beb803f638e85b86f835a93961
Author: Balint Reczey <balint at balintreczey.hu>
Date:   Tue Jul 7 18:32:50 2015 -0700

    Imported Upstream version 0.5.2-426-gc5ad4e4+dfsg5

diff --git a/extra_lib/include/DTAPI.h b/extra_lib/include/DTAPI.h
deleted file mode 100644
index 2a027a0..0000000
--- a/extra_lib/include/DTAPI.h
+++ /dev/null
@@ -1,7232 +0,0 @@
-//*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#* DTAPI.h *#*#*#*#*#*#*#*#*#* (C) 2000-2015 DekTec
-//
-// DTAPI - C++ API for DekTec PCI/PCI-Express cards, USB-2 adapters and network devices
-//
- 
-#ifndef __DTAPI_H
-#define __DTAPI_H
-
-// DTAPI version
-#define DTAPI_VERSION_MAJOR        5
-#define DTAPI_VERSION_MINOR        14
-#define DTAPI_VERSION_BUGFIX       0
-#define DTAPI_VERSION_BUILD        56
-
-//-.-.-.-.-.-.-.-.-.-.-.-.- Additional Libraries to be Linked In -.-.-.-.-.-.-.-.-.-.-.-.-
-
-#ifdef _WIN32
-
-#ifndef _LIB  // Do not link libraries into DTAPI itself
-#pragma comment(lib, "iphlpapi.lib")
-#pragma comment(lib, "ws2_32.lib")
-#pragma comment(lib, "setupapi.lib")
-#pragma comment(lib, "comctl32.lib")
-#pragma comment(lib, "wbemuuid.lib")
-#endif
-
-#ifndef _DTAPI_DISABLE_AUTO_LINK
-    // Are we using multi-threaded-DLL or static runtime libraries?
-    #ifdef _DLL
-        // Link with DLL runtime version (/MD)
-        #ifdef _DEBUG
-            #ifdef _WIN64
-                #pragma comment(lib, "DTAPI64MDd.lib")  // Debug 64bit
-                #pragma message("Automatically linking with DTAPI64MDd.lib")
-            #else
-                #pragma comment(lib, "DTAPIMDd.lib")    // Debug 32bit
-                #pragma message("Automatically linking with DTAPIMDd.lib") 
-            #endif
-        #else
-            #ifdef _WIN64
-                #pragma comment(lib, "DTAPI64MD.lib")   // Release 64bit
-                #pragma message("Automatically linking with DTAPI64MD.lib")
-            #else
-                #pragma comment(lib, "DTAPIMD.lib")     // Release 32bit
-                #pragma message("Automatically linking with DTAPIMD.lib") 
-            #endif
-        #endif
-    #else
-        // Link to static runtime version (/MT)
-        #ifdef _DEBUG
-            #ifdef _WIN64
-                #pragma comment(lib, "DTAPI64MTd.lib")  // Debug 64bit
-                #pragma message("Automatically linking with DTAPI64MTd.lib")
-            #else
-                #pragma comment(lib, "DTAPIMTd.lib")    // Debug 32bit
-                #pragma message("Automatically linking with DTAPIMTd.lib") 
-            #endif
-        #else
-            #ifdef _WIN64
-                #pragma comment(lib, "DTAPI64MT.lib")   // Release 64bit
-                #pragma message("Automatically linking with DTAPI64MT.lib")
-            #else
-                #pragma comment(lib, "DTAPIMT.lib")     // Release 32bit
-                #pragma message("Automatically linking with DTAPIMT.lib") 
-            #endif
-        #endif
-    #endif
-#endif
-#endif    // #ifdef _WIN32
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- Includes -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-
-#ifndef _WIN32
-    // Linux specific includes: For NULL type definition
-    #include </usr/include/linux/stddef.h>
-    // For intptr_t
-    #include <stdint.h>
-#endif
-
-// STL includes
-#include <list>
-#include <map>
-#include <string>
-#include <vector>
-#include <limits>
-
-// When creating a DLL under Windows, disable warnings related to exporting STL
-// instantiations in classes.
-// See also: http://support.microsoft.com/kb/q168958/
-#ifdef _MSC_VER
-    #pragma warning(disable: 4251)
-#endif
-
-// Macro used to mark functions as deprecated. Using deprecated functions will generate
-// a compiler warning, pushing API users to stop using these functions.
-#ifdef __GNUC__
-#define DTAPI_DEPRECATED(func, msg)  func __attribute__ ((deprecated))
-#elif defined(_MSC_VER)
-#define DTAPI_DEPRECATED(func, msg)  __declspec(deprecated(msg)) func
-#else
-#define DTAPI_DEPRECATED(func, msg) func
-#endif
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- Support Types -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-
-#ifdef _WIN32
-    typedef unsigned __int64 __uint64;
-#else
-    typedef signed long long __int64;
-    typedef unsigned long long __uint64;
-#endif
-
-// All DTAPI code lives in namespace Dtapi
-namespace Dtapi
-{
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- Forward declarations -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-
-class AdvDemod;
-class DtaPlusDevice;
-class DtDemodPars;
-class DtDvbT2Pars;
-class DteDevice;
-class DtSdiUtility;
-class FrameBufImpl;
-class IDevice;
-class IDtDemodEvent;
-class InpChannel;
-class IXpMutex;
-class MplpHelper;
-class OutpChannel;
-class SdiMatrixImpl;
-
-struct DtDabEnsembleInfo;
-struct DtDabEtiStreamSelPars;
-struct DtDabStreamSelPars;
-struct DtDabTransmitterIdInfo;
-struct DtDemodParsAtsc;
-struct DtDemodParsDab;
-struct DtDemodParsDvbC2;
-struct DtDemodParsDvbS;
-struct DtDemodParsDvbS2;
-struct DtDemodParsDvbT;
-struct DtDemodParsDvbT2;
-struct DtDemodParsIq;
-struct DtDemodParsIq2131;
-struct DtDemodParsIsdbt;
-struct DtDemodParsQam;
-struct DtDemodLdpcStats;
-struct DtDemodMaLayerData;
-struct DtDemodMaLayerStats;
-struct DtDemodPlpBlocks;
-struct DtDvbC2DemodL1Part2Data;
-struct DtDvbC2DemodL1PlpSigData;
-struct DtDvbC2ModStatus;
-struct DtDvbC2Pars;
-struct DtDvbC2PlpPars;
-struct DtDvbC2StreamSelPars;
-struct DtDvbC2XFecFrameHeader;
-struct DtDvbCidPars;
-struct DtDvbS2ModStatus;
-struct DtDvbS2ModCod;
-struct DtDvbS2Pars;
-struct DtDemodParsDvbS2Adv;
-struct DtDvbTStreamSelPars;
-struct DtDvbTTpsInfo;
-struct DtDvbT2DemodL1Data;
-struct DtDvbT2ModStatus;
-struct DtDvbT2StreamSelPars;
-struct DtFractionInt;
-struct DtIsdbtStreamSelPars;
-struct DtIsdbTmmPars;
-struct DtPar;
-struct DtPlpInpPars;
-struct DtStatistic;
-struct DtT2MiStreamSelPars;
-struct DtVirtualOutData;
-struct DtRsDecStats;
-struct DtVitDecStats;
-
-//+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
-//=+=+=+=+=+=+=+=+=+=+=+=+ DTAPI HELPER CLASSES AND HELPER TYPES +=+=+=+=+=+=+=+=+=+=+=+=+
-//+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DTAPI_RESULT -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-
-// Type returned by most API calls
-typedef unsigned int  DTAPI_RESULT;
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtExc -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Exception object thrown from API calls (if API call throws an exception)
-//
-class DtExc
-{
-public:
-    const DTAPI_RESULT  m_Error;    // DTAPI result code (i.e. reason of exception)
-    
-public:
-    DtExc(DTAPI_RESULT e) : m_Error(e) {}
-    virtual ~DtExc() {}
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtBufferInfo -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-struct DtBufferInfo
-{
-    int  m_VidStd;                  // Video standard 
-    int  m_NumColumns;              // Number of columns 
-    __int64  m_NumReceived;         // Number of frames received
-    __int64  m_NumDropped;          // Number of frames dropped
-    __int64  m_NumTransmitted;      // Number of frames transmitted
-    __int64  m_NumDuplicated;       // Number of frames duplicated
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtCaps - Capabilities -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Scalable type for storing (combinations of) capability flags.
-// It can be used with bitwise operators for testing and setting of capabilities.
-//
-class DtCaps 
-{
-    // Number of 64-bit integers used to represent a capability
-    static const int  DTCAPS_SIZE = 3;
-
-public:
-    DtCaps();
-    DtCaps(int BitNr);
-    DtCaps(__int64 F1, __int64 F2, __int64 F3);
-
-public:
-    int  GetCapIndex() const;
-    std::string  ToString() const;
-    DtCaps  operator & (const DtCaps& Caps) const;
-    DtCaps&  operator &= (const DtCaps& Caps);
-    DtCaps  operator | (const DtCaps& Caps) const;
-    DtCaps&  operator |= (const DtCaps& Caps);
-    bool  operator == (const DtCaps& Caps) const;
-    bool  operator == (const int Zero) const;
-    bool  operator != (const DtCaps& Caps) const;
-    bool  operator != (const int Zero) const;
-    __int64  operator [] (const int n) const;
-    DtCaps  operator ~ () const;
-    // Implementation data
-private:
-    __int64  m_Flags[DTCAPS_SIZE];
-};
-
-// Capabilities
-#define DTAPI_CAP_EMPTY        Dtapi::DtCaps()   // DtCaps without any capability flags
-
-// Capability group APPS - Applications
-#define DTAPI_CAP_C2X         Dtapi::DtCaps(0)   // C2Xpert
-#define DTAPI_CAP_DP          Dtapi::DtCaps(1)   // DtGrabber+ and DtTV
-#define DTAPI_CAP_DTTV        Dtapi::DtCaps(2)   // DtTV
-#define DTAPI_CAP_E           Dtapi::DtCaps(3)   // DtEncode
-#define DTAPI_CAP_J           Dtapi::DtCaps(4)   // DtJitter
-#define DTAPI_CAP_MR          Dtapi::DtCaps(5)   // MuxXpert runtime
-#define DTAPI_CAP_MS          Dtapi::DtCaps(6)   // MuxXpert SDK
-#define DTAPI_CAP_MX          Dtapi::DtCaps(7)   // MuxXpert
-#define DTAPI_CAP_RC          Dtapi::DtCaps(8)   // StreamXpress remote control
-#define DTAPI_CAP_RX          Dtapi::DtCaps(9)   // RFXpert
-#define DTAPI_CAP_SP          Dtapi::DtCaps(10)  // StreamXpress stream player
-#define DTAPI_CAP_SPNIC       Dtapi::DtCaps(11)  // StreamXpress through local NIC
-#define DTAPI_CAP_SX          Dtapi::DtCaps(12)  // StreamXpert analyzer
-#define DTAPI_CAP_SXDGL       Dtapi::DtCaps(13)  // StreamXpert analyzer (dongled)
-#define DTAPI_CAP_SY          Dtapi::DtCaps(14)  // SdEye
-#define DTAPI_CAP_XP          Dtapi::DtCaps(15)  // Xpect
-#define DTAPI_CAP_T2X         Dtapi::DtCaps(16)  // T2Xpert
-
-// Capability group BOOLIO - Boolean I/O capabilities
-#define DTAPI_CAP_BW          Dtapi::DtCaps(17)  // Isochronous bandwidth allocated
-#define DTAPI_CAP_FAILSAFE    Dtapi::DtCaps(18)  // A fail-over relay is available
-#define DTAPI_CAP_FRACMODE    Dtapi::DtCaps(19)  // Fractional mode is supported
-#define DTAPI_CAP_GENLOCKED   Dtapi::DtCaps(20)  // Locked to a genlock reference
-#define DTAPI_CAP_GENREF      Dtapi::DtCaps(21)  // Genlock reference input
-#define DTAPI_CAP_SWS2APSK    Dtapi::DtCaps(22)  // DVB-S2 APSK mode
-
-// Capability group DEMODPROPS - Demodulation properties
-#define DTAPI_CAP_ANTPWR      Dtapi::DtCaps(23)  // Antenna power
-#define DTAPI_CAP_LNB         Dtapi::DtCaps(24)  // LNB
-#define DTAPI_CAP_RX_ADV      Dtapi::DtCaps(25)  // Advanced demodulation
-
-// Capability group FREQBAND - Frequency band
-#define DTAPI_CAP_LBAND       Dtapi::DtCaps(26)  // L-band 950-2150MHz
-#define DTAPI_CAP_VHF         Dtapi::DtCaps(27)  // VHF-band 47-470MHz
-#define DTAPI_CAP_UHF         Dtapi::DtCaps(28)  // UHF-band 400-862MHz
-
-// Capability group IODIR - I/O direction
-#define DTAPI_CAP_DISABLED    Dtapi::DtCaps(29)  // Port is disabled
-#define DTAPI_CAP_INPUT       Dtapi::DtCaps(30)  // Uni-directional input
-#define DTAPI_CAP_OUTPUT      Dtapi::DtCaps(31)  // Uni-directional output
-
-// Subcapabilities of IODIR, DTAPI_CAP_INPUT
-#define DTAPI_CAP_SHAREDANT   Dtapi::DtCaps(32)  // Get antenna signal from another port
-
-// Subcapabilities of IODIR, DTAPI_CAP_OUTPUT
-#define DTAPI_CAP_DBLBUF      Dtapi::DtCaps(33)  // Double buffered output
-#define DTAPI_CAP_LOOPS2L3    Dtapi::DtCaps(34)  // Loop-through of DVB-S2 in L3-frames
-#define DTAPI_CAP_LOOPS2TS    Dtapi::DtCaps(35)  // Loop-through of an DVB-S(2) input
-#define DTAPI_CAP_LOOPTHR     Dtapi::DtCaps(36)  // Loop-through of another input
-
-// Capability group IOPROPS - Miscellaneous I/O properties
-#define DTAPI_CAP_ASIPOL      Dtapi::DtCaps(37)  // ASI output signal can be inverted
-#define DTAPI_CAP_HUFFMAN     Dtapi::DtCaps(38)  // Huffman coding for SDI
-#define DTAPI_CAP_IPPAIR      Dtapi::DtCaps(39)  // Network port supports failover
-#define DTAPI_CAP_L3MODE      Dtapi::DtCaps(40)  // L3-frame mode
-#define DTAPI_CAP_MATRIX      Dtapi::DtCaps(41)  // Matrix API support
-#define DTAPI_CAP_MATRIX2     Dtapi::DtCaps(42)  // High-level Matrix API support
-#define DTAPI_CAP_RAWASI      Dtapi::DtCaps(43)  // Raw ASI
-#define DTAPI_CAP_SDI10BNBO   Dtapi::DtCaps(44)  // 10-bit network byte order
-#define DTAPI_CAP_SDITIME     Dtapi::DtCaps(45)  // SDI timestamping
-#define DTAPI_CAP_TIMESTAMP64 Dtapi::DtCaps(46)  // 64-bit timestamping
-#define DTAPI_CAP_TRPMODE     Dtapi::DtCaps(47)  // Transparent mode
-#define DTAPI_CAP_TS          Dtapi::DtCaps(48)  // MPEG-2 transport stream
-#define DTAPI_CAP_TXONTIME    Dtapi::DtCaps(49)  // Transmit on timestamp
-#define DTAPI_CAP_VIRTUAL     Dtapi::DtCaps(50)  // Virtual port, no physical connection
-
-// Capability group IOSTD - I/O standard
-#define DTAPI_CAP_3GSDI       Dtapi::DtCaps(51)  // 3G-SDI
-#define DTAPI_CAP_ASI         Dtapi::DtCaps(52)  // DVB-ASI transport stream
-#define DTAPI_CAP_DEMOD       Dtapi::DtCaps(53)  // Demodulation
-#define DTAPI_CAP_GPSTIME     Dtapi::DtCaps(54)  // Supports GPS-time
-#define DTAPI_CAP_HDSDI       Dtapi::DtCaps(55)  // HD-SDI
-#define DTAPI_CAP_IFADC       Dtapi::DtCaps(56)  // IF A/D converter
-#define DTAPI_CAP_IP          Dtapi::DtCaps(57)  // Transport stream over IP
-#define DTAPI_CAP_MOD         Dtapi::DtCaps(58)  // Modulator output
-#define DTAPI_CAP_PHASENOISE  Dtapi::DtCaps(59)  // Phase noise injector
-#define DTAPI_CAP_RS422       Dtapi::DtCaps(60)  // RS422 port
-#define DTAPI_CAP_SDI         Dtapi::DtCaps(61)  // SD-SDI
-#define DTAPI_CAP_SPI         Dtapi::DtCaps(62)  // DVB-SPI transport stream
-#define DTAPI_CAP_SPISDI      Dtapi::DtCaps(63)  // SD-SDI on a parallel port
-
-// Subcapabilities of IOSTD, DTAPI_CAP_3GSDI
-#define DTAPI_CAP_1080P50     Dtapi::DtCaps(64)  // 1080p/50 lvl A
-#define DTAPI_CAP_1080P50B    Dtapi::DtCaps(65)  // 1080p/50 lvl B
-#define DTAPI_CAP_1080P59_94  Dtapi::DtCaps(66)  // 1080p/59.94 lvl A
-#define DTAPI_CAP_1080P59_94B Dtapi::DtCaps(67)  // 1080p/59.94 lvl B
-#define DTAPI_CAP_1080P60     Dtapi::DtCaps(68)  // 1080p/60 lvl A
-#define DTAPI_CAP_1080P60B    Dtapi::DtCaps(69)  // 1080p/60 lvl B
-
-// Subcapabilities of IOSTD, DTAPI_CAP_HDSDI
-#define DTAPI_CAP_1080I50     Dtapi::DtCaps(70)  // 1080i/50
-#define DTAPI_CAP_1080I59_94  Dtapi::DtCaps(71)  // 1080i/59.94
-#define DTAPI_CAP_1080I60     Dtapi::DtCaps(72)  // 1080i/60
-#define DTAPI_CAP_1080P23_98  Dtapi::DtCaps(73)  // 1080p/23.98
-#define DTAPI_CAP_1080P24     Dtapi::DtCaps(74)  // 1080p/24
-#define DTAPI_CAP_1080P25     Dtapi::DtCaps(75)  // 1080p/25
-#define DTAPI_CAP_1080P29_97  Dtapi::DtCaps(76)  // 1080p/29.97
-#define DTAPI_CAP_1080P30     Dtapi::DtCaps(77)  // 1080p/30
-#define DTAPI_CAP_1080PSF23_98 Dtapi::DtCaps(78) // 1080psf/23.98
-#define DTAPI_CAP_1080PSF24   Dtapi::DtCaps(79)  // 1080psf/24
-#define DTAPI_CAP_1080PSF25   Dtapi::DtCaps(80)  // 1080psf/25
-#define DTAPI_CAP_1080PSF29_97 Dtapi::DtCaps(81) // 1080psf/29.97
-#define DTAPI_CAP_1080PSF30   Dtapi::DtCaps(82)  // 1080psf/30
-#define DTAPI_CAP_720P23_98   Dtapi::DtCaps(83)  // 720p/23.98
-#define DTAPI_CAP_720P24      Dtapi::DtCaps(84)  // 720p/24
-#define DTAPI_CAP_720P25      Dtapi::DtCaps(85)  // 720p/25
-#define DTAPI_CAP_720P29_97   Dtapi::DtCaps(86)  // 720p/29.97
-#define DTAPI_CAP_720P30      Dtapi::DtCaps(87)  // 720p/30
-#define DTAPI_CAP_720P50      Dtapi::DtCaps(88)  // 720p/50
-#define DTAPI_CAP_720P59_94   Dtapi::DtCaps(89)  // 720p/59.94
-#define DTAPI_CAP_720P60      Dtapi::DtCaps(90)  // 720p/60
-
-// Subcapabilities of IOSTD, DTAPI_CAP_SDI
-#define DTAPI_CAP_525I59_94   Dtapi::DtCaps(91)  // 525i/59.94
-#define DTAPI_CAP_625I50      Dtapi::DtCaps(92)  // 625i/50
-
-// Subcapabilities of IOSTD, DTAPI_CAP_SPISDI
-#define DTAPI_CAP_SPI525I59_94 Dtapi::DtCaps(93) // SPI 525i/59.94
-#define DTAPI_CAP_SPI625I50   Dtapi::DtCaps(94)  // SPI 625i/50
-
-// Capability group MODSTD - Modulation standards
-#define DTAPI_CAP_TX_ATSC     Dtapi::DtCaps(95)  // ATSC 8-VSB modulation
-#define DTAPI_CAP_TX_CMMB     Dtapi::DtCaps(96)  // CMMB modulation
-#define DTAPI_CAP_TX_DAB      Dtapi::DtCaps(97)  // DAB modulation
-#define DTAPI_CAP_TX_DTMB     Dtapi::DtCaps(98)  // DTMB modulation
-#define DTAPI_CAP_TX_DVBC2    Dtapi::DtCaps(99)  // DVB-C2 modulation
-#define DTAPI_CAP_TX_DVBS     Dtapi::DtCaps(100) // DVB-S modulation
-#define DTAPI_CAP_TX_DVBS2    Dtapi::DtCaps(101) // DVB-S2 modulation
-#define DTAPI_CAP_TX_DVBS2X   Dtapi::DtCaps(102) // DVB-S2X modulation
-#define DTAPI_CAP_TX_DVBT     Dtapi::DtCaps(103) // DVB-T modulation
-#define DTAPI_CAP_TX_DVBT2    Dtapi::DtCaps(104) // DVB-T2 modulation
-#define DTAPI_CAP_TX_GOLD     Dtapi::DtCaps(105) // GOLD for modulators
-#define DTAPI_CAP_TX_IQ       Dtapi::DtCaps(106) // I/Q sample modulation
-#define DTAPI_CAP_TX_ISDBS    Dtapi::DtCaps(107) // ISDB-S modulation
-#define DTAPI_CAP_TX_ISDBT    Dtapi::DtCaps(108) // ISDB-T modulation
-#define DTAPI_CAP_TX_ISDBTMM  Dtapi::DtCaps(109) // ISDB-Tmm modulation
-#define DTAPI_CAP_TX_MH       Dtapi::DtCaps(110) // ATSC-MH modulation
-#define DTAPI_CAP_TX_QAMA     Dtapi::DtCaps(111) // QAM-A modulation
-#define DTAPI_CAP_TX_QAMB     Dtapi::DtCaps(112) // QAM-B modulation
-#define DTAPI_CAP_TX_QAMC     Dtapi::DtCaps(113) // QAM-C modulation
-#define DTAPI_CAP_TX_SWMC     Dtapi::DtCaps(114) // SW multi-channel modulation
-#define DTAPI_CAP_TX_T2MI     Dtapi::DtCaps(115) // T2MI transmission
-#define DTAPI_CAP_TX_T2SPLP   Dtapi::DtCaps(116) // DVB-T2 single PLP modulation
-
-// Capability group MODPROPS - Modulation properties
-#define DTAPI_CAP_ADJLVL      Dtapi::DtCaps(117) // Adjustable output level
-#define DTAPI_CAP_CM          Dtapi::DtCaps(118) // Channel simulation
-#define DTAPI_CAP_CW          Dtapi::DtCaps(119) // Continuous wave
-#define DTAPI_CAP_DIGIQ       Dtapi::DtCaps(120) // Digital I/Q sample output
-#define DTAPI_CAP_DVBCID      Dtapi::DtCaps(121) // DVB carrier ID 
-#define DTAPI_CAP_IF          Dtapi::DtCaps(122) // IF output
-#define DTAPI_CAP_MUTE        Dtapi::DtCaps(123) // Mute RF output signal
-#define DTAPI_CAP_ROLLOFF     Dtapi::DtCaps(124) // Adjustable roll-off factor
-#define DTAPI_CAP_S2APSK      Dtapi::DtCaps(125) // DVB-S2 16-APSK/32-APSK
-#define DTAPI_CAP_SNR         Dtapi::DtCaps(126) // AWGN insertion
-#define DTAPI_CAP_TX_16MHZ    Dtapi::DtCaps(127) // 16MHz bandwidth mode
-#define DTAPI_CAP_TX_SFN      Dtapi::DtCaps(128) // SNF operation
-
-// Capability group RFCLKSEL - RF clock source selection
-#define DTAPI_CAP_RFCLKEXT    Dtapi::DtCaps(129) // External RF clock input
-#define DTAPI_CAP_RFCLKINT    Dtapi::DtCaps(130) // Internal RF clock reference
-
-// Capability group RXSTD - Receiver standards
-#define DTAPI_CAP_RX_ATSC     Dtapi::DtCaps(131) // ATSC 8-VSB reception
-#define DTAPI_CAP_RX_CMMB     Dtapi::DtCaps(132) // CMMB reception
-#define DTAPI_CAP_RX_DAB      Dtapi::DtCaps(133) // DAB reception
-#define DTAPI_CAP_RX_DTMB     Dtapi::DtCaps(134) // DTMB reception
-#define DTAPI_CAP_RX_DVBC2    Dtapi::DtCaps(135) // DVB-C2 reception
-#define DTAPI_CAP_RX_DVBS     Dtapi::DtCaps(136) // DVB-S reception
-#define DTAPI_CAP_RX_DVBS2    Dtapi::DtCaps(137) // DVB-S2 reception
-#define DTAPI_CAP_RX_DVBT     Dtapi::DtCaps(138) // DVB-T reception
-#define DTAPI_CAP_RX_DVBT2    Dtapi::DtCaps(139) // DVB-T2 reception
-#define DTAPI_CAP_RX_GOLD     Dtapi::DtCaps(140) // GOLD for receivers
-#define DTAPI_CAP_RX_IQ       Dtapi::DtCaps(141) // I/Q sample reception
-#define DTAPI_CAP_RX_ISDBS    Dtapi::DtCaps(142) // ISDB-S reception
-#define DTAPI_CAP_RX_ISDBT    Dtapi::DtCaps(143) // ISDB-T reception
-#define DTAPI_CAP_RX_MH       Dtapi::DtCaps(144) // ATSC-MH reception
-#define DTAPI_CAP_RX_QAMA     Dtapi::DtCaps(145) // QAM-A reception
-#define DTAPI_CAP_RX_QAMB     Dtapi::DtCaps(146) // QAM-B reception
-#define DTAPI_CAP_RX_QAMC     Dtapi::DtCaps(147) // QAM-C reception
-#define DTAPI_CAP_RX_T2MI     Dtapi::DtCaps(148) // T2MI reception
-
-// Capability group SPICLKSEL - Parallel port clock source selection
-#define DTAPI_CAP_SPICLKEXT   Dtapi::DtCaps(149) // External clock input
-#define DTAPI_CAP_SPICLKINT   Dtapi::DtCaps(150) // Internal clock reference
-
-// Capability group SPIMODE - Parallel port mode
-#define DTAPI_CAP_SPIFIXEDCLK Dtapi::DtCaps(151) // SPI fixed clock with valid signal
-#define DTAPI_CAP_SPIDVBMODE  Dtapi::DtCaps(152) // SPI DVB mode
-#define DTAPI_CAP_SPISER8B    Dtapi::DtCaps(153) // SPI serial 8-bit mode
-#define DTAPI_CAP_SPISER10B   Dtapi::DtCaps(154) // SPI serial 10-bit mode
-
-// Capability group SPISTD - Parallel port I/O standard
-#define DTAPI_CAP_SPILVDS1    Dtapi::DtCaps(155) // LVDS1
-#define DTAPI_CAP_SPILVDS2    Dtapi::DtCaps(156) // LVDS2
-#define DTAPI_CAP_SPILVTTL    Dtapi::DtCaps(157) // LVTTL
-
-// Capability group TSRATESEL - Transport-stream rate selection
-#define DTAPI_CAP_EXTTSRATE   Dtapi::DtCaps(158) // External TS rate clock input
-#define DTAPI_CAP_EXTRATIO    Dtapi::DtCaps(159) // External TS rate clock with ratio
-#define DTAPI_CAP_INTTSRATE   Dtapi::DtCaps(160) // Internal TS rate clock reference
-#define DTAPI_CAP_LOCK2INP    Dtapi::DtCaps(161) // Lock TS rate to input port
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtCmmbPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// CMMB Modulation Parameters
-//
-struct DtCmmbPars
-{
-    int  m_Bandwidth;               // CMMB Bandwitdh
-    int  m_TsRate;                  // CMMB TS rate in bps
-    int  m_TsPid;                   // PID on which the CMMB stream is found
-    int  m_AreaId;                  // Area ID (0..127)
-    int  m_TxId;                    // Transmitter ID (128..255)
-    
-public:
-    DtCmmbPars();
-    DTAPI_RESULT  RetrieveTsRateFromTs(char* pBuffer, int NumBytes);
-    bool  operator == (DtCmmbPars& Rhs);
-    bool  operator != (DtCmmbPars& Rhs);
-};
-
-// DtOutpChannel::SetModControl - Bandwidth
-#define DTAPI_CMMB_BW_2MHZ          0x00000000
-#define DTAPI_CMMB_BW_8MHZ          0x00000001
-
-//-.-.-.-.-.-.-.-.-.-.-.- DtCmPars - Channel Modelling Parameters -.-.-.-.-.-.-.-.-.-.-.-.
-
-// Maximum number of fading paths
-#define DTAPI_CM_MAX_PATHS          32
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtCmPath -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// This structure describes the fading parameters for a single path in a
-// multi-path simulation.
-//
-struct DtCmPath
-{
-    enum Type
-    {
-        CONSTANT_DELAY,             // Constant delay/phase
-        CONSTANT_DOPPLER,           // Constant frequency shift
-        RAYLEIGH_JAKES,             // Rayleigh fading with Jakes power spectral density
-                                    // (mobile path model)
-        RAYLEIGH_GAUSSIAN           // Rayleigh fading with Gaussian power spectral
-                                    // density (ionospheric path model)
-    };
-    Type  m_Type;                   // Type of path fading
-    double  m_Attenuation;          // Attenuation in dB
-    double  m_Delay;                // Delay in us
-    double  m_Phase;                // Phase shift in degrees for CONSTANT_DELAY paths
-    double  m_Doppler;              // Doppler frequency in Hz
-
-    // Constructor - Gives parameters a default value
-    DtCmPath() :
-        m_Type(CONSTANT_DELAY),
-        m_Attenuation(0.0), m_Delay(0.0), m_Phase(0.0), m_Doppler(0.0)
-    {}
-    // Operators
-    bool  operator == (DtCmPath& Rhs);
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtCmPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// This structure describes channel-modeling parameters. It\92s used to simulate the 
-// transmission distortions that may occur in the channel between a transmitter and
-// a receiver.
-//
-struct DtCmPars
-{
-    bool  m_EnableAwgn;             // Enable white Gaussian noise (AWGN) injection
-    double  m_Snr;                  // Signal-to-noise ratio in dB
-    bool  m_EnablePaths;            // Enable multi-path simulation
-    std::vector<DtCmPath>  m_Paths; // Parameters per path
-
-    // Constructor and operators
-    DtCmPars();
-    bool  operator == (DtCmPars&);
-    bool  operator != (DtCmPars& Rhs) { return !(*this == Rhs); }
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtConstelPoint -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// This structure describes a constellation point in a receiver constellation diagram
-//
-struct DtConstelPoint
-{
-    int  m_X, m_Y;                  // X and Y coordinates
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- IDtDemodEvent -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Callback event interface for demodulators
-//
-class IDtDemodEvent
-{
-public:
-    virtual void  TuningFreqHasChanged(__int64 OldFreqHz, __int64 NewFreqHz) {}
-    virtual void  TuningParsHaveChanged(
-                                __int64 OldFreqHz, int  OldModType, int  OldParXtra[3],
-                                __int64 NewFreqHz, int  NewModType, int  NewParXtra[3]) {}
-};
-
-
-// Maximum number of IpV6 addresses per interface
-#define MAX_IPV6_ADDR               3
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDeviceDesc -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// This structure describes a DekTec device
-//
-struct DtDeviceDesc
-{
-    int  m_Category;                // Device category (DTAPI_CAT_XXX)
-    __int64  m_Serial;              // Unique serial number of the device
-    int  m_PciBusNumber;            // PCI-bus number
-    int  m_SlotNumber;              // PCI-slot number
-    int  m_UsbAddress;              // USB address
-    int  m_TypeNumber;              // Device type number
-    int  m_SubType;                 // Device subtype (0=none, 1=A, ...)
-    int  m_DeviceId;                // Device ID
-    int  m_VendorId;                // Vendor ID
-    int  m_SubsystemId;             // Subsystem ID
-    int  m_SubVendorId;             // Subsystem Vendor ID
-    int  m_NumHwFuncs;              // Number of hardware funtions hosted by device
-    int  m_HardwareRevision;        // Hardware revision (e.g. 302 = 3.2)
-    int  m_FirmwareVersion;         // Firmware version
-    int  m_FirmwareVariant;         // Firmware variant
-    int  m_NumDtInpChan;            // Number of input channels (max)
-    int  m_NumDtOutpChan;           // Number of output channels (max)
-    int  m_NumPorts;                // Number of physical ports
-    unsigned char  m_Ip[4];         // IP address (only valid for DTE-31xx devices)
-    unsigned char  m_IpV6[MAX_IPV6_ADDR][16];
-                                    // IP address (only valid for DTE-31xx devices)
-    unsigned char  m_MacAddr[6];    // MAC address (only valid for DTE-31xx devices)
-    int  m_PcieNumLanes;            // Number of allocated PCIe lanes
-    int  m_PcieMaxLanes;            // Maximum number of PCIe lanes
-    int  m_PcieLinkSpeed;           // Current PCIe link speed (GEN1, 2 or 3)
-    int  m_PcieMaxSpeed;            // Maximum PCIe link speed (GEN1, 2 or 3)
-};
-
-// Device categories
-#define DTAPI_CAT_PCI               0            // PCI or PCI-Express device
-#define DTAPI_CAT_USB               1            // USB-2 or USB-3 device
-#define DTAPI_CAT_NW                2            // Network device
-#define DTAPI_CAT_IP                3            // Network appliance: DTE-31xx
-#define DTAPI_CAT_NIC               4            // Non-DekTec network card
-#define DTAPI_CAT_NWAP              5            // Network Advanced Protocol(VLAN device)
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDtaPlusDeviceDesc -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// This structure describes a DekTec DTA-plus device
-//
-struct DtDtaPlusDeviceDesc
-{
-    __int64  m_Serial;              // Unique serial number of the device
-    std::string  m_DevicePath;      // Path of file to open to interface with the device
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- struct DtDvbCidPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Structure for specifying the DVB channel identification for satellite (DVB-S2)
-// ETSI TS 103 129
-//
-struct DtDvbCidPars
-{
-    bool  m_Enable;             // Enable DVB-CID signalling
-    unsigned int  m_GuidHigh;   // DVB-CID Global Unique Identifier MSBs
-    unsigned int  m_GuidLow;    // DVB-CID Global Unique Identifier LSBs
-   
-    // CID content. Key: Content ID (0...31); Value: Content information (24-bit)
-    // Content ID 0 (carrier ID format) shall have the value 0x0001
-    std::map<int, int>  m_Content;
-
-    DTAPI_RESULT  CheckValidity();
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtEventArgs -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Details for a specific event
-//
-struct DtEventArgs
-{
-    DtEventArgs() : m_Value1(0), m_Value2(0), m_pContext(0) {};
-
-    int  m_HwCat;                   // Hardware category: DTAPI_CAT_XXX
-    __int64  m_Serial;              // Serial number of device causing event
-    int  m_Value1;                  // Event value #1
-    int  m_Value2;                  // Event value #2
-    void*  m_pContext;              // Context-specific pointer
-};
-
-// Event call back function
-typedef void (*pDtEventCallback)(int Event, const DtEventArgs* pArgs);
-
-// Global events
-#define DT_EVENT_TYPE_ADD           0x00000001
-#define DT_EVENT_TYPE_REMOVE        0x00000002
-// Device events
-#define DT_EVENT_TYPE_POWER         0x00000004
-#define DT_EVENT_TYPE_GENLOCK       0x00000008
-#define DT_EVENT_TYPE_TEST          0x80000000
-// Network events
-#define DT_EVENT_IP_CHANGED         0x01000000
-#define DT_EVENT_ADMINST_CHANGED    0x02000000
-
-#define DT_EVENT_TYPE_ALL           0xFFFFFFFF
-
-// Event values
-#define DT_EVENT_VALUE1_POWER_UP    1
-#define DT_EVENT_VALUE1_POWER_DOWN  2
-#define DT_EVENT_VALUE1_NO_LOCK     1
-#define DT_EVENT_VALUE1_LOCKED      2
-#define DT_EVENT_VALUE2_XXX         1
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtFiltCoeff -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// A single FIR filter coefficient
-//
-struct DtFiltCoeff
-{
-    int  m_TapIdx;                  // Tap number
-    double  m_Coeff;                // FIR coefficient
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtFilterPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Filter coefficients for use in a FIR filter
-//
-struct DtFilterPars
-{
-    std::vector<DtFiltCoeff>  m_FiltCoeffs;
-};
-
-// Maximum number of filter coefficients
-#define DTAPI_MAX_NUM_COEFFS   64
-
-#define DTAPI_FRAME_STATUS_OK                0
-#define DTAPI_FRAME_STATUS_ERR_NO_SIGNAL     1
-#define DTAPI_FRAME_STATUS_ERR_STD_MISMATCH  2
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtFractionInt -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// A rational number, expressed as the quotient of two integers
-//
-struct DtFractionInt
-{
-    int  m_Num, m_Den;
-    DtFractionInt()                  { m_Num = 0;  m_Den = 1; }
-    DtFractionInt(int Num, int Den)  { m_Num = Num;  m_Den = Den; }
-};
-
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtFrameInfo -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-struct DtFrameInfo
-{
-    int  m_VidStd;                  // Video standard 
-    __int64  m_Timestamp;           // 64-bit timestamp
-    __int64  m_FrameNumber;         // 64-bit frame number
-    __int64  m_Rp188;               // RP188 timestamp
-    int  m_RxMode;                  // RX mode at the time this frame was received
-    int  m_Status;                  // One of DTAPI_FRAME_STATUS_*
-};
-
-//-.-.-.-.-.-.-.-.-.-.- DtHwFuncDesc - Hardware Function Descriptor -.-.-.-.-.-.-.-.-.-.-.
-//
-// Structure describing a hardware function
-//
-struct DtHwFuncDesc
-{
-    DtDeviceDesc  m_DvcDesc;        // Device descriptor
-    int  m_ChanType;                // Channel type (OR-able)
-    DtCaps  m_Flags;                // Capability flags (OR-able)
-    int  m_IndexOnDvc;              // Relative index of hardware function
-    int  m_Port;                    // Physical port number
-    unsigned char  m_Ip[4];         // IP V4 address (TS-over-IP functions only)
-    unsigned char  m_IpV6[MAX_IPV6_ADDR][16];
-                                    // IP V6 address (TS-over-IP functions only)
-    unsigned char  m_MacAddr[6];    // MAC address (TS-over-IP functions only)
-};
-
-// Hardware Function - Channel types
-// For IP hardware functions, both DTAPI_CHAN_INPUT and DTAPI_CHAN_OUTPUT are set
-#define DTAPI_CHAN_DISABLED         0            // Channel is disabled
-#define DTAPI_CHAN_INPUT            1            // Input channel
-#define DTAPI_CHAN_OUTPUT           2            // Output channel
-#define DTAPI_CHAN_DBLBUF           4            // Double-buffered copy of an output
-#define DTAPI_CHAN_LOOPTHR          8            // Loop-through copy of another port
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtIoConfig - I/O Configuration -.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Stores the I/O configuration parameters for one I/O port configuration
-//
-struct DtIoConfig
-{
-    int  m_Port;                    // Port number
-    int  m_Group;                   // Config group, linked to I/O capability groups
-    int  m_Value;                   // Config value, linked to I/O capabilities
-    int  m_SubValue;                // Config sub value, linked to I/O sub capabilities
-    __int64  m_ParXtra[2];          // Extra parameters, e.g. source port number
-
-    // Constructor - Gives parameters a default value
-    DtIoConfig()
-    {
-        m_Port = -1;
-        m_Group = -1;
-        m_Value = m_SubValue = -1;
-        m_ParXtra[0] = m_ParXtra[1] = -1;
-    }
-    DtIoConfig(int  Port, int  Group)
-    {
-        m_Port = Port;
-        m_Group = Group;
-        m_Value = m_SubValue = -1;
-        m_ParXtra[0] = m_ParXtra[1] = -1;
-    }
-};
-
-// I/O configuration groups
-#define DTAPI_IOCONFIG_IODIR       0             // I/O direction
-#define DTAPI_IOCONFIG_IOSTD       1             // I/O standard
-#define DTAPI_IOCONFIG_RFCLKSEL    2             // RF clock source selection
-#define DTAPI_IOCONFIG_SPICLKSEL   3             // Parallel port clock source selection
-#define DTAPI_IOCONFIG_SPIMODE     4             // Parallel port mode
-#define DTAPI_IOCONFIG_SPISTD      5             // Parallel port I/O standard
-#define DTAPI_IOCONFIG_TSRATESEL   6             // Transport-stream rate selection
-
-// I/O configuration groups - Boolean I/O
-#define DTAPI_IOCONFIG_BW          7             // Isochronous bandwidth allocated
-#define DTAPI_IOCONFIG_FAILSAFE    8             // A fail-over relay is available
-#define DTAPI_IOCONFIG_FRACMODE    9             // Fractional mode is supported
-#define DTAPI_IOCONFIG_GENLOCKED   10            // Locked to a genlock reference
-#define DTAPI_IOCONFIG_GENREF      11            // Genlock reference input
-#define DTAPI_IOCONFIG_SWS2APSK    12            // DVB-S2 APSK mode
-
-// Values for boolean I/O configuration options
-#define DTAPI_IOCONFIG_TRUE        13            // Turn I/O capability on
-#define DTAPI_IOCONFIG_FALSE       14            // Turn I/O capability off
-
-// Values for group IO_CONFIG_IODIR (I/O direction)
-#define DTAPI_IOCONFIG_DISABLED    15            // Port is disabled
-#define DTAPI_IOCONFIG_INPUT       16            // Uni-directional input
-#define DTAPI_IOCONFIG_OUTPUT      17            // Uni-directional output
-
-// SubValues for group DTAPI_IOCONFIG_IODIR, value DTAPI_IOCONFIG_INPUT
-#define DTAPI_IOCONFIG_SHAREDANT   18            // Get antenna signal from another port
-
-// SubValues for group DTAPI_IOCONFIG_IODIR, value DTAPI_IOCONFIG_OUTPUT
-#define DTAPI_IOCONFIG_DBLBUF      19            // Double buffered output
-#define DTAPI_IOCONFIG_LOOPS2L3    20            // Loop-through of DVB-S2 in L3-frames
-#define DTAPI_IOCONFIG_LOOPS2TS    21            // Loop-through of an DVB-S(2) input
-#define DTAPI_IOCONFIG_LOOPTHR     22            // Loop-through of another input
-
-// Values for group IO_CONFIG_IOSTD (I/O standard)
-#define DTAPI_IOCONFIG_3GSDI       23            // 3G-SDI
-#define DTAPI_IOCONFIG_ASI         24            // DVB-ASI transport stream
-#define DTAPI_IOCONFIG_DEMOD       25            // Demodulation
-#define DTAPI_IOCONFIG_GPSTIME     26            // Supports GPS-time
-#define DTAPI_IOCONFIG_HDSDI       27            // HD-SDI
-#define DTAPI_IOCONFIG_IFADC       28            // IF A/D converter
-#define DTAPI_IOCONFIG_IP          29            // Transport stream over IP
-#define DTAPI_IOCONFIG_MOD         30            // Modulator output
-#define DTAPI_IOCONFIG_PHASENOISE  31            // Phase noise injector
-#define DTAPI_IOCONFIG_RS422       32            // RS422 port
-#define DTAPI_IOCONFIG_SDI         33            // SD-SDI
-#define DTAPI_IOCONFIG_SPI         34            // DVB-SPI transport stream
-#define DTAPI_IOCONFIG_SPISDI      35            // SD-SDI on a parallel port
-
-// SubValues for group DTAPI_IOCONFIG_IOSTD, value DTAPI_IOCONFIG_3GSDI
-#define DTAPI_IOCONFIG_1080P50     36            // 1080p/50 lvl A
-#define DTAPI_IOCONFIG_1080P50B    37            // 1080p/50 lvl B
-#define DTAPI_IOCONFIG_1080P59_94  38            // 1080p/59.94 lvl A
-#define DTAPI_IOCONFIG_1080P59_94B 39            // 1080p/59.94 lvl B
-#define DTAPI_IOCONFIG_1080P60     40            // 1080p/60 lvl A
-#define DTAPI_IOCONFIG_1080P60B    41            // 1080p/60 lvl B
-
-// SubValues for group DTAPI_IOCONFIG_IOSTD, value DTAPI_IOCONFIG_HDSDI
-#define DTAPI_IOCONFIG_1080I50     42            // 1080i/50
-#define DTAPI_IOCONFIG_1080I59_94  43            // 1080i/59.94
-#define DTAPI_IOCONFIG_1080I60     44            // 1080i/60
-#define DTAPI_IOCONFIG_1080P23_98  45            // 1080p/23.98
-#define DTAPI_IOCONFIG_1080P24     46            // 1080p/24
-#define DTAPI_IOCONFIG_1080P25     47            // 1080p/25
-#define DTAPI_IOCONFIG_1080P29_97  48            // 1080p/29.97
-#define DTAPI_IOCONFIG_1080P30     49            // 1080p/30
-#define DTAPI_IOCONFIG_1080PSF23_98 50           // 1080psf/23.98
-#define DTAPI_IOCONFIG_1080PSF24   51            // 1080psf/24
-#define DTAPI_IOCONFIG_1080PSF25   52            // 1080psf/25
-#define DTAPI_IOCONFIG_1080PSF29_97 53           // 1080psf/29.97
-#define DTAPI_IOCONFIG_1080PSF30   54            // 1080psf/30
-#define DTAPI_IOCONFIG_720P23_98   55            // 720p/23.98
-#define DTAPI_IOCONFIG_720P24      56            // 720p/24
-#define DTAPI_IOCONFIG_720P25      57            // 720p/25
-#define DTAPI_IOCONFIG_720P29_97   58            // 720p/29.97
-#define DTAPI_IOCONFIG_720P30      59            // 720p/30
-#define DTAPI_IOCONFIG_720P50      60            // 720p/50
-#define DTAPI_IOCONFIG_720P59_94   61            // 720p/59.94
-#define DTAPI_IOCONFIG_720P60      62            // 720p/60
-
-// SubValues for group DTAPI_IOCONFIG_IOSTD, value DTAPI_IOCONFIG_SDI
-#define DTAPI_IOCONFIG_525I59_94   63            // 525i/59.94
-#define DTAPI_IOCONFIG_625I50      64            // 625i/50
-
-// SubValues for group DTAPI_IOCONFIG_IOSTD, value DTAPI_IOCONFIG_SPISDI
-#define DTAPI_IOCONFIG_SPI525I59_94 65           // SPI 525i/59.94
-#define DTAPI_IOCONFIG_SPI625I50   66            // SPI 625i/50
-
-// Values for group IO_CONFIG_RFCLKSEL (RF clock source selection)
-#define DTAPI_IOCONFIG_RFCLKEXT    67            // External RF clock input
-#define DTAPI_IOCONFIG_RFCLKINT    68            // Internal RF clock reference
-
-// Values for group IO_CONFIG_SPICLKSEL (Parallel port clock source selection)
-#define DTAPI_IOCONFIG_SPICLKEXT   69            // External clock input
-#define DTAPI_IOCONFIG_SPICLKINT   70            // Internal clock reference
-
-// Values for group IO_CONFIG_SPIMODE (Parallel port mode)
-#define DTAPI_IOCONFIG_SPIFIXEDCLK 71            // SPI fixed clock with valid signal
-#define DTAPI_IOCONFIG_SPIDVBMODE  72            // SPI DVB mode
-#define DTAPI_IOCONFIG_SPISER8B    73            // SPI serial 8-bit mode
-#define DTAPI_IOCONFIG_SPISER10B   74            // SPI serial 10-bit mode
-
-// Values for group IO_CONFIG_SPISTD (Parallel port I/O standard)
-#define DTAPI_IOCONFIG_SPILVDS1    75            // LVDS1
-#define DTAPI_IOCONFIG_SPILVDS2    76            // LVDS2
-#define DTAPI_IOCONFIG_SPILVTTL    77            // LVTTL
-
-// Values for group IO_CONFIG_TSRATESEL (Transport-stream rate selection)
-#define DTAPI_IOCONFIG_EXTTSRATE   78            // External TS rate clock input
-#define DTAPI_IOCONFIG_EXTRATIO    79            // External TS rate clock with ratio
-#define DTAPI_IOCONFIG_INTTSRATE   80            // Internal TS rate clock reference
-#define DTAPI_IOCONFIG_LOCK2INP    81            // Lock TS rate to input port
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtIqData -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Structure representing an I/Q data sample
-//
-struct DtIqData
-{
-    int  m_I, m_Q;                  // I/Q sample pair
-};
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtIqDirectPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Direct-IQ Modulation Parameters
-//
-struct DtIqDirectPars
-{
-    DtFractionInt  m_SampleRate;    // Sample rate
-    int  m_IqPacking;               // IQ-Packing;  None, Auto, 10- or 12-bit packing  
-    int  m_ChanFilter;              // Channel filter
-    int  m_Interpolation;           // Interpolation method
-
-    
-public:
-    DTAPI_RESULT  CheckValidity(void);
-};
-
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtIsdbsLayerPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// DtIsdbsLayerPars
-//
-struct DtIsdbsLayerPars
-{
-    int  m_NumSlots;                // Number of slots
-    int  m_ModCod;                  // Modulation method and Code rate
-};
-
-// Number of slots per ISDB-S frame
-#define DTAPI_ISDBS_SLOTS_PER_FRAME 48
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtIsdbsPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// ISDB-S parameters including per-layer parameters
-//
-struct DtIsdbsPars
-{
-    DtIsdbsPars() : m_DoMux(false), m_B15Mode(false) {}
-
-    bool  m_DoMux;                  // Hierarchical multiplexing yes/no
-    
-    // Parameters for when m_DoMux==false
-    bool  m_B15Mode;                // ARIB B.15 mode (true) or TMCC in sync bytes (false)
-
-    // Parameters for when m_DoMux==true
-    int   m_Emergency;              // Switch-on control for emergency broadcast
-    int   m_RelTs2TsId[8];          // Relative TS to TS-ID mapping
-    // Slot to relative TS mapping
-    int   m_Slot2RelTs[DTAPI_ISDBS_SLOTS_PER_FRAME];
-    // Modulation parameters per hierarchical layer
-    DtIsdbsLayerPars  m_LayerPars[4];
-
-    DTAPI_RESULT  CheckValidity(void);
-    void  Init(void);
-    bool  operator == (DtIsdbsPars& Rhs);
-    bool  operator != (DtIsdbsPars& Rhs);
-};
-
-// ISDB-S modulation method and code rate
-#define DTAPI_ISDBS_MODCOD_BPSK_1_2 1
-#define DTAPI_ISDBS_MODCOD_QPSK_1_2 2
-#define DTAPI_ISDBS_MODCOD_QPSK_2_3 3
-#define DTAPI_ISDBS_MODCOD_QPSK_3_4 4
-#define DTAPI_ISDBS_MODCOD_QPSK_5_6 5
-#define DTAPI_ISDBS_MODCOD_QPSK_7_8 6
-#define DTAPI_ISDBS_MODCOD_8PSK_2_3 7
-#define DTAPI_ISDBS_MODCOD_NOT_ALLOC 15
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtIsdbtLayerData -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Parameters per hierarchical ISDB-T layer used for statistic: DTAPI_STAT_ISDBT_PARSDATA
-//
-struct DtIsdbtLayerData
-{
-    int  m_NumSegments;             // Number of segments
-    int  m_Modulation;              // Modulation type
-    int  m_CodeRate;                // Code rate
-    int  m_TimeInterleave;          // Time interleaving 0..4 (new spec limits the
-                                    // maximum value to 3 instead of 4).
-                                    // Time interleaving I = 0 if ti = 0 or
-                                    // I = (1 << (ti + 2 - mode)) if ti != 0
-    DtIsdbtLayerData();
-
-    // Serialisation
-    DTAPI_RESULT  FromXml(const std::wstring& XmlString);
-    DTAPI_RESULT  ToXml(std::wstring& XmlString);
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtIsdbtLayerPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Parameters per hierarchical ISDB-T layer
-//
-struct DtIsdbtLayerPars
-{
-    int  m_NumSegments;             // Number of segments
-    int  m_Modulation;              // Modulation type
-    int  m_CodeRate;                // Code rate
-    int  m_TimeInterleave;          // Time interleaving
-    // Derived:
-    int  m_BitRate;                 // Bits per second assuming 6 MHz channel
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtIsdbtParamsData -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// ISDB-T parameters including per-layer parameters used for statistic: 
-// DTAPI_STAT_ISDBT_PARSDATA
-//
-struct DtIsdbtParamsData
-{
-    int  m_BType;                   // Broadcast type
-    int  m_Mode;                    // Transmission mode: 1, 2 or 3 
-    int  m_Guard;                   // Guard interval
-    int  m_PartialRx;               // Use first layer for partial reception.
-                                    // Ignored for radio broadcasts 
-    // Layer-A/B/C parameters
-    DtIsdbtLayerData  m_LayerPars[3];
-
-    DtIsdbtParamsData();
-
-    // Serialisation
-    DTAPI_RESULT  FromXml(const std::wstring& XmlString);
-    DTAPI_RESULT  ToXml(std::wstring& XmlString);
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtIsdbtPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// ISDB-T parameters including per-layer parameters
-//
-struct DtIsdbtPars
-{
-    bool  m_DoMux;                  // Hierarchical multiplexing yes/no
-    bool  m_FilledOut;              // Members have been given a value
-    int  m_ParXtra0;                // #Segments, bandwidth, sample rate, sub channel
-    int  m_BType;                   // Broadcast type
-    int  m_Mode;                    // Transmission mode
-    int  m_Guard;                   // Guard interval
-    int  m_PartialRx;               // Partal reception
-    int  m_Emergency;               // Switch-on control for emergency broadcast
-    int  m_IipPid;                  // PID used for multiplexing IIP packet
-    int  m_LayerOther;              // Other PIDs are mapped to this layer
-    int  m_Virtual13Segm;           // Virtual 13-segment mode
-    
-    // Layer-A/B/C parameters
-    DtIsdbtLayerPars  m_LayerPars[3];
-
-    // PID-to-layer mapping
-    std::map<int, int>  m_Pid2Layer;
-
-    // Derived:
-    bool  m_Valid;                  // The parameter set is valid
-    int  m_TotalBitrate;            // Bitrate of entire stream
-
-    // Member function
-    DtIsdbtPars();
-    static bool  BTypeCompat(int BType, int NumSegm);
-    DTAPI_RESULT  CheckValidity(int& ResultCode);
-    DTAPI_RESULT  ComputeRates(void);
-    void  MakeConsistent();
-    void  MakeNumSegmConsistent();
-    int  NumSegm();
-    DTAPI_RESULT  RetrieveParsFromTs(char* pBuffer, int NumBytes);
-    bool  operator == (DtIsdbtPars& Rhs);
-    bool  operator != (DtIsdbtPars& Rhs);
-};
-
- 
-
-
-// ISDB-T layer selection used for demodulation
-#define DTAPI_ISDBT_LAYER_NONE     -1
-#define DTAPI_ISDBT_LAYER_AUTO     -2
-
-// PID-to-layer mapping
-#define DTAPI_ISDBT_LAYER_A         1
-#define DTAPI_ISDBT_LAYER_B         2
-#define DTAPI_ISDBT_LAYER_C         4
-
-// DtIsdbtPars.m_BType - Broadcast type
-#define DTAPI_ISDBT_BTYPE_TV        0            // 1/3/13-segment TV broadcast
-#define DTAPI_ISDBT_BTYPE_RAD1      1            // 1-segment radio broadcast
-#define DTAPI_ISDBT_BTYPE_RAD3      2            // 3-segment radio broadcast
-
-// DtIsdbtPars.m_Guard - Guard interval
-#define DTAPI_ISDBT_GUARD_1_32      0
-#define DTAPI_ISDBT_GUARD_1_16      1
-#define DTAPI_ISDBT_GUARD_1_8       2
-#define DTAPI_ISDBT_GUARD_1_4       3
-
-// DtIsdbtLayerPars.m_Modulation - Modulation type
-#define DTAPI_ISDBT_MOD_DQPSK       0
-#define DTAPI_ISDBT_MOD_QPSK        1
-#define DTAPI_ISDBT_MOD_QAM16       2
-#define DTAPI_ISDBT_MOD_QAM64       3
-
-// DtIsdbtLayerPars.m_CodeRate - Code rate
-#define DTAPI_ISDBT_RATE_1_2        0
-#define DTAPI_ISDBT_RATE_2_3        1
-#define DTAPI_ISDBT_RATE_3_4        2
-#define DTAPI_ISDBT_RATE_5_6        3
-#define DTAPI_ISDBT_RATE_7_8        4
-
-// DtOutpChannel::SetModControl - Initial Total Number of Segments
-#define DTAPI_ISDBT_SEGM_1          0x00000001
-#define DTAPI_ISDBT_SEGM_3          0x00000003
-#define DTAPI_ISDBT_SEGM_13         0x0000000D
-#define DTAPI_ISDBT_SEGM_MSK        0x0000000F
-
-// DtOutpChannel::SetModControl - Bandwidth
-#define DTAPI_ISDBT_BW_5MHZ         0x00000010
-#define DTAPI_ISDBT_BW_6MHZ         0x00000020
-#define DTAPI_ISDBT_BW_7MHZ         0x00000030
-#define DTAPI_ISDBT_BW_8MHZ         0x00000040
-#define DTAPI_ISDBT_BW_MSK          0x000000F0
-
-// DtOutpChannel::SetModControl - Sample Rate
-#define DTAPI_ISDBT_SRATE_1_1       0x00000100
-#define DTAPI_ISDBT_SRATE_1_2       0x00000200
-#define DTAPI_ISDBT_SRATE_1_4       0x00000300
-#define DTAPI_ISDBT_SRATE_1_8       0x00000400
-#define DTAPI_ISDBT_SRATE_27_32     0x00000500
-#define DTAPI_ISDBT_SRATE_135_64    0x00000600
-#define DTAPI_ISDBT_SRATE_MSK       0x00000F00
-
-// DtOutpChannel::SetModControl - Sub Channel
-#define DTAPI_ISDBT_SUBCH_MSK       0x0003F000
-#define DTAPI_ISDBT_SUBCH_SHIFT     12
-
-// Result codes for DtIsdbtPars::CheckValidity
-#define DTAPI_ISDBT_OK              0
-#define DTAPI_ISDBT_E_BTYPE         1
-#define DTAPI_ISDBT_E_NSEGM         2
-#define DTAPI_ISDBT_E_PARTIAL       3
-#define DTAPI_ISDBT_E_NOT_FILLED    4
-#define DTAPI_ISDBT_E_SUBCHANNEL    5
-#define DTAPI_ISDBT_E_SRATE         6
-#define DTAPI_ISDBT_E_BANDWIDTH     7
-#define DTAPI_ISDBT_E_MODE          8
-#define DTAPI_ISDBT_E_GUARD         9
-
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtMatrixInfo -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-struct  DtMatrixInfo
-{
-    int  m_VidStd;                  // Video standard
-    int  m_Scaling;                 // Scaled frame format
-    int  m_NumColumns;              // Number of columns 
-};
-
-// Maximum number of fading paths, used in DtModPars
-#define DTAPI_MAX_OUTPUTS           16
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtModPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Structure for storing a complete set of modulation parameters.
-//
-// NOTE FOR ISDB-T: DtModPars.m_ParXtra0 is never used, all ISDB-T parameters are stored
-// in DtIsdbtPars (in *m_pXtraPars).
-//
-struct DtModPars
-{
-    // Modulation parameters
-    int  m_ModType;                 // Modulation type; -1 = not set
-    int  m_ParXtra0;                // ParXtra0 (Code Rate / J.83 Annex); -1 = not set
-    int  m_ParXtra1;                // ParXtra1; -1 = not set
-    int  m_ParXtra2;                // ParXtra2; -1 = not set
-    void*  m_pXtraPars;             // Extra CMMB/ISDB-S/ISDB-T/DVB-C2/DVB-T2 parameters
-    
-    // Single Frequency Network parameters
-    int  m_SfnMode;                 // SFN-operation mode DTAPI_SFN_MODE_XXXX
-    int  m_SfnTimeOffset;           // SFN time offset in nano seconds
-    int  m_SfnAllowedTimeDiff;      // Maximum allowed time difference in nano-seconds
-
-    // Rates; Set to -1 (not set) by SetModControl, except for symbol rate which is set
-    // to a default value for modulation types that support a symbol rate.
-    // If both symbol and TS rate are set, TS rate takes precedence.
-    int  m_SymRate;                 // Symbol rate in baud
-    DtFractionInt  m_TsRate;        // Transport-stream rate in bps
-
-    // Channel modelling per output channel
-    bool  m_IsCmEnable[DTAPI_MAX_OUTPUTS];
-                                    // Channel modelling is enabled yes/no
-    DtCmPars  m_CmPars[DTAPI_MAX_OUTPUTS];
-                                    // Channel modelling parameters
-
-    // Custom roll-off roll
-    bool  m_IsRoEnable;             // Custom roll-off filter enable yes/no
-    DtFilterPars  m_RollOffFilter;  // Custom roll-off filter parameters
-
-    // Miscellaneous
-    int  m_OutputLevel;             // Output level; -9999 = not set
-    double  m_RfFreqHz;             // RF frequency in Hz
-    unsigned char  m_S2PlHdrScrSeq[12];
-                                    // DVB-S2 PL header scrambling sequence
-    DtDvbCidPars  m_DvbCidPars;     // DVB carrier identification for satellite
-    int  m_TxMode;                  // Transmit mode; Included here because packet
-                                    // size affects the modulation process
-    int  m_StuffMode;               // Stuffing mode
-
-    // Operations
-    DTAPI_RESULT  CheckPars();
-    DTAPI_RESULT  SetModControl(int ModType, int, int, int, void* pXtraPars);
-
-    // Member functions
-    DtCmmbPars*  pCmmbPars()    { return (DtCmmbPars*)m_pXtraPars; }
-    DtDvbC2Pars*  pDvbC2Pars()  { return (DtDvbC2Pars*)m_pXtraPars; }
-    DtDvbS2Pars*  pDvbS2Pars()  { return (DtDvbS2Pars*)m_pXtraPars; }
-    DtDvbT2Pars*  pDvbT2Pars()  { return (DtDvbT2Pars*)m_pXtraPars; }
-    DtIqDirectPars*  pIqDirectPars()  { return (DtIqDirectPars*)m_pXtraPars; }
-    DtIsdbsPars*  pIsdbsPars()  { return (DtIsdbsPars*)m_pXtraPars; }
-    DtIsdbtPars*  pIsdbtPars()  { return (DtIsdbtPars*)m_pXtraPars; }
-    DtIsdbTmmPars*  pIsdbTmmPars()  { return (DtIsdbTmmPars*)m_pXtraPars; }
-
-    // Predicates
-    bool  HasSymRate();
-    bool  IsAdtbT(), IsAdtbtDtmb(), IsAtsc(), IsAtscMh(), IsCmmb(), IsCmEnable(int i=0);
-    bool  IsDab();
-    bool  IsDtmb(), IsDvbC2(), IsDvbCidEnable(), IsDvbS(), IsDvbS2(), IsDvbS2Apsk(), 
-          IsDvbS2L3(), IsDvbS2X(), IsDvbS2XL3(), IsDvbS2Mux();
-    bool  IsDvbT(), IsDvbT2(), IsIqDirect(), IsIsdbS(), IsIsdbT(), IsIsdbTmm();
-    bool  IsModTypeSet(), IsOfdm(), IsQam(), IsQamA(), IsQamB(), IsQamC(), IsQamAC();
-    bool  IsRoEnable(), IsSfnEnable(), IsT2Mi();
-    bool  RequiresMplpMod();
-
-    // Constructor, destructor
-    DtModPars();
-    ~DtModPars();
-private:
-    // No implementation is provided for the copy constructor
-    DtModPars(const DtModPars&);
-
-private:
-    void  CleanUpXtraPars();
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtPar .-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Generic structure to represent a single parameter setting.
-// It is used in the advanced demodulator for setting and retrieving parameter settings.
-//
-struct DtPar
-{
-    DtPar();
-    DtPar(int ParId);               // Constructor with DTAPI_PAR_xxx initialization
-    virtual ~DtPar();
-
-    // Value types supported for parameters
-    enum ParValueType
-    {
-        PAR_VT_UNDEFINED, PAR_VT_BOOL, PAR_VT_DOUBLE, PAR_VT_INT
-    };
-
-    DTAPI_RESULT  m_Result;         // Result of retrieving the parameters
-    int  m_ParId;                   // Identifies the parameter: DTAPI_PAR_XXX
-    int  m_IdXtra[4];               // Extra identification parameters
-    ParValueType  m_ValueType;      // Value type of parameter: PAR_VT_XXX
-    union {
-        bool  m_ValueBool;          // Value if value type is PAR_VT_BOOL
-        double  m_ValueDouble;      // Value if value type is PAR_VT_DOUBLE
-        int  m_ValueInt;            // Value if value type is PAR_VT_INT
-        void* m_pValue;             // Pointer for complex types
-    };
-    void  Cleanup();
-    DTAPI_RESULT  GetName(const char*& pName, const char*& pShortName);
-    DTAPI_RESULT  GetName(const wchar_t*& pName, const wchar_t*& pShortName);
-    DTAPI_RESULT  GetValue(int &Value);
-    DTAPI_RESULT  GetValue(double &Value);
-    DTAPI_RESULT  GetValue(bool &Value);
-    DTAPI_RESULT  SetId(int ParameterId);
-    DTAPI_RESULT  SetValue(int Value);
-    DTAPI_RESULT  SetValue(double Value);
-    DTAPI_RESULT  SetValue(bool Value);
-
-    // Serialisation
-    DTAPI_RESULT  FromXml(const std::wstring& XmlString);
-    DTAPI_RESULT  ToXml(std::wstring& XmlString);
-
-    // Serialisation of an array of parameters
-    static DTAPI_RESULT  FromXml(const std::wstring&, DtPar*& pPars, int& Count);
-    static DTAPI_RESULT  ToXml(DtPar* pPars, int Count, std::wstring& XmlString);
-
-    // Assignment operator
-    DtPar&  operator=(const DtPar&);
-
-private:
-    // No implementation is provided for the copy constructor
-    DtPar(const DtPar&);
-};
-
-// Integer parameters
-#define DTAPI_PAR_DEMOD_THREADS     0x001        // Number of Threads/CPU cores used for
-                                                 // software demodulation: default 4
-#define DTAPI_PAR_DEMOD_LDPC_MAX    0x002        // LDPC maximum iterations: default 50
-#define DTAPI_PAR_DEMOD_LDPC_AVG    0x003        // LDPC average iterations limit, used
-                                                 // to limit CPU load; default 16
-// Boolean parameters
-#define DTAPI_PAR_DEMOD_MER_ENA     0x004        // Enable MER calculation; default on
-// Undefined parameter
-#define DTAPI_PAR_UNDEFINED         0x000        // Value is not defined yet
-
-// Unsported item values
-#define DTAPI_PAR_UNSUP_INTITEM     0x80000000   // Unsupported integer item
-#define DTAPI_PAR_UNSUP_UINTITEM    0xFFFFFFFF   // Unsupported unsigned integer item
-
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtPhaseNoisePars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Structure for specifying the phase noise parameters
-//
-struct DtPhaseNoisePars
-{
-    DtFractionInt  m_SampleRate;
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtRawIpHeader -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Header placed in front of all IP Packets when DTAPI_RXMODE_IPRAW mode is used
-//
-struct DtRawIpHeader
-{
-    unsigned short  m_Tag;          // 0x44A0h = \91D\92160
-    unsigned short  m_Length;       // IP packet length
-    unsigned int  m_TimeStamp;      // IP packet arrival/transmit timestamp
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtStatistic -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-struct DtStatistic
-{
-    DtStatistic();
-    DtStatistic(int StatisticId);   // Constructor with DTAPI_STAT_xxx initialization
-    virtual ~DtStatistic();
-
-    // Value types supported for statistics
-    // NOTE: ALWAYS ADD NEW TYPES TO END OF LIST, FOR BACKWARDS COMPATIBILITY
-    enum StatValueType
-    {
-        STAT_VT_UNDEFINED, STAT_VT_BOOL, STAT_VT_DOUBLE, STAT_VT_INT, 
-        STAT_VT_DVBC2_L1P2, STAT_VT_DVBC2_PLPSIG, STAT_VT_DVBT2_L1,
-        STAT_VT_ISDBT_PARS, STAT_VT_LDPC_STATS, STAT_VT_MA_DATA,
-        STAT_VT_MA_STATS, STAT_VT_PLP_BLOCKS, STAT_VT_VIT_STATS,
-        STAT_VT_DAB_ENSEM, STAT_VT_RS_STATS, STAT_VT_DVBT_TPS, STAT_VT_DAB_TXID
-    };
-
-
-    DTAPI_RESULT  m_Result;         // Result of retrieving the statistic
-    int  m_StatisticId;             // Identifies the statistic: DTAPI_STAT_XXX
-    int  m_IdXtra[4];               // Extra identification parameters
-    StatValueType  m_ValueType;     // Value type of statistic: STAT_VT_XXX
-    union {
-        bool  m_ValueBool;          // Value if value type is STAT_VT_BOOL
-        double  m_ValueDouble;      // Value if value type is STAT_VT_DOUBLE
-        int  m_ValueInt;            // Value if value type is STAT_VT_INT
-        void*  m_pValue;            // Pointer if value type is STAT_VT_DVBC2_L1P2,
-                                    // STAT_VT_DVBC2_PLPSIG, STAT_VT_DVBT_TPS,
-                                    // STAT_VT_DVBT2_L1, STAT_VT_VIT_STATS
-                                    // STAT_VT_DAB_ENSEM or STAT_VT_RS_STATS,
-                                    // STAT_VT_DAB_TXID
-    };
-    void  Cleanup();
-    DTAPI_RESULT  GetName(const char*& pName, const char*& pShortName);
-    DTAPI_RESULT  GetName(const wchar_t*& pName, const wchar_t*& pShortName);
-    DTAPI_RESULT  GetValue(int &Value);
-    DTAPI_RESULT  GetValue(double &Value);
-    DTAPI_RESULT  GetValue(bool &Value);
-    DTAPI_RESULT  GetValue(DtDabEnsembleInfo*& pValue);
-    DTAPI_RESULT  GetValue(DtDabTransmitterIdInfo*& pValue);
-    DTAPI_RESULT  GetValue(DtDvbC2DemodL1Part2Data*& pValue);
-    DTAPI_RESULT  GetValue(DtDvbC2DemodL1PlpSigData*& pValue);
-    DTAPI_RESULT  GetValue(DtDvbTTpsInfo*& pValue);
-    DTAPI_RESULT  GetValue(DtDvbT2DemodL1Data*& pValue);
-    DTAPI_RESULT  GetValue(DtDemodLdpcStats*& pValue);
-    DTAPI_RESULT  GetValue(DtDemodMaLayerData*& pValue);
-    DTAPI_RESULT  GetValue(DtDemodMaLayerStats*& pValue);
-    DTAPI_RESULT  GetValue(DtDemodPlpBlocks*& pValue);
-    DTAPI_RESULT  GetValue(DtIsdbtParamsData*& pValue);
-    DTAPI_RESULT  GetValue(DtRsDecStats*& pValue);
-    DTAPI_RESULT  GetValue(DtVitDecStats*& pValue);
-    DTAPI_RESULT  SetId(int StatisticId);
-    DTAPI_RESULT  SetValue(int Value);
-    DTAPI_RESULT  SetValue(double Value);
-    DTAPI_RESULT  SetValue(bool Value);
-    DTAPI_RESULT  SetValue(DtDabEnsembleInfo& pValue);
-    DTAPI_RESULT  SetValue(DtDabTransmitterIdInfo& pValue);
-    DTAPI_RESULT  SetValue(DtDvbC2DemodL1Part2Data& Value);
-    DTAPI_RESULT  SetValue(DtDvbC2DemodL1PlpSigData& Value);
-    DTAPI_RESULT  SetValue(DtDvbTTpsInfo& pValue);
-    DTAPI_RESULT  SetValue(DtDvbT2DemodL1Data& Value);
-    DTAPI_RESULT  SetValue(DtDemodLdpcStats& Value);
-    DTAPI_RESULT  SetValue(DtDemodMaLayerData& Value);
-    DTAPI_RESULT  SetValue(DtDemodMaLayerStats& Value);
-    DTAPI_RESULT  SetValue(DtDemodPlpBlocks& Value);
-    DTAPI_RESULT  SetValue(DtIsdbtParamsData& Value);
-    DTAPI_RESULT  SetValue(DtRsDecStats& pValue);
-    DTAPI_RESULT  SetValue(DtVitDecStats& pValue);
-
-    // Serialisation
-    DTAPI_RESULT  FromXml(const std::wstring& XmlString);
-    DTAPI_RESULT  ToXml(std::wstring& XmlString);
-
-    // Serialisation of an array of statistics
-    static DTAPI_RESULT  FromXml(const std::wstring&, DtStatistic*&, int& Count);
-    static DTAPI_RESULT  ToXml(DtStatistic* pStatistics, int Count, std::wstring&);
-
-    // Assignment operator
-    DtStatistic&  operator=(const DtStatistic&);
-
-private:
-    // No implementation is given of the copy constructor
-    DtStatistic(const DtStatistic&);
-};
-
-// Integer statistics
-#define DTAPI_STAT_BADPCKCNT        0x003        // Count of uncorrected packets
-#define DTAPI_STAT_CNR              0x105        // Carrier-to-noise ratio in dB
-#define DTAPI_STAT_DVBC2_DSLICEDISC 0x010        // DVB-C2 Data slice discontinuity count
-#define DTAPI_STAT_DVBC2_L1HDR_ERR  0x00E        // DVB-C2 L1 Preamble header error count
-#define DTAPI_STAT_DVBC2_L1P2_ERR   0x00F        // DVB-C2 L1-Part 2 error count
-#define DTAPI_STAT_DVBT2_L1PRE_ERR  0x00C        // DVB-T2 L1-Pre error count
-#define DTAPI_STAT_DVBT2_L1POST_ERR 0x00D        // DVB-T2 L1-Post error count
-#define DTAPI_STAT_EBN0             0x111        // Eb/N0 in dB (estimated on MER)
-#define DTAPI_STAT_ESN0             0x110        // Es/N0 in dB (estimated on MER)
-#define DTAPI_STAT_LINKMARGIN       0x10F        // Link margin in dB
-#define DTAPI_STAT_MER              0x106        // Modulation error rate in dB
-#define DTAPI_STAT_MOD_SAT          0x004        // Modulator saturation count
-#define DTAPI_STAT_RELOCKCNT        0x00A        // Receiver re-lock count
-#define DTAPI_STAT_RFLVL_CHAN       0x005        // RF power level for channel bandwidth
-#define DTAPI_STAT_RFLVL_CHAN_QS    0x015        // Quick scan of channel level
-#define DTAPI_STAT_RFLVL_NARROW     0x006        // RF power level for a narrow bandwidth
-#define DTAPI_STAT_RFLVL_NARROW_QS  0x016        // Quick scan of channel level
-#define DTAPI_STAT_RS               0x008        // Reed-Solomon error counter
-#define DTAPI_STAT_SNR              0x107        // Signal-to-noise ratio in dB
-#define DTAPI_STAT_TEMP_TUNER       0x009        // Tuner temperature
-#define DTAPI_STAT_T2MI_OVFS        0x00B        // DVB-T2 T2-MI overflow count
-
-// Double statistics
-#define DTAPI_STAT_BER_POSTBCH      0x100        // Post-BCH bit error rate
-#define DTAPI_STAT_BER_POSTLDPC     0x101        // Post-LDPC bit error rate
-#define DTAPI_STAT_BER_POSTVIT      0x102        // Post-Viterbi bit error rate
-#define DTAPI_STAT_BER_PREBCH       0x10D        // Pre-BCH bit error rate
-#define DTAPI_STAT_BER_PRELDPC      0x10E        // Pre-LDPC bit error rate
-#define DTAPI_STAT_BER_PRERS        0x103        // Pre-Reed-Solomon bit error rate
-#define DTAPI_STAT_BER_PREVIT       0x104        // Pre-Viterbi bit error rate
-#define DTAPI_STAT_FER_POSTBCH      0x116        // Post-BCH frame error rate
-#define DTAPI_STAT_FREQ_SHIFT       0x10B        // Input frequency shift (Hz)
-#define DTAPI_STAT_OCCUPIEDBW       0x112        // Occupied bandwidth
-#define DTAPI_STAT_PER              0x108        // Packet error rate
-#define DTAPI_STAT_ROLLOFF          0x113        // Roll-off factor in percentage
-#define DTAPI_STAT_SAMPRATE_OFFSET  0x10C        // Sample rate offset (ppm) 
-
-// Boolean lock statistics
-#define DTAPI_STAT_CARRIER_LOCK     0x201        // Carrier lock
-#define DTAPI_STAT_FEC_LOCK         0x202        // FEC lock
-#define DTAPI_STAT_LOCK             0x200        // Overall lock status
-#define DTAPI_STAT_PACKET_LOCK      0x203        // Packet lock
-#define DTAPI_STAT_SPECTRUMINV      0x205        // Spectrum inversion
-#define DTAPI_STAT_VIT_LOCK         0x204        // Viterbi lock
-
-// Complex statistics 
-#define DTAPI_STAT_DAB_ENSEM_INFO   0x308        // DAB ensemble information from the
-                                                 // Fast Information Channel (FIC)
-#define DTAPI_STAT_DAB_TXID_INFO    0x30C        // DAB transmitter ID information
-#define DTAPI_STAT_DVBC2_L1P2DATA   0x300        // DVB-C2 Layer-1 Part 2 data
-#define DTAPI_STAT_DVBC2_PLPSIGDATA 0x301        // DVB-C2 Layer-1 PLP signalling data
-#define DTAPI_STAT_DVBT_TPS_INFO    0x30B        // DVB-T TPS information
-#define DTAPI_STAT_DVBT2_L1DATA     0x302        // DVB-T2 Layer-1 data
-#define DTAPI_STAT_ISDBT_PARSDATA   0x303        // ISDB-T parameters data
-#define DTAPI_STAT_LDPC_STATS       0x304        // DVB-C2/T2 LDPC statistics
-#define DTAPI_STAT_MA_DATA          0x305        // DVB-C2/T2 mode adaptation data
-#define DTAPI_STAT_MA_STATS         0x306        // DVB-C2/T2 mode adaptation statistics
-#define DTAPI_STAT_PLP_BLOCKS       0x307        // DVB-C2/T2 PLP number of FEC blocks
-#define DTAPI_STAT_RSDEC_STATS      0x30A        // Reed-Solomon decoder statistics
-#define DTAPI_STAT_VITDEC_STATS     0x309        // Viterbi decoder statistics 
-
-// DekTec internal statistics
-#define DTAPI_STAT_AGC1             0x001        // First AGC value
-#define DTAPI_STAT_AGC2             0x002        // Second AGC value
-#define DTAPI_STAT_RFLVL_UNCALIB    0x007        // Uncalibrated RF power level
-#define DTAPI_STAT_RFLVL_UNCALIB_DBM 0x10A       // Uncalibrated RF power level in dBm
-#define DTAPI_STAT_SYNTAX_ERR_CNT   0x114        // Num syntax errors in usb bitstream
-#define DTAPI_STAT_OVERFLOW_CNT     0x115        // Number of dtapi<>kernel buf overflows
-
-// Unsupported item values
-#define DTAPI_STAT_UNDEFINED        0x000        // Value is not defined yet
-#define DTAPI_STAT_UNSUP_INTITEM    0x80000000   // Unsupported integer item
-#define DTAPI_STAT_UNSUP_UINTITEM   0xFFFFFFFF   // Unsupported unsigned integer item
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtIpQosStats -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Quality-of-Service related statistics for SDI/TS-over-IP channels, measured over a
-// certain period of time (the "time period").
-//
-// If the mode is "Seamless Protection Switching of IP Datagrams" (SMPTE 2022-7 mode), 
-// QoS statistics are maintained for path 1, path 2, and for the reconstructed stream.
-// If the mode is not SMPTE 2022-7 ("single-path" mode), the QoS statistics are stored
-// in the members for path 1.
-//
-// This structure is contained in the DtIpStat structure, once with the statistics 
-// measured over the last second, and once with statistics measured over the last minute.
-//
-struct DtIpQosStats
-{
-    // Packet Error Rate (PER) for path 1, path 2 and for the reconstructed stream.
-    // The PER is the number of lost IP packets per second.
-    double  m_Per1, m_Per2, m_PerAfterFec;
-
-    // Delay factor in microseconds for path 1 and path 2.
-    // The delay factor is an indication of the jitter of the IP stream. It is defined
-    // as the maximum difference between the actual arrival time of a UDP/RTP packet
-    // and the ideal (jitterless) arrival time of that packet.
-    double  m_DelayFactor1, m_DelayFactor2;
-
-    // The skew is the minimal and maximal difference over the time period 
-    // (1 sec or 1 minute) in arrival time between IP packets on path 1 and on path 2.
-    // If m_Skew is positive, path 1 has a longer delay than path 2; if m_Skew is
-    // negative, path 2 has the longer delay.
-    // Note: PD as defined in SMPTE 2022-7 is the absolute value of m_Skew.
-    double  m_MinSkew;                 // Min. Skew between path 1 and path 2
-    double  m_MaxSkew;                 // Max. Skew between path 1 and path 2
-
-    //Inter Packet arrival time of Ip packet per port over time period (1 sec or 1 minute)
-    double  m_MinIpat1, m_MinIpat2;    // Min. IPAT path1 and path2
-    double  m_MaxIpat1, m_MaxIpat2;    // Max. IPAT path1 and path2
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. DtIpProfile -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Structure for describing the IP transmission "profile". It defines the maximum
-// bitrate and (in SMPTE 2022-7 mode only) the maximum skew between path 1 and path 2.
-// DtIpProfile is used to dimension buffer sizes at the receiver.
-//
-struct DtIpProfile
-{
-    // m_Profile defines the maximum bitrate and the maximum path skew.
-    // Member variables m_MaxBitrate and m_MaxSkew are used only if m_Profile is
-    // DTAPI_IP_USER_DEFINED, otherwise m_Profile implicitly sets their values.
-    int  m_Profile;                 // IP transmission profile
-
-    // m_MaxBitrate is used for single paths and in SMPTE 2022-7 mode.
-    unsigned int  m_MaxBitrate;     // Maximum bitrate in bps
-
-    // m_MaxSkew is used only in SMPTE 2022-7 mode. It defines the maximum skew
-    // between the two IP transmission paths.
-    int  m_MaxSkew;                 // Maximum skew between path 1 and path 2 in ms
-
-    // Set the video standard to transmit/receive. 
-    int  m_VideoStandard;           // DTAPI_VIDSTD_ defines.
-};
-
-// IP tranmission profile (DtIpProfile::m_Profile)
-#define DTAPI_IP_PROF_NOT_DEFINED   0            // Not defined
-#define DTAPI_IP_USER_DEFINED       1            // Use m_MaxBitrate and m_MaxSkew
-// LBR (Low Bit Rate) profiles
-#define DTAPI_IP_LBR_LOW_SKEW       2            // m_MaxSkew=10ms, m_MaxBitrate=10Mbps
-#define DTAPI_IP_LBR_MODERATE_SKEW  3            // m_MaxSkew=50ms, m_MaxBitrate=10Mbps
-#define DTAPI_IP_LBR_HIGH_SKEW      4            // m_MaxSkew=450ms, m_MaxBitrate=10Mbps
-// SBR (Slower Bit Rate) profiles
-#define DTAPI_IP_SBR_LOW_SKEW       5            // m_MaxSkew=10ms, m_MaxBitrate=270Mbps
-#define DTAPI_IP_SBR_MODERATE_SKEW  6            // m_MaxSkew=50ms, m_MaxBitrate=270Mbps
-#define DTAPI_IP_SBR_HIGH_SKEW      7            // m_MaxSkew=450ms, m_MaxBitrate=270Mbps
-// HBR (High Bit Rate) profiles
-#define DTAPI_IP_HBR_LOW_SKEW       5            // m_MaxSkew=10ms, m_MaxBitrate=3Gbps
-#define DTAPI_IP_HBR_MODERATE_SKEW  6            // m_MaxSkew=50ms, m_MaxBitrate=3Gbps
-#define DTAPI_IP_HBR_HIGH_SKEW      7            // m_MaxSkew=150ms, m_MaxBitrate=3Gbps
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtIpPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Structure for storing SDI/TS-over-IP parameters
-//
-struct DtIpPars
-{
-public:
-    // Primary link
-    unsigned char  m_Ip[16];        // IP address (IPv4/IPv6)
-    unsigned short  m_Port;         // Port number
-    unsigned char  m_SrcFltIp[16];  // Source filter: IP address (IPv4/IPv6)
-    unsigned short  m_SrcFltPort;   // Source filter: port number
-    int  m_VlanId;                  // VLAN ID
-    int  m_VlanPriority;            // VLAN priority
-
-    // Redundant link (path 2 in SMPTE 2022-7 mode)
-    unsigned char  m_Ip2[16];       // IP address (IPv4/IPv6)
-    unsigned short  m_Port2;        // Port number
-    unsigned char  m_SrcFltIp2[16]; // Source filter: IP address (IPv4/IPv6)
-    unsigned short  m_SrcFltPort2;  // Source filter: port number
-    int  m_VlanId2;                 // VLAN ID
-    int  m_VlanPriority2;           // VLAN priority
-
-    int  m_TimeToLive;              // Time-to-Live setting for IP Tx
-    int  m_NumTpPerIp;              // Number of transport packets per IP packet
-    int  m_Protocol;                // Protocol: DTAPI_PROTO_UDP/RTP
-    int  m_DiffServ;                // Differentiated services
-    int  m_FecMode;                 // Error correction mode: DTAPI_FEC_DISABLE/2D
-    int  m_FecNumRows;              // 'D' = #rows in FEC matrix
-    int  m_FecNumCols;              // 'L' = #columns in FEC matrix
-
-    // Control and status flags: DTAPI_IP_V4, DTAPI_IP_V6, DTAPI_IP_TX_MANSRCPORT
-    int  m_Flags;
-
-    // Seamless Protection Switching of IP Datagrams (SMPTE 2022-7)
-
-    // Transmission- or reception mode. It determines whether "seamless protection
-    // switching of IP datagrams" according to SMPTE 2022-7 is applied.
-    //  DTAPI_IP_NORMAL     Default value for non-redundant Rx or Tx.
-    //  DTAPI_IP_TX_2022_7  Apply SMPTE 2022-7 for Tx. IP packets will be duplicated to
-    //                      path 1 (primary link) and path 2 (redundant link)
-    //  DTAPI_IP_RX_2022_7  Apply SMPTE 2022-7 for Rx. IP packets from path 1 and path 2
-    //                      will be seamlessly combined into a single logical stream.
-    int  m_Mode;
-
-    // The IP transmission profile determines the maximum bitrate and the maximum skew
-    // between transmission path 1 and path 2.
-    DtIpProfile  m_IpProfile;
-public:
-    DtIpPars();
-    ~DtIpPars();
-};
-
-// Legacy
-#define DtTsIpPars  DtIpPars
-
-// Error correction modes (DtIpPars::m_FecMode)
-#define DTAPI_FEC_DISABLE           0
-#define DTAPI_FEC_2D                1            // FEC reconstruction
-#define DTAPI_FEC_2D_M1             1            // Mode1: FECdT = DVBdT + .5 * DVBdT
-#define DTAPI_FEC_2D_M2             2            // Mode2: FECdT = DVBdT
-#define DTAPI_FEC_2D_M1_B           3            // Mode1: FECdT = DVBdT + .5 * DVBdT (BLOCK)
-#define DTAPI_FEC_2D_M2_B           4            // Mode2: FECdT = DVBdT (BLOCK)
-
-// Optional control/status flags (DtIpPars::m_Flags)
-#define DTAPI_IP_V4                 0x00
-#define DTAPI_IP_V6                 0x01
-#define DTAPI_IP_TX_MANSRCPORT      0x10
-#define DTAPI_IP_RX_DIFFSRCPORTFEC  0x20
-
-// Transmission/reception mode (DtIpPars::m_Mode)
-#define DTAPI_IP_NORMAL             0
-#define DTAPI_IP_TX_2022_7          1            // Dual-path SMPTE 2022-7 transmission
-#define DTAPI_IP_RX_2022_7          2            // Dual-path SMPTE 2022-7 reception
-// Legacy definitions
-#define DTAPI_IP_TX_DBLBUF          DTAPI_IP_TX_2022_7
-#define DTAPI_IP_RX_DBLBUF          DTAPI_IP_RX_2022_7
-
-// IP protocol (DtIpPars::m_Protocol)
-#define DTAPI_PROTO_UDP             0
-#define DTAPI_PROTO_RTP             1
-#define DTAPI_PROTO_AUTO            2
-#define DTAPI_PROTO_UNKN            2
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. DtIpStat .-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Structure for retrieving the IP statistics for an SDI/TS-over-IP channel.
-//
-// Counters start at zero, but counters are not reset after being read.
-// Counter wraps must be handled by the application.
-//
-// If the mode is "Seamless Protection Switching of IP Datagrams" (SMPTE 2022-7 mode), 
-// counters are maintained for path 1, path 2, and for the reconstructed stream.
-// If this mode is not active, only path 1 counters are valid.
-//
-struct DtIpStat
-{
-    // Total number of received or transmitted IP packets.This is the number of IP packets
-    // that the stream should contain, so lost packets are included in this counter.
-    unsigned int  m_TotNumIpPackets;
-
-    // Number of IP packets lost before and after FEC.
-    // In SMPTE 2022-7 mode, these counters apply to the reconstructed stream.
-    unsigned int  m_LostIpPacketsBeforeFec, m_LostIpPacketsAfterFec;
-
-    // Counters for the number of received and number of lost IP packets for path 1
-    // and for path 2.
-    //  m_NumIpPacketsLost1 = m_TotNumIpPackets - m_NumIpPacketsReceived1
-    //  m_NumIpPacketsLost2 = m_TotNumIpPackets - m_NumIpPacketsReceived2
-    unsigned int  m_NumIpPacketsReceived1, m_NumIpPacketsReceived2;
-    unsigned int  m_NumIpPacketsLost1, m_NumIpPacketsLost2;
-
-    // QoS statistics measured over the last second, and over the last minute.
-    DtIpQosStats  m_QosStatsLastSec, m_QosStatsLastMin;
-}; 
-
-// Legacy
-#define DtTsIpStat DtIpStat
-
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtTunePars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Structure for setting tuner specific parameters
-//
-struct DtTunePars
-{
-    union {
-        // DTA-2131 specific tuner parameters
-        struct {
-            int  m_TunerStandard;   // DTAPI_TUNMOD_xxx
-            int  m_TunerBandwidth;  // Tuning bandwidth in Hz
-            int  m_IfFrequency;     // IF frequency in Hz
-                                    // (-1 according tuner standard)
-            int  m_LpfCutOff;       // Low-pass filter cutoff; DTAPI_TUN31_LPF_x
-            int  m_LpfOffset;       // Low-pass filter offset; DTAPI_TUN31_LPF_x
-            int  m_HiPass;          // Hi Pass filter; DTAPI_TUN31_HPF_x
-            int  m_DcNotchIfPpf;    // Enable DC notch IF PPF; DTAPI_TUN31_NOTCH_x
-            int  m_IfNotch;         // Enable IF notch; DTAPI_TUN31_NOTCH_x
-            int  m_IfNotchToRssi;   // Enable IF notch to RSSI; DTAPI_TUN31_NOTCH_x
-        } m_Dta2131TunePars;
-    } u;
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtVidStdInfo -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-struct DtVidStdInfo
-{
-    int  m_VidStd;                  // Video Standard
-    int  m_LinkStd;                 // Link standard
-    bool  m_IsHd;                   // true: is an HD format: false: is SD format
-    bool  m_Is4k;                   // true: is a 4k resolution
-
-    int  m_VidWidth;                // Width in pixels
-    int  m_VidHeight;               // Height in number of lines
-
-    // NOTE: for 4k the following members describe the properties of a single link
-    bool  m_IsInterlaced;           // Is interlaced
-    int  m_NumLines;                // Number of lines per frame
-    double  m_Fps;                  // Frame rate
-    bool  m_IsFractional;           // Fractional framerate
-        
-    int  m_FrameNumSym;             // Size of frame (in # symbols)
-    int  m_LineNumSym;              // # of symbol per line
-    int  m_LineNumSymHanc;          // # of HANC symbols per line
-    int  m_LineNumSymVanc;          // # of VANC symbols per line
-    int  m_LineNumSymEav;           // # of EAV symbols per line
-    int  m_LineNumSymSav;           // # of SAV symbols per line
-
-    // Field 1
-    int  m_Field1StartLine;         // Line # of first line for field 1
-    int  m_Field1EndLine;           // Line # of last line for field 1
-    int  m_Field1VidStartLine;      // Line # of first line containing active video
-    int  m_Field1VidEndLine;        // Line # of last line containing active video
-    
-    // Field 2
-    int  m_Field2StartLine;         // Line # of first line for field 2
-    int  m_Field2EndLine;           // Line # of last line for field 2
-    int  m_Field2VidStartLine;      // Line # of first line containing active video
-    int  m_Field2VidEndLine;        // Line # of last line containing active video
-};
-
-//+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ DEMODULATION PARAMETERS +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.- struct DtDemodDvbS2ModCodSettings -.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Structure for storing the DVB-S2 
-// 
-struct DtDemodDvbS2ModCodSettings
-{
-    bool  m_Enable;                 // Demodulation of this MODCOD (yes/no)
-    int  m_SnrThreshold;            // SNR threshold of this MODCOD for automute algorithm
-    DtDemodDvbS2ModCodSettings() : m_Enable(false), m_SnrThreshold(0) {}
-    DtDemodDvbS2ModCodSettings(bool Enable, int SnrThreshold) : 
-                                         m_Enable(Enable), m_SnrThreshold(SnrThreshold) {}
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDemodPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Structure for storing a complete set of demodulation parameters
-//
-class DtDemodPars
-{
-public:
-    DtDemodPars();
-    DtDemodPars(const DtDemodPars&);
-    ~DtDemodPars();
-public:
-    DTAPI_RESULT CheckValidity();
-    int  GetModType() const;
-    DTAPI_RESULT  SetModType(int ModType);
-    DtDemodParsAtsc*  Atsc() const;
-    DtDemodParsDab*  Dab() const;
-    DtDemodParsDvbC2*  DvbC2() const;
-    DtDemodParsDvbS*  DvbS() const;
-    DtDemodParsDvbS2*  DvbS2() const;
-    DtDemodParsDvbS2Adv*  DvbS2Adv() const; 
-    DtDemodParsDvbT*  DvbT() const;
-    DtDemodParsDvbT2*  DvbT2() const;
-    DtDemodParsIq*  Iq() const;
-    DtDemodParsIq2131*  Iq2131() const; 
-    DtDemodParsIsdbt*  Isdbt() const;
-    DtDemodParsQam*  Qam() const;
-
-    // Predicates
-    bool IsAtsc() const, IsDab() const, IsDvbC2() const, IsDvbS() const, 
-        IsDvbS2() const, IsDvbT() const,IsDvbT2() const, IsIq() const, IsIq2131() const,
-        IsIsdbt() const,  IsQam() const;
-
-    // Operators
-    void  operator=(const DtDemodPars& Pars);
-
-    // Serialisation
-    DTAPI_RESULT  FromXml(const std::wstring& XmlString);
-    DTAPI_RESULT  ToXml(std::wstring& XmlString);
-
-    // Conversion helper
-    DTAPI_RESULT  FromOldStyle(int ModType, int ParXtra0, int ParXtra1, int ParXtra2);
-    DTAPI_RESULT  ToOldStyle(int& ModType, int& ParXtra0, int& ParXtra1, int& ParXtra2);
-private:
-    int  m_ModType;                 // Modulation type
-    void*  m_pDemodPars;            // Demodulation parameters; Type depends on m_ModType
-private:
-    void  CleanUpDemodPars();
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDemodParsAtsc -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Demodulation parameters for modulation type DTAPI_MOD_ATSC
-//
-struct DtDemodParsAtsc
-{
-    int  m_Constellation;           // VSB constellation
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDemodParsDab -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Demodulation parameters for modulation type DTAPI_MOD_DAB
-//
-struct DtDemodParsDab
-{
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDemodParsDvbC2 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Demodulation parameters for modulation type DTAPI_MOD_DVBC2
-//
-struct DtDemodParsDvbC2
-{
-    int  m_Bandwidth;               // Bandwidth
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDemodParsDvbS -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Demodulation parameters for modulation type DTAPI_MOD_DVBS
-//
-struct DtDemodParsDvbS
-{
-    int  m_CodeRate;                // DVB-S coderate
-    int  m_SpecInv;                 // Spectral inversion (yes/no)
-    int  m_SymRate;                 // Symbol rate in baud
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDemodParsDvbS2 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Demodulation parameters for modulation type DTAPI_MOD_DVBS2
-//
-struct DtDemodParsDvbS2
-{
-    int  m_CodeRate;                // Coderate
-    int  m_Pilots;                  // Pilots (yes/no)
-    int  m_SpecInv;                 // Spectral inversion (yes/no)
-    int  m_FecFrame;                // Long or short FECFRAME
-    int  m_SymRate;                 // Symbol rate in baud
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDemodParsDvbS2Adv -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Advanced demodulation parameters for modulation type DTAPI_MOD_DVBS2
-//
-struct DtDemodParsDvbS2Adv : DtDemodParsDvbS2
-{
-    bool  m_AutoMuteModCods;        // MODCODS with an SNR threshold above the current SNR
-                                    // will not be demodulated
-    int  m_HysteresisMargin;        // Margin to add on top of the SNR threshold before 
-                                    // re-enabling a certain modcod, in units of 0.1 dB
-    std::map<DtDvbS2ModCod, DtDemodDvbS2ModCodSettings>  m_ModCods;   
-                                    // List with supported modcods 
-    DtDemodParsDvbS2Adv();
-    DTAPI_RESULT  DeleteModCod(DtDvbS2ModCod ModCod);
-    DTAPI_RESULT  InitSnrThreshold(int TypeNumber);
-    DTAPI_RESULT  SetModCod(DtDvbS2ModCod ModCod, DtDemodDvbS2ModCodSettings &Settings);
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDemodParsDvbT -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Demodulation parameters for modulation type DTAPI_MOD_DVBT
-//
-struct DtDemodParsDvbT
-{
-    int  m_CodeRate;                // Coderate
-    int  m_Bandwidth;               // Bandwidth
-    int  m_Constellation;           // Constellation
-    int  m_Guard;                   // Guard interval
-    int  m_Interleaving;            // Interleaving
-    int  m_Mode;                    // Transmission mode
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDemodParsDvbT2 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Demodulation parameters for modulation type DTAPI_MOD_DVBT2
-//
-struct DtDemodParsDvbT2
-{
-    int  m_Bandwidth;               // Bandwidth
-    int  m_T2Profile;               // DVB-T2 profile (Base/Lite)
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDemodParsIq -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Demodulation parameters for modulation type DTAPI_MOD_IQ
-//
-struct DtDemodParsIq
-{
-    int  m_Bandwidth;               // Signal bandwidth in Hz
-    int  m_IqDemodType;             // IQ demodulation type (DTAPI_DEMOD_QAM or
-                                    // DTAPI_DEMOD_OFDM)
-    int  m_SampleRate;              // Sample rate in Hz
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDemodParsIq2131 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Demodulation parameters for modulation type DTAPI_MOD_IQ_2131 (DTA-2131 specific)
-//
-struct DtDemodParsIq2131
-{
-    int  m_IqDemodFreq;             // IQ demodulation frequency in Hz
-    DtFilterPars  m_LpfFilter;      // Anti-aliasing filter
-    double  m_LpfScaleFactor;       // Scale factor after anti-aliasing filter
-    int  m_SampleRate;              // Sample rate in Hz
-    DtTunePars  m_TunePars;         // Tuning parameters
-};
-
-// IQ-demodulation type
-#define  DTAPI_DEMOD_OFDM   0       // OFDM IQ-demodulation type
-#define  DTAPI_DEMOD_QAM    1       // QAM IQ-demodulation type
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDemodParsIsdbt .-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Demodulation parameters for modulation type DTAPI_MOD_ISDBT
-//
-struct DtDemodParsIsdbt
-{
-    int  m_Bandwidth;               // Bandwidth DTAPI_ISDBT_BW_xMHZ
-    int  m_SubChannel;              // Sub channel number, 0..41, default= 22
-    int  m_NumberOfSegments;        // Number of segments DTAPI_ISDBT_SEGM_x
-    DtDemodParsIsdbt() : m_SubChannel(22) {}
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDemodParsQam -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Demodulation parameters for modulation type DTAPI_MOD_QAMxxx
-//
-struct DtDemodParsQam
-{
-    int  m_Annex;                   // ITU-T J.83 Annex
-    int  m_Interleaving;            // Interleaving; ignored for Annex A and C
-    int  m_SymRate;                 // Symbol rate in baud  
-};
-
-//+=+=+=+=+=+=+=+=+=+=+=+=+=+ Common Demodulation Structures  +=+=+=+=+=+=+=+=+=+=+=+=+=+=
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDemodLdpcStats -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// LDCP statistic information for DVB-T2 and DVB-C2
-//
-struct DtDemodLdpcStats
-{
-    __int64  m_FecBlocksCount;      // #Decoded FEC blocks
-    __int64  m_UncorrFecBlocksCount;// #Uncorrected FEC blocks after BCH (not exact)
-    __int64  m_FecBlocksCount1;     // #Decoded FEC blocks, reset at the same time
-                                    // as m_FecBlocksItCount/min/max
-    __int64  m_FecBlocksItCount;    // Total #LDPC iterations
-                                    // Average #LDPC iteration =
-                                    //              m_FecBlocksItCount / m_FecBlocksCount1
-    int  m_FecBlocksItMin;          // Minimum #LDPC iterations (-1 after reset)
-    int  m_FecBlocksItMax;          // Maximum #LDPC iterations (-1 after reset)
-    __int64  m_BchBitCount;         // #Decoded data bits, including BCH bits
-    // Currently only data+BCH bits are taken into account (LDPC parity bits are ignored),
-    // so the BER before LDPC is approximatively: m_BchBitErrorCount / m_BchBitCount
-    // This is accurate only if there are no uncorrected blocks (m_UncorrFecBlocksCount=0)
-    __int64  m_BchBitErrorCount;    // Bit error count before LDPC
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDemodMaLayerStats -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// LMode adaption layer statistics for DVB-T2 and DVB-C2
-//
-struct DtDemodMaLayerStats
-{
-    __int64  m_HdrCrc8ErrorCount;   // #CRC8 errors for BBframe header
-    __int64  m_PckCrc8ErrorCount;   // #CRC8 errors for packets (only for m_Hem = 0)
-    __int64  m_FramingErrorCount;   // SYNCD/DFL/UPL consistency errors
-    __int64  m_CommonPlpResyncCount;// Number of times a resynchronization between data
-                                    // and common PLP was needed. It normally happens
-                                    // only in case of receive errors. This field is only
-                                    // updated in the corresponding data PLP.
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtRsDecStats -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Reed-Solomon decoder info
-//
-struct DtRsDecStats
-{
-    bool    m_Locked;               // Decoder is locked     
-    __int64  m_ByteSkipCount;       // Bytes skipped while looking for sync 
-    __int64  m_PacketCount;         // Decoded packets 
-    __int64  m_UncorrPacketCount;   // Uncorrected packets 
-    __int64  m_ByteErrorCount;      // Byte error count  
-    __int64  m_BitErrorCount;       // Bit error count
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtVitDecStats -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Viterbi decoder info (pre-viterbi BER) 
-//
-struct DtVitDecStats
-{
-    __int64  m_BitCount;            // Input bit count 
-    __int64  m_BitErrorCount;       // Bit error count
-};
-
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDemodMaLayerData -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Mode adaption layer info for DVB-T2 and DVB-C2
-struct DtDemodMaLayerData
-{
-    bool  m_Hem;                    // High efficiency mode
-    bool  m_Npd;                    // Null packet deletion
-    int  m_Issy;                    // ISSY: mode, see DTAPI_DVBx2_ISSY_x
-    int  m_IssyBufs;                // ISSY: current 'BUFS' value
-    int  m_IssyTto;                 // ISSY: last 'TTO' value (DVB-T2 only)
-    int  m_IssyBufStat;             // ISSY: last 'BUFSTAT' value (DVB-C2/S2 only)
-
-    // Serialisation
-    DTAPI_RESULT  FromXml(const std::wstring& XmlString);
-    DTAPI_RESULT  ToXml(std::wstring& XmlString);
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDemodPlpBlocks -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Number of FEC blocks per frame
-//
-struct DtDemodPlpBlocks
-{
-    int  m_NumBlocks;               // Last plp_num_blocks
-    int  m_NumBlocksMin;            // Minimum plp_num_blocks (-1 = no new value since 
-                                    // reset)
-    int  m_NumBlocksMax;            // Maximum plp_num_blocks 
-
-    // Serialisation
-    DTAPI_RESULT  FromXml(const std::wstring& XmlString);
-    DTAPI_RESULT  ToXml(std::wstring& XmlString);
-};
-
-//+=+=+=+=+=+=+=+=+ Demodulator Blindscan and Spectrum scan definitions +=+=+=+=+=+=+=+=+=
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtTransmitter -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Structure describing a transmitter. Used by DtInpChannel::BlindScan to return the
-// transmitters found by scanning a frequency band.
-//
-struct DtTransmitter
-{
-    __int64  m_FreqHz;              // Center frequency of the transmitter
-    int  m_ModType;                 // Modulation type
-    int  m_SymbolRate;              // Symbol rate
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtBsProgess -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Structure describing the progress of an asynchronous BlindScan.
-// Used by asynchronous DtInpChannel::BlindScan to return current state and the 
-// transmitters found by scanning a frequency band using the DtBsProgressFunc callback.
-//
-struct DtBsProgress
-{
-    enum BsEvent
-    {
-        BS_STEP,                // One frequency step is completed
-        BS_CANCELLED,           // Blindscan is cancelled
-        BS_DONE                 // Blindscan is completed
-    };
-
-    __int64  m_FreqHz;          // Center frequency found
-    DtDemodPars  m_DemodPars;   // Demodulator parameters found for this transmitter
-    BsEvent  m_ProgressEvent;   // Progress event
-    bool  m_ChannelFound;       // If set, the channel is found on the transmitter 
-                                // frequency
-    DTAPI_RESULT  m_Result;     // Result of the blindscan
-
-    // Serialisation
-    DTAPI_RESULT  FromXml(const std::wstring& XmlString);
-    DTAPI_RESULT  ToXml(std::wstring& XmlString);
-
-public:
-    DtBsProgress();
-    ~DtBsProgress();
-};
-
-// Function to receive asynchronous progess.
-typedef void  DtBsProgressFunc(DtBsProgress& Progress, void* pOpaque);
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtRfLevel -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Structure describing a RF-level on a frequency. 
-// Used by DtInpChannel::SpectrumScan to return the RF-levels found by scanning a
-// frequency band.
-//
-struct DtRfLevel
-{  
-    __int64  m_FreqHz;          // Center frequency of the RF level
-    int  m_RfLevel;             // RF level found in units of 0.1dBmV
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtSpsProgress -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Structure describing the progress of an asynchronous SpectrumScan.
-// Used by DtInpChannel::SpectrumScan to return current state and the RF-Levels 
-// found by scanning a frequency band using the DtSpsProgressFunc callback.
-//
-struct DtSpsProgress {
-
-    enum SpsEvent
-    {
-        SPS_STEP,               // One frequency step is completed
-        SPS_CANCELLED,          // SpectrumScan is cancelled
-        SPS_DONE                // SpectrumScan is completed
-    };
-
-    DtRfLevel  m_DtRfLevel;     // A single level
-    SpsEvent  m_ProgressEvent;  // Progress event
-    DTAPI_RESULT  m_Result;     // Result of the spectrumscan
-    
-    //Serialisation
-    DTAPI_RESULT  FromXml(const std::wstring& XmlString);
-    DTAPI_RESULT  ToXml(std::wstring& XmlString);
- 
-public:
-    DtSpsProgress();
-    ~DtSpsProgress();
-};
-
-// Function to receive asynchronous spectrum scan progess.
-typedef void  DtSpsProgressFunc(DtSpsProgress& Progress, void* pOpaque);
-
-//+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
-//=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ MAIN DTAPI CLASSES +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
-//+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDevice -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Class representing a DekTec Device
-//
-class DtDevice
-{
-    // Constructor, destructor
-public:
-    DtDevice();
-    virtual ~DtDevice();
-private:
-    // No implementation is provided for the copy constructor
-    DtDevice(const DtDevice&);
-
-    // Public access functions
-public:
-    virtual int  Category(void);
-    virtual int  ChanType(int Port);
-    virtual int  FirmwareVersion(void);
-    virtual bool  IsAttached(void);
-    virtual int  TypeNumber(void);
-    virtual bool  HasCaps(int  Port, const DtCaps  Caps) const;
-
-    // Public member functions
-public:
-    virtual DTAPI_RESULT  AttachToIpAddr(unsigned char Ip[4]);
-    virtual DTAPI_RESULT  AttachToSerial(__int64 SerialNumber);
-    virtual DTAPI_RESULT  AttachToSlot(int PciBusNumber, int SlotNumber);
-    virtual DTAPI_RESULT  AttachToType(int TypeNumber, int DeviceNo=0);
-    virtual DTAPI_RESULT  ClearGpsErrors();	
-    virtual DTAPI_RESULT  Detach(void);
-    virtual DTAPI_RESULT  DetectIoStd(int  Port, int& Value, int& SubValue);
-    virtual DTAPI_RESULT  FlashDisplay(int NumFlashes=5, int OnTime=100, int OffTime=100);
-    virtual DTAPI_RESULT  GetAttribute(int AttrId, int& AttrValue);
-    virtual DTAPI_RESULT  GetAttribute(int Port, int AttrId, int& AttrValue);
-    virtual DTAPI_RESULT  GetAttribute(int Port, int AttrId, DtModPars& ModParVals, 
-                                                                          int& AttrValue);
-    virtual DTAPI_RESULT  GetDescriptor(DtDeviceDesc& DvcDesc);
-    virtual DTAPI_RESULT  GetDeviceDriverVersion(int& Major, int& Minor, int& BugFix,
-                                                                              int& Build);
-    virtual DTAPI_RESULT  GetDisplayName(wchar_t* pName);
-    virtual DTAPI_RESULT  GetDisplayName(char* pName);
-    virtual DTAPI_RESULT  GetFanSpeed(int Fan, int& Rpm);
-    virtual DTAPI_RESULT  GetFanTemperature(int Fan, int& Temp);
-    virtual DTAPI_RESULT  GetFirmwareVersion(int& FirmwareVersion);
-    virtual DTAPI_RESULT  GetGenlockState(int& State, int& RefVidStd);
-    virtual DTAPI_RESULT  GetGenlockState(int& State);
-    virtual DTAPI_RESULT  GetGpsStatus(int& Status, int& Error);
-    virtual DTAPI_RESULT  GetGpsTime(int& GpsTime);
-    virtual DTAPI_RESULT  GetIoConfig(DtIoConfig& IoCfg);
-    virtual DTAPI_RESULT  GetIoConfig(int Port, int Group, int& Value);
-    virtual DTAPI_RESULT  GetIoConfig(int Port, int Group, int& Value, int& SubValue);
-    virtual DTAPI_RESULT  GetIoConfig(int Port, int Group, int& Value, int& SubValue,
-                                                                       __int64& ParXtra0);
-    virtual DTAPI_RESULT  GetIoConfig(int Port, int Group, int& Value, int& SubValue,
-                                                    __int64& ParXtra0, __int64& ParXtra1);
-    virtual DTAPI_RESULT  GetNwSpeed(int Port, bool& Enable, int& Speed);
-    virtual DTAPI_RESULT  GetRefClkCnt(int& RefClkCnt);
-    virtual DTAPI_RESULT  GetRefClkCnt(__uint64& RefClkCnt);
-    virtual DTAPI_RESULT  GetRefClkCnt(int& RefClkCnt, int& RefClkFreqHz);
-    virtual DTAPI_RESULT  GetRefClkCnt(__uint64& RefClkCnt, int& RefClkFreqHz);
-    virtual DTAPI_RESULT  GetRefClkFreq(int&  RefClkFreqHz);
-    virtual DTAPI_RESULT  GetStateFlags(int  Port, int  &StateFlags);
-    virtual DTAPI_RESULT  GetUsbSpeed(int& UsbSpeed);
-    virtual DTAPI_RESULT  GetVcxoState(bool& Enable, int& Lock, int& VcxoClkFreqHz);
-    virtual DTAPI_RESULT  HwFuncScan(int NumEntries, int& NumEntriesResult,
-                                                                  DtHwFuncDesc* pHwFuncs);
-    virtual DTAPI_RESULT  LedControl(int LedControl);
-    virtual DTAPI_RESULT  RegisterCallback(pDtEventCallback Callback, void* pContext,
-                                                       int EventTypes, void** pId = NULL);
-    virtual DTAPI_RESULT  SetDisplayName(wchar_t* pName);
-    virtual DTAPI_RESULT  SetDisplayName (char* pName);
-    virtual DTAPI_RESULT  SetIoConfig(int Port, int Group, int Value, int SubValue = -1,
-                                            __int64 ParXtra0 = -1, __int64 ParXtra1 = -1);
-    virtual DTAPI_RESULT  SetIoConfig(DtIoConfig* pIoConfigs, int Count);
-    virtual DTAPI_RESULT  SetNwSpeed(int Port, bool Enable, int Speed);
-    virtual DTAPI_RESULT  UnregisterCallback(void* pId);
-    virtual DTAPI_RESULT  VpdDelete(const char* pTag);
-    virtual DTAPI_RESULT  VpdDelete(const wchar_t* pTag);
-    virtual DTAPI_RESULT  VpdRead(const char* pTag, char* pVpdItem);
-    virtual DTAPI_RESULT  VpdRead(const wchar_t* pTag, wchar_t* pVpdItem);
-    virtual DTAPI_RESULT  VpdRead(const char*  pTag, char* pVpdItem, int& ItemSize);
-    virtual DTAPI_RESULT  VpdRead(const wchar_t*  pTag, char* pVpdItem, int& ItemSize);
-    virtual DTAPI_RESULT  VpdWrite(const char* pTag, char* pVpdItem);
-    virtual DTAPI_RESULT  VpdWrite(const wchar_t* pTag, wchar_t* pVpdItem);
-    virtual DTAPI_RESULT  VpdWrite(const char* pTag, char* pVpdItem, int ItemSize);
-    virtual DTAPI_RESULT  VpdWrite(const wchar_t* pTag, char* pVpdItem, int ItemSize);
-
-protected:
-    virtual void  LoadDeviceData();
-private:
-    static void  DtEventCallback(int Event, DtEventArgs* pArgs);
-
-    // Public attributes
-public:
-    DtDeviceDesc  m_DvcDesc;        // Device descriptor, initialized in attach
-    DtHwFuncDesc*  m_pHwf;          // Hardware functions, initialized in attach
-    
-    // Implementation data
-private:
-    std::list<void*>  m_EventSubscriberList;
-
-    // Friends
-    friend class  DtInpChannel;
-    friend class  DtOutpChannel;
-
-public:                             // TODOSD should be protected
-    IDevice*  m_pDev;
-};
-
-// Attribute identifiers
-#define DTAPI_ATTR_LEVEL_MAX        1
-#define DTAPI_ATTR_LEVEL_RANGE      2
-#define DTAPI_ATTR_LEVEL_STEPSIZE   3
-#define DTAPI_ATTR_RFFREQ_ABSMAX    4
-#define DTAPI_ATTR_RFFREQ_ABSMIN    5
-#define DTAPI_ATTR_RFFREQ_MAX       6
-#define DTAPI_ATTR_RFFREQ_MIN       7
-#define DTAPI_ATTR_SAMPRHW_ABSMAX   8
-#define DTAPI_ATTR_SAMPRHW_ABSMIN   9
-#define DTAPI_ATTR_SAMPRHW_HARDLIM  10
-#define DTAPI_ATTR_SAMPRHW_MAX      11
-#define DTAPI_ATTR_SAMPRHW_MIN      12
-#define DTAPI_ATTR_SAMPRATE_ABSMAX  13
-#define DTAPI_ATTR_SAMPRATE_ABSMIN  14
-#define DTAPI_ATTR_SAMPRATE_MAX     15
-#define DTAPI_ATTR_SAMPRATE_MIN     16
-#define DTAPI_ATTR_NUM_FANS         17
-#define DTAPI_ATTR_PCIE_REQ_BW      18
-#define DTAPI_ATTR_PCIE_AVAIL_BW    19
-
-// Order in which devices should be listed by DtapiDeviceScan/DtapiHwFuncScan
-#define DTAPI_SCANORDER_ORIG        0    // Devices are returned in order determined by OS
-#define DTAPI_SCANORDER_SN          1    // Devices are sorted by serial number
-
-// String conversion - Device type number (e.g. "DTA-100", "DTA-102")
-#define DTAPI_DVC2STR_TYPE_NMB      0
-// String conversion - Device type number + location (e.g. "DTA-100 in slot 5");
-#define DTAPI_DVC2STR_TYPE_AND_LOC  1
-// String conversion - Device type number (e.g. "DTA-100", "DTA-102")
-#define DTAPI_HWF2STR_TYPE_NMB      0
-// String conversion - Device type number + port (e.g. "DTA-124 port 1")
-#define DTAPI_HWF2STR_TYPE_AND_PORT 1
-// String conversion - Device type number + location (e.g. "DTA-100 in slot 5");
-#define DTAPI_HWF2STR_TYPE_AND_LOC  2
-// String conversion - Interface type (e.g. "DVB-ASI" or "DVB-C")
-#define DTAPI_HWF2STR_ITF_TYPE      3
-// String conversion - Short version of interface type (e.g. "ASI" instead "DVB-ASI")
-#define DTAPI_HWF2STR_ITF_TYPE_SHORT 4
-
-// Current genlock state
-#define DTAPI_GENL_NO_REF           1
-#define DTAPI_GENL_LOCKING          2
-#define DTAPI_GENL_LOCKED           3
-
-// Status and error flags for GPS-Synchronisation
-#define DTAPI_GPS_1PPS_SYNC      0x000001
-#define DTAPI_GPS_10MHZ_SYNC     0x000002
-#define DTAPI_GPS_1PPS_ERROR     0x000001
-
-// Constants for GetStateFlags() on port level
-#define DTAPI_STATE_FLAG_INSUFF_USB_BW  0x010000
-#define DTAPI_STATE_FLAG_SDI_NO_LOCK    0x020000
-#define DTAPI_STATE_FLAG_SDI_INVALID    0x040000
-// Constants for GetStateFlags() on device level
-#define DTAPI_STATE_FLAG_VPD_CORRUPT    0x000001
-#define DTAPI_STATE_FLAG_NO_SERIAL      0x000002
-#define DTAPI_STATE_FLAG_NO_USB3        0x000004
-#define DTAPI_STATE_FLAG_SLEEPING       0x000008
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDtaPlusDevice -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Class representing a DekTec DTA-plus Device
-//
-class DtDtaPlusDevice
-{
-    // Constructor, destructor
-public:
-    DtDtaPlusDevice();
-    virtual ~DtDtaPlusDevice();
-private:
-    // No implementation is provided for the copy constructor
-    DtDtaPlusDevice(const DtDtaPlusDevice&);
-
-    // Public access functions
-public:
-    bool  IsAttached(void);
-
-    // Public member functions
-public:
-    DTAPI_RESULT  AttachToDevice(const DtDtaPlusDeviceDesc &DvcDesc);
-    DTAPI_RESULT  AttachToSerial(__int64 SerialNumber);
-    DTAPI_RESULT  Detach();
-    DTAPI_RESULT  GetDeviceStatus(int &Status); 
-    DTAPI_RESULT  GetTempControlStatus(int &ControlStatus);
-    DTAPI_RESULT  GetTemperature(int &Temperature);
-    DTAPI_RESULT  GetSerialNumber(__int64 &SerialNumber);
-    DTAPI_RESULT  SetRfOutLevel(int Level);
-    DTAPI_RESULT  SetFreq(int Freq);
-
-private:
-    DtaPlusDevice*  m_Dev;
-};
-
-// DTA-plus status codes
-#define DTAPI_DTAPLUS_STATUS_OFF              0  // DTA-Plus not ready for operation
-#define DTAPI_DTAPLUS_STATUS_ON               1  // DTA-Plus ready for operation
-#define DTAPI_DTAPLUS_STATUS_ATTN_FOLLOW_UP   2  // DTA-Plus attenuator ctrl following up
-#define DTAPI_DTAPLUS_STATUS_ATTN_FOLLOW_DOWN 3  //DTA-Plus attenuator ctrl following down
-#define DTAPI_DTAPLUS_STATUS_DAC_FOLLOW_UP    4  // DTA-Plus DAC control following up
-#define DTAPI_DTAPLUS_STATUS_DAC_FOLLOW_DOWN  5  // DTA-Plus DAC control following down
-#define DTAPI_DTAPLUS_STATUS_HOLD             6  // DTA-Plus has valid input signal
-#define DTAPI_DTAPLUS_STATUS_NO_SIGNAL        7  // DTA-Plus has no input signal
-#define DTAPI_DTAPLUS_STATUS_OVER_POWER       8  // DTA-Plus input signal is too high
-
-// DTA-plus temperature control states
-#define DTAPI_DTAPLUS_TEMP_CONTROL_OFF        0  // DTA-Plus temperature control is off
-#define DTAPI_DTAPLUS_TEMP_CONTROL_FAN_ON     1  // DTA-Plus fan is on
-#define DTAPI_DTAPLUS_TEMP_CONTROL_HEATER_ON  2  // DTA-Plus heater is on
-
-// Ethernet speed
-#define DTAPI_NWSPEED_AUTO          0            // Set
-#define DTAPI_NWSPEED_NOLIN         0            // Get
-#define DTAPI_NWSPEED_10MB_HALF     1
-#define DTAPI_NWSPEED_10MB_FULL     2
-#define DTAPI_NWSPEED_100MB_HALF    3
-#define DTAPI_NWSPEED_100MB_FULL    4
-#define DTAPI_NWSPEED_1GB_MASTER    5
-#define DTAPI_NWSPEED_1GB_SLAVE     6
-
-// Microcode upload states
-#define DTAPI_UCODE_NOT_LOADED      0
-#define DTAPI_UCODE_LOADING         1
-#define DTAPI_UCODE_LOADED          2
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtInpChannel -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Class to represent an input channel
-//
-class  DtInpChannel
-{
-public:
-    DtInpChannel();
-    virtual ~DtInpChannel();
-private:
-    // No implementation is provided for the copy constructor
-    DtInpChannel(const DtInpChannel&);
-
-public:
-    DtHwFuncDesc  m_HwFuncDesc;     // Hardware function descriptor
-
-    // Convenience functions
-public:
-    int  Category(void)         { return m_HwFuncDesc.m_DvcDesc.m_Category; }
-    int  FirmwareVersion(void)  { return m_HwFuncDesc.m_DvcDesc.m_FirmwareVersion; }
-    bool  IsAttached(void)      { return m_pInp != NULL; }
-    int  TypeNumber(void)       { return m_HwFuncDesc.m_DvcDesc.m_TypeNumber; }
-    bool  HasCaps(const DtCaps  Caps) const 
-    { 
-        return ((m_HwFuncDesc.m_Flags & Caps) == Caps); 
-    }
-
-public:
-    DTAPI_RESULT  AttachToPort(DtDevice* pDtDvc, int Port,
-                                               bool Exclusive=true, bool ProbeOnly=false);
-    DTAPI_RESULT  BlindScan(int NumEntries, int& NumEntriesResult, 
-                              DtTransmitter* pScanResults, __int64 FreqHzSteps=10000000LL, 
-                              __int64 StartFreqHz=-1, __int64 EndFreqHz=-1);
-    DTAPI_RESULT  BlindScan(DtBsProgressFunc* pCallback, void* pOpaque,
-                                   const DtDemodPars& DemodPars, 
-                                   __int64 FreqHzSteps=10000000LL, __int64 StartFreqHz=-1, 
-                                   __int64 EndFreqHz=-1);
-    DTAPI_RESULT  CancelBlindScan();
-    DTAPI_RESULT  CancelSpectrumScan();
-    DTAPI_RESULT  ClearFifo();
-    DTAPI_RESULT  ClearFlags(int Latched);
-    DTAPI_RESULT  Detach(int DetachMode);
-    DTAPI_RESULT  DetectIoStd(int& Value, int& SubValue);
-    DTAPI_RESULT  Equalise(int EqualiserSetting);
-    DTAPI_RESULT  GetConstellationPoints(int NumPoints, DtConstelPoint* pPoint);
-    DTAPI_RESULT  GetDemodControl(int& ModType,
-                                             int& ParXtra0, int& ParXtra1, int& ParXtra2);
-    DTAPI_RESULT  GetDemodControl(DtDemodPars* pDemodPars);
-    DTAPI_RESULT  GetDescriptor(DtHwFuncDesc& HwFunDesc);
-    DTAPI_RESULT  GetFifoLoad(int& FifoLoad);
-    DTAPI_RESULT  GetFlags(int& Flags, int& Latched);
-    DTAPI_RESULT  GetIoConfig(int Group, int& Value);
-    DTAPI_RESULT  GetIoConfig(int Group, int& Value, int& SubValue);
-    DTAPI_RESULT  GetIoConfig(int Group, int& Value, int& SubValue, __int64& ParXtra0);
-    DTAPI_RESULT  GetIoConfig(int Group, int& Value, int& SubValue,
-                                                    __int64& ParXtra0, __int64& ParXtra1);
-    DTAPI_RESULT  GetIpPars(DtIpPars* pIpPars);
-    DTAPI_RESULT  GetIpStat(DtIpStat* pIpStat);
-    DTAPI_RESULT  GetMaxFifoSize(int& MaxFifoSize);
-    DTAPI_RESULT  GetPars(int Count, DtPar* pPars);    
-    DTAPI_RESULT  GetRxClkFreq(int& RxClkFreq);
-    DTAPI_RESULT  GetRxControl(int& RxControl);
-    DTAPI_RESULT  GetRxMode(int& RxMode);
-    DTAPI_RESULT  GetStatistics(int Count, DtStatistic* pStatistics);
-    DTAPI_RESULT  GetStatistic(int Type, int& Statistic);
-    DTAPI_RESULT  GetStatistic(int Type, double& Statistic);
-    DTAPI_RESULT  GetStatistic(int Type, bool& Statistic);
-    DTAPI_RESULT  GetStatus(int& PacketSize, int& NumInv, int& ClkDet,
-                                                  int& AsiLock, int& RateOk, int& AsiInv);
-    DTAPI_RESULT  GetStreamSelection(DtDabEtiStreamSelPars& StreamSel);
-    DTAPI_RESULT  GetStreamSelection(DtDabStreamSelPars& StreamSel);
-    DTAPI_RESULT  GetStreamSelection(DtDvbC2StreamSelPars& StreamSel);
-    DTAPI_RESULT  GetStreamSelection(DtDvbTStreamSelPars& StreamSel);
-    DTAPI_RESULT  GetStreamSelection(DtDvbT2StreamSelPars& StreamSel);
-    DTAPI_RESULT  GetStreamSelection(DtIsdbtStreamSelPars& StreamSel);
-    DTAPI_RESULT  GetStreamSelection(DtT2MiStreamSelPars& StreamSel);
-    DTAPI_RESULT  GetSupportedStatistics(int& Count, DtStatistic* pStatistics);
-    DTAPI_RESULT  GetTargetId(int& Present, int& TargetId);
-    DTAPI_RESULT  GetTsRateBps(int& TsRate);
-    DTAPI_RESULT  GetTunerFrequency(__int64& FreqHz, int TunerId=-1);
-    DTAPI_RESULT  GetViolCount(int& ViolCount);
-    DTAPI_RESULT  I2CLock(int TimeOut);
-    DTAPI_RESULT  I2CUnlock(void);
-    DTAPI_RESULT  I2CRead(int DvcAddr, char* pBuffer, int NumBytesToRead);
-    DTAPI_RESULT  I2CWrite(int DvcAddr, char* pBuffer, int NumBytesToWrite);
-    DTAPI_RESULT  I2CWriteRead(int DvcAddrWrite, char* pBufferWrite, int NumBytesToWrite,
-                                  int DvcAddrRead, char* pBufferRead, int NumBytesToRead);
-    DTAPI_RESULT  LedControl(int LedControl);
-    DTAPI_RESULT  LnbEnable(bool Enable);
-    DTAPI_RESULT  LnbEnableTone(bool Enable);
-    DTAPI_RESULT  LnbSetVoltage(int Level);
-    DTAPI_RESULT  LnbSendBurst(int BurstType);
-    DTAPI_RESULT  LnbSendDiseqcMessage(const unsigned char* MsgOut, int NumBytesOut);
-    DTAPI_RESULT  LnbSendDiseqcMessage(const unsigned char* MsgOut, int NumBytesOut, 
-                                                   unsigned char* MsgIn, int& NumBytesIn);
-    DTAPI_RESULT  PolarityControl(int Polarity);
-    DTAPI_RESULT  Read(char* pBuffer, int NumBytesToRead);
-    DTAPI_RESULT  Read(char* pBuffer, int NumBytesToRead, int TimeOut);
-    DTAPI_RESULT  ReadFrame(unsigned int* pFrame, int& FrameSize, int TimeOut=-1);
-    DTAPI_RESULT  RegisterDemodCallback(IDtDemodEvent* pIEvent, __int64 Events=-1);
-    DTAPI_RESULT  Reset(int ResetMode);
-    DTAPI_RESULT  SetAdcSampleRate(int SampleRate);
-    DTAPI_RESULT  SetAntPower(int AntPower);
-    DTAPI_RESULT  SetDemodControl(int ModType, int ParXtra0, int ParXtra1, int ParXtra2);
-    DTAPI_RESULT  SetDemodControl(DtDemodPars *pDemodPars);
-    DTAPI_RESULT  SetErrorStatsMode(int ModType, int Mode);
-    DTAPI_RESULT  SetFifoSize(int FifoSize);
-    DTAPI_RESULT  SetIoConfig(int Group, int Value, int SubValue = -1,
-                                            __int64 ParXtra0 = -1, __int64 ParXtra1 = -1);
-    DTAPI_RESULT  SetIpPars(DtIpPars* pIpPars);
-    DTAPI_RESULT  SetPars(int Count, DtPar* pPars); 
-    DTAPI_RESULT  SetRxControl(int RxControl);
-    DTAPI_RESULT  SetRxMode(int RxMode);
-    DTAPI_RESULT  SetStreamSelection(DtDabEtiStreamSelPars& StreamSel);
-    DTAPI_RESULT  SetStreamSelection(DtDabStreamSelPars& StreamSel);
-    DTAPI_RESULT  SetStreamSelection(DtDvbC2StreamSelPars& StreamSel);
-    DTAPI_RESULT  SetStreamSelection(DtDvbTStreamSelPars& StreamSel);
-    DTAPI_RESULT  SetStreamSelection(DtDvbT2StreamSelPars& StreamSel);
-    DTAPI_RESULT  SetStreamSelection(DtIsdbtStreamSelPars& StreamSel);
-    DTAPI_RESULT  SetStreamSelection(DtT2MiStreamSelPars& StreamSel);
-    DTAPI_RESULT  StatisticsPollingEnable(bool Enable);
-    DTAPI_RESULT  SetTuningMode(int  Mode);
-    DTAPI_RESULT  SetTunerFrequency(__int64 FreqHz, int TunerId=-1);
-    DTAPI_RESULT  SpectrumScan(DtSpsProgressFunc* pCallback, void* pOpaque, int ScanType,
-                                   __int64 FreqHzSteps=1000000LL, __int64 StartFreqHz=-1L,
-                                   __int64 EndFreqHz=-1L);
-    DTAPI_RESULT  Tune(__int64 FreqHz, int ModType,
-                                                int ParXtra0, int ParXtra1, int ParXtra2);
-    DTAPI_RESULT  Tune(__int64 FreqHz, DtDemodPars *pDemodPars);
-
-    // Encapsulated data
-private:
-    IXpMutex*  m_pMTLock;           // Multi-threading lock for Get/Read functions
-    void*  m_pDetachLockCount;
-    int  m_Port;
-    bool  m_WantToDetach;
-
-public:                             // TODOSD should be protected
-    InpChannel*  m_pInp;            // Input channel implementation
-    
-// Private helper functions
-private:
-    DTAPI_RESULT  DetachLock(void);
-    DTAPI_RESULT  DetachUnlock(void);
-    DTAPI_RESULT  ReadAccessLock(void);
-    DTAPI_RESULT  ReadAccessUnlock(void);
-    DTAPI_RESULT  ReadWithTimeOut(char* pBuf, int NumBytesToRead, int TimeOut = -1);
-};
-
-// Tuner freq has changed
-#define DTAPI_EV_TUNE_FREQ_CHANGED  0x0000000000000001LL
-// Tuning parameters have changed
-#define DTAPI_EV_TUNE_PARS_CHANGED  0x0000000000000002LL
-
-#define DTAPI_ERRORSTATS_BER        0            // Bit error rate (default)
-#define DTAPI_ERRORSTATS_RS         1            // Reed-Solomon packet errors
-
-// Feature not supported
-#define DTAPI_NOT_SUPPORTED         -1
-
-// ASI Polarity-Control Status
-#define DTAPI_ASIINV_NORMAL         0
-#define DTAPI_ASIINV_INVERT         1
-
-// ASI Input-Clock Lock
-#define DTAPI_ASI_NOLOCK            0
-#define DTAPI_ASI_INLOCK            1
-
-// SDI Input-Clock Lock
-#define DTAPI_GENLOCK_NOLOCK        0
-#define DTAPI_GENLOCK_INLOCK        1
-
-// Clock Detector
-#define DTAPI_CLKDET_FAIL           0
-#define DTAPI_CLKDET_OK             1
-
-// Input Rate Ok
-#define DTAPI_INPRATE_LOW           0
-#define DTAPI_INPRATE_OK            1
-
-// #Invalid bytes per packet
-#define DTAPI_NUMINV_NONE           0
-#define DTAPI_NUMINV_16             1
-#define DTAPI_NUMINV_OTHER          2
-
-// Packet Size
-#define DTAPI_PCKSIZE_INV           0
-#define DTAPI_PCKSIZE_188           2
-#define DTAPI_PCKSIZE_204           3
-
-// SDI Mode
-#define DTAPI_SDIMODE_INV           0
-#define DTAPI_SDIMODE_525           1
-#define DTAPI_SDIMODE_625           2
-
-// Receive Control
-#define DTAPI_RXCTRL_IDLE           0
-#define DTAPI_RXCTRL_RCV            1
-
-// Receive mode for Transport Streams - Modes
-#define DTAPI_RXMODE_TS             0x10
-#define DTAPI_RXMODE_TS_MODE_BITS   0x0F
-#define DTAPI_RXMODE_ST188          (DTAPI_RXMODE_TS | 0x01)
-#define DTAPI_RXMODE_ST204          (DTAPI_RXMODE_TS | 0x02)
-#define DTAPI_RXMODE_STMP2          (DTAPI_RXMODE_TS | 0x03)
-#define DTAPI_RXMODE_STRAW          (DTAPI_RXMODE_TS | 0x04)
-#define DTAPI_RXMODE_STL3           (DTAPI_RXMODE_TS | 0x05)
-#define DTAPI_RXMODE_STL3FULL       (DTAPI_RXMODE_TS | 0x06)
-#define DTAPI_RXMODE_IPRAW          (DTAPI_RXMODE_TS | 0x07)
-#define DTAPI_RXMODE_RAWASI         (DTAPI_RXMODE_TS | 0x08)
-#define DTAPI_RXMODE_STTRP          (DTAPI_RXMODE_TS | 0x09)
-#define DTAPI_RXMODE_TS_MASK        (DTAPI_RXMODE_TS | DTAPI_RXMODE_TS_MODE_BITS)
-
-// Receive mode for SDI - Modes
-#define DTAPI_RXMODE_SDI            0x1000
-#define DTAPI_RXMODE_SDI_MODE_BITS  0x0F00
-#define DTAPI_RXMODE_SDI_FULL       (DTAPI_RXMODE_SDI | 0x100)
-#define DTAPI_RXMODE_SDI_ACTVID     (DTAPI_RXMODE_SDI | 0x200)
-#define DTAPI_RXMODE_SDI_MASK       (DTAPI_RXMODE_SDI | DTAPI_RXMODE_SDI_MODE_BITS)
-// Receive mode for SDI - Flags
-#define DTAPI_RXMODE_SDI_HUFFMAN    0x00002000
-#define DTAPI_RXMODE_SDI_10B        0x00004000
-#define DTAPI_RXMODE_SDI_16B        0x00008000
-#define DTAPI_RXMODE_SDI_10B_NBO    0x00010000
-#define DTAPI_RXMODE_SDI_FRAMECOUNT 0x00020000
-
-// Receive mode for SDI and Transport Streams - Common flags
-#define DTAPI_RXMODE_TIMESTAMP32    0x01000000
-#define DTAPI_RXMODE_TIMESTAMP64    0x02000000
-
-// Demodulation status flags - FEC lock
-#define DTAPI_DEMOD_FECLOCK_FAIL    0
-#define DTAPI_DEMOD_FECLOCK_OK      1
-// Demodulation status flags - Receiver lock
-#define DTAPI_DEMOD_RCVLOCK_FAIL    0
-#define DTAPI_DEMOD_RCVLOCK_OK      1    
-
-// Channel bands
-#define DTAPI_BAND_BROADCAST_ONAIR  1
-#define DTAPI_BAND_FCC_CABLE        2
-#define DTAPI_BAND_IRC              3
-#define DTAPI_BAND_HRC              4
-
-// RF level bandwith
-#define DTAPI_RFLVL_CHANNEL         0
-#define DTAPI_RFLVL_NARROWBAND      1
-
-// ADC sampling rates
-#define DTAPI_ADCCLK_OFF            0            // Clock is off
-#define DTAPI_ADCCLK_20M647         20647059     // 20.647059 MHz clock
-#define DTAPI_ADCCLK_13M5           13500000     // 13.5 MHz clock
-#define DTAPI_ADCCLK_27M            27000000     // 27.0 MHz clock
-
-// LNB control values
-#define DTAPI_LNB_13V               0            // LNB power 13V
-#define DTAPI_LNB_18V               1            // LNB power 18V
-#define DTAPI_LNB_14V               2            // LNB power 14V
-#define DTAPI_LNB_19V               3            // LNB power 19V
-
-// LNB burst types
-#define DTAPI_LNB_BURST_A           0            // Burst A
-#define DTAPI_LNB_BURST_B           1            // Burst B
-
-// Tuner Parameters - Tuner standard
-#define DTAPI_TUNMOD_QAM            0x1
-#define DTAPI_TUNMOD_ATSC           0x2
-#define DTAPI_TUNMOD_ISDBT          0x3
-#define DTAPI_TUNMOD_DVBT           0x4
-#define DTAPI_TUNMOD_DMBT           0x5
-
-// Tuner Parameters - DTA-2131 specific - Value for automatic computation of parameters
-#define DTAPI_TUN31_AUTO            -1           // According to tuner standard
-
-// Tuner Parameters - DTA-2131 specific - Low-pass filter cutoff frequency
-#define DTAPI_TUN31_LPF_1_5MHZ      0            // 1.5 MHz low-pass filter
-#define DTAPI_TUN31_LPF_6MHZ        1            // 6 MHz low-pass filter
-#define DTAPI_TUN31_LPF_7MHZ        2            // 7 MHz low-pass filter
-#define DTAPI_TUN31_LPF_8MHZ        3            // 8 MHz low-pass filter  
-#define DTAPI_TUN31_LPF_9MHZ        4            // 9 MHz low-pass filter   
-
-// Tuner Parameters - DTA-2131 specific -  Low-pass filter offset 
-#define DTAPI_TUN31_LPF_0PCT        0            // 0% low-pass filter offset  
-#define DTAPI_TUN31_LPF_4PCT        1            // 4% low-pass filter offset  
-#define DTAPI_TUN31_LPF_8PCT        2            // 8% low-pass filter offset  
-#define DTAPI_TUN31_LPF_12PCT       3            // 12% low-pass filter offset
-
-// Tuner Parameters - DTA-2131 specific - IF hi-pass filter 
-#define DTAPI_TUN31_HPF_DIS         0            // Disabled IF hi-pass filter 
-#define DTAPI_TUN31_HPF_0_4MHZ      1            // 0.4 MHz IF hi-pass filter  
-#define DTAPI_TUN31_HPF_0_85MHZ     2            // 0.85 MHz IF hi-pass filter
-#define DTAPI_TUN31_HPF_1MHZ        3            // 1 MHz IF hi-pass filter
-#define DTAPI_TUN31_HPF_1_5MHZ      4            // 1.5 MHz IF hi-pass filter
-
-// Tuner Parameters - DTA-2131 specific - Notch settings
-#define DTAPI_TUN31_NOTCH_DIS       0            // Disable
-#define DTAPI_TUN31_NOTCH_ENA       1            // Enable
-
-// Tuner Parameters - DTA-2139 specific - Agc specific
-#define DTAPI_AGC1_FREE             0
-#define DTAPI_AGC1_FROZEN           1
-
-// Tuning mode - DTU-236A/238 specific
-#define DTAPI_TUNING_NORMAL         0           // Standard tuning mode
-#define DTAPI_TUNING_INDEPENDENT    1           // Multiple tuners, tuned independently
-
-// Tuner ID - DTU-236A/238 specific
-#define DTAPI_TUNERID_ALL           -1          // ID for all tuners
-#define DTAPI_TUNERID_MAIN          0           // ID for main tuner
-#define DTAPI_TUNERID_MEASUREMENT   1           // ID for measurement tuner
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtOutpChannel -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Class to represent a transport-stream or SDI output channel
-//
-class DtOutpChannel
-{
-public:
-    DtOutpChannel();
-    virtual ~DtOutpChannel();
-private:
-    // No implementation is provided for the copy constructor
-    DtOutpChannel(const DtOutpChannel&);
-
-public:
-    DtHwFuncDesc  m_HwFuncDesc;     // Hardware function descriptor
-
-    // Convenience functions
-public:
-    int  Category(void)         { return m_HwFuncDesc.m_DvcDesc.m_Category; }
-    int  FirmwareVersion(void)  { return m_HwFuncDesc.m_DvcDesc.m_FirmwareVersion; }
-    bool  IsAttached(void)      { return m_pOutp != NULL; }
-    int  TypeNumber(void)       { return m_HwFuncDesc.m_DvcDesc.m_TypeNumber; }
-    bool  HasCaps(const DtCaps  Caps) const 
-    { 
-        return ((m_HwFuncDesc.m_Flags & Caps) == Caps); 
-    }
-
-public:
-    virtual DTAPI_RESULT  AttachToPort(DtDevice* pDtDvc, int Port, bool ProbeOnly=false);
-    virtual DTAPI_RESULT  ClearFifo(void);
-    virtual DTAPI_RESULT  ClearFlags(int Latched);
-    virtual DTAPI_RESULT  ClearSfnErrors();	
-    virtual DTAPI_RESULT  Detach(int DetachMode);
-    virtual DTAPI_RESULT  GetAttribute(int AttrId, int& AttrValue);
-    virtual DTAPI_RESULT  GetAttribute(int AttrId, DtModPars& ModParVals, int& AttrValue);
-    virtual DTAPI_RESULT  GetDescriptor(DtHwFuncDesc& HwFunDesc);
-    virtual DTAPI_RESULT  GetExtClkFreq(int& ExtClkFreq);
-    virtual DTAPI_RESULT  GetFailsafeAlive(bool& Alive);
-    virtual DTAPI_RESULT  GetFailsafeConfig(bool& Enable, int& Timeout);
-    virtual DTAPI_RESULT  GetFifoLoad(int& FifoLoad, int SubChan=0);
-    virtual DTAPI_RESULT  GetFifoSize(int& FifoSize);
-    virtual DTAPI_RESULT  GetFifoSizeMax(int& FifoSizeMax);
-    virtual DTAPI_RESULT  GetFifoSizeTyp(int& FifoSizeTyp);
-    virtual DTAPI_RESULT  GetFlags(int& Status, int& Latched);
-    virtual DTAPI_RESULT  GetIoConfig(int Group, int& Value);
-    virtual DTAPI_RESULT  GetIoConfig(int Group, int& Value, int& SubValue);
-    virtual DTAPI_RESULT  GetIoConfig(int Group, int& Value, int& SubValue,
-                                                                       __int64& ParXtra0);
-    virtual DTAPI_RESULT  GetIoConfig(int Group, int& Value, int& SubValue,
-                                                    __int64& ParXtra0, __int64& ParXtra1);
-    virtual DTAPI_RESULT  GetIpPars(DtIpPars* pIpPars);
-    virtual DTAPI_RESULT  GetMaxFifoSize(int& MaxFifoSize);
-    virtual DTAPI_RESULT  GetModControl(int& ModType, int& ParXtra0, int& ParXtra1,
-                                                         int& ParXtra2, void*& pXtraPars);
-    virtual DTAPI_RESULT  GetOutputLevel(int& LeveldBm);
-    virtual DTAPI_RESULT  GetRfControl(__int64& RfFreq, int& LockStatus);
-    virtual DTAPI_RESULT  GetRfControl(int& RfFreq, int& LockStatus);
-    virtual DTAPI_RESULT  GetRfControl(double& RfFreq, int& LockStatus);
-    virtual DTAPI_RESULT  GetSfnMaxTimeDiff(int& TimeDiff);
-    virtual DTAPI_RESULT  GetSfnModDelay(int& ModDelay);
-    virtual DTAPI_RESULT  GetSfnStatus(int& Status, int& Error);
-    virtual DTAPI_RESULT  GetSpiClk(int& SpiClk);
-    virtual DTAPI_RESULT  GetTargetId(int& Present, int& TargetId);
-    virtual DTAPI_RESULT  GetTsRateBps(int& TsRate);
-    virtual DTAPI_RESULT  GetTsRateBps(DtFractionInt& TsRate);
-    virtual DTAPI_RESULT  GetTxControl(int& TxControl);
-    virtual DTAPI_RESULT  GetTxMode(int& TxMode, int& TxStuffMode);
-    virtual DTAPI_RESULT  LedControl(int LedControl);
-    virtual DTAPI_RESULT  Reset(int ResetMode);
-    virtual DTAPI_RESULT  SetChannelModelling(bool CmEnable, DtCmPars& CmPars);    
-    virtual DTAPI_RESULT  SetCustomRollOff(bool Enable, DtFilterPars& Filter); 
-    virtual DTAPI_RESULT  SetFailsafeAlive();
-    virtual DTAPI_RESULT  SetFailsafeConfig(bool Enable, int Timeout = 0);
-    virtual DTAPI_RESULT  SetFifoSize(int FifoSize);
-    virtual DTAPI_RESULT  SetFifoSizeMax(void);
-    virtual DTAPI_RESULT  SetFifoSizeTyp(void);
-    virtual DTAPI_RESULT  SetIoConfig(int Group, int Value, int SubValue = -1,
-                                            __int64 ParXtra0 = -1, __int64 ParXtra1 = -1);
-    virtual DTAPI_RESULT  SetIpPars(DtIpPars* pIpPars);
-    virtual DTAPI_RESULT  SetIsdbtCaptFile(void* IsdbtFile);
-    virtual DTAPI_RESULT  SetModControl(DtCmmbPars&);
-    virtual DTAPI_RESULT  SetModControl(DtDvbC2Pars&);
-    virtual DTAPI_RESULT  SetModControl(DtDvbCidPars&);
-    virtual DTAPI_RESULT  SetModControl(DtDvbS2Pars&);
-    virtual DTAPI_RESULT  SetModControl(DtDvbT2Pars&);
-    virtual DTAPI_RESULT  SetModControl(DtIqDirectPars&);
-    virtual DTAPI_RESULT  SetModControl(DtIsdbsPars&);
-    virtual DTAPI_RESULT  SetModControl(DtIsdbtPars&);
-    virtual DTAPI_RESULT  SetModControl(DtIsdbTmmPars&);
-    virtual DTAPI_RESULT  SetModControl(int ModType, int ParXtra0, int ParXtra1, 
-                                                                            int ParXtra2);
-    virtual DTAPI_RESULT  SetModControl(unsigned char*);
-    virtual DTAPI_RESULT  SetMultiModConfig(int NumSubChan, int FreqSpacing);
-    virtual DTAPI_RESULT  SetOutputLevel(int LeveldBm);
-    virtual DTAPI_RESULT  SetPhaseNoiseControl(DtPhaseNoisePars& PnPars);
-    virtual DTAPI_RESULT  SetPower(int Power);
-    virtual DTAPI_RESULT  SetRfControl(__int64 RfFreq);
-    virtual DTAPI_RESULT  SetRfControl(double RfFreq);
-    virtual DTAPI_RESULT  SetRfControl(int RfFreq);
-    virtual DTAPI_RESULT  SetRfMode(int RfMode);
-    virtual DTAPI_RESULT  SetRfMode(int Sel, int Mode);
-    virtual DTAPI_RESULT  SetSfnAllowedTimeDiff(int TimeDiff);
-    virtual DTAPI_RESULT  SetSfnControl(int SnfMode, int TimeOffset);
-    virtual DTAPI_RESULT  SetSnr(int Mode, int Snr);
-    virtual DTAPI_RESULT  SetSpiClk(int SpiClk);
-    virtual DTAPI_RESULT  SetTsRateBps(int TsRate);
-    virtual DTAPI_RESULT  SetTsRateBps(DtFractionInt TsRate);
-    virtual DTAPI_RESULT  SetTsRateRatio(int TsRate, int ClockRef);
-    virtual DTAPI_RESULT  SetTxControl(int TxControl);
-    virtual DTAPI_RESULT  SetTxMode(int TxMode, int StuffMode);
-    virtual DTAPI_RESULT  SetTxPolarity(int TxPolarity);
-    virtual DTAPI_RESULT  Write(char* pBuffer, int NumBytesToWrite, int SubChan=0);
-    // Undocumented
-    virtual DTAPI_RESULT  GetModBufLoads(bool&, int&, int&, int&);
-
-public:                             // TODOSD should be protected
-    OutpChannel*  m_pOutp;          // Output channel implementation
-
-private:
-    void*  m_pDetachLockCount;
-    bool  m_WantToDetach;
-    DTAPI_RESULT  DetachLock(void);
-    DTAPI_RESULT  DetachUnlock(void);
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtMplpOutpChannel -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-class DtMplpOutpChannel : public DtOutpChannel
-{
-public:
-    DtMplpOutpChannel();
-    virtual ~DtMplpOutpChannel();
-private:
-    // No implementation is provided for the copy constructor
-    DtMplpOutpChannel(const DtMplpOutpChannel&);
-
-public:
-    virtual bool IsAttached(void);
-
-public:
-    virtual DTAPI_RESULT  AttachToPort(DtDevice* pDtDvc, int Port, bool ProbeOnly=false);
-    virtual DTAPI_RESULT  ClearFifo(void);
-    virtual DTAPI_RESULT  ClearFlags(int Latched);
-    virtual DTAPI_RESULT  ClearSfnErrors();	
-    virtual DTAPI_RESULT  Detach(int DetachMode);
-    virtual DTAPI_RESULT  GetAttribute(int AttrId, int& AttrValue);
-    virtual DTAPI_RESULT  GetAttribute(int AttrId, DtModPars& ModParVals, int& AttrValue);
-    virtual DTAPI_RESULT  GetDescriptor(DtHwFuncDesc& HwFunDesc);
-    virtual DTAPI_RESULT  GetExtClkFreq(int& ExtClkFreq);
-    virtual DTAPI_RESULT  GetFailsafeAlive(bool& Alive);
-    virtual DTAPI_RESULT  GetFailsafeConfig(bool& Enable, int& Timeout);
-    virtual DTAPI_RESULT  GetFifoLoad(int& FifoLoad, int SubChan=0);
-    virtual DTAPI_RESULT  GetFifoSize(int& FifoSize);
-    virtual DTAPI_RESULT  GetFifoSizeMax(int& FifoSizeMax);
-    virtual DTAPI_RESULT  GetFifoSizeTyp(int& FifoSizeTyp);
-    virtual DTAPI_RESULT  GetFlags(int& Status, int& Latched);
-    virtual DTAPI_RESULT  GetIoConfig(int Group, int& Value);
-    virtual DTAPI_RESULT  GetIoConfig(int Group, int& Value, int& SubValue);
-    virtual DTAPI_RESULT  GetIoConfig(int Group, int& Value, int& SubValue,
-                                                                       __int64& ParXtra0);
-    virtual DTAPI_RESULT  GetIoConfig(int Group, int& Value, int& SubValue, 
-                                                    __int64& ParXtra0, __int64& ParXtra1);
-    virtual DTAPI_RESULT  GetIpPars(DtIpPars* pIpPars);
-    virtual DTAPI_RESULT  GetMaxFifoSize(int& MaxFifoSize);
-    virtual DTAPI_RESULT  GetModControl(int& ModType, int& CodeRate,
-                                          int& ParXtra1, int& ParXtra2, void*& pXtraPars);
-    virtual DTAPI_RESULT  GetOutputLevel(int& LeveldBm);
-    virtual DTAPI_RESULT  GetRfControl(__int64& RfFreq, int& LockStatus);
-    virtual DTAPI_RESULT  GetRfControl(int& RfFreq, int& LockStatus);
-    virtual DTAPI_RESULT  GetRfControl(double& RfFreq, int& LockStatus);
-    virtual DTAPI_RESULT  GetSfnMaxTimeDiff(int& TimeDiff);
-    virtual DTAPI_RESULT  GetSfnModDelay(int& ModDelay);
-    virtual DTAPI_RESULT  GetSfnStatus(int& Status, int& Error);
-    virtual DTAPI_RESULT  GetSpiClk(int& SpiClk);
-    virtual DTAPI_RESULT  GetTargetId(int& Present, int& TargetId);
-    virtual DTAPI_RESULT  GetTsRateBps(int& TsRate);
-    virtual DTAPI_RESULT  GetTsRateBps(DtFractionInt& TsRate);
-    virtual DTAPI_RESULT  GetTxControl(int& TxControl);
-    virtual DTAPI_RESULT  GetTxMode(int& TxMode, int& TxStuffMode);
-    virtual DTAPI_RESULT  LedControl(int LedControl);
-    virtual DTAPI_RESULT  Reset(int ResetMode);
-    virtual DTAPI_RESULT  SetChannelModelling(bool CmEnable, DtCmPars& CmPars);    
-    virtual DTAPI_RESULT  SetCustomRollOff(bool Enable, DtFilterPars& Filter); 
-
-    virtual DTAPI_RESULT  SetFailsafeConfig(bool Enable, int Timeout = 0);
-    virtual DTAPI_RESULT  SetFailsafeAlive();
-    virtual DTAPI_RESULT  SetFifoSize(int FifoSize);
-    virtual DTAPI_RESULT  SetFifoSizeMax(void);
-    virtual DTAPI_RESULT  SetFifoSizeTyp(void);
-    virtual DTAPI_RESULT  SetIoConfig(int Group, int Value, int SubValue = -1,
-                                            __int64 ParXtra0 = -1, __int64 ParXtra1 = -1);
-    virtual DTAPI_RESULT  SetIpPars(DtIpPars* pIpPars);
-    virtual DTAPI_RESULT  SetIsdbtCaptFile(void* IsdbtFile);
-    virtual DTAPI_RESULT  SetModControl(DtCmmbPars&);
-    virtual DTAPI_RESULT  SetModControl(DtDvbC2Pars&);
-    virtual DTAPI_RESULT  SetModControl(DtDvbCidPars&);
-    virtual DTAPI_RESULT  SetModControl(DtDvbS2Pars&);
-    virtual DTAPI_RESULT  SetModControl(DtDvbT2Pars&);
-    virtual DTAPI_RESULT  SetModControl(DtIqDirectPars&);
-    virtual DTAPI_RESULT  SetModControl(DtIsdbsPars&);
-    virtual DTAPI_RESULT  SetModControl(DtIsdbtPars&);
-    virtual DTAPI_RESULT  SetModControl(DtIsdbTmmPars&);
-    virtual DTAPI_RESULT  SetModControl(int ModType, int ParXtra0, int ParXtra1, 
-                                                                            int ParXtra2);
-    virtual DTAPI_RESULT  SetModControl(unsigned char*);
-    virtual DTAPI_RESULT  SetMultiModConfig(int NumSubChan, int FreqSpacing);
-    virtual DTAPI_RESULT  SetOutputLevel(int LeveldBm);
-    virtual DTAPI_RESULT  SetPhaseNoiseControl(DtPhaseNoisePars& PnPars);
-    virtual DTAPI_RESULT  SetPower(int Power);
-    virtual DTAPI_RESULT  SetRfControl(__int64 RfFreq);
-    virtual DTAPI_RESULT  SetRfControl(double RfFreq);
-    virtual DTAPI_RESULT  SetRfControl(int RfFreq);
-    virtual DTAPI_RESULT  SetRfMode(int RfMode);
-    virtual DTAPI_RESULT  SetRfMode(int Sel, int Mode);
-    virtual DTAPI_RESULT  SetSfnAllowedTimeDiff(int TimeDiff);
-    virtual DTAPI_RESULT  SetSfnControl(int SnfMode, int TimeOffset);
-    virtual DTAPI_RESULT  SetSnr(int Mode, int Snr);
-    virtual DTAPI_RESULT  SetSpiClk(int SpiClk);
-    virtual DTAPI_RESULT  SetTsRateBps(int TsRate);
-    virtual DTAPI_RESULT  SetTsRateBps(DtFractionInt TsRate);
-    virtual DTAPI_RESULT  SetTsRateRatio(int TsRate, int ClockRef);
-    virtual DTAPI_RESULT  SetTxControl(int TxControl);
-    virtual DTAPI_RESULT  SetTxMode(int TxMode, int TxStuffMode);
-    virtual DTAPI_RESULT  SetTxPolarity(int TxPolarity);
-    virtual DTAPI_RESULT  Write(char* pBuffer, int NumBytesToWrite, int SubChan=0);
-    // Undocumented
-    virtual DTAPI_RESULT  GetModBufLoads(bool&, int&, int&, int&);
-
-    // IMplpModulator interface implementation
-public:
-    virtual DTAPI_RESULT  AttachVirtual(DtDevice* pDtDvc, 
-                                  bool (*pFunc)(void*, DtVirtualOutData*), void* pOpaque);
-    virtual DTAPI_RESULT  GetMplpFifoFree(int FifoIdx, int& FifoFree);
-    virtual DTAPI_RESULT  GetMplpFifoLoad(int FifoIdx, int& FifoLoad);
-    virtual DTAPI_RESULT  GetMplpFifoSize(int FifoIdx, int& FifoSize);
-    virtual DTAPI_RESULT  GetMplpModStatus(DtDvbC2ModStatus* pMplpModStat);
-    virtual DTAPI_RESULT  GetMplpModStatus(DtDvbS2ModStatus* pMplpModStat);
-    virtual DTAPI_RESULT  GetMplpModStatus(DtDvbT2ModStatus* pMplpModStat);
-    virtual DTAPI_RESULT  GetMplpModStatus(DtDvbT2ModStatus* pMplpModStat1,
-                                                         DtDvbT2ModStatus* pMplpModStat2);
-    virtual DTAPI_RESULT  SetMplpChannelModelling(bool CmEnable, DtCmPars&, int Chan=0);
-    virtual DTAPI_RESULT  WriteMplp(int FifoIdx, char* pBuffer, int NumBytesToWrite);
-    virtual DTAPI_RESULT  WriteMplpPacket(int FifoIdx, char* pPacket, int PacketSize);
-
-private:
-    bool  m_IsAttachedToVirtual;
-    MplpHelper*  m_pMplpHelper;
-};
-
-// Detach mode flags
-#define DTAPI_INSTANT_DETACH        1
-#define DTAPI_WAIT_UNTIL_SENT       2
-
-// Equaliser settings 
-#define DTAPI_EQUALISER_OFF         0
-#define DTAPI_EQUALISER_ON          1
-
-// LED control
-#define DTAPI_LED_OFF               0
-#define DTAPI_LED_GREEN             1
-#define DTAPI_LED_RED               2
-#define DTAPI_LED_YELLOW            3
-#define DTAPI_LED_BLUE              4
-#define DTAPI_LED_HARDWARE          5
-
-// Noise modes
-#define DTAPI_NOISE_DISABLED        0            // No noise generation
-#define DTAPI_NOISE_WNG_HW          1            // White noise generator (hardware)
-
-// Polarity control
-#define DTAPI_POLARITY_AUTO         0
-#define DTAPI_POLARITY_NORMAL       2
-#define DTAPI_POLARITY_INVERT       3
-
-// Power mode
-#define DTAPI_POWER_OFF             0
-#define DTAPI_POWER_ON              1
-
-// Reset mode
-#define DTAPI_FIFO_RESET            0
-#define DTAPI_FULL_RESET            1
-
-// RF PLL lock status
-#define DTAPI_RFPLL_LOCK1           1            // RF PLL #1 is in lock
-#define DTAPI_RFPLL_LOCK2           2            // RF PLL #2 is in lock
-#define DTAPI_RFPLL_LOCK3           4            // RF PLL #3 is in lock
-
-// Receiver status flags
-#define DTAPI_RX_FIFO_OVF           0x0002
-#define DTAPI_RX_SYNC_ERR           0x0004
-#define DTAPI_RX_RATE_OVF           0x0008
-#define DTAPI_RX_TARGET_ERR         0x0010
-#define DTAPI_RX_LINK_ERR           0x0040
-#define DTAPI_RX_DATA_ERR           0x0080
-#define DTAPI_RX_DRV_BUF_OVF        0x0100
-#define DTAPI_RX_SYNTAX_ERR         0x0200
-
-// Single Frequency Network status andd error flags
-#define DTAPI_SFN_IN_SYNC           0x0001
-#define DTAPI_SFN_TOO_EARLY_ERR     0x0001
-#define DTAPI_SFN_TOO_LATE_ERR      0x0002
-#define DTAPI_SFN_ABSTIME_ERR       0x0004
-#define DTAPI_SFN_DISCTIME_ERR      0x0008
-#define DTAPI_SFN_NOTIME_ERR        0x0010
-#define DTAPI_SFN_START_ERR         0x0020
-
-// Single Frequency operation mode
-#define DTAPI_SFN_MODE_DISABLED     0x0000
-#define DTAPI_SFN_MODE_AT_1PPS      0x0001
-#define DTAPI_SFN_MODE_IQPCK        0x0002
-#define DTAPI_SFN_MODE_DVBT_MIP     0x0003
-#define DTAPI_SFN_MODE_T2MI         0x0004
-
-// Transmit status flags
-#define DTAPI_TX_FIFO_UFL           0x0002
-#define DTAPI_TX_SYNC_ERR           0x0004
-#define DTAPI_TX_READBACK_ERR       0x0008
-#define DTAPI_TX_TARGET_ERR         0x0010
-#define DTAPI_TX_MUX_OVF            0x0020
-#define DTAPI_TX_FIFO_OVF           0x0020
-#define DTAPI_TX_LINK_ERR           0x0040
-#define DTAPI_TX_DATA_ERR           0x0080
-#define DTAPI_TX_CPU_UFL            0x0100
-#define DTAPI_TX_DMA_UFL            0x0200
-
-// Target adapter present
-#define DTAPI_NO_CONNECTION         0
-#define DTAPI_DVB_SPI_SINK          1            // For output channels
-#define DTAPI_DVB_SPI_SOURCE        1            // For input channels
-#define DTAPI_TARGET_PRESENT        2
-#define DTAPI_TARGET_UNKNOWN        3
-
-// Transmit control
-#define DTAPI_TXCTRL_IDLE           1
-#define DTAPI_TXCTRL_HOLD           2
-#define DTAPI_TXCTRL_SEND           3
-
-// Transmit mode for Transport Streams - Modes
-#define DTAPI_TXMODE_TS             0x10
-#define DTAPI_TXMODE_TS_MODE_BITS   0x0F
-#define DTAPI_TXMODE_188            (DTAPI_TXMODE_TS | 0x01)
-#define DTAPI_TXMODE_192            (DTAPI_TXMODE_TS | 0x02)
-#define DTAPI_TXMODE_204            (DTAPI_TXMODE_TS | 0x03)
-#define DTAPI_TXMODE_ADD16          (DTAPI_TXMODE_TS | 0x04)
-#define DTAPI_TXMODE_MIN16          (DTAPI_TXMODE_TS | 0x05)
-#define DTAPI_TXMODE_IPRAW          (DTAPI_TXMODE_TS | 0x06)
-#define DTAPI_TXMODE_RAW            (DTAPI_TXMODE_TS | 0x07)
-#define DTAPI_TXMODE_RAWASI         (DTAPI_TXMODE_TS | 0x08)
-#define DTAPI_TXMODE_TS_MASK        (DTAPI_TXMODE_TS | DTAPI_TXMODE_TS_MODE_BITS)
-// Transmit mode for Transport Streams - DVB-ASI flags
-#define DTAPI_TXMODE_BURST          0x20
-#define DTAPI_TXMODE_TXONTIME       0x40
-
-// Transmit mode for SDI - Modes
-#define DTAPI_TXMODE_SDI            0x1000
-#define DTAPI_TXMODE_SDI_MODE_BITS  0x0F00
-#define DTAPI_TXMODE_SDI_FULL       (DTAPI_TXMODE_SDI | 0x100)
-#define DTAPI_TXMODE_SDI_ACTVID     (DTAPI_TXMODE_SDI | 0x200)
-#define DTAPI_TXMODE_SDI_MASK       (DTAPI_TXMODE_SDI | DTAPI_TXMODE_SDI_MODE_BITS)
-// Transmit mode for SDI - Flags
-#define DTAPI_TXMODE_SDI_HUFFMAN    0x00002000
-#define DTAPI_TXMODE_SDI_10B        0x00004000
-#define DTAPI_TXMODE_SDI_16B        0x00008000
-#define DTAPI_TXMODE_SDI_10B_NBO    0x00010000
-
-// Stuff mode - TS : Null-packet stuffing on/off; SDI: Black-frame stuffing on/off
-#define DTAPI_TXSTUFF_MODE_OFF      0
-#define DTAPI_TXSTUFF_MODE_ON       1
-
-// Transmit polarity
-#define DTAPI_TXPOL_NORMAL          0
-#define DTAPI_TXPOL_INVERTED        1
-
-// Upconverter RF modes
-#define DTAPI_UPCONV_MODE           0            // Selects NORMAL/MUTE/CW/CWI/CWQ
-#define DTAPI_UPCONV_MODE_MSK       0xF          // Mask for mode field
-#define DTAPI_UPCONV_NORMAL         0
-#define DTAPI_UPCONV_MUTE           1
-#define DTAPI_UPCONV_CW             2
-#define DTAPI_UPCONV_CWI            3
-#define DTAPI_UPCONV_CWQ            4
-#define DTAPI_UPCONV_SPECINV        0x100        // Can be OR-ed with other RF modes
-
-// USB speed modes
-#define DTAPI_USB_FULL_SPEED        0
-#define DTAPI_USB_HIGH_SPEED        1
-#define DTAPI_USB_SUPER_SPEED       2
-
-// PCIe standards
-#define DTAPI_PCIE_GEN_UNKNOWN      0       // PCIe Gen is unknown
-#define DTAPI_PCIE_GEN1             1       // PCIe Gen 1 (2.5Gbps per link)
-#define DTAPI_PCIE_GEN2             2       // PCIe Gen 2 (5.0Gbps per link)
-#define DTAPI_PCIE_GEN3             3       // PCIe Gen 3 (8.0Gbps per link)
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- Modulation Parameters -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-
-// Modulation types
-#define DTAPI_MOD_DVBS_QPSK         0            // Native DVB-S on DTA-107
-#define DTAPI_MOD_DVBS_BPSK         1
-#define DTAPI_MOD_QAM4              3
-#define DTAPI_MOD_QAM16             4
-#define DTAPI_MOD_QAM32             5
-#define DTAPI_MOD_QAM64             6
-#define DTAPI_MOD_QAM128            7
-#define DTAPI_MOD_QAM256            8
-#define DTAPI_MOD_DVBT              9
-#define DTAPI_MOD_ATSC              10
-#define DTAPI_MOD_DVBT2             11
-#define DTAPI_MOD_ISDBT             12
-#define DTAPI_MOD_ISDBS             13
-#define DTAPI_MOD_IQDIRECT          15
-#define DTAPI_MOD_IQ_2131           16           // DTA-2131 specific (de)modulation
-#define DTAPI_MOD_DVBS2_QPSK        32
-#define DTAPI_MOD_DVBS2_8PSK        33
-#define DTAPI_MOD_DVBS2_16APSK      34
-#define DTAPI_MOD_DVBS2_32APSK      35
-#define DTAPI_MOD_DVBS2_L3          36     
-#define DTAPI_MOD_DVBS2             37
-#define DTAPI_MOD_DMBTH             48
-#define DTAPI_MOD_ADTBT             49
-#define DTAPI_MOD_CMMB              50
-#define DTAPI_MOD_T2MI              51
-#define DTAPI_MOD_DVBC2             52   
-#define DTAPI_MOD_DAB               53   
-#define DTAPI_MOD_QAM_AUTO          54   
-#define DTAPI_MOD_ATSC_MH           55
-#define DTAPI_MOD_ISDBTMM           56
-// Modulation types DVB-S2X specific
-#define DTAPI_MOD_S2X_QPSK_VLSNR    57           // DVB-S2X, QPSK, very low SNR
-#define DTAPI_MOD_S2X_BPSK_VLSNR    58           // DVB-S2X, BPSK, very low SNR
-#define DTAPI_MOD_S2X_BPSK_S_VLSNR  59           // DVB-S2X, BPSK-S, very low SNR
-#define DTAPI_MOD_S2X_8APSK_L       60           // DVB-S2X, 8APSK-L
-#define DTAPI_MOD_S2X_16APSK_L      61           // DVB-S2X, 16APSK-L
-#define DTAPI_MOD_S2X_32APSK_L      62           // DVB-S2X, 32APSK-L
-#define DTAPI_MOD_S2X_64APSK        63           // DVB-S2X, 64APSK
-#define DTAPI_MOD_S2X_64APSK_L      64           // DVB-S2X, 64APSK-L
-#define DTAPI_MOD_S2X_128APSK       65           // DVB-S2X, 128APSK
-#define DTAPI_MOD_S2X_256APSK       66           // DVB-S2X, 256APSK-L
-#define DTAPI_MOD_S2X_256APSK_L     67           // DVB-S2X, 256APSK
-#define DTAPI_MOD_DVBS2X_L3         68           // L3 modulation with S2X support
-#define DTAPI_MOD_TYPE_AUTO         -1           // Auto detect modulation type
-#define DTAPI_MOD_TYPE_UNK          -1           // Unknown modulation type
-
-// Modulation parameters - Common - ParXtra2
-#define DTAPI_MOD_SYMRATE_AUTO      -1           // Auto detect symbol rate
-#define DTAPI_MOD_SYMRATE_UNK       -1           // Symbol rate if unknown
-
-// Modulation parameters - ATSC - ParXtra0
-#define DTAPI_MOD_ATSC_VSB8         0x00000000   // 8-VSB, 10.762MBd, 19.392Mbps
-#define DTAPI_MOD_ATSC_VSB16        0x00000001   // 16-VSB, 10.762MBd, 38.785Mbps
-#define DTAPI_MOD_ATSC_VSB_AUTO     0x00000003   // Auto detect constellation
-#define DTAPI_MOD_ATSC_VSB_UNK      0x00000003   // Unknown constellation
-#define DTAPI_MOD_ATSC_VSB_MSK      0x00000003   // Constellation mask
-
-// Modulation parameters - DTMB - Bandwidth
-#define DTAPI_MOD_DTMB_5MHZ         0x00000001
-#define DTAPI_MOD_DTMB_6MHZ         0x00000002
-#define DTAPI_MOD_DTMB_7MHZ         0x00000003
-#define DTAPI_MOD_DTMB_8MHZ         0x00000004
-#define DTAPI_MOD_DTMB_BW_AUTO      0x0000000F   // Auto detect
-#define DTAPI_MOD_DTMB_BW_UNK       0x0000000F   // Unknown
-#define DTAPI_MOD_DTMB_BW_MSK       0x0000000F
-
-// Modulation parameters - DTMB - Code rate
-#define DTAPI_MOD_DTMB_0_4          0x00000100   // 0.4
-#define DTAPI_MOD_DTMB_0_6          0x00000200   // 0.6
-#define DTAPI_MOD_DTMB_0_8          0x00000300   // 0.8
-#define DTAPI_MOD_DTMB_RATE_AUTO    0x00000F00   // Auto detect
-#define DTAPI_MOD_DTMB_RATE_UNK     0x00000F00   // Unknown
-#define DTAPI_MOD_DTMB_RATE_MSK     0x00000F00   // Mask
-
-// Modulation parameters - DTMB - Constellation
-#define DTAPI_MOD_DTMB_QAM4NR       0x00001000   // 4-QAM-NR
-#define DTAPI_MOD_DTMB_QAM4         0x00002000   // 4-QAM
-#define DTAPI_MOD_DTMB_QAM16        0x00003000   // 16-QAM
-#define DTAPI_MOD_DTMB_QAM32        0x00004000   // 32-QAM
-#define DTAPI_MOD_DTMB_QAM64        0x00005000   // 64-QAM
-#define DTAPI_MOD_DTMB_CO_AUTO      0x0000F000   // Auto detect
-#define DTAPI_MOD_DTMB_CO_UNK       0x0000F000   // Unknown
-#define DTAPI_MOD_DTMB_CO_MSK       0x0000F000   // Mask
-
-// Modulation parameters - DTMB - Frame header mode
-#define DTAPI_MOD_DTMB_PN420        0x00010000   // PN420
-#define DTAPI_MOD_DTMB_PN595        0x00020000   // PN595
-#define DTAPI_MOD_DTMB_PN945        0x00030000   // PN945
-#define DTAPI_MOD_DTMB_PN_AUTO      0x000F0000   // Auto detect
-#define DTAPI_MOD_DTMB_PN_UNK       0x000F0000   // Unknown
-#define DTAPI_MOD_DTMB_PN_MSK       0x000F0000   // Mask
-
-// Modulation parameters - DTMB - Interleaver mode
-#define DTAPI_MOD_DTMB_IL_1         0x00100000   // Interleaver mode 1: B=54, M=240
-#define DTAPI_MOD_DTMB_IL_2         0x00200000   // Interleaver mode 2: B=54, M=720
-#define DTAPI_MOD_DTMB_IL_AUTO      0x00F00000   // Auto detect
-#define DTAPI_MOD_DTMB_IL_UNK       0x00F00000   // Unknown
-#define DTAPI_MOD_DTMB_IL_MSK       0x00F00000   // Mask
-
-// Modulation parameters - DTMB - pilots
-#define DTAPI_MOD_DTMB_NO_PILOTS    0x01000000   // No pilots
-#define DTAPI_MOD_DTMB_PILOTS       0x02000000   // Pilots, C=1 only
-#define DTAPI_MOD_DTMB_PIL_AUTO     0x0F000000   // Auto detect
-#define DTAPI_MOD_DTMB_PIL_UNK      0x0F000000   // Unknown
-#define DTAPI_MOD_DTMB_PIL_MSK      0x0F000000   // Mask
-
-// Modulation parameters - DTMB - Use frame numbering
-#define DTAPI_MOD_DTMB_NO_FRM_NO    0x10000000   // No frame numbering
-#define DTAPI_MOD_DTMB_USE_FRM_NO   0x20000000   // Use frame numbers
-#define DTAPI_MOD_DTMB_UFRM_AUTO    0xF0000000   // Auto detect
-#define DTAPI_MOD_DTMB_UFRM_UNK     0xF0000000   // Unknown
-#define DTAPI_MOD_DTMB_UFRM_MSK     0xF0000000   // Mask
-
-// Modulation parameters - DVB-S, DVB-S2
-#define DTAPI_MOD_1_2               0x0          // Code rate 1/2
-#define DTAPI_MOD_2_3               0x1          // Code rate 2/3
-#define DTAPI_MOD_3_4               0x2          // Code rate 3/4
-#define DTAPI_MOD_4_5               0x3          // Code rate 4/5
-#define DTAPI_MOD_5_6               0x4          // Code rate 5/6
-#define DTAPI_MOD_6_7               0x5          // Code rate 6/7
-#define DTAPI_MOD_7_8               0x6          // Code rate 7/8
-#define DTAPI_MOD_1_4               0x7          // Code rate 1/4
-#define DTAPI_MOD_1_3               0x8          // Code rate 1/3
-#define DTAPI_MOD_2_5               0x9          // Code rate 2/5
-#define DTAPI_MOD_3_5               0xA          // Code rate 3/5
-#define DTAPI_MOD_8_9               0xB          // Code rate 8/9
-#define DTAPI_MOD_9_10              0xC          // Code rate 9/10
-#define DTAPI_MOD_CR_AUTO           0xF          // Auto detect code rate
-#define DTAPI_MOD_CR_UNK            0xF          // Unknown code rate
-//Coderates DVB-S2X specific
-#define DTAPI_MOD_1_5               0x10         // Code rate 1/5
-#define DTAPI_MOD_2_9               0x11         // Code rate 2/9
-#define DTAPI_MOD_11_45             0x12         // Code rate 11/45
-#define DTAPI_MOD_4_15              0x13         // Code rate 4/15
-#define DTAPI_MOD_13_45             0x14         // Code rate 13/45
-#define DTAPI_MOD_14_45             0x15         // Code rate 14/45
-#define DTAPI_MOD_9_20              0x16         // Code rate 9/20
-#define DTAPI_MOD_7_15              0x17         // Code rate 7/15
-#define DTAPI_MOD_8_15              0x18         // Code rate 8/15
-#define DTAPI_MOD_11_20             0x19         // Code rate 11/20
-#define DTAPI_MOD_5_9               0x1A         // Code rate 5/9
-#define DTAPI_MOD_26_45             0x1B         // Code rate 26/45
-#define DTAPI_MOD_28_45             0x1C         // Code rate 28/45
-#define DTAPI_MOD_23_36             0x1D         // Code rate 23/36
-#define DTAPI_MOD_29_45             0x1E         // Code rate 29/45
-#define DTAPI_MOD_31_45             0x1F         // Code rate 31/45
-#define DTAPI_MOD_25_36             0x20         // Code rate 25/36
-#define DTAPI_MOD_32_45             0x21         // Code rate 32/45
-#define DTAPI_MOD_13_18             0x22         // Code rate 13/18
-#define DTAPI_MOD_11_15             0x23         // Code rate 11/15
-#define DTAPI_MOD_7_9               0x24         // Code rate 7/9
-#define DTAPI_MOD_77_90             0x25         // Code rate 77/90
-
-// Modulation parameters - DVB-S, DVB-S2 - ParXtra1
-#define DTAPI_MOD_S_S2_SPECNONINV   0x00         // No spectrum inversion detected
-#define DTAPI_MOD_S_S2_SPECINV      0x10         // Spectrum inversion detected
-#define DTAPI_MOD_S_S2_SPECINV_AUTO 0x30         // Auto detect spectral inversion
-#define DTAPI_MOD_S_S2_SPECINV_UNK  0x30         // Spectral inversion is unknown
-#define DTAPI_MOD_S_S2_SPECINV_MSK  0x30         // Mask for spectrum inversion field
-
-// Modulation parameters - DVB-S2 - ParXtra1 - Pilots
-#define DTAPI_MOD_S2_NOPILOTS       0x00         // Pilots disabled
-#define DTAPI_MOD_S2_PILOTS         0x01         // Pilots enabled
-#define DTAPI_MOD_S2_PILOTS_AUTO    0x03         // Auto detect pilots
-#define DTAPI_MOD_S2_PILOTS_UNK     0x03         // State of pilots unknown
-#define DTAPI_MOD_S2_PILOTS_MSK     0x03         // Mask for pilots field
-
-// Modulation parameters - DVB-S2 - ParXtra1 - FEC frame length
-#define DTAPI_MOD_S2_LONGFRM        0x00         // Long FECFRAME
-#define DTAPI_MOD_S2_MEDIUMFRM      0x04         // Medium FECFRAME
-#define DTAPI_MOD_S2_SHORTFRM       0x08         // Short FECFRAME
-#define DTAPI_MOD_S2_FRM_AUTO       0x0C         // Auto detect frame size
-#define DTAPI_MOD_S2_FRM_UNK        0x0C         // Frame size unknown
-#define DTAPI_MOD_S2_FRM_MSK        0x0C         // Mask for FECFRAME field
-
-// Modulation parameters - DVB-S2(X) - ParXtra1 - Constellation amplitude for 16-, 32-APSK
-#define DTAPI_MOD_S2_CONST_AUTO     0x00         // Default constellation amplitude
-#define DTAPI_MOD_S2_CONST_E_1      0x40         // E=1; Average symbol energy is constant
-#define DTAPI_MOD_S2_CONST_R_1      0x80         // R=1; Radius of outer ring is constant
-#define DTAPI_MOD_S2_CONST_MSK      0xC0         // Mask for constellation shape
-
-// Modulation parameters - ISDB-S - Input stream
-#define DTAPI_MOD_ISDBS_STREAMTYPE_RAW   0x00    // Raw stream with TMCC in sync bytes
-#define DTAPI_MOD_ISDBS_STREAMTYPE_B15   0x01    // TMCC data following each TS packet
-#define DTAPI_MOD_ISDBS_STREAMTYPE_AUTO  0x07    // Default (raw) isdb-s input stream
-#define DTAPI_MOD_ISDBS_STREAMTYPE_MASK  0x07    // Mask for input stream type
-
-// Modulation parameters - DVB-T - Bandwidth
-#define DTAPI_MOD_DVBT_5MHZ         0x00000001
-#define DTAPI_MOD_DVBT_6MHZ         0x00000002
-#define DTAPI_MOD_DVBT_7MHZ         0x00000003
-#define DTAPI_MOD_DVBT_8MHZ         0x00000004
-#define DTAPI_MOD_DVBT_BW_UNK       0x0000000F   // Unknown bandwidth
-#define DTAPI_MOD_DVBT_BW_MSK       0x0000000F
-
-// Modulation parameters - DVB-T - Constellation
-#define DTAPI_MOD_DVBT_QPSK         0x00000010
-#define DTAPI_MOD_DVBT_QAM16        0x00000020
-#define DTAPI_MOD_DVBT_QAM64        0x00000030
-#define DTAPI_MOD_DVBT_CO_AUTO      0x000000F0   // Auto detect constellation
-#define DTAPI_MOD_DVBT_CO_UNK       0x000000F0   // Unknown constellation
-#define DTAPI_MOD_DVBT_CO_MSK       0x000000F0
-
-// Modulation parameters - DVB-T - Guard interval
-#define DTAPI_MOD_DVBT_G_1_32       0x00000100
-#define DTAPI_MOD_DVBT_G_1_16       0x00000200
-#define DTAPI_MOD_DVBT_G_1_8        0x00000300
-#define DTAPI_MOD_DVBT_G_1_4        0x00000400
-#define DTAPI_MOD_DVBT_GU_AUTO      0x00000F00   // Auto detect guard interval
-#define DTAPI_MOD_DVBT_GU_UNK       0x00000F00   // Unknown guard interval
-#define DTAPI_MOD_DVBT_GU_MSK       0x00000F00
-
-// DVB-T TPS information - DVB-T Hierarchical layer
-#define DTAPI_MOD_DVBT_HARCHY_NONE  0x00000000
-#define DTAPI_MOD_DVBT_HARCHY_A1    0x01000000
-#define DTAPI_MOD_DVBT_HARCHY_A2    0x02000000
-#define DTAPI_MOD_DVBT_HARCHY_A4    0x03000000
-#define DTAPI_MOD_DVBT_HARCHY_MSK   0x0F000000
-// Modulation parameters - DVB-T - Interleaver mode
-#define DTAPI_MOD_DVBT_INDEPTH      0x00001000
-#define DTAPI_MOD_DVBT_NATIVE       0x00002000
-#define DTAPI_MOD_DVBT_IL_AUTO      0x0000F000   // Auto detect interleaver depth
-#define DTAPI_MOD_DVBT_IL_UNK       0x0000F000   // Unknown interleaver depth
-#define DTAPI_MOD_DVBT_IL_MSK       0x0000F000
-
-// Modulation parameters - DVB-T - FFT size
-#define DTAPI_MOD_DVBT_2K           0x00010000
-#define DTAPI_MOD_DVBT_4K           0x00020000
-#define DTAPI_MOD_DVBT_8K           0x00030000
-#define DTAPI_MOD_DVBT_MD_AUTO      0x000F0000   // Auto detect mode
-#define DTAPI_MOD_DVBT_MD_UNK       0x000F0000   // Unknown mode
-#define DTAPI_MOD_DVBT_MD_MSK       0x000F0000
-
-// Modulation parameters - DVB-T - s48
-#define DTAPI_MOD_DVBT_S48_OFF      0x00000000
-#define DTAPI_MOD_DVBT_S48          0x00100000
-#define DTAPI_MOD_DVBT_S48_MSK      0x00100000
-
-// Modulation parameters - DVB-T - s49
-#define DTAPI_MOD_DVBT_S49_OFF      0x00000000
-#define DTAPI_MOD_DVBT_S49          0x00200000
-#define DTAPI_MOD_DVBT_S49_MSK      0x00200000
-
-// Modulation parameters - DVB-T - s48s49
-#define DTAPI_MOD_DVBT_ENA4849      0x00000000
-#define DTAPI_MOD_DVBT_DIS4849      0x00400000
-#define DTAPI_MOD_DVBT_4849_MSK     0x00400000
-
-// Modulation parameters - IQ - ParXtra0
-#define DTAPI_MOD_INTERPOL_RAW      0            // Raw mode, no interpolation
-#define DTAPI_MOD_INTERPOL_OFDM     1            // Use OFDM interpolation
-#define DTAPI_MOD_INTERPOL_QAM      2            // Use QAM interpolation
-
-// Modulation parameters - IQ - ParXtra2 Packing
-#define DTAPI_MOD_IQPCK_AUTO        0x00000000   // Auto IQ-sample packin
-#define DTAPI_MOD_IQPCK_NONE        0x00000001   // No IQ-sample packing
-#define DTAPI_MOD_IQPCK_PCKD        0x00000002   // IQ-samples are already packed
-#define DTAPI_MOD_IQPCK_12B         0x00000003   // IQ-samples packed in 12-bit
-#define DTAPI_MOD_IQPCK_10B         0x00000004   // IQ-samples packed in 10-bit
-#define DTAPI_MOD_IQPCK_UNK         0x000000FF   // Unknown (= use auto)
-#define DTAPI_MOD_IQPCK_MSK         0x000000FF
-
-// Modulation parameters - Roll-off factor ParXtra1 (DVB-S2), ParXtra2 (IQ) and
-//                         Low pass filters ParXtra2 (IQ) 
-#define DTAPI_MOD_ROLLOFF_AUTO      0x00000000   // Default roll-off factor
-#define DTAPI_MOD_ROLLOFF_NONE      0x00000100   // No roll-off
-#define DTAPI_MOD_ROLLOFF_5         0x00000200   // 5% roll-off for DVB-S2X
-#define DTAPI_MOD_ROLLOFF_10        0x00000300   // 10% roll-off for DVB-S2X
-#define DTAPI_MOD_ROLLOFF_15        0x00000400   // 15% roll-off for DVB-S2X
-#define DTAPI_MOD_ROLLOFF_20        0x00000500   // 20% roll-off for DVB-S2
-#define DTAPI_MOD_ROLLOFF_25        0x00000600   // 25% roll-off for DVB-S2
-#define DTAPI_MOD_ROLLOFF_35        0x00000700   // 35% roll-off for DVB-S/S2
-// Pre-defined low pass filters
-#define DTAPI_MOD_LPF_0_614         0x00000800   // Passband up to samplerate*0.614,
-                                                 // used for 2MHz CMMB
-#define DTAPI_MOD_LPF_0_686         0x00000900   // Passband up to samplerate*0.686,
-                                                 // used for ISDB-T/Tmm/Tsb
-#define DTAPI_MOD_LPF_0_754         0x00000A00   // Passband up to samplerate*0.754,
-                                                 // used for 8MHz CMMB, DAB
-#define DTAPI_MOD_LPF_0_833         0x00000B00   // Passband up to samplerate*0.833,
-                                                 // used for DVB-C2/T/T2
-#define DTAPI_MOD_LPF_0_850         0x00000C00   // Passband up to samplerate*0.850,
-                                                 // used for DVB-T2 extended bandwidth
-#define DTAPI_MOD_ROLLOFF_UNK       0x0000FF00   // Unknown (= use default)
-#define DTAPI_MOD_ROLLOFF_MSK       0x0000FF00
-
-// Modulation parameters - DVB-T2-MI - ParXtra0 used for T2-MI bitrate
-
-// Modulation parameters - DVB-T2-MI - ParXtra1
-#define DTAPI_MOD_T2MI_PID1_MSK     0x1FFF
-#define DTAPI_MOD_T2MI_PID1_SHFT    0
-#define DTAPI_MOD_T2MI_PID2_MSK     0x1FFF0000
-#define DTAPI_MOD_T2MI_PID2_SHFT    16
-#define DTAPI_MOD_T2MI_MULT_DIS     0x00000000   // Single Profile
-#define DTAPI_MOD_T2MI_MULT_ENA     0x20000000   // Multi Profile
-#define DTAPI_MOD_T2MI_MULT_MSK     0x20000000   // Multi Profile mask
-
-// Modulation parameters - QAM - ParXtra0 - J.83 Annex
-#define DTAPI_MOD_J83_MSK           0x000F
-#define DTAPI_MOD_J83_UNK           0x000F       // Unknown annex
-#define DTAPI_MOD_J83_AUTO          0x000F       // Auto detect annex
-#define DTAPI_MOD_J83_A             0x0002       // J.83 annex A (DVB-C)
-#define DTAPI_MOD_J83_B             0x0003       // J.83 annex B (\93American QAM\94)
-#define DTAPI_MOD_J83_C             0x0001       // J.83 annex C (\93Japanese QAM\94)
-
-// Modulation parameters - QAM - ParXtra1 - QAM-B interleaver mode
-#define DTAPI_MOD_QAMB_I128_J1D     0x1
-#define DTAPI_MOD_QAMB_I64_J2       0x3
-#define DTAPI_MOD_QAMB_I32_J4       0x5
-#define DTAPI_MOD_QAMB_I16_J8       0x7
-#define DTAPI_MOD_QAMB_I8_J16       0x9
-#define DTAPI_MOD_QAMB_I128_J1      0x0
-#define DTAPI_MOD_QAMB_I128_J2      0x2
-#define DTAPI_MOD_QAMB_I128_J3      0x4
-#define DTAPI_MOD_QAMB_I128_J4      0x6
-#define DTAPI_MOD_QAMB_I128_J5      0x8
-#define DTAPI_MOD_QAMB_I128_J6      0xA
-#define DTAPI_MOD_QAMB_I128_J7      0xC
-#define DTAPI_MOD_QAMB_I128_J8      0xE
-#define DTAPI_MOD_QAMB_IL_UNK       0xF          // Unknown interleaver mode
-#define DTAPI_MOD_QAMB_IL_AUTO      0xF          // Auto detect interleaver mode
-#define DTAPI_MOD_QAMB_IL_MSK       0xF
-
-//+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ SDI +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
-
-// DtSdi - Table-of-content entry types
-#define DTAPI_SDI_TOC_ENTRY_UNKNOWN 0
-#define DTAPI_SDI_TOC_ENTRY_ACTVID  1
-#define DTAPI_SDI_TOC_ENTRY_HANC    2
-#define DTAPI_SDI_TOC_ENTRY_VANC    3
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtSdiTocEntry -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-class DtSdiTocEntry
-{
-    friend class DtSdiUtility;
-
-public:
-    inline int  AncDataBlockNum() const 
-    { 
-        if (AncType() != 1)   return -1;
-        else                  return m_SdidOrDbn;
-    }
-    inline int  AncDataId() const { return m_Did; }
-    inline int  AncNumUserWords() const { return m_NumUserWords; }
-    inline int  AncSecDataId() const
-    { 
-        if (AncType() != 2)   return -1;
-        else                  return m_SdidOrDbn;
-    }
-    inline int  AncType() const { return m_AncType; }
-
-    inline int  Field() const { return m_Field; }
-    inline int  Line() const { return m_Line; }
-    inline int  NumSymbols() const { return m_NumSymbols; }
-    inline int  StartOffset() const { return m_StartOffset; }
-    inline int  TocType() const { return m_TocType; }
-
-    // Encapsulated data
-protected:
-    int  m_TocType;                 // Type of TOC entry
-    int  m_Line;                    // Line number where data is located
-    int  m_Field;                   // Field in where data is located
-    int  m_StartOffset;             // Symbol offset relative to start of line, first data
-    int  m_NumSymbols;              // Number of symbols
-
-    // Following members are only valid if TOC type is DTAPI_SDI_TOC_ENTRY_HANC or 
-    // DTAPI_SDI_TOC_ENTRY_VANC
-    int  m_AncType;                 // Ancillery data packet type (DTAPI_SDI_ANC_TYPE1 or
-                                    // DTAPI_SDI_ANC_TYPE2)
-    int  m_Did;                     // Ancillary packet data ID
-    int  m_SdidOrDbn;               // Ancillary packet data block number (type 1 packet)
-                                    // or secondary data ID (type 2 packet)
-    int  m_NumUserWords;            // Number of ancillary data packet user words
-
-    // Constructor, destructor
-public:
-    DtSdiTocEntry() : m_TocType(DTAPI_SDI_TOC_ENTRY_UNKNOWN), m_Line(0), m_Field(0),
-                      m_StartOffset(0), m_NumSymbols(0) {}
-    virtual ~DtSdiTocEntry() {};
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtSdi -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// The DtSdi class provides helper functions for processing SDI data
-// 
-class DtSdi
-{
-    friend class DtSdiUtility;
-
-public:
-    DtSdi();
-    virtual ~DtSdi();
-
-public:
-    DTAPI_RESULT  ConvertFrame(unsigned int* pInFrame, int& InFrameSize,
-       int InFrameFormat, unsigned int* pOutFrame, int& OutFrameSize, int OutFrameFormat);
-    DTAPI_RESULT  CreateBlackFrame(unsigned int* pFrame, int& FrameSize, int FrameFormat);
-    DTAPI_RESULT  GetActiveVideo(const DtSdiTocEntry& TocEntry,
-                                                 unsigned short* pVideo, int& NumSamples);
-    DTAPI_RESULT  GetActiveVideo(unsigned short* pVideo, int& NumSamples,
-                                                                int Field, int Stride=-1);
-    DTAPI_RESULT  GetAncillaryData(const DtSdiTocEntry& TocEntry,
-                                                  unsigned short* pData, int& NumSamples);
-    DTAPI_RESULT  GetAudio(int AudioGroup, int& Channel,
-                                                 unsigned short* pAudio, int& NumSamples);
-    DTAPI_RESULT  GetTableOfContents(const DtSdiTocEntry** ppToc, int& NumTocEntries);
-    DTAPI_RESULT  ParseFrame(const unsigned int* pFrame, int FrameSize, int FrameFormat,
-                         int ParseFlags, const DtSdiTocEntry** ppToc, int& NumTocEntries);    
-
-protected:
-    DtSdiUtility*  m_pSdiUtil;      // Internal utility class
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtSdi constants -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-
-// Ancillary data packet types
-#define DTAPI_SDI_ANC_TYPE1         1            // Type 1 packet
-#define DTAPI_SDI_ANC_TYPE2         2            // Type 2 packet
-
-// Parse flags
-#define DTAPI_SDI_PARSE_ACTVID      0x0001       // Parse active video
-#define DTAPI_SDI_PARSE_HBLANK      0x0002       // Parse horizontal blanking
-#define DTAPI_SDI_PARSE_VBLANK      0x0004       // Parse vertical blanking
-
-#define DTAPI_SDI_PARSE_BLANK       (DTAPI_SDI_PARSE_HBLANK | DTAPI_SDI_PARSE_VBLANK)
-#define DTAPI_SDI_PARSE_ALL         (DTAPI_SDI_PARSE_ACTVID | DTAPI_SDI_PARSE_BLANK)
-
-// Field flags
-#define DTAPI_SDI_FIELD1            1
-#define DTAPI_SDI_FIELD2            2
-
-// Audio groups
-#define DTAPI_SDI_AUDIO_GROUP1      0x2FF
-#define DTAPI_SDI_AUDIO_GROUP2      0x1FD
-#define DTAPI_SDI_AUDIO_GROUP3      0x1FB
-#define DTAPI_SDI_AUDIO_GROUP4      0x2F9
-
-#define DTAPI_SDI_AUDIO_CHAN1       0x01
-#define DTAPI_SDI_AUDIO_CHAN2       0x02
-#define DTAPI_SDI_AUDIO_CHAN3       0x04
-#define DTAPI_SDI_AUDIO_CHAN4       0x08
-
-#define DTAPI_SDI_AUDIO_CH_PAIR1    (DTAPI_SDI_AUDIO_CHAN1 | DTAPI_SDI_AUDIO_CHAN2)
-#define DTAPI_SDI_AUDIO_CH_PAIR2    (DTAPI_SDI_AUDIO_CHAN3 | DTAPI_SDI_AUDIO_CHAN4)
-#define DTAPI_SDI_AUDIO_CH_MASK     (DTAPI_SDI_AUDIO_CH_PAIR1 | DTAPI_SDI_AUDIO_CH_PAIR2)
-
-// Conversions format
-#define DTAPI_SDI_FULL              0x001
-#define DTAPI_SDI_ACTVID            0x002
-#define DTAPI_SDI_HUFFMAN           0x004
-#define DTAPI_SDI_625               0x008
-#define DTAPI_SDI_525               0x010
-#define DTAPI_SDI_8B                0x020
-#define DTAPI_SDI_10B               0x040
-#define DTAPI_SDI_16B               0x080
-#define DTAPI_SDI_10B_NBO           0x100   // 10-bit packed in network-byte-order
-
-#define DTAPI_SDI_BIT_MASK          0x1E0
-
-// Video standards
-#define DTAPI_VIDSTD_UNKNOWN        -1
-#define DTAPI_VIDSTD_TS             0
-#define DTAPI_VIDSTD_525I59_94      DTAPI_IOCONFIG_525I59_94
-#define DTAPI_VIDSTD_625I50         DTAPI_IOCONFIG_625I50
-#define DTAPI_VIDSTD_720P23_98      DTAPI_IOCONFIG_720P23_98
-#define DTAPI_VIDSTD_720P24         DTAPI_IOCONFIG_720P24
-#define DTAPI_VIDSTD_720P25         DTAPI_IOCONFIG_720P25
-#define DTAPI_VIDSTD_720P29_97      DTAPI_IOCONFIG_720P29_97
-#define DTAPI_VIDSTD_720P30         DTAPI_IOCONFIG_720P30
-#define DTAPI_VIDSTD_720P50         DTAPI_IOCONFIG_720P50
-#define DTAPI_VIDSTD_720P59_94      DTAPI_IOCONFIG_720P59_94
-#define DTAPI_VIDSTD_720P60         DTAPI_IOCONFIG_720P60
-#define DTAPI_VIDSTD_1080P23_98     DTAPI_IOCONFIG_1080P23_98
-#define DTAPI_VIDSTD_1080P24        DTAPI_IOCONFIG_1080P24
-#define DTAPI_VIDSTD_1080P25        DTAPI_IOCONFIG_1080P25
-#define DTAPI_VIDSTD_1080P29_97     DTAPI_IOCONFIG_1080P29_97
-#define DTAPI_VIDSTD_1080P30        DTAPI_IOCONFIG_1080P30
-#define DTAPI_VIDSTD_1080PSF23_98   DTAPI_IOCONFIG_1080PSF23_98
-#define DTAPI_VIDSTD_1080PSF24      DTAPI_IOCONFIG_1080PSF24
-#define DTAPI_VIDSTD_1080PSF25      DTAPI_IOCONFIG_1080PSF25
-#define DTAPI_VIDSTD_1080PSF29_97   DTAPI_IOCONFIG_1080PSF29_97
-#define DTAPI_VIDSTD_1080PSF30      DTAPI_IOCONFIG_1080PSF30
-#define DTAPI_VIDSTD_1080I50        DTAPI_IOCONFIG_1080I50
-#define DTAPI_VIDSTD_1080I59_94     DTAPI_IOCONFIG_1080I59_94
-#define DTAPI_VIDSTD_1080I60        DTAPI_IOCONFIG_1080I60
-#define DTAPI_VIDSTD_1080P50        DTAPI_IOCONFIG_1080P50
-#define DTAPI_VIDSTD_1080P50B       DTAPI_IOCONFIG_1080P50B
-#define DTAPI_VIDSTD_1080P59_94     DTAPI_IOCONFIG_1080P59_94
-#define DTAPI_VIDSTD_1080P59_94B    DTAPI_IOCONFIG_1080P59_94B
-#define DTAPI_VIDSTD_1080P60        DTAPI_IOCONFIG_1080P60
-#define DTAPI_VIDSTD_1080P60B       DTAPI_IOCONFIG_1080P60B
-// The video standards above map 1-to-1 to an IOConfig value. The video formats below
-// are used for multi-link video standards. Start at a high value to make sure there
-// is no overlap.
-#define DTAPI_VIDSTD_BASE           1000
-#define DTAPI_VIDSTD_2160P50        (DTAPI_VIDSTD_BASE + 0)
-#define DTAPI_VIDSTD_2160P50B       (DTAPI_VIDSTD_BASE + 1)
-#define DTAPI_VIDSTD_2160P59_94     (DTAPI_VIDSTD_BASE + 2)
-#define DTAPI_VIDSTD_2160P59_94B    (DTAPI_VIDSTD_BASE + 3)
-#define DTAPI_VIDSTD_2160P60        (DTAPI_VIDSTD_BASE + 4)
-#define DTAPI_VIDSTD_2160P60B       (DTAPI_VIDSTD_BASE + 5)
-#define DTAPI_VIDSTD_2160P23_98     (DTAPI_VIDSTD_BASE + 6)
-#define DTAPI_VIDSTD_2160P24        (DTAPI_VIDSTD_BASE + 7)
-#define DTAPI_VIDSTD_2160P25        (DTAPI_VIDSTD_BASE + 8)
-#define DTAPI_VIDSTD_2160P29_97     (DTAPI_VIDSTD_BASE + 9)
-#define DTAPI_VIDSTD_2160P30        (DTAPI_VIDSTD_BASE + 10)
-
-// Video link standards.
-#define DTAPI_VIDLNK_4K_SMPTE425    0            // 4K mapping according to SMPTE 425
-#define DTAPI_VIDLNK_4K_SMPTE425B   1            // 4K mapping acc. to SMPTE 425 annex B
-
-// Audio standard
-#define DTAPI_SDI_AUDIO_SMPTE272A   1            // SMPTE-272 Level A, 48kHz, 20-bit audio
-
-// Audio formats
-#define DTAPI_SDI_AUDIO_PCM16       0
-#define DTAPI_SDI_AUDIO_PCM24       1
-#define DTAPI_SDI_AUDIO_PCM32       2
-
-// HANC/VANC/Video selection (can be OR-ed)
-//#define DTAPI_SDI_ACTVID               0x01
-#define DTAPI_SDI_HANC              0x02
-#define DTAPI_SDI_VANC              0x04
-#define DTAPI_SDI_ANC_MASK          (DTAPI_SDI_HANC | DTAPI_SDI_VANC)
-    
-// Chrominace/luminance stream selection (can be OR-ed)
-#define DTAPI_SDI_CHROM             0x01
-#define DTAPI_SDI_LUM               0x02
-#define DTAPI_SDI_STREAM_MASK       (DTAPI_SDI_CHROM | DTAPI_SDI_LUM)
-
-// Anc-data operation mode
-#define DTAPI_ANC_MARK              0x0001
-#define DTAPI_ANC_DELETE            0x0002
-
-// Scalling factor
-#define DTAPI_SCALING_OFF           1
-#define DTAPI_SCALING_1_4           2
-#define DTAPI_SCALING_1_16          3
-
-// Symbol filter mode
-#define DTAPI_SYMFLT_ALL            0       // YCbCr sample (CbYCrY order)
-#define DTAPI_SYMFLT_LUM            1       // Luminance only (Y) 
-#define DTAPI_SYMFLT_CHROM          2       // Chrominance only (CbCr)
-#define DTAPI_SYMFLT_SWAP           3       // Swap order of lum and chrom (i.e. YCbYCr)
-#define DTAPI_SYMFLT_RGB            4       // Convert to/from RGB
-
-// Ancillary filter mode
-#define DTAPI_ANCFLT_OFF            0
-#define DTAPI_ANCFLT_HANC_ALL       1
-#define DTAPI_ANCFLT_HANC_MIN       2
-#define DTAPI_ANCFLT_VANC_ALL       3
-#define DTAPI_ANCFLT_VANC_MIN       4
-
-// Receive mode hints for USB3 devices
-#define DTAPI_RXMODE_FRAMEBUFFER      0x10000
-#define DTAPI_RXMODE_ANC              (DTAPI_RXMODE_FRAMEBUFFER | 1)
-#define DTAPI_RXMODE_RAW              (DTAPI_RXMODE_FRAMEBUFFER | 2)
-#define DTAPI_RXMODE_FULL             (DTAPI_RXMODE_FRAMEBUFFER | 3)
-#define DTAPI_RXMODE_FULL8            (DTAPI_RXMODE_FRAMEBUFFER | 4)
-#define DTAPI_RXMODE_FULL8_SCALED4    (DTAPI_RXMODE_FRAMEBUFFER | 5)
-#define DTAPI_RXMODE_FULL8_SCALED16   (DTAPI_RXMODE_FRAMEBUFFER | 6)
-#define DTAPI_RXMODE_VIDEO            (DTAPI_RXMODE_FRAMEBUFFER | 7)
-#define DTAPI_RXMODE_VIDEO8           (DTAPI_RXMODE_FRAMEBUFFER | 8)
-#define DTAPI_RXMODE_VIDEO8_SCALED4   (DTAPI_RXMODE_FRAMEBUFFER | 9)
-#define DTAPI_RXMODE_VIDEO8_SCALED16  (DTAPI_RXMODE_FRAMEBUFFER | 10)
-#define DTAPI_RXMODE_RAW8             (DTAPI_RXMODE_FRAMEBUFFER | 15)
-#define DTAPI_RXMODE_FRMBUF_MASK      0x0F
-
-//=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
-//=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ HD-SDI CLASSES +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
-//=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- AncPacket -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-class AncPacket
-{
-public:
-    AncPacket();
-    AncPacket(const AncPacket& s);
-    virtual ~AncPacket();
-
-public:
-    int  m_Did;                     // Data identifier
-    int  m_SdidOrDbn;               // Secondary data identifier / Data block number
-    int  m_Dc;                      // Data count
-    int  m_Cs;                      // Check sum
-    unsigned short*  m_pUdw;        // User data words
-    int  m_Line;                    // Line number in which packet was found
-
-    // Operations
-public:
-    void  Create(unsigned short*  pUserWords, int  NumWords);
-    void  Create(int  NumWords=256);
-    void  Destroy();
-    int  Type() const  { return (m_Did & 0x80)==0 ? 2 : 1; }
-    int Size() const { return m_Size; }
-
-    void  operator = (const AncPacket& s);
-
-private:
-    int  m_Size;                    // Size of user data buffer (in # of words)
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtFrameBufTrPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-class DtFrameBufTrPars
-{
-public:
-    enum ParsType { PT_VIDEO, PT_ANC, PT_RAW };
-
-protected:
-    DtFrameBufTrPars(ParsType  Type);
-public:
-    virtual ~DtFrameBufTrPars();
-
-    // Operations
-public:
-    DTAPI_RESULT  SetCommon(__int64  Frame, unsigned char* pBuf,  int  BufSize,  
-                                    int  DataFormat, int  StartLine=1,  int  NumLines=-1);
-
-    ParsType GetType() const { return m_Type; } 
-
-    virtual DtFrameBufTrPars*  Clone() = 0;
-
-public:
-    __int64  m_Frame;           // Frame to transfer
-    unsigned char* m_pBuf;      // Transfer buffer
-    int  m_BufSize;             // [in] size of buffer / [out] actual #bytes transferred
-    int  m_StartLine;           // [in] 1st line to transfer / [out] actual first line
-    int  m_NumLines;            // [in] #lines to transfer / [out] actual #lines
-    int  m_DataFormat;          // Format of data (8-, 10-, 16-bit)   
-
-private:
-    ParsType  m_Type;           // Parameter type
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtFrameBufTrParsVideo -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-class DtFrameBufTrParsVideo : public DtFrameBufTrPars
-{
-public:
-    DtFrameBufTrParsVideo(int  Field, int  Scaling=DTAPI_SCALING_OFF, int  Stride=-1,
-                                                            int  SymFlt=DTAPI_SYMFLT_ALL);
-    virtual ~DtFrameBufTrParsVideo();
-
-    DtFrameBufTrParsVideo*  Clone();
-
-public:
-    int  m_Field;               // Field to transfer (DTAPI_SDI_FIELD*)
-    int  m_Scaling;             // Scaling mode (DTAPI_SCALING_*)
-    int  m_Stride;              // -1 means no stride
-    int  m_SymFlt;              // Symbol filter mode (DTAPI_SYMFLT_*)
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtFrameBufTrParsAnc -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-class DtFrameBufTrParsAnc : public DtFrameBufTrPars
-{
-public:
-    DtFrameBufTrParsAnc(int  HancVanc, int  AncFlt=DTAPI_ANCFLT_OFF);
-    virtual ~DtFrameBufTrParsAnc();
-
-    DtFrameBufTrParsAnc*  Clone();
-
-public:
-    int  m_HancVanc;            // HANC or VANC
-    int  m_AncFlt;              // Anc filter mode (DTAPI_ANCFLT_*)
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtFrameBufTrParsRaw -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-class DtFrameBufTrParsRaw : public DtFrameBufTrPars
-{
-public:
-    DtFrameBufTrParsRaw(int  SymFlt=DTAPI_SYMFLT_ALL, int  Stride=-1);
-    virtual ~DtFrameBufTrParsRaw();
-
-    DtFrameBufTrParsRaw*  Clone();
-
-public:
-    int  m_SymFlt;              // Symbol filter mode
-    int  m_Stride;              // -1 means no stride
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtFrameBuffer -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Class to represent an frame buffer
-//
-class DtFrameBuffer
-{
-public:
-    DtFrameBuffer();
-    virtual ~DtFrameBuffer();
-private:
-    // No implementation is provided for the copy constructor
-    DtFrameBuffer(const DtFrameBuffer&);
-
-public:
-    virtual DTAPI_RESULT  AncAddAudio(__int64 Frame, unsigned char* pBuf,
-                                  int& BufSize, int Format, int Channels, int AudioGroup);
-    virtual DTAPI_RESULT  AncAddAudioStatusWord(__int64 Frame, unsigned char  Status[24],
-                                                          int  Channels, int  AudioGroup);
-    // Old declaration of the AncAddPacket function. The AncPacket class has been extended
-    // with a new m_Line member.
-    DTAPI_DEPRECATED(virtual DTAPI_RESULT  AncAddPacket(__int64 Frame,
-                                                     AncPacket&  AncPacket,
-                                                     int Line, int HancVanc, int Stream),
-                     "Deprecated (will be removed!): use overloaded AncAddPacket without "
-                     "line argument, use AncPacket::m_Line instead");
-    virtual DTAPI_RESULT  AncAddPacket(__int64 Frame, AncPacket&  AncPacket,
-                                                                int HancVanc, int Stream);
-    virtual DTAPI_RESULT  AncClear(__int64 Frame, int HancVanc, int Stream);
-    virtual DTAPI_RESULT  AncCommit(__int64 Frame);
-    virtual DTAPI_RESULT  AncDelAudio(__int64 Frame, int AudioGroup, int Mode);
-    virtual DTAPI_RESULT  AncDelPacket(__int64 Frame, int DID, int SDID, int StartLine,
-                                        int NumLines, int HancVanc, int Stream, int Mode);
-    virtual DTAPI_RESULT  AncGetAudio(__int64 Frame, unsigned char*  pBuf, 
-                           int&  BufSize, int DataFormat, int&  Channels, int AudioGroup);
-    virtual DTAPI_RESULT  AncGetPacket(__int64 Frame, int DID, int SDID, 
-                                  AncPacket*, int&  NumPackets, int HancVanc, int Stream);
-    virtual DTAPI_RESULT  AncReadRaw(__int64 Frame, unsigned char* pBuf,
-                                int&  BufSize, int DataFormat, int StartLine,
-                                int NumLines, int HancVanc, bool EnableAncFilter = false);
-    virtual DTAPI_RESULT  AncReadRaw(DtFrameBufTrParsAnc&  TP);
-    virtual DTAPI_RESULT  AncWriteRaw(__int64 Frame, unsigned char* pBuf, 
-                                int&  BufSize, int Format, int StartLine, 
-                                int NumLines, int HancVanc, bool EnableAncFilter = false);
-    virtual DTAPI_RESULT  AncWriteRaw(DtFrameBufTrParsAnc&  TP);
-    virtual DTAPI_RESULT  AttachToInput(DtDevice*, int Port);
-    virtual DTAPI_RESULT  AttachToOutput(DtDevice*, int Port, int Delay);
-    virtual DTAPI_RESULT  ClearFlags(int Latched);
-    virtual DTAPI_RESULT  Detach();
-    virtual DTAPI_RESULT  DetectIoStd(int& Value, int& SubValue);
-    virtual DTAPI_RESULT  GetBufferInfo(DtBufferInfo&);
-    virtual DTAPI_RESULT  GetCurFrame(__int64& CurFrame);
-    virtual DTAPI_RESULT  GetFlags(int& Flags, int& Latched);
-    virtual DTAPI_RESULT  GetFrameInfo(__int64 Frame, DtFrameInfo&);
-    virtual DTAPI_RESULT  GetStatistics(int Count, DtStatistic* pStatistics);
-    virtual DTAPI_RESULT  GetStatistic(int Type, int& Statistic);
-    virtual DTAPI_RESULT  ReadSdiLines(__int64 Frame, unsigned char* pBuf, 
-                              int& BufSize, int DataFormat, int StartLine, int& NumLines);
-    virtual DTAPI_RESULT  ReadSdiLines(DtFrameBufTrParsRaw&  TP);
-    virtual DTAPI_RESULT  ReadSdiLines(__int64 Frame, unsigned char* pBuf, 
-                                                           int&  BufSize, int DataFormat);
-    virtual DTAPI_RESULT  ReadVideo(__int64 Frame, unsigned char* pBuf,
-                                           int& BufSize, int Field, int FullOrScaled,
-                                           int DataFormat, int StartLine, int&  NumLines);
-    virtual DTAPI_RESULT  ReadVideo(DtFrameBufTrParsVideo&  TP);
-    virtual DTAPI_RESULT  SetRxMode(int  RxMode, __int64&  FirstFrame);
-    virtual DTAPI_RESULT  Start(bool Start=true);
-    virtual DTAPI_RESULT  SetIoConfig(int Group, int Value, int SubValue = -1,
-                                            __int64 ParXtra0 = -1, __int64 ParXtra1 = -1);
-    virtual DTAPI_RESULT  WaitFrame(__int64& LastFrame);
-    virtual DTAPI_RESULT  WaitFrame(__int64& FirstFrame, __int64& LastFrame);
-    virtual DTAPI_RESULT  WriteSdiLines(__int64 Frame, unsigned char* pBuf, 
-                                                            int& BufSize, int DataFormat);
-    virtual DTAPI_RESULT  WriteSdiLines(__int64 Frame, unsigned char*  pBuf, 
-                            int&  BufSize, int DataFormat, int StartLine, int&  NumLines);
-    virtual DTAPI_RESULT  WriteSdiLines(DtFrameBufTrParsRaw&  TP);
-    virtual DTAPI_RESULT  WriteVideo(__int64 Frame, unsigned char*  pBuf, int&  BufSize,
-                                int Field, int DataFormat, int StartLine, int&  NumLines);
-    virtual DTAPI_RESULT  WriteVideo(DtFrameBufTrParsVideo&  TP);
-
-protected:
-    FrameBufImpl*  m_pImpl;         // Implementation class
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtSdiMatrix -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-class DtSdiMatrix
-{
-public:
-    DtSdiMatrix();
-    virtual ~DtSdiMatrix();
-private:
-    // No implementation is provided for the copy constructor
-    DtSdiMatrix(const DtSdiMatrix&);
-
-public:
-    virtual DTAPI_RESULT  Attach(DtDevice*  pDvc, int&  MaxNumRows);
-    virtual DTAPI_RESULT  Detach();
-    virtual DTAPI_RESULT  GetMatrixInfo(DtMatrixInfo&  Info);
-    virtual DtFrameBuffer&  Row(int n);
-    virtual DTAPI_RESULT  Start(bool  Start=true);
-    virtual DTAPI_RESULT  SetIoConfig(int Group, int Value, int SubValue = -1,
-                                            __int64 ParXtra0 = -1, __int64 ParXtra1 = -1);
-    virtual DTAPI_RESULT  WaitFrame(__int64&  LastFrame);
-    virtual DTAPI_RESULT  WaitFrame(__int64&  FirstFrame, __int64&  LastFrame);
-    
-private:
-    SdiMatrixImpl*  m_pImpl;        // Implementation class
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- Global DTAPI Functions -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-
-DTAPI_RESULT  DtapiCheckDeviceDriverVersion(void);
-DTAPI_RESULT  DtapiCheckDeviceDriverVersion(int DeviceCategory);
-DTAPI_RESULT  DtapiDeviceScan(int NumEntries, int& NumEntriesResult,
-                                         DtDeviceDesc* DvcDescArr, bool InclDteDvcs=false,
-                                         int  ScanOrder=DTAPI_SCANORDER_ORIG);
-DTAPI_RESULT  DtapiDtaPlusDeviceScan(int NumEntries, int& NumEntriesResult,
-                                                         DtDtaPlusDeviceDesc* DvcDescArr);
-DTAPI_RESULT  DtapiDtDeviceDesc2String(DtDeviceDesc* pDvcDesc, int StringType, 
-                                                         char* pString, int StringLength);
-DTAPI_RESULT  DtapiDtDeviceDesc2String(DtDeviceDesc* pDvcDesc, int StringType, 
-                                                      wchar_t* pString, int StringLength);
-DTAPI_RESULT  DtapiDtHwFuncDesc2String(DtHwFuncDesc* pHwFunc, int StringType, 
-                                                         char* pString, int StringLength);
-DTAPI_RESULT  DtapiDtHwFuncDesc2String(DtHwFuncDesc* pHwFunc, int StringType, 
-                                                      wchar_t* pString, int StringLength);
-DTAPI_RESULT  DtapiGetDeviceDriverVersion(int, int&, int&, int&, int&);
-DTAPI_RESULT  DtapiGetDtapiServiceVersion(int&, int&, int&, int&);
-DTAPI_RESULT  DtapiGetVersion(int& Maj, int& Min, int& BugFix, int& Build);
-DTAPI_RESULT  DtapiHwFuncScan(int NumEntries, int& NumEntriesResult,
-                                           DtHwFuncDesc* pHwFuncs, bool InclDteDvcs=false,
-                                           int  ScanOrder=DTAPI_SCANORDER_ORIG);
-DTAPI_RESULT  DtapiPower2Voltage(int dBm, int& dBmV, bool Is50Ohm=false);
-const char*  DtapiResult2Str(DTAPI_RESULT DtapiResult);
-DTAPI_RESULT  DtapiVoltage2Power(int dBmV, int& dBm, bool Is50Ohm=false);
-
-// Callbacks
-DTAPI_RESULT  DtapiRegisterCallback(pDtEventCallback Callback, void* pContext,
-                                                       int EventTypes, void** pId = NULL);
-DTAPI_RESULT  DtapiUnregisterCallback(void* pId);
-
-// IP address conversion
-DTAPI_RESULT  DtapiInitDtIpParsFromIpString(DtIpPars& IpPars,
-                                                  const char* pDstIp, const char* pSrcIp);
-DTAPI_RESULT  DtapiInitDtIpParsFromIpString(DtIpPars& IpPars,
-                                            const wchar_t* pDstIp, const wchar_t* pSrcIp);
-DTAPI_RESULT  DtapiIpAddr2ByteArray(const char* pIpStr, unsigned char* pIpByte,
-                                                                              int& Flags);
-DTAPI_RESULT  DtapiIpAddr2ByteArray(const wchar_t* pIpStr, 
-                                                      unsigned char* pIpByte, int& Flags);
-DTAPI_RESULT  DtapiIpAddr2Str(char* pStr, int Len, unsigned char* pIpAddr);
-DTAPI_RESULT  DtapiIpAddr2Str(wchar_t* pStr, int Len, unsigned char* pIpAddr);
-DTAPI_RESULT  DtapiStr2IpAddr(unsigned char* pIpAddr, const char* pStr);
-DTAPI_RESULT  DtapiStr2IpAddr(unsigned char* pIpAddr, const wchar_t* pStr);
-
-// Legacy
-#define DtapiInitDtTsIpParsFromIpString DtapiInitDtIpParsFromIpString
-
-// Modulator functions
-DTAPI_RESULT  DtapiModPars2Bandwidth(int& ModBandwidth, int& TotalBandwidth,
-                                    int ModType, int ParXtra0, int ParXtra1, int ParXtra2,
-                                    void* pXtraPars, int SymRate);
-DTAPI_RESULT  DtapiModPars2SymRate(int& SymRate, int ModType, int ParXtra0,
-                                                  int ParXtra1, int ParXtra2, int TsRate);
-DTAPI_RESULT  DtapiModPars2SymRate(int& SymRate, int ModType, int ParXtra0,
-                                        int ParXtra1, int ParXtra2, DtFractionInt TsRate);
-DTAPI_RESULT  DtapiModPars2SymRate(int& SymRate, int ModType, int ParXtra0,
-                                 int ParXtra1, int ParXtra2, void* pXtraPars, int TsRate);
-DTAPI_RESULT  DtapiModPars2SymRate(int& SymRate, int ModType, int ParXtra0,
-                       int ParXtra1, int ParXtra2, void* pXtraPars, DtFractionInt TsRate);
-DTAPI_RESULT  DtapiModPars2TsRate(int& TsRate, int ModType, int ParXtra0,
-                                            int ParXtra1, int ParXtra2, int SymRate = -1);
-DTAPI_RESULT  DtapiModPars2TsRate(DtFractionInt& TsRate, int ModType, int ParXtra0,
-                                            int ParXtra1, int ParXtra2, int SymRate = -1);
-DTAPI_RESULT  DtapiModPars2TsRate(int& TsRate, DtDvbC2Pars&, int PlpIdx = 0);
-DTAPI_RESULT  DtapiModPars2TsRate(DtFractionInt& TsRate, DtDvbC2Pars&, int PlpIdx = 0);
-DTAPI_RESULT  DtapiModPars2TsRate(int& TsRate, DtDvbS2Pars&, int PlpIdx = 0);
-DTAPI_RESULT  DtapiModPars2TsRate(DtFractionInt& TsRate, DtDvbS2Pars&, int PlpIdx = 0);
-DTAPI_RESULT  DtapiModPars2TsRate(int& TsRate, DtDvbT2Pars&, int PlpIdx = 0);
-DTAPI_RESULT  DtapiModPars2TsRate(DtFractionInt& TsRate, DtDvbT2Pars&, int PlpIdx = 0);
-DTAPI_RESULT  DtapiModPars2TsRate(int& TsRate, DtIsdbTmmPars&, int TsIdx = 0);
-DTAPI_RESULT  DtapiModPars2TsRate(DtFractionInt& TsRate, DtIsdbTmmPars&, int TsIdx = 0);
-DTAPI_RESULT  DtapiModPars2TsRate(int& TsRate, int ModType, int ParXtra0,
-                                int ParXtra1, int ParXtra2, void* pXtraPars, int SymRate);
-DTAPI_RESULT  DtapiModPars2TsRate(DtFractionInt& TsRate, int ModType, int ParXtra0,
-                                int ParXtra1, int ParXtra2, void* pXtraPars, int SymRate);
-
-// HD-SDI functions
-DTAPI_RESULT  DtapiGetRequiredUsbBandwidth(int VidStd, int RxMode, long long&  Bandwidth);
-DTAPI_RESULT  DtapiGetVidStdInfo(int VidStd, DtVidStdInfo& Info);
-DTAPI_RESULT  DtapiGetVidStdInfo(int VidStd, int  LinkStd, DtVidStdInfo& Info);
-DTAPI_RESULT  DtapiIoStd2VidStd(int Value, int SubValue, int& VidStd);
-DTAPI_RESULT  DtapiVidStd2IoStd(int VidStd, int& Value, int& SubValue);
-DTAPI_RESULT  DtapiVidStd2IoStd(int VidStd, int  LinkStd, int& Value, int& SubValue);
-const char*  DtapiVidStd2Str(int VidStd);
-const char*  DtapiLinkStd2Str(int LinkStd);
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- Return Codes -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// NOTE: ERROR CODES 0x1100-0x12FF ARE RESERVED FOR USE IN THE DTAPIplus
-//
-#define DTAPI_OK                    0
-#define DTAPI_OK_FAILSAFE           1
-#define DTAPI_E                     0x1000
-#define DTAPI_E_ATTACHED            (DTAPI_E + 0)
-#define DTAPI_E_BUF_TOO_SMALL       (DTAPI_E + 1)
-#define DTAPI_E_DEV_DRIVER          (DTAPI_E + 2)
-#define DTAPI_E_EEPROM_FULL         (DTAPI_E + 3)
-#define DTAPI_E_EEPROM_READ         (DTAPI_E + 4)
-#define DTAPI_E_EEPROM_WRITE        (DTAPI_E + 5)
-#define DTAPI_E_EEPROM_FORMAT       (DTAPI_E + 6)
-#define DTAPI_E_FIFO_FULL           (DTAPI_E + 7)
-#define DTAPI_E_IN_USE              (DTAPI_E + 8)
-#define DTAPI_E_INVALID_BUF         (DTAPI_E + 9)
-#define DTAPI_E_INVALID_FLAGS       (DTAPI_E + 11)
-#define DTAPI_E_INVALID_MODE        (DTAPI_E + 12)
-#define DTAPI_E_INVALID_RATE        (DTAPI_E + 13)
-#define DTAPI_E_INVALID_SIZE        (DTAPI_E + 14)
-#define DTAPI_E_KEYWORD             (DTAPI_E + 15)
-#define DTAPI_E_NO_DEVICE           (DTAPI_E + 16)
-#define DTAPI_E_NO_LOOPBACK         (DTAPI_E + 17)
-#define DTAPI_E_NO_SUCH_DEVICE      (DTAPI_E + 18)
-#define DTAPI_E_NO_SUCH_OUTPUT      (DTAPI_E + 19)
-#define DTAPI_E_NO_DT_OUTPUT        (DTAPI_E + 20)
-#define DTAPI_E_NO_TS_OUTPUT        (DTAPI_E + 20)
-#define DTAPI_E_NOT_ATTACHED        (DTAPI_E + 21)
-#define DTAPI_E_NOT_FOUND           (DTAPI_E + 22)
-#define DTAPI_E_NOT_SUPPORTED       (DTAPI_E + 23)
-#define DTAPI_E_DEVICE              (DTAPI_E + 24)
-#define DTAPI_E_TOO_LONG            (DTAPI_E + 25)
-#define DTAPI_E_UNDERFLOW           (DTAPI_E + 26)
-#define DTAPI_E_NO_SUCH_INPUT       (DTAPI_E + 27)
-#define DTAPI_E_NO_DT_INPUT         (DTAPI_E + 28)
-#define DTAPI_E_NO_TS_INPUT         (DTAPI_E + 28)
-#define DTAPI_E_DRIVER_INCOMP       (DTAPI_E + 29)
-#define DTAPI_E_INTERNAL            (DTAPI_E + 30)
-#define DTAPI_E_OUT_OF_MEM          (DTAPI_E + 31)
-#define DTAPI_E_INVALID_J83ANNEX    (DTAPI_E + 32)
-#define DTAPI_E_IDLE                (DTAPI_E + 33)
-#define DTAPI_E_INSUF_LOAD          (DTAPI_E + 34)
-#define DTAPI_E_INVALID_BANDWIDTH   (DTAPI_E + 35)
-#define DTAPI_E_INVALID_CONSTEL     (DTAPI_E + 36)
-#define DTAPI_E_INVALID_GUARD       (DTAPI_E + 37)
-#define DTAPI_E_INVALID_INTERLVNG   (DTAPI_E + 38)
-#define DTAPI_E_INVALID_TRANSMODE   (DTAPI_E + 39)
-#define DTAPI_E_INVALID_TSTYPE      (DTAPI_E + 40)
-#define DTAPI_E_NO_IPPARS           (DTAPI_E + 41)
-#define DTAPI_E_NO_TSRATE           (DTAPI_E + 42)
-#define DTAPI_E_NOT_IDLE            (DTAPI_E + 43)
-#define DTAPI_E_INVALID_ARG         (DTAPI_E + 44)
-#define DTAPI_E_NW_DRIVER           (DTAPI_E + 45)
-#define DTAPI_E_DST_MAC_ADDR        (DTAPI_E + 46)
-#define DTAPI_E_NO_SUCH_PORT        (DTAPI_E + 47)
-#define DTAPI_E_WINSOCK             (DTAPI_E + 48)
-#define DTAPI_E_MULTICASTJOIN       (DTAPI_E + 49)
-#define DTAPI_E_EMBEDDED            (DTAPI_E + 50)
-#define DTAPI_E_LOCKED              (DTAPI_E + 51)
-#define DTAPI_E_NO_VALID_CALDATA    (DTAPI_E + 52)
-#define DTAPI_E_NO_LINK             (DTAPI_E + 53)
-#define DTAPI_E_INVALID_HEADER      (DTAPI_E + 54)
-#define DTAPI_E_INVALID_PARS        (DTAPI_E + 55)
-#define DTAPI_E_NOT_SDI_MODE        (DTAPI_E + 56)
-#define DTAPI_E_INCOMP_FRAME        (DTAPI_E + 57)
-#define DTAPI_E_UNSUP_CONV          (DTAPI_E + 58)
-#define DTAPI_E_OUTBUF_TOO_SMALL    (DTAPI_E + 59)
-#define DTAPI_E_CONFIG              (DTAPI_E + 60)
-#define DTAPI_E_TIMEOUT             (DTAPI_E + 61)
-#define DTAPI_E_INVALID_TIMEOUT     (DTAPI_E + 62)
-#define DTAPI_E_INVALID_FHMODE      (DTAPI_E + 63)
-#define DTAPI_E_INVALID_PILOTS      (DTAPI_E + 64)
-#define DTAPI_E_INVALID_USEFRAMENO  (DTAPI_E + 65)
-#define DTAPI_E_SYMRATE_REQD        (DTAPI_E + 66)
-#define DTAPI_E_NO_SYMRATE          (DTAPI_E + 67)
-#define DTAPI_E_INVALID_NUMSEGM     (DTAPI_E + 68)
-#define DTAPI_E_INVALID_NUMTAPS     (DTAPI_E + 69)
-#define DTAPI_E_COMMUNICATION       (DTAPI_E + 70)
-#define DTAPI_E_BIND                (DTAPI_E + 71)
-#define DTAPI_E_FRAME_INTERVAL      (DTAPI_E + 72)
-#define DTAPI_E_INVALID_BWT_EXT     (DTAPI_E + 73)
-#define DTAPI_E_INVALID_FFTMODE     (DTAPI_E + 74)
-#define DTAPI_E_INVALID_NUMDTSYM    (DTAPI_E + 75)
-#define DTAPI_E_INVALID_NUMT2FRM    (DTAPI_E + 76)
-#define DTAPI_E_INVALID_SUBCH       (DTAPI_E + 77)
-#define DTAPI_E_INVALID_TIME_IL     (DTAPI_E + 78)
-#define DTAPI_E_NUM_PLP             (DTAPI_E + 79)
-#define DTAPI_E_PLP_NUMBLOCKS       (DTAPI_E + 80)
-#define DTAPI_E_NUMPLPS_MUSTBE_1    (DTAPI_E + 81)
-#define DTAPI_E_INBAND              (DTAPI_E + 82)
-#define DTAPI_E_ISSY                (DTAPI_E + 83)
-#define DTAPI_E_OTHER_PLP_IN_BAND   (DTAPI_E + 84)
-#define DTAPI_E_CM_NUMPATHS         (DTAPI_E + 85)
-#define DTAPI_E_PILOT_PATTERN       (DTAPI_E + 86)
-#define DTAPI_E_SUBSLICES           (DTAPI_E + 87)
-#define DTAPI_E_NO_GENREF           (DTAPI_E + 88)
-#define DTAPI_E_TI_MEM_OVF          (DTAPI_E + 89)
-#define DTAPI_E_FEF                 (DTAPI_E + 90)
-#define DTAPI_E_UNSUP_FORMAT        (DTAPI_E + 91)
-#define DTAPI_E_OUT_OF_SYNC         (DTAPI_E + 92)
-#define DTAPI_E_NO_FRAME            (DTAPI_E + 93)
-#define DTAPI_E_NO_SUCH_DATA        (DTAPI_E + 94)
-#define DTAPI_E_INVALID_TYPE        (DTAPI_E + 95)
-#define DTAPI_E_INVALID_MODPARS     (DTAPI_E + 96)
-#define DTAPI_E_BIAS_BAL_CELLS      (DTAPI_E + 97)
-#define DTAPI_E_COMMON_PLP_COUNT    (DTAPI_E + 98)
-#define DTAPI_E_PLP_ID              (DTAPI_E + 99)
-#define DTAPI_E_BUFS                (DTAPI_E + 100)
-#define DTAPI_E_FIXED_CELL_PARS     (DTAPI_E + 101)
-#define DTAPI_E_CM_CHANNEL          (DTAPI_E + 102)
-#define DTAPI_E_INVALID_FIFO_IDX    (DTAPI_E + 103)
-#define DTAPI_E_INVALID_INP_TYPE    (DTAPI_E + 104)
-#define DTAPI_E_INVALID_OUTP_TYPE   (DTAPI_E + 105)
-#define DTAPI_E_INVALID_START_FREQ  (DTAPI_E + 106)
-#define DTAPI_E_DSLICE_TUNE_POS     (DTAPI_E + 107)
-#define DTAPI_E_DSLICE_OFFSETS      (DTAPI_E + 108)
-#define DTAPI_E_DSLICE_OVERLAP      (DTAPI_E + 109)
-#define DTAPI_E_NOTCH_OFFSETS       (DTAPI_E + 110)
-#define DTAPI_E_PLP_BUNDLED         (DTAPI_E + 111)
-#define DTAPI_E_BROADBAND_NOTCH     (DTAPI_E + 112)
-#define DTAPI_E_L1_PART2_TOO_LONG   (DTAPI_E + 113)
-#define DTAPI_E_DSLICE_T1_NDP       (DTAPI_E + 114)
-#define DTAPI_E_DSLICE_T1_TSRATE    (DTAPI_E + 115)
-#define DTAPI_E_CONNECT_TO_SERVICE  (DTAPI_E + 116)
-#define DTAPI_E_INVALID_SYMRATE     (DTAPI_E + 117)
-#define DTAPI_E_MODPARS_NOT_SET     (DTAPI_E + 118)
-#define DTAPI_E_SERVICE_INCOMP      (DTAPI_E + 119)
-#define DTAPI_E_INVALID_LEVEL       (DTAPI_E + 120)
-#define DTAPI_E_MODTYPE_UNSUP       (DTAPI_E + 121)
-#define DTAPI_E_I2C_LOCK_TIMEOUT    (DTAPI_E + 122)
-#define DTAPI_E_INVALID_FREQ        (DTAPI_E + 123)
-#define DTAPI_E_INVALID_TSRATESEL   (DTAPI_E + 124)
-#define DTAPI_E_INVALID_SPICLKSEL   (DTAPI_E + 125)
-#define DTAPI_E_INVALID_SPIMODE     (DTAPI_E + 126)
-#define DTAPI_E_NOT_INITIALIZED     (DTAPI_E + 127)
-#define DTAPI_E_NOT_LOCKED          (DTAPI_E + 128)
-#define DTAPI_E_NO_PERMISSION       (DTAPI_E + 129)
-#define DTAPI_E_CANCELLED           (DTAPI_E + 130)
-#define DTAPI_E_OUT_OF_RESOURCES    (DTAPI_E + 131)
-#define DTAPI_E_LISTEN              (DTAPI_E + 132)
-#define DTAPI_E_INVALID_STREAMFMT   (DTAPI_E + 133)
-#define DTAPI_E_EVENT_POWER         (DTAPI_E + 134)
-#define DTAPI_E_EVENT_REMOVAL       (DTAPI_E + 135)
-#define DTAPI_E_UNSUP_ROLLOFF       (DTAPI_E + 136)
-#define DTAPI_E_T2_LITE             (DTAPI_E + 137)
-#define DTAPI_E_COMP_OVERLAP        (DTAPI_E + 138)
-#define DTAPI_E_MULTI_COMPS         (DTAPI_E + 139)
-#define DTAPI_E_INVALID_ISI         (DTAPI_E + 140)
-#define DTAPI_E_FIRMW_INCOMP        (DTAPI_E + 141)
-#define DTAPI_E_INVALID_MODTYPE     (DTAPI_E + 142)
-#define DTAPI_E_NO_VIDSTD           (DTAPI_E + 143)
-#define DTAPI_E_INVALID_VIDSTD      (DTAPI_E + 144)
-#define DTAPI_E_INVALID_AUDSTD      (DTAPI_E + 145)
-#define DTAPI_E_INVALID_SCALING     (DTAPI_E + 146)
-#define DTAPI_E_INVALID_ROW         (DTAPI_E + 147)
-#define DTAPI_E_NOT_STARTED         (DTAPI_E + 148)
-#define DTAPI_E_STARTED             (DTAPI_E + 149)
-#define DTAPI_E_INVALID_LINE        (DTAPI_E + 150)
-#define DTAPI_E_INVALID_STREAM      (DTAPI_E + 151)
-#define DTAPI_E_INVALID_ANC         (DTAPI_E + 152)
-#define DTAPI_E_INVALID_FRAME       (DTAPI_E + 153)
-#define DTAPI_E_NOT_IMPLEMENTED     (DTAPI_E + 154)
-#define DTAPI_E_INVALID_CHANNEL     (DTAPI_E + 155)
-#define DTAPI_E_INVALID_GROUP       (DTAPI_E + 156)
-#define DTAPI_E_INVALID_FORMAT      (DTAPI_E + 157)
-#define DTAPI_E_INVALID_FIELD       (DTAPI_E + 158)
-#define DTAPI_E_BUF_TOO_LARGE       (DTAPI_E + 159)
-#define DTAPI_E_INVALID_DELAY       (DTAPI_E + 160)
-#define DTAPI_E_EXCL_MANDATORY      (DTAPI_E + 161)
-#define DTAPI_E_INVALID_ROLLOFF     (DTAPI_E + 162)
-#define DTAPI_E_CM_UNSUP            (DTAPI_E + 163)
-#define DTAPI_E_I2C                 (DTAPI_E + 164)
-#define DTAPI_E_STATE               (DTAPI_E + 165)
-#define DTAPI_E_NO_LOCK             (DTAPI_E + 166)
-#define DTAPI_E_RANGE               (DTAPI_E + 167)
-#define DTAPI_E_INVALID_T2PROFILE   (DTAPI_E + 168)
-#define DTAPI_E_DSLICE_ID           (DTAPI_E + 169)
-#define DTAPI_E_EXCL_ACCESS_REQD    (DTAPI_E + 170)
-#define DTAPI_E_CHAN_ALREADY_ADDED  (DTAPI_E + 171)
-#define DTAPI_E_LAYER_ID            (DTAPI_E + 172)
-#define DTAPI_E_INVALID_FECMODE     (DTAPI_E + 173)
-#define DTAPI_E_INVALID_PORT        (DTAPI_E + 174)
-#define DTAPI_E_INVALID_PROTOCOL    (DTAPI_E + 175)
-#define DTAPI_E_INVALID_FEC_MATRIX  (DTAPI_E + 176)
-#define DTAPI_E_INVALID_IP_ADDR     (DTAPI_E + 177)
-#define DTAPI_E_INVALID_SRCIP_ADDR  (DTAPI_E + 178)
-#define DTAPI_E_IPV6_NOT_SUPPORTED  (DTAPI_E + 179)
-#define DTAPI_E_INVALID_DIFFSERV    (DTAPI_E + 180)
-#define DTAPI_E_INVALID_FOR_ACM     (DTAPI_E + 181)
-#define DTAPI_E_NWAP_DRIVER         (DTAPI_E + 182)
-#define DTAPI_E_INIT_ERROR          (DTAPI_E + 183)
-#define DTAPI_E_NOT_USB3            (DTAPI_E + 184)
-#define DTAPI_E_INSUF_BW            (DTAPI_E + 185)
-#define DTAPI_E_NO_ANC_DATA         (DTAPI_E + 186)
-#define DTAPI_E_MATRIX_HALTED       (DTAPI_E + 187)
-#define DTAPI_E_VLAN_NOT_FOUND      (DTAPI_E + 188)
-#define DTAPI_E_NO_ADAPTER_IP_ADDR  (DTAPI_E + 189)
-#define DTAPI_E_INVALID_BTYPE       (DTAPI_E + 190)
-#define DTAPI_E_INVALID_PARTIAL     (DTAPI_E + 191)
-#define DTAPI_E_INVALID_NUMTS       (DTAPI_E + 192)
-#define DTAPI_E_INVALID             (DTAPI_E + 193)
-#define DTAPI_E_NO_RS422            (DTAPI_E + 194)
-#define DTAPI_E_FECFRAMESIZE        (DTAPI_E + 195)
-#define DTAPI_E_SFN_NOT_SUPPORTED   (DTAPI_E + 196)
-#define DTAPI_E_SFN_INVALID_MODE    (DTAPI_E + 197)
-#define DTAPI_E_SFN_INVALID_OFFSET  (DTAPI_E + 198)
-#define DTAPI_E_SFN_DISABLED        (DTAPI_E + 199)
-#define DTAPI_E_SFN_INVALID_TIMEDIFF (DTAPI_E + 200)
-#define DTAPI_E_NO_GPSCLKREF        (DTAPI_E + 201)
-#define DTAPI_E_NO_GPSSYNC          (DTAPI_E + 202)
-#define DTAPI_E_INVALID_PROFILE     (DTAPI_E + 203)
-#define DTAPI_E_INVALID_LINKSTD     (DTAPI_E + 204)
-#define DTAPI_E_FRAMERATE_MISMATCH  (DTAPI_E + 205)
-#define DTAPI_E_CID_INVALID_ID      (DTAPI_E + 206)
-#define DTAPI_E_CID_INVALID_INFO    (DTAPI_E + 207)
-#define DTAPI_E_CID_INVALID_FORMAT  (DTAPI_E + 208)
-#define DTAPI_E_CID_NOT_SUPPORTED   (DTAPI_E + 209)
-#define DTAPI_E_INVALID_SAMPRATE    (DTAPI_E + 210)
-#define DTAPI_E_MULTIMOD_UNSUP      (DTAPI_E + 211)
-#define DTAPI_E_NUM_CHAN            (DTAPI_E + 212)
-#define DTAPI_E_INVALID_TIME        (DTAPI_E + 213)
-#define DTAPI_E_INVALID_LINK        (DTAPI_E + 214)
-#define DTAPI_E_MODE_VIDEOSTD       (DTAPI_E + 215)
-
-
-//+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
-//=+=+=+=+=+=+=+=+ DVB-C2, DVB-S2, DVB-T2, ISDB-Tmm Multi PLP Parameters +=+=+=+=+=+=+=+=+
-//+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtBigTsSplitPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Class for specifying 'Big TS' splitting
-//
-struct DtBigTsSplitPars
-{
-    bool  m_Enabled;                // Enable 'Big TS' splitting
-    bool  m_IsCommonPlp;            // Is Common PLP or Layer
-    bool  m_SplitSdtIn;             // SDT already split (e.g. BBC TS-files)
-    std::vector<int>  m_Pids;       // Series of PIDs to include in the PLP
-
-    // The parameters below are not used in case of a common PLP
-    int  m_OnwId;                   // Original Network ID of the Big-TS
-    int  m_TsId;                    // Transport Stream ID of the Big-TS
-    int  m_ServiceId;               // ID of service to include in PLP
-    int  m_PmtPid;                  // PID of the PMT-table
-    int  m_NewTsId;                 // New Transport Stream ID
-    int  m_SdtLoopDataLength;       // SDT loop data length. 0..168
-                                    // Not used if m_SplitSdtIn == true
-    // The SDT-Actual loop data
-    unsigned char  m_SdtLoopData[168];
-
-public:
-    // Methods
-    void  Init(void);
-
-    // Operators
-    bool  operator == (DtBigTsSplitPars& TsSplitPars);
-    bool  operator != (DtBigTsSplitPars& TsSplitPars);
-    bool  IsEqual(DtBigTsSplitPars& TsSplitPars);
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtPlpInpPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Class for specifying the PLP input
-//
-struct DtPlpInpPars
-{
-    // PLP input data types
-    enum InDataType 
-    {
-        TS188,                      // 188-byte TS packets 
-        TS204,                      // 204-byte TS packets
-        GSE                         // Generic Stream Encapsulation
-    };
-
-public:
-    int  m_FifoIdx;                 // Fifo index used for the PLP
-                                    // If Big TS file splitting is used, PLPs in a group
-                                    // can share the input FIFO
-    InDataType  m_DataType;         // TS188, TS204 byte or GSE packets
-    DtBigTsSplitPars  m_BigTsSplit; // Big TS splitting (optional)
-
-public:
-    // Methods
-    void  Init(int Idx = 0);
-
-    // Operators
-    bool  operator == (DtPlpInpPars& PlpInPars);
-    bool  operator != (DtPlpInpPars& PlpInPars);
-    bool  IsEqual(DtPlpInpPars& PlpInPars);
-};
-
-// Test point data format
-#define DTAPI_TP_FORMAT_HEX         0
-#define DTAPI_TP_FORMAT_BIT         1
-#define DTAPI_TP_FORMAT_CFLOAT32    2
-#define DTAPI_TP_FORMAT_INT64       3
-
-// Complex floating point type
-struct DtComplexFloat
-{
-    float  m_Re, m_Im;              // Real, imaginary part
-};
-
-// Function to write test point data
-typedef void  DtTpWriteDataFunc(void* pOpaque, int TpIndex, int StreamIndex,
-                  const void* Buffer, int Length, int Format, float Mult, int IsNewFrame);
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtTestPointOutPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Class for enabling the test point data output specifying a callback function
-//
-struct DtTestPointOutPars
-{
-public:
-    bool  m_Enabled;                // Enable TP data output
-    void*  m_pTpWriteDataOpaque;    // Opaque data pointer passed to TpWriteData
-
-    // Callback function for writing test data
-    DtTpWriteDataFunc*  m_pTpWriteDataFunc;
-
-public:
-    // Methods
-    void  Init(void);
-
-    // Operators
-    bool  operator == (DtTestPointOutPars& RbmPars);
-    bool  operator != (DtTestPointOutPars& RbmPars);
-    bool  IsEqual(DtTestPointOutPars& RbmPars);
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtVirtualOutData -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-// 
-// Structure describing and containing the output data for a virtual output channel 
-// 
-struct DtVirtualOutData
-{
-    // Virtual output data types
-    enum OutDataType 
-    {
-        IQ_INT16,                   // 16-bit I/Q samples 
-        IQ_FLOAT32,                 // 32 bit float I/Q samples
-        T2MI_TS188,                 // 188 byte T2MI TS-packets
-        DVBS2_L3,                   // L3 format for DVB-S2
-    };
-    OutDataType  m_DataType;        // Output data type
-
-    // Output type dependent parameters
-    union {
-        // 16-bit int I/Q samples
-        struct {
-            // Array of buffers; Per output channel a buffer with samples
-            const unsigned char**  m_pBuffer; 
-            int  m_NumBuffers;      // Number of buffers
-            int  m_NumBytes;        // Number of bytes
-        } IqSamplesInt16;
-
-        // 32-bit float I/Q samples
-        struct {
-            // Array of buffers. Per output channel a buffer with samples
-            const unsigned char**  m_pBuffer;
-            int  m_NumBuffers;      // Number of buffers
-            int  m_NumBytes;        // Number of bytes
-        } IqSamplesFloat32;
-
-        // 188-byte T2MI TS packets
-        struct {
-            // Pointer to T2MI TS-packet(s)
-            const unsigned char*  m_pBuffer;
-            int  m_NumBytes;        // Number of bytes
-            __int64  m_T2MiFrameNr; // T2MI super frame number counter
-        } T2MiTs188;
-
-        // L3 frames
-        struct {
-            // Pointer to L3 frame(s)
-            const unsigned char*  m_pBuffer;
-            int  m_NumBytes;        // Number of bytes
-        } DvbS2L3;
-        
-    } u;
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtVirtualOutPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Class for specifying the output type and level for a virtual output.
-// These parameters are only relevant when outputting to a virtual output channel.
-//
-struct DtVirtualOutPars
-{
-    bool  m_Enabled;                // Enable virtual output parameters
-    DtVirtualOutData::OutDataType  m_DataType;
-                                    // Type of output data 
-    double  m_Gain;                 // The square root of the average power of
-                                    // the generated signal
-public:
-    void  Init(void);
-    bool  IsEqual(DtVirtualOutPars& VirtOutPars);
-    bool  operator == (DtVirtualOutPars& VirtOutPars);
-    bool  operator != (DtVirtualOutPars& VirtOutPars);
-};
-
-
-
-//=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ DAB Parameters +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
-
-// DAB error protection modes
-#define DTAPI_DAB_UEP               0            // DAB unequal error protection
-#define DTAPI_DAB_EEP               1            // DAB equal error protection
-
-// DAB data extraction mode
-enum DtDabExtractionMode
-{
-    DAB_RAW,                        // Raw DAB stream, no extraction
-    DAB_EXTRACTION_AAC,             // AAC/DAB+ stream extraction 
-    DAB_EXTRACTION_DMB              // DMB stream extraction
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDabEtiStreamSelPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Structure for DAB Ensemble Transport Interface (ETI) selection
-//
-struct DtDabEtiStreamSelPars
-{
-    // No selection parameters yet
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDabStreamSelPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Structure for DAB selection
-//
-struct DtDabStreamSelPars
-{
-    int  m_BitrateKbps;             // Bitrate in kbps
-    int  m_ErrProtLevel;            // Error protection level: 1..5 (UEP); 1..4 (EEP)
-    int  m_ErrProtMode;             // Error protection mode: DTAPI_DAB_UEP/EEP
-    int  m_ErrProtOption;           // Error protection option (EEP only): 0 or 1
-    int  m_StartAddress;            // Start address in DAB capacity units (64bits)
-
-    // DAB data extraction mode: DAB_RAW, DAB_EXTRACTION_AAC or DAB_EXTRACTION_DMB
-    DtDabExtractionMode  m_ExtractionMode;
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDabFicStreamSelPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Selection parameters for a DAB Fast Information Channel (FIC)
-//
-struct DtDabFicStreamSelPars
-{
-    // Parameters below are passed in the WriteStreamFunc() callback function;
-    // the parameters are not used for selection
-    int  m_CifIndex;                // Index of the CIF in the DAB frame to which this
-                                    // FIB is associated
-    int  m_FibIndex;                // Index of this FIB in the group of FIBs that 
-                                    // are associated to the same CIF
-};
-
-// Forward declarations
-struct DtDabService;
-struct DtDabSubChannel;
-struct DtDabServiceComp;
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDabEnsembleInfo -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Information about a DAB ensemble
-//
-struct DtDabEnsembleInfo
-{
-    int  m_CountryId;               // Country identifier
-    int  m_EnsembleReference;       // Indentifier of this ensemble in national area
-    int  m_ExtCountryCode;          // Extended country code
-    int  m_InterTableId;            // International table identifier
-    std::wstring  m_Label;          // Label identifying this ensemble
-    int  m_LocalTimeOffset;         // Local time offset in half hours from UTC
-    int  m_LtoUnique;               // Covers one(=0) or several(=1) time zones
-    int  m_TransmissionMode;        // Transmission mode: 1..4
-
-    // Services contained in this ensemble
-    std::vector<DtDabService>  m_Services;
-
-    // Subchannels in this ensemble. Key: subchannel identifier
-    std::map<int, DtDabSubChannel>  m_SubChannels;
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDabService -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Information about a single service. Every service must have one primary service
-// component and can have one or more non-primay service components
-//
-struct DtDabService
-{
-    int  m_CondAccessId;            // Conditional access identifier
-    int  m_CountryId;               // Country identifier
-    int  m_ExtCountryCode;          // Extended country code; -1 for program service
-    bool  m_IsLocal;                // True if local (partial) ensemble service area
-    std::wstring  m_Label;          // Label identifying this service 
-    int  m_ServiceReference;        // Identifier of the service
-
-    // Components in this service
-    std::vector<DtDabServiceComp>  m_Components;
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDabServiceComp -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Information about a single DAB service component
-//
-struct DtDabServiceComp
-{
-    int  m_AudioServiceCompType;    // Audio service component type; -1 if not applicable
-    int  m_DataServiceCompType;     // Data service component type; -1 if not applicable
-    int  m_FidChannelId;            // Fast information data channel identifier 0..63;
-                                    // -1 if not applicable
-    bool  m_HasCondAccess;          // True if access control applies
-    bool  m_IsPrimary;              // True if this is the primary component
-    std::wstring  m_Label;          // Label identifying this service component
-    int  m_Language;                // Service compoment language or -1
-    int  m_SubChannelId;            // Subchannel identifier: 0..63; -1 if not applicable
-    int  m_ServiceCompId;           // Service component identifier; -1 if not applicable
-    int  m_TransportMechanismId;    // Transport mechanism identifier
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDabSubChannel -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// A DAB subchannel contains the data for a single audio or data stream. Every service
-// component refers to a subchannel, but multiple service components can refer to the
-// same subchannel. In that case more than one service can use the same audio stream.
-//
-struct DtDabSubChannel
-{
-    int  m_BitrateKbps;             // Bitrate in kbps
-    int  m_ErrProtLevel;            // Protection level UEP: 1..5; EEP: 1..4
-    int  m_ErrProtMode;             // Error protection mode: DTAPI_DAB_UEP/EEP
-    int  m_ErrProtOption;           // Option for EEP; -1 for UEP
-    int  m_FecScheme;               // FEC scheme; -1 if not applicable
-    int  m_StartAddress;            // Start address in capacity units (64bits)
-    int  m_SubChannelId;            // Subchannel identifier: 0..63
-    int  m_SubChannelSize;          // Size of subchannel in capacity units (64bits)
-    int  m_UepTableIndex;           // Index in UEP table; -1 if not applicable
-    int  m_UepTableSwitch;          // UEP table switch; -1 if not applicable
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDabTransmitterId -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-struct DtDabTransmitterId
-{
-    int  m_TxMainId;                // Transmitter main identifier; 
-                                    // 0...5 (for transmission mode 3) otherwise 0...69
-    int  m_TxSubId;                 // Transmitter sub-identifier; 0...23
-    double  m_RelativePowerdB;;     // Transmitter power, relative to total power
-};
-
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDabTransmitterIdInfo -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Information about a DAB transmitter identification
-//
-struct DtDabTransmitterIdInfo
-{
-    std::vector<DtDabTransmitterId>  m_Transmitters;
-};
-
-//=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ DVB-C2 Parameters +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
-
-// Maxima
-#define DTAPI_DVBC2_NUM_DSLICE_MAX  255          // Maximum number of data slices
-#define DTAPI_DVBC2_NUM_PLP_MAX     255          // Maximum number of PLPs
-#define DTAPI_DVBC2_NUM_NOTCH_MAX   16           // Maximum number of Notches
-
-// PLP IDs
-#define DTAPI_DVBC2_PLP_ID_NONE     -1           // No PLP selected
-#define DTAPI_DVBC2_PLP_ID_AUTO     -2           // Automatic PLP selection
-
-// Data slice IDs
-#define DTAPI_DVBC2_DSLICE_ID_AUTO  -2           //  Automatic data slice selection
-
-// m_Bandwidth
-#define DTAPI_DVBC2_6MHZ            6            // 6 MHz
-#define DTAPI_DVBC2_8MHZ            8            // 8 MHz
-
-// m_Guard - Guard interval
-#define DTAPI_DVBC2_GI_1_128        0            // 1/128
-#define DTAPI_DVBC2_GI_1_64         1            // 1/64
-
-// m_L1TiMode - L1 time interleaving mode
-#define DTAPI_DVBC2_L1TIMODE_NONE   0            // No time interleaving
-#define DTAPI_DVBC2_L1TIMODE_BEST   1            // Best fit
-#define DTAPI_DVBC2_L1TIMODE_4      2            // 4 OFDM symbols 
-#define DTAPI_DVBC2_L1TIMODE_8      3            // 8 OFDM symbols 
-
-// m_Type - PLP type
-#define DTAPI_DVBC2_PLP_TYPE_COMMON 0            // Common PLP
-#define DTAPI_DVBC2_PLP_TYPE_GROUPED 1           // Grouped Data PLP
-#define DTAPI_DVBC2_PLP_TYPE_NORMAL 2            // Normal Data PLP
-
-// m_FecType - PLP FEC type
-#define DTAPI_DVBC2_LDPC_16K        0            // 16K LDPC
-#define DTAPI_DVBC2_LDPC_64K        1            // 64K LDPC
-
-// m_CodeRate - PLP code rate
-#define DTAPI_DVBC2_COD_2_3         1            // 2/3
-#define DTAPI_DVBC2_COD_3_4         2            // 3/4
-#define DTAPI_DVBC2_COD_4_5         3            // 4/5
-#define DTAPI_DVBC2_COD_5_6         4            // 5/6
-#define DTAPI_DVBC2_COD_8_9         5            // 8/9 (For 16K FEC)
-#define DTAPI_DVBC2_COD_9_10        5            // 9/10 (For 64K FEC)
-
-// m_Modulation - PLP constellation
-#define DTAPI_DVBC2_QAM16           1            // 16-QAM
-#define DTAPI_DVBC2_QAM64           2            // 64-QAM
-#define DTAPI_DVBC2_QAM256          3            // 256-QAM
-#define DTAPI_DVBC2_QAM1024         4            // 1024-QAM
-#define DTAPI_DVBC2_QAM4096         5            // 4096-QAM
-#define DTAPI_DVBC2_QAM16384        6            // 16K-QAM non standard, but supported
-#define DTAPI_DVBC2_QAM65536        7            // 64K-QAM non standard, but supported
-
-// m_C2Version - DVB-C2 specification version
-#define DTAPI_DVBC2_VERSION_1_2_1   0            // DVB-C2 version 1.2.1
-#define DTAPI_DVBC2_VERSION_1_3_1   1            // DVB-C2 version 1.3.1
-// m_Issy - PLP ISSY
-#define DTAPI_DVBC2_ISSY_NONE       0            // No ISSY field is used
-#define DTAPI_DVBC2_ISSY_SHORT      1            // 2 byte ISSY field is used
-#define DTAPI_DVBC2_ISSY_LONG       2            // 3 byte ISSY field is used
-
-// m_TiDepth - Data slice time interleaving depth
-#define DTAPI_DVBC2_TIDEPTH_NONE    0            // No time interleaving
-#define DTAPI_DVBC2_TIDEPTH_4       1            // 4 OFDM symbols 
-#define DTAPI_DVBC2_TIDEPTH_8       2            // 8 OFDM symbols 
-#define DTAPI_DVBC2_TIDEPTH_16      3            // 16 OFDM symbols 
-
-// m_Type - Data slice type
-#define DTAPI_DVBC2_DSLICE_TYPE_1   0            // Type 1 (Single PLP and fixed mod/cod)
-#define DTAPI_DVBC2_DSLICE_TYPE_2   1            // Type 2 
-
-// m_FecHdrType - Data slice FEC frame header type
-#define DTAPI_DVBC2_FECHDR_TYPE_ROBUST 0         // Robust mode
-#define DTAPI_DVBC2_FECHDR_TYPE_HEM 1            // High efficiency mode
-
-// DVB-C2 Test points
-enum {
-    DTAPI_DVBC2_TP07,               // FEC frame
-    DTAPI_DVBC2_TP08,
-    DTAPI_DVBC2_TP10,
-    DTAPI_DVBC2_TP13,
-    DTAPI_DVBC2_TP15,               // Data slice
-    DTAPI_DVBC2_TP18,               // OFDM output
-    DTAPI_DVBC2_TP20,
-    DTAPI_DVBC2_TP22,               // FEC header
-    DTAPI_DVBC2_TP26,
-    DTAPI_DVBC2_TP27,               // L1 header
-    DTAPI_DVBC2_TP31,
-    DTAPI_DVBC2_TP32,               // L1 part2 data
-    DTAPI_DVBC2_TP33,               // L1 part2 + padding & CRC
-    DTAPI_DVBC2_TP37,
-    DTAPI_DVBC2_TP40,
-    DTAPI_DVBC2_TP41,
-    DTAPI_DVBC2_TP42,
-    DTAPI_DVBC2_TP01,
-    DTAPI_DVBC2_TP_COUNT,
-};
-
-// DVB-C2 test points
-extern const int DTAPI_DVBC2_TESTPOINTS[DTAPI_DVBC2_TP_COUNT];
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbC2DSlicePars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Class for specifying the data slice parameters
-//
-struct DtDvbC2DSlicePars
-{
-    int  m_Id;                      // Data slice ID. 0..255
-    int  m_TunePosition;            // Tune position relative to the start frequency in 
-                                    // multiples of pilot carrier spacing.
-                                    // For guard interval 1/128: 0..8191 
-                                    // For guard interval 1/64: 0..16383 
-    int  m_OffsetLeft;              // Offset left in multiples of pilot carrier spacing.
-                                    // For guard interval 1/128: -128..127 
-                                    // For guard interval 1/64: -256..255 
-    int  m_OffsetRight;             // Offset right in multiples of pilot carrier spacing.
-                                    // For guard interval 1/128: -128..127 
-                                    // For guard interval 1/64: -256..255 
-                                    // If m_OffsetLeft = m_OffsetRight, the data slice is
-                                    // empty and no input streams are created for the PLPs
-                                    // of the data slice.
-    int  m_TiDepth;                 // Time interleaving depth. See DTAPI_DVBC2_TIDEPTH_x
-    int  m_Type;                    // Data slice type. See DTAPI_DVBC2_DSLICE_TYPE_x
-    int  m_FecHdrType;              // FEC header type. See DTAPI_DVBC2_FECHDR_TYPE_x 
-    bool  m_ConstConfig;            // Constant data slice configuration
-    bool  m_LeftNotch;              // Left notch present
-    
-    // Data per PLP
-    std::vector<DtDvbC2PlpPars>  m_Plps;
-
-public:
-    void  Init(int Id=0);
-    bool  IsEqual(DtDvbC2DSlicePars& DSlicePars);
-    bool  operator == (DtDvbC2DSlicePars& DSlicePars);
-    bool  operator != (DtDvbC2DSlicePars& DSlicePars);
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbC2L1UpdatePlpPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// struct for L1 PLP parameter update support
-//
-struct DtDvbC2L1UpdatePlpPars 
-{
-    bool  m_Enable;                 // Enable or disable the PLP.
-                                    // Only PLPs with m_NoData = true can be disabled.
-public:
-    void  Init();
-    bool  IsEqual(DtDvbC2L1UpdatePlpPars& PlpUpdatePars);
-    bool  operator == (DtDvbC2L1UpdatePlpPars& PlpUpdatePars);
-    bool  operator != (DtDvbC2L1UpdatePlpPars& PlpUpdatePars);
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbC2L1UpdateDSlicePars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// struct for L1 DSlice parameter update support
-//
-struct DtDvbC2L1UpdateDSlicePars
-{
-    bool  m_Enable;                 // Enable or disable the DSlice.
-                                    // Only dummy data slices can be disabled. 
-                                    // A data slice is considered as dummy if either:
-                                    // - m_OffsetLeft == m_OffsetRight in its 
-                                    //   global configuration; or
-                                    // - all its PLPs have m_NoData = true
-                                    // A dummy data slice is modulated with dummy data.
-
-    int  m_OffsetLeft;              // Data slice left offset - 0..2^(8+g)-1
-    int  m_OffsetRight;             // Data slice right offset - 0..2^(8+g)-1
-                                    // If the data slice is not dummy:
-                                    // - For type 1 , no size change is accepted.
-                                    // - For type 2 , size change is accepted 
-                                    //   provided it is not zero (i.e. m_OffsetRight >
-                                    // m_OffsetLeft). It is up to the user to ensure that
-                                    // there is no bitrate overflow.
-    std::vector<DtDvbC2L1UpdatePlpPars>  m_Plps; // L1 PLP updates
-
-public:
-    void  Init();
-    bool  IsEqual(DtDvbC2L1UpdateDSlicePars& DSliceUpdatePars);
-    bool  operator == (DtDvbC2L1UpdateDSlicePars& DSliceUpdatePars);
-    bool  operator != (DtDvbC2L1UpdateDSlicePars& DSliceUpdatePars);
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbC2L1UpdatePars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// L1 update support
-//
-struct DtDvbC2L1UpdatePars
-{
-    int  m_NumFrames;               // The following parameters are used during
-                                    // 'm_NumFrames' C2 frames
-    // L1 DSlice updates
-    std::vector<DtDvbC2L1UpdateDSlicePars>  m_DSlices;
-    bool m_EarlyWarningSystem;		// Early warning system
-
-public:
-    void  Init();
-    bool  IsEqual(DtDvbC2L1UpdatePars& L1UpdatePars);
-    bool  operator == (DtDvbC2L1UpdatePars& L1UpdatePars);
-    bool  operator != (DtDvbC2L1UpdatePars& L1UpdatePars);
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbC2ModStatus -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Structure for retrieving the DVB-C2 MPLP modulator status
-//
-struct DtDvbC2ModStatus
-{
-    int  m_MplpModFlags;            // Multi PLP modulator flags
-    __int64  m_DjbOverflows;        // Count number of DJB overflows. If it happens,
-                                    // issy output delay must be decreased or "issy bufs"
-                                    // increased.
-    __int64  m_DjbUnderflows;       // Count number of DJB underflows. If it happens,
-                                    // issy output delay must be increased.
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbC2NotchPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Class for specifying the notch parameters
-//
-struct DtDvbC2NotchPars
-{
-    int  m_Start;                   // Notch start in multiples of pilot carrier spacing.
-                                    // For guard interval 1/128: 0..8191 
-                                    // For guard interval 1/64: 0..16383 
-    int  m_Width;                   // Notch width in multiples of pilot carrier spacing.
-                                    // For guard interval 1/128: 0..255 
-                                    // For guard interval 1/64: 0..511 
-public:
-    void  Init(void);
-    bool  IsEqual(DtDvbC2NotchPars& NotchPars);
-    bool  operator == (DtDvbC2NotchPars& NotchPars);
-    bool  operator != (DtDvbC2NotchPars& NotchPars);
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbC2PaprPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Class for specifying and enabling the PAPR reduction parameters
-//
-struct DtDvbC2PaprPars
-{
-    bool  m_TrEnabled;              // TR enabled
-    double  m_TrVclip;              // TR clipping threshold 1..4.32 (Volt)
-    int  m_TrMaxIter;               // TR maximum number of iterations. Must be >= 1.
-                                    // Note: PAPR TR processing time is proportional
-                                    //       to this parameter
-public:
-    void  Init(void);
-    bool  IsEqual(DtDvbC2PaprPars& PaprPars);
-    bool  operator == (DtDvbC2PaprPars& PaprPars);
-    bool  operator != (DtDvbC2PaprPars& PaprPars);
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbC2ParamInfo -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// DVB-C2 parameter info
-//
-struct DtDvbC2ParamInfo 
-{
-    int  m_L1Part2Length;           // #bits of the L1 part2 data (including CRC)
-    int  m_NumL1Symbols;            // Number of L1 symbols (LP)
-    int  m_NumSymbols;              // Total number of symbols per frame (LP + Ldata)
-    int  m_PilotSpacing;            // Distance between pilots (Dx)
-    int  m_FftSize;                 // FFT size
-    int  m_MinCarrierOffset;        // Lowest used carrier offset (Koffset)
-    int  m_CenterFrequency;         // Center frequency in multiples of the carrier 
-                                    // spacing
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbC2PlpPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Class for specifying the parameters of a PLP.
-// In case of bundled PLPs, only the mode adaptation parameters from the 
-// first PLP of the bundle are used.
-//
-struct DtDvbC2PlpPars
-{
-    bool  m_Hem;                    // High Efficiency Mode
-    bool  m_Npd;                    // Null Packet Deletion
-    int  m_Issy;                    // Issy mode. See DTAPI_DVBC2_ISSY_x
-    int  m_IssyBufs;                // Issy BUFS
-    int  m_IssyOutputDelay;         // Delay (in T units) between the incoming data and
-                                    // the output TS in the receiver model. This value 
-                                    // determines the minimum and maximum dejitter buffer
-                                    // usage and is used to compute the ISSY BUFSTAT field
-    int  m_TsRate;                  // If 0 the rate is computed from the PLP parameters,
-                                    // only possible in case of single PLP and no ISSY 
-                                    // is used
-    int  m_Ccm;                     // ACM/CMM bit in the BBframe header 0 or 1
-    int  m_Id;                      // PLP ID. 0..255
-    bool  m_Bundled;                // A bundled PLP can appear in several data slices. 
-                                    // All the PLP instances have the same PLP ID.
-                                    // Only a single input stream results from the 
-                                    // first PLP of the bundle.
-    int  m_Type;                    // PLP Type. See DTAPI_DVBC2_PLP_TYPE_x
-    int  m_GroupId;                 // Group ID. 0..255
-    int  m_FecType;                 // FEC Type. 0=16K, 1=64K
-    int  m_CodeRate;                // PLP Code rate. See DTAPI_DVBC2_COD_x
-    int  m_Modulation;              // PLP Modulation. See DTAPI_DVBC2_x
-    int  m_HdrCntr;                 // Header counter #FECFrames following the 
-                                    // FECFrame header. 0=1FF 1=2FF.
-                                    // Only used for DSlice type 2.
-
-    // ACM test mode. Only available for type 2 data slices. If number ACM headers != 0, 
-    // then the successive XFEC frames of this PLP use the modulation and coding 
-    // parameters taken from the m_AcmHeaders array. After the last value is used, it
-    // loops again to the start of the array.
-    // So DtDvbC2PlpPars.m_FecType, m_Modulation, m_CodeRate and m_HdrCntr are ignored.
-    std::vector<DtDvbC2XFecFrameHeader> m_AcmHeaders;
-
-    bool  m_PsiSiReproc;            // Indicates whether PSI/SI reprocessing is performed
-    int  m_TsId;                    // Transport Stream ID (if m_PsiSiReproc=false)
-    int  m_OnwId;                   // Original Network ID (if m_PsiSiReproc=false)
-    bool  m_NoData;                 // No input data is provided for this PLP. 
-                                    // It is implicitely true for all PLPs in a data slice 
-                                    // with m_OffsetLeft = m_OffsetRight
-public:
-    void  Init(int PlpId = 0);
-    bool  IsEqual(DtDvbC2PlpPars& PlpPars);
-    bool  operator == (DtDvbC2PlpPars& PlpPars);
-    bool  operator != (DtDvbC2PlpPars& PlpPars);
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbC2XFecFrameHeader -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// DVBC2 FEC frame header for ACM test
-//
-struct DtDvbC2XFecFrameHeader
-{
-    int  m_FecType;                 // PLP FEC Type. 0=16K, 1=64K
-    int  m_Modulation;              // PLP Modulation. See DTAPI_DVBC2_x
-    int  m_CodeRate;                // PLP Code rate. See DTAPI_DVBC2_COD_x
-    int  m_HdrCntr;                 // Header counter #FEC frames following the 
-                                    // FEC frame header. 0=1FF, 1=2FF
-    int  m_XFecFrameCount;          // 1..256: Number of successive XFEC frames using 
-                                    // these parameters
-public:
-    void  Init(void);
-    bool  IsEqual(DtDvbC2XFecFrameHeader& FecHeader);
-    bool  operator == (DtDvbC2XFecFrameHeader& FecHeader);
-    bool  operator != (DtDvbC2XFecFrameHeader& FecHeader);
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbC2Pars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Class for specifying the DVB-C2 modulation parameters
-//
- struct DtDvbC2Pars
-{
-public:
-    // General C2 parameters
-    int  m_Bandwidth;               // Bandwidth. Defines the OFDM carrier spacing 
-                                    // F=8e6*bandwidth/7/4096 Hz. See DVBC2_BW_x
-    int  m_NetworkId;               // Network ID.  0..0xFFFF
-    int  m_C2SystemId;              // C2 System ID.  0..0xFFFF
-    int  m_StartFrequency;          // Start frequency in multiple of carrier spacing
-                                    // 0..2^24 - 1 and multiples of dx. 
-                                    // For guard interval 1/128 dx=24, otherwise dx=12
-    int  m_C2Bandwidth;             // Bandwidth of the generated signal in 
-                                    // multiples of pilot carrier spacing. 0..65535
-    int  m_GuardInterval;           // Guard interval See DVBC2_GI_x
-    bool  m_ReservedTone;           // Reserved tone. When there are reserved carriers
-                                    // (e.g. PAPR TR is enabled) it shall be set to true; 
-                                    // otherwise false
-    bool m_EarlyWarningSystem;		// Early warning system
-    int  m_C2Version;               // DVB-C2 Version
-    int  m_L1TiMode;                // L1 time interleaving mode. See DVBC2_L1TIMODE_x
-
-    // Data slices parameters
-    int  m_NumDSlices;              // Number of data slices
-    DtDvbC2DSlicePars  m_DSlices[DTAPI_DVBC2_NUM_DSLICE_MAX];
-
-    // Notches
-    int  m_NumNotches;              // Number of notches
-    DtDvbC2NotchPars  m_Notches[DTAPI_DVBC2_NUM_NOTCH_MAX];
-    
-    // PLP input
-    int  m_NumPlpInputs;            // Number of PLPs
-    DtPlpInpPars  m_PlpInputs[DTAPI_DVBC2_NUM_PLP_MAX];  // PLP inputs (Optional)
-
-    DtDvbC2PaprPars  m_PaprPars;    // PAPR Params (Optional)
-    DtVirtualOutPars  m_VirtOutput; // Virtual Output parameters(Optional) 
-    DtTestPointOutPars  m_TpOutput; // Test point data output parameters (Optional)
-    int  m_OutpFreqOffset;          // Output frequency offset from 'm_StartFrequency'
-                                    // in carriers of the generated spectrum. 
-                                    // Must be multiple of dx.
-    int  m_OutpBandwidth;           // Output bandwidth in carriers and a multiple of dx.
-                                    // 0 means default output bandwidth.  
-                                    // Note: for convenience, one more carrier is output
-                                    // if an edge carrier needs to be output.
-
-    std::vector<DtDvbC2L1UpdatePars>  m_L1Updates; // L1 updates
-
-    // Undocumented
-    int  m_L1P2ChangeCtr;           // Undocumented. For internal use only
-    bool  m_NotchTestEnable;        // Undocumented. For internal use only
-    int  m_TimeWindowLength;        // Undocumented. For internal use only
-
-public:
-    DTAPI_RESULT  CheckValidity(void);
-    DTAPI_RESULT  GetParamInfo(DtDvbC2ParamInfo& C2Info);
-    void  Init(void);
-    bool  IsEqual(DtDvbC2Pars& C2Pars);
-    bool  operator == (DtDvbC2Pars& C2Pars);
-    bool  operator != (DtDvbC2Pars& C2Pars);
-};
- 
-//+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ DVB-C2 Demodulation  +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
-
-// DtDvbC2DemodL1Part2Plp::m_PayloadType - The PLP payload type
-#define DTAPI_DVBC2_PAYLOAD_GFPS    0            // Generic fixed-length packetized stream
-#define DTAPI_DVBC2_PAYLOAD_GCS     1            // Generic continuous stream
-#define DTAPI_DVBC2_PAYLOAD_GSE     2            // Generic stream encapsulation
-#define DTAPI_DVBC2_PAYLOAD_TS      3            // Transport Stream
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbC2DemodL1PlpSigDataPlp -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
- //
-// Struct for storing layer 1 PLP signalling information per PLP.
-// For type 1 data slices this struct contains the PLP-signalling information
-// from the layer 1 part 2 signalling.
-// For type 2 data slices this struct contains the PLP-signalling information
-// from the layer 1 part 1 (=FEC-frame header).
-//
-struct DtDvbC2DemodL1PlpSigDataPlp
-{
-    int  m_Id;                      // PLP ID: 0..255
-    int  m_FecType;                 // PLP FEC type: 0=LDPC 16K, 1=LDPC 64K
-    int  m_Modulation;              // PLP modulation, see DTAPI_DVBC2_x
-    int  m_CodeRate;                // PLP modulation, see DTAPI_DVBC2_x
-    int  m_HdrCntr;                 // Header counter #FEC frames following the 
-                                    // FEC frame header. 0=1FF, 1=2FF. Only present for
-                                    // type 2 data slices
-
-    DtDvbC2DemodL1PlpSigDataPlp();
-
-    // Serialisation
-    DTAPI_RESULT  FromXml(const std::wstring& XmlString);
-    DTAPI_RESULT  ToXml(std::wstring& XmlString);
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbC2DemodL1PlpSigData -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Struct for storing the DVB-C2 layer 1 PLP signalling data
-//
-struct DtDvbC2DemodL1PlpSigData
-{
-    int  m_NumPlps;                 // Number of PLPs
-    std::vector<DtDvbC2DemodL1PlpSigDataPlp>  m_Plps;
-
-    DtDvbC2DemodL1PlpSigData();
-    
-    // Serialisation
-    DTAPI_RESULT  FromXml(const std::wstring& XmlString);
-    DTAPI_RESULT  ToXml(std::wstring& XmlString);
-
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbC2DemodL1Part2Plp -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Struct for storing Layer 1 part 2 information per PLP
-//
-struct DtDvbC2DemodL1Part2Plp
-{
-    int  m_Id;                      // PLP ID: 0..255
-    int  m_Bundled;                 // Bundled PLP
-    int  m_Type;                    // PLP type, see DTAPI_DVBC2_PLP_TYPE_x
-    int  m_PayloadType;             // PLP payload type: 0..3
-    int  m_GroupId;                 // Group ID: 0..255
-    // Start, FecType, Modulation and CodeRate parameters are not present for type 2 data 
-    // slices
-    int  m_Start;                   // PLP start: Start of the first complete XFECframe
-    int  m_FecType;                 // PLP FEC type: 0=LDPC 16K, 1=LDPC 64K
-    int  m_Modulation;              // PLP modulation, see DTAPI_DVBC2_x
-    int  m_CodeRate;                // PLP modulation, see DTAPI_DVBC2_x
-    int  m_PsiSiReproc;             // Indicates whether PSI/SI reprocessing is performed
-    int  m_TsId;                    // Transport Stream ID (if m_PsiSiReproc=false)
-    int  m_OnwId;                   // Original Network ID (if m_PsiSiReproc=false)
- 
-    DtDvbC2DemodL1Part2Plp();
-
-    // Serialisation
-    DTAPI_RESULT  FromXml(const std::wstring& XmlString);
-    DTAPI_RESULT  ToXml(std::wstring& XmlString);
-};
- 
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbC2DemodL1Part2DSlice -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Struct for storing Layer 1 part 2 information per data slice
-//
-struct DtDvbC2DemodL1Part2DSlice 
-{
-    int  m_Id;                      // Data slice ID: 0..255
-    int  m_TunePosition;            // Tune position relative to the start frequency in 
-                                    // multiples of pilot carrier spacing.
-                                    // For guard interval 1/128: 0..8191 
-                                    // For guard interval 1/64: 0..16383 
-    int  m_OffsetLeft;              // Offset left in multiples of pilot carrier spacing.
-                                    // For guard interval 1/128: -128..127 
-                                    // For guard interval 1/64: -256..255 
-    int  m_OffsetRight;             // Offset right in multiples of pilot carrier spacing.
-                                    // For guard interval 1/128: -128..127 
-                                    // For guard interval 1/64: -256..255 
-                                    // If m_OffsetLeft = m_OffsetRight, the data slice is
-                                    // empty and no input streams are created for the PLPs
-                                    // of the data slice.
-    int  m_TiDepth;                 // Time interleaving depth, see DTAPI_DVBC2_TIDEPTH_x
-    int  m_Type;                    // Data slice type, see DTAPI_DVBC2_DSLICE_TYPE_x
-    int  m_FecHdrType;              // FEC header type, see DTAPI_DVBC2_FECHDR_TYPE_x 
-    int  m_ConstConfig;             // Constant data slice configuration flag
-    int  m_LeftNotch;               // Left notch present flag
-    // PLPs
-    int  m_NumPlps;                 // Number of PLPs
-    std::vector<DtDvbC2DemodL1Part2Plp>  m_Plps;
-
-    DtDvbC2DemodL1Part2DSlice();
-
-    // Serialisation
-    DTAPI_RESULT  FromXml(const std::wstring& XmlString);
-    DTAPI_RESULT  ToXml(std::wstring& XmlString);
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbC2DemodL1Part2Data -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Struct for storing the DVB-C2 layer 1 part 2data
-//
-struct DtDvbC2DemodL1Part2Data
-{
-    int  m_NetworkId;               // Network ID:  0..0xFFFF
-    int  m_C2SystemId;              // C2 System ID: 0..0xFFFF
-    int  m_StartFrequency;          // Start frequency in multiple of carrier spacing:
-                                    // 0..2^24 - 1
-    int  m_C2Bandwidth;             // Bandwidth of the generated signal in 
-                                    // multiples of pilot carrier spacing: 0..65535
-    int  m_GuardInterval;           // Guard interval. See DVBC2_GI_x
-    int  m_C2FrameLength;           // C2 frame length: #Data symbols per C2 frame
-    int  m_L1P2ChangeCtr;           // Value of the L1_PART2_CHANGE_COUNTER field
-    int  m_ReservedTone;            // Reserved tone
-    bool m_EarlyWarningSystem;		// Early warning system
-    int  m_C2Version;               // DVB-C2 Version
-
-    // Data slices
-    int  m_NumDSlices;              // Number of data slices
-    std::vector<DtDvbC2DemodL1Part2DSlice>  m_DSlices;
- 
-    // Notches
-    int  m_NumNotches;              // Number of notches
-    std::vector<DtDvbC2NotchPars>  m_Notches;
-
-    DtDvbC2DemodL1Part2Data();
-    
-    // Serialisation
-    DTAPI_RESULT  FromXml(const std::wstring& XmlString);
-    DTAPI_RESULT  ToXml(std::wstring& XmlString);
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbC2StreamSelPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Structure for DVB-C2 PLP-stream selection
-//
-struct DtDvbC2StreamSelPars
-{
-    int  m_DSliceId;                // ID of the data slice or DTAPI_DVBC2_DSLICE_ID_AUTO
-    int  m_PlpId;                   // ID of the data PLP or DTAPI_DVBC2_PLP_ID_xxx
-    int  m_CommonPlpId;             // ID of the common PLP or DTAPI_DVBC2_PLP_ID_xxx
-
-    // Serialisation
-    DTAPI_RESULT  FromXml(const std::wstring& XmlString);
-    DTAPI_RESULT  ToXml(std::wstring& XmlString);
-};
-
-//=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ DVB-S2 Parameters +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
-
-#define DTAPI_DVBS2_NUM_PLP_MAX     255          // Maximum number of PLPs
-
-// m_Issy - PLP ISSY
-#define DTAPI_DVBS2_ISSY_NONE       0            // No ISSY field is used
-#define DTAPI_DVBS2_ISSY_SHORT      1            // 2 byte ISSY field is used
-#define DTAPI_DVBS2_ISSY_LONG       2            // 3 byte ISSY field is used
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- struct DtDvbS2ModStatus -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-struct DtDvbS2ModStatus
-{
-    int  m_MplpModFlags;            // Multi PLP modulator flags
-    __int64  m_DjbOverflows;        // Count number of DJB overflows. If it happens,
-                                    // issy output delay must be decreased or "issy bufs"
-                                    // increased.
-    __int64  m_DjbUnderflows;       // Count number of DJB underflows. If it happens,
-                                    // issy output delay must be increased.
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.- struct DtDvbS2FecFrameHeader -.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-struct DtDvbS2FecFrameHeader
-{
-    int  m_Modulation;              // PLP Modulation. See DTAPI_MOD_DVBS2_*
-    int  m_CodeRate;                // PLP Code rate. See DTAPI_MOD_x
-    int  m_FecFrameSize;            // Fec frame size. See DTAPI_MOD_S2_*FRM
-    bool  m_HasPilots;              // Enable pilots
-    int  m_FecFrameCount;           // Number of successive FEC frames using these
-                                    // parameters, 0 means infinite.
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- struct DtDvbS2ModCod -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-struct DtDvbS2ModCod
-{
-    int  m_ModType;                 // Modulation type, e.g. DTAPI_MOD_DVBS_QPSK
-    int  m_CodeRate;                // Code rate, e.g. DTAPI_MOD_1_2
-    // Constructor
-    DtDvbS2ModCod();
-    DtDvbS2ModCod(int ModType, int CodeRate);
-    bool operator < (const DtDvbS2ModCod& ModCod) const;
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- struct DtDvbS2PlpPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-struct DtDvbS2PlpPars
-{
-    bool  m_Hem;                    // High Efficiency Mode
-    bool  m_Npd;                    // Null Packet Deletion
-    int  m_Issy;                    // Issy mode. See DTAPI_DVBS2_ISSY_x
-    int  m_IssyBufs;                // Issy BUFS
-    int  m_IssyOutputDelay;         // Delay (in T units) between the incoming data and
-                                    // the output TS in the receiver model. This value 
-                                    // determines the minimum and maximum dejitter buffer
-                                    // usage and is used to compute the ISSY BUFSTAT field
-    int  m_TsRate;                  // Ts rate
-    int  m_Ccm;                     // ACM/CMM bit in the BBframe header 0 or 1
-    int  m_Id;                      // PLP ID. 0..255
-
-    // One or more fec frame headers. If there is only 1 the m_FecFrameCount member
-    // is ignored. Otherwise that specifies the number of frames to generate with those
-    // parameters. When that number of frames are generated, the next set of parameters
-    // is taken. After the last DtDvbS2FecFrameHeader the first one is used again.
-    std::vector<DtDvbS2FecFrameHeader> m_AcmHeaders;
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- struct DtDvbS2Pars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-struct DtDvbS2Pars
-{
-    DtVirtualOutPars  m_VirtOutput; // Virtual-output parameters (Optional) 
-    bool  m_L3Output;               // Set to true to enable L3 output
-    int  m_SymRate;                 // Symbol rate
-    int  m_RollOff;                 // Roll-off DTAPI_MOD_ROLLOFF_xxx
-    
-    // Data per PLP
-    std::vector<DtDvbS2PlpPars>  m_Plps;
-    // PLP input
-    int  m_NumPlpInputs;            // Number of PLPs
-    DtPlpInpPars  m_PlpInputs[DTAPI_DVBS2_NUM_PLP_MAX];  // PLP inputs (Optional)
-
-    DtDvbS2Pars();
-    DTAPI_RESULT  CheckValidity();
-};
-
-//=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ DVB-T2 Parameters +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
-
-// Maxima
-#define DTAPI_DVBT2_NUM_PLP_MAX     255          // Maximum number of PLPs
-#define DTAPI_DVBT2_NUM_RF_MAX      7            // Maximum number of RF output signals
-
-// PLP IDs
-#define DTAPI_DVBT2_PLP_ID_NONE     -1           // No PLP selected
-#define DTAPI_DVBT2_PLP_ID_AUTO     -2           // Automatic PLP selection
-
-// m_Issy
-#define DTAPI_DVBT2_ISSY_NONE       0            // No ISSY field is used
-#define DTAPI_DVBT2_ISSY_SHORT      1            // 2-byte ISSY field is used
-#define DTAPI_DVBT2_ISSY_LONG       2            // 3-byte ISSY field is used
-
-// m_Bandwidth
-#define DTAPI_DVBT2_1_7MHZ          0            // 1.7 MHz
-#define DTAPI_DVBT2_5MHZ            1            // 5 MHz
-#define DTAPI_DVBT2_6MHZ            2            // 6 MHz
-#define DTAPI_DVBT2_7MHZ            3            // 7 MHz
-#define DTAPI_DVBT2_8MHZ            4            // 8 MHz
-#define DTAPI_DVBT2_10MHZ           5            // 10 MHz
-#define DTAPI_DVBT2_BW_UNK          -1           // Unknown bandwith
-#define DTAPI_DVBT2MI_BW_MSK        0xF          // Mask for T2MI ParXtra2
-#define DTAPI_DVBT2MI_BW_UNK        0xF          //Val in ParXtra2 if not set, map to 8MHz
-
-// m_FftMode
-// Warning: the codes are different from the corresponding L1 field
-#define DTAPI_DVBT2_FFT_1K          0            // 1K FFT
-#define DTAPI_DVBT2_FFT_2K          1            // 2K FFT
-#define DTAPI_DVBT2_FFT_4K          2            // 4K FFT
-#define DTAPI_DVBT2_FFT_8K          3            // 8K FFT
-#define DTAPI_DVBT2_FFT_16K         4            // 16K FFT
-#define DTAPI_DVBT2_FFT_32K         5            // 32K FFT
-#define DTAPI_DVBT2_FFT_UNK         -1           // Unknown FFT mode
-
-// m_Miso
-#define DTAPI_DVBT2_MISO_OFF        0            // No MISO
-#define DTAPI_DVBT2_MISO_TX1        1            // TX1 only
-#define DTAPI_DVBT2_MISO_TX2        2            // TX2 only
-#define DTAPI_DVBT2_MISO_TX1TX2     3            // TX1+TX2 Legacy
-#define DTAPI_DVBT2_MISO_SUM        3            // TX1+TX2
-#define DTAPI_DVBT2_MISO_BOTH       4            // TX1 and TX2
-
-// m_Guard - Guard interval
-// Warning: the codes are different from the corresponding L1 field
-#define DTAPI_DVBT2_GI_1_128        0            // 1/128
-#define DTAPI_DVBT2_GI_1_32         1            // 1/32
-#define DTAPI_DVBT2_GI_1_16         2            // 1/16
-#define DTAPI_DVBT2_GI_19_256       3            // 19/256
-#define DTAPI_DVBT2_GI_1_8          4            // 1/8
-#define DTAPI_DVBT2_GI_19_128       5            // 19/128
-#define DTAPI_DVBT2_GI_1_4          6            // 1/4
-#define DTAPI_DVBT2_GI_UNK          -1           // Unknown guard interval
-
-// m_Papr - PAPR - Peak to Average Power Reduction
-#define DTAPI_DVBT2_PAPR_NONE       0
-#define DTAPI_DVBT2_PAPR_ACE        1            // ACE - Active Constellation Extension
-#define DTAPI_DVBT2_PAPR_TR         2            // TR - PAPR using reserved carriers
-#define DTAPI_DVBT2_PAPR_ACE_TR     3            // ACE and TR
-
-// m_BwtExt - Bandwidth extension
-#define DTAPI_DVBT2_BWTEXT_OFF      false        // No bandwidth extension
-#define DTAPI_DVBT2_BWTEXT_ON       true         // Bandwidth extension on
-
-// m_PilotPattern
-// Warning: the codes are different from the corresponding L1 field
-#define DTAPI_DVBT2_PP_1            1            // PP1
-#define DTAPI_DVBT2_PP_2            2            // PP2
-#define DTAPI_DVBT2_PP_3            3            // PP3
-#define DTAPI_DVBT2_PP_4            4            // PP4
-#define DTAPI_DVBT2_PP_5            5            // PP5
-#define DTAPI_DVBT2_PP_6            6            // PP6
-#define DTAPI_DVBT2_PP_7            7            // PP7
-#define DTAPI_DVBT2_PP_8            8            // PP8
-
-// m_CodeRate - Code rate
-#define DTAPI_DVBT2_COD_1_2         0            // 1/2
-#define DTAPI_DVBT2_COD_3_5         1            // 3/5
-#define DTAPI_DVBT2_COD_2_3         2            // 2/3
-#define DTAPI_DVBT2_COD_3_4         3            // 3/4
-#define DTAPI_DVBT2_COD_4_5         4            // 4/5 not for T2 lite
-#define DTAPI_DVBT2_COD_5_6         5            // 5/6 not for T2 lite
-#define DTAPI_DVBT2_COD_1_3         6            // 1/3 only for T2 lite
-#define DTAPI_DVBT2_COD_2_5         7            // 2/5 only for T2 lite
-
-// m_FefSignal - Type of signal generated during the FEF period
-#define DTAPI_DVBT2_FEF_ZERO        0            // Use zero I/Q samples during FEF
-#define DTAPI_DVBT2_FEF_1K_OFDM     1            // 1K OFDM symbols with 852 active
-                                                 // carriers containing BPSK symbols
-                                                 // (same PRBS as the T2 dummy cells,
-                                                 // not reset between symbols)
-#define DTAPI_DVBT2_FEF_1K_OFDM_384 2            // 1K OFDM symbols with 384 active
-                                                 //  carriers containing BPSK symbols
-
-// m_PlpConstel and m_L1Constel - Modulation constellation
-#define DTAPI_DVBT2_BPSK            0            // BPSK
-#define DTAPI_DVBT2_QPSK            1            // QPSK
-#define DTAPI_DVBT2_QAM16           2            // 16-QAM
-#define DTAPI_DVBT2_QAM64           3            // 64-QAM
-#define DTAPI_DVBT2_QAM256          4            // 256-QAM
-
-// m_Type - PLP type
-#define DTAPI_DVBT2_PLP_TYPE_COMM   0            // Common PLP
-#define DTAPI_DVBT2_PLP_TYPE_1      1            // PLP type 1
-#define DTAPI_DVBT2_PLP_TYPE_2      2            // PLP type 2
-
-// m_FecType - PLP FEC type
-#define DTAPI_DVBT2_LDPC_16K        0            // 16K LDPC
-#define DTAPI_DVBT2_LDPC_64K        1            // 64K LDPC
-
-// m_TimeIlType - Time interleaving type
-#define DTAPI_DVBT2_IL_ONETOONE     0            // Interleaving frame in one T2 frame
-#define DTAPI_DVBT2_IL_MULTI        1            // Interleaving frame in multiple frames
-
-// m_TimeStamping - Type of timestamps in T2MI
-#define DTAPI_DVBT2MI_TIMESTAMP_NULL 0           // No timestamping
-#define DTAPI_DVBT2MI_TIMESTAMP_REL 1            // Relative timestamps. Use m_Subseconds
-#define DTAPI_DVBT2MI_TIMESTAMP_ABS 2            // Absolute timestamps. Use m_T2miUtco,
-                                                 // m_SecSince2000, m_Subseconds,
-
-// m_T2Version - DVB-T2 specification version
-#define DTAPI_DVBT2_VERSION_1_1_1   0            // DVB-T2 version 1.1.1
-#define DTAPI_DVBT2_VERSION_1_2_1   1            // DVB-T2 version 1.2.1
-#define DTAPI_DVBT2_VERSION_1_3_1   2            // DVB-T2 version 1.3.1
-
-// m_T2Profile - DVB-T2 profile
-#define DTAPI_DVBT2_PROFILE_BASE    0         
-#define DTAPI_DVBT2_PROFILE_LITE    1            // Requires DVB-T2 version 1.3.1
-
-// m_BiasBalancing
-#define DTAPI_DVBT2_BIAS_BAL_OFF    0            // No L1 bias compensation
-#define DTAPI_DVBT2_BIAS_BAL_ON     1            // Modify L1 reserved fields and L1 ext.
-                                                 // field padding to compensate L1 bias
-// m_GseLabelType - DVB-T2 GSE Label size
-#define DTAPI_DVBT2_GSE_LABEL_6BYTE 0           // 6 Byte GSE label
-#define DTAPI_DVBT2_GSE_LABEL_3BYTE 1           // 3 Byte GSE label
-#define DTAPI_DVBT2_GSE_LABEL_NONE  2           // No GSE label
-
-#define DTAPI_TXSIG_FEF_LEN_MIN  162212          // Min. FEF length for FEF TX sgnalling
-
-// DVB-T2 test point enum
-enum {
-    DTAPI_DVBT2_TP00,
-    DTAPI_DVBT2_TP01,
-    DTAPI_DVBT2_TP03,
-    DTAPI_DVBT2_TP04,
-    DTAPI_DVBT2_TP06,
-    DTAPI_DVBT2_TP08,
-    DTAPI_DVBT2_TP09,
-    DTAPI_DVBT2_TP11,
-    DTAPI_DVBT2_TP12,
-    DTAPI_DVBT2_TP15,
-    DTAPI_DVBT2_TP16,
-    DTAPI_DVBT2_TP19,               // Only usable if CFLOAT32 output format is selected
-    DTAPI_DVBT2_TP20,
-    DTAPI_DVBT2_TP21,
-    DTAPI_DVBT2_TP22,
-    DTAPI_DVBT2_TP23,
-    DTAPI_DVBT2_TP24,
-    DTAPI_DVBT2_TP25,
-    DTAPI_DVBT2_TP26,
-    DTAPI_DVBT2_TP27,
-    DTAPI_DVBT2_TP28,
-    DTAPI_DVBT2_TP29,
-    DTAPI_DVBT2_TP30,
-    DTAPI_DVBT2_TP32,
-    DTAPI_DVBT2_TP33,               // T2MI output
-    DTAPI_DVBT2_TP34,               // T2MI output
-
-    // Receiver Buffer Model
-    DTAPI_DVBT2_TP50,               // TDI size 
-    DTAPI_DVBT2_TP51,               // TDI write index, TDI read available
-    DTAPI_DVBT2_TP53,               // DJB size 
-    DTAPI_DVBT2_TP_COUNT,           // Number of test points
-};
-
-extern const int  DTAPI_DVBT2_TESTPOINTS[DTAPI_DVBT2_TP_COUNT];
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbT2AuxPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Class for specifying the parameters of AUX streams
-//
-struct DtDvbT2AuxPars
-{
-    int  m_NumDummyStreams;         // Number of dummy AUX streams
-
-public:
-    void  Init(void);
-    bool  IsEqual(DtDvbT2AuxPars& AuxPars);
-    bool  operator == (DtDvbT2AuxPars& AuxPars);
-    bool  operator != (DtDvbT2AuxPars& AuxPars);
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbT2MiPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Structure for specifying the parametes for T2MI output streams
-//
-struct DtDvbT2MiPars
-{
-    bool  m_Enabled;                // Enable T2MI output. If enabled, a T2MI
-                                    // Transport Stream is generated and output
-    int  m_Pid;                     // T2MI data PID
-    int  m_StreamId;                // stream ID for the first T2MI stream 
-    int  m_Pid2;                    // Second T2MI data PID
-    int  m_StreamId2;               // stream ID for the second T2MI stream
-    int  m_PcrPid;                  // PCR PID. If -1, no PCR is included otherwise
-                                    // PCRs are inserted on the specified PID
-    int  m_PmtPid;                  // PMT PID. If -1, no PMT-table and no PAT-table
-                                    // are included otherwise a PMT-table is inserted 
-                                    // on the specified PID
-    int  m_TsRate;                  // Rate in bps for the T2MI output
-    int  m_TimeStamping;            // T2MI timestamps: None, Absolute or Releative
-                                    // See DVBT2MI_TIMESTAMP_x
-    __int64  m_SecSince2000;        // First T2MI output timestamp value. Next values
-                                    // are computed
-    int  m_Subseconds;              // The number of subseconds. See T2MI spec table 4 
-    int  m_T2miUtco;                // Offset in seconds between UTC and m_SecSince2000.
-                                    // As of February 2009 the value shall be 2 and 
-                                    // shall change as a result of each new leap second.
-    bool  m_EncodeFef;              // If true, outputs a FEF part composite packet 
-                                    // with the required subpart. Otherwise, only 
-                                    // outputs a FEF part NULL packet when FEF is
-                                    // enabled.
-    bool  m_SyncWithExtClock;       // Undocumented. For internal use only.
-public:
-    void  Init(void);
-    bool  IsEqual(DtDvbT2MiPars& T2MiPars);
-    bool  operator == (DtDvbT2MiPars& T2MiPars);
-    bool  operator != (DtDvbT2MiPars& T2MiPars);
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbT2ModStatus -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Structure for retrieving the MPLP modulator status
-//
-struct DtDvbT2ModStatus
-{
-    int  m_MplpModFlags;            // Multi PLP modulator flags
-    // General MPLP status info
-    __int64  m_PlpNumBlocksOverflows;
-                                    // Counts the FEC frames for which the requested
-                                    // number of PLP blocks is bigger than NumBlocks
-                                    // (the receiver will get an invalid stream)
-    __int64  m_BitrateOverflows;    // Counts the frames in which too many bits were
-                                    // allocated (the receiver will get an invalid stream)
-    __int64  m_TtoErrorCount;       // Number of times the generated TTO value was
-                                    // invalid (typically from a too small T_design)
-    
-    // T2MI Specific status info
-    __int64  m_T2MiOutputRateOverFlows;
-                                    // Number of bit rate overflows(i.e. the T2MI output
-                                    // rate must be increased for reliable operation)
-    int  m_T2MiOutputRate;          // Current T2MI rate excluding null packets(in bps)
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbT2PaprPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Class for specifying and enabling the PAPR reduction parameters
-//
-struct DtDvbT2PaprPars
-{
-    bool  m_AceEnabled;             // ACE enabled
-    double  m_AceVclip;             // ACE clipping threshold 1..4.32 (Volt)
-    double  m_AceGain;              // ACE gain 0..31 (steps of 1)
-    double  m_AceLimit;             // ACE limit 0.7..1.4 (steps of 0.1) 
-    int  m_AceInterpFactor;         // ACE interpolation factor 1..4
-                                    // Note: PAPR ACE processing time is proportional
-                                    // to this parameter (1 recommended for realtime)
-    int  m_AcePlpIndex;             // PLP used for the PAPR ACE
-    bool  m_TrEnabled;              // TR enabled
-    bool  m_TrP2Only;               // PAPR TR is only applied on the P2 symbol
-    double  m_TrVclip;              // TR clipping threshold 1..4.32 (Volt)
-    int  m_TrMaxIter;               // TR maximum number of iterations. Must be >= 1
-                                    // Note: PAPR TR processing time is proportional
-                                    // to this parameter
-    int  m_L1ExtLength;             // L1 extension field length 0..65535
-    bool  m_L1AceEnabled;           // L1 ACE enabled
-    double  m_L1AceCMax;            // L1 ACE maximum constellation extension value
-    bool  m_L1Scrambling;           // L1 post scrabling (requires T2-version 1.3.1)
-
-    // Parameters below only apply if DVB-T2 V1.2.1 is selected
-    int  m_NumBiasBalCells;         // Dummy cells added to reduce the P2 PAPR
-                                    // 0..BiasBalancingCellsMax
-    int  m_BiasBalancing;           // Modify the L1 reserved fields and 
-                                    // L1 ext padding to compensate the L1 bias. 
-                                    // See DTAPI_DVBT2_BIAS_x
-    int  m_TrAlgorithm;             // Undocumented. Must be 1 (default)
-
-public:
-    void  Init(void);
-    bool  IsEqual(DtDvbT2PaprPars& PaprPars);
-    bool  operator == (DtDvbT2PaprPars& PaprPars);
-    bool  operator != (DtDvbT2PaprPars& PaprPars);
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbT2ParamInfo -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// DVB-T2 parameter info
-//
-struct DtDvbT2ParamInfo 
-{
-    int  m_TotalCellsPerFrame;      // Total number of cells per frame
-    int  m_L1CellsPerFrame;         // Total #cells per frame used for L1 signaling
-                                    // Overhead: m_L1CellsPerFrame/m_TotalCellsPerFrame
-    int  m_AuxCellsPerFrame;        // Total number of auxiliary stream cells per frame 
-                                    // (currently only used for TX signalling if enabled)
-    int  m_BiasBalCellsPerFrame;    // Total number of L1 bias balancing cells per frame
-    int  m_BiasBalCellsMax;         // Maximum number of L1 bias balancing cells per P2
-    int  m_DummyCellsPerFrame;      // Total number of cells lost per frame. Dummy cells
-                                    // overhead: m_DummyCellsPerFrame/m_TotalCellsPerFrame
-                                    // It is computed in case no NDP is used for frame 0.
-    int  m_SamplesPerFrame;         // Total number of samples per frame
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbT2PlpPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Class for specifying the parameters of a PLP
-//
-struct DtDvbT2PlpPars
-{
-    // Mode adaptation layer: TS input
-    bool  m_Hem;                    // High Efficiency Mode: yes/no
-    bool  m_Npd;                    // Null Packet Deletion: yes/no
-    int  m_Issy;                    // ISSY mode. See DTAPI_DVBT2_ISSY_XXX
-    int  m_IssyBufs;                // ISSY BUFS
-    int  m_IssyTDesign;             // T-design value for TTO generation. 
-                                    // Use 0 to have the modulator choose the value.
-                                    // T-design is defined as the delay (in samples)
-                                    // between the start of the first T2 frame in 
-                                    // which the PLP is mapped (m_FirstFrameIdx) and
-                                    // the first output bit of the transport stream.
-    int  m_CompensatingDelay;       // Additional delay (in samples) before the TS 
-                                    // data is sent. Use -1 to have the modulator 
-                                    // choose the value
-    int  m_TsRate;                  // If 0 the rate is computed from the PLP 
-                                    // parameters. Only possible if no NPD is used.
-    // Mode adaptation layer: GSE input
-    int  m_GseLabelType;            // GSE-label type. See DTAPI_DVBT2_GSE_LABEL_XXX
-
-    // DVB-T2 L1 parameters
-    int  m_Id;                      // PLP ID: 0..255
-    int  m_GroupId;                 // PLP group ID: 0..255
-    int  m_Type;                    // PLP type: DTAPI_DVBT2_PLP_TYPE_XXX
-    int  m_PayloadType;             // PLP payload type: DTAPI_DVBT2_PAYLOAD_XXX
-    int  m_CodeRate;                // PLP code rate: DTAPI_DVBT2_COD_XXX
-    int  m_Modulation;              // PLP modulation: DTAPI_DVBT2_BPSK/...
-    bool  m_Rotation;               // Constellation rotation: yes/no
-    int  m_FecType;                 // FEC Type. 0=16K, 1=64K; Must be 16K for T2 lite
-    int  m_FrameInterval;           // T2-frame interval for this PLP: 1..255
-    int  m_FirstFrameIdx;           // First frame index: 0..m_FrameInterval-1
-    int  m_TimeIlLength;            // Time interleaving length: 0..255
-    int  m_TimeIlType;              // Time interleaving type: DTAPI_DVBT2_IL_XXX
-    bool  m_InBandAFlag;            // In band A signaling information: yes/no
-    bool  m_InBandBFlag;            // In band B Signaling information: yes/no
-                                    // Only useful if DVB-T2 V1.2.1 is selected
-    int  m_NumBlocks;               // Maximum number of FEC blocks contained in
-                                    // one interleaving frame
-
-    // IDs of the other PLPs in the in-band signaling
-    int  m_NumOtherPlpInBand;       // Number of other PLPs in m_OtherPlpInBand
-    int  m_OtherPlpInBand[DTAPI_DVBT2_NUM_PLP_MAX-1];
-
-    // The parameters below are only meaningful for type 1 PLPs in TFS case
-    bool  m_FfFlag;                 // FF flag
-    int  m_FirstRfIdx;              // First TFS RF channel: 0..NumRf-1
-
-public:
-    void  Init(int PlpId = 0);
-    bool  IsEqual(DtDvbT2PlpPars& PlpPars);
-    bool  operator == (DtDvbT2PlpPars& PlpPars);
-    bool  operator != (DtDvbT2PlpPars& PlpPars);
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- RBM events -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// RBM events all are errors except plot
-//
-enum DtDvbT2RbmEventType 
-{
-    // Plot event (only generated if m_PlotEnabled is true)
-    DTAPI_DVBT2_RBM_EVENT_PLOT,
-    // Dejitter buffer underflow
-    DTAPI_DVBT2_RBM_EVENT_DJB_UNDERFLOW,
-    // BUFS=[m_Bufs] gives too small dejitter buffer
-    DTAPI_DVBT2_RBM_EVENT_BUFS_TOO_SMALL,
-    // TTO=[m_Tto] gives time in the past
-    DTAPI_DVBT2_RBM_EVENT_TTO_IN_THE_PAST,
-    // DJB overflow (should never happen except if the model is buggy) 
-    DTAPI_DVBT2_RBM_EVENT_DJB_OVERFLOW,
-    // BBFrame parser: CRC8 error in header (val=[m_Val]) 
-    DTAPI_DVBT2_RBM_EVENT_CRC8_ERROR_HEADER,
-    // BBFrame parser: DFL too large 
-    DTAPI_DVBT2_RBM_EVENT_DFL_TOO_LARGE,
-    // BBFrame parser: SYNCD too large (SYNCD=[m_SyncD] DFL=[m_Dfl]) 
-    DTAPI_DVBT2_RBM_EVENT_SYNCD_TOO_LARGE,
-    // BBFrame parser: invalid UPL 
-    DTAPI_DVBT2_RBM_EVENT_INVALID_UPL,
-    // BBFrame parser: invalid syncd (syncd=[m_SyncD] left=[m_Left]) 
-    DTAPI_DVBT2_RBM_EVENT_INVALID_SYNCD,
-    // TDI overflow: write pointer ([m_TdiWriteIndex]) ahead of 
-    // read pointer ([m_TdiReadIndex]) 
-    DTAPI_DVBT2_RBM_EVENT_TDI_OVERFLOW,
-    // TDI overflow: too many TI blocks queued  
-    DTAPI_DVBT2_RBM_EVENT_TOO_MANY_TI_BLOCKS,
-    // plp_start value gives overlap between PLP id=[m_PlpId1] and id=[m_PlpId2] 
-    DTAPI_DVBT2_RBM_EVENT_INVALID_PLP_START,
-    // Frequency/L1 deinterleaver overflow 
-    DTAPI_DVBT2_RBM_EVENT_FDI_OVERFLOW,
-    // Not enough ISCR data to estimate the TS rate 
-    DTAPI_DVBT2_RBM_EVENT_NO_TS_RATE,
-    // ISCR error (delta=[m_Delta]) 
-    DTAPI_DVBT2_RBM_EVENT_ISCR_ERROR,
-    // BUFS not constant (current=[m_CurBufs] new=[m_NewBufs]) 
-    DTAPI_DVBT2_RBM_EVENT_BUFS_NOT_CONSTANT,
-    // ISSYI field cannot change its value 
-    DTAPI_DVBT2_RBM_EVENT_ISSYI_NOT_CONSTANT,
-    // HEM field cannot change its value 
-    DTAPI_DVBT2_RBM_EVENT_HEM_NOT_CONSTANT,
-    // plp_num_blocks for this interleaving frame is too small (plp_num_blocks=%d) 
-    // At least 3 FEC block required in interleaving frame with HEM=1,
-    // at least 1 if HEM=0. 
-    DTAPI_DVBT2_RBM_EVENT_PLP_NUM_BLOCKS_TOO_SMALL,
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbT2RbmEvent -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// RBM event parameters
-//
-struct DtDvbT2RbmEvent
-{
-    int  m_DataPlpId;               // Data plp ID identifiying the stream
-    int  m_DataPlpIndex;            // Data plp index
-    double  m_Time;                 // Time in T units
-    int  m_IsCommonPlp;             // 1 = common PLP, 0 = data PLP,
-                                    // -1 = the event does not refer to a particular PLP
-    DtDvbT2RbmEventType m_EventType;
-    // Additional parameters
-    union {
-        // DTAPI_DVBT2_RBM_EVENT_PLOT parameters
-        struct {
-            int  m_TdiWriteIndex;   // TDI write index
-            int  m_TdiReadIndex;    // TDI read index
-            int  m_TdiReadAvailable;// Available cells in the TDI read buffer
-            int  m_DjbSize;         // Dejitter buffer size in bits
-        } Plot;
-
-        // DTAPI_DVBT2_RBM_EVENT_BUFS_TOO_SMALL parameters
-        struct {
-            int  m_Bufs;            // BUFS value
-        } BufsTooSmall;
-
-        // DTAPI_DVBT2_RBM_EVENT_TTO_IN_THE_PAST parameters
-        struct {
-            int  m_Tto;             // TTO value
-        } TtoInThePast;
-
-        // DTAPI_DVBT2_RBM_EVENT_DJB_OVERFLOW paraneters
-        struct {
-            int  m_DjbSize;         // Dejitter buffer size in bits
-            int  m_DjbMaxSize;
-        } DjbOverflow;
-
-        // DTAPI_DVBT2_RBM_EVENT_CRC8_ERROR_HEADER parameters
-        struct {
-            int  m_Val;             // CRC8 value
-        } Crc8ErrorHeader;
-
-        // DTAPI_DVBT2_RBM_EVENT_DFL_TOO_LARGE parameters
-        struct {
-            int  m_SyncD;           // SYNCD
-            int  m_Dfl;             // DFL
-        } SyncDTooLarge;
-        
-        // DTAPI_DVBT2_RBM_EVENT_INVALID_SYNCD parameters
-        struct {
-            int  m_Syncd;           // SYNCD
-            int  m_Left;            // Left
-        } InvalidSyncD;
-        
-        // DTAPI_DVBT2_RBM_EVENT_TDI_OVERFLOW parameters
-        struct {
-            int  m_TdiWriteIndex;   // TDI write index
-            int  m_TdiReadIndex;    // TDI read index
-        } TdiOverflow;
-
-        // DTAPI_DVBT2_RBM_EVENT_INVALID_PLP_START parameters
-        struct {
-            int  m_PlpId1;          // IDs of overlapping PLPs
-            int  m_PlpId2;
-        } InvalidPlpStart;
-
-        // DTAPI_DVBT2_RBM_EVENT_ISCR_ERROR parameters
-        struct {
-            int  m_Delta;           // Delta time in T units 
-        } IscrError;
-        
-        // DTAPI_DVBT2_RBM_EVENT_BUFS_NOT_CONSTANT parameters
-        struct {
-            int  m_CurBufs;         // Different BUFS values
-            int  m_newBufs;
-        } BufsNotConstant;
-        
-        // DTAPI_DVBT2_RBM_EVENT_PLP_NUM_BLOCKS_TOO_SMALL parameters
-        struct {
-            int  m_PlpNumBlocks;    // Number of blocks
-        } PlpNumBlocksTooSmall;
-    } u;
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbT2RbmValidation -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Class for enabling the RBM validation and specifying a callback function
-//
-struct DtDvbT2RbmValidation
-{
-public:
-    bool  m_Enabled;                // Enable RBM validation
-    bool  m_PlotEnabled;            // Enable RBM plotting events
-    int  m_PlotPeriod;              // Plot period
-    void*  m_pCallbackOpaque;       // RBM event callback function and environment
-    void  (*m_pCallbackFunc)(void *pOpaque, const DtDvbT2RbmEvent* pRbmEvent);
-
-public:
-    void  Init(void);
-    bool  IsEqual(DtDvbT2RbmValidation& RbmPars);
-    bool  operator == (DtDvbT2RbmValidation& RbmPars);
-    bool  operator != (DtDvbT2RbmValidation& RbmPars);
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbT2TxSigPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Class for specifying and enabling the Transmitter Signature
-//
-struct DtDvbT2TxSigPars
-{
-    // TX Signature through Auxiliary Streams
-    // The total number of possible TX IDs are M=3*(P+1)
-    // The number of cells used per transmitter is N=2^Q 
-    // The number of of T2 frames per TX SIG frame is L=R+1 
-    bool  m_TxSigAuxEnabled;        // Enabled
-    int  m_TxSigAuxId;              // Transmitter ID. 0..3071
-    int  m_TxSigAuxP;               // P 0..1023. The total number of possible 
-                                    // TX IDs is M=3*(P+1). Hence M <= 3072
-    int  m_TxSigAuxQ;               // Q 0..15. The number of cells used per     
-                                    // transmitter is N=2^Q
-    int  m_TxSigAuxR;               // R 0..255. The number of T2 frames
-                                    // per TX SIG frame is L=R+1
-
-    // TX Signature through FEF. 
-    // To use this FEF generation must be enabled and  the FEF length 
-    // must be >= DTAPI_TXSIG_FEF_LEN_MIN
-    bool  m_TxSigFefEnabled;        // Enabled
-    int  m_TxSigFefId1;             // TX ID for 1st signature period. 0..7
-    int  m_TxSigFefId2;             // TX ID for 2nd signature period. 0..7
-
-public:
-    void  Init(void);
-    bool  IsEqual(DtDvbT2TxSigPars& TxSigPars);
-    bool  operator == (DtDvbT2TxSigPars& TxSigPars);
-    bool  operator != (DtDvbT2TxSigPars& TxSigPars);
-};
-
-// Compare modes
-#define DTAPI_DVBT2_COMPA_ALL       0
-#define DTAPI_DVBT2_COMPA_ESSENTIAL 1
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbT2ComponentPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Class for specifying the DVB-T2 component modulation parameters
-//
-class DtDvbT2ComponentPars
-{
-public:
-    // General T2 parameters
-    int  m_T2Version;               // DVB-T2 spec. version. See DVBT2_VERSION_x
-    int  m_T2Profile;               // DVB-T2 profile. See DVBT2_PROFILE_x
-    bool  m_T2BaseLite;             // Indicates whether T2 lite is used in a base
-                                    // profile stream
-    int  m_Bandwidth;               // Bandwidth: DVBT2_BW_XXX
-    int  m_FftMode;                 // FFT-mode: DVBT2_FFT_XXX
-    int  m_Miso;                    // MISO. See DVBT2_MISO_x
-    int  m_GuardInterval;           // Guard interval. See DVBT2_GI_x
-    int  m_Papr;                    // PAPR. See DVBT2_PAPR_x
-    bool  m_BwtExt;                 // Bandwidth extention
-    int  m_PilotPattern;            // Pilot pattern. Pattern 1 .. 8.
-    int  m_L1Modulation;            // L1 modulation. See DVBT2_BPSK/... 
-    int  m_CellId;                  // Cell ID.  0..0xFFFF.
-    int  m_NetworkId;               // Network ID.  0..0xFFFF.
-    int  m_T2SystemId;              // T2 System ID.  0..0xFFFF.
-    bool  m_L1Repetition;           // L1 repetition
-
-    // T2-Frame related parameters
-    int  m_NumT2Frames;             // #T2-frames per superframe. 1..255. 
-    int  m_NumDataSyms;             // #Data symbols
-    int  m_NumSubslices;            // #Subslices per T2-frame (for type2 PLPs)
-
-    // Component start time
-    int  m_ComponentStartTime;      // Offset in T unit at which the T2 component 
-                                    // begins to be modulated. (0 in the first component)
-    // FEF parameters
-    bool  m_FefEnable;              // FEF enable
-    int  m_FefType;                 // FEF type. 0..15
-    int  m_FefS1;                   // FEF S1. 2..7
-    int  m_FefS2;                   // FEF S2. 1, 3, 5, 7, 9 ,11, 13 or 15
-    int  m_FefSignal;               // Selects the type of signal generated during 
-                                    // the FEF period (see DTAPI_DVBT2_FEF_x)
-    int  m_FefLength;               // FEF Length in number of samples.
-    int  m_FefInterval;             // FEF Interval.  
-                                    //  Requires: (m_NumT2Frames % m_FefInterval) == 0
-    // RF channels for TFS
-    int  m_NumRfChans;              // Number of RF channels 1..7
-    int  m_RfChanFreqs[DTAPI_DVBT2_NUM_RF_MAX];
-                                    // Channel frequencis
-    int  m_StartRfIdx;              // First used RF channel
-
-    // PLPs
-    int  m_NumPlps;                 // Number of PLPs
-    DtDvbT2PlpPars  m_Plps[DTAPI_DVBT2_NUM_PLP_MAX];
-                                    // PLP parameters
-    DtPlpInpPars  m_PlpInputs[DTAPI_DVBT2_NUM_PLP_MAX];  
-                                    // PLP inputs (Optional)
-    // Optional
-    DtDvbT2AuxPars  m_Aux;          // AUX Streams (Optional)
-    DtDvbT2PaprPars  m_PaprPars;    // PAPR Params (Optional)
-    DtDvbT2TxSigPars  m_TxSignature;// TX-Signature (Optional)
-    DtDvbT2RbmValidation  m_RbmValidation;
-                                    // RBM validation (Optional)
-    DtTestPointOutPars  m_TpOutput; // Test point data output parameters (optional)
-
-    int  m_L1ChangeCounter;         // Undocumented. For internal use only.
-
-public:
-    virtual void  Init(void);
-    virtual bool  IsEqual(DtDvbT2ComponentPars&, int CompareMode=DTAPI_DVBT2_COMPA_ALL);
-    virtual bool  operator == (DtDvbT2ComponentPars& T2Pars);
-    virtual bool  operator != (DtDvbT2ComponentPars& T2Pars);
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbT2Pars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Class for specifying the DVB-T2 modulation parameters.
-//
-class DtDvbT2Pars : public DtDvbT2ComponentPars
-{
-public:
-    // Optional
-    DtVirtualOutPars  m_VirtOutput; // Virtual-output parameters (Optional) 
-    DtDvbT2MiPars  m_T2Mi;          // T2MI output (Optional)
-    int  m_NumFefComponents;        // Number of other T2 stream transmitted in the 
-                                    // FEF part of the first component. The parameters 
-                                    // come from 'm_FefComponent'.
-
-    // FEF components. Currently maximum 1 other component
-    DtDvbT2ComponentPars  m_FefComponent[1];
-
-public:
-      // Constructor
-    DtDvbT2Pars() { Init(); }
-
-    // Methods
-    virtual void  Init(void);
-    virtual DTAPI_RESULT  CheckValidity(void);
-    virtual DTAPI_RESULT  ComputeTDesign();
-    virtual DTAPI_RESULT  GetParamInfo(DtDvbT2ParamInfo& T2Info);
-    virtual DTAPI_RESULT  GetParamInfo(DtDvbT2ParamInfo& T2Info1, 
-                                                               DtDvbT2ParamInfo& T2Info2);
-    
-    // Only usefull for single PLP
-    DTAPI_RESULT  OptimisePlpNumBlocks(DtDvbT2ParamInfo&, int&);
-    DTAPI_RESULT  OptimisePlpNumBlocks(DtDvbT2ParamInfo&, int&, int&);
-
-    // Helper function to determine T2MI ts rate.
-    static DTAPI_RESULT  RetrieveT2miTsRateFromTs(char* pBuffer, int NumBytes,
-                                                            int  Bandwidth, int&  TsRate);
-
-    // Operators
-    virtual bool  operator == (DtDvbT2Pars& T2Pars);
-    virtual bool  operator != (DtDvbT2Pars& T2Pars);
-    virtual bool  IsEqual(DtDvbT2Pars& T2Pars, int CompareMode=DTAPI_DVBT2_COMPA_ALL);
-};
-
-//=+=+=+=+=+=+=+=+=+=+=+=+=+ DVB-T2 Demodulation layer 1 data  +=+=+=+=+=+=+=+=+=+=+=+=+=+
-
-// DtDvbT2DemodL1PostPlp::m_PayloadType - The PLP payload type
-#define DTAPI_DVBT2_PAYLOAD_GFPS    0            // Generic Fixed-length Packetized Stream
-#define DTAPI_DVBT2_PAYLOAD_GCS     1            // Generic Continuous Stream
-#define DTAPI_DVBT2_PAYLOAD_GSE     2            // Generic Stream Encapsulation
-#define DTAPI_DVBT2_PAYLOAD_TS      3            // Transport Stream
-
-// DtDvbT2DemodL1Pre::m_Type - The current T2 super-frame stream type
-#define DTAPI_DVBT2_TYPE_TS         0            // Transport Stream (TS) only
-#define DTAPI_DVBT2_TYPE_GS         1            // Generic Stream (GS) only
-#define DTAPI_DVBT2_TYPE_TS_GS      2            // Mixed TS and GS
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbT2DemodAuxPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Struct for storing the Auxiliary stream information from Layer 1 Post 
-//
-struct DtDvbT2DemodAuxPars
-{
-    int  m_AuxStreamType;           // Auxiliary stream type
-    int  m_AuxPrivateConf;          // Auxiliary stream info
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbT2DemodL1PostPlp -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Struct for storing Layer 1 Post per PLP
-//
-struct DtDvbT2DemodL1PostPlp
-{
-    int  m_Id;                      // PLP ID: 0..255
-    int  m_Type;                    // PLP type, see DTAPI_DVBT2_PLP_TYPE_x
-    int  m_PayloadType;             // PLP payload type: 0..3
-    int  m_FfFlag;                  // FF flag
-    int  m_FirstRfIdx;              // 0..NumRf-1
-    int  m_FirstFrameIdx;           // First frame in which PLP appears
-    int  m_GroupId;                 // Group ID: 0..255
-    int  m_CodeRate;                // PLP code rate, see DTAPI_DVBT2_COD_x
-    int  m_Modulation;              // PLP modulation, see DTAPI_DVBT2_BPSK/...
-    int  m_Rotation;                // PLP rotation yes/no
-    int  m_FecType;                 // PLP FEC type: 0=LDPC 16K, 1=LDPC 64K
-    int  m_NumBlocks;               // PLP_NUM_BLOCKS_MAX: Maximum number of FEC blocks
-                                    // contained in one interleaving frame
-    int  m_FrameInterval;           // The PLP appears every m_FrameInterval frames
-    int  m_TimeIlLength;            // Time interleaver length: 0..255
-    int  m_TimeIlType;              // Time interleaver type: 0 or 1
-    int  m_InBandAFlag;             // IN_BAND_A_FLAG is used yes/no
-    // V1.2.1 spec revision
-    int  m_InBandBFlag;             // IN_BAND_B_FLAG is used yes/no
-    int  m_Reserved1;               // Reserved field, may be used for bias balancing
-    int  m_PlpMode;                 // PLP mode: 0..3
-    int  m_Static;                  // Static flag: 0 or 1=Configuration changes only at
-                                    // super frame boundaries
-    int  m_StaticPadding;           // Static padding flag: 0 or 1=BBFRAME padding is not
-                                    // used
-    DtDvbT2DemodL1PostPlp();
-
-    // Serialisation
-    DTAPI_RESULT  FromXml(const std::wstring& XmlString);
-    DTAPI_RESULT  ToXml(std::wstring& XmlString);
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbT2DemodRfPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Struct for storing the TFS RF channels information from Layer 1 Post 
-//
-struct DtDvbT2DemodRfPars
-{
-    int  m_RfIdx;                   // Index of the RF-frequency
-    int  m_Frequency;               // Centre frequency in Hz
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbT2DemodL1Data -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Struct for storing the DVB-T2 layer 1 data
-//
-struct DtDvbT2DemodL1Data
-{
-    // P1 Info
-    struct DtDvbT2DemodL1P1
-    {
-        bool  m_Valid;              // True if P1 was found
-        int  m_FftMode;             // FFT mode, see DVBT2_FFT_x
-        int  m_Miso;                // MISO used
-        int  m_Fef;                 // FEF used
-        int  m_T2Profile;           // DVB-T2 profile. See DVBT2_PROFILE_x
-    } m_P1;
-
-    // L1-pre info
-    struct DtDvbT2DemodL1Pre
-    {
-        bool  m_Valid;              // True if L1 pre was correctly demodulated
-
-        int  m_Type;                // Stream type within the current T2 super-frame
-        int  m_BwtExt;              // Bandwidth extension
-        int  m_S1;                  // S1 signalling. P1 S1. 
-        int  m_S2;                  // S2 signalling. P1 S2.
-        int  m_L1Repetition;        // L1 repetition
-        int  m_GuardInterval;       // Guard interval, see DVBT2_GI_x
-        int  m_Papr;                // PAPR. see DVBT2_PAPR_x
-        int  m_L1Modulation;        // L1 modulation, see DVBT2_BPSK/...
-        int  m_L1CodeRate;          // L1 coderate, see DTAPI_DVBT2_COD_x
-        int  m_L1FecType;           // L1 FEC type: 0=LDPC 16K, 1=LDPC 64K
-        int  m_L1PostSize;          // Size of the L1-post in OFDM cells
-        int  m_l1PostInfoSize;      // L1-post info size = 
-                                    //              L1-post configurable+dynamic+extension
-        int  m_PilotPattern;        // Pilot pattern: 1..8
-        int  m_TxIdAvailability;    // The Tx ID
-        int  m_CellId;              // Cell ID: 0..0xFFFF
-        int  m_NetworkId;           // Network ID: 0..0xFFFF
-        int  m_T2SystemId;          // T2 System ID: 0..0xFFFF
-        int  m_NumT2Frames;         // Number of T2-frames per superframe: 1..255
-        int  m_NumDataSyms;         // Number of data symbols
-        int  m_RegenFlag;           // Regeneration count indicator
-        int  m_L1PostExt;           // L1-post extensions enabled
-        int  m_NumRfChans;          // Number of RF channels: 1..7
-        int  m_CurrentRfIdx;        // Current RF index: 0..m_NumRfChans-1
-        int  m_T2Version;           // DVB-T2 spec version, see DVBT2_VERSION_x
-        int  m_L1PostScrambling;    // L1 Post scrambling
-        int  m_T2BaseLite;          // Indicates whether T2 lite is used in a base
-                                    // profile stream
-    } m_L1Pre;
-
-    // L1-post info
-    struct DtDvbT2DemodL1Post
-    {
-        bool  m_Valid;              // True if L1 post was correctly demodulated
-        int  m_NumSubslices;        // Number of subslices per T2-frame (for type2 PLPs)
-        int  m_NumPlps;             // Number of PLPs
-        int  m_NumAux;              // Number of auxiliary streams
-
-        // TFS RF-channels
-        std::vector<DtDvbT2DemodRfPars>  m_RfChanFreqs;   
-
-        // FEF info is meaningful if m_P1.m_Fef = true
-        int  m_FefType;             // FEF type: 0..15
-        int  m_FefLength;           // FEF length in number of samples
-        int  m_FefInterval;         // FEF Interval
-
-        // PLPs
-        std::vector<DtDvbT2DemodL1PostPlp>  m_Plps;    
-
-        // Auxiliary stream signalling information
-        std::vector<DtDvbT2DemodAuxPars>  m_AuxPars;   
-
-    } m_L1Post;
-
-    DtDvbT2DemodL1Data();
-
-    // Serialisation
-    DTAPI_RESULT  FromXml(const std::wstring& XmlString);
-    DTAPI_RESULT  ToXml(std::wstring& XmlString);
-};
-
-//=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ ISDBT-TMM +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
-
-#define DTAPI_ISDBT_NUM_TS_MAX  14     
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtIsdbTmmPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// ISDB-Tmm parameters including per-layer parameters
-//
-struct DtIsdbTmmPars
-{
-    int  m_Bandwidth;
-    int  m_SubChannel;
-    int  m_NumTss;
-    DtVirtualOutPars  m_VirtOutput;  // Virtual Output parameters(Optional) 
-    DtIsdbtPars  m_Tss[DTAPI_ISDBT_NUM_TS_MAX];
-    DtPlpInpPars  m_TsInputs[DTAPI_ISDBT_NUM_TS_MAX];
-
-    // Member function
-    DtIsdbTmmPars() { Init(); }
-    DTAPI_RESULT  CheckValidity();
-    int  NumSegm();
-    void Init();
-    DTAPI_RESULT SetSegmentFormat(int TsIdx, int SegmFormat);
-
-    bool  operator == (DtIsdbTmmPars& Rhs);
-    bool  operator != (DtIsdbTmmPars& Rhs);
-};
-
-
-//+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ Advanced Demodulator +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtStreamType -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Classifies the type of the stream
-//
-enum DtStreamType 
-{
-    STREAM_CONSTEL,                 // Constellation points
-    STREAM_DAB,                     // DAB stream
-    STREAM_DABETI,                  // DAB Ensemble Transport Interface (NI, G.703)
-    STREAM_DABFIC,                  // DAB Fast Information Channel
-    STREAM_DVBC2,                   // DVB-C2 stream (Transport Stream packets)
-    STREAM_DVBC2_BBFRAME,           // DVB-C2 stream base-band frames
-    STREAM_DVBT,                    // DVB-T stream
-    STREAM_DVBT2,                   // DVB-T2 stream (Transport Stream packets)
-    STREAM_DVBT2_BBFRAME,           // DVB-T2 stream base band frames
-    STREAM_DVBT2_GSE,               // DVB-T2 stream GSE-packets
-    STREAM_IMPRESP,                 // Impulse response
-    STREAM_ISDBT,                   // ISDB-T stream
-    STREAM_MER,                     // MER
-    STREAM_SPECTRUM,                // Spectrum
-    STREAM_T2MI,                    // DVB-T2 stream
-    STREAM_TF_ABS,                  // Transfer function absolute
-    STREAM_TF_PHASE,                // Transfer function phase
-    STREAM_TF_GROUPDELAY            // Transfer function group delay
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtConstelPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// This structure specifies the parameters for a stream of constellation points
-//
-struct DtConstelPars
-{
-    int  m_Period;                  // Minimum period between callbacks in ms
-    int  m_ConstellationType;       // 0: Constellation per PLP
-                                    // 1: Constellation per carrier (after equalization)
-    int  m_Index;                   // Index of the PLP or carrier
-    int  m_MaxNumPoints;            // Maximum number of constellation points
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbTStreamSelPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// This structure specifies the selection parameters for a DVB-T transport stream
-//
-struct DtDvbTStreamSelPars
-{
-    // No selection parameters yet
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbTTpsInfo -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// DVB-T Transmission Parameter Signalling (TPS) information structure
-//
-struct DtDvbTTpsInfo
-{
-    int  m_LengthIndicator;         // TPS length indicator  
-    int  m_Constellation;           // Constellation (DTAPI_MOD_DVBT_xxx)
-    int  m_HpCodeRate;              // High Priority code rate (DTAPI_MOD_xxx)
-    int  m_LpCodeRate;              // Low Priority code rate(DTAPI_MOD_xxx)
-    int  m_Guard;                   // Guard interval (DTAPI_MOD_DVBT_G_xx)
-    int  m_Interleaving;            // Interleaving (DTAPI_MOD_DVBT_xxx)
-    int  m_Mode;                    // Transmission mode (DTAPI_MOD_DVBT_xK)
-    int  m_Hierarchy;               // Hierarchy   (DTAPI_MOD_DVBT_HARCHY_xxx)
-    int  m_CellId;                  // CellId or -1 when not present
-    int  m_HpS48S49;                // S48S49 of the odd frames  (DTAPI_MOD_DVBT_Sxx)
-    int  m_LpS48S49;                // S48S49 of the even frames (DTAPI_MOD_DVBT_Sxx)
-    int  m_OddS50_S53;              // S50..S53 of the odd frames	
-    int  m_EvenS50_S53;             // S50..S53 of the even frames	
-
-    // Serialisation
-    DTAPI_RESULT  FromXml(const std::wstring& XmlString);
-    DTAPI_RESULT  ToXml(std::wstring& XmlString);
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtDvbT2StreamSelPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// This structure specifies the selection parameters for a DVB-T2 DVB-T2 GSE and 
-// DVB-T2 BBFRAME stream
-//
-struct DtDvbT2StreamSelPars
-{
-    int  m_PlpId;                   // ID of the data PLP or DTAPI_DVBT2_PLP_ID_xxx
-    int  m_CommonPlpId;             // ID of the common PLP or DTAPI_DVBT2_PLP_ID_xxx
-
-    // Serialisation
-    DTAPI_RESULT  FromXml(const std::wstring& XmlString);
-    DTAPI_RESULT  ToXml(std::wstring& XmlString);
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtImpRespPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// This structure specifies the parameters for an impulse-response stream
-//
-struct DtImpRespPars
-{
-    int  m_Period;                  // Minimum period bewteen callbacks in ms
-    int  m_Channel;                 // Channel used for MISO
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtIsdbtStreamSelPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// This structure specifies the selection parameters for an ISDB-T stream
-//
-struct DtIsdbtStreamSelPars
-{
-    // No additional selection parameters
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtMeasurement -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Structure describing a set of measurement values. It used to pass measurements from 
-// the advanced demodulator to the user application through user-supplied 
-// DtWriteMeasFunc callback.
-//
-struct DtMeasurement
-{
-    DtStreamType  m_MeasurementType;// Type of measurement values
-    __int64  m_TimeStamp;           // Timestamp in number of samples
-    int  m_NumValues;               // Number of measurement values
-    DtComplexFloat*  m_pMeasurement;// Measurement values
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtMerPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// This structure specifies the parameters for a MER stream.
-//
-struct DtMerPars
-{
-    int  m_Period;                  // Minimum period between callbacks in ms
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtSpectrumPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// This structure specifies the parameters for a spectrum stream.
-//
-struct DtSpectrumPars
-{
-    int  m_Period;                  // Minimum time between callbacks in ms 
-    int  m_FftLength;               // FFT length, must be a power of two
-    int  m_AverageLength;           // Number of FFT blocks on wich the average is done
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtT2MiStreamSelPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// This structure specifies the selection parameters for a T2-MI transport stream
-// containing a com-plete DVB-T2 stream.
-//
-struct DtT2MiStreamSelPars
-{
-    int  m_T2MiOutPid;              // T2-MI output PID
-    int  m_T2MiTsRate;              // Rate in bps for the T2MI output.
-                                    // If -1, output a variable bitrate T2MI stream 
-                                    // (set_output_rate is not called in this case).
-                                    // Otherwise, use m_T2MiTsRate to set the rate.
-                                    // Padding null packets are used to reach the target
-                                    // bitrate. The maximum T2-MI bitrate is 72Mbps.
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtTransFuncPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// This structure specifies the parameters for a transfer-function stream.
-//
-struct DtTransFuncPars
-{
-    int  m_Period;                  // Minimum time between callbacks in ms
-    int  m_Channel;                 // Channel used for MISO
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtStreamSelPars -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Structure for streaming data selection
-//
-struct DtStreamSelPars
-{
-    intptr_t  m_Id;                 // Unique stream identifier
-    DtStreamType  m_StreamType;     // Stream selection type
-
-    union {
-        // Selection parameters for demodulated streams
-        DtDvbC2StreamSelPars  m_DvbC2;
-        DtDvbTStreamSelPars  m_DvbT;
-        DtDvbT2StreamSelPars  m_DvbT2;
-        DtIsdbtStreamSelPars  m_Isdbt;
-        DtT2MiStreamSelPars  m_T2Mi;
-        DtDabStreamSelPars  m_Dab;
-        DtDabEtiStreamSelPars  m_DabEti;
-        DtDabFicStreamSelPars  m_DabFic;
-
-        // Parameters for streams of measurement values
-        DtConstelPars  m_Constel;
-        DtImpRespPars  m_ImpResp;
-        DtMerPars  m_Mer;
-        DtSpectrumPars  m_Spectrum;
-        DtTransFuncPars  m_TransFunc;
-    } u;
-
-    bool  operator == (DtStreamSelPars& Rhs);
-    bool  operator != (DtStreamSelPars& Rhs);
-};
-
-// Software demodulator callback functions
-typedef void  DtOutputRateChangedFunc(void *pOpaque, DtStreamSelPars&, int Bitrate);
-typedef void  DtReadIqFunc(void* pOpaque, 
-                                     unsigned char* pIqBuf, int IqBufSize, int& IqLength);
-typedef void  DtWriteMeasFunc(void *pOpaque, DtStreamSelPars&, DtMeasurement*);
-typedef void  DtWriteStreamFunc(void* pOpaque, DtStreamSelPars& StreamSel, 
-                                                  const unsigned char* pData, int Length);
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtAdvDemod -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Class representing an advanced demodulator. 
-// DtAdvDemod can be considered a specialized in-put channel.
-//
-class DtAdvDemod
-{
-public:
-    DtAdvDemod();
-    virtual ~DtAdvDemod();
-private:
-    // No implementation is provided for the copy constructor
-    DtAdvDemod(const DtAdvDemod&);
-
-public:
-    DtHwFuncDesc  m_HwFuncDesc;     // Hardware function descriptor
-
-    // Convenience functions
-public:
-    int  Category(void)         { return m_HwFuncDesc.m_DvcDesc.m_Category; }
-    int  FirmwareVersion(void)  { return m_HwFuncDesc.m_DvcDesc.m_FirmwareVersion; }
-    bool  IsAttached(void)      { return m_pAdvDemod != NULL; }
-    int  TypeNumber(void)       { return m_HwFuncDesc.m_DvcDesc.m_TypeNumber; }
-
-public:
-    DTAPI_RESULT  AttachToPort(DtDevice* pDtDvc, int Port,
-                                               bool Exclusive=true, bool ProbeOnly=false);
-    DTAPI_RESULT  AttachVirtual(DtDevice* pDtDvc,
-                                                DtReadIqFunc* pReadIqFunc, void* pOpaque);
-    DTAPI_RESULT  ClearFlags(int Latched);
-    DTAPI_RESULT  CloseStream(intptr_t Id);
-    DTAPI_RESULT  Detach(int DetachMode);
-    DTAPI_RESULT  GetDemodControl(DtDemodPars* pDemodPars);
-    DTAPI_RESULT  GetDescriptor(DtHwFuncDesc& HwFunDesc);
-    DTAPI_RESULT  GetFlags(int& Flags, int& Latched);
-    DTAPI_RESULT  GetIoConfig(int Group, int& Value);
-    DTAPI_RESULT  GetIoConfig(int Group, int& Value, int& SubValue);
-    DTAPI_RESULT  GetIoConfig(int Group, int& Value, int& SubValue, __int64& ParXtra0);
-    DTAPI_RESULT  GetIoConfig(int Group, int& Value, int& SubValue,
-                                                    __int64& ParXtra0, __int64& ParXtra1);
-    DTAPI_RESULT  GetPars(int Count, DtPar* pPars);    
-    DTAPI_RESULT  GetRxControl(int& RxControl);
-    DTAPI_RESULT  GetStatistics(int Count, DtStatistic* pStatistics);
-    DTAPI_RESULT  GetStatistic(int Type, int& Statistic);
-    DTAPI_RESULT  GetStatistic(int Type, double& Statistic);
-    DTAPI_RESULT  GetStatistic(int Type, bool& Statistic);
-    DTAPI_RESULT  GetStreamSelection(std::vector<DtStreamSelPars>& StreamSelList);
-    DTAPI_RESULT  GetSupportedPars(int& NumPars, DtPar* pPars);
-    DTAPI_RESULT  GetSupportedStatistics(int& Count, DtStatistic* pStatistics);
-    DTAPI_RESULT  GetTsRateBps(intptr_t Id, int& TsRate);
-    DTAPI_RESULT  GetTunerFrequency(__int64& FreqHz);
-    DTAPI_RESULT  LedControl(int LedControl);
-    DTAPI_RESULT  OpenStream(DtStreamSelPars StreamSel);
-    DTAPI_RESULT  RegisterCallback(DtOutputRateChangedFunc* pCallback, void* pOpaque);
-    DTAPI_RESULT  RegisterCallback(DtWriteStreamFunc* pCallback, void* pOpaque);
-    DTAPI_RESULT  RegisterCallback(DtWriteMeasFunc* pCallback, void* pOpaque);
-    DTAPI_RESULT  Reset(int ResetMode);
-    DTAPI_RESULT  SetAntPower(int AntPower);
-    DTAPI_RESULT  SetDemodControl(DtDemodPars *pDemodPars);
-    DTAPI_RESULT  SetIoConfig(int Group, int Value, int SubValue,
-                                            __int64 ParXtra0 = -1, __int64 ParXtra1 = -1);
-    DTAPI_RESULT  SetPars(int Count, DtPar* pPars); 
-    DTAPI_RESULT  SetRxControl(int RxControl);
-    DTAPI_RESULT  SetTunerFrequency(__int64 FreqHz);
-    DTAPI_RESULT  Tune(__int64 FreqHz, int ModType,
-                                                int ParXtra0, int ParXtra1, int ParXtra2);
-    DTAPI_RESULT  Tune(__int64 FreqHz, DtDemodPars *pDemodPars);
-
-protected:                          
-    AdvDemod*  m_pAdvDemod;         // Advanced demodulation channel implementation
-    bool  m_IsAttachedToVirtual;    // Attached to virtual input port?
-
-    // Encapsulated data
-private:
-    IXpMutex*  m_pMTLock;           // Multi-threading lock for get/read functions
-    void*  m_pDetachLockCount;
-    int  m_Port;
-    bool  m_WantToDetach;
-    
-// Private helper functions
-private:
-    DTAPI_RESULT  DetachLock(void);
-    DTAPI_RESULT  DetachUnlock(void);
-    DTAPI_RESULT  ReadAccessLock(void);
-    DTAPI_RESULT  ReadAccessUnlock(void);
-};
-
-// Forward declaration for use in DtRs422Channel
-class Rs422Channel;
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtRs422Channel -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-class DtRs422Channel
-{
-public:
-    DtRs422Channel();
-    virtual ~DtRs422Channel();
-private:
-    // No implementation is provided for the copy constructor
-    DtRs422Channel(const DtRs422Channel&);
-
-public:
-    DTAPI_RESULT  AttachToPort(DtDevice* pDtDvc, int Port,
-                                               bool Exclusive=true, bool ProbeOnly=false);
-    DTAPI_RESULT  Detach();
-    DTAPI_RESULT  Flush();
-    DTAPI_RESULT  Read(char* pBuffer, int NumBytesToRead, int Timeout, int& NumBytesRead);
-    DTAPI_RESULT  Write(char* pBuffer, int NumBytesToWrite, bool Blocking=true);
-
-protected:
-    Rs422Channel*  m_pRs422Channel;
-    void*  m_pDetachLockCount;
-    bool  m_WantToDetach;
-
-// Private helper functions
-private:
-    DTAPI_RESULT  DetachLock(void);
-    DTAPI_RESULT  DetachUnlock(void);
-};
-
-//+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
-//+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ MATRIX CONFIGURATION +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
-//+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- enum DtMxPixelFormat -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-enum DtMxPixelFormat
-{
-    DT_PXFMT_UYVY422_8B,        // Packed CbYCrY, 8 bits per symbol
-    DT_PXFMT_UYVY422_10B,       // Packed CbYCrY, 10 bits per symbol
-    DT_PXFMT_UYVY422_16B,       // Packed CbYCrY, 16 bits per symbol (10 significant bits)
-    DT_PXFMT_UYVY422_10B_NBO,   // Packed CbYCrY, 10 bits per symbol, network byte order
-    DT_PXFMT_YUYV422_8B,        // Packed YCbYCr, symbol swap of DT_PXFMT_UYVY422_8B
-    DT_PXFMT_YUYV422_10B,       // Packed YCbYCr, symbol swap of DT_PXFMT_UYVY422_10B
-    DT_PXFMT_YUYV422_16B,       // Packed YCbYCr, symbol swap of DT_PXFMT_UYVY422_16B
-    DT_PXFMT_Y_8B,              // Luminance plane only, 8 bits per symbol
-    DT_PXFMT_Y_16B,             // Luminance plane only, 16 bits per symbol (10 sign bits)
-    DT_PXFMT_YUV422P_8B,        // Planar YUV, 3 planes, 1 Cb & 1 Cr sample per 2 Y. 8BPS
-    DT_PXFMT_YUV422P_16B,       // Planar YUV, 3 planes, 1 Cb & 1 Cr sample per 2 Y. 16BPS
-    DT_PXFMT_YUV422P2_8B,       // Planar YUV, 2 planes, Y plane + Cb+Cr plane. 8BPS
-    DT_PXFMT_YUV422P2_16B,      // Planar YUV, 2 planes, Y plane + Cb+Cr plane. 16BPS
-    DT_PXFMT_BGR_8B,            // Packed RGB data. First B, then G, then R. 8 bits per ch
-    DT_PXFMT_V210,              // Packed CbYCrY, 3 10-bit symbols per 32-bit
-    // Likely future extensions:
-    //DT_PXFMT_YUV420P,           // Planar YUV, 3 planes, 1 Cb & 1 Cr sample per 2x2 Y.This
-                                // is often used as decoder input/output.
-    //DT_PXFMT_RGBX,              // Packed RGB data with a 4th dummy symbol per pixel. With
-                                // 8-byte data this means 32-bit per pixel which is easy
-                                // to process.
-    //DT_PXFMT_RGB_P,             // Planar RGB data
-
-    DT_PXFMT_INVALID = -1,
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- class DtMxVideoConfig -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-class DtMxVideoConfig
-{
-public:
-    // m_StartLine1 / m_NumLines1 are for field 1, m_StartLine2 / m_NumLines2 are for
-    // field 2. For progressive input m_StartLine2 / m_NumLines2 are ignored.
-    // If no video input is required set m_NumLines1 and m_NumLines2 to 0.
-    int  m_StartLine1;          // 1st line to transfer (1-based relative to 1st field)
-    int  m_NumLines1;           // #lines to transfer (-1 for all lines)
-    
-    int  m_StartLine2;          // 1st line to transfer (1-based relative to 2nd field)
-    int  m_NumLines2;           // #lines to transfer (-1 for all lines)
-
-    int  m_Scaling;             // Scaling mode (OFF, 1/4, 1/16). DTAPI_SCALING_*
-    int  m_LineAlignment;       // -1 if all symbols should directly follow eachother,
-                                // otherwise the minimum alignment each line should
-                                // have. HLM will chose a stride, usually
-                                // n*m_LineAlignment for smallest n where the stride is
-                                // equal or longer than the required number of bytes per
-                                // line. HLM is allowed to pick larger stride for
-                                // performance reasons.
-                                // Common values will be -1 (no alignment), 1 (align
-                                // each line at byte-boundary) and 16 (sse2 alignment).
-    DtMxPixelFormat  m_PixelFormat; // Pixel format
-    bool  m_UserBuffer;         // When set to true the callback function is responsible
-                                // for allocating the video sample buffers. When set to
-                                // false the framework will allocate the buffers. Defaults
-                                // to false.
-
-    DtMxVideoConfig();
-};
-
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- class DtMxRawConfigSdi -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-class DtMxRawConfigSdi
-{
-public:
-    DtMxPixelFormat  m_PixelFormat; // Pixel format. Allowed are: UYVY422 or YUYV422
-    int  m_StartLine;           // 1st line to transfer (1-based)
-    int  m_NumLines;            // #lines to transfer (-1 for all lines)
-    int  m_LineAlignment;       // See DtMxVideoConfig::m_LineAlignment
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- enum DtMxRawDataType -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-enum DtMxRawDataType
-{
-    DT_RAWDATA_SDI,
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- class DtMxRawConfig -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-class DtMxRawConfig
-{
-public:
-    DtMxRawDataType  m_Type;    // Indicates which of the fields below is valid.
-
-    union {
-        DtMxRawConfigSdi  m_Sdi;
-    };
-
-    DtMxRawConfig();
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- enum DtMuxAudioSampleType -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-enum DtMxAudioSampleType
-{
-    DT_AUDIO_SAMPLE_PCM,        // 32-bit PCM samples
-    DT_AUDIO_SAMPLE_AES3,       // AES samples
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- enum DtMxOutputMode -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-enum DtMxOutputMode
-{
-    DT_OUTPUT_MODE_ADD,
-    DT_OUTPUT_MODE_COPY,
-    DT_OUTPUT_MODE_DROP,
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- class DtMxAudioConfig -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-class DtMxAudioConfig
-{
-public:
-    int  m_Index;               // Identifies the corresponding audio channel.
-    bool  m_DeEmbed;            // If true, decode the input to data buffers per stream.
-                                // m_DeEmbed is ignored for output rows.
-    DtMxOutputMode  m_OutputMode;  
-                                // DROP: Audio group is not generated at output, whether
-                                //       or not it was available at input. Data buffers
-                                //       are available read-only if m_DeEmbed is true.
-                                // COPY: Output for this group is directly copied from
-                                //       input, timing stays the same. Data buffers are
-                                //       available read-only if m_DeEmbed is true. For
-                                //       output rows this has the same effect as DROP: no
-                                //       generated output.
-                                // ADD:  Output is generated by framework from data
-                                //       buffers filled by callback. Data buffers are
-                                //       initialized with input data if m_DeEmbed is
-                                //       true, otherwise they're initially empty.
-                                // m_OutputMode is ignored for input rows.
-    DtMxAudioSampleType  m_Format; // Inidicate whether to (de-)embed PCM samples or
-                                // AES subframes. Dolby E can be (de-)embedded as
-                                // AES samples.
-
-    DtMxAudioConfig();
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- enum DtMxAuxDataType -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-enum DtMxAuxDataType
-{
-    DT_AUXDATA_SDI,
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- class DtMxAuxObjConfig -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-class DtMxAuxObjConfig
-{
-public:
-    bool  m_DeEmbed;            // If true, decode this AuxData object. m_DeEmbed is
-                                // ignored for output rows.
-    DtMxOutputMode  m_OutputMode;          
-                                // DROP: AuxData object is not generated at output no
-                                //       matter whether or not it was available at the
-                                //       input. AuxData object is available read-only if
-                                //       m_DeEmbed is true.
-                                // COPY: The embedded AuxData of this type in the input
-                                //       frame, if present, is copied one-to-one to the
-                                //       output, without re-embedding. If m_DeEmbed is
-                                //       true the data will be available in the callback.
-                                // ADD:  Output is generated by framework from data
-                                //       buffers filled by callback. Data buffers are
-                                //       initialized with input data if m_DeEmbed is
-                                //       true, otherwise they're initially empty.
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- class DtMxAuxConfigSdi -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-class DtMxAuxConfigSdi
-{
-public:
-    DtMxAuxObjConfig  m_AncPackets;  // Settings for ancillary data packets
-    //DtMxAuxObjConfig  m_Rp188;
-    //DtMxAuxObjConfig  m_Vitc;
-    //DtMxAuxObjConfig  m_Eia608;
-    //DtMxAuxObjConfig  m_Eia708;
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- class DtMxAuxDataConfig -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-class DtMxAuxDataConfig
-{
-public:
-    bool  m_DeEmbedAll;         // De-embed all auxdata. Defaults to false.
-    DtMxAuxDataType  m_DataType; // Indicates which of the following objects is valid.
-
-    union
-    {
-        DtMxAuxConfigSdi  m_Sdi;
-    };
-
-    DtMxAuxDataConfig();
-};
-
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- class DtMxRowConfig -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-class DtMxRowConfig
-{
-    // Constants
-public:
-    static const int  MAX_NUM_AUDIO_CHANNELS = 16; // Max. # audio channels supported
-
-public:
-    DtMxRowConfig();
-    virtual ~DtMxRowConfig();
-
-public:
-    bool  m_Enable;             // Global flag to enable/disable to the complete row.
-                                // When disabled input rows will not provide data and all
-                                // output ports will generate black frames.
-                                // Wnen set to false all further configuration below
-                                // is not taken into account.
-
-    int  m_RowSize;             // Number of frame buffers available in the callback
-                                // function.
-
-    void*  m_pOpaq;             // Opaque user pointer. Framework itself will not change
-                                // this value. This can be used if the row configuration
-                                // is changed dynamically to detect the change. It can
-                                // also be used to change the function  of the callback
-                                // frame-synchronous without implementing any locks
-                                // on the user-side.
-
-    // Each matrix row operates either in RAW mode or in "parsed data" mode. This means
-    // that m_RawDataEnable is mutually exclusive with m_VideoEnable, m_AudioEnable
-    // and m_AuxDataEnable.
-
-    // Raw data
-    bool  m_RawDataEnable;      // Enable raw data processing. m_RawData is ignored when
-                                // set to false. Defaults to false.
-    DtMxRawConfig  m_RawData;   // Configuration of raw input/output data.
-
-    // Video
-    bool  m_VideoEnable;        // Enables video processing. m_Video is ignored when set
-                                // to false. Defaults to true.
-    DtMxVideoConfig  m_Video;   // Configuration of video input/output.
-
-    // Audio
-    bool  m_AudioEnable;        // Enables audio processing. m_AudioGen and m_Audio are 
-                                // ignored when set to false. Defaults to true.
-    DtMxAudioConfig  m_AudioDef; // Default audio settings, can be used to de-embed all
-                                // channels. These settings are used as defaults for
-                                // all channels and can be overriden on a per-channel
-                                // basis by the m_Audio vector.
-    std::vector<DtMxAudioConfig>  m_Audio; // Configuration for each audio channel
-
-    // AUX data
-    bool  m_AuxDataEnable;      // Enables auxiliary data processing. m_AuxData is ignored
-                                // when set to false. Defaults to false.
-    DtMxAuxDataConfig  m_AuxData; // Configuration of aux data input/output.
-};
-
-
-//+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
-//+=+=+=+=+=+=+=+=+=+=+=+=+=+ MATRIX CALLBACK DATA STRUCTURES +=+=+=+=+=+=+=+=+=+=+=+=+=+=
-//+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- class DtMxRawDataSdi -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-class DtMxRawDataSdi
-{
-public:
-    unsigned char*  m_pBuf;
-    int  m_BufSize;
-    int  m_Stride;              // Size of each line in bytes
-    int  m_StartLine;           // 1st line in buffer (1-based)
-    int  m_NumLines;            // #lines to transfer (-1 for all lines)
-    // Informational
-    DtMxPixelFormat  m_PixelFormat;  // Pixel format. Can be UYVY422 or YUVY422
-    int  m_Width;               // Width in pixels
-    int  m_Height;              // Height in pixels
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- class DtMxRawData -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-class DtMxRawData
-{
-public:
-    DtMxRawDataType  m_Type;    // Indicates which of the fields below is valid.
-
-    union {
-        DtMxRawDataSdi  m_Sdi;
-    };
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- class DtMxVideoPlaneBuf -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-class DtMxVideoPlaneBuf
-{
-public:
-    unsigned char*  m_pBuf;     // Pointer to buffer
-    int  m_BufSize;             // Total size in bytes of buffer
-    int  m_Stride;              // Size of each line in bytes
-    int  m_StartLine;           // 1st line in buffer (1-based)
-    int  m_NumLines;            // Number of lines. Usually equal to
-                                // DtMxVideoBuf::m_Height but might vary for some
-                                // pixel formats, for 4:2:0 planar for example both
-                                // chrominancy planes have m_NumLines twice as small
-                                // as DtMatrixVideoBuf::m_Height.
-
-    DtMxVideoPlaneBuf();
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- enum DtMxVidPattern -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-enum DtMxVidPattern
-{
-    DT_VIDPAT_BLACK_FRAME,
-    DT_VIDPAT_RED_FRAME,
-    DT_VIDPAT_GREEN_FRAME,
-    DT_VIDPAT_BLUE_FRAME,
-    DT_VIDPAT_WHITE_FRAME,
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- class DtMxVideoBuf -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-class DtMxVideoBuf
-{
-public:
-    DtMxVideoPlaneBuf  m_Planes[3];
-    int  m_NumPlanes;           // The number of planes directly depends on the pixel
-                                // format chosen.
-    DtMxPixelFormat  m_PixelFormat; // See DtMxVideoConfig::m_PixelFormat
-    int  m_Scaling;             // Scaling mode (OFF, 1/4, 1/16). DTAPI_SCALING_*
-    int  m_Width;               // Width in pixels
-    int  m_Height;              // Height in pixels
-
-    // Initialize the video buffers with a specific pattern in an efficient way. Can
-    // be used by the callback function for output rows if no useful data is available.
-    // Framework does not do this automatically because in normal operation it'd be
-    // a waste of resources to initialize buffers that will be overwritten later anyway.
-    DTAPI_RESULT  InitBuf(DtMxVidPattern  Pattern);
-    
-    DtMxVideoBuf();
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- class DtMxAuxData -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-class DtMxAuxData
-{
-public:
-    // Teletext
-    // Closed captioning
-
-    // Other anc data
-    bool  m_AncTimeCodeValid;
-    __int64  m_AncTimeCode;
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtMxAncPacket -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-class DtMxAncPacket
-{
-public:
-    int  m_Did;                     // Data identifier
-    int  m_SdidOrDbn;               // Secondary data identifier / Data block number
-    int  m_Dc;                      // Data count
-    int  m_Cs;                      // Check sum
-    unsigned short*  m_pUdw;        // User data words
-    int  m_Line;                    // Line number in which packet was found
-
-    // Operations
-public:
-    int  Type() const  { return (m_Did & 0x80)==0 ? 2 : 1; }
-
-public:
-    DtMxAncPacket();
-    virtual ~DtMxAncPacket();
-private:
-    DtMxAncPacket(const DtMxAncPacket&);
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.- class DtMxAudioChannelStatus -.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-class DtMxAudioChannelStatus
-{
-public:
-    // Get or set the sampling rate in Hz.
-    DTAPI_RESULT  GetSampleRate(int& SampleRate);
-    DTAPI_RESULT  SetSampleRate(int SampleRate);
-    // Get or set whether the channel contains linear audio PCM data or something else.
-    DTAPI_RESULT  GetPcmAudio(bool&  IsPcm);
-    DTAPI_RESULT  SetPcmAudio(bool  IsPcm);
-    // Get or set the the significant and maximum number of bits
-    DTAPI_RESULT  GetPcmNumBits(int&  NumBits, int&  NumAuxBits);
-    DTAPI_RESULT  SetPcmNumBits(int  NumBits, int  NumAuxBits=0);
-
-    unsigned char m_Data[24];   // Raw AES3 channel-status word data.
-    bool  m_Valid;              // True, if channel status word has been initialised
-
-    DtMxAudioChannelStatus();
-    virtual ~DtMxAudioChannelStatus();
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- class DtMxAudioChannel -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-class DtMxAudioChannel
-{
-public:
-    int  m_Index;                   // Index of this channel in underlaying AV format.
-    bool  m_Present;                // True if this channel was actually present in the
-                                    // input frame.
-    int  m_Service;                 // Index in m_Services vector for the service this
-                                    // channel is a part of.
-    
-    unsigned int*  m_pBuf;          // Buffer with audio samples
-    int  m_BufSizeSamples;          // Total size of buffer (in #samples)
-    int  m_NumValidSamples;         // Number of valid samples inside buffer
-    
-    DtMxAudioChannelStatus  m_Status;  // AES3 status word;
-
-    const int  m_NumSamplesHint;    // Suggested number of audio samples for this frame. 
-                                    // This is based on the audio frame number.
-    const DtMxAudioSampleType  m_Format;  // Format of audio samples: PCM32 or AES
-
-    // Constructor, destructor
-public:
-    DtMxAudioChannel();
-    virtual ~DtMxAudioChannel();
-    DtMxAudioChannel&  operator=(const DtMxAudioChannel& Other);
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- enum DtMxAudioServiceType -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-enum DtMxAudioServiceType
-{
-    DT_AUDIOSERVICE_UNKNOWN,
-    DT_AUDIOSERVICE_MONO,
-    DT_AUDIOSERVICE_DUAL_MONO,
-    DT_AUDIOSERVICE_STEREO,
-    DT_AUDIOSERVICE_5_1,
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- class DtFixedVector -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Represents a vector which has a fixed size (i.e. cannot add or remove elements)
-//
-template<typename T>
-class DtFixedVector
-{
-    // Operations
-public:
-    bool  empty() const { return m_Data.empty(); }
-    size_t  size() const { return m_Data.size(); }
-    T& operator[](size_t  n) { return m_Data[n]; }
-protected:
-    // Cast to a "normal" std::vector. NOTE: Intended for internal DTAPI use only
-    inline operator typename std::vector<T>& () { return m_Data; }
-    inline DtFixedVector&  operator=(const DtFixedVector&  Oth)
-    {
-        this->m_Data = Oth.m_Data;
-        return *this;
-    }
-    
-    // Data / Attributes
-private:
-    std::vector<T>  m_Data;     // Actual std::vector with the data
-
-    // Constructor / Desstructor
-public:
-    DtFixedVector() {}
-    virtual ~DtFixedVector() {}
-protected:
-    DtFixedVector(size_t  Size) { m_Data.resize(Size); }
-    DtFixedVector(const DtFixedVector&  Oth) { *this= Oth; }
-
-    // Friends
-private:
-    friend class  MxFrameImpl;
-    friend class  MxCommonData;
-    friend class  MxDecData;
-    friend class  MxActionAncEnc;
-    friend class  MxProcessImpl;
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- class DtMxAudioService -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-class DtMxAudioService
-{
-public:
-    bool  m_Valid;                    // Indicates whether or not this is a valid entry
-    DtMxAudioServiceType  m_ServiceType; // Type of service: mono, stereo, 5.1 etc.
-    std::vector<int>  m_Channels;     // Indices of channels that are part of this service
-    int  m_PcmNumBits;                // For PCM samples only: number of significant bits
-    bool  m_ContainsData;             // For AES only: true if data, false if PCM samples
-    int  m_SampleRate;                // Sample rate of audio channels
-    const int  m_SamplesInFrame;      // Number of samples in the current frame
-    //double  m_SamplePhase;            // Phase of the first audio sample
-    int  m_AudioFrameNumber;          // Indicates where we are in the audio frame 
-                                      // sequence frame 
-
-    // Constructor, destructor
-public:
-    DtMxAudioService();
-    DtMxAudioService&  operator=(const DtMxAudioService& Other);
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- class DtMxAudioData -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-class DtMxAudioData
-{
-public:
-    DtFixedVector<DtMxAudioChannel>  m_Channels;
-    DtFixedVector<DtMxAudioService>  m_Services;
-
-    // Utility function to make the AES3 status word consistent with the members in this
-    // struct. It's recommended to call this after modifying any members to make sure
-    // the final output is consistent.
-    DTAPI_RESULT  InitChannelStatus();
-    DTAPI_RESULT  InitChannelStatus(const DtMxAudioService&  Service);
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- enum DtMxFrameStatus -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-enum DtMxFrameStatus
-{
-    DT_FRMSTATUS_OK,               // Frame has been received and decoded without problems
-    DT_FRMSTATUS_SKIPPED,          // Row has been received and decoded but the callback
-                                   // function was never called. This will only be set
-                                   // for historic buffers, never for the current
-                                   // frame buffer.
-    DT_FRMSTATUS_DISABLED,         // Row has been disabled, buffers not available.
-    DT_FRMSTATUS_DUPLICATE,        // Frame data is duplicated from previous frame
-                                   // because the input was too slow.
-    DT_FRMSTATUS_DROPPED,          // Frame data was dropped because the input thread
-                                   // in the API was too slow. Data is not available. This
-                                   // should never happen under normal circumstances.
-    DT_FRMSTATUS_NO_SIGNAL,        // No signal at input port. Frame data not available.
-    DT_FRMSTATUS_WRONG_VIDSTD,     // Unconfigured video signal at input. Frame data
-                                   // not available.
-    DT_FRMSTATUS_DEV_DISCONNECTED, // Input (usb) device has been disconnected. Frame data
-                                   // not available.
-    DT_FRMSTATUS_ERROR_INTERNAL,   // Internal error. Frame data is not available.
-};
-
-//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- class DtMxFrame -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Data buffers for a single frame. Can be used for input, for output or be shared
-// between input and output.
-//
-class DtMxFrame
-{
-public:
-    const DtMxRowConfig*  const m_Config;
-                                    // Row configuration at the time the frame processing
-                                    // was started by the HLM.
-
-    // Status of this frame. DT_FRMSTATUS_DISABLED overrules all other status fields.
-    // For output-only rows this will always be DT_FRMSTATUS_OK or DT_FRMSTATUS_DISABLED.
-    // For input/output and output-only rows the data buffers requested will always be 
-    // available if m_Status is not DT_FRMSTATUS_DISABLED.
-    DtMxFrameStatus  m_Status;
-
-    // Configured video standard, or for fixed-rate rows the actual received rate.
-    // For fixed rate output rows this has to be set by callback.
-    int  m_VidStd;
-
-    // For input and input/output rows this can contain a pointer to the data of an input
-    // frame that was received before this frame but not processed to maintain clock sync.
-    // Normally this is a NULL pointer, but if the input is faster than the HLM clock
-    // occasionally a frame needs to be dropped to keep the system in sync. By providing
-    // a pointer to the data of the dropped frame the callback might be able to prevent
-    // audio hickups.
-    // For each frame processed by the callback function there will be at most one
-    // dropped frame due to different clocks, so this->m_DroppedFrame->m_DroppedFrame is
-    // always NULL.
-    DtMxFrame*  m_DroppedFrame;
-
-    bool  m_InpPhaseValid;      // True if m_InpPhase contains a valid value.
-    double  m_InpPhase;         // Phase of this input relative to the HLM clock source.
-                                // In a genlocked system this should be approximately
-                                // zero. In a non-genlocked system the HLM will try
-                                // to keep it between -1.25 and 0.05. A frame drop will
-                                // increase this value by 1.
-
-    bool  m_RawTimestampValid;  // True if m_RawTimestamp is valid
-    __int64  m_RawTimestamp;    // 64-bit timestamp of the arrival of the SDI frame.
-                                // Timestamps created by different hardware devices have
-                                // no relation to eachother.
-
-    // Raw data buffer
-    bool  m_RawDataValid;       // True, if the raw data is valid; False if invalid
-    DtMxRawData  m_RawData;
-    // Video buffers for field 1 and 2
-    bool  m_VideoValid;         // True, if the video data is valid; False if invalid
-    DtMxVideoBuf  m_Video[2];
-    // Audio data
-    bool  m_AudioValid;         // True, if the audio data is valid; False if invalid
-    DtMxAudioData  m_Audio;
-    // Auxiliary data
-    bool  m_AuxDataValid;       // True, if the aux data is valid; False if invalid
-    DtMxAuxData  m_AuxData;
-
-    // Access functions for raw ANC packets
-    virtual DTAPI_RESULT  AncAddPacket(DtMxAncPacket&  AncPacket, int HancVanc,
-                                                             int Stream, int Link=-1) = 0;
-    virtual DTAPI_RESULT  AncDelPacket(int Did, int Sdid, int StartLine,
-                       int NumLines, int HancVanc, int Stream, int Mode, int Link=-1) = 0;
-    virtual DTAPI_RESULT  AncGetPacket(int Did, int Sdid, DtMxAncPacket*, int& NumPackets,
-                                               int HancVanc, int Stream, int Link=-1) = 0;
-    
-    // Constructor, destructor
-protected:
-    DtMxFrame();
-    virtual ~DtMxFrame();
-private:
-    // No implementation is provided for the copy constructor or for operator=
-    DtMxFrame(const DtMxFrame&);
-    DtMxFrame& operator=(const DtMxFrame&);
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- class DtMxRowData -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-class DtMxRowData
-{
-public:
-    // Pointer to current frame. This is the only read/write buffer, all other buffers
-    // are read-only.
-    DtMxFrame*  m_CurFrame;
-
-    // m_Hist.size() == RowSize-1
-    // m_Hist[0] is the previous frame, m_Hist[1] the one before that etc.
-    std::vector<const DtMxFrame*>  m_Hist;
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- class DtMxData -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Top-level data class for the user callback function.
-//
-class DtMxData
-{
-public:
-    __int64  m_Frame;           // Frame counter. Increases by 1 for every frame the
-                                // matrix clock source processes.
-    int  m_Phase;               // Current phase (0..NumPhases-1). Each callback function
-                                // can run up to NumPhases time in parallel, each of them
-                                // will be called with a different value in m_Phase.
-    int  m_NumSkippedFrames;    // Error counter, will normally be 0. If due to a timeout
-                                // the matrix API has to skip the callback processing of
-                                // a number of frames, it'll indicate it here in the data
-                                // of the next processed frame.
-    DtFixedVector<DtMxRowData>  m_Rows; // Data per row
-    
-    // Constructor, destructor
-public:
-    DtMxData();
-    virtual ~DtMxData();
-};
-
-//+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
-//=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ MATRIX CONTROL +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
-//+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
-
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- class DtMxPort -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// The DtMxPort is used as abstraction for one logical input or output. Often this
-// maps 1-to-1 to one physical output port, but other mappings are possible as well.
-// 4K-video over SDI can be transported over 4x3G links for example, creating
-// a 1 logical to 4 physical ports mapping.
-//
-// Example for single-port:
-// Matrix.AttachToInput(0, DtMxPort(&Dvc, 1));
-// 
-// Example for 4K (Assuming DtDevice Dvc; which is attached to DTA-2174):
-// DtMxPort  Port4k(DTAPI_VIDSTD_2160P60, DTAPI_LINK_4K_SMPTE425);
-// Port4k.AddPhysicalPort(&Dvc, 1);
-// Port4k.AddPhysicalPort(&Dvc, 2);
-// Port4k.AddPhysicalPort(&Dvc, 3);
-// Port4k.AddPhysicalPort(&Dvc, 4);
-// Matrix.AttachToOutput(0, Port4k, 3);
-//
-// 3G over 1x3G-SDI link:
-// DtMxPort  Port3G1(DTAPI_VIDSTD_1080P60);
-// Port3G1.AddPhysicalPort(&Dvc, 1);
-// Alternatively "DtMxPort  Port3G;" is enough, VidStd can be determined
-// from the IoConfig.
-//
-// 3G over 2xHD-SDI links (NOT SUPPORTED):
-// DtMxPort  Port3G2(DTAPI_VIDSTD_1080P60, DTAPI_LINK_3G_SMPTE372);
-// Port3G2.AddPhysicalPort(&Dvc, 1);
-// Port3G2.AddPhysicalPort(&Dvc, 2);
-//
-// After Matrix.AttachToInput() / Matrix.AttachToOutput() it's completely transparent
-// whether Port3G1 or Port3G2 is used. Both support exactly the same data and filtering,
-// the matrix API will take care of splitting over 1 or multiple physical links.
-//
-class DtMxPort
-{
-public:
-    // 1. Constructor that doesn't link to a physical port yet.
-    DtMxPort();
-    // 2. Constructor that links to a single physical port. Video standard and
-    // link standard are not explicitly set and will be determined from IOConfig.
-    DtMxPort(DtDevice*, int  Port, int  ClockPriority=0);
-    // 3. Constructor that initializes the object for a multi-link structure.
-    DtMxPort(int  VidStd, int  LinkStd);
-    // 4. Copy constructor
-    DtMxPort(const DtMxPort&);
-    // Destructor
-    virtual ~DtMxPort();
-    // Assignment operator
-    DtMxPort& operator=(const DtMxPort&);
-    
-    DTAPI_RESULT  AddPhysicalPort(DtDevice*, int  Port, int  ClockPriority=0);
-
-private:
-    class MxPortImpl*  m_pImpl;
-    friend class DtMxProcess;
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtMxProcFrameFunc -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-// Signature of a user-defined matrix callback function.
-//
-typedef void  DtMxProcFrameFunc(DtMxData* pData, void* pOpaque);
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- DtMxVidBufFreeCallback -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-// Signature of callback function that will be called by the HLM to free user-provided
-// video buffers.
-//
-typedef void  DtMxVidBufFreeCallback(void* pMem, void* pOpaque);
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- enum DtMxClockMode -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-//
-enum DtMxClockMode
-{
-    DT_MXCLOCK_AUTO,            // Default, HLM internally picks a device as clock source
-    DT_MXCLOCK_PCR_TIME_ACC,    // HLM changes internal clock source based on PCR samples
-                                // provided by user. Each PCR sample is accurately
-                                // timestamped (by using transparent input mode on
-                                // a DekTec device).
-    DT_MXCLOCK_PCR_TIME_IP,     // HLM changes internal clock source based on PCR samples
-                                // provided by user. The PCR samples do not have an
-                                // accurate timestamp, so HLM will adjust the internal
-                                // clock very slowly.
-    DT_MXCLOCK_SW_FIFO,         // User provides timestamped Fifo-loads. HLM controls the
-                                // clock so that the average fifo load remains the same.
-};
-
-
-// Affinity masks for several threads. Each can be set to 0 to disable them.
-class  DtMxCpuAffinity
-{
-public:
-    unsigned int  m_Default;    // Mask for all other threads
-    unsigned int  m_Dma;        // Mask for DMA threads
-    unsigned int  m_Decode;     // Mask for decode threads
-    unsigned int  m_Encode;     // Mask for encode threads
-};
-
-//.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- class DtMxProcess -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-//
-class DtMxProcess
-{
-public:
-    // The matrix process has 2 states: IDLE and RUNNING. You can switch between those
-    // states by calling Start() and Stop(). Most functions can only be called in IDLE and
-    // will return immediately with an error if called in RUN mode.
-
-    // Register a new callback function that will be called by the framework whenever
-    // a new frame is ready for processing.
-    DTAPI_RESULT  AddMatrixCbFunc(DtMxProcFrameFunc* pFunc, void* pOpaque);
-
-    // Reset complete matrix process. The following things will be done:
-    // 1. Detach all attached ports.
-    // 2. Set NumPhases to default value.
-    // 3. Clear any configuration done via SetRowConfig()
-    // 4. Set end-to-end delay to default.
-    // 5. Remove all callbacks.
-    DTAPI_RESULT  Reset();
-    
-    // The matrix can have any number of rows (limited by system resources). Row numbers
-    // start with 0 and go up to N-1 (where N=number of rows). Rows can be attached to
-    // ports in any order, it's not required to start with row 0.
-    // Each row can be attached to:
-    // - 1 input port
-    // - 1 or more output ports
-    // - 1 input port and 1 or more output ports
-    DTAPI_RESULT  AttachRowToInput(int Row, const DtMxPort& Port);
-    DTAPI_RESULT  AttachRowToOutput(int Row, const DtMxPort& Port, int ExtraOutDelay=0);
-
-    // Change the way the HLM clock source is controlled.
-    DTAPI_RESULT  SetClockControl(DtMxClockMode  ClockMode, DtDevice* pDvc=NULL,
-                                                                     int  AvgFifoLoad=-1);
-
-    // Can be called by the user while the matrix process is running. HLM will keep
-    // track of a number of these samples and will adjust it's clock source so the
-    // output rate is matched to the provided samples.
-    DTAPI_RESULT  NewClockSample(__int64  PcrOrFifoLoad, int  RefClkCnt);
-    
-    // Changes the number of phases. Global setting per matrix.
-    DTAPI_RESULT  SetNumPhases(int  NumPhases);
-
-    // SetRowConfig sets the configuration and validates if it is possible valid. Not all
-    // errors can be caught at this time since some depend on the video standard (for
-    // example DtMxVideoConfig::m_NumLines1 if not equal to -1).
-    // SetRowConfig(Row) is only valid after AttachToInput(Row)/AttachToOutput(Row) has
-    // been called and will return an error otherwise.
-    DTAPI_RESULT  SetRowConfig(int Row, const DtMxRowConfig&  Config);
-
-    // Function to change the video standard for all ports attached to the given row.
-    DTAPI_RESULT  SetVidStd(int Row, int  VidStd);
-
-    // Set a callback function the framework can use to free user-provided video buffers.
-    DTAPI_RESULT  SetVidBufFreeCb(DtMxVidBufFreeCallback* pFunc);
-
-    // Get the minimum/default end-to-end delay. CbFrames will be an approximation
-    // of the time the user callback function has relative to the time of a complete
-    // frame. GetDefEndToEndDelay() will return a value: CbFrames >= NumPhases.
-    // GetMinEndToEndDelay() will return a value: NumPhases-1 < CbFrames <= NumPhases.
-    DTAPI_RESULT  GetMinEndToEndDelay(int&  Delay, double&  CbFrames);
-    DTAPI_RESULT  GetDefEndToEndDelay(int&  Delay, double&  CbFrames);
-    DTAPI_RESULT  SetEndToEndDelay(int  Delay);
-
-    // Makes sure the configuration of all rows and global matrix settings is consistent.
-    // If it is, start the matrix process.
-    DTAPI_RESULT  Start();
-    // Stop a runnig matrix process and return to IDLE.
-    DTAPI_RESULT  Stop();
-
-    DTAPI_RESULT  SetThreadAffinity(const DtMxCpuAffinity&  Affinity);
-
-    //TODO: add function to initialize "error-frame" for input/output and output rows.
-    // This error-frame can be played out during the first few frames when there is
-    // no data available yet and when the input is stalled and configuration requests it.
-    
-    // Print profiling information collected while the matrix was running
-    DTAPI_RESULT  PrintProfilingInfo();
-    
-    // Implementation data
-private:
-    class MxProcessImpl*  m_pImpl;
-
-    // Constructor, destructor
-public:
-    DtMxProcess();
-    ~DtMxProcess();
-private:
-    // No implementation is provided for the copy constructor or for operator=
-    DtMxProcess(const DtMxProcess&);
-    DtMxProcess& operator=(const DtMxProcess&);
-};
-
-
-} // namespace Dtapi
-
-#ifndef _NO_USING_NAMESPACE_DTAPI
-using namespace Dtapi;
-#endif
-
-#endif //#ifndef __DTAPI_H
-
diff --git a/extra_lib/include/OpenSVCDecoder/ControlLayer.h b/extra_lib/include/OpenSVCDecoder/ControlLayer.h
deleted file mode 100644
index bfab47e..0000000
--- a/extra_lib/include/OpenSVCDecoder/ControlLayer.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*****************************************************************************
-   *
-   *  SVC4DSP developped in IETR image lab
-   *
-   *
-   *
-   *              Médéric BLESTEL <mblestel at insa-rennes.Fr>
-   *              Mickael RAULET <mraulet at insa-rennes.Fr>
-   *              http://www.ietr.org/
-   *
-   *
-   *
-   *
-   *
-   * This library is free software; you can redistribute it and/or
-   * modify it under the terms of the GNU Lesser General Public
-   * License as published by the Free Software Foundation; either
-   * version 2 of the License, or (at your option) any later version.
-   *
-   * This library 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
-   * Lesser General Public License for more details.
-   *
-   * You should have received a copy of the GNU Lesser General Public
-   * License along with this library; if not, write to the Free Software
-   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-   *
-   *
-   * $Id$
-   *
-   **************************************************************************/
-
-#define WINEXPORT
-
-#ifdef TCPMP
-#ifndef POCKET_PC
-#include "windows.h"
-#undef WINEXPORT
-#define WINEXPORT WINAPI
-#endif
-#endif
-
-
-void getLayer(int *num_layer);
diff --git a/extra_lib/include/OpenSVCDecoder/ParseAU.h b/extra_lib/include/OpenSVCDecoder/ParseAU.h
deleted file mode 100644
index 875d160..0000000
--- a/extra_lib/include/OpenSVCDecoder/ParseAU.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*****************************************************************************
-*
-*  SVC4DSP developped in IETR image lab
-*
-*
-*
-*              Médéric BLESTEL <mblestel at insa-rennes.Fr>
-*              Mickael RAULET <mraulet at insa-rennes.Fr>
-*              http://www.ietr.org/
-*
-*
-*
-*
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Lesser General Public
-* License as published by the Free Software Foundation; either
-* version 2 of the License, or (at your option) any later version.
-*
-* This library 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
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-*
-*
-* $Id$
-*
-**************************************************************************/
-
-
-
-void ParseAuPlayers(void *PlayerStruct, const unsigned char *buf, int buf_size, int nal_length_size, int is_avc);
-int GetDqIdMax(const unsigned char *buf, int buf_size, int nal_length_size, int *DqidTable, int is_avc);
-int Geth264NalSize(const unsigned char *buf, int buf_size, int *bufindex);
-
diff --git a/extra_lib/include/OpenSVCDecoder/SVCDecoder_ietr_api.h b/extra_lib/include/OpenSVCDecoder/SVCDecoder_ietr_api.h
deleted file mode 100644
index cf8d8d4..0000000
--- a/extra_lib/include/OpenSVCDecoder/SVCDecoder_ietr_api.h
+++ /dev/null
@@ -1,144 +0,0 @@
-/*****************************************************************************
-*
-*  SVC4DSP developped in IETR image lab
-*
-*
-*
-*              Médéric BLESTEL <mblestel at insa-rennes.Fr>
-*              Mickael RAULET <mraulet at insa-rennes.Fr>
-*              http://www.ietr.org/
-*
-*
-*
-*
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Lesser General Public
-* License as published by the Free Software Foundation; either
-* version 2 of the License, or (at your option) any later version.
-*
-* This library 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
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-*
-*
-* $Id$
-*
-**************************************************************************/
-
-#ifndef _SVCDecoder_ietr_api_h
-#define _SVCDecoder_ietr_api_h
-
-
-#include "SvcInterface.h"
-
-
-enum {
-	SVC_STATUS_ERROR	= -1,
-	SVC_STATUS_OK	    = 0,	// no error and no frame ready
-	SVC_IMAGE_READY     = 1,	// no error and image ready
-	SVC_GHOST_IMAGE		= 2		// no image for chosen layer but image could be ready for other layers
-};
-
-
-/*======================================================================================================
-int SVCDecoder_init();
-This method initializes the internal resources of the decoder
- at return SVC_STATUS_OK if creation is successful
-======================================================================================================*/
-int SVCDecoder_init(void **PlayerStruct);
-
-
-/*======================================================================================================
-void UpdateLayer(int *DqIdTable, int *CurrDqId, int MaxDqId, int Command);
-Use this method to change of quality, spatial or temporal scalability during the 
-decoding process.
-The DqIdTable specifies the DqId of each layer present into the stream.
-CurrDqId specifies the DqId of the current layer.
-MaxDqId specifies the maximal DqId present into the access unit.
-Command specifies the action to execute:
-0: To switch down of spatial or quality scalability
-1: To switch up of spatial or quality scalability 
-2: To switch up to the layer with the higthest DqId
-3: To switch down of temporal scalability
-4: To switch up of temporal scalability
- at return nothing
-=======================================================================================================*/
-void UpdateLayer(int *DqIdTable, int *CurrDqId, int *TemporalCom, int *TemporalId, int MaxDqId, int Command);
-
-
-
-/*======================================================================================================
-void SetCommandLayer(int *Command, int DqIdMax, int CurrDqId, int *TemporalCom, int TemporalId);
-Use this method to generate the right command for the SVC decoder.
-The Command is a 4 size table given to the decoder.
-DqIdMax specifies the maximal DqId present into the access unit.
-CurrDqId specifies the DqId of the current layer.
-TemporalCom is the command to use concerning the temporal scalability.
-0 -> do nothing
-1 -> decode a lower temporal scalability.
-2 -> decode a highter temporal scalability.
-3 -> define a specific temporal scalability. (use TemporalId variable to set).
- at return nothing
-=======================================================================================================*/
-void SetCommandLayer(int *Command, int DqIdMax, int CurrDqId, int *TemporalCom, int TemporalId);
-
-
-/*======================================================================================================
-int decodeNAL(	unsigned char* nal, int nal_length, OPENSVCFRAME *Frame, int DqIdMax);
-Use this method to give a new NAL Unit to the decoder. The NAL content (no start code)
-is stored at the address given by the argument pNAL and the length of the NAL is provided 
-by the argument nal_length. Memory of this nal buffer is managed by the application.
-If the function returns the code SVC_IMAGE_READY, this means that an image is ready and in this case, 
-the arguments *Frame has been updated by the decoder and the image plans are contained at 
-the addresses pY, PU, pV.
-The image stored at these location is an image centered in a rectangle of size (*pWidth + 32, *pHeight + 32)
-for Y and ((*pWidth + 32) / 2, (*pHeight + 32) / 2)) for U and V.
-Memory of these image buffers is managed by the decoder.
-In case of a SVC stream, the largest DqIq of the Access Unit should be given.
-
- at param nal is the address of the buffer that contains the NAL unit
- at param nal_length is the size of NAL Unit data
- at param Frame Contains all parameters from the displayed picture
- at param DQIdMax is the largest DQId of the current access unit
- at return SVC_STATUS_OK or SVC_STATUS_ERROR or SVC_IMAGE_READY or SVC_GHOST_IMAGE
-======================================================================================================*/
-int decodeNAL(void *PlayerStruct, unsigned char* nal, int nal_length, OPENSVCFRAME *Frame, int *LayerCommand); 
-
-
-/*======================================================================================================
-int SVCDecoder_close();
-This method releases the internal resources of the decoder
- at return SVC_STATUS_OK if creation is successfull
-=======================================================================================================*/
-int SVCDecoder_close(void *PlayerStruct);
-
-/*======================================================================================================
-int  GetDqIdMax(const unsigned char *buf, int buf_size, int nal_length_size, int *DqidTable, int is_avc);
-This method return the max DqId commputed into the access unit.
-This method should be called once in each access unit.
- at param buf is the input data to decode
- at param buf_size is the size of access unit
- at param nal_length_size is the start code length
- at param DqidTable is a table in which all DqId will be stored.
- at param is_avc indicates if the stream contained SVC NAL.
-=======================================================================================================*/
-int GetDqIdMax(const unsigned char *buf, int buf_size, int nal_length_size, int *DqidTable, int is_avc);
-
-
-/*======================================================================================================
-void ParseAuPlayers(void *PlayerStruct, const unsigned char *buf, int buf_size, int nal_length_size, int is_avc;
-This method parses the first access unit in order to configure the decoder.
-This method has to be done once by video.
- at param buf is the input data to decode
- at param buf_size is the size of access unit
- at param nal_length_size is the start code length
- at param is_avc indicates if the stream contained SVC NAL.
-=======================================================================================================*/
-void ParseAuPlayers(void *PlayerStruct, const unsigned char *buf, int buf_size, int nal_length_size, int is_avc);
-#endif	// SVCDecoder_ietr_api
diff --git a/extra_lib/include/OpenSVCDecoder/SvcInterface.h b/extra_lib/include/OpenSVCDecoder/SvcInterface.h
deleted file mode 100644
index e7b5323..0000000
--- a/extra_lib/include/OpenSVCDecoder/SvcInterface.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*****************************************************************************
-*
-*  SVC4DSP developped in IETR image lab
-*
-*
-*
-*              Médéric BLESTEL <mblestel at insa-rennes.Fr>
-*              Mickael RAULET <mraulet at insa-rennes.Fr>
-*              http://www.ietr.org/
-*
-*
-*
-*
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Lesser General Public
-* License as published by the Free Software Foundation; either
-* version 2 of the License, or (at your option) any later version.
-*
-* This library 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
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-*
-*
-* $Id$
-*
-**************************************************************************/
-
-#ifndef SVCINTERFACE_H
-#define SVCINTERFACE_H
-
-#define QoE_
-
-#ifdef QoE
-#include "SvcToQoE.h"
-#endif
-
-
-typedef struct{
-
-	int Width;				//Output frame width
-	int Height;				//Output frame height
-	int Address;
-	unsigned char* pY[1];	//Output frame Y
-	unsigned char* pU[1];	//Output frame U
-	unsigned char* pV[1];	//Output frame V
-
-#ifdef QoE
-	SVCTOQOE *QoEData[1];	//QoE structure
-#endif
-
-} OPENSVCFRAME;
-
-
-#endif
diff --git a/extra_lib/include/a52dec/a52.h b/extra_lib/include/a52dec/a52.h
deleted file mode 100644
index 9db52cc..0000000
--- a/extra_lib/include/a52dec/a52.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * a52.h
- * Copyright (C) 2000-2002 Michel Lespinasse <walken at zoy.org>
- * Copyright (C) 1999-2000 Aaron Holtzman <aholtzma at ess.engr.uvic.ca>
- *
- * This file is part of a52dec, a free ATSC A-52 stream decoder.
- * See http://liba52.sourceforge.net/ for updates.
- *
- * a52dec 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.
- *
- * a52dec 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#ifndef A52_H
-#define A52_H
-
-#ifndef LIBA52_DOUBLE
-typedef float sample_t;
-#else
-typedef double sample_t;
-#endif
-
-typedef struct a52_state_s a52_state_t;
-
-#define A52_CHANNEL 0
-#define A52_MONO 1
-#define A52_STEREO 2
-#define A52_3F 3
-#define A52_2F1R 4
-#define A52_3F1R 5
-#define A52_2F2R 6
-#define A52_3F2R 7
-#define A52_CHANNEL1 8
-#define A52_CHANNEL2 9
-#define A52_DOLBY 10
-#define A52_CHANNEL_MASK 15
-
-#define A52_LFE 16
-#define A52_ADJUST_LEVEL 32
-
-a52_state_t * a52_init (uint32_t mm_accel);
-sample_t * a52_samples (a52_state_t * state);
-int a52_syncinfo (uint8_t * buf, int * flags,
-		  int * sample_rate, int * bit_rate);
-int a52_frame (a52_state_t * state, uint8_t * buf, int * flags,
-	       sample_t * level, sample_t bias);
-void a52_dynrng (a52_state_t * state,
-		 sample_t (* call) (sample_t, void *), void * data);
-int a52_block (a52_state_t * state);
-void a52_free (a52_state_t * state);
-
-#endif /* A52_H */
diff --git a/extra_lib/include/a52dec/mm_accel.h b/extra_lib/include/a52dec/mm_accel.h
deleted file mode 100644
index 25258c3..0000000
--- a/extra_lib/include/a52dec/mm_accel.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * mm_accel.h
- * Copyright (C) 2000-2002 Michel Lespinasse <walken at zoy.org>
- * Copyright (C) 1999-2000 Aaron Holtzman <aholtzma at ess.engr.uvic.ca>
- *
- * This file is part of a52dec, a free ATSC A-52 stream decoder.
- * See http://liba52.sourceforge.net/ for updates.
- *
- * a52dec 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.
- *
- * a52dec 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#ifndef MM_ACCEL_H
-#define MM_ACCEL_H
-
-/* generic accelerations */
-#define MM_ACCEL_DJBFFT		0x00000001
-
-/* x86 accelerations */
-#define MM_ACCEL_X86_MMX	0x80000000
-#define MM_ACCEL_X86_3DNOW	0x40000000
-#define MM_ACCEL_X86_MMXEXT	0x20000000
-
-uint32_t mm_accel (void);
-
-#endif /* MM_ACCEL_H */
diff --git a/extra_lib/include/avcap/CaptureDevice.h b/extra_lib/include/avcap/CaptureDevice.h
deleted file mode 100644
index c0636b3..0000000
--- a/extra_lib/include/avcap/CaptureDevice.h
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de>
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>
- */
-
-
-#ifndef CAPTUREDEVICE_H_
-#define CAPTUREDEVICE_H_
-
-#include <string>
-#include <list>
-
-#include "avcap-export.h"
-#include "DeviceDescriptor.h"
-
-//! This is the namespace which contains all classes of the avcap-library.
-
-namespace avcap
-{
-	// forward declarations
-	class ConnectorManager;
-	class ControlManager;
-	class CaptureManager;
-	class DeviceDescriptor;
-	class FormatManager;
-
-	/*! \brief This class is an abstraction of a video capture device.
-	 *
-	 * It is the main entry point for an application to access the functionality of
-	 * a capture device, i.e. to query capabilities and settings of the device, to
-	 * manipulate them and to capture the video.
-	 *
-	 * The access to the functionality of a capture device is divided into different domains and is
-	 * provided by so called managers. See the documentation of the various Manager-classes for
-	 * the details of their usage. The managers and their responsibilities are:
-	 *
-	 * <ul>
-	 * <li> CaptureManager: start/stop capture and register a capture-handler </li>
-	 * <li> ConnectorManager: query available inputs/outputs of the device and get/set them</li>
-	 * <li> ControlManager: query available controls of the device and get/set their values </li>
-	 * <li> FormatManager: query and get/set available formats,
-	 * 	their properties and resolutions associated with them </li>
-	 * </ul>
-	 *
-	 * CaptureDevice-classes implementing the back-end for a certain capture-API must derive from this class and
-	 * implement the abstract methods to provide the API-specific manager-classes.
-	 * However, if you want to use avcap only, you can use one of the following implementations,
-	 * representing the supported, existing devices (depending on the operating system avcap has
-	 * been build on, not all of them may be available and/or not all methods of their managers are implemented):
-	 *
-	 * <ul>
-	 * <li> V4L2_Device (Linux): devices that are supported by a Video4Linux2-API driver
-	 * (Requires read/write access to the /dev/video* -file of the device)</li>
-	 * <li> V4L1_Device (Linux): devices that are supported by a Video4Linux-API driver
-	 * (Requires read/write access to the /dev/video* -file of the device)</li>
-	 * <li> AVC_Device (Linux): support for AV/C-Devices (e.g. DV-Cams).
-	 * (Requires: libiec61883, libavc1394, librom1394, libraw1394 and read/write access to /dev/raw1394)</li>
-	 * <li> QT_Device (MAC OS X): capture from a device using the QuickTime SampleGrabber </li>
-	 * <li> DS_Device (Win32): capture from a device using a DirectShow filter-graph</li>
-	 * </ul>
-	 *
-	 * A concrete CaptureDevice-object must not be created manually. A unique instance can be obtained by calling
-	 * the method DeviceDescriptor::getDevice() between successive calls to DeviceDescriptor::open() and close().
-	 * All available DeviceDescriptors representing the capture devices found on a system can be obtained by calling
-	 * DeviceCollector::instance()->getDeviceList(). The CaptureDevice-object is owned by the DeviceDescriptor,
-	 * so you must not delete the CaptureDevice instance.
-	 *
-	 */
-
-	class AVCAP_Export CaptureDevice
-	{
-	public:
-		//! Constructor
-		inline CaptureDevice()
-			{}
-
-		//! Destructor
-		virtual inline ~CaptureDevice()
-			{}
-
-		//! Return the descriptor of the device.
-		/*! \return The DeviceDescriptor-object.*/
-		virtual const DeviceDescriptor* getDescriptor() = 0;
-
-		//! Use this manager to start/stop capturing and to register a user defined CaptureHandler.
-		/*! \return The VidCapManager.*/
-		virtual CaptureManager* getVidCapMgr() = 0;
-
-		//! Use this manager to query available audio/video inputs/outputs and to select them.
-		/*! \return The ConnectorManager. */
-		virtual ConnectorManager* getConnectorMgr() = 0;
-
-		/*! Use this manager to query and to adjust the available controls of the device (e.g.
-		 * brightness, contrast, saturation...).
-		 * \return The ControlManager. */
-		virtual ControlManager*	getControlMgr() = 0;
-
-		//! Use this manager to query the available formats, video standards and resolutions to select the desired ones.
-		/*! \return The FormatManager. */
-		virtual FormatManager* getFormatMgr() = 0;
-
-	private:
-		//! Open the device and do initialization. May fail, if already opened before.
-		/*! This method creates the managers. Don't use them before open() has been called.
-		 * \return 0 if successful, -1 else
-		 * */
-		virtual int open() = 0;
-
-		//! Close the device and do cleanup.
-		/*! All IOBuffers received by a capture-CallbackHandler should have called their
-		 * release()-method, before close() is called to ensure propper cleanup. Usually this is guaranteed,
-		 * if the buffer is released in the context of the capture-thread from within handleCapture().
-		 * All managers are destroyed by this method and are thus not available anymore after calling close().
-		 * \return 0 if successful, -1 else */
-		virtual int close() = 0;
-	};
-}
-
-#endif // CAPTUREDEVICE_H_
-
-/*! \mainpage avcap-library
- *
- * \section intro Introduction
- *
- * The avcap-library is a cross-API, cross-platform simple and easy to use C++
- * video capture library. It's aim is to provide a unified API for
- * Linux, Windows and Mac OS X to capture video from appropriate hardware. It hides the
- * system specific quirks and issues of different API's used on different systems to access video
- * capture hardware and hopefully helps to write portable capture-applications.
- *
- * \subsection linux Linux
- * Under GNU/Linux the avcap-library supports Video4Linux-Devices, Video4Linux2-Devices and AV/C-Devices (e.g.
- * DV-Cams) as capture sources. Note that you need read/write permission to the /dev/video* files
- * to use V4L(2)-Devices. Usually it is sufficient, if the user is a member of the group that owns this files
- * (usually group 'video'). To capture from AV/C-Devices the user needs read/write permission to /dev/raw1394. Membership
- * in the group 'disk' should be sufficient here.
- *
- * \subsection windows Win32 (Implementation by Robin Luedtke, Nico Pranke)
- * The Windows-version is basically a class wrapper for the DirectShow API and thus
- * supports only devices with a WDM (Windows driver model) or an old VFW (Video for
- * windows) compliant capture device driver. Understanding the avcap Win32 implementation
- * may be a little difficult because of the following reasons:
- * First, DirectShow is based on the Windows COM (component object model), second,
- * in some cases, DirectShow is a little confusing (e.g. some DirectShow functions have a strange behavior -- workarounds
- * are inevitable).
- * In addition to this, VFW, WDM and even WDM devices itself are handled differently by DirectShow.
- * Third, some important documentation is missing in the DirectShow documentation.\n \n
- *
- * \subsection mac Mac OS X
- *
- * The implementation for Darwin uses the QuickTime SequenceGrabber-Component and has been tested with the built-in
- * iSight, various USB-cams and DV-Cams.
- *
- * \section install Building and Installation
- *
- * See the INSTALL file.
- *
- * \section Usage
- *
- * For an example on how to use the avcap-library take a look at the captest-program and read the documentation of
- * class CaptureDevice to have a good starting point.
- *
- * \section licence Licence
- *
- * (c) 2005-2008 Nico Pranke <Nico.Pranke at googlemail.com>, Win32 implementation by Robin Luedtke <RobinLu at gmx.de> \n\n
- *
- * For non-commercial use, avcap is distributed under the GNU General Public License version 2. Refer to the file "COPYING" for details.
- *
- * For commercial use, please contact Nico Pranke <Nico.Pranke at googlemail.com> for licensing.
-*/
-
diff --git a/extra_lib/include/avcap/CaptureHandler.h b/extra_lib/include/avcap/CaptureHandler.h
deleted file mode 100644
index 29c1105..0000000
--- a/extra_lib/include/avcap/CaptureHandler.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>
- */
-
-#ifndef CAPTUREHANDLER_H_
-#define CAPTUREHANDLER_H_
-
-#include "avcap-export.h"
-
-namespace avcap
-{
-	//! Abstract base class for capture handlers.
-
-	/*! If an application wants to capture data, it must implement a CaptureHandler and must register it
-	 * with the VidCapManager of the CaptureDevice. The VidCapManager will call handleCaptureEvent() 
-	 * always a new frame has been captured. If the buffer isn't used  
-	 * anymore the IOBuffer::release() method must be called in order to enable the
-	 * VidCapManager to reuse or release the buffer. */
-
-	class AVCAP_Export CaptureHandler
-	{
-	public:
-		//! Consturctor
-		inline CaptureHandler() 
-			{}
-			
-		//! Destructor
-		virtual inline ~CaptureHandler() 
-			{}
-		
-		//! This method is called if a new frame has been captured by the VidCapManager.
-		/*! If the buffer isn't used anymore, then the method IOBuffer::release() must be
-		 * called. 
-		 * \param io_buf The buffer containing the captured frame. */
-		virtual void handleCaptureEvent(class IOBuffer* io_buf) = 0;
-	};
-}
-
-#endif // CAPTUREHANDLER_H_
diff --git a/extra_lib/include/avcap/CaptureManager.h b/extra_lib/include/avcap/CaptureManager.h
deleted file mode 100644
index 4a39ae6..0000000
--- a/extra_lib/include/avcap/CaptureManager.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>
- */
-
-#ifndef CAPTUREMANAGER_H_
-#define CAPTUREMANAGER_H_
-
-#if !defined(_MSC_VER) && !defined(USE_PREBUILD_LIBS)
-# include "avcap-config.h"
-#endif
-
-#include "avcap-export.h"
-
-namespace avcap
-{
-	class CaptureHandler;
-	class IOBuffer;
-	
-	//! Abstract interface to access capture related tasks of a CaptureDevice.
-	
-	/*! An implementation of this class is provided by the API-specific CaptureDevice. 
-	 * The CaptureManager can be used by applications to register a CaptureHandler and
-	 * to start/stop the capture. There is only one CaptureHandler at the same time.
-	 * To distribute the captured data to more than one interested sink is the responsibility 
-	 * of the application. */
-	
-	class AVCAP_Export CaptureManager
-	{
-	public:
-		enum
-		{
-			MAX_BUFFERS = 32,	//!< The maximum number of IOBuffers.
-			DEFAULT_BUFFERS = 16	//!< The default number of used IOBuffers.
-		};
-		
-			
-#ifdef AVCAP_LINUX
-		enum IOMethod
-		{
-			IO_METHOD_NOCAP = 0,
-	        IO_METHOD_READ,
-	        IO_METHOD_MMAP,
-	        IO_METHOD_USERPTR,
-		};
-#endif
-
-	private:
-		CaptureHandler*	mCaptureHandler;
-		
-	public:
-		//! Constructor
-		inline CaptureManager() : mCaptureHandler(0)
-			{}
-		
-		//! Destructor
-		virtual inline ~CaptureManager()
-			{}
-		
-		//! Do basic initialization after startup.
-		virtual int init() = 0;
-		
-		//! Called before object destruction.
-		virtual int destroy() = 0;
-		
-		//! Start capturing data.
-		virtual int startCapture() = 0;
-		
-		//! Stop capturing data.
-		virtual int stopCapture() = 0;
-		
-		//! Register a capture handler.
-		/*! Only one capture handler can be registered at the same time.
-		 * The handlers CaptureHandler::handleCaptureEvent() method will be called,
-		 * if new data has been captured. The ownership of the handler remains at the caller.
-		 * He is responsible for removing and deleting the handler. 
-		 * \param handler The capture handler implementation.*/
-		virtual inline void registerCaptureHandler(CaptureHandler *handler) 
-			{ mCaptureHandler = handler; }
-
-		//! Remove the current capture handler.
-		/*! If a capture handler was registered before, then this handler will not be 
-		 * notified anymore if data has been captured. */ 
-		virtual inline void removeCaptureHandler()
-			{ mCaptureHandler = 0; }
-		
-		//! Get the current CaptureHandler.
-		/*! Return the capture handler currently registered with registerCaptureHandler()
-		 * or 0, if no handler was registered before.
-		 * \return pointer to the capture handler */ 
-		virtual inline CaptureHandler* getCaptureHandler()
-			{ return mCaptureHandler; }
-		
-		//! Returns the number of IOBuffers currently available.
-		/*! The CaptureManager usually waits to capture the next frame until an IOBuffer is available.
-		 * The application is reponsible to release the IOBuffers to make it available to the capture manager.
-		 * \return the number of IOBuffers. */
-		virtual int getNumIOBuffers() = 0;
-		
-	private:
-		//! Dequeue the next buffer.
-		/*! \return the next buffer with captured data. */
-		virtual IOBuffer* dequeue() = 0;
-
-		//! Enqueue a buffer.
-		/*! \param buf the buffer that isn't used by the application anymore and that can be reused now. 
-		 * \return 0 success, -1 on failure*/
-		virtual int enqueue(IOBuffer* buf) = 0;
-
-		friend class IOBuffer;
-	};
-};
-
-#endif // CAPTUREMANAGER_H_
diff --git a/extra_lib/include/avcap/Connector.h b/extra_lib/include/avcap/Connector.h
deleted file mode 100644
index 94b390a..0000000
--- a/extra_lib/include/avcap/Connector.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>
- */
-
-
-#ifndef CONNECTOR_H_
-#define CONNECTOR_H_
-
-#if !defined(_MSC_VER) && !defined(USE_PREBUILD_LIBS)
-# include "avcap-config.h"
-#endif
-
-#ifdef AVCAP_LINUX
-# include <linux/types.h>
-# ifdef AVCAP_HAVE_V4L2
-#  include <linux/videodev2.h>
-# else
-#  include <linux/videodev.h>
-# endif
-#endif
-
-#include <string>
-#include <list>
-
-#include "avcap-export.h"
-
-namespace avcap
-{	
-	// forward declaration
-	class DeviceDescriptor;
-	class Tuner;
-	
-	//! This class is the abstraction of a video/audio input or output.
-	
-	/*! It is used to describe available inputs and outputs of a device and 
-	 * to select them by means of the API-dependent CaptureDevices implementation of the ConnectorManager. 
-	 * The ConnectorManager queries all available connectors of a device and 
-	 * provides methods to set and get the currently used ones.
-	 */
-	 
-	class AVCAP_Export Connector
-	{
-	public:
-#ifdef AVCAP_LINUX
-		enum
-		{
-			INPUT_TYPE_TUNER = V4L2_INPUT_TYPE_TUNER
-		};
-#endif
-		
-	protected:
-		DeviceDescriptor*	mDeviceDescriptor;
-		int					mIndex;
-		int					mAudioset;
-		int					mType;
-		std::string			mName;
-		
-	public:
-		//! The Constructor. Objects of this class are created by the ConnectorManager.
-		inline Connector(DeviceDescriptor *dd, int index, const std::string& name, int type=0, int audioset=0):
-			mDeviceDescriptor(dd), mIndex(index), mAudioset(audioset), mType(type), mName(name)
-			{}
-
-		//! The Destructor. 
-		virtual inline ~Connector() 
-			{}
-
-		//! Returns the unique index of the connector.
-		/*! \return The index. */
-		inline int getIndex() const 
-			{ return mIndex; }
-		
-		//! Get mapping of audio inputs to video inputs.
-		/*! For devices which provide audio and video capturing, 
-		 * video inputs can correspond to zero or more audio inputs. The audio inputs 
-		 * are numbered from 0 to N-1, N <= 32. Each bit of the audioset corresponds
-		 * to one input. For details, see the Video4Linux2 API Documentation.
-		 * \n\n<b>Win32:</b> A video connector can correspond to only one audio connector
-		 * (only one bit can be set at a time). */
-		inline int getAudioset() const 
-			{ return mAudioset; }
-		
-		//! Get the tuner associated with the Connector.
-		/*! If a tuner is associated whith the connector (e.g. for TV-Tuner cards), then this method returns
-		 * an object of class Tuner to access the tuner specific functionality.
-		 * \return object of class Tuner or 0 if there is no tuner. */
-		virtual inline Tuner* getTuner() 
-			{ return 0; }
-		
-		//! Provides a textual description of the connector. 
-		/*! \return connector name. */
-		inline const std::string& getName() const 
-			{ return mName; }
-		
-		//! Test, whether a tuner is associated with the connector or not.
-		/*! \return true, if tuner is associated, false otherwise. */
-		virtual inline bool hasTuner() const 
-			{ return false; }
-	};
-};
-
-#endif // CONNECTOR_H_
diff --git a/extra_lib/include/avcap/ConnectorManager.h b/extra_lib/include/avcap/ConnectorManager.h
deleted file mode 100644
index 417ef15..0000000
--- a/extra_lib/include/avcap/ConnectorManager.h
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>
- */
-
-
-#ifndef CONNECTORMANAGER_H_
-#define CONNECTORMANAGER_H_
-
-#include <list>
-
-#include "Connector.h"
-#include "Manager.h"
-#include "avcap-export.h"
-
-namespace avcap
-{	
-class DeviceCollector;
-
-	//! This class is the interface to query and select the available video/audio inputs/outputs.
-	 
-	/*! This class manages STL-lists of objects of class Connector which describe 
-	 * an input or output of a capture device. Applications can get these lists and get/set
- 	 * the currently used connector of a special type. The methods to deal
-	 * with outputs are only of partial interest for capturing but have been added
-	 * for completeness.
-	 * Application must use the API-dependent CaptureDevice-object to get an ConnectorManager.
-	 * The default implementations of the mehtods in this class are a noop.
-	 */
-
-	class AVCAP_Export ConnectorManager: public Manager<Connector>
-	{	
-	protected:
-		// Connector Lists
-		ListType		mVideoInputs;
-		ListType		mAudioInputs;
-		ListType		mVideoOutputs;
-		ListType		mAudioOutputs;
-		
-	public:		
-		//! Construct the manager and query for available inputs and outputs for audio and video.
-		/*! The manager is usualy created by an CaptureDevice object.
-		 * \param dd The DeviceDescriptor to acces the device. */
-		ConnectorManager(DeviceDescriptor *dd);
-
-		//! The destructor. */
-		virtual ~ConnectorManager() = 0;
-		
-		//! Returns the Connector describing the currently used video input.
-		/*! The default-implementation returns 0. 
-		 * \return video input connector.*/
-		virtual inline Connector* getVideoInput()
-			{ return 0; }
-
-		//! Sets the currently used video input.
-		/*! The default-implementation is a noop and returns -1. 
-		 * \param c The connector to use for the video input.
-		 * \return 0, if succesful, -1 else*/
-		virtual inline int setVideoInput(Connector* c)
-			{ return -1; }
-			
-		//! Returns the Connector describing the currently used audio input. 
-		/*! The default-implementation returns 0. 
-		 * \return audio input connector.*/
-		virtual inline Connector* getAudioInput()
-			{ return 0; }
-
-		//! Sets the currently used audio input.
-		/*! The default-implementation is a noop and returns -1. 
-		 * \param c The connector to use for the audio input.
-		 * \return 0, if succesful, -1 else*/
-		virtual inline int setAudioInput(Connector* c)
-			{ return -1; }
-		
-		//! Returns the Connector describing the currently used video output.
-		/*! The default-implementation returns 0. 
-		 * \return video output connector.*/
-		virtual inline Connector* getVideoOutput()
-			{ return 0; }
-		
-		//! Sets the currently used video output.
-		/*! The default-implementation is a noop and returns -1. 
-		 * \param c The connector to use for the video input.
-		 * \return 0, if succesful, -1 else*/
-		virtual inline int setVideoOutput(Connector* c)
-			{ return -1; }
-			
-		//! Returns the Connector describing the currently used audio output. 
-		/*! The default-implementation returns 0. 
-		 * \return audio output connector.*/		
-		virtual inline Connector* getAudioOutput()
-			{ return 0; }
-
-		//! Sets the currently used audio output.
-		/*! The default-implementation is a noop and returns -1. 
-		 * \param c The connector to use for the audio output.
-		 * \return 0, if succesful, -1 else*/
-		virtual inline int setAudioOutput(Connector* c)
-			{ return -1; }
-
-		//! Get the list of available video inputs of the device.
-		/*! \return STL-list of pointers to objects of type 
-		 * Connector describing the available video inputs. */
-		inline const ListType& getVideoInputList() const 
-			{ return mVideoInputs; }
-		
-		//! Get the list of available audio inputs of the device.
-		/*! \return STL-list of pointers to objects of type 
-		 * Connector describing the available audio inputs. */		
-		inline const ListType& getAudioInputList() const 
-			{ return mAudioInputs; }	
-
-		//! Get the list of available video outputs of the device.
-		/*! \return STL-list of pointers to objects of type 
-		 * Connector describing the available video outputs. */
-		inline const ListType& getVideoOutputList() const 
-			{ return mVideoOutputs; }	
-
-		//! Get the list of available audio outputs of the device.
-		/*! \return STL-list of pointers to objects of type 
-		 * Connector describing the available audio outputs. */
-		inline const ListType& getAudioOutputList() const 
-			{ return mAudioOutputs; }
-
-		//! This method is called after creation to query for video/audio in- and outputs.
-		virtual void query() = 0;
-
-	private:
-		void clearList(ConnectorManager::ListType& list);
-	};
-}
-
-#endif //CONNECTORMANAGER_H_
diff --git a/extra_lib/include/avcap/ControlManager.h b/extra_lib/include/avcap/ControlManager.h
deleted file mode 100644
index ff4a253..0000000
--- a/extra_lib/include/avcap/ControlManager.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>
- */
-
-#ifndef CONTROLMANAGER_H_
-#define CONTROLMANAGER_H_
-
-#include <string>
-#include <list>
-
-#include "Control_avcap.h"
-#include "Manager.h"
-#include "avcap-export.h"
-
-namespace avcap
-{
-	//! Abstract base for classes that manage the controls of a capture device.
-	
-	/*! Devices have typically a number of user-setable controls (e.g. brightness, hue,...).
-	 * The number of controls, the type and possible values will vary from device to device.
-	 * The ControlManager queries for available controls, their type and valid values.
-	 * It provides a STL-List of Control-derived objects which represents the functonality of a
-	 * device control. The concrete ControlManager may not be instantiated
-	 * by the application but can be obtained from the CaptureDevice object. */
-	
-	class AVCAP_Export ControlManager:public Manager<Control>
-	{
-	protected:
-		ListType mControls;
-	
-	public:
-		//! The constructor. 
-		/*! \param dd The device descriptor to access the device. */
-		ControlManager(DeviceDescriptor *dd);
-	
-		//! The destructor.
-		virtual ~ControlManager() = 0;
-	
-		//! Find a control by name.
-		/*! \param name The name of the control to find.
-		 * \return Pointer to the control or 0, if no control was found. */
-		Control* getControl(const std::string& name);
-	
-		//! Find a control by id.
-		/*! \param id The id of the control to find.
-		 * \return Pointer to the control or 0, if no control was found. */
-		Control* getControl(int id);
-	
-		//! Returns the STL-list of Control objects.
-		/*! \return The control list. */
-		inline const ListType& getControlList() 
-			{ return (const ListType&) mControls; }
-	
-		//! Reset all controls to their default values,i.e. calls the reset()-method of all managed controls.
-		/*! \return 0 if successful, -1 else */
-		virtual int resetAll();
-	
-		virtual void query() = 0;
-	};
-}
-
-
-#endif //CONTROLMANAGER_H_
diff --git a/extra_lib/include/avcap/Control_avcap.h b/extra_lib/include/avcap/Control_avcap.h
deleted file mode 100644
index 47e05cb..0000000
--- a/extra_lib/include/avcap/Control_avcap.h
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>
- */
-
-#ifndef CONTROL_H_
-#define CONTROL_H_
-
-#include <string>
-#include <list>
-
-#include "avcap-export.h"
-#include "Interval.h"
-
-namespace avcap {
-// forward declaration
-class DeviceDescriptor;
-
-	//! Abstract Base class for all device controls.
-	
-	/*! Capture devices possess various controls (e.g. hue, saturation,...) of different type.
-	 * This class provides the interface that all controls share. Objects 
-	 * derived from this class are managed by a ControlManager which is 
-	 * obtained by the concrete CaptureDevice object. 
-	 * A concrete control may expose an extended interface to provide additional functionality. 
-	 * Applications can use the getType()-method or RTTI to determine the type of the concrete control. */
-
-	class AVCAP_Export Control
-	{
-	public:
-		enum Type {
-			INTEGER_CONTROL = 0,
-			BOOL_CONTROL,
-			BUTTON_CONTROL,
-			MENU_CONTROL,
-			CTRLCLASS_CONTROL,
-			USERDEFINED_CONTROL
-		};
-		
-	private:
-		Type mType;
-		
-	public:
-		//! Constructor
-		Control(Type t): mType(t)
-			{}
-	
-		//! Destructor
-		virtual ~Control() 
-			{}
-		
-		//! Get the unique identifier of the control.
-		/*! \return id */
-		virtual int getId() const = 0;
-	
-		//! Get the default value of the control.
-		/*! \return default value */
-		virtual int getDefaultValue() const = 0;
-	
-		//! Get the name of the control.
-		/*! \return control name */
-		virtual const std::string& getName() const = 0;
-	
-		//! Set the new value of the control.
-		/*!  \param val : The new value.
-		 * \return 0, if successful, -1 else */
-		virtual int setValue(int val) = 0;
-	
-		//! Get the current value of the control.
-		/*!  \return the value */
-		virtual int getValue() const = 0;
-	
-		//! Set the  value of the control to the default value.
-		/*!  \return 0, if successful, -1 else */
-		virtual int reset() = 0;
-		
-		//! Return the type of the control.
-		/* \return type */  
-		virtual inline Type getType() const 
-			{ return mType; }
-		
-	private:
-		Control() 
-			{}
-	};
-	
-	//! Abstraction of an Integer-valued control.
-	/*! Such controls additionally provide information about the range and step of it's values. */
-	
-	class AVCAP_Export IntegerControl: public Control
-	{
-	public:
-		IntegerControl(): Control(Control::INTEGER_CONTROL)
-			{}
-		
-		virtual ~IntegerControl() 
-			{}
-		
-		//! Get the interval describing the range and step of valid values for this control.
-		/*! \return interval */
-		virtual const Interval& getInterval() const = 0; 
-	};
-	
-	//! Abstraction of a boolean-like control.
-	/*! Such controls provide no additional information. */
-	
-	class AVCAP_Export BoolControl: public Control
-	{
-	public:
-		BoolControl(): Control(Control::BOOL_CONTROL)
-			{}
-		
-		virtual ~BoolControl() 
-			{}	
-	};
-
-	//! Abstraction of a button-like control.
-	/*! Such controls provide a convinience-method to trigger the buttons action. */
-
-	class AVCAP_Export ButtonControl: public Control
-	{
-	public:
-		ButtonControl(): Control(Control::BUTTON_CONTROL)
-			{}
-		
-		virtual ~ButtonControl() 
-			{}
-		
-		//! Push the button. 
-		/*! \return 0, if successful, -1 else */
-		virtual int push() = 0;
-	};
-
-	//! Abstraction of a control describing the class of the successive controls.
-	/*! The sole purpose of such a control is to provide a name for the class of the controls
-	 * following in the control-list. This name can be used for example to group the controls 
-	 * in a 'tabbed' user-interface (See V4L2-API spec, Extended Controls).  */
-	
-	class AVCAP_Export CtrlClassControl: public Control
-	{
-	public:
-		CtrlClassControl(): Control(Control::CTRLCLASS_CONTROL)
-			{}
-		
-		virtual ~CtrlClassControl() 
-			{}
-	};
-
-	
-	//! A menu item.
-	struct MenuItem
-	{
-		//! The name of the item.
-		std::string name;
-		
-		//! The index to identify the item.
-		int index;
-
-	public:
-		//! The constructor.
-		inline MenuItem(const std::string& n, int i):
-			name(n), index(i)
-			{}
-	};
-
-	//! Abstraction of a menu-like control.
-	/*! These controls provide a list of items, the user can chose from. */
-	
-	class AVCAP_Export MenuControl: public Control
-	{
-	public:
-		//! Type of the item list.
-		typedef std::list<MenuItem*> ItemList;
-
-	public:
-		MenuControl(): Control(Control::MENU_CONTROL)
-			{}
-		
-		virtual ~MenuControl() 
-			{}
-		
-		//! Returns the STL-list of menu items associated with this control.
-		/*! \return the menu items. */
-		virtual const ItemList& getItemList () = 0;
-	};
-}
-
-#endif // CONTROL_H_
diff --git a/extra_lib/include/avcap/DeviceCollector.h b/extra_lib/include/avcap/DeviceCollector.h
deleted file mode 100644
index 0d02c66..0000000
--- a/extra_lib/include/avcap/DeviceCollector.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>
- */
-
-#ifndef DEVICECOLLECTOR_H_
-#define DEVICECOLLECTOR_H_
-
-#include <list>
-#include <string>
-
-#include "singleton.h"
-
-#if !defined(_MSC_VER) && !defined(USE_PREBUILD_LIBS)
-# include "avcap-config.h"
-#endif
-
-#include "avcap-export.h"
-
-namespace avcap
-{
-class DeviceDescriptor;
-class CaptureDevice;
-
-	//! This singleton queries the capture devices available on the system and provides a factory-method to create CaptureDevice-objects.
-	
-	/*! This class tests during instantiation (i.e. the first call to it's instance()-method), 
-	 * which capture devices are available on the system
-	 * and provides an STL-list of DeviceDescriptor objects describing these devices.  
-	 * 
-	 * The following strategy to find capture devices in the system is applied:
-	 *  
-	 * <b>Linux:</b>
-	 * <UL> 
-	 * <LI>All /dev/video* nodes are tested by default. </LI>
-	 * <LI>If avcap has been compiled with HAS_AVC_SUPPORT defined, all IEEE 1394 AV/C-devices are tested. </LI>
-	 * <LI>IEEE1394 digital camera support is planned but currently not implemented. 
-	 * </UL>
-	 * <b>Win32:</b>
-	 * <UL> 
-	 * <LI>All devices in the CLSID_VideoInputDeviceCategory category (see DirectShow documentation) are tested.</LI>
-	 * </UL>
-	 * <b>Darwin:</b>
-	 * <UL> 
-	 * <LI>All devices of the SequenceGrabber-Component device-list are tested.</LI>
-	 * </UL>
-	 * 
-	 * Access the singleton instance via DEVICE_COLLECTOR::instance().
-	 **/
-	
-	class AVCAP_Export DeviceCollector
-	{
-	public:
-		//! List type of the DeviceDescriptor object list.
-		typedef std::list<DeviceDescriptor*> DeviceList;
-	
-	private:
-		DeviceList mDeviceList;
-	
-	public:
-		//! Constructor
-		DeviceCollector();
-		
-		//! Destructor
-		virtual ~DeviceCollector();
-	
-		//! Returns the STL-list of DeviceDescriptor objects describing available capture devices.
-		/*! \return The descriptor list.*/
-		inline const DeviceList& getDeviceList() const 
-			{ return (const DeviceList&) mDeviceList; }
-	
-		//! Linux only! Test, if the device with the given name can be opened and is a V4L1 or V4L2 capture device or not. 
-		/*! If it is, a new DeviceDescriptor-object is created 
-		 * and stored in the device list, managed by the collector. 
-		 * \param name : the name of a device node (e.g. /dev/video0) 
-		 * \return true, if it is a V4L1-device, false else*/
-		bool testDevice(const std::string& name);
-	
-	private:
-	
-#ifdef AVCAP_LINUX
-		void query_V4L1_Devices();
-		
-		void query_V4L2_Devices();
-		
-		void query_ieee1394_Devices();
-		
-		int test_V4L1_Device(const std::string& name);
-		
-		int test_V4L2_Device(const std::string& name);
-#endif
-
-#ifdef AVCAP_OSX
-		void query_QT_Devices();
-#endif
-
-#ifdef AVCAP_WINDOWS
-		void query_DS_Devices();
-		
-		int test_DS_Device(const std::string& name);
-		
-		bool getInstalledDeviceIDs(std::list<std::string> &UniqueDeviceIDList);
-
-#endif
-};
-
-//! The DeviceCollector singleton. Access the singleton instance via DEVICE_COLLECTOR::instance().
-typedef Singleton<DeviceCollector> DEVICE_COLLECTOR;
-}
-
-/* \todo Add Linux-support for IEEE 1394 digital cameras. */
-
-#endif // DEVICECOLLECTOR_H_
diff --git a/extra_lib/include/avcap/DeviceDescriptor.h b/extra_lib/include/avcap/DeviceDescriptor.h
deleted file mode 100644
index 676831c..0000000
--- a/extra_lib/include/avcap/DeviceDescriptor.h
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de>
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>
- */
-
-
-#ifndef DEVICEDESCRIPTOR_H_
-#define DEVICEDESCRIPTOR_H_
-
-#include <iostream>
-#include <string>
-
-#if !defined(_MSC_VER) && !defined(USE_PREBUILD_LIBS)
-# include "avcap-config.h"
-#endif
-
-#include "avcap-export.h"
-
-// IVTV driver name
-#define DRIVER_IVTV	"ivtv"
-
-namespace avcap
-{
-class CaptureDevice;
-
-	//! Objects of classes derived from this abstract base uniquely identify a capture device in a system.
-
-	/*! It is used as an system independent description of a capture device.
-	 * It provides the interface to access information about a device and the device itself.
-	 * Special devices must inherit this class, e.g. V4L2_DeviceDescriptor or AVC_DeviceDescriptor.
-	 * A list of objects derived from this class (one for each device) is provided
-	 * by the DeviceCollector-singleton, which tries
-	 * to determine all capture devices available on the system, so applications
-	 * don't have to instantiate objects of these class explicitly. Objects of this
-	 * class can be used to create a concrete CaptureDevice object by calling DEVICE_COLLECTOR::instance()->createDevice().
-	 * The class must be implemented for a concrete capture API/OS.
-	 */
-
-	class AVCAP_Export DeviceDescriptor
-	{
-	public:
-#ifdef AVCAP_LINUX
-		typedef int DEV_HANDLE_T;
-#endif
-
-#ifdef AVCAP_OSX
-		typedef int DEV_HANDLE_T;
-#endif
-
-#ifdef _WIN32
-		//! <b>Win32:</b> Platform dependent device handle type for windows. (represents the DirectShow capture filter (always casted to a IBaseFilter COM-Interface).
-		/* To get the complete created filter graph call GetFilterGraphFromFilter()
-		 declared in the "HelpFunc.h" header file. */
-		typedef void* DEV_HANDLE_T;
-#endif
-
-	private:
-		const static std::string mEmptyString;
-
-	public:
-		//! Constructor
-		DeviceDescriptor();
-
-		//! Destructor
-		virtual ~DeviceDescriptor() = 0;
-
-		//! Open the underlying device.
-		/*! The CaptureDevice-Object returned by getDevice(), which is actually used to perform
-		 * capturing is not valid before open() is called.
-		 * \return 0 success, -1 on failure, e.g. open() has been already called before
-		 */
-		virtual int open() = 0;
-
-		//! Close the underlying device.
-		/*! The CaptureDevice-Object returned by getDevice(), which is actually used to perform
-		 * capturing, is not valid after close() is called.
-		 * \return 0 success, -1 failure
-		 */
-		virtual int close() = 0;
-
-		//! Returns the unique identifier of the device.
-		/*! \return unique identifier of device */
-		virtual const std::string& getName() const = 0;
-
-		//! Returns the name of the driver.
-		/*! The default implementation returns an empty string.
-		 * \return driver */
-		virtual inline const std::string& getDriver() const
-			{ return mEmptyString; }
-
-		//! Returns the name of the device
-		/*! The default implementation returns an empty string.
-		 * \return name of the card */
-		virtual inline const std::string& getCard() const
-			{ return mEmptyString; }
-
-		//! Returns a textual description of the device.
-		/*! The default implementation returns an empty string.
-		 * \return name */
-		virtual inline const std::string& getInfo() const
-			{ return mEmptyString; }
-
-		//! Returns the version number of the driver.
-		/*! The default implementation returns 0.
-		 * \return version. */
-		virtual inline int getVersion() const
-			{ return 0; }
-
-		//! Returns the version number of the driver as string.
-		/*! The default implementation returns an empty string.
-		 * \return version string. */
-		virtual inline const std::string& getVersionString() const
-			{ return mEmptyString; }
-
-		//! Returns the API-specific device handle used to reference the device.
-		/*! \return the device handle */
-		virtual const DEV_HANDLE_T getHandle() const = 0;
-
-		//! Device is an audio/video device. The default implementation returns false.
-		virtual inline bool isAVDev() const
-			{ return false; }
-
-		//! Device is capable to capture some data. The default implementation returns false.
-		virtual inline bool isVideoCaptureDev() const
-			{ return false; }
-
-		//! Device is a VBI device. The default implementation returns false.
-		virtual inline bool isVBIDev() const
-			{ return false; }
-
-		//! Device has a tuner. The default implementation returns false.
-		virtual inline bool isTuner() const
-			{ return false; }
-
-		//! Device is an audio device. The default implementation returns false.
-		virtual inline bool isAudioDev() const
-			{ return false; }
-
-		//! Device is a radio device. The default implementation returns false.
-		virtual inline bool isRadioDev() const
-			{ return false; }
-
-		//! Device supports video overlay. The default implementation returns false.
-		virtual inline bool isOverlayDev() const
-			{ return false; }
-
-		//! Device supports read/write IO-methods (linux specific, see V4L2 API Docu for further details).
-		/*!  The default implementation returns false. */
-		virtual inline bool isRWDev () const
-			{ return false; }
-
-		//! Device supports asynchroneous IO-methods (linux specific, see V4L2 API Docu for further details).
-		/*! The default implementation returns false. */
-		virtual inline bool isAsyncIODev() const
-			{ return false; }
-
-		//! Device supports memory mapping IO-methods (linux specific, see V4L2 API Docu for further details).
-		/*! The default implementation returns false. */
-		virtual inline bool isStreamingDev() const
-			{ return false; }
-
-		//! Factory-method to create a API-dependent CaptureDevice-object.
-		/*! Applications must not create their own
-		 * instances of a CaptureDevice but use this method to access the proper
-		 * API-dependent unique device-object. You can use this object anywhere between
-		 * successive calls to open() and close(), i.e. it is not valid before open() and not after close().
-		 * The ownership of the object remains at the descriptor, so the caller
-		 * must not delete the object after usage.
-		 * Only one CaptureDevice-object will be created for each DeviceDescriptor, so
-		 * multiple calls to getDevice() will always return the same object instance.
-		 *
-		 * \return the CaptureDevice-instance or 0, if not available. */
-		virtual CaptureDevice* getDevice() = 0;
-	};
-}
-
-
-#endif //DEVICEDESCRIPTOR_H_
diff --git a/extra_lib/include/avcap/FormatManager.h b/extra_lib/include/avcap/FormatManager.h
deleted file mode 100644
index 04bf1ce..0000000
--- a/extra_lib/include/avcap/FormatManager.h
+++ /dev/null
@@ -1,314 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de>
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>
- */
-
-#ifndef FORMATMANAGER_H_
-#define FORMATMANAGER_H_
-
-#include <list>
-#include <string>
-
-#if !defined(_MSC_VER) && !defined(USE_PREBUILD_LIBS)
-# include <stdint.h>
-# include "avcap-config.h"
-#endif
-
-#include "Manager.h"
-#include "avcap-export.h"
-
-#ifdef AVCAP_LINUX
-# include <linux/types.h>
-# ifdef AVCAP_HAVE_V4L2
-#  include <linux/videodev2.h>
-# else
-#  include <linux/videodev.h>
-# endif
-#endif // AVCAP_LINUX
-
-#ifdef _WIN32
-typedef unsigned int uint32_t;
-#endif
-
-/* taken from linux/videodev2.h but all FormatManagers use these fourcc-codes*/
-
-#define FOURCC(a,b,c,d)\
-        (((uint32_t)(a)<<0)|((uint32_t)(b)<<8)|((uint32_t)(c)<<16)|((uint32_t)(d)<<24))
-
-#define PIX_FMT_RGB332  FOURCC('R','G','B','1') /*  8  RGB-3-3-2     */
-#define PIX_FMT_RGB555  FOURCC('R','G','B','O') /* 16  RGB-5-5-5     */
-#define PIX_FMT_RGB565  FOURCC('R','G','B','P') /* 16  RGB-5-6-5     */
-#define PIX_FMT_RGB555X FOURCC('R','G','B','Q') /* 16  RGB-5-5-5 BE  */
-#define PIX_FMT_RGB565X FOURCC('R','G','B','R') /* 16  RGB-5-6-5 BE  */
-#define PIX_FMT_BGR24   FOURCC('B','G','R','3') /* 24  BGR-8-8-8     */
-#define PIX_FMT_RGB24   FOURCC('R','G','B','3') /* 24  RGB-8-8-8     */
-#define PIX_FMT_BGR32   FOURCC('B','G','R','4') /* 32  BGR-8-8-8-8   */
-#define PIX_FMT_RGB32   FOURCC('R','G','B','4') /* 32  RGB-8-8-8-8   */
-#define PIX_FMT_GREY    FOURCC('G','R','E','Y') /*  8  Greyscale     */
-#define PIX_FMT_YVU410  FOURCC('Y','V','U','9') /*  9  YVU 4:1:0     */
-#define PIX_FMT_YVU420  FOURCC('Y','V','1','2') /* 12  YVU 4:2:0     */
-#define PIX_FMT_YUYV    FOURCC('Y','U','Y','V') /* 16  YUV 4:2:2     */
-#define PIX_FMT_UYVY    FOURCC('U','Y','V','Y') /* 16  YUV 4:2:2     */
-#define PIX_FMT_YUV422P FOURCC('4','2','2','P') /* 16  YVU422 planar */
-#define PIX_FMT_YUV411P FOURCC('4','1','1','P') /* 16  YVU411 planar */
-#define PIX_FMT_Y41P    FOURCC('Y','4','1','P') /* 12  YUV 4:1:1     */
-
-/* two planes -- one Y, one Cr + Cb interleaved  */
-#define PIX_FMT_NV12    FOURCC('N','V','1','2') /* 12  Y/CbCr 4:2:0  */
-#define PIX_FMT_NV21    FOURCC('N','V','2','1') /* 12  Y/CrCb 4:2:0  */
-
-/*  The following formats are not defined in the V4L2 specification */
-#define PIX_FMT_YUV410  FOURCC('Y','U','V','9') /*  9  YUV 4:1:0     */
-#define PIX_FMT_YUV420  FOURCC('Y','U','1','2') /* 12  YUV 4:2:0     */
-#define PIX_FMT_I420	FOURCC('I','4','2','0') /* 12  identical to YU12 */
-#define PIX_FMT_YYUV    FOURCC('Y','Y','U','V') /* 16  YUV 4:2:2     */
-#define PIX_FMT_HI240   FOURCC('H','I','2','4') /*  8  8-bit color   */
-#define PIX_FMT_HM12    FOURCC('H','M','1','2') /*  8  YUV 4:1:1 16x16 macroblocks */
-
-/* see http://www.siliconimaging.com/RGB%20Bayer.htm */
-#define PIX_FMT_SBGGR8  FOURCC('B','A','8','1') /*  8  BGBG.. GRGR.. */
-
-/* compressed formats */
-#define PIX_FMT_MJPEG    FOURCC('M','J','P','G') /* Motion-JPEG   */
-#define PIX_FMT_JPEG     FOURCC('J','P','E','G') /* JFIF JPEG     */
-#define PIX_FMT_DV       FOURCC('d','v','s','d') /* 1394          */
-#define PIX_FMT_MPEG     FOURCC('M','P','E','G') /* MPEG-1/2/4    */
-
-/*  Vendor-specific formats   */
-#define PIX_FMT_WNVA     FOURCC('W','N','V','A') /* Winnov hw compress */
-#define PIX_FMT_SN9C10X  FOURCC('S','9','1','0') /* SN9C10x compression */
-#define PIX_FMT_PWC1     FOURCC('P','W','C','1') /* pwc older webcam */
-#define PIX_FMT_PWC2     FOURCC('P','W','C','2') /* pwc newer webcam */
-#define PIX_FMT_ET61X251 FOURCC('E','6','2','5') /* ET61X251 compression */
-
-namespace avcap
-{
-class DeviceDescriptor;
-
-	//! Description of the video standard.
-	struct AVCAP_Export VideoStandard
-	{
-#ifdef AVCAP_LINUX
-		typedef v4l2_std_id	STANDARD_ID_T;
-		enum {
-			PAL = V4L2_STD_PAL_B,
-			NTSC = V4L2_STD_NTSC_M,
-			SECAM = V4L2_STD_SECAM_B
-		};
-#endif
-
-#if defined (_WIN32) || defined (AVCAP_OSX)
-		typedef unsigned int STANDARD_ID_T;
-#endif
-
-
-		std::string		name; 	//!< The name of the standard.
-		STANDARD_ID_T	id;		//!< A unique identifier.
-
-		//! Constructor
-		VideoStandard(const std::string& n, STANDARD_ID_T i):
-			name(n),
-			id(i)
-			{};
-	};
-
-	//! The Resolution consists of a width and a height.
-	struct AVCAP_Export Resolution {
-		int width, height;
-
-		Resolution(int w, int h):
-			width(w),
-			height(h)
-			{}
-	};
-
-	//! Description of a video format.
-	class AVCAP_Export Format
-	{
-	public:
-		typedef std::list<Resolution*> ResolutionList_t;
-	private:
-		std::string mName;		// A textual description.
-		uint32_t mFourcc;		// The Four Character Code of the format.
-		ResolutionList_t	mResList;
-
-#ifdef _WIN32
-		void *mediatype;		/* stores DirectShow-specific format description (only used internaly).
-								 *< It is always casted to a AM_MEDIA_TYPE
-								 * DirectShow structure; see DirectShow documentation */
-#endif
-
-	public:
-		//! Constructor
-		inline Format(const std::string& n, uint32_t f):
-			mName(n), mFourcc(f)
-			{}
-
-		//! Destructor
-		virtual ~Format();
-
-		//! Get the name of the format.
-		/*! \return name */
-		inline const std::string& getName() const
-			{ return mName; }
-
-		//! Get the four character code of the format (see: www.fourcc.org).
-		/*! \return fourcc */
-		inline uint32_t getFourcc() const
-			{ return mFourcc; }
-
-		//! Return a list of resolutions that are supported for this format.
-		/*! \return the resolutions.*/
-		inline const ResolutionList_t& getResolutionList() const
-			{ return mResList; }
-
-		void addResolution(int w, int h);
-
-#ifdef _WIN32
-		void* getMediaType() { return mediatype; }
-
-		void setMediaType(void* mt) { mediatype = mt; }
-#endif
-	};
-
-	//! Abstract base for classes that query and manage available formats, video-standards and resolutions of a capture device.
-
-	/*! This class queries the formats, video-standards and resolutions provided by the device
-	 * and allows applications to set them.
-	 * The class provides a STL-list of Format-objects.
-	 * Actualy changing the format may be deferred by the concrete implementation until it
-	 * is really necessary, e.g. the capture begins, because advising the driver
-	 * to change the format can be a quite time-consuming operation.
-	 * Most of the methods in this class are implemented as a noop and are
-	 * reimplemented by the derived class for a concrete capture API/OS, if the method is applicable.
-	 */
-
-	class AVCAP_Export FormatManager: public Manager<Format>
-	{
-	public:
-		typedef std::list<VideoStandard*>	VideoStandardList;
-
-	protected:
-		ListType		mFormats;
-		int				mWidth;
-		int				mHeight;
-		int 			mBytesPerLine;
-#if defined(AVCAP_LINUX) || defined (AVCAP_OSX)
-		unsigned int	mCurrentFormat;
-#endif
-#ifdef _WIN32
-		void			*mCurrentFormat;		// Always casted to a AM_MEDIA_TYPE DirectShow structure
-#endif
-		unsigned long	mImageSize;
-		bool			mModified;
-		VideoStandardList	mStandards;
-
-	public:
-		//! The constructor. */
-		FormatManager(DeviceDescriptor *dd);
-
-		//! The destructor. */
-		virtual ~FormatManager();
-
-		//! Returns the STL-list of Format objects describing the available formats.
-		/*! \return The format list.*/
-		virtual inline const ListType& getFormatList() const
-			{ return (const ListType&) mFormats; }
-
-		//! Set the format to capture.
-		/*! \param fmt The new format.
-		 * \return 0, if successful, -1 else */
-		virtual int setFormat(Format *fmt);
-
-		//! Set the format to capture.
-		/*! \param fourcc The four character code of the new format.
-		 * \return 0, if successful, -1 else */
-		virtual int setFormat(uint32_t fourcc);
-
-		//! Get the current format.
-		/*! \return The format. */
-		virtual Format* getFormat();
-
-		//! Set the image with and height.
-		/*! \param w : width
-		 * \param h : height
-		 * \return 0, if successful, -1 else */
-		virtual int setResolution(int w, int h);
-
-		//! Set the number of used bytes per scanline, if possible.
-		/*! \param bpl
-		 * \return 0, if successful, -1 else */
-		virtual int setBytesPerLine(int bpl);
-
-		//! Returns the image with.
-		/*! \return width*/
-		virtual int getWidth();
-
-		//! Returns the image height.
-		/*! \return height*/
-		virtual int getHeight();
-
-		//! Returns the bytes per line.
-		/*! \return bpl*/
-		virtual int getBytesPerLine();
-
-		//! Flushes the format, i.e. the driver is advised to apply the current format settings.
-		/*! \return  0, if successful, -1 else */
-		virtual int flush();
-
-		//! The number of bytes that an image of the current size requires to be stored in memory, including padding.
-		/*! \return size */
-		virtual size_t getImageSize();
-
-		//! Set the framerate.
-		/*! The default implementation returns -1
-		 * \param fps : the number of frames per second.
-		 * \return 0 if successful, -1 on failure */
-		virtual int setFramerate(int fps);
-
-		//! Get the current framerate.
-		/*! The default implementation returns -1
-		 *! \return the frames per second */
-		virtual int getFramerate();
-
-		//! Get the STL-list of avaliable video standards described by VideoStandard objects.
-		/*! \return standards list*/
-		virtual inline const VideoStandardList& getVideoStandardList() const
-			{ return (const VideoStandardList&) mStandards; }
-
-		//! Get the currently used video standard.
-		/*! The default implementation returns 0
-		 * \return the current standard or 0, if not applicable */
-		virtual const VideoStandard* getVideoStandard();
-
-		//! Set the video standard to use.
-		/*! Attention: not all video standards can be set in conjunction with each connector and format.
-		 * The default implementation returns -1
-		 * \param std The new video standard.
-		 * \return 0, if successful, -1 else */
-		virtual int setVideoStandard(const VideoStandard* std);
-
-		virtual void query() = 0;
-	};
-};
-#endif //FORMATMANAGER_H_
-
-
diff --git a/extra_lib/include/avcap/IOBuffer.h b/extra_lib/include/avcap/IOBuffer.h
deleted file mode 100644
index a8b379a..0000000
--- a/extra_lib/include/avcap/IOBuffer.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>
- */
-
-
-#ifndef IOBUFFER_H_
-#define IOBUFFER_H_
-
-
-#include <sys/types.h>
-#include <time.h>
-#include <iostream>
-
-#if !defined(_MSC_VER) && !defined(USE_PREBUILD_LIBS)
-# include <sys/time.h>
-# include "avcap-config.h"
-#endif
-
-#ifdef _WIN32
-# include <windows.h>
-#endif
-
-#include "CaptureManager.h"
-#include "avcap-export.h"
-
-namespace avcap
-{
-	//! The buffer to store captured data.
-	
-	/*! The class contains the captured data and provides additional information,
-	 * e.g. sequence number, valid bytes and a capture timestamp. The data in the buffer
-	 * may not correspond exactly to one frame, e.g. if the captured data is part 
-	 * of a stream (e.g. MPEG).
-	 * */
-	 
-	class AVCAP_Export IOBuffer
-	{
-	public:
-		
-		//! Use-state of the buffer
-		enum State
-		{
-			STATE_USED = 0,		//!> currently used
-			STATE_UNUSED,		//!> currently unused
-		};
-		
-	private:
-		CaptureManager *mMgr;
-		void*			mPtr;
-		size_t			mSize;
-		int				mIndex;
-		int				mState;
-		long 			mSequence;
-		size_t			mValid;
-		struct timeval 	mTimestamp;
-		
-	public:
-		
-		//! Constructor
-		IOBuffer(CaptureManager* mgr, void* ptr, size_t size, int index = 0);
-		virtual ~IOBuffer();
-
-		//! Get the pointer to the frame data.
-		/*! \return the captured data. */
-		inline void* getPtr() const
-			{ return mPtr; }
-		
-		//! Returns the maximum number of bytes the buffer can contain.
-		/*! \return Size of buffer in bytes. */
-		inline size_t getSize() const
-			{ return mSize; }
-		
-		//! Return the sequence number of the frame. 
-		/*! \return Sequence number */
-		inline long getSequence() const 
-			{ return mSequence; }
-		
-		//! Returns the number of valid bytes in the buffer.
-		/*! \return Number of valid bytes */
-		inline size_t getValidBytes() const 
-			{ return mValid; }
-		
-		//! Returns a timestamp in milliseconds. 
-		/*! \return timestamp */
-		unsigned long getTimestamp();
-
-		//! Must be called by the application after the buffer isn't used anymore to to enable its reutilization.
-		void release();
-		
-		//! Get the index of the buffer.
-		/*! \return the buffer index. */
-		inline int getIndex() const 
-			{ return mIndex; } 
-
-		//! Set the state of the buffer.
-		/*! This method should not be used by applications.
-		 *! \param state : the new state */
-		inline void setState(State state) 
-			{ mState = state; }
-
-		//! Get the buffer usage state.
-		/*! \return the current buffer state. */
-		inline State getState() const 
-			{ return (State) mState; }
-		
-		//! Set buffer parameters.
-		/*! This method should not be used by applications. 
-		 * \param valid : number of valid bytes in buffer
-		 * \param state : the current buffer state
-		 * \param ts : the timestamp the data was captured
-		 * \param seq : the sequence number of the captured data */
-		void setParams(const size_t valid, State state, struct timeval &ts, int seq);
-	};
-}
-
-#endif // IOBUFFER_H_
diff --git a/extra_lib/include/avcap/Interval.h b/extra_lib/include/avcap/Interval.h
deleted file mode 100644
index ac45118..0000000
--- a/extra_lib/include/avcap/Interval.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>
- */
-
-
-#ifndef INTERVAL_H_
-#define INTERVAL_H_
-
-#include "avcap-export.h"
-
-namespace avcap
-{
-	//! An integer interval used by some Control-types.
-	class AVCAP_Export Interval
-	{
-	public:
-		//! The minimal value.
-		int min;
-
-		//! The maximal value.
-		int max;
-		
-		//! The increment.
-		int step;
-		
-		//! The Constructor.
-		Interval( int min_, int max_, int step_ )
-		{
-			min = min_;
-			max = max_;
-			step = step_;
-		};
-	};
-};
-
-#endif // INTERVAL_H_
-
diff --git a/extra_lib/include/avcap/Manager.h b/extra_lib/include/avcap/Manager.h
deleted file mode 100644
index b1b2d17..0000000
--- a/extra_lib/include/avcap/Manager.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>
- */
-
-
-#ifndef MANAGER_H_
-#define MANAGER_H_
-
-#include <list>
-#include <iostream>
-
-namespace avcap
-{
-	class DeviceDescriptor;
-	
-	//! Abstract base class for Managers. 
-	
-	/*! Classes that provide access to specific aspects of 
-	 * a device derive from this class. Managers usualy manage a number of 
-	 * objects of a specific type that abstract these aspects.
-	 * The template parameter is used to define a STL list-type to 
-	 * store these objects.*/
-	 
-	template<class T>
-	class Manager
-	{
-	public:
-		//! The STL list-type to store the managed objects.
-		typedef std::list<T*>	ListType;
-		
-	protected:
-		DeviceDescriptor	*mDeviceDescriptor;
-		
-	public:
-		inline Manager(DeviceDescriptor* dd):
-			mDeviceDescriptor(dd) 
-			{}
-			
-		virtual ~Manager() 
-			{}
-		
-		/*! Called during initialisation by the CaptureDevice to query for 
-		 * the objects that the implementation of this class manages. */
-		virtual void query() = 0;		
-	};
-}
-
-#endif // MANAGER_H_
diff --git a/extra_lib/include/avcap/ProbeValues.h b/extra_lib/include/avcap/ProbeValues.h
deleted file mode 100644
index 9a161bb..0000000
--- a/extra_lib/include/avcap/ProbeValues.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>
- */
-
-
-#ifndef PROBEVALUES_H
-#define PROBEVALUES_H
- 
-namespace avcap {
-
-//! Standard resolutions to probe, if querying resolutions is not supported by the API/device
-static int NumResolutions = 13;
-static unsigned int Resolutions[][2] = 
-{
-	{640, 480},
-	{640, 360},
-	{352, 288}, 
-	{352, 240}, 
-	{320, 240}, 
-	{176, 144},
-	{160, 120},
-	{80, 60},
-	{720, 480},
-	{720, 576},
-	{800, 600},
-	{1280, 1024},
-	{1600, 1200}
-};
-
-}
-
-#endif
diff --git a/extra_lib/include/avcap/Tuner_avcap.h b/extra_lib/include/avcap/Tuner_avcap.h
deleted file mode 100644
index 197f644..0000000
--- a/extra_lib/include/avcap/Tuner_avcap.h
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>
- */
-
-#ifndef TUNER_H_
-#define TUNER_H_
-
-#include <string>
-
-#include "avcap-export.h"
-
-namespace avcap
-{
-	class DeviceDescriptor;
-	
-	//! Interface of a tuner.
-	
-	/*! This class provides access to the tuner functionality of TV or Radio-cards.
-	 * Applications can adjust things like frequency, audio mode etc. 
-	 * Applications don't create Tuner objects themselfes but get them from the Connector
-	 * the tuner is associated with. The connector in turn can be obtained from the 
-	 * ConnectorManager of the CaptureDevice.
-	 **/
-	 
-	class AVCAP_Export Tuner
-	{
-	private:
-	public:
-		virtual inline ~Tuner()
-			{}
-		
-		//! Determine whether the tuner is able to receive radio frequencies. 
-		/*! The default implementation returns false.
-		 * \return true if radio tuner, false else */
-		virtual inline bool isRadioTuner() const 
-			{ return false; }
-
-		//! Determine whether the tuner is able to receive TV frequencies.
-		/*! The default implementation returns false.
-		 * \return true if TV tuner, false else */
-		virtual inline bool isTVTuner() const 
-			{ return false; };
-
-		//! Set the audio mode to stereo.
-		/*! The default implementation is noop and returns -1.
-		 * \return 0, if successful, -1 else. */		
-		virtual inline int setStereo()  
-			{ return -1; }
-
-		//! Set the audio mode to mono.
-		/*! Default implementation is noop and return -1.
-		 * \return 0, if successful, -1 else. */		
-		virtual inline int setMono() 
-			{ return -1; }
-		
-		//! Set the audio mode to secondary audio program (SAP).
-		/*! The default implementation is noop and returns -1.
-		 * \return 0, if successful, -1 else. */		
-		virtual inline int setSAP() 
-			{ return -1; }
-		
-		//! Set the audio mode to language 1.
-		/*! The default implementation is noop and returns -1.
-		 * \return 0, if successful, -1 else. */		
-		virtual inline int setLang1() 
-			{ return -1; }
-
-		//! Set the audio mode to language 2.
-		/*! The default implementation is noop and returns -1.
-		 * \return 0, if successful, -1 else. */		
-		virtual inline int setLang2() 
-			{ return -1; }
-
-		//! Returns the current frequency in MHz.
-		/*! The default implementation is noop and returns -1.
-		 * \return tuner frequency */
-		virtual inline double getFreq() const 
-			{ return -1.0f; }
-
-		//! Returns the step with in which the frequency can be increased or decreased.
-		/*! The default implementation is noop and returns -1.
-		 * \return frequency step width*/
-		virtual inline double getFreqStep() const
-			{ return -1.0f; }
-		
-		//! Returns the minimum possible frequency in MHz which can be applied to the tuner. 
-		/*! The default implementation is noop and returns -1.
-		 * \return minimal tuner frequency */
-		virtual inline double getMinFreq() const
-			{ return -1.0f; }
-
-		//! Returns the maximum possible frequency in MHz which can be applied to the tuner. 
-		/*! The default implementation is noop and returns -1.
-		 * \return maximal tuner frequency */
-		virtual inline double getMaxFreq() const
-			{ return -1.0f; }
-		
-		//! Returns the tuner name. 
-		/*! Default implementation returns an empty string.
-		 * \return tuner name */
-		virtual inline const std::string getName() const
-			{ return ""; }
-		
-		//! This method tries to readjust and to fine-tune the frequency by means of the current AFC-value.
-		/*! The default implementation is noop and returns -1.
-		 * \return 0, if successful, -1 else. */
-		virtual inline int finetune(int maxsteps) 
-			{ return -1; }
-		
-		//! Get the current automatic frequency control (AFC) value.  
-		/*! If the afc value is negative, the frequency is too low, if positive it is too high. 
-		 *! The default implementation is noop and returns -1.
-		 * \return afc */
-		virtual inline int getAFCValue() const
-			{ return -1; }
-		
-		//! Return the strength of the signal. 
-		/*! The default implementation is noop and returns -1.
-		 * \return signal strength */
-		virtual inline int getSignalStrength() const
-			{ return -1; }
-		
-		//! Increase the frequency a step corresponding to getFreqStep(). 
-		/*! The default implementation is noop and returns -1.
-		 * \return 0, if successful, -1 else. */
-		virtual inline int increaseFreq() 
-			{ return 0; }
-		
-		//! Decrease the frequency a step corresponding to getFreqStep(). 
-		/*! The default implementation is noop and returns -1.
-		 * \return 0, if successful, -1 else. */		
-		virtual inline int decreaseFreq() 
-			{ return 0; }
-		
-		//! Set the new frequency. The frequency is given in MHz.
-		/*! The default implementation is noop and returns -1.
-		 * \param f The new frequency.
-		 * \return 0, if successful, -1 else. */
-		virtual inline int setFreq(double f) 
-			{ return -1; }
-	};
-	
-	/*! Known european terrestric analog TV channels. They must be multiplied by 10^6 
-	 * to obtain the frequency in Hz. */
-	static const double TV_Channels[] = 
-	{
-		48.25, 55.25, 62.25, 175.25, 182.25, 189.25, 196.25, 203.25, 210.25, 217.25, 224.25, 471.25, 479.25, 487.25,
-	 495.25, 503.25, 511.25, 519.25, 527.25, 535.25, 543.25, 551.25, 559.25, 567.25, 575.25, 583.25, 591.25,
-	 599.25, 607.25, 615.25, 623.25, 631.25, 639.25, 647.25, 655.25, 663.25, 671.25, 679.25, 687.25, 695.25,
-	 703.25, 711.25, 719.25, 727.25, 735.25, 743.25, 751.25, 759.25, 767.25, 775.25, 783.25, 791.25, 799.25,
-	 807.25, 815.25, 823.25, 831.25, 839.25, 847.25, 855.25
-	};
-
-	/*! The number of TV channels */	
-	static const int TV_Num_Channels = 60;
-
-	/*! Some german analog radio channels. They must be multiplied by 10^6 
-	 * to obtain the frequency in Hz. */
-	static const double Radio_Channels[] = 
-	{
-		102.4, 102.0
-	};
-
-	/*! The number of radio channels */	
-	static const int Radio_Num_Channels = 2;
-	
-}
-
-#endif // TUNER_H_
diff --git a/extra_lib/include/avcap/avcap-export.h b/extra_lib/include/avcap/avcap-export.h
deleted file mode 100644
index c7a0559..0000000
--- a/extra_lib/include/avcap/avcap-export.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>
- */
-
-
-#ifndef AVCAP_EXPORT_H
-#define AVCAP_EXPORT_H
-
-#if !defined(_MSC_VER) && !defined(USE_PREBUILD_LIBS)
-#include "avcap-config.h"
-#endif
-
-#ifdef AVCAP_WINDOWS
-# if defined AVCAP_EXPORTS
-#   define AVCAP_Export __declspec(dllexport)
-# else /* AVCAP_BUILD_DLL */
-#   define AVCAP_Export /*__declspec(dllimport)*/
-# endif
-#else
-#define AVCAP_Export 
-#endif
-
-#endif /* AVCAP_EXPORT_H */
-
diff --git a/extra_lib/include/avcap/avcap.h b/extra_lib/include/avcap/avcap.h
deleted file mode 100644
index 0e21a61..0000000
--- a/extra_lib/include/avcap/avcap.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>
- */
-
-
-#ifndef AVCAP_H
-#define AVCAP_H
-
-#if !defined(_MSC_VER) && !defined(USE_PREBUILD_LIBS)
-# include "avcap-config.h"
-#endif
-#include "avcap/DeviceCollector.h"
-#include "avcap/DeviceDescriptor.h"
-#include "avcap/CaptureDevice.h"
-#include "avcap/FormatManager.h"
-#include "avcap/CaptureHandler.h"
-#include "avcap/CaptureManager.h"
-#include "avcap/Control_avcap.h"
-#include "avcap/ControlManager.h"
-#include "avcap/Connector.h"
-#include "avcap/ConnectorManager.h"
-#include "avcap/IOBuffer.h"
-#include "avcap/Tuner_avcap.h"
-#include "avcap/log.h"
-
-#endif
diff --git a/extra_lib/include/avcap/linux/AVC_ConnectorManager.h b/extra_lib/include/avcap/linux/AVC_ConnectorManager.h
deleted file mode 100644
index 14c0847..0000000
--- a/extra_lib/include/avcap/linux/AVC_ConnectorManager.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>
- */
-
-#ifdef HAS_AVC_SUPPORT
-
-#ifndef AVC_CONNECTORMANAGER_H_
-#define AVC_CONNECTORMANAGER_H_
-
-#include <list>
-
-#include "ConnectorManager.h"
-
-namespace avcap
-{	
-	class AVC_DeviceDescriptor;
-	
-	//! \brief This class implements the ConnectorManager for AV/C-devices. 
-	
-	/*! Such devices don't have Connectors the user could chose. So the query()
-	 * method is a noop. */
-	
-	class AVC_ConnectorManager: public ConnectorManager
-	{	
-	public:
-		
-		inline AVC_ConnectorManager(AVC_DeviceDescriptor *dd): 
-			ConnectorManager((DeviceDescriptor*) dd)
-			{}
-		
-		virtual inline ~AVC_ConnectorManager()
-			{}
-		
-		inline void query()
-			{}
-	};
-}
-
-#endif // AVC_CONNECTORMANAGER_H_
-
-#endif	// HAS_AVC_SUPPORT
-
diff --git a/extra_lib/include/avcap/linux/AVC_ControlManager.h b/extra_lib/include/avcap/linux/AVC_ControlManager.h
deleted file mode 100644
index 9c2f698..0000000
--- a/extra_lib/include/avcap/linux/AVC_ControlManager.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>
- */
-
-
-#ifdef HAS_AVC_SUPPORT
-
-#ifndef AVC_CONTROLMANAGER_H_
-#define AVC_CONTROLMANAGER_H_
-
-#include <string>
-#include <list>
-
-#include "ControlManager.h"
-
-namespace avcap
-{
-	//! Implementation of the ControlManager for AV/C-devices. 
-	/*! These devices have usually no controls, so there the query method is a noop. */
-	 
-	class AVC_ControlManager:public ControlManager
-	{
-	public:
-		//! The constructor. 
-		/*! \param dd The device descriptor to access the device. */
-		inline AVC_ControlManager(AVC_DeviceDescriptor *dd):
-			ControlManager((DeviceDescriptor*) dd)
-			{}
-		
-		//! The destructor.
-		virtual inline ~AVC_ControlManager() 
-			{}
-		
-		virtual inline void query()
-			{}
-	};
-};
-
-#endif // AVC_CONTROLMANAGER_H_
-#endif
diff --git a/extra_lib/include/avcap/linux/AVC_Device.h b/extra_lib/include/avcap/linux/AVC_Device.h
deleted file mode 100644
index 4d8d8b2..0000000
--- a/extra_lib/include/avcap/linux/AVC_Device.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de>
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>
- */
-
-
-#ifdef HAS_AVC_SUPPORT
-
-#ifndef AVC_DEVICE_H_
-#define AVC_DEVICE_H_
-
-#include <string>
-#include <list>
-
-#include "DeviceDescriptor.h"
-#include "CaptureDevice.h"
-#include "AVC_FormatManager.h"
-
-namespace avcap
-{
-	// forward declarations
-	class AVC_DeviceDescriptor;
-	class AVC_VidCapManager;
-	class AVC_ConnectorManager;
-	class AVC_ControlManager;
-
-	//! Implementation of the CaptureDevice for IEEE 1394 AV/C-devices under linux.
-
-	/*! Such devices don't have controls, various resolutions, extensions, or connectors.
-	 * So the implementation of the methods rely mostly on the default implementations or are
-	 * implemented as noop.
-	 *
-	 * Note: If capturing from AV/C-devices is enabled, avcap depends on
-	 * libiec61883, libavc1394, librom1394, libraw1394
-	 * Furthermore the user requires read/write access to /dev/raw1394.
-	 *
-	 * AV/C-support is enabled by the configure-script, if the neccessary libs and developement-headers
-	 * are found on the system.
-	 *
-	 * The AV/C-support is based on dvgrab (http://www.kinodv.org), which is released under the GPLv2.
-	 */
-
-	class AVC_Device : public CaptureDevice
-	{
-	public:
-
-	private:
-		AVC_DeviceDescriptor*	mDeviceDescriptor;
-		AVC_FormatManager*		mFormatMgr;
-		AVC_VidCapManager*		mVidCapMgr;
-		AVC_ConnectorManager*	mConnectorMgr;
-		AVC_ControlManager*		mControlMgr;
-
-	public:
-		//! Constructor
-		AVC_Device(AVC_DeviceDescriptor* dd);
-
-		//! Destructor
-		virtual ~AVC_Device();
-
-		inline const DeviceDescriptor* getDescriptor()
-			{ return mDeviceDescriptor; }
-
-		inline CaptureManager* getVidCapMgr()
-			{ return (CaptureManager*) mVidCapMgr; }
-
-		inline ConnectorManager* getConnectorMgr()
-			{ return (ConnectorManager*) mConnectorMgr; }
-
-		inline ControlManager* getControlMgr()
-			{ return (ControlManager*) mControlMgr; }
-
-		inline FormatManager* getFormatMgr()
-			{ return (FormatManager*) mFormatMgr; }
-
-	private:
-		int open();
-
-		int close();
-	};
-}
-
-#endif // AVC_DEVICE_H_
-#endif // HAS_AVC_SUPPORT
-
diff --git a/extra_lib/include/avcap/linux/AVC_DeviceDescriptor.h b/extra_lib/include/avcap/linux/AVC_DeviceDescriptor.h
deleted file mode 100644
index e6a78fd..0000000
--- a/extra_lib/include/avcap/linux/AVC_DeviceDescriptor.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de>
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>
- */
-
-
-#ifndef AVC_DEVICEDESCRIPTOR_H_
-#define AVC_DEVICEDESCRIPTOR_H_
-
-#ifdef HAS_AVC_SUPPORT
-
-#include <iostream>
-#include <libavc1394/rom1394.h>
-
-#include "DeviceDescriptor.h"
-
-namespace avcap
-{
-class CaptureDevice;
-class AVC_Device;
-
-	//! This class implements a descriptor for a IEEE 1394 AV/C capture device under linux (e.g. a DV-Camera).
-
-	class AVC_DeviceDescriptor : public DeviceDescriptor
-	{
-	private:
-		std::string mName;
-		std::string mGUIDString;
-		std::string mInfo;
-		std::string	mDriver;
-
-		octlet_t	mGUID;
-		static int	mDevCount;
-		AVC_Device*	mDevice;
-
-	public:
-		//! This constructor uses a numerical global unique identifier to represent a IEEE 1394 capture device (e.g. a firewire DV-Cam).
-		/*! \param guid The unique identifier of device.*/
-		AVC_DeviceDescriptor(const octlet_t guid);
-
-		//! The destructor */
-		virtual ~AVC_DeviceDescriptor();
-
-		int open();
-
-		int close();
-
-		//! Returns the unique identifier of the device. AV/C-devices get the name
-		/*! "AV/C_n", where n is the number of the device in the system starting with 1.
-		 * So the 3rd device found has the name AV/C_3.
-		 * \return unique identifier of device */
-		inline const std::string& getName() const
-			{ return mName; }
-
-		virtual inline const std::string& getInfo() const
-			{ return mInfo; }
-
-		virtual inline const std::string& getDriver() const
-			{ return mDriver; }
-
-		virtual inline const std::string& getCard() const
-			{ return mGUIDString; }
-
-		//! There is no handle associated with a AV/C-device. So this method always returns -1.
-		inline const DEV_HANDLE_T getHandle() const
-			{ return -1; }
-
-		//! Device is an audio/video device. Always returns true.
-		inline bool isAVDev() const
-			{ return true; }
-
-		//! Device is capable to capture some data. Always returns true.
-		inline bool isVideoCaptureDev() const
-			{ return true; }
-
-		inline octlet_t& getGUID()
-			{ return mGUID; }
-
-		virtual CaptureDevice* getDevice();
-	};
-}
-
-#endif // AVC_DEVICEDESCRIPTOR_H_
-#endif // HAS_DVLIBS
-
diff --git a/extra_lib/include/avcap/linux/AVC_FormatManager.h b/extra_lib/include/avcap/linux/AVC_FormatManager.h
deleted file mode 100644
index dfd420c..0000000
--- a/extra_lib/include/avcap/linux/AVC_FormatManager.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>
- */
-
-
-#ifdef HAS_AVC_SUPPORT
-
-#ifndef AVC_FORMATMANAGER_H_
-#define AVC_FORMATMANAGER_H_
-
-#include "FormatManager.h"
-
-namespace avcap
-{
-	class AVC_DeviceDescriptor;
-	
-	//! Implementation of the FormatManager for AV/C devices. 
-	  
-	/*! DV-Cams usually provide only a fixed resolution (PAL: 720x576, NTSC: 720x480)
-	 * YUV-format and no choice of video standards.
-	 * Additionally, this manager provides RGB.*/
-	 
-	class AVC_FormatManager: public FormatManager
-	{
-	private:
-		bool mIsPal;
-		
-	public:
-		AVC_FormatManager(AVC_DeviceDescriptor *dd);
-		
-		virtual ~AVC_FormatManager();
-		
-		//! Set the image with. 
-		/*! For AV/C -devices the reolution is fixed and thus can't be realy modified.
-		 * \param w: width
-		 * \param h: height
-		 * \return 0, if the desired resolution matches the native resolution, -1 else*/
-		int setResolution(int w, int h);
-
-		//! Get the current framerate. Setting the framerate is not possible.
-		/*! \return 25 for PAL, 30 for NTSC(this is a little bit inaccurate, since the proper NTSC-frame rate is 29.97 fps)*/
-		inline int getFramerate() { return mIsPal ? 25 : 30; }
-		
-		void query();
-	};
-};
-#endif // AVC_FORMATMANAGER_H_
-
-#endif // HAS_AVC_SUPPORT
-
diff --git a/extra_lib/include/avcap/linux/AVC_Reader.h b/extra_lib/include/avcap/linux/AVC_Reader.h
deleted file mode 100644
index 2c214b0..0000000
--- a/extra_lib/include/avcap/linux/AVC_Reader.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>
- */
-
-#ifdef HAS_AVC_SUPPORT
-
-#ifndef AVC_READER_H_
-#define AVC_READER_H_
-
-#include <list>
-
-#include "ieee1394io.h"
-
-namespace avcap
-{
-class AVC_VidCapManager;
-class AVC_FormatManager;
-class IOBuffer;
-
-	//! AVC_Reader, used by the AVC_VidCapManager.
-	
-	class AVC_Reader : public iec61883Reader
-	{
-		typedef std::list<IOBuffer*>	BufferList_t;
-		
-		
-		AVC_VidCapManager* mVidCapMgr;
-		AVC_FormatManager*	mFormatMgr;
-		CaptureHandler*		mCaptureHandler;
-	
-		BufferList_t	mBuffers;
-		long			mSequence;
-		int				mAvailableBuffers;
-		
-	public:
-		AVC_Reader(AVC_VidCapManager* cap_mgr, AVC_FormatManager* fmt_mgr, int port, int channel, int num_bufs);
-		
-		virtual ~AVC_Reader();
-	
-		void registerCaptureHandler(CaptureHandler *handler);
-	
-		void removeCaptureHandler();
-		
-		virtual void TriggerAction();
-		
-		void enqueue(IOBuffer* io_buf);
-		
-		inline int getNumIOBuffers() 
-			{ return mAvailableBuffers; }
-	
-	};	
-}
-
-#endif // AVC_READER_H_
-#endif
diff --git a/extra_lib/include/avcap/linux/AVC_VidCapManager.h b/extra_lib/include/avcap/linux/AVC_VidCapManager.h
deleted file mode 100644
index 8f33572..0000000
--- a/extra_lib/include/avcap/linux/AVC_VidCapManager.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>
- */
-
-
-#ifdef HAS_AVC_SUPPORT
-
-#ifndef AVC_VIDCAPMANAGER_H_
-#define AVC_VIDCAPMANAGER_H_
-
-#include "avcap-config.h"
-
-#include <sys/types.h>
-#include <list>
-#include <time.h>
-
-#include "CaptureManager.h"
-
-namespace avcap
-{
-	class AVC_DeviceDescriptor;
-	class AVC_FormatManager;
-	class IOBuffer;
-	class CaptureHandler;
-	class AVC_Reader;
-	class iec61883Connection;
-	
-	//! The IEEE 1394 AV/C video capture manager.
-	
-	/*! This class is used to capture video data from a AV/C-Device (e.g. DV-Cams) connected 
-	 * to the computer via IEEE 1394 (aka Firewire or iLink) under Linux. 
-	*/
-	class AVC_VidCapManager: public CaptureManager
-	{
-	public:
-		enum
-		{
-			MAX_BUFFERS = 32,	//!< The maximum number of IOBuffers.
-			DEFAULT_BUFFERS = 8	//!< The default number of used IOBuffers.
-		};
-		
-	private:
-		typedef std::list<IOBuffer*> IOBufList;
-		
-		AVC_DeviceDescriptor	*mDeviceDescriptor;
-		AVC_FormatManager		*mFormatMgr;
-		AVC_Reader				*mReader;
-		iec61883Connection		*mConnection;
-		
-		IOBufList			mBuffers;
-		int					mNumBufs;
-		int 				mSequence;
-
-	public:
-	
-		AVC_VidCapManager(AVC_DeviceDescriptor* dd, AVC_FormatManager* fmt_mgr, int nbufs = DEFAULT_BUFFERS);
-		
-		virtual ~AVC_VidCapManager();
-		
-		int init();
-		
-		int destroy();
-		
-		int startCapture();
-
-		int stopCapture();
-		
-		void registerCaptureHandler(CaptureHandler *handler); 
-
-		void removeCaptureHandler(); 
-		
-		virtual int getNumIOBuffers();
-
-	private:
-		virtual IOBuffer* dequeue();
-
-		virtual int enqueue(IOBuffer* buf);
-	};
-}
-#endif // AVC_VIDCAPMANAGER_H_
-
-#endif // HAS_AVC_SUPPORT
-
diff --git a/extra_lib/include/avcap/linux/V4L1_Connector.h b/extra_lib/include/avcap/linux/V4L1_Connector.h
deleted file mode 100644
index db4e825..0000000
--- a/extra_lib/include/avcap/linux/V4L1_Connector.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>
- */
-
-
-#ifndef V4L1_CONNECTOR_H_
-#define V4L1_CONNECTOR_H_
-
-#include <linux/types.h>
-
-#include <string>
-#include <list>
-
-#include "Connector.h"
-
-#ifdef AVCAP_HAVE_V4L2
-#include <linux/videodev2.h>
-#else
-#include <linux/videodev.h>
-#endif
-
-namespace avcap
-{	
-	// forward declaration
-	class V4L1_DeviceDescriptor;
-	class Tuner;
-	
-	//! Implementation of the Connector for a Video4Linux1 device. 
-
-	class V4L1_Connector : public Connector
-	{
-	public:
-		//! The Constructor. Objects should be instantiated only by the ConnectorManager.
-		inline V4L1_Connector(V4L1_DeviceDescriptor *dd, int index, const std::string& name, int type=0):
-			Connector(dd, index, name, type)
-			{}
-		
-		virtual inline ~V4L1_Connector()
-			{}			
-	};
-}
-
-#endif // V4L1_CONNECTOR_H_
diff --git a/extra_lib/include/avcap/linux/V4L1_ConnectorManager.h b/extra_lib/include/avcap/linux/V4L1_ConnectorManager.h
deleted file mode 100644
index 4b211b6..0000000
--- a/extra_lib/include/avcap/linux/V4L1_ConnectorManager.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>
- */
-
-
-#ifndef V4L1_CONNECTORMANAGER_H_
-#define V4L1_CONNECTORMANAGER_H_
-
-#include <list>
-
-#include "ConnectorManager.h"
-
-#ifdef AVCAP_HAVE_V4L2
-#include <linux/videodev2.h>
-#else
-#include <linux/videodev.h>
-#endif
-
-namespace avcap
-{	
-	class V4L1_DeviceDescriptor;
-	
-	//! Implementation of the ConnectorManager for Video4Linux2-devices. */
-	
-	class V4L1_ConnectorManager: public ConnectorManager
-	{	
-	private:
-		Connector*	mCurrentVideoInput;
-		
-	public:
-		V4L1_ConnectorManager(V4L1_DeviceDescriptor *dd);
-		
-		virtual ~V4L1_ConnectorManager();
-		
-		Connector* getVideoInput();
-
-		int setVideoInput(Connector* c);
-		
-		void query();
-	
-	private:
-		Connector* findByIndex(const ListType& l, int index);
-	};
-}
-
-#endif // V4L1_CONNECTORMANAGER_H_
diff --git a/extra_lib/include/avcap/linux/V4L1_Control.h b/extra_lib/include/avcap/linux/V4L1_Control.h
deleted file mode 100644
index f0cfd55..0000000
--- a/extra_lib/include/avcap/linux/V4L1_Control.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>
- */
-
-#ifndef V4L1_CONTROL_H_
-#define V4L1_CONTROL_H_
-
-#include <string>
-#include <list>
-
-#include "Control_avcap.h"
-
-namespace avcap
-{
-	// forward declaration
-	class V4L1_DeviceDescriptor;
-	
-	//! Implementation of a V4L1-Control.
-
-	/*! The V4L1 API supprots only controls for brightness, hue, colour, contrast, depth and whiteness.
-	 * They are all integer values between 0 and 65535.*/
-	 
-	class V4L1_Control: public IntegerControl
-	{
-	public:
-		enum Ctrl {
-			BRIGHTNESS = 0,
-			HUE,
-			COLOUR,
-			CONTRAST,
-			WHITENESS,
-			DEPTH
-		};
-	
-	private:	
-		static std::string mNames[6];
-		
-		V4L1_DeviceDescriptor*	mDescriptor;
-		Ctrl	mType;
-		int		mDefaultValue;
-		Interval mInterval;
-		
-	public:
-		V4L1_Control(V4L1_DeviceDescriptor* dd, Ctrl type,  __u16 def);
-
-		virtual inline ~V4L1_Control()
-			{}
-		
-		virtual inline int getId() const
-			{ return mType; }
-		
-		virtual inline int getDefaultValue() const
-			{ return mDefaultValue; }
-		
-		virtual const std::string& getName() const;
-		
-		virtual int setValue(int val);
-
-		virtual int getValue() const;
-		
-		virtual int reset();
-
-		virtual inline const Interval& getInterval() const 
-			{ return mInterval; }
-	};
-}
-
-#endif // V4L1_CONTROL_H_
-
diff --git a/extra_lib/include/avcap/linux/V4L1_ControlManager.h b/extra_lib/include/avcap/linux/V4L1_ControlManager.h
deleted file mode 100644
index 2f08164..0000000
--- a/extra_lib/include/avcap/linux/V4L1_ControlManager.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>
- */
-
-#ifndef V4L1_CONTROLMANAGER_H_
-#define V4L1_CONTROLMANAGER_H_
-
-#include <string>
-#include <list>
-
-#include "ControlManager.h"
-
-namespace avcap
-{
-	class V4L1_DeviceDescriptor;
-	
-	//! Implementation of the ControlManager for Video4Linux2 devices.
-	
-	class V4L1_ControlManager:public ControlManager
-	{
-	public:
-		V4L1_ControlManager(V4L1_DeviceDescriptor *dd);
-		
-		virtual ~V4L1_ControlManager();
-	
-		void query();
-	};
-}
-
-#endif // V4L1_CONTROLMANAGER_H_
diff --git a/extra_lib/include/avcap/linux/V4L1_Device.h b/extra_lib/include/avcap/linux/V4L1_Device.h
deleted file mode 100644
index cd7db28..0000000
--- a/extra_lib/include/avcap/linux/V4L1_Device.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de>
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>
- */
-
-#ifndef V4L1_DEVICE_H_
-#define V4L1_DEVICE_H_
-
-#include <string>
-#include <list>
-
-#include "V4L1_DeviceDescriptor.h"
-#include "CaptureDevice.h"
-
-namespace avcap
-{
-	// forward declarations
-	class V4L1_ConnectorManager;
-	class V4L1_ControlManager;
-	class V4L1_VidCapManager;
-	class V4L1_DeviceDescriptor;
-	class V4L1_FormatManager;
-
-	//! Implementation of the CaptureDevice interface for Video4Linux2 devices. */
-
-	class V4L1_Device : public CaptureDevice
-	{
-	public:
-
-	private:
-		V4L1_VidCapManager		*mVidCapMgr;
-		V4L1_ConnectorManager	*mConnectorMgr;
-		V4L1_ControlManager		*mControlMgr;
-		V4L1_FormatManager		*mFormatMgr;
-		V4L1_DeviceDescriptor	*mDeviceDescriptor;
-
-	public:
-		V4L1_Device(V4L1_DeviceDescriptor* dd);
-
-		virtual ~V4L1_Device();
-
-		inline const DeviceDescriptor* getDescriptor()
-			{ return mDeviceDescriptor; }
-
-		inline CaptureManager* getVidCapMgr()
-			{ return (CaptureManager*) mVidCapMgr; }
-
-		inline ConnectorManager* getConnectorMgr()
-			{ return (ConnectorManager*) mConnectorMgr; }
-
-		inline ControlManager*	getControlMgr()
-			{ return (ControlManager*) mControlMgr; }
-
-		inline FormatManager* getFormatMgr()
-			{ return (FormatManager*) mFormatMgr; }
-
-	private:
-		int open();
-
-		int close();
-	};
-}
-
-#endif //V4L1_DEVICE_H_
-
diff --git a/extra_lib/include/avcap/linux/V4L1_DeviceDescriptor.h b/extra_lib/include/avcap/linux/V4L1_DeviceDescriptor.h
deleted file mode 100644
index f555312..0000000
--- a/extra_lib/include/avcap/linux/V4L1_DeviceDescriptor.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de>
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-
-#ifndef V4L1_DEVICEDESCRIPTOR_H_
-#define V4L1_DEVICEDESCRIPTOR_H_
-
-#include <iostream>
-
-#include "DeviceDescriptor.h"
-
-namespace avcap
-{
-class CaptureDevice;
-class V4L1_Device;
-
-	//! This class uniquely identifies a Video4Linux1 capture device.
-
-	class V4L1_DeviceDescriptor : public DeviceDescriptor
-	{
-	public:
-		struct bounds {
-			unsigned int minwidth, minheight, maxwidth, maxheight;
-		};
-
-	private:
-		std::string	mName;
-		std::string mDriver;
-		std::string mCard;
-		std::string mInfo;
-		std::string mVersionString;
-
-		int mVersion;
-
-		DEV_HANDLE_T mHandle;
-		bool mValid;
-
-		// Video4Linux1 specific data
-		int		mType;
-		bounds	mBounds;
-		int 	mAudios;
-		int		mChannels;
-		bool	mIsStreamingDev;
-
-		V4L1_Device*	mDevice;
-
-	public:
-		V4L1_DeviceDescriptor(const std::string &name);
-
-		virtual ~V4L1_DeviceDescriptor();
-
-		virtual CaptureDevice* getDevice();
-
-		virtual int open();
-
-		virtual int close();
-
-		virtual const std::string& getName() const;
-
-		inline const std::string& getDriver() const
-			{ return mDriver; }
-
-		inline const std::string& getCard() const
-			{ return mCard; }
-
-		inline const std::string& getInfo() const
-			{ return mInfo; }
-
-		inline int getVersion() const
-			{ return mVersion; }
-
-		const std::string& getVersionString() const;
-
-		inline const DEV_HANDLE_T getHandle() const
-			{ return mHandle; }
-
-		bool isAVDev() const;
-
-		bool isVideoCaptureDev() const;
-
-		bool isVBIDev() const;
-
-		bool isTuner() const;
-
-		bool isAudioDev() const;
-
-		bool isRadioDev() const;
-
-		bool isOverlayDev() const;
-
-		bool isRWDev () const;
-
-		bool isAsyncIODev() const;
-
-		bool isStreamingDev() const;
-
-		inline int getChannels() const
-			{ return mChannels; }
-
-		inline int getAudios() const
-			{ return mAudios; }
-
-		//! Returns a reference to the bounds of the video size.
-		inline bounds& getBounds()
-			{ return mBounds; }
-
-	private:
-		bool queryCapabilities();
-	};
-};
-
-#endif // V4L1_DEVICEDESCRIPTOR_H_
diff --git a/extra_lib/include/avcap/linux/V4L1_FormatManager.h b/extra_lib/include/avcap/linux/V4L1_FormatManager.h
deleted file mode 100644
index 2fe7068..0000000
--- a/extra_lib/include/avcap/linux/V4L1_FormatManager.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-
-#ifndef V4L1_FORMATMANAGER_H_
-#define V4L1_FORMATMANAGER_H_
-
-#include <linux/videodev.h>
-
-#include "FormatManager.h"
-
-namespace avcap
-{
-	class V4L1_DeviceDescriptor;
-	
-	//! This class implements the FormatManager for Video4Linux2 devices. */
-	/*! This CaptureManager starts an own thread to capture data. 
-	 * The access to the internal buffer-list is synchronized, so \c release() can be called
-	 * from any thread at any time.
-	 */
-		 
-	class V4L1_FormatManager: public FormatManager
-	{
-	private:
-		struct fmtdesc {
-			char	description[32];
-			__u16	palette;
-			__u32	fourcc;
-			float	sizefactor;
-		};
-		
-		static const int mNumDescriptors = 18; 
-
-		static const fmtdesc mDescriptors[mNumDescriptors];
-		
-		bool mIsOVFX2;
-		
-	public:
-		V4L1_FormatManager(V4L1_DeviceDescriptor *dd);
-		
-		virtual ~V4L1_FormatManager();
-		
-		int setFormat(Format *fmt);
-		
-		int setFormat(unsigned int fourcc);
-
-		Format* getFormat();
-		
-		int setResolution(int w, int h);
-		
-		int setBytesPerLine(int bpl);
-
-		int getWidth();
-
-		int getHeight();
-		
-		int getBytesPerLine();
-
-		int flush();
-
-		size_t getImageSize();
-
-		const VideoStandard* getVideoStandard();
-
-		int setVideoStandard(const VideoStandard* std);
-		
-		//! Setting the frame-rate is currently only possible for some philips-cams
-		int setFramerate(int fps);
-		
-		int getFramerate();
-
-		__u16 getPalette();
-		
-		void query();
-
-	private:
-		int getParams();
-
-		void queryResolutions();
-		
-		__u16 getPalette(__u32 fourcc);
-		
-		int updateDimensions();
-	};
-}
-
-#endif //V4L1_FORMATMANAGER_H_
diff --git a/extra_lib/include/avcap/linux/V4L1_VidCapManager.h b/extra_lib/include/avcap/linux/V4L1_VidCapManager.h
deleted file mode 100644
index f1e83ce..0000000
--- a/extra_lib/include/avcap/linux/V4L1_VidCapManager.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-
-#ifndef V4L1_VIDCAPMANAGER_H_
-#define V4L1_VIDCAPMANAGER_H_
-
-#include <sys/types.h>
-#include <list>
-#include <time.h>
-
-#include "CaptureManager.h"
-
-namespace avcap
-{
-	class V4L1_DeviceDescriptor;
-	class V4L1_FormatManager;
-	class IOBuffer;
-	class CaptureHandler;
-
-	//! The Video4Linux2-API video capture manager.
-
-	class V4L1_VidCapManager: public CaptureManager
-	{
-	private:
-		typedef std::list<IOBuffer*> IOBufList_t;
-		typedef std::list<int>		 IndexList_t;
-				
-		V4L1_DeviceDescriptor	*mDeviceDescriptor;
-		V4L1_FormatManager		*mFormatMgr;
-		
-		IOBufList_t			mBuffers;
-		IndexList_t			mCaptureIndices;
-		
-		int					mNumBufs;
-		int					mMethod;
-		int					mState;
-
-		pthread_t*			mThread;
-		int					mFinish;
-		pthread_mutex_t		mLock;
-		timeval				mStartTime;
-
-		long 				mSequence;
-
-		unsigned char*		mVideobuf;
-		size_t				mVideobufSize;
-		int					mWidth;
-		int					mHeight;
-		unsigned int		mPalette;
-		int					mAvailableBuffers;
-		
-	public:
-	
-		V4L1_VidCapManager(V4L1_DeviceDescriptor* dd, V4L1_FormatManager* fmt_mgr, int nbufs = DEFAULT_BUFFERS);
-		
-		virtual ~V4L1_VidCapManager();
-		
-		int init();
-		
-		int destroy();
-		
-		int startCapture();
-
-		int stopCapture();
-		
-		int getNumIOBuffers();
-		
-	private:
-		int start_read();
-
-		int start_mmap();
-
-		int stop_read();
-		
-		int stop_mmap();
-
-		IOBuffer* dequeue();
-		
-		int enqueue(IOBuffer* buf);
-		
-		IOBuffer* findBuffer(int index);
-		
-		static void run(void* mgr);
-		
-		void clearBuffers();
-		
-		int getUsedBufferCount();
-	};
-};
-#endif // V4L1_VIDCAPMANAGER_H_
diff --git a/extra_lib/include/avcap/linux/V4L2_BoolControl.h b/extra_lib/include/avcap/linux/V4L2_BoolControl.h
deleted file mode 100644
index b713019..0000000
--- a/extra_lib/include/avcap/linux/V4L2_BoolControl.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-#ifndef V4L2_BOOLCONTROL_H_
-#define V4L2_BOOLCONTROL_H_
-
-#include "V4L2_ControlBase.h"
-
-namespace avcap
-{
-	class V4L2_DeviceDescriptor;
-
-	//! A control for a Video4Linux2 device with one of the two values true (1) or false (0).
-	
-	class V4L2_BoolControl: public BoolControl
-	{
-	private:
-		V4L2_ControlBase	mControlBase;
-		
-	public:
-		inline V4L2_BoolControl(V4L2_DeviceDescriptor *dd, struct v4l2_queryctrl* query):
-			mControlBase(dd, query)
-			{}
-
-		virtual inline ~V4L2_BoolControl()
-			{}
-		
-		virtual inline int getId() const
-			{ return mControlBase.getId(); }
-	
-		virtual inline int getDefaultValue() const
-			{ return mControlBase.getDefaultValue(); }
-	
-		virtual inline const std::string& getName() const
-			{ return mControlBase.getName(); }
-	
-		virtual inline int setValue(int val)
-			{ return mControlBase.setValue(val); }
-	
-		virtual inline int getValue() const
-			{ return mControlBase.getValue(); }
-		
-		virtual inline int reset()
-			{ return mControlBase.reset(); }
-	};
-}
-
-#endif // V4L2_BOOLCONTROL_H_
diff --git a/extra_lib/include/avcap/linux/V4L2_ButtonControl.h b/extra_lib/include/avcap/linux/V4L2_ButtonControl.h
deleted file mode 100644
index ea589a5..0000000
--- a/extra_lib/include/avcap/linux/V4L2_ButtonControl.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-
-#ifndef V4L2_BUTTONCONTROL_H_
-#define V4L2_BUTTONCONTROL_H_
-
-#include "V4L2_ControlBase.h"
-
-namespace avcap
-{
-	class V4L2_DeviceDescriptor;
-	
-	//! A control for a Video4Linux2 device that performs an action when set, independently from the value.
-	
-	class V4L2_ButtonControl: public ButtonControl
-	{
-	private:
-		V4L2_ControlBase	mControlBase;
-
-	public:
-		inline V4L2_ButtonControl(V4L2_DeviceDescriptor *dd, struct v4l2_queryctrl* query): 
-			mControlBase(dd, query)
-			{}
-
-		virtual inline ~V4L2_ButtonControl()
-			{}
-		
-		virtual inline int push()
-			{ return setValue(0); }
-		
-		virtual inline int getId() const
-			{ return mControlBase.getId(); }
-	
-		virtual inline int getDefaultValue() const
-			{ return mControlBase.getDefaultValue(); }
-	
-		virtual inline const std::string& getName() const
-			{ return mControlBase.getName(); }
-	
-		virtual inline int setValue(int val)
-			{ return mControlBase.setValue(val); }
-	
-		virtual inline int getValue() const
-			{ return mControlBase.getValue(); }
-		
-		virtual inline int reset() 
-			{ return mControlBase.reset(); }
-	};
-}
-
-#endif // V4L2_BUTTONCONTROL_H_
diff --git a/extra_lib/include/avcap/linux/V4L2_Connector.h b/extra_lib/include/avcap/linux/V4L2_Connector.h
deleted file mode 100644
index 469d4ef..0000000
--- a/extra_lib/include/avcap/linux/V4L2_Connector.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-
-#ifndef V4L2_CONNECTOR_H_
-#define V4L2_CONNECTOR_H_
-
-#include <linux/types.h>
-
-#include <string>
-#include <list>
-
-#include "Connector.h"
-
-#ifdef AVCAP_HAVE_V4L2
-#include <linux/videodev2.h>
-#else
-#include <linux/videodev.h>
-#endif
-
-namespace avcap
-{	
-	// forward declaration
-	class V4L2_DeviceDescriptor;
-	class Tuner;
-	
-	//! This class implements Connector (a video/audio input or output) for a Video4Linux2 device.
-	 
-	class V4L2_Connector : public Connector
-	{
-	private:
-		Tuner*				mTuner;
-		
-	public:
-		V4L2_Connector(V4L2_DeviceDescriptor *dd, int index, const std::string& name, int type=0, int audioset=0, int tuner=0);			
-
-		virtual ~V4L2_Connector();
-
-		inline Tuner* getTuner()
-			{ return mTuner; }
-				
-		inline bool hasTuner() const
-			{ return mType & INPUT_TYPE_TUNER; }
-	};
-}
-
-#endif // V4L2_CONNECTOR_H_
diff --git a/extra_lib/include/avcap/linux/V4L2_ConnectorManager.h b/extra_lib/include/avcap/linux/V4L2_ConnectorManager.h
deleted file mode 100644
index 7be974c..0000000
--- a/extra_lib/include/avcap/linux/V4L2_ConnectorManager.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-
-#ifndef V4L2_CONNECTORMANAGER_H_
-#define V4L2_CONNECTORMANAGER_H_
-
-#include <list>
-
-#include "ConnectorManager.h"
-
-namespace avcap
-{	
-	class V4L2_DeviceDescriptor;
-	
-	//! This class implements the ConnectorManager for Video4Linux2-devices.
-	
-	class V4L2_ConnectorManager: public ConnectorManager
-	{	
-	public:
-	
-		V4L2_ConnectorManager(V4L2_DeviceDescriptor *dd);
-
-		virtual ~V4L2_ConnectorManager();
-		
-		Connector* getVideoInput();
-
-		int setVideoInput(Connector* c);
-		
-		Connector* getAudioInput();
-
-		int setAudioInput(Connector* c);
-		
-		Connector* getVideoOutput();
-		
-		int setVideoOutput(Connector* c);
-		
-		Connector* getAudioOutput();
-		
-		int setAudioOutput(Connector* c);
-
-		void query();
-	
-	private:
-		Connector* findByIndex(const ListType& l, int index);
-	};
-}
-
-#endif // V4L2_CONNECTORMANAGER_H_
diff --git a/extra_lib/include/avcap/linux/V4L2_ControlBase.h b/extra_lib/include/avcap/linux/V4L2_ControlBase.h
deleted file mode 100644
index f8efb75..0000000
--- a/extra_lib/include/avcap/linux/V4L2_ControlBase.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-#ifndef V4L2_CONTROLBASE_H_
-#define V4L2_CONTROLBASE_H_
-
-#include <string>
-#include <list>
-
-#if !defined(_MSC_VER) && !defined(USE_PREBUILD_LIBS)
-# include "avcap-config.h"
-#endif
-
-#ifdef AVCAP_HAVE_V4L2
-#include <linux/videodev2.h>
-#else
-#include <linux/videodev.h>
-#endif
-
-namespace avcap
-{
-	// forward declaration
-	class V4L2_DeviceDescriptor;
-	
-	//! Basic implementation of a device control for a Video4Linux2 device.
-	
-	/*! Implements common methods of V4L2-controls. */
-	
-	class V4L2_ControlBase
-	{
-	protected:
-		V4L2_DeviceDescriptor	*mDeviceDescriptor;
-		int	mId;
-		int mValue;
-	
-	private:
-		std::string	mName;
-		int mDefaultValue;
-		int mFlags;
-
-	public:
-		V4L2_ControlBase(V4L2_DeviceDescriptor *dd, struct v4l2_queryctrl* query);
-
-		virtual ~V4L2_ControlBase();
-
-		inline int getId() const
-			{ return mId; }
-
-		inline int getDefaultValue() const
-			{ return mDefaultValue; }
-		
-		inline const std::string& getName() const 
-			{ return mName; }
-		
-		virtual int setValue(int val);
-
-		virtual int getValue() const;
-		
-		virtual int reset();
-		
-		//! Return the flags of the v4l2_queryctrl structure associated with the control.
-		__u32 getFlags() const { return mFlags; }
-		
-	protected:
-		// updates the value of the control
-		int update();
-	};
-}
-
-#endif // V4L2_CONTROLBASE_H_
-
diff --git a/extra_lib/include/avcap/linux/V4L2_ControlManager.h b/extra_lib/include/avcap/linux/V4L2_ControlManager.h
deleted file mode 100644
index 2b3e5ed..0000000
--- a/extra_lib/include/avcap/linux/V4L2_ControlManager.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-
-#ifndef V4L2_CONTROLMANAGER_H_
-#define V4L2_CONTROLMANAGER_H_
-
-#include <string>
-#include <list>
-
-#include "ControlManager.h"
-
-namespace avcap
-{
-	class V4L2_DeviceDescriptor;
-	
-	//! Implementation of the ControlManager for Video4Linux2 devices.
-	
-	class V4L2_ControlManager:public ControlManager
-	{
-	public:
-		V4L2_ControlManager(V4L2_DeviceDescriptor *dd);
-		
-		virtual ~V4L2_ControlManager();
-	
-		void query();
-		
-	private:
-		void query(int start_id, int end_id);
-		
-		bool queryExtended();
-	};
-}
-
-#endif // V4L2_CONTROLMANAGER_H_
diff --git a/extra_lib/include/avcap/linux/V4L2_CtrlClassControl.h b/extra_lib/include/avcap/linux/V4L2_CtrlClassControl.h
deleted file mode 100644
index c4a37f1..0000000
--- a/extra_lib/include/avcap/linux/V4L2_CtrlClassControl.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-#ifndef V4L2_CTRLCLASS_CONTROL_H_
-#define V4L2_CTRLCLASS_CONTROL_H_
-
-#include "V4L2_ControlBase.h"
-
-namespace avcap
-{
-	class V4L2_DeviceDescriptor;
-
-	//! A control for a Video4Linux2 device naming the control-class of the subsequent enumerated controls.
-	
-	class V4L2_CtrlClassControl: public CtrlClassControl
-	{
-	private:
-		V4L2_ControlBase	mControlBase;
-		
-	public:
-		inline V4L2_CtrlClassControl(V4L2_DeviceDescriptor *dd, struct v4l2_queryctrl* query):
-			mControlBase(dd, query)
-			{}
-
-		virtual inline ~V4L2_CtrlClassControl()
-			{}
-		
-		virtual inline int getId() const
-			{ return mControlBase.getId(); }
-	
-		virtual inline int getDefaultValue() const
-			{ return 0; }
-	
-		virtual inline const std::string& getName() const
-			{ return mControlBase.getName(); }
-	
-		virtual inline int setValue(int val)
-			{ return 0; }
-	
-		virtual inline int getValue() const
-			{ return 0; }
-		
-		virtual inline int reset()
-			{ return 0; }
-	};
-}
-
-#endif // V4L2_CTRLCLASS_CONTROL_H_
diff --git a/extra_lib/include/avcap/linux/V4L2_Device.h b/extra_lib/include/avcap/linux/V4L2_Device.h
deleted file mode 100644
index ddd0b90..0000000
--- a/extra_lib/include/avcap/linux/V4L2_Device.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de>
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-
-#ifndef V4L2_DEVICE_H_
-#define V4L2_DEVICE_H_
-
-#include <string>
-#include <list>
-
-#include "V4L2_DeviceDescriptor.h"
-#include "CaptureDevice.h"
-
-namespace avcap
-{
-	// forward declarations
-	class V4L2_ConnectorManager;
-	class V4L2_ControlManager;
-	class V4L2_VidCapManager;
-	class V4L2_DeviceDescriptor;
-	class V4L2_FormatManager;
-
-	//! Implementation of the CaptureDevice for Video4Linux2 devices. */
-
-	class V4L2_Device : public CaptureDevice
-	{
-	public:
-
-	private:
-		V4L2_VidCapManager		*mVidCapMgr;
-		V4L2_ConnectorManager	*mConnectorMgr;
-		V4L2_ControlManager		*mControlMgr;
-		V4L2_FormatManager		*mFormatMgr;
-		V4L2_DeviceDescriptor	*mDeviceDescriptor;
-
-	public:
-		V4L2_Device(V4L2_DeviceDescriptor* dd);
-
-		virtual ~V4L2_Device();
-
-		inline const DeviceDescriptor* getDescriptor()
-			{ return mDeviceDescriptor; }
-
-		inline CaptureManager* getVidCapMgr()
-			{ return (CaptureManager*) mVidCapMgr; }
-
-		inline ConnectorManager* getConnectorMgr()
-			{ return (ConnectorManager*) mConnectorMgr; }
-
-		inline ControlManager*	getControlMgr()
-			{ return (ControlManager*) mControlMgr; }
-
-		inline FormatManager* getFormatMgr()
-			{ return (FormatManager*) mFormatMgr; }
-
-	private:
-		int open();
-
-		int close();
-	};
-}
-
-#endif // V4L2_DEVICE_H_
-
diff --git a/extra_lib/include/avcap/linux/V4L2_DeviceDescriptor.h b/extra_lib/include/avcap/linux/V4L2_DeviceDescriptor.h
deleted file mode 100644
index 99f66f8..0000000
--- a/extra_lib/include/avcap/linux/V4L2_DeviceDescriptor.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de>
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-#ifndef V4L2_DEVICEDESCRIPTOR_H_
-#define V4L2_DEVICEDESCRIPTOR_H_
-
-#include <string>
-
-#include "DeviceDescriptor.h"
-
-// IVTV driver name
-#define DRIVER_IVTV	"ivtv"
-
-namespace avcap
-{
-class CaptureDevice;
-class V4L2_Device;
-
-	//! This class uniquely identifies a Video4Linux2 capture device.
-
-	class V4L2_DeviceDescriptor : public DeviceDescriptor
-	{
-	private:
-		std::string	mName;
-		std::string mDriver;
-		std::string mCard;
-		std::string mInfo;
-		std::string mVersionString;
-
-		int mVersion;
-		int mCapabilities;
-
-		DEV_HANDLE_T 	mHandle;
-		bool 			mValid;
-		V4L2_Device*	mDevice;
-
-	public:
-		V4L2_DeviceDescriptor(const std::string &name);
-
-		virtual ~V4L2_DeviceDescriptor();
-
-		virtual CaptureDevice* getDevice();
-
-		int open();
-
-		int close();
-
-		virtual const std::string& getName() const;
-
-		inline const std::string& getDriver() const
-			{ return mDriver; }
-
-		inline const std::string& getCard() const
-			{ return mCard; }
-
-		inline const std::string& getInfo() const
-			{ return mInfo; }
-
-		inline int getVersion() const
-			{ return mVersion; }
-
-		const std::string& getVersionString() const;
-
-		inline const DEV_HANDLE_T getHandle() const
-			{ return mHandle; }
-
-		bool isAVDev() const;
-
-		bool isVideoCaptureDev() const;
-
-		bool isVBIDev() const;
-
-		bool isTuner() const;
-
-		bool isAudioDev() const;
-
-		bool isRadioDev() const;
-
-		bool isOverlayDev() const;
-
-		bool isRWDev () const;
-
-		bool isAsyncIODev() const;
-
-		bool isStreamingDev() const;
-
-	private:
-		bool queryCapabilities();
-	};
-}
-
-#endif // V4L2_DEVICEDESCRIPTOR_H_
diff --git a/extra_lib/include/avcap/linux/V4L2_FormatManager.h b/extra_lib/include/avcap/linux/V4L2_FormatManager.h
deleted file mode 100644
index d729c42..0000000
--- a/extra_lib/include/avcap/linux/V4L2_FormatManager.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-#ifndef V4L2_FORMATMANAGER_H_
-#define V4L2_FORMATMANAGER_H_
-
-#include "FormatManager.h"
-
-namespace avcap
-{
-	class V4L2_DeviceDescriptor;
-	
-	//! This class implements the FormatManager for Video4Linux2 devices. */
-	
-	class V4L2_FormatManager: public FormatManager
-	{
-	
-	public:
-		V4L2_FormatManager(V4L2_DeviceDescriptor *dd);
-		
-		virtual ~V4L2_FormatManager();
-		
-		int setFormat(Format *fmt);
-		
-		int setFormat(unsigned int fourcc);
-
-		Format* getFormat();
-		
-		int setResolution(int w, int h);
-
-		int setBytesPerLine(int bpl);
-
-		int getWidth();
-
-		int getHeight();
-		
-		int getBytesPerLine();
-		
-		int flush();
-
-		size_t getImageSize();
-		
-		const VideoStandard* getVideoStandard();
-
-		int setVideoStandard(const VideoStandard* std);
-		
-		int setFramerate(int fps);
-		
-		int getFramerate();
-		
-		void query();
-
-	private:
-		int tryFormat();
-		
-		int getParams();
-		
-		void queryVideoStandards();
-		
-		void queryResolutions(Format* f);
-	
-	};
-}
-
-#endif // V4L2_FORMATMANAGER_H_
diff --git a/extra_lib/include/avcap/linux/V4L2_IntControl.h b/extra_lib/include/avcap/linux/V4L2_IntControl.h
deleted file mode 100644
index da07a18..0000000
--- a/extra_lib/include/avcap/linux/V4L2_IntControl.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-
-#ifndef V4L2_INTCONTROL_H_
-#define V4L2_INTCONTROL_H_
-
-#include "V4L2_ControlBase.h"
-
-namespace avcap
-{
-	class V4L2_DeviceDescriptor;
-	
-	//! Implementation of an integer valued control for Video4Linux2 devices.
-	 
-	class V4L2_IntControl: public IntegerControl
-	{
-	private:
-		V4L2_ControlBase	mControlBase;
-		Interval			mInterval;
-		
-	public:
-		inline V4L2_IntControl(V4L2_DeviceDescriptor *dd, struct v4l2_queryctrl* query):
-			mControlBase(dd, query),
-			mInterval(query->minimum, query->maximum, query->step)
-			{}
-
-		virtual inline ~V4L2_IntControl()
-			{}
-		
-		inline const Interval& getInterval() const 
-			{ return mInterval; }
-
-		virtual inline int getId() const
-			{ return mControlBase.getId(); }
-	
-		virtual inline int getDefaultValue() const
-			{ return mControlBase.getDefaultValue(); }
-	
-		virtual inline const std::string& getName() const
-			{ return mControlBase.getName(); }
-	
-		virtual inline int setValue(int val)
-			{ return mControlBase.setValue(val); }
-	
-		virtual inline int getValue() const
-			{ return mControlBase.getValue(); }
-		
-		virtual inline int reset() 
-			{ return mControlBase.reset(); }
-
-	};
-}
-
-#endif // V4L2_INTCONTROL_H_
diff --git a/extra_lib/include/avcap/linux/V4L2_MenuControl.h b/extra_lib/include/avcap/linux/V4L2_MenuControl.h
deleted file mode 100644
index c1182fb..0000000
--- a/extra_lib/include/avcap/linux/V4L2_MenuControl.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-#ifndef V4L2_MENUCONTROL_H_
-#define V4L2_MENUCONTROL_H_
-
-#include "V4L2_ControlBase.h"
-#include "Control_avcap.h"
-
-namespace avcap
-{
-	// forward declaration
-	class V4L2_DeviceDescriptor;
-	
-	//! A Control for a Video4Linux2 device which has various menu-like items to choose from.
-	
-	class V4L2_MenuControl: public MenuControl
-	{
-	private:
-		V4L2_ControlBase	mControlBase;
-		ItemList 			mMenuItems;
-		V4L2_DeviceDescriptor*	mDeviceDescriptor;
-		
-	public:
-		//! The constructor.
-		V4L2_MenuControl(V4L2_DeviceDescriptor *dd, struct v4l2_queryctrl* query);
-
-		//! The destructor.
-		virtual ~V4L2_MenuControl();
-	
-		virtual inline int getId() const
-			{ return mControlBase.getId(); }
-	
-		virtual inline int getDefaultValue() const
-			{ return mControlBase.getDefaultValue(); }
-	
-		virtual inline const std::string& getName() const
-			{ return mControlBase.getName(); }
-	
-		virtual inline int setValue(int val)
-			{ return mControlBase.setValue(val); }
-	
-		virtual inline int getValue() const
-			{ return mControlBase.getValue(); }
-		
-		virtual inline int reset() 
-			{ return mControlBase.reset(); }
-
-		virtual inline const ItemList& getItemList () 
-			{ return mMenuItems; }
-
-	private:
-		void queryMenuItems();
-	};
-}
-
-#endif //V4L2_MENUCONTROL_H_
diff --git a/extra_lib/include/avcap/linux/V4L2_Tuner.h b/extra_lib/include/avcap/linux/V4L2_Tuner.h
deleted file mode 100644
index 1dcdf6d..0000000
--- a/extra_lib/include/avcap/linux/V4L2_Tuner.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-
-#ifndef V4L2_TUNER_H_
-#define V4L2_TUNER_H_
-
-#include <linux/types.h>
-#include <sys/types.h>
-#include <string>
-
-#include "Tuner_avcap.h"
-#ifdef AVCAP_HAVE_V4L2
-#include <linux/videodev2.h>
-#else
-#include <linux/videodev.h>
-#endif
-
-namespace avcap
-{
-	class V4L2_DeviceDescriptor;
-	
-	//! Implementation of the Tuner class for Video4Linux2 -devices.
-	
-	class V4L2_Tuner: public Tuner
-	{
-	private:
-
-		enum {
-			TUNER_RADIO = V4L2_TUNER_RADIO,
-			TUNER_ANALOG_TV = V4L2_TUNER_ANALOG_TV,
-		};
-		
-		enum {
-			TUNER_CAP_LOW = V4L2_TUNER_CAP_LOW
-		};
-
-		typedef __u32	     uint;
-
-	private:
-		V4L2_DeviceDescriptor*	mDeviceDescriptor;
-		int			mIndex;
-		std::string	mName;
-		int			mType;
-		int			mCapabilities;
-		uint 		mRangeHigh;
-		uint 		mRangeLow;
-		double		mStep;
-		
-	public:
-		V4L2_Tuner(V4L2_DeviceDescriptor *dd, int index, const std::string &name, int type, int caps, uint high, uint low);
-		virtual ~V4L2_Tuner();
-		
-		inline bool isRadioTuner() const 
-			{ return mType & TUNER_RADIO; }
-
-		inline bool isTVTuner() const 
-			{ return mType & TUNER_ANALOG_TV; };
-
-		int setStereo();
-
-		int setMono();
-		
-		int setSAP();
-		
-		int setLang1();
-
-		int setLang2();
-
-		double getFreq() const;
-
-		inline double getFreqStep() const 
-			{ return mStep; }
-		
-		inline double getMinFreq() const 
-			{ return mRangeLow*mStep; }
-
-		inline double getMaxFreq() const 
-			{ return mRangeHigh*mStep; }
-		
-		inline const std::string getName() const
-			{ return mName; }
-		
-		int finetune(int maxsteps);
-		
-		int getAFCValue() const;
-		
-		int getSignalStrength() const;
-		
-		int increaseFreq();
-		
-		int decreaseFreq();		
-		
-		int setFreq(double f);
-		
-	private:
-		int setAudioMode(int mode);
-
-		int getAudioMode();
-	};
-}
-
-#endif // V4L2_TUNER_H_
-
diff --git a/extra_lib/include/avcap/linux/V4L2_VidCapManager.h b/extra_lib/include/avcap/linux/V4L2_VidCapManager.h
deleted file mode 100644
index 63d004a..0000000
--- a/extra_lib/include/avcap/linux/V4L2_VidCapManager.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-
-#ifndef V4L2_VIDCAPMANAGER_H_
-#define V4L2_VIDCAPMANAGER_H_
-
-#include <sys/types.h>
-#include <list>
-#include <time.h>
-
-#include "CaptureManager.h"
-
-namespace avcap
-{
-	class V4L2_DeviceDescriptor;
-	class FormatManager;
-	class IOBuffer;
-	class CaptureHandler;
-
-	//! The Video4Linux2-API video capture manager.
-	
-	/*! This class can be used to capture video data from a V4L2 video device. 
-	 * The manager creates a defined number 
-	 * of IOBuffers and permanently reuses them to store the captured data. 
-	 * Since the number of these buffers is finite, it is important that applications 
-	 * call IOBuffer::release() as soon as they don't need the data anymore. The
-	 * access to the internal buffer-list is synchronized, so \c release() can be called
-	 * from any thread at any time.
-	 * Typical applications don't create objects of this class directly. They obtain
-	 * an instance from CaptureDevice. */
-	 
-	class V4L2_VidCapManager: public CaptureManager
-	{
-	public:
-		enum
-		{
-			MAX_BUFFERS = 32,	//!< The maximum number of IOBuffers.
-			DEFAULT_BUFFERS = 16	//!< The default number of used IOBuffers.
-		};
-		
-		enum IOMethod
-		{
-			IO_METHOD_NOCAP = 0,
-	        IO_METHOD_READ,
-	        IO_METHOD_MMAP,
-	        IO_METHOD_USERPTR,
-		};
-
-	private:
-		typedef std::list<IOBuffer*> IOBufList;
-		
-		V4L2_DeviceDescriptor	*mDeviceDescriptor;
-		FormatManager		*mFormatMgr;
-
-		IOBufList			mBuffers;
-		int					mNumBufs;
-		int					mMethod;
-		int					mState;
-		pthread_t*			mThread;
-		int 				mFinish;
-		pthread_mutex_t		mLock;
-		timeval				mStartTime;
-
-		int 				mSequence;
-		int					mDTNumerator;
-		int					mDTDenominator;
-		int					mAvailableBuffers;
-	
-	public:
-		V4L2_VidCapManager(V4L2_DeviceDescriptor* dd, FormatManager* fmt_mgr, int nbufs = DEFAULT_BUFFERS);
-		
-		virtual ~V4L2_VidCapManager();
-		
-		int init();
-		
-		int destroy();
-		
-		int startCapture();
-
-		int stopCapture();
-		
-		int getNumIOBuffers();
-
-	private:
-		int start_read();
-		int start_mmap();
-		int start_userptr();
-
-		int stop_read();
-		int stop_mmap();
-		int stop_userptr();
-
-		IOBuffer* dequeue();
-		int enqueue(IOBuffer* buf);
-		
-		IOBuffer* findBuffer(int index);
-		static void run(void* mgr);
-		
-		void clearBuffers();
-		int getUsedBufferCount();
-	};
-}
-
-#endif // V4L2_VIDCAPMANAGER_H_
diff --git a/extra_lib/include/avcap/linux/error.h b/extra_lib/include/avcap/linux/error.h
deleted file mode 100644
index 217a25a..0000000
--- a/extra_lib/include/avcap/linux/error.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-* error.h Error handling
-* Copyright (C) 2000 - 2002 Arne Schirmacher <arne at schirmacher.de>
-*
-* 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.
-*
-* 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, write to the Free Software Foundation,
-* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifdef HAS_AVC_SUPPORT
-
-#ifndef _ERROR_H
-#define _ERROR_H 1
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-#define fail_neg(eval)  real_fail_neg  (eval, #eval, __ASSERT_FUNCTION, __FILE__, __LINE__)
-#define fail_null(eval) real_fail_null (eval, #eval, __ASSERT_FUNCTION, __FILE__, __LINE__)
-#define fail_if(eval)   real_fail_if   (eval, #eval, __ASSERT_FUNCTION, __FILE__, __LINE__)
-
-	void real_fail_neg ( int eval, const char * eval_str, const char * func, const char * file, int line );
-	void real_fail_null ( const void * eval, const char * eval_str, const char * func, const char * file, int line );
-	void real_fail_if ( bool eval, const char * eval_str, const char * func, const char * file, int line );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-#endif
-
diff --git a/extra_lib/include/avcap/linux/frame.h b/extra_lib/include/avcap/linux/frame.h
deleted file mode 100644
index 1a4cd0b..0000000
--- a/extra_lib/include/avcap/linux/frame.h
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
-* frame.h -- utilities for process digital video frames
-* Copyright (C) 2000 Arne Schirmacher <arne at schirmacher.de>
-*
-* 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.
-*
-* 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, write to the Free Software Foundation,
-* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifdef HAS_AVC_SUPPORT
-#define HAVE_LIBDV
-
-#ifndef _FRAME_H
-#define _FRAME_H 1
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <time.h>
-#include <string>
-using std::string;
-
-#include <libdv/dv.h>
-#include <libdv/dv_types.h>
-#define DV_AUDIO_MAX_SAMPLES 1944
-
-#define FRAME_MAX_WIDTH 720
-#define FRAME_MAX_HEIGHT 576
-
-namespace avcap
-{
-	
-typedef struct Pack
-{
-	/// the five bytes of a packet
-	unsigned char data[ 5 ];
-}
-Pack;
-
-typedef struct TimeCode
-{
-	int hour;
-	int min;
-	int sec;
-	int frame;
-}
-TimeCode;
-
-
-typedef struct AudioInfo
-{
-	int frames;
-	int frequency;
-	int samples;
-	int channels;
-	int quantization;
-}
-AudioInfo;
-
-
-class VideoInfo
-{
-public:
-	int width;
-	int height;
-	bool isPAL;
-	TimeCode timeCode;
-	struct tm	recDate;
-
-	VideoInfo();
-
-	//    string GetTimeCodeString();
-	//    string GetRecDateString();
-}
-;
-
-
-class Frame
-{
-public:
-	/// enough space to hold a PAL frame
-	unsigned char data[ 144000 ];
-	/// the number of bytes written to the frame
-	int bytesInFrame;
-#ifdef HAVE_LIBDV
-
-	dv_decoder_t *decoder;
-#endif
-
-	int16_t *audio_buffers[ 4 ];
-
-public:
-	Frame();
-	~Frame();
-
-	bool GetSSYBPack( int packNum, Pack &pack ) const;
-	bool GetVAUXPack( int packNum, Pack &pack ) const;
-	bool GetAAUXPack( int packNum, Pack &pack ) const;
-	bool GetTimeCode( TimeCode &timeCode ) const;
-	bool GetRecordingDate( struct tm &recDate ) const;
-	string GetRecordingDate( void ) const;
-	bool GetAudioInfo( AudioInfo &info ) const;
-	bool GetVideoInfo( VideoInfo &info ) const;
-	int GetFrameSize( void ) const;
-	float GetFrameRate() const;
-	bool IsPAL( void ) const;
-	bool IsNewRecording( void ) const;
-	bool IsNormalSpeed() const;
-	bool IsComplete( void ) const;
-	int ExtractAudio( void *sound ) const;
-	void ExtractHeader( void );
-
-#ifdef HAVE_LIBDV
-
-	void SetPreferredQuality( );
-	int ExtractAudio( int16_t **channels ) const;
-	int ExtractRGB( void *rgb );
-	int ExtractPreviewRGB( void *rgb );
-	int ExtractYUV( void *yuv );
-	int ExtractPreviewYUV( void *yuv );
-	bool IsWide( void ) const;
-	int GetWidth();
-	int GetHeight();
-	void SetRecordingDate( time_t *datetime, int frame );
-	void SetTimeCode( int frame );
-#endif
-
-	void Deinterlace( void *image, int bpp );
-
-private:
-#ifndef HAVE_LIBDV
-	/// flag for initializing the lookup maps once at startup
-	static bool maps_initialized;
-	/// lookup tables for collecting the shuffled audio data
-	static int palmap_ch1[ 2000 ];
-	static int palmap_ch2[ 2000 ];
-	static int palmap_2ch1[ 2000 ];
-	static int palmap_2ch2[ 2000 ];
-	static int ntscmap_ch1[ 2000 ];
-	static int ntscmap_ch2[ 2000 ];
-	static int ntscmap_2ch1[ 2000 ];
-	static int ntscmap_2ch2[ 2000 ];
-	static short compmap[ 4096 ];
-#endif
-};
-
-}
-
-#endif
-#endif
diff --git a/extra_lib/include/avcap/linux/ieee1394io.h b/extra_lib/include/avcap/linux/ieee1394io.h
deleted file mode 100644
index 7b2792f..0000000
--- a/extra_lib/include/avcap/linux/ieee1394io.h
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
-* ieee1394io.cc -- asynchronously grabbing DV data
-* Copyright (C) 2000 Arne Schirmacher <arne at schirmacher.de>
-*
-* 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.
-*
-* 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, write to the Free Software Foundation,
-* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifdef HAS_AVC_SUPPORT
-
-#ifndef _IEEE1394IO_H
-#define _IEEE1394IO_H 1
-
-#include <libraw1394/raw1394.h>
-#include <libraw1394/csr.h>
-#include <libiec61883/iec61883.h>
-
-
-#include <string>
-using std::string;
-#include <deque>
-using std::deque;
-
-namespace avcap
-{
-	
-class Frame;
-
-class IEEE1394Reader
-{
-protected:
-	/// the number of frames that had to be thrown away because
-	/// our inFrames queue did not contain available frames
-	int droppedFrames;
-
-	/// the number of frames that are tainted because they are incomplete -
-	/// a packet was dropped
-	int incompleteFrames;
-
-	/// a pointer to the frame which is currently been transmitted
-	Frame	*currentFrame;
-
-	/// a list of empty frames
-	deque < Frame* > inFrames;
-
-	/// a list of already received frames
-	deque < Frame* > outFrames;
-
-public:
-
-	IEEE1394Reader( int channel = 63, int frames = 5 );
-	virtual ~IEEE1394Reader();
-
-	// Mutex protected public methods
-	virtual bool StartThread( void ) = 0;
-	virtual void StopThread( void ) = 0;
-	Frame* GetFrame( void );
-	
-	void DoneWithFrame( Frame* );
-	int GetDroppedFrames( void );
-	int GetIncompleteFrames( void );
-	int GetOutQueueSize( void )
-	{
-		return outFrames.size();
-	}
-	int GetInQueueSize( void )
-	{
-		return inFrames.size();
-	}
-
-	// These two public methods are not mutex protected
-	virtual bool Open( void ) = 0;
-	virtual void Close( void ) = 0;
-
-	bool WaitForAction( int seconds = 0 );
-	virtual void TriggerAction( );
-
-	virtual bool StartReceive( void ) = 0;
-	virtual void StopReceive( void ) = 0;
-
-protected:
-	/// the iso channel we listen to (typically == 63)
-	int	channel;
-
-	/// contains information about our thread after calling StartThread
-	pthread_t thread;
-
-	/// this mutex protects capture related variables that could possibly
-	/// accessed from two threads at the same time
-	pthread_mutex_t mutex;
-
-	// This condition and mutex are used to indicate when new frames are
-	// received
-	pthread_mutex_t condition_mutex;
-	pthread_cond_t condition;
-
-	/// A state variable for starting and stopping thread
-	bool isRunning;
-
-	void Flush( void );
-};
-
-
-typedef void (*BusResetHandler)( void* );
-typedef void* BusResetHandlerData;
-
-class CaptureHandler;
-
-class iec61883Reader: public IEEE1394Reader
-{
-private:
-
-	/// the interface card to use (typically == 0)
-	int	m_port;
-
-	/// the handle to libraw1394
-	raw1394handle_t m_handle;
-
-	/// the handle to libiec61883
-	iec61883_dv_fb_t m_iec61883dv;
-
-	BusResetHandler m_resetHandler;
-	const void* m_resetHandlerData;
-
-	CaptureHandler* m_captureHandler;
-	
-public:
-	iec61883Reader( int port = 0, int channel = 63, int buffers = 5, 
-		BusResetHandler = 0, BusResetHandlerData = 0 );
-	~iec61883Reader();
-
-	bool Open( void );
-	void Close( void );
-	bool StartReceive( void );
-	void StopReceive( void );
-	bool StartThread( void );
-	void StopThread( void );
-	int Handler( int length, int complete, unsigned char *data );
-	void *Thread();
-	void ResetHandler( void );
-		
-
-private:
-	static int ResetHandlerProxy( raw1394handle_t handle, unsigned int generation );
-	static int HandlerProxy( unsigned char *data, int length, int complete, 
-		void *callback_data );
-	static void* ThreadProxy( void *arg );
-};
-
-
-class iec61883Connection
-{
-private:
-	raw1394handle_t m_handle;
-	nodeid_t m_node;
-	int m_channel;
-	int m_bandwidth;
-	int m_outputPort;
-	int m_inputPort;
-
-public:
-
-	iec61883Connection( int port, int node );
-	~iec61883Connection();
-
-	static void CheckConsistency( int port, int node );
-	int GetChannel( void ) const
-	{
-		return m_channel;
-	}
-	int Reconnect( void );
-};
-
-}
-
-#endif
-#endif
diff --git a/extra_lib/include/avcap/linux/ivtv.h b/extra_lib/include/avcap/linux/ivtv.h
deleted file mode 100644
index 55bb9de..0000000
--- a/extra_lib/include/avcap/linux/ivtv.h
+++ /dev/null
@@ -1,397 +0,0 @@
-/*
-    Public ivtv API header
-    Copyright (C) 2003-2004  Kevin Thayer <nufan_wfk at yahoo.com>
-
-    VBI portions:
-    Copyright (C) 2004  Hans Verkuil <hverkuil at xs4all.nl>
-
-    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.
-
-    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, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#ifndef LINUX_IVTV_H
-#define LINUX_IVTV_H
-
-// 00 = Program stream
-// 01 = Transport stream
-// 02 = MPEG1 stream
-// 10 or 0a = DVD stream
-// 11 or 0b = VCD stream
-// 12 or 0c = SVCD stream
-// 13 or 0d = DVD-Special 1
-// 14 or 0e = DVD-Special 2
-
-/* Stream types */
-#define IVTV_STREAM_PS		0
-#define IVTV_STREAM_TS		1
-#define IVTV_STREAM_MPEG1	2
-#define IVTV_STREAM_PES_AV	3
-#define IVTV_STREAM_PES_V	5
-#define IVTV_STREAM_PES_A	7
-#define IVTV_STREAM_DVD		10
-#define IVTV_STREAM_VCD		11
-#define IVTV_STREAM_SVCD	12
-#define IVTV_STREAM_DVD_S1	13
-#define IVTV_STREAM_DVD_S2	14
-
-#define IVTV_SLICED_TELETEXT_B 	(1 << 0)
-#define IVTV_SLICED_CAPTION_625	(1 << 1)
-#define IVTV_SLICED_CAPTION_525	(1 << 2)
-#define IVTV_SLICED_WSS_625	(1 << 3)
-#define IVTV_SLICED_VPS		(1 << 4)
-
-struct ivtv_sliced_vbi_format {
-	unsigned long service_set;	/* one or more of the IVTV_SLICED_ defines */
-	unsigned long packet_size; 	/* the size in bytes of the ivtv_sliced_data packet */
-	unsigned long io_size;		/* maximum number of bytes passed by one read() call */
-	unsigned long reserved;
-};
-
-/* This structure is the same as the proposed v4l2_sliced_data structure */
-/* id is one of the VBI_SLICED_ flags. */
-struct ivtv_sliced_data {
-	unsigned long id;
-	unsigned long line;
-	unsigned char data[];
-};
-
-/* The four bit VBI data type found in the embedded VBI data of an
-   MPEG stream has one of the following values: */
-#define VBI_TYPE_TELETEXT 	0x1 	// Teletext (uses lines 6-22 for PAL, 10-21 for NTSC)
-#define VBI_TYPE_CC 		0x4 	// Closed Captions (line 21 NTSC, line 22 PAL)
-#define VBI_TYPE_WSS 		0x5 	// Wide Screen Signal (line 20 NTSC, line 23 PAL)
-#define VBI_TYPE_VPS 		0x7 	// Video Programming System (PAL) (line 16)
-
-/* These data types are not (yet?) used but are already reserved
-   for future use. */
-#ifdef IVTV_INTERNAL
-#define VBI_TYPE_NABST 		0x2 	// NABST (NTSC)
-#define VBI_TYPE_MOJI 		0x3 	// MOJI (NTSC)
-#define VBI_TYPE_VITC 		0x6 	// Vertical Interval Time Code
-#define VBI_TYPE_GEMSTAR2X 	0x7 	// Gemstar TV Guide (NTSC)
-#define VBI_TYPE_GEMSTAR1X 	0x8 	// Gemstar TV Guide (NTSC)
-#endif
-
-/* device ioctls should use the range 29-199 */
-#define IVTV_IOC_START_DECODE      _IOW ('@', 29, struct ivtv_cfg_start_decode)
-#define IVTV_IOC_STOP_DECODE       _IOW ('@', 30, struct ivtv_cfg_stop_decode)
-#define IVTV_IOC_G_SPEED           _IOR ('@', 31, struct ivtv_speed)
-#define IVTV_IOC_S_SPEED           _IOW ('@', 32, struct ivtv_speed)
-#define IVTV_IOC_DEC_STEP          _IOW ('@', 33, int)
-#define IVTV_IOC_DEC_FLUSH         _IOW ('@', 34, int)
-#define IVTV_IOC_S_VBI_MODE    	   _IOWR('@', 35, struct ivtv_sliced_vbi_format)
-#define IVTV_IOC_G_VBI_MODE    	   _IOR ('@', 36, struct ivtv_sliced_vbi_format)
-#define IVTV_IOC_PLAY     	   _IO  ('@', 37)
-#define IVTV_IOC_PAUSE    	   _IO  ('@', 38)
-#define IVTV_IOC_FRAMESYNC	   _IOR ('@', 39, struct ivtv_ioctl_framesync)
-#define IVTV_IOC_GET_TIMING	   _IOR ('@', 40, struct ivtv_ioctl_framesync)
-#define IVTV_IOC_S_SLOW_FAST       _IOW ('@', 41, struct ivtv_slow_fast)
-#define IVTV_IOC_S_START_DECODE    _IOW ('@', 42, struct ivtv_cfg_start_decode)
-#define IVTV_IOC_S_STOP_DECODE     _IOW ('@', 43, struct ivtv_cfg_stop_decode)
-#define IVTV_IOC_GET_FB            _IOR ('@', 44, int)
-#define IVTV_IOC_G_CODEC           _IOR ('@', 48, struct ivtv_ioctl_codec)
-#define IVTV_IOC_S_CODEC           _IOW ('@', 49, struct ivtv_ioctl_codec)
-#define IVTV_IOC_S_GOP_END         _IOWR('@', 50, int)
-#define IVTV_IOC_S_VBI_PASSTHROUGH _IOW ('@', 51, int)
-#define IVTV_IOC_G_VBI_PASSTHROUGH _IOR ('@', 52, int)
-#define IVTV_IOC_PASSTHROUGH       _IOW ('@', 53, int)
-#define IVTV_IOC_S_VBI_EMBED       _IOW ('@', 54, int)
-#define IVTV_IOC_G_VBI_EMBED       _IOR ('@', 55, int)
-#define IVTV_IOC_PAUSE_ENCODE      _IO  ('@', 56)
-#define IVTV_IOC_RESUME_ENCODE     _IO  ('@', 57)
-
-#define PACK_ME __attribute__((packed))
-// Note: You only append to this structure, you never reorder the members,
-// you never play tricks with its alignment, you never change the size of
-// anything.
-#define IVTV_DRIVER_INFO_MAX_COMMENT_LENGTH 100
-struct ivtv_driver_info {
-	uint32_t size;    // size of this structure
-	uint32_t version; // version bits 31-16 = major, 15-8 = minor,
-					  // 7-0 = patchlevel
-	char comment[IVTV_DRIVER_INFO_MAX_COMMENT_LENGTH];
-} PACK_ME;
-
-#define IVTV_DRIVER_INFO_V1_SIZE 108
-
-#define IVTV_IOC_G_DRIVER_INFO _IOWR('@', 100, struct ivtv_driver_info *)
-
-// Version info
-// Note: never use the _INTERNAL versions of these macros
-
-// Internal version macros, don't use these
-#define IVTV_VERSION_NUMBER_INTERNAL(name) name##_version_int
-#define IVTV_VERSION_STRING_INTERNAL(name) name##_version_string
-#define IVTV_VERSION_COMMENT_INTERNAL(name) name##_comment_string
-
-#define IVTV_VERSION_EXTERN_NUMBER_INTERNAL(name) \
-	extern uint32_t IVTV_VERSION_NUMBER_INTERNAL(name)
-#define IVTV_VERSION_EXTERN_STRING_INTERNAL(name) \
-	extern const char * const IVTV_VERSION_STRING_INTERNAL(name)
-#define IVTV_VERSION_EXTERN_COMMENT_INTERNAL(name) \
-	extern const char * const IVTV_VERSION_COMMENT_INTERNAL(name)
-
-#define IVTV_VERSION_MAJOR_INTERNAL(name) \
-	(0xFF & (IVTV_VERSION_NUMBER_INTERNAL(name) >> 16))
-#define IVTV_VERSION_MINOR_INTERNAL(name) \
-	(0xFF & (IVTV_VERSION_NUMBER_INTERNAL(name) >> 8))
-#define IVTV_VERSION_PATCHLEVEL_INTERNAL(name) \
-	(0xFF & (IVTV_VERSION_NUMBER_INTERNAL(name)))
-
-// External version macros
-#define IVTV_VERSION_NUMBER(name) IVTV_VERSION_NUMBER_INTERNAL(name)
-#define IVTV_VERSION_STRING(name) IVTV_VERSION_STRING_INTERNAL(name)
-#define IVTV_VERSION_COMMENT(name) IVTV_VERSION_COMMENT_INTERNAL(name)
-#define IVTV_VERSION_EXTERN_NUMBER(name) \
-	IVTV_VERSION_EXTERN_NUMBER_INTERNAL(name)
-#define IVTV_VERSION_EXTERN_STRING(name) \
-	IVTV_VERSION_EXTERN_STRING_INTERNAL(name)
-#define IVTV_VERSION_EXTERN_COMMENT(name) \
-	IVTV_VERSION_EXTERN_COMMENT_INTERNAL(name)
-
-#define IVTV_VERSION_INFO_NAME ivtv_rev
-
-IVTV_VERSION_EXTERN_NUMBER(IVTV_VERSION_INFO_NAME);
-IVTV_VERSION_EXTERN_STRING(IVTV_VERSION_INFO_NAME);
-IVTV_VERSION_EXTERN_COMMENT(IVTV_VERSION_INFO_NAME);
-
-/* Custom v4l controls */
-#ifndef V4L2_CID_PRIVATE_BASE
-#define V4L2_CID_PRIVATE_BASE			0x08000000
-#endif
-
-#define V4L2_CID_IVTV_FREQ      	(V4L2_CID_PRIVATE_BASE)
-#define V4L2_CID_IVTV_ENC       	(V4L2_CID_PRIVATE_BASE + 1)
-#define V4L2_CID_IVTV_BITRATE   	(V4L2_CID_PRIVATE_BASE + 2)
-#define V4L2_CID_IVTV_MONO      	(V4L2_CID_PRIVATE_BASE + 3)
-#define V4L2_CID_IVTV_JOINT     	(V4L2_CID_PRIVATE_BASE + 4)
-#define V4L2_CID_IVTV_EMPHASIS  	(V4L2_CID_PRIVATE_BASE + 5)
-#define V4L2_CID_IVTV_CRC       	(V4L2_CID_PRIVATE_BASE + 6)
-#define V4L2_CID_IVTV_COPYRIGHT 	(V4L2_CID_PRIVATE_BASE + 7)
-#define V4L2_CID_IVTV_GEN       	(V4L2_CID_PRIVATE_BASE + 8)
-
-#define V4L2_CID_IVTV_DEC_SMOOTH_FF	(V4L2_CID_PRIVATE_BASE + 9)
-#define V4L2_CID_IVTV_DEC_FR_MASK	(V4L2_CID_PRIVATE_BASE + 10)
-#define V4L2_CID_IVTV_DEC_SP_MUTE	(V4L2_CID_PRIVATE_BASE + 11)
-#define V4L2_CID_IVTV_DEC_FR_FIELD	(V4L2_CID_PRIVATE_BASE + 12)
-#define V4L2_CID_IVTV_DEC_AUD_SKIP	(V4L2_CID_PRIVATE_BASE + 13)
-#define V4L2_CID_IVTV_DEC_NUM_BUFFERS	(V4L2_CID_PRIVATE_BASE + 14)
-#define V4L2_CID_IVTV_DEC_PREBUFFER	(V4L2_CID_PRIVATE_BASE + 15)
-
-struct ivtv_ioctl_framesync {
-	uint32_t frame;
-	uint64_t pts;
-	uint64_t scr;
-};
-
-struct ivtv_speed {
-	int scale;	/* 1-?? (50 for now) */
-	int smooth;	/* Smooth mode when in slow/fast mode */
-	int speed;	/* 0 = slow, 1 = fast */
-	int direction;	/* 0 = forward, 1 = reverse (not supportd */
-	int fr_mask;	/* 0 = I, 1 = I,P, 2 = I,P,B    2 = default!*/
-	int b_per_gop;	/* frames per GOP (reverse only) */
-	int aud_mute;	/* Mute audio while in slow/fast mode */
-	int fr_field;	/* 1 = show every field, 0 = show every frame */
-	int mute;	/* # of audio frames to mute on playback resume */
-};
-
-struct ivtv_slow_fast {
-	int speed; /* 0 = slow, 1 = fast */
-	int scale; /* 1-?? (50 for now) */
-};      
-
-struct ivtv_cfg_start_decode {
-	uint32_t     gop_offset;	/*Frames in GOP to skip before starting */
-	uint32_t     muted_audio_frames;/* #of audio frames to mute */
-};
-
-struct ivtv_cfg_stop_decode {
-	int		hide_last; /* 1 = show black after stop,
-				      0 = show last frame */
-	uint64_t	pts_stop; /* PTS to stop at */
-};
-
-
-/* For use with IVTV_IOC_G_CODEC and IVTV_IOC_S_CODEC */
-struct ivtv_ioctl_codec {
-        uint32_t aspect;
-        uint32_t audio_bitmask;
-        uint32_t bframes;
-        uint32_t bitrate_mode;
-        uint32_t bitrate;
-        uint32_t bitrate_peak;
-        uint32_t dnr_mode;
-        uint32_t dnr_spatial;
-        uint32_t dnr_temporal;
-        uint32_t dnr_type;
-        uint32_t framerate;	/* read only, ignored on write */
-        uint32_t framespergop;	/* read only, ignored on write */
-        uint32_t gop_closure;
-        uint32_t pulldown;
-        uint32_t stream_type;
-};
-
-
-/* Framebuffer external API */
-
-struct ivtvfb_ioctl_state_info {
-  unsigned long status;
-  unsigned long alpha;
-};
-
-struct ivtvfb_ioctl_blt_copy_args {
-  int x, y, width, height, source_offset, source_stride;
-};
-
-struct ivtvfb_ioctl_blt_fill_args {
-    int rasterop, alpha_mode, alpha_mask, width, height, x, y;
-    unsigned int destPixelMask, colour;
-
-};
-
-struct ivtvfb_ioctl_dma_host_to_ivtv_args {
-  void* source;
-  unsigned long dest_offset;
-  int count;
-};
-
-struct ivtvfb_ioctl_get_frame_buffer {
-  void* mem;
-  int   size;
-  int   sizex;
-  int   sizey;
-};
-
-struct ivtv_osd_coords {
-  unsigned long offset;
-  unsigned long max_offset;
-  int pixel_stride;
-  int lines;
-  int x;
-  int y;
-};
-
-struct rectangle {
-  int x0;
-  int y0;
-  int x1;
-  int y1;
-};
-
-/* Framebuffer ioctls should use the range 1 - 28 */
-#define IVTVFB_IOCTL_GET_STATE          _IOR('@', 1, struct ivtvfb_ioctl_state_info)
-#define IVTVFB_IOCTL_SET_STATE          _IOW('@', 2, struct ivtvfb_ioctl_state_info)
-#define IVTVFB_IOCTL_PREP_FRAME         _IOW('@', 3, struct ivtvfb_ioctl_dma_host_to_ivtv_args)
-#define IVTVFB_IOCTL_BLT_COPY           _IOW('@', 4, struct ivtvfb_ioctl_blt_copy_args)
-#define IVTVFB_IOCTL_GET_ACTIVE_BUFFER  _IOR('@', 5, struct ivtv_osd_coords)
-#define IVTVFB_IOCTL_SET_ACTIVE_BUFFER  _IOW('@', 6, struct ivtv_osd_coords)
-#define IVTVFB_IOCTL_GET_FRAME_BUFFER   _IOR('@', 7, struct ivtvfb_ioctl_get_frame_buffer)
-#define IVTVFB_IOCTL_BLT_FILL           _IOW('@', 8, struct ivtvfb_ioctl_blt_fill_args)
-#define IVTVFB_IOCTL_PREP_FRAME_BUF     _IOW('@', 9, struct ivtvfb_ioctl_dma_host_to_ivtv_args)
-#define IVTVFB_IOCTL_PREP_FRAME_YUV     _IOW('@', 10, struct ivtvfb_ioctl_dma_host_to_ivtv_args)
-
-#define IVTVFB_STATUS_ENABLED           (1 << 0)
-#define IVTVFB_STATUS_GLOBAL_ALPHA      (1 << 1)
-#define IVTVFB_STATUS_LOCAL_ALPHA       (1 << 2)
-#define IVTVFB_STATUS_FLICKER_REDUCTION (1 << 3)
-
-#ifdef IVTV_INTERNAL
-/* Do not use these structures and ioctls in code that you want to release.
-   Only to be used for testing and by the utilities ivtvctl, ivtvfbctl and fwapi. */
-
-#define IVTV_MBOX_MAX_DATA 16
-
-struct ivtv_ioctl_fwapi {
-	uint32_t cmd;
-	uint32_t result;
-	int32_t args;
-	uint32_t data[IVTV_MBOX_MAX_DATA];
-};
-
-struct ivtv_ioctl_event {
-        uint32_t type;
-        uint32_t mbox;
-	struct ivtv_ioctl_fwapi api;
-};
-
-struct ivtv_saa71xx_reg {
-	unsigned char reg;
-	unsigned char val;
-};
-
-struct ivtv_itvc_reg {
-	uint32_t reg;
-	uint32_t val;
-};
-
-struct ivtv_msp_matrix {
-	int input;
-	int output;
-};
-
-/* Debug flags */
-#define IVTV_DEBUG_ERR   (1 << 0)
-#define IVTV_DEBUG_INFO  (1 << 1)
-#define IVTV_DEBUG_API   (1 << 2)
-#define IVTV_DEBUG_DMA   (1 << 3)
-#define IVTV_DEBUG_IOCTL (1 << 4)
-#define IVTV_DEBUG_I2C   (1 << 5)
-#define IVTV_DEBUG_IRQ   (1 << 6)
-#define IVTV_DEBUG_DEC   (1 << 7)
-
-/* BLT RasterOps */
-#define IVTV_BLT_RASTER_ZERO		0
-#define IVTV_BLT_RASTER_NOTDEST_AND_NOTSRC	1
-#define IVTV_BLT_RASTER_NOTDEST_AND_SRC	2
-#define IVTV_BLT_RASTER_NOTDEST		3
-#define IVTV_BLT_RASTER_DEST_AND_NOTSRC	4
-#define IVTV_BLT_RASTER_NOTSRC		5
-#define IVTV_BLT_RASTER_DEST_XOR_SRC	6
-#define IVTV_BLT_RASTER_NOTDEST_OR_NOTSRC	7
-/* #define IVTV_BLT_RASTER_NOTDEST_AND_NOTSRC	8 */ /* Same as 1 */
-#define IVTV_BLT_RASTER_DEST_XNOR_SRC	9
-#define IVTV_BLT_RASTER_SRC			10
-#define IVTV_BLT_RASTER_NOTDEST_OR_SRC	11
-#define IVTV_BLT_RASTER_DEST		12
-#define IVTV_BLT_RASTER_DEST_OR_NOTSRC	13
-#define IVTV_BLT_RASTER_DEST_OR_SRC		14
-#define IVTV_BLT_RASTER_ONE			15
-
-/* BLT Alpha blending */
-
-#define IVTV_BLT_ALPHABLEND_SRC		0x01
-#define IVTV_BLT_ALPHABLEND_DEST	0x10
-#define IVTV_BLT_ALPHABLEND_DEST_X_SRC	0x11 /* dest x src +1 , = zero if both zero */
-
-
-/* Internal ioctls should use the range 200-255 */
-#define IVTV_IOC_S_DEBUG_LEVEL     _IOWR('@', 200, int)
-#define IVTV_IOC_G_DEBUG_LEVEL     _IOR ('@', 201, int)
-#define IVTV_IOC_RELOAD_FW         _IO  ('@', 202)
-#define IVTV_IOC_ZCOUNT            _IO  ('@', 203) 
-#define IVTV_IOC_FWAPI             _IOWR('@', 204, struct ivtv_ioctl_fwapi)
-#define IVTV_IOC_EVENT_SETUP       _IOWR('@', 205, struct ivtv_ioctl_event)
-#define IVTV_IOC_G_SAA7115_REG     _IOWR('@', 206, struct ivtv_saa71xx_reg)
-#define IVTV_IOC_S_SAA7115_REG     _IOW ('@', 207, struct ivtv_saa71xx_reg)
-#define IVTV_IOC_G_SAA7127_REG     _IOWR('@', 208, struct ivtv_saa71xx_reg)
-#define IVTV_IOC_S_SAA7127_REG     _IOW ('@', 209, struct ivtv_saa71xx_reg)
-#define IVTV_IOC_S_MSP_MATRIX      _IOW ('@', 210, struct ivtv_msp_matrix)
-#define IVTV_IOC_G_ITVC_REG        _IOWR('@', 211, struct ivtv_itvc_reg)
-#define IVTV_IOC_S_ITVC_REG        _IOW ('@', 212, struct ivtv_itvc_reg)
-
-#endif
-
-#endif
-
diff --git a/extra_lib/include/avcap/linux/pwc-ioctl.h b/extra_lib/include/avcap/linux/pwc-ioctl.h
deleted file mode 100644
index 63754ab..0000000
--- a/extra_lib/include/avcap/linux/pwc-ioctl.h
+++ /dev/null
@@ -1,329 +0,0 @@
-#ifndef PWC_IOCTL_H
-#define PWC_IOCTL_H
-
-/* (C) 2001-2004 Nemosoft Unv.
-   (C) 2004-2006 Luc Saillard (luc at saillard.org)
-
-   NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx
-   driver and thus may have bugs that are not present in the original version.
-   Please send bug reports and support requests to <luc at saillard.org>.
-   The decompression routines have been implemented by reverse-engineering the
-   Nemosoft binary pwcx module. Caveat emptor.
-
-   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.
-
-   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, write to the Free Software
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-*/
-
-/* This is pwc-ioctl.h belonging to PWC 10.0.10
-   It contains structures and defines to communicate from user space
-   directly to the driver.
- */
-
-/*
-   Changes
-   2001/08/03  Alvarado   Added ioctl constants to access methods for
-                          changing white balance and red/blue gains
-   2002/12/15  G. H. Fernandez-Toribio   VIDIOCGREALSIZE
-   2003/12/13  Nemosft Unv. Some modifications to make interfacing to
-               PWCX easier
-   2006/01/01  Luc Saillard Add raw format definition
- */
-
-/* These are private ioctl() commands, specific for the Philips webcams.
-   They contain functions not found in other webcams, and settings not
-   specified in the Video4Linux API.
-
-   The #define names are built up like follows:
-   VIDIOC		VIDeo IOCtl prefix
-         PWC		Philps WebCam
-            G           optional: Get
-            S           optional: Set
-             ... 	the function
- */
-
-#include <linux/types.h>
-#include <linux/version.h>
-
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 10)
-/* Compatibility for older kernel */
-typedef __u16 __le16;
-#endif
-
- /* Enumeration of image sizes */
-#define PSZ_SQCIF	0x00
-#define PSZ_QSIF	0x01
-#define PSZ_QCIF	0x02
-#define PSZ_SIF		0x03
-#define PSZ_CIF		0x04
-#define PSZ_VGA		0x05
-#define PSZ_MAX		6
-
-
-/* The frame rate is encoded in the video_window.flags parameter using
-   the upper 16 bits, since some flags are defined nowadays. The following
-   defines provide a mask and shift to filter out this value.
-   This value can also be passing using the private flag when using v4l2 and
-   VIDIOC_S_FMT ioctl.
-
-   In 'Snapshot' mode the camera freezes its automatic exposure and colour
-   balance controls.
- */
-#define PWC_FPS_SHIFT		16
-#define PWC_FPS_MASK		0x00FF0000
-#define PWC_FPS_FRMASK		0x003F0000
-#define PWC_FPS_SNAPSHOT	0x00400000
-#define PWC_QLT_MASK		0x03000000
-#define PWC_QLT_SHIFT		24
-
-
-/* structure for transferring x & y coordinates */
-struct pwc_coord
-{
-	int x, y;		/* guess what */
-	int size;		/* size, or offset */
-};
-
-
-/* Used with VIDIOCPWCPROBE */
-struct pwc_probe
-{
-	char name[32];
-	int type;
-};
-
-struct pwc_serial
-{
-	char serial[30];	/* String with serial number. Contains terminating 0 */
-};
-	
-/* pwc_whitebalance.mode values */
-#define PWC_WB_INDOOR		0
-#define PWC_WB_OUTDOOR		1
-#define PWC_WB_FL		2
-#define PWC_WB_MANUAL		3
-#define PWC_WB_AUTO		4
-
-/* Used with VIDIOCPWC[SG]AWB (Auto White Balance). 
-   Set mode to one of the PWC_WB_* values above.
-   *red and *blue are the respective gains of these colour components inside 
-   the camera; range 0..65535
-   When 'mode' == PWC_WB_MANUAL, 'manual_red' and 'manual_blue' are set or read; 
-   otherwise undefined.
-   'read_red' and 'read_blue' are read-only.
-*/   
-struct pwc_whitebalance
-{
-	int mode;
-	int manual_red, manual_blue;	/* R/W */
-	int read_red, read_blue;	/* R/O */
-};
-
-/* 
-   'control_speed' and 'control_delay' are used in automatic whitebalance mode,
-   and tell the camera how fast it should react to changes in lighting, and 
-   with how much delay. Valid values are 0..65535.
-*/
-struct pwc_wb_speed
-{
-	int control_speed;
-	int control_delay;
-
-};
-
-/* Used with VIDIOCPWC[SG]LED */
-struct pwc_leds
-{
-	int led_on;			/* Led on-time; range = 0..25000 */
-	int led_off;			/* Led off-time; range = 0..25000  */
-};
-
-/* Image size (used with GREALSIZE) */
-struct pwc_imagesize
-{
-	int width;
-	int height;
-};
-
-/* Defines and structures for Motorized Pan & Tilt */
-#define PWC_MPT_PAN		0x01
-#define PWC_MPT_TILT		0x02
-#define PWC_MPT_TIMEOUT		0x04 /* for status */
-
-/* Set angles; when absolute != 0, the angle is absolute and the 
-   driver calculates the relative offset for you. This can only
-   be used with VIDIOCPWCSANGLE; VIDIOCPWCGANGLE always returns
-   absolute angles.
- */   
-struct pwc_mpt_angles
-{
-	int absolute;		/* write-only */
-	int pan;		/* degrees * 100 */
-	int tilt;		/* degress * 100 */
-};
-
-/* Range of angles of the camera, both horizontally and vertically.
- */
-struct pwc_mpt_range
-{
-	int pan_min, pan_max;		/* degrees * 100 */
-	int tilt_min, tilt_max;
-};
-
-struct pwc_mpt_status
-{
-	int status;
-	int time_pan;
-	int time_tilt;
-};
-
-
-/* This is used for out-of-kernel decompression. With it, you can get
-   all the necessary information to initialize and use the decompressor
-   routines in standalone applications.
- */   
-struct pwc_video_command
-{
-	int type;		/* camera type (645, 675, 730, etc.) */
-	int release;		/* release number */
-
-        int size;		/* one of PSZ_* */
-        int alternate;
-	int command_len;	/* length of USB video command */
-	unsigned char command_buf[13];	/* Actual USB video command */
-	int bandlength;		/* >0 = compressed */
-	int frame_size;		/* Size of one (un)compressed frame */
-};
-
-/* Flags for PWCX subroutines. Not all modules honour all flags. */
-#define PWCX_FLAG_PLANAR	0x0001
-#define PWCX_FLAG_BAYER		0x0008
-
-
-/* IOCTL definitions */
-
- /* Restore user settings */
-#define VIDIOCPWCRUSER		_IO('v', 192)
- /* Save user settings */
-#define VIDIOCPWCSUSER		_IO('v', 193)
- /* Restore factory settings */
-#define VIDIOCPWCFACTORY	_IO('v', 194)
-
- /* You can manipulate the compression factor. A compression preference of 0
-    means use uncompressed modes when available; 1 is low compression, 2 is
-    medium and 3 is high compression preferred. Of course, the higher the
-    compression, the lower the bandwidth used but more chance of artefacts
-    in the image. The driver automatically chooses a higher compression when
-    the preferred mode is not available.
-  */
- /* Set preferred compression quality (0 = uncompressed, 3 = highest compression) */
-#define VIDIOCPWCSCQUAL		_IOW('v', 195, int)
- /* Get preferred compression quality */
-#define VIDIOCPWCGCQUAL		_IOR('v', 195, int)
-
-
-/* Retrieve serial number of camera */
-#define VIDIOCPWCGSERIAL	_IOR('v', 198, struct pwc_serial)
-
- /* This is a probe function; since so many devices are supported, it
-    becomes difficult to include all the names in programs that want to
-    check for the enhanced Philips stuff. So in stead, try this PROBE;
-    it returns a structure with the original name, and the corresponding
-    Philips type.
-    To use, fill the structure with zeroes, call PROBE and if that succeeds,
-    compare the name with that returned from VIDIOCGCAP; they should be the
-    same. If so, you can be assured it is a Philips (OEM) cam and the type
-    is valid.
- */
-#define VIDIOCPWCPROBE		_IOR('v', 199, struct pwc_probe)
-
- /* Set AGC (Automatic Gain Control); int < 0 = auto, 0..65535 = fixed */
-#define VIDIOCPWCSAGC		_IOW('v', 200, int)
- /* Get AGC; int < 0 = auto; >= 0 = fixed, range 0..65535 */
-#define VIDIOCPWCGAGC		_IOR('v', 200, int)
- /* Set shutter speed; int < 0 = auto; >= 0 = fixed, range 0..65535 */
-#define VIDIOCPWCSSHUTTER	_IOW('v', 201, int)
-
- /* Color compensation (Auto White Balance) */
-#define VIDIOCPWCSAWB           _IOW('v', 202, struct pwc_whitebalance)
-#define VIDIOCPWCGAWB           _IOR('v', 202, struct pwc_whitebalance)
-
- /* Auto WB speed */
-#define VIDIOCPWCSAWBSPEED	_IOW('v', 203, struct pwc_wb_speed)
-#define VIDIOCPWCGAWBSPEED	_IOR('v', 203, struct pwc_wb_speed)
-
- /* LEDs on/off/blink; int range 0..65535 */
-#define VIDIOCPWCSLED           _IOW('v', 205, struct pwc_leds)
-#define VIDIOCPWCGLED           _IOR('v', 205, struct pwc_leds)
-
-  /* Contour (sharpness); int < 0 = auto, 0..65536 = fixed */
-#define VIDIOCPWCSCONTOUR	_IOW('v', 206, int)
-#define VIDIOCPWCGCONTOUR	_IOR('v', 206, int)
-
-  /* Backlight compensation; 0 = off, otherwise on */
-#define VIDIOCPWCSBACKLIGHT	_IOW('v', 207, int)
-#define VIDIOCPWCGBACKLIGHT	_IOR('v', 207, int)
-
-  /* Flickerless mode; = 0 off, otherwise on */
-#define VIDIOCPWCSFLICKER	_IOW('v', 208, int)
-#define VIDIOCPWCGFLICKER	_IOR('v', 208, int)  
-
-  /* Dynamic noise reduction; 0 off, 3 = high noise reduction */
-#define VIDIOCPWCSDYNNOISE	_IOW('v', 209, int)
-#define VIDIOCPWCGDYNNOISE	_IOR('v', 209, int)
-
- /* Real image size as used by the camera; tells you whether or not there's a gray border around the image */
-#define VIDIOCPWCGREALSIZE	_IOR('v', 210, struct pwc_imagesize)
-
- /* Motorized pan & tilt functions */ 
-#define VIDIOCPWCMPTRESET	_IOW('v', 211, int)
-#define VIDIOCPWCMPTGRANGE	_IOR('v', 211, struct pwc_mpt_range)
-#define VIDIOCPWCMPTSANGLE	_IOW('v', 212, struct pwc_mpt_angles)
-#define VIDIOCPWCMPTGANGLE	_IOR('v', 212, struct pwc_mpt_angles)
-#define VIDIOCPWCMPTSTATUS	_IOR('v', 213, struct pwc_mpt_status)
-
- /* Get the USB set-video command; needed for initializing libpwcx */
-#define VIDIOCPWCGVIDCMD	_IOR('v', 215, struct pwc_video_command)
-struct pwc_table_init_buffer {
-   int len;
-   char *buffer;
-
-};
-#define VIDIOCPWCGVIDTABLE	_IOR('v', 216, struct pwc_table_init_buffer)
-
-/*
- * This is private command used when communicating with v4l2.
- * In the future all private ioctl will be remove/replace to 
- * use interface offer by v4l2.
- */
-
-#define V4L2_CID_PRIVATE_SAVE_USER       (V4L2_CID_PRIVATE_BASE + 0)
-#define V4L2_CID_PRIVATE_RESTORE_USER    (V4L2_CID_PRIVATE_BASE + 1)
-#define V4L2_CID_PRIVATE_RESTORE_FACTORY (V4L2_CID_PRIVATE_BASE + 2)
-#define V4L2_CID_PRIVATE_COLOUR_MODE     (V4L2_CID_PRIVATE_BASE + 3)
-#define V4L2_CID_PRIVATE_AUTOCONTOUR     (V4L2_CID_PRIVATE_BASE + 4)
-#define V4L2_CID_PRIVATE_CONTOUR         (V4L2_CID_PRIVATE_BASE + 5)
-#define V4L2_CID_PRIVATE_BACKLIGHT       (V4L2_CID_PRIVATE_BASE + 6)
-#define V4L2_CID_PRIVATE_FLICKERLESS     (V4L2_CID_PRIVATE_BASE + 7)
-#define V4L2_CID_PRIVATE_NOISE_REDUCTION (V4L2_CID_PRIVATE_BASE + 8)
-
-struct pwc_raw_frame {
-   __le16 type;		/* type of the webcam */
-   __le16 vbandlength;	/* Size of 4lines compressed (used by the decompressor) */
-   __u8   cmd[4];	/* the four byte of the command (in case of nala,
-			   only the first 3 bytes is filled) */
-   __u8   rawframe[0];	/* frame_size = H/4*vbandlength */
-} __attribute__ ((packed));
-
-
-#endif
diff --git a/extra_lib/include/avcap/linux/raw1394util.h b/extra_lib/include/avcap/linux/raw1394util.h
deleted file mode 100644
index 5a5c433..0000000
--- a/extra_lib/include/avcap/linux/raw1394util.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifdef HAS_AVC_SUPPORT
-
-#ifndef RAW1394UTIL_H
-#define RAW1394UTIL_H 1
-
-#include <libraw1394/raw1394.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-	int raw1394_get_num_ports( void );
-	raw1394handle_t raw1394_open( int port );
-	void raw1394_close( raw1394handle_t handle );
-	int discoverAVC( int * port, octlet_t* guid );
-	void reset_bus( int port );
-
-#ifdef __cplusplus
-}
-
-#endif
-#endif
-
-#endif // HAS_AVC_SUPPORT
diff --git a/extra_lib/include/avcap/linux/uvc_compat.h b/extra_lib/include/avcap/linux/uvc_compat.h
deleted file mode 100644
index e400499..0000000
--- a/extra_lib/include/avcap/linux/uvc_compat.h
+++ /dev/null
@@ -1,129 +0,0 @@
-#ifndef _UVC_COMPAT_H
-#define _UVC_COMPAT_H
-
-#include <linux/version.h>
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
-/*
- * Extended control API
- */
-struct v4l2_ext_control
-{
-	__u32 id;
-	__u32 reserved2[2];
-	union {
-		__s32 value;
-		__s64 value64;
-		void *reserved;
-	};
-} __attribute__ ((packed));
-
-struct v4l2_ext_controls
-{
-	__u32 ctrl_class;
-	__u32 count;
-	__u32 error_idx;
-	__u32 reserved[2];
-	struct v4l2_ext_control *controls;
-};
-
-/* Values for ctrl_class field */
-#define V4L2_CTRL_CLASS_USER		0x00980000	/* Old-style 'user' controls */
-#define V4L2_CTRL_CLASS_MPEG		0x00990000	/* MPEG-compression controls */
-
-#define V4L2_CTRL_ID_MASK		(0x0fffffff)
-#define V4L2_CTRL_ID2CLASS(id)		((id) & 0x0fff0000UL)
-#define V4L2_CTRL_DRIVER_PRIV(id)	(((id) & 0xffff) >= 0x1000)
-
-/* User-class control IDs defined by V4L2 */
-#undef	V4L2_CID_BASE
-#define V4L2_CID_BASE			(V4L2_CTRL_CLASS_USER | 0x900)
-#define V4L2_CID_USER_BASE		V4L2_CID_BASE
-#define V4L2_CID_USER_CLASS		(V4L2_CTRL_CLASS_USER | 1)
-	
-#define VIDIOC_G_EXT_CTRLS		_IOWR ('V', 71, struct v4l2_ext_controls)
-#define VIDIOC_S_EXT_CTRLS		_IOWR ('V', 72, struct v4l2_ext_controls)
-#define VIDIOC_TRY_EXT_CTRLS		_IOWR ('V', 73, struct v4l2_ext_controls)
-
-#endif
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
-/*
- * Frame size and frame rate enumeration
- *
- * Included in Linux 2.6.19
- */
-enum v4l2_frmsizetypes
-{
-	V4L2_FRMSIZE_TYPE_DISCRETE	= 1,
-	V4L2_FRMSIZE_TYPE_CONTINUOUS	= 2,
-	V4L2_FRMSIZE_TYPE_STEPWISE	= 3,
-};
-
-struct v4l2_frmsize_discrete
-{
-	__u32			width;		/* Frame width [pixel] */
-	__u32			height;		/* Frame height [pixel] */
-};
-
-struct v4l2_frmsize_stepwise
-{
-	__u32			min_width;	/* Minimum frame width [pixel] */
-	__u32			max_width;	/* Maximum frame width [pixel] */
-	__u32			step_width;	/* Frame width step size [pixel] */
-	__u32			min_height;	/* Minimum frame height [pixel] */
-	__u32			max_height;	/* Maximum frame height [pixel] */
-	__u32			step_height;	/* Frame height step size [pixel] */
-};
-
-struct v4l2_frmsizeenum
-{
-	__u32			index;		/* Frame size number */
-	__u32			pixel_format;	/* Pixel format */
-	__u32			type;		/* Frame size type the device supports. */
-
-        union {					/* Frame size */
-		struct v4l2_frmsize_discrete	discrete;
-		struct v4l2_frmsize_stepwise	stepwise;
-	};
-
-	__u32   reserved[2];			/* Reserved space for future use */
-};
-
-enum v4l2_frmivaltypes
-{
-	V4L2_FRMIVAL_TYPE_DISCRETE	= 1,
-	V4L2_FRMIVAL_TYPE_CONTINUOUS	= 2,
-	V4L2_FRMIVAL_TYPE_STEPWISE	= 3,
-};
-
-struct v4l2_frmival_stepwise
-{
-	struct v4l2_fract	min;		/* Minimum frame interval [s] */
-	struct v4l2_fract	max;		/* Maximum frame interval [s] */
-	struct v4l2_fract	step;		/* Frame interval step size [s] */
-};
-
-struct v4l2_frmivalenum
-{
-	__u32			index;		/* Frame format index */
-	__u32			pixel_format;	/* Pixel format */
-	__u32			width;		/* Frame width */
-	__u32			height;		/* Frame height */
-	__u32			type;		/* Frame interval type the device supports. */
-
-	union {					/* Frame interval */
-		struct v4l2_fract		discrete;
-		struct v4l2_frmival_stepwise	stepwise;
-	};
-
-	__u32	reserved[2];			/* Reserved space for future use */
-};
-
-#define VIDIOC_ENUM_FRAMESIZES		_IOWR ('V', 74, struct v4l2_frmsizeenum)
-#define VIDIOC_ENUM_FRAMEINTERVALS	_IOWR ('V', 75, struct v4l2_frmivalenum)
-#endif
-
-
-#endif /* _UVC_COMPAT_H */
-
diff --git a/extra_lib/include/avcap/log.h b/extra_lib/include/avcap/log.h
deleted file mode 100644
index aff6824..0000000
--- a/extra_lib/include/avcap/log.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>
- */
-
-#ifndef AVCAP_LOG_H
-#define AVCAP_LOG_H
-
-#include <sstream>
-#include <iostream>
-
-static inline void logDebug(const std::string& msg)
-{
-#ifdef DEBUG
-	std::cerr<<msg<<std::endl;
-#endif 
-}
-
-static inline void logDebug(const std::string& msg, int err)
-{
-#ifdef DEBUG
-	std::cerr<<msg<<" "<<err<<std::endl;
-#endif 
-}
-
-#endif
diff --git a/extra_lib/include/avcap/osx/QT_ConnectorManager.h b/extra_lib/include/avcap/osx/QT_ConnectorManager.h
deleted file mode 100644
index bd71a3d..0000000
--- a/extra_lib/include/avcap/osx/QT_ConnectorManager.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-
-#ifndef QT_CONNECTORMANAGER_H
-#define QT_CONNECTORMANAGER_H
-
-#include <list>
-
-#include "ConnectorManager.h"
-
-namespace avcap
-{	
-	class QT_DeviceDescriptor;
-	
-	//! This class implements the ConnectorManager for QuickTime-devices. 
-	
-	/*! Such devices don't have Connectors the user could chose. So the abstract
-	 * methods are implemented as noops. */
-	
-	class QT_ConnectorManager: public ConnectorManager
-	{	
-	public:
-	
-		QT_ConnectorManager(QT_DeviceDescriptor *dd);
-		
-		virtual ~QT_ConnectorManager();
-		void query();
-	};
-}
-
-#endif // QT_CONNECTORMANAGER_H
-
diff --git a/extra_lib/include/avcap/osx/QT_Control.h b/extra_lib/include/avcap/osx/QT_Control.h
deleted file mode 100644
index 40837ce..0000000
--- a/extra_lib/include/avcap/osx/QT_Control.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-#ifndef QT_CONTROL_H_
-#define QT_CONTROL_H_
-
-#include <string>
-#include <list>
-
-#include "Control_avcap.h"
-
-namespace avcap
-{
-	// forward declaration
-	class QT_DeviceDescriptor;
-	
-	//! Implementation of a Control for the QuickTime-implementation of CaptureDevice.
-
-	/*! The QT API supports only controls for brightness, hue, colour, contrast, depth and whiteness.
-	 * They are all integer values between 0 and 65535.*/
-	 
-	class QT_Control: public IntegerControl
-	{
-	public:
-		enum Ctrl {
-			BRIGHTNESS = 0,
-			BLACKLEVEL,
-			WHITELEVEL,
-			HUE,
-			CONTRAST,
-			SATURATION,
-			SHARPNESS
-		};
-	
-	private:	
-		static std::string mNames[7];
-		
-		QT_DeviceDescriptor*	mDescriptor;
-		Ctrl					mType;
-		unsigned short			mDefaultValue;
-		Interval				mInterval;
-		
-	public:
-		QT_Control(QT_DeviceDescriptor* dd, Ctrl type);
-
-		virtual inline ~QT_Control()
-			{}
-		
-		virtual inline int getId() const 
-			{ return mType; }
-
-		virtual inline int getDefaultValue() const
-			{ return mDefaultValue; }
-
-		virtual const std::string& getName() const;
-		
-		virtual int setValue(int val);
-
-		virtual int getValue() const;
-		
-		virtual int reset();
-		
-		virtual inline const Interval& getInterval() const 
-			{ return mInterval; }
-	};
-}
-
-#endif // QT_CONTROL_H_
-
diff --git a/extra_lib/include/avcap/osx/QT_ControlManager.h b/extra_lib/include/avcap/osx/QT_ControlManager.h
deleted file mode 100644
index 5c33d25..0000000
--- a/extra_lib/include/avcap/osx/QT_ControlManager.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-
-#ifndef QT_CONTROLMANAGER_H
-#define QT_CONTROLMANAGER_H
-
-#include <string>
-#include <list>
-
-#include "ControlManager.h"
-
-namespace avcap
-{
-
-class QT_DeviceDescriptor;
-
-	//! Implementation of the ControlManager for the QuickTime-implementation of CaptureDevice.
-	 
-	class QT_ControlManager: public ControlManager
-	{
-	public:
-
-		QT_ControlManager(QT_DeviceDescriptor *dd);
-		
-		virtual ~QT_ControlManager();
-		
-		virtual void query();
-	};
-}
-
-#endif // QT_CONTROLMANAGER_H
-
diff --git a/extra_lib/include/avcap/osx/QT_Device.h b/extra_lib/include/avcap/osx/QT_Device.h
deleted file mode 100644
index 4e10a0c..0000000
--- a/extra_lib/include/avcap/osx/QT_Device.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de>
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-#ifndef QT_DEVICE_H
-#define QT_DEVICE_H
-
-#include <string>
-#include <list>
-
-#include "DeviceDescriptor.h"
-#include "CaptureDevice.h"
-#include "QT_FormatManager.h"
-
-namespace avcap
-{
-	// forward declarations
-	class QT_DeviceDescriptor;
-	class QT_VidCapManager;
-	class QT_ConnectorManager;
-	class QT_ControlManager;
-
-	//! Implementation of the CaptureDevice for QuickTime.
-
-	class QT_Device : public CaptureDevice
-	{
-	public:
-
-	private:
-		QT_DeviceDescriptor*	mDeviceDescriptor;
-		QT_FormatManager*		mFormatMgr;
-		QT_VidCapManager*		mVidCapMgr;
-		QT_ConnectorManager*	mConnectorMgr;
-		QT_ControlManager*		mControlMgr;
-
-	public:
-		QT_Device(QT_DeviceDescriptor* dd);
-
-		virtual ~QT_Device();
-
-		inline const DeviceDescriptor* getDescriptor()
-			{ return (const DeviceDescriptor*) mDeviceDescriptor; }
-
-		inline CaptureManager* getVidCapMgr()
-			{ return (CaptureManager*) mVidCapMgr; }
-
-		inline ConnectorManager* getConnectorMgr()
-			{ return (ConnectorManager*) mConnectorMgr; }
-
-		inline ControlManager*	getControlMgr()
-			{ return (ControlManager*) mControlMgr; }
-
-		inline FormatManager* getFormatMgr()
-			{ return (FormatManager*) mFormatMgr; }
-
-	private:
-		int open();
-
-		int close();
-	};
-}
-
-#endif // QT_DEVICE_H
-
diff --git a/extra_lib/include/avcap/osx/QT_DeviceDescriptor.h b/extra_lib/include/avcap/osx/QT_DeviceDescriptor.h
deleted file mode 100644
index bc5c156..0000000
--- a/extra_lib/include/avcap/osx/QT_DeviceDescriptor.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de>
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-
-#ifndef QT_DEVICEDESCRIPTOR_H_
-#define QT_DEVICEDESCRIPTOR_H_
-
-#include <iostream>
-#include <string>
-
-#include "DeviceDescriptor.h"
-#include <QuickTime/QuickTime.h>
-
-namespace avcap
-{
-class CaptureDevice;
-class QT_Device;
-
-	//! Implementation of the DeviceDescriptor for QuickTime.
-
-	class QT_DeviceDescriptor : public DeviceDescriptor
-	{
-	public:
-
-	private:
-		SeqGrabComponent mGrabber;
-		SGChannel		 mChannel;
-		VideoDigitizerComponent mDigitizer;
-		DigitizerInfo			mDigiInfo;
-
-		int				 mDeviceID;
-		int				 mInputID;
-		bool			 mValid;
-
-		std::string		 mName;
-		std::string		 mDriver;
-		QT_Device*		 mDevice;
-
-	public:
-		QT_DeviceDescriptor(int device, int input, const std::string& dev_name, const std::string& driver_name,
-			SeqGrabComponent current_grabber, SGChannel current_channel);
-
-		QT_DeviceDescriptor();
-
-		virtual ~QT_DeviceDescriptor();
-
-		virtual CaptureDevice* getDevice();
-
-		virtual int open();
-
-		virtual int close();
-
-		virtual const std::string& getName() const;
-
-		virtual const std::string& getDriver() const;
-
-		bool isVideoCaptureDev() const;
-
-		virtual inline const DEV_HANDLE_T getHandle() const
-			{ return 0; }
-
-		//! Get the SequenceGrabber-Component.
-		/*! \return the SequenceGrabber-Component. */
-		inline SeqGrabComponent getGrabber(void)
-			{ return mGrabber; }
-
-		//! Get the SequenceGrabber-Channel associated with the device.
-		/*! \return the SequenceGrabber-Channel. */
-		inline SGChannel getChannel(void)
-			{ return mChannel; }
-
-		//! Get the VideoDigitizer associated with the device.
-		/*! \return the VideoDigitizer. */
-		inline VideoDigitizerComponent getDigitizer(void)
-			{ return mDigitizer; }
-
-	private:
-		bool queryCapabilities(SeqGrabComponent current_grabber, SGChannel current_channel);
-
-	};
-}
-
-#endif // QT_DEVICEDESCRIPTOR_H_
diff --git a/extra_lib/include/avcap/osx/QT_DeviceEnumerator.h b/extra_lib/include/avcap/osx/QT_DeviceEnumerator.h
deleted file mode 100644
index 9e1e375..0000000
--- a/extra_lib/include/avcap/osx/QT_DeviceEnumerator.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-
-#ifndef QT_DEVICEENUMERATOR_H_
-#define QT_DEVICEENUMERATOR_H_
-
-#include <QuickTime/QuickTime.h>
-
-#include "DeviceCollector.h"
-#include "QT_DeviceDescriptor.h"
-
-namespace avcap
-{
-	//! This special DeviceDescriptor is used by the DeviceCollector to enumerate QuickTime capture-devices.
-
-	class QT_DeviceEnumerator: public QT_DeviceDescriptor
-	{
-	private:
-		SGDeviceList	mDeviceList;
-		
-	public:
-		QT_DeviceEnumerator();
-		virtual ~QT_DeviceEnumerator();
-		
-		//! Use this method to populate a DeviceList with the descriptors of the Devices found on the system.
-		/*! \param dev_list : the list that is filled with DeviceDescriptor-objects.
-		 * \return 0 on success, -1 else */ 
-		int findDevices(DeviceCollector::DeviceList& dev_list);
-		
-		virtual int open();
-		
-		virtual int close();
-	};	
-}
-
-#endif // QT_DEVICEENUMERATOR_H_
-
diff --git a/extra_lib/include/avcap/osx/QT_FormatManager.h b/extra_lib/include/avcap/osx/QT_FormatManager.h
deleted file mode 100644
index a819d14..0000000
--- a/extra_lib/include/avcap/osx/QT_FormatManager.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-#ifndef QT_FORMATMANAGER_H
-#define QT_FORMATMANAGER_H
-
-#include <stdint.h>
-#include <QuickTime/QuickTime.h>
-
-#include "FormatManager.h"
-
-namespace avcap
-{
-	class QT_DeviceDescriptor;
-	
-	//! Implementation of the FormatManager for the QuickTime-implementation of CaptureDevice.
-	
-	/*! This FormatManager supports at most one format, so setting the format is not realy neccessary. */
-	
-	class QT_FormatManager: public FormatManager
-	{
-	private:
-		QT_DeviceDescriptor*	mQTDeviceDescriptor;
-		GWorldPtr				mGWorld;
-		Rect					mCurrentBounds;
-		bool					mNeedsDecompression;
-		
-	public:
-		QT_FormatManager(QT_DeviceDescriptor *dd);
-		
-		virtual ~QT_FormatManager();
-		
-		int setFormat(Format *fmt);
-		
-		int setFormat(uint32_t fourcc);
-
-		Format* getFormat();
-		
-		int setResolution(int w, int h);
-
-		int getWidth();
-
-		int getHeight();
-		
-		size_t getImageSize();
-				
-		int setFramerate(int fps);
-		
-		int getFramerate();
-		
-		void query();
-		
-	private:
-		
-		int probeResolutions(Format* fmt);
-
-		int checkResolution(int w, int h);
-
-		int updateGWorld(const Rect* bounds);
-
-		static uint32_t OSType2Fourcc(OSType pixel_format);
-		
-		static OSType Fourcc2OSType(uint32_t fourcc);
-
-		inline bool needsDecompression() const 
-			{ return mNeedsDecompression; }
-
-		friend class QT_VidCapManager;
-	};
-}
-
-#endif // QT_FORMATMANAGER_H
diff --git a/extra_lib/include/avcap/osx/QT_VidCapManager.h b/extra_lib/include/avcap/osx/QT_VidCapManager.h
deleted file mode 100644
index ff34c3c..0000000
--- a/extra_lib/include/avcap/osx/QT_VidCapManager.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-#ifndef QT_VIDCAPMANAGER_H_
-#define QT_VIDCAPMANAGER_H_
-
-#include <sys/types.h>
-#include <list>
-#include <time.h>
-#include <pthread.h>
-
-#include <QuickTime/QuickTime.h>
-
-#include "CaptureManager.h"
-
-namespace avcap
-{
-	class QT_DeviceDescriptor;
-	class QT_FormatManager;
-	class IOBuffer;
-	class CaptureHandler;
-	
-	//! Implementation of the CaptureManager for the QuickTime-implementation of a CaptureDevice.
-
-	/*! This CaptureManager captures the data in an ow thread. 
-	 * Decompression is performed, if neccessary (e.g. for DV-Cams). */
-	
-	class QT_VidCapManager: public CaptureManager
-	{
-	public:
-
-	private:		
-		typedef std::list<IOBuffer*> IOBufList_t;
-
-		QT_DeviceDescriptor	*mQTDeviceDescriptor;
-		QT_FormatManager	*mFormatMgr;
-		IOBufList_t			mBuffers;
-		TimeScale			mTimeScale;
-		TimeScale			mLastTime;
-		pthread_t*			mThread;
-		pthread_mutex_t		mLock;
-		int					mFinish;
-		long 				mSequence;
-		int					mNumBufs;
-		int					mAvailableBuffers;
-		ICMDecompressionSessionRef	mDecompSession;
-
-	public:
-		QT_VidCapManager(QT_DeviceDescriptor* dd, QT_FormatManager* fmt_mgr, int nbufs);
-		
-		virtual ~QT_VidCapManager();
-		
-		int init();
-		
-		int destroy();
-		
-		int startCapture();
-
-		int stopCapture();
-		
-		virtual IOBuffer* dequeue();
-
-		virtual int enqueue(IOBuffer* buf);
-		
-		virtual int getNumIOBuffers();
-		
-	private:
-		int startCaptureImpl();
-		
-		int stopCaptureImpl();
-
-		void notifyCaptureHandler(void* data, size_t length, size_t bytes_per_row, TimeValue time);
-
-		int poll();
-
-		struct timespec getPollTimespec(double fps);
-
-		int decompressData(void* data, long length, TimeValue timeValue);
-
-		static OSErr captureCallback(SGChannel ch, Ptr data, long data_len, long * offset, 
-			long ch_ref_con, TimeValue time_value, short write_type, long priv);
-
-		OSErr captureCallbackImpl(SGChannel ch, Ptr data, long data_len, long * offset, 
-			long ch_ref_con, TimeValue time_value, short write_type);
-
-		int createDecompSession();
-		
-		static void* threadFunc(void* arg);
-	
-		static void decompTrackingCallback(void *decompressionTrackingRefCon, OSStatus result,
-			ICMDecompressionTrackingFlags decompressionTrackingFlags, CVPixelBufferRef pixelBuffer,
-			TimeValue64 displayTime, TimeValue64 displayDuration, ICMValidTimeFlags validTimeFlags,
-			void *reserved,	void *sourceFrameRefCon );
-
-		void threadFuncImpl();
-		
-		void clearBuffers();
-	};
-}
-
-#endif // QT_VIDCAPMANAGER_H
-
diff --git a/extra_lib/include/avcap/osx/avcap-config.h b/extra_lib/include/avcap/osx/avcap-config.h
deleted file mode 100644
index 9639389..0000000
--- a/extra_lib/include/avcap/osx/avcap-config.h
+++ /dev/null
@@ -1,264 +0,0 @@
-#ifndef _AVCAP_CONFIG_H
-#define _AVCAP_CONFIG_H 1
- 
-/* avcap-config.h. Generated automatically at end of configure. */
-/* config.h.  Generated from config.h.in by configure.  */
-/* config.h.in.  Generated from configure.in by autoheader.  */
-
-/* Define to 1 if you have the `alarm' function. */
-#ifndef AVCAP_HAVE_ALARM 
-#define AVCAP_HAVE_ALARM  1 
-#endif
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#ifndef AVCAP_HAVE_DLFCN_H 
-#define AVCAP_HAVE_DLFCN_H  1 
-#endif
-
-/* Define to 1 if you have the <fcntl.h> header file. */
-#ifndef AVCAP_HAVE_FCNTL_H 
-#define AVCAP_HAVE_FCNTL_H  1 
-#endif
-
-/* Define to 1 if you have the <float.h> header file. */
-#ifndef AVCAP_HAVE_FLOAT_H 
-#define AVCAP_HAVE_FLOAT_H  1 
-#endif
-
-/* Define to 1 if you have the `getpagesize' function. */
-#ifndef AVCAP_HAVE_GETPAGESIZE 
-#define AVCAP_HAVE_GETPAGESIZE  1 
-#endif
-
-/* Define to 1 if you have the `gettimeofday' function. */
-#ifndef AVCAP_HAVE_GETTIMEOFDAY 
-#define AVCAP_HAVE_GETTIMEOFDAY  1 
-#endif
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#ifndef AVCAP_HAVE_INTTYPES_H 
-#define AVCAP_HAVE_INTTYPES_H  1 
-#endif
-
-/* Define to 1 if you have the <limits.h> header file. */
-#ifndef AVCAP_HAVE_LIMITS_H 
-#define AVCAP_HAVE_LIMITS_H  1 
-#endif
-
-/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
-   to 0 otherwise. */
-#ifndef AVCAP_HAVE_MALLOC 
-#define AVCAP_HAVE_MALLOC  1 
-#endif
-
-/* Define to 1 if you have the <memory.h> header file. */
-#ifndef AVCAP_HAVE_MEMORY_H 
-#define AVCAP_HAVE_MEMORY_H  1 
-#endif
-
-/* Define to 1 if you have the `memset' function. */
-#ifndef AVCAP_HAVE_MEMSET 
-#define AVCAP_HAVE_MEMSET  1 
-#endif
-
-/* Define to 1 if you have a working `mmap' system call. */
-#ifndef AVCAP_HAVE_MMAP 
-#define AVCAP_HAVE_MMAP  1 
-#endif
-
-/* Define to 1 if you have the `munmap' function. */
-#ifndef AVCAP_HAVE_MUNMAP 
-#define AVCAP_HAVE_MUNMAP  1 
-#endif
-
-/* Define to 1 if you have the `pow' function. */
-#ifndef AVCAP_HAVE_POW 
-#define AVCAP_HAVE_POW  1 
-#endif
-
-/* Define to 1 if you have the `select' function. */
-#ifndef AVCAP_HAVE_SELECT 
-#define AVCAP_HAVE_SELECT  1 
-#endif
-
-/* Define to 1 if you have the `sqrt' function. */
-#ifndef AVCAP_HAVE_SQRT 
-#define AVCAP_HAVE_SQRT  1 
-#endif
-
-/* Define to 1 if `stat' has the bug that it succeeds when given the
-   zero-length file name argument. */
-/* #undef HAVE_STAT_EMPTY_STRING_BUG */
-
-/* Define to 1 if stdbool.h conforms to C99. */
-#ifndef AVCAP_HAVE_STDBOOL_H 
-#define AVCAP_HAVE_STDBOOL_H  1 
-#endif
-
-/* Define to 1 if you have the <stddef.h> header file. */
-#ifndef AVCAP_HAVE_STDDEF_H 
-#define AVCAP_HAVE_STDDEF_H  1 
-#endif
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#ifndef AVCAP_HAVE_STDINT_H 
-#define AVCAP_HAVE_STDINT_H  1 
-#endif
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#ifndef AVCAP_HAVE_STDLIB_H 
-#define AVCAP_HAVE_STDLIB_H  1 
-#endif
-
-/* Define to 1 if you have the `strerror' function. */
-#ifndef AVCAP_HAVE_STRERROR 
-#define AVCAP_HAVE_STRERROR  1 
-#endif
-
-/* Define to 1 if you have the <strings.h> header file. */
-#ifndef AVCAP_HAVE_STRINGS_H 
-#define AVCAP_HAVE_STRINGS_H  1 
-#endif
-
-/* Define to 1 if you have the <string.h> header file. */
-#ifndef AVCAP_HAVE_STRING_H 
-#define AVCAP_HAVE_STRING_H  1 
-#endif
-
-/* Define to 1 if you have the <sys/ioctl.h> header file. */
-#ifndef AVCAP_HAVE_SYS_IOCTL_H 
-#define AVCAP_HAVE_SYS_IOCTL_H  1 
-#endif
-
-/* Define to 1 if you have the <sys/select.h> header file. */
-#ifndef AVCAP_HAVE_SYS_SELECT_H 
-#define AVCAP_HAVE_SYS_SELECT_H  1 
-#endif
-
-/* Define to 1 if you have the <sys/socket.h> header file. */
-#ifndef AVCAP_HAVE_SYS_SOCKET_H 
-#define AVCAP_HAVE_SYS_SOCKET_H  1 
-#endif
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#ifndef AVCAP_HAVE_SYS_STAT_H 
-#define AVCAP_HAVE_SYS_STAT_H  1 
-#endif
-
-/* Define to 1 if you have the <sys/time.h> header file. */
-#ifndef AVCAP_HAVE_SYS_TIME_H 
-#define AVCAP_HAVE_SYS_TIME_H  1 
-#endif
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#ifndef AVCAP_HAVE_SYS_TYPES_H 
-#define AVCAP_HAVE_SYS_TYPES_H  1 
-#endif
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#ifndef AVCAP_HAVE_UNISTD_H 
-#define AVCAP_HAVE_UNISTD_H  1 
-#endif
-
-/* Define to 1 if the system has the type `_Bool'. */
-/* #undef HAVE__BOOL */
-
-/* Compile avcap for Linux */
-/* #undef LINUX */
-
-/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
-   slash. */
-/* #undef LSTAT_FOLLOWS_SLASHED_SYMLINK */
-
-/* Compile avcap for Mac OS X */
-#ifndef AVCAP_OSX 
-#define AVCAP_OSX  1 
-#endif
-
-/* Name of package */
-#ifndef AVCAP_PACKAGE 
-#define AVCAP_PACKAGE  "avcap" 
-#endif
-
-/* Define to the address where bug reports for this package should be sent. */
-#ifndef AVCAP_PACKAGE_BUGREPORT 
-#define AVCAP_PACKAGE_BUGREPORT  "Nico.Pranke at googlemail.com" 
-#endif
-
-/* Define to the full name of this package. */
-#ifndef AVCAP_PACKAGE_NAME 
-#define AVCAP_PACKAGE_NAME  "A video capture library" 
-#endif
-
-/* Define to the full name and version of this package. */
-#ifndef AVCAP_PACKAGE_STRING 
-#define AVCAP_PACKAGE_STRING  "A video capture library 0.1.9" 
-#endif
-
-/* Define to the one symbol short name of this package. */
-#ifndef AVCAP_PACKAGE_TARNAME 
-#define AVCAP_PACKAGE_TARNAME  "avcap" 
-#endif
-
-/* Define to the version of this package. */
-#ifndef AVCAP_PACKAGE_VERSION 
-#define AVCAP_PACKAGE_VERSION  "0.1.9" 
-#endif
-
-/* Define to the type of arg 1 for `select'. */
-#ifndef AVCAP_SELECT_TYPE_ARG1 
-#define AVCAP_SELECT_TYPE_ARG1  int 
-#endif
-
-/* Define to the type of args 2, 3 and 4 for `select'. */
-#ifndef AVCAP_SELECT_TYPE_ARG234 
-#define AVCAP_SELECT_TYPE_ARG234  (fd_set *) 
-#endif
-
-/* Define to the type of arg 5 for `select'. */
-#ifndef AVCAP_SELECT_TYPE_ARG5 
-#define AVCAP_SELECT_TYPE_ARG5  (struct timeval *) 
-#endif
-
-/* Define to 1 if you have the ANSI C header files. */
-#ifndef AVCAP_STDC_HEADERS 
-#define AVCAP_STDC_HEADERS  1 
-#endif
-
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-#ifndef AVCAP_TIME_WITH_SYS_TIME 
-#define AVCAP_TIME_WITH_SYS_TIME  1 
-#endif
-
-/* Define to 1 if your <sys/time.h> declares `struct tm'. */
-/* #undef TM_IN_SYS_TIME */
-
-/* Version number of package */
-#ifndef AVCAP_VERSION 
-#define AVCAP_VERSION  "0.1.9" 
-#endif
-
-/* Compile avcap for Windows */
-/* #undef WINDOWS */
-
-/* Define to empty if `const' does not conform to ANSI C. */
-/* #undef const */
-
-/* Define to `__inline__' or `__inline' if that's what the C compiler
-   calls it, or to nothing if 'inline' is not supported under any name.  */
-#ifndef __cplusplus
-/* #undef inline */
-#endif
-
-/* Define to rpl_malloc if the replacement function should be used. */
-/* #undef malloc */
-
-/* Define to `unsigned int' if <sys/types.h> does not define. */
-/* #undef size_t */
-
-/* Define to empty if the keyword `volatile' does not work. Warning: valid
-   code using `volatile' can become incorrect without. Disable with care. */
-/* #undef volatile */
- 
-/* once: _AVCAP_CONFIG_H */
-#endif
diff --git a/extra_lib/include/avcap/singleton.h b/extra_lib/include/avcap/singleton.h
deleted file mode 100644
index 97b4375..0000000
--- a/extra_lib/include/avcap/singleton.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>
- */
-
-#ifndef SINGLETON_H_
-#define SINGLETON_H_
-
-
-
-namespace avcap 
-{
-	//! Base for classes that implement the singleton pattern. 
-	
-	/*! There are lots of more spohisticated approaches to implement 
-	 * a singleton but this simple approach is sufficient here.  */
-	template <class T>
-	class Singleton
-	{
-	public:
-	  
-		//! Get the global instance of the singleton.
-		static T& instance() 
-		{
-			static T _instance;
-			return _instance;
-		}
-	  
-	private:
-	
-		Singleton();	// ctor hidden
-		~Singleton();	// dtor hidden
-		Singleton(Singleton const&);	// copy ctor hidden
-		Singleton& operator=(Singleton const&);	// assign op hidden
-	};
-}
-
-#endif // SINGLETON_H_
-
diff --git a/extra_lib/include/avcap/windows/Crossbar.h b/extra_lib/include/avcap/windows/Crossbar.h
deleted file mode 100644
index 698f3ff..0000000
--- a/extra_lib/include/avcap/windows/Crossbar.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-
-#ifndef CROSSBAR_H_
-#define CROSSBAR_H_
-
-#include <DShow.h>
-
-#include "avcap-export.h"
-
-namespace avcap
-{
-	struct AVCAP_Export STConnector
-	{
-		std::string NameOfConnector;
-		LONG PhysicalType;
-		bool IsAudioConnector;
-		bool IsVideoConnector;
-		bool IsRouted;
-	
-		IAMCrossbar *Crossbar;
-		long PinIndexOfCrossbar;
-		int AudioSet; 
-		
-		/* Video inputs correspond to zero or max. one audio input. 
-		 The pins are numbered from 0 to N-1, N <= 32.
-		 Each bit set is the index of a audio pin on the 
-		 same crossbar corresponding to the selected video pin.
-		 AudioSet only used for video input pins. */
-	
-		int PinIndex; // Independent PinIndex
-	};
-	
-	struct AVCAP_Export STRouting
-	{
-		long OutputPinIndex;
-		IPin *OutputPin;
-		long RelatedInPinIndex;
-		IPin *RelatedInputPin;
-		IAMCrossbar *Crossbar;
-		int CrossbarIndex; // Zero based index
-		bool HasConnector;
-	};
-	
-	//! A class for controlling DirectShow video crossbars.
-	
-	/*! This class creates a single object which encapsulates all connected
-	 *	crossbars, enumerates all unique inputs which can be reached from
-	 *  a given starting downstream filter.
-	 *  
-	 *  The class supports an arbitrarily complex graph of crossbars, 
-	 *  which can be cascaded and disjoint, that is not all inputs need 
-	 *  to traverse the same set of crossbars.
-	 *  
-	 *  Given a starting filter (typically the capture filter), the class 
-	 *  recursively traces upstream searching for all viable inputs.  
-	 *  An input is considered viable if it is either: 
-	 * 
-	 *  - unconnected
-	 *  - connects to a DirectShow filter which does not support IAMCrossbar 
-	 * COM-Interface.	
-	 * */
-	
-	class AVCAP_Export CCrossbar
-	{
-	public:
-		CCrossbar(ICaptureGraphBuilder2 *CaptureGraphBuilder);
-		~CCrossbar(void);
-	
-		/*! Searches upstrean for all available crossbars in the filter graph, 
-		 * starting from a given filter.
-		 * \param StartFilter Filter to start search from.
-		 * \return The number of crossbars found in the filter graph, -1 else. */
-		int FindAllCrossbarsAndConnectors(IBaseFilter *StartFilter);
-		std::list<STConnector*>& GetInputConnectorList();
-	
-		/*! Gets the currently selected video input connector.
-		 * \param Connector Connector data */
-		bool GetCurrentVideoInput(STConnector *Connector);
-	
-		/*! Gets the currently selected audio input connector.
-		 * \param Connector Connector data */
-		bool GetCurrentAudioInput(STConnector *Connector);
-	
-		/*! Sets the input connector.
-		 * \param PinIndex Pin index */
-		bool SetInput(int PinIndex);
-	
-	private:
-		QzCComPtr<ICaptureGraphBuilder2> m_CaptureBuilder;
-		std::list<IAMCrossbar*> m_CrossbarList;
-		std::list<STRouting*> m_RoutingList;
-		std::list<STConnector*> m_InputConnectorList;
-	
-		HRESULT GetCrossbarIPinAtIndex(IAMCrossbar *pXbar, LONG PinIndex,
-				BOOL IsInputPin, IPin ** ppPin);
-		void StringFromPinType(std::string &PinName, long lType);
-		void DeleteAllLists();
-	};
-}
-
-#endif // CROSSBAR_H_
diff --git a/extra_lib/include/avcap/windows/DS_Connector.h b/extra_lib/include/avcap/windows/DS_Connector.h
deleted file mode 100644
index 26a9c59..0000000
--- a/extra_lib/include/avcap/windows/DS_Connector.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-
-#ifndef DSCONNECTOR_H_
-#define DSCONNECTOR_H_
-
-#include <string>
-#include <list>
-
-#include "Connector.h"
-#include "DeviceDescriptor.h"
-#include "avcap-export.h"
-
-namespace avcap
-{
-// forward declaration
-class DS_DeviceDescriptor;
-class DS_Tuner;
-
-	//! Implementation of the Connector for DirectShow.
-
-
-	class AVCAP_Export DS_Connector : public Connector
-	{
-	public:
-	
-#pragma warning( disable : 4800 )
-		enum {
-			INPUT_TYPE_TUNER = 0x00010000 // CAP_TUNERDEVICE --> see "HelpFunc.h" file
-		};
-	
-	protected:
-		DS_DeviceDescriptor* 	mDSDeviceDescriptor;
-		int 					mIndex;
-		int 					mAudioset;
-		int						mType;
-		std::string 			mName;
-		DS_Tuner* 				mTuner;
-	
-	public:
-		/*! The Constructor.  */
-		DS_Connector(DS_DeviceDescriptor *dd, int index, const std::string& name,
-				int type=0, int audioset=0, int tuner=0);
-	
-		/*! The Destructor. */
-		virtual ~DS_Connector();
-	
-		bool hasTuner() const
-			{ return mType & INPUT_TYPE_TUNER; }
-	};
-}
-
-#endif // DSConnector_H_
diff --git a/extra_lib/include/avcap/windows/DS_ConnectorManager.h b/extra_lib/include/avcap/windows/DS_ConnectorManager.h
deleted file mode 100644
index e0738f2..0000000
--- a/extra_lib/include/avcap/windows/DS_ConnectorManager.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-
-#ifndef DSCONNECTORMANAGER_H_
-#define DSCONNECTORMANAGER_H_
-
-#include <list>
-
-#include "Connector.h"
-#include "ConnectorManager.h"
-#include "avcap-export.h"
-
-class IPin;
-class IBaseFilter;
-
-namespace avcap
-{
-class DS_DeviceDescriptor;
-class DS_Connector;
-
-	//! DirectShow implementation of the ConnectorManager.
-
-	class AVCAP_Export DS_ConnectorManager : public ConnectorManager
-	{
-	private:
-		void*					mCrossbar;
-		DS_DeviceDescriptor* 	mDSDeviceDescriptor;
-	
-	public:
-	
-		/*! Construct the manager and query for available inputs and outputs for audio and video.
-		 * The manager is usualy created by an CaptureDevice object.
-		 * \param dd The DeviceDescriptor to acces the device. */
-		DS_ConnectorManager(DS_DeviceDescriptor *dd);
-	
-		/*! The destructor. */
-		virtual ~DS_ConnectorManager();
-	
-		Connector* getVideoInput();
-		int setVideoInput(Connector* c);
-	
-		Connector* getAudioInput();
-		int setAudioInput(Connector* c);
-	
-		Connector* getVideoOutput();
-		int setVideoOutput(Connector* c);
-	
-		Connector* getAudioOutput();
-		int setAudioOutput(Connector* c);
-	
-		void query();
-	
-	private:
-	
-		int setConnector(bool IsVideoConnector, Connector* c);
-		
-		Connector* getConnector(bool IsVideoConnector);
-		
-		Connector* findByIndex(const ListType& l, int index);
-	
-		void getIPinFromConnector(Connector *con, IPin **ConnectorPin,
-				IBaseFilter *CaptureFilter);
-		
-		bool removeAllFilters(IPin *OutputPinToStart);
-		
-		bool getPinCategory(IPin *Pin, GUID *PinCategory);
-	};
-}
-
-#endif // DSCONNECTORMANAGER_H_
diff --git a/extra_lib/include/avcap/windows/DS_Control.h b/extra_lib/include/avcap/windows/DS_Control.h
deleted file mode 100644
index 1904b45..0000000
--- a/extra_lib/include/avcap/windows/DS_Control.h
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-
-#ifndef DSCONTROL_H_
-#define DSCONTROL_H_
-
-#include <string>
-
-#include "Control_avcap.h"
-#include "Interval.h"
-#include "avcap-export.h"
-
-namespace avcap
-{
-class DS_DeviceDescriptor;
-
-	//! Implementation of the Control-class for DirectShow.
-
-	class AVCAP_Export DS_Control
-	{
-	public:
-		enum Ctrl_Type
-		{
-			CTRL_TYPE_INTEGER = 1,
-			CTRL_TYPE_BOOLEAN = 2,
-		};
-	
-		enum DShowInterface
-		{
-			IAM_VIDEOPROCAMP = 1,
-			IAM_CAMERACONTROL = 2,
-		};
-	
-		//! Helper-class to query control-properties
-		
-		struct Query_Ctrl
-		{
-			unsigned int 	id;
-			Ctrl_Type 		type;
-			std::string 	name;
-			
-			long minimum;
-			long maximum;
-			long step;
-			long default_value;
-			long flags;
-			long property;
-	
-			DS_Control::DShowInterface DShowInterfaceType;
-		};
-	
-	private:
-		DShowInterface 	mDShowInterfaceType;
-		long			mProperty;
-		int 			mId;
-		int 			mValue;
-		std::string 	mName;
-		int 			mDefaultValue;
-		int 			mFlags;
-		bool 			mInitialized;
-	
-	protected:
-		DS_DeviceDescriptor* mDSDeviceDescriptor;
-	
-	public:
-		DS_Control(DS_DeviceDescriptor *dd, Query_Ctrl* query);
-		virtual ~DS_Control();
-	
-		inline int getId() const
-			{ return mId; }
-	
-		inline int getDefaultValue() const
-			{ return mDefaultValue; }
-	
-		inline const std::string& getName() const
-			{ return mName;	}
-	
-		int setValue(int val);
-	
-		int getValue() const;
-	
-		int reset();
-		
-	private:
-		int update();
-
-		int retrieveValue();
-	};
-	
-	//! DirectShow integer valued control.
-	
-	class DS_IntControl : public IntegerControl
-	{
-	private:
-		Interval 	mInterval;
-		DS_Control	mControlBase;
-		
-	public:
-		inline DS_IntControl(DS_DeviceDescriptor *dd, struct DS_Control::Query_Ctrl* query) :
-			mInterval(query->minimum, query->maximum, query->step),
-			mControlBase(dd, query)
-			{}
-	
-		virtual inline ~DS_IntControl()
-			{}
-	
-		inline const Interval& getInterval() const 
-			{ return mInterval; }
-
-		virtual inline int getId() const
-			{ return mControlBase.getId(); }
-	
-		virtual inline int getDefaultValue() const
-			{ return mControlBase.getDefaultValue(); }
-	
-		virtual inline const std::string& getName() const
-			{ return mControlBase.getName(); }
-	
-		virtual inline int setValue(int val)
-			{ return mControlBase.setValue(val); }
-	
-		virtual inline int getValue() const
-			{ return mControlBase.getValue(); }
-		
-		virtual inline int reset() 
-			{ return mControlBase.reset(); }
-	};
-	
-	//! DirectShow boolean control.
-
-	class DS_BoolControl : public BoolControl
-	{
-	private:
-		DS_Control	mControlBase;
-
-	public:
-		inline DS_BoolControl(DS_DeviceDescriptor *dd, struct DS_Control::Query_Ctrl* query) :
-			mControlBase(dd, query)
-			{}
-	
-		virtual inline ~DS_BoolControl()
-			{}
-		
-		virtual inline int getId() const
-			{ return mControlBase.getId(); }
-	
-		virtual inline int getDefaultValue() const
-			{ return mControlBase.getDefaultValue(); }
-	
-		virtual inline const std::string& getName() const
-			{ return mControlBase.getName(); }
-	
-		virtual inline int setValue(int val)
-			{ return mControlBase.setValue(val); }
-	
-		virtual inline int getValue() const
-			{ return mControlBase.getValue(); }
-		
-		virtual inline int reset() 
-			{ return mControlBase.reset(); }
-	};
-}
-
-#endif // DSCONTROL_H_
diff --git a/extra_lib/include/avcap/windows/DS_ControlManager.h b/extra_lib/include/avcap/windows/DS_ControlManager.h
deleted file mode 100644
index 1d21f27..0000000
--- a/extra_lib/include/avcap/windows/DS_ControlManager.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-
-#ifndef DSCONTROLMANAGER_H_
-#define DSCONTROLMANAGER_H_
-
-#include <string>
-#include <list>
-
-#include "ControlManager.h"
-#include "DS_Control.h"
-#include "avcap-export.h"
-
-namespace avcap
-{
-class DS_DeviceDescriptor;
-	
-	//! DirectShow ControlManager implementation.
-
-	/*! DirectShow doesn't provide any methods to enumerate driver- 
-	* specific controls like V4L2 does. 
-	* There are only few DirectShow COM-Interfaces (e.g. IAMExtTransport (for 
-	* Firewire or other external devices), IAMVideoControl, IAMVideoCompression, IAMVideoProcAmp, 
-	* IAMCameraControl --> see DirectShow documentation), the capture device DirectShow filter
-	* (only WDM capture devices) can expose to support the setting of global properties. The most 
-	* important settings are covered by these DirectShow COM-Interfaces. 
-	* In the future, DirectShow will provide more COM-Interfaces.
-	* 
-	* The DirectShow COM-Interfaces IAMVideoProcAmp and IAMCameraControl have been already 
-	* implemented in the avcap-library.
-	* 
-	* Most WDM capture devices and \b all VFW capture devices have their own driver-supplied dialog 
-	* boxes with user-setable controls on it, that can't be set programmatically. */
-	
-	class AVCAP_Export DS_ControlManager : public ControlManager
-	{
-	private:
-		DS_DeviceDescriptor* mDSDeviceDescriptor;
-	
-	public:
-		DS_ControlManager(DS_DeviceDescriptor *dd);
-	
-		virtual ~DS_ControlManager();
-	
-		Control* getControl(const std::string& name);
-	
-		Control* getControl(int id);
-	
-		const ListType& getControlList()
-			{ return (const ListType&) mControls; }
-		
-		void query();
-	
-	private:
-		void query(int start_id, int end_id);
-	};
-}
-
-#endif 
diff --git a/extra_lib/include/avcap/windows/DS_Device.h b/extra_lib/include/avcap/windows/DS_Device.h
deleted file mode 100644
index f9a2d93..0000000
--- a/extra_lib/include/avcap/windows/DS_Device.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de>
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-
-#ifndef DSDEVICE_H_
-#define DSDEVICE_H_
-
-#include <string>
-#include <list>
-
-#include "DS_DeviceDescriptor.h"
-#include "CaptureDevice.h"
-#include "avcap-export.h"
-
-namespace avcap
-{
-// forward declarations
-class DS_ConnectorManager;
-class DS_ControlManager;
-class DS_VidCapManager;
-class DS_DeviceDescriptor;
-class DS_FormatManager;
-
-	//! Implementation of the CaptureDevice for DirectShow.
-
-	class AVCAP_Export DS_Device : public CaptureDevice
-	{
-	private:
-		DS_VidCapManager*		mVidCapMgr;
-		DS_ConnectorManager*	mConnectorMgr;
-		DS_ControlManager*		mControlMgr;
-		DS_FormatManager*		mFormatMgr;
-		DS_DeviceDescriptor*	mDSDeviceDescriptor;
-
-	public:
-		DS_Device(DS_DeviceDescriptor* dd);
-
-		virtual ~DS_Device();
-
-		inline const DeviceDescriptor* getDescriptor()
-			{ return (const DeviceDescriptor*) mDSDeviceDescriptor;	}
-
-		inline CaptureManager* getVidCapMgr()
-			{ return (CaptureManager*) mVidCapMgr; }
-
-		inline ConnectorManager* getConnectorMgr()
-			{ return (ConnectorManager*) mConnectorMgr;	}
-
-		inline ControlManager* getControlMgr()
-			{ return (ControlManager*) mControlMgr;	}
-
-		inline FormatManager* getFormatMgr()
-			{ return (FormatManager*)mFormatMgr; }
-
-	private:
-		int open();
-
-		int close();
-	};
-}
-
-#endif // DSDEVICE_H_
diff --git a/extra_lib/include/avcap/windows/DS_DeviceDescriptor.h b/extra_lib/include/avcap/windows/DS_DeviceDescriptor.h
deleted file mode 100644
index 3d79120..0000000
--- a/extra_lib/include/avcap/windows/DS_DeviceDescriptor.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de>
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-
-#ifndef DSDEVICEDESCRIPTOR_H_
-#define DSDEVICEDESCRIPTOR_H_
-
-#include <iostream>
-#include <string>
-#include <DShow.h>
-
-#include "DeviceDescriptor.h"
-#include "avcap-export.h"
-
-class IBaseFilter;
-
-namespace avcap
-{
-class CaptureDevice;
-class DS_Device;
-
-	//! Implementation of the DeviceDescriptor for DirectShow.
-
-	class AVCAP_Export DS_DeviceDescriptor : public DeviceDescriptor
-	{
-	public:
-		// Used by AddToRot() and RemoveFromRot() for spying on
-		// filter graph with GraphEdit software
-		unsigned long mRegister; // For debugging purpose
-
-	private:
-		std::string mName;
-		std::string mCard;
-		std::string mInfo;
-
-		int 			mCapabilities;
-		DEV_HANDLE_T 	mHandle;
-		bool 			mValid;
-		bool			mIsOpen;
-		DS_Device*		mDevice;
-
-	public:
-		DS_DeviceDescriptor(const std::string &card);
-
-		virtual ~DS_DeviceDescriptor();
-
-		virtual CaptureDevice* getDevice();
-
-		int open();
-
-		int close();
-
-		virtual inline const std::string& getName() const
-			{ return mName; }
-
-		// implementation of pure virtual method
-		inline const DEV_HANDLE_T getHandle() const
-			{ return mHandle; }
-
-		// but non-const access is needed by the device-class
-		inline DEV_HANDLE_T getHandle()
-			{ return mHandle; }
-
-		bool isAVDev() const;
-
-		bool isVideoCaptureDev() const;
-
-		bool isVBIDev() const;
-
-		bool isTuner() const;
-
-		bool isAudioDev() const;
-
-		bool isRadioDev() const;
-
-		bool isOverlayDev() const;
-
-		//! Device is a VFW (Video for Windows) device.
-		/*! \return true VFW device, else false */
-		bool isVfWDevice() const;
-
-	private:
-		bool queryCapabilities();
-
-		void findDevice(std::string &UniqueDeviceID, IBaseFilter **CaptureFilter,
-				std::string &DeviceName, std::string &DeviceInfo,
-				bool *IsVideoDevice=NULL, bool *IsAudioDevice=NULL);
-
-		bool createCaptureFilterGraph(std::string &UniqueDeviceID,
-				IBaseFilter *CaptureFilter);
-
-		bool getInfosFromDevice(IBaseFilter *CaptureFilter, int *Capabilities,
-				std::string &Card, std::string &Info);
-
-		bool findOverlaySupport(IBaseFilter *CaptureFilter, int *Capabilities);
-
-		bool findVBISupport(IBaseFilter *CaptureFilter, int *Capabilities);
-
-		bool findTunerRadioSupport(IBaseFilter *CaptureFilter, int *Capabilities);
-
-		bool isAudioOrVideoDevice(IBaseFilter *CaptureFilter, int *Capabilities);
-
-		HRESULT addToRot(IUnknown *pUnkGraph, DWORD *pdwRegister);
-
-		void removeFromRot(DWORD pdwRegister);
-
-		friend class DS_Device;
-	};
-}
-
-#endif // DSEVICEDESCRIPTOR_H_
diff --git a/extra_lib/include/avcap/windows/DS_FormatManager.h b/extra_lib/include/avcap/windows/DS_FormatManager.h
deleted file mode 100644
index d70714c..0000000
--- a/extra_lib/include/avcap/windows/DS_FormatManager.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-#ifndef DSFORMATMANAGER_H_
-#define DSFORMATMANAGER_H_
-
-#include <list>
-#include <string>
-#include <Dshow.h>
-
-#ifndef _MSC_VER
-# include <stdint.h>
-#endif
-
-#include "FormatManager.h"
-#include "avcap-export.h"
-
-class IBaseFilter;
-class IPin;
-
-namespace avcap
-{
-class DS_DeviceDescriptor;
-
-	//! Implementation of the FormatManager for DirectShow.
-	
-	/*! A capture device that still uses a VFW (Video for Windows)
-	* driver can select the available formats only by using the VFW driver-supplied dialog box.
-	* But GUI-related stuff is out of the scope of this library. */
-	
-	class AVCAP_Export DS_FormatManager : public FormatManager
-	{
-	private:
-		DS_DeviceDescriptor* mDSDeviceDescriptor;
-		int			   mFrameRate;
-
-	public:
-		DS_FormatManager(DS_DeviceDescriptor *dd);
-
-		virtual ~DS_FormatManager();
-	
-		virtual int setFormat(Format *fmt);
-	
-		virtual Format* getFormat();
-	
-		virtual int setResolution(int w, int h);
-	
-		virtual int getWidth();
-	
-		virtual int getHeight();
-	
-		virtual int getBytesPerLine();
-	
-		virtual int setFramerate(int fps);
-
-		virtual int getFramerate();
-
-		virtual int flush();
-	
-		virtual size_t getImageSize();
-	
-		virtual const VideoStandard* getVideoStandard();
-	
-		virtual int setVideoStandard(const VideoStandard* std);
-	
-		virtual void query();
-	
-	private:
-		int getParams();
-		
-		void queryVideoStandards();
-	
-		bool getVideoInfoHeader(AM_MEDIA_TYPE *MediaType,
-				VIDEOINFOHEADER *VideoInfoHeader);
-		
-		bool getCurrentConnectedVideoPin(IBaseFilter *CaptureFilter,
-				IPin **VideoPin);
-	};
-}
-
-#endif // DSFORMATMANAGER_H_
diff --git a/extra_lib/include/avcap/windows/DS_Tuner.h b/extra_lib/include/avcap/windows/DS_Tuner.h
deleted file mode 100644
index 82e6438..0000000
--- a/extra_lib/include/avcap/windows/DS_Tuner.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-
-#ifndef DSTUNER_H_
-#define DSTUNER_H_
-
-#include <string>
-
-#include "Tuner_avcap.h"
-#include "avcap-export.h"
-
-class IAMTVAudio;
-class IAMTVTuner;
-class IBaseFilter;
-
-namespace avcap
-{
-class DS_DeviceDescriptor;
-
-	//! Implementation of the Tuner-class for DirectShow.
-	  
-	/*! This implementation uses the PROPSETID_TUNER property-set which is defined in 
-	 * the library kstvtuner.ax which can not be linked with gcc. 
-	 * It thus can not be used under mingw, but only if build with Visual-C++.
-	 * So the mingw-build library misses this tuner-implentation.
-	 * 
-	 * There are only three states of signal strength:
-	 * signal present, signal not present, signal not determined. Because of this limitation
-	 * the method getAFCValue() is not implemented.
-	 */
-	
-	class AVCAP_Export DS_Tuner : public Tuner
-	{
-	private:
-	
-#pragma warning( disable : 4800 )
-
-		enum
-		{
-			TUNER_RADIO = 0x00080000, // CAP_RADIO --> see "HelpFunc.h" file
-			TUNER_ANALOG_TV = 0x00020000 // CAP_TUNER --> see "HelpFunc.h" file
-		};
-	
-		int 			mIndex;
-		std::string 	mName;
-		int 			mType;
-		int 			mCapabilities;
-		unsigned int 	mRangeHigh;
-		unsigned int 	mRangeLow;
-		double 			mStep;
-		double 			mFreq;
-	
-	private:
-		DS_DeviceDescriptor* mDSDeviceDescriptor;
-	
-	public:
-		DS_Tuner(DS_DeviceDescriptor *dd, int index, const std::string &name,
-				int type, int caps, unsigned int high, unsigned int low);
-		
-		virtual ~DS_Tuner();
-	
-		inline bool isRadioTuner() const
-			{ return mType & TUNER_RADIO; }
-	
-		inline bool isTVTuner() const
-			{ return mType & TUNER_ANALOG_TV; }
-	
-		int setStereo();
-	
-		int setMono();
-	
-		int setSAP();
-	
-		int setLang1();
-	
-		int setLang2();
-	
-		double getFreq() const;
-	
-		inline double getFreqStep() const
-			{ return mStep; }
-	
-		inline double getMinFreq() const
-			{ return mRangeLow*mStep; }
-	
-		inline double getMaxFreq() const
-			{ return mRangeHigh*mStep; }
-	
-		const std::string getName() const
-			{ return mName; }
-	
-		int getSignalStrength() const;
-	
-		int increaseFreq();
-	
-		int decreaseFreq();
-	
-		int setFreq(double f);
-	
-	private:
-		int setAudioMode(int mode);
-		
-		int getAudioMode();
-	
-		bool getIAMTVTunerInterfaceFromFilter(IBaseFilter *Filter,
-			IAMTVTuner **Tuner) const;
-
-		bool getIAMTVAudioInterfaceFromFilter(IBaseFilter *Filter,
-			IAMTVAudio **Audio);
-	};
-}
-
-#endif // DSTUNER_H_
diff --git a/extra_lib/include/avcap/windows/DS_VidCapManager.h b/extra_lib/include/avcap/windows/DS_VidCapManager.h
deleted file mode 100644
index 218f3fa..0000000
--- a/extra_lib/include/avcap/windows/DS_VidCapManager.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-
-#ifndef DSVIDCAPMANAGER_H_
-#define DSVIDCAPMANAGER_H_
-
-#include <list>
-
-#include "CaptureManager.h"
-#include "SampleGrabberCallback.h"
-#include "avcap-export.h"
-
-namespace avcap
-{
-class DS_DeviceDescriptor;
-class DS_FormatManager;
-class IOBuffer;
-class CaptureHandler;
-class SampleGrabberCallback;
-
-	//! Implementation of the CaptureManager for DirectShow.
-
-	class AVCAP_Export DS_VidCapManager : public CaptureManager
-	{
-	private:
-		typedef std::list<IOBuffer*> IOBufList;
-		
-		DS_DeviceDescriptor*	mDSDeviceDescriptor;
-		SampleGrabberCallback*	mGrabberCallback;
-		HANDLE					mLock;
-		int 					mSequence;
-		int 					mNumBuffers;
-
-	public:
-		DS_VidCapManager(DS_DeviceDescriptor* dd, DS_FormatManager* fmt_mgr,
-				int nbufs = DEFAULT_BUFFERS);
-	
-		virtual ~DS_VidCapManager();
-	
-		int init();
-	
-		int destroy();
-	
-		int startCapture();
-	
-		int stopCapture();
-		
-		int getNumIOBuffers();
-	
-	private:
-		IOBuffer* dequeue();
-
-		int enqueue(IOBuffer* buf);
-	
-		friend class IOBuffer;
-		friend class SampleGrabberCallback;
-	};
-
-	class MutexGuard
-	{
-	private:
-		HANDLE	mLock;
-		
-	public:
-		inline MutexGuard(HANDLE lock) : 
-			mLock(lock)
-			{ WaitForSingleObject(mLock, INFINITE); }
-			
-		inline virtual ~MutexGuard()
-			{ ReleaseMutex(mLock); }
-	private:
-		inline MutexGuard()
-			{}
-	};
-}
-
-#endif // DSVIDCAPMANAGER_H_
diff --git a/extra_lib/include/avcap/windows/FormatNames.h b/extra_lib/include/avcap/windows/FormatNames.h
deleted file mode 100644
index e85b449..0000000
--- a/extra_lib/include/avcap/windows/FormatNames.h
+++ /dev/null
@@ -1,356 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-
-#ifndef FORMATNAMES_H_
-#define FORMATNAMES_H_
-
-#include <string>
-#include <uuids.h>
-
-void GetVideoFormatName(const GUID* guid, std::string& FormatName)
-{
-	// list creation date:05/27/2005 - taken from DirectShow documentation
-
-	// Uncompressed RGB video subtypes
-	if (*guid==MEDIASUBTYPE_ARGB1555) {
-		FormatName="RGB 555 with alpha channel";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_ARGB4444) {
-		FormatName="16-bit RGB with alpha channel; 4 bits per channel";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_ARGB32) {
-		FormatName="RGB 32 with alpha channel";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_A2R10G10B10) {
-		FormatName
-				="32-bit RGB with alpha channel; 10 bits per RGB channel plus 2 bits for alpha";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_A2B10G10R10) {
-		FormatName
-				="32-bit RGB with alpha channel; 10 bits per RGB channel plus 2 bits for alpha";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_RGB1) {
-		FormatName="RGB, 1 bit per pixel (bpp), palettized";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_RGB4) {
-		FormatName="RGB, 4 bpp, palettized";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_RGB8) {
-		FormatName="RGB, 8 bpp";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_RGB555) {
-		FormatName="RGB 555, 16 bpp";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_RGB565) {
-		FormatName="RGB 565, 16 bpp";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_RGB24) {
-		FormatName="RGB, 24 bpp";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_RGB32) {
-		FormatName="RGB, 32 bpp";
-		return;
-	}
-
-	// DV video subtypes
-	if (*guid==MEDIASUBTYPE_dvsl) {
-		FormatName="DV, 12.5 Mbps SD-DVCR 525-60 or SD-DVCR 625-50";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_dvsd) {
-		FormatName="DV, 25 Mbps SDL-DVCR 525-60 or SDL-DVCR 625-50";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_dvhd) {
-		FormatName="DV, 50 Mbps HD-DVCR 1125-60 or HD-DVCR 1250-50";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_dv25) {
-		FormatName="DV, 25 Mbps DVCPRO 25 (525-60 or 625-50)";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_dv50) {
-		FormatName="DV, 50 Mbps DVCPRO 50 (525-60 or 625-50)";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_dvh1) {
-		FormatName="DV, 100 Mbps DVCPRO 100 (1080/60i, 1080/50i, or 720/60P)";
-		return;
-	}
-
-	// YUV video subtypes
-	if (*guid==MEDIASUBTYPE_AYUV) {
-		FormatName="4:4:4 YUV formats";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_UYVY) {
-		FormatName="UYVY (packed 4:2:2)";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_Y411) {
-		FormatName="Y411 (packed 4:1:1)";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_Y41P) {
-		FormatName="Y41P (packed 4:1:1)";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_Y211) {
-		FormatName="Y211";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_YUY2) {
-		FormatName="YUYV (packed 4:2:2)";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_YVYU) {
-		FormatName="YVYU (packed 4:2:2)";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_YUYV) {
-		FormatName="YUYV (packed 4:2:2)(Used by Canopus; FOURCC 'YUYV')";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_IF09) {
-		FormatName="Indeo YVU9";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_IYUV) {
-		FormatName="IYUV";
-		return;
-	}
-	/*
-	if (*guid==MEDIASUBTYPE_I420) {
-		FormatName="I420";
-		return;
-	}
-	*/
-	if (*guid==MEDIASUBTYPE_YV12) {
-		FormatName="YV12";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_YVU9) {
-		FormatName="YVU9";
-		return;
-	}
-
-	// Miscellaneous video subtypes
-	if (*guid==MEDIASUBTYPE_CFCC) {
-		FormatName="MJPG format produced by some cards. (FOURCC 'CFCC')";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_CLJR) {
-		FormatName="Cirrus Logic CLJR format. (FOURCC 'CLJR')";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_CPLA) {
-		FormatName="Cinepak UYVY format. (FOURCC 'CPLA')";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_CLPL) {
-		FormatName
-				="A YUV format supported by some Cirrus Logic drivers. (FOURCC 'CLPL')";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_IJPG) {
-		FormatName="Intergraph JPEG format. (FOURCC 'IJPG')";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_MDVF) {
-		FormatName="A DV encoding format. (FOURCC 'MDVF')";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_MJPG) {
-		FormatName="Motion JPEG (MJPG) compressed video. (FOURCC 'MJPG')";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_MPEG1Packet) {
-		FormatName="MPEG1 Video Packet";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_MPEG1Payload) {
-		FormatName="MPEG1 Video Payload";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_Overlay) {
-		FormatName="Video delivered using hardware overlay";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_Plum) {
-		FormatName="Plum MJPG format. (FOURCC 'Plum')";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_QTJpeg) {
-		FormatName="QuickTime JPEG compressed data";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_QTMovie) {
-		FormatName="Apple® QuickTime® compression";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_QTRle) {
-		FormatName="QuickTime RLE compressed data";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_QTRpza) {
-		FormatName="QuickTime RPZA compressed data";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_QTSmc) {
-		FormatName="QuickTime SMC compressed data";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_TVMJ) {
-		FormatName="TrueVision MJPG format. (FOURCC 'TVMJ')";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_VPVBI) {
-		FormatName="Video port vertical blanking interval (VBI) data";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_VPVideo) {
-		FormatName="Video port video data";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_WAKE) {
-		FormatName="MJPG format produced by some cards. (FOURCC 'WAKE')";
-		return;
-	}
-
-	if (*guid==MEDIASUBTYPE_MPEG1Video) {
-		FormatName="MPEG1 Video";
-		return;
-	}
-	if (*guid==MEDIASUBTYPE_MPEG2_VIDEO) {
-		FormatName="MPEG2 Video";
-		return;
-	}
-
-	FormatName="Unknown format type!";
-	return;
-}
-
-void GetVideoStandardName(ULONG VideoStandard,
-		std::list<avcap::VideoStandard*>& VidStandard)
-{
-	// list creation date:05/27/2005 - taken from DirectShow documentation
-
-	if (VideoStandard & AnalogVideo_None) {
-		avcap::VideoStandard *vidSt=new avcap::VideoStandard("Digital sensor", 0);
-		VidStandard.push_back(vidSt);
-	}
-	if (VideoStandard & AnalogVideo_NTSC_M) {
-		avcap::VideoStandard *vidSt=new avcap::VideoStandard("NTSC (M) standard, 7.5 IRE black", 0x1);
-		VidStandard.push_back(vidSt);
-	}
-	if (VideoStandard & AnalogVideo_NTSC_M_J) {
-		avcap::VideoStandard *vidSt=new avcap::VideoStandard("NTSC (M) standard, 0 IRE black (Japan)", 0x2);
-		VidStandard.push_back(vidSt);
-	}
-	if (VideoStandard & AnalogVideo_NTSC_433) {
-		avcap::VideoStandard *vidSt=new avcap::VideoStandard("NTSC-433", 0x4);
-		VidStandard.push_back(vidSt);
-	}
-	if (VideoStandard & AnalogVideo_PAL_B) {
-		avcap::VideoStandard *vidSt=new avcap::VideoStandard("PAL-B standard", 0x10);
-		VidStandard.push_back(vidSt);
-	}
-	if (VideoStandard & AnalogVideo_PAL_D) {
-		avcap::VideoStandard *vidSt=new avcap::VideoStandard("PAL (D) standard", 0x20);
-		VidStandard.push_back(vidSt);
-	}
-	if (VideoStandard & AnalogVideo_PAL_G) {
-		avcap::VideoStandard *vidSt=new avcap::VideoStandard("PAL (G) standard", 0x40);
-		VidStandard.push_back(vidSt);
-	}
-	if (VideoStandard & AnalogVideo_PAL_H) {
-		avcap::VideoStandard *vidSt=new avcap::VideoStandard("PAL (H) standard", 0x80);
-		VidStandard.push_back(vidSt);
-	}
-	if (VideoStandard & AnalogVideo_PAL_I) {
-		avcap::VideoStandard *vidSt=new avcap::VideoStandard("PAL (I) standard", 0x100);
-		VidStandard.push_back(vidSt);
-	}
-	if (VideoStandard & AnalogVideo_PAL_M) {
-		avcap::VideoStandard *vidSt=new avcap::VideoStandard("PAL (M) standard", 0x200);
-		VidStandard.push_back(vidSt);
-	}
-	if (VideoStandard & AnalogVideo_PAL_N) {
-		avcap::VideoStandard *vidSt=new avcap::VideoStandard("PAL (N) standard", 0x400);
-		VidStandard.push_back(vidSt);
-	}
-	if (VideoStandard & AnalogVideo_PAL_60) {
-		avcap::VideoStandard *vidSt=new avcap::VideoStandard("PAL-60 standard", 0x800);
-		VidStandard.push_back(vidSt);
-	}
-	if (VideoStandard & AnalogVideo_SECAM_B) {
-		avcap::VideoStandard *vidSt=new avcap::VideoStandard("SECAM (B) standard", 0x1000);
-		VidStandard.push_back(vidSt);
-	}
-	if (VideoStandard & AnalogVideo_SECAM_D) {
-		avcap::VideoStandard *vidSt=new avcap::VideoStandard("SECAM (D) standard", 0x2000);
-		VidStandard.push_back(vidSt);
-	}
-	if (VideoStandard & AnalogVideo_SECAM_G) {
-		avcap::VideoStandard *vidSt=new avcap::VideoStandard("SECAM (G) standard", 0x4000);
-		VidStandard.push_back(vidSt);
-	}
-	if (VideoStandard & AnalogVideo_SECAM_H) {
-		avcap::VideoStandard *vidSt=new avcap::VideoStandard("SECAM (H) standard", 0x8000);
-		VidStandard.push_back(vidSt);
-	}
-	if (VideoStandard & AnalogVideo_SECAM_K) {
-		avcap::VideoStandard *vidSt=new avcap::VideoStandard("SECAM (K) standard", 0x10000);
-		VidStandard.push_back(vidSt);
-	}
-	if (VideoStandard & AnalogVideo_SECAM_K1) {
-		avcap::VideoStandard *vidSt=new avcap::VideoStandard("SECAM (K1) standard", 0x20000);
-		VidStandard.push_back(vidSt);
-	}
-	if (VideoStandard & AnalogVideo_SECAM_L) {
-		avcap::VideoStandard *vidSt=new avcap::VideoStandard("SECAM (L) standard", 0x40000);
-		VidStandard.push_back(vidSt);
-	}
-	if (VideoStandard & AnalogVideo_SECAM_L1) {
-		avcap::VideoStandard *vidSt=new avcap::VideoStandard("SECAM (L1) standard", 0x80000);
-		VidStandard.push_back(vidSt);
-	}
-	if (VideoStandard & AnalogVideo_PAL_N_COMBO) {
-		avcap::VideoStandard *vidSt=new avcap::VideoStandard("Combination (N) PAL standard (Argentina)", 0x100000);
-		VidStandard.push_back(vidSt);
-	}
-}
-
-#endif // FORMATNAMES_H_
diff --git a/extra_lib/include/avcap/windows/HelpFunc.h b/extra_lib/include/avcap/windows/HelpFunc.h
deleted file mode 100644
index cf56b11..0000000
--- a/extra_lib/include/avcap/windows/HelpFunc.h
+++ /dev/null
@@ -1,410 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-
-#ifndef HELPFUNC_H_
-#define HELPFUNC_H_
-
-#include <list>
-#include <math.h>
-#include <string>
-
-#include <DShow.h> // DirectShow
-#include <mtype.h> // DeleteMediaType() function
-#include <qedit.h> // CLSID_NullRenderer/CLSID_ISampleGrabber definitions
-#include <winnls.h>
-
-#ifndef __STREAMS__
-# include <streams.h>
-#endif
-
-// Some definitions
-#define VIDEO_SAMPLEGRABBER_FILTER_NAME L"SampleGrabber Video"
-#define AUDIO_SAMPLEGRABBER_FILTER_NAME L"SampleGrabber Audio"
-
-#define CAP_VIDEO_CAPTURE  0x00000001  /* Is a video capture device */
-#define CAP_VIDEO_OUTPUT   0x00000002  /* Is a video output device */
-#define CAP_VIDEO_OVERLAY  0x00000004  /* Can do video overlay */
-#define CAP_VBI_CAPTURE    0x00000010  /* Is a VBI capture device */
-
-#define CAP_TUNERDEVICE	   0x00010000  /* Has radio tuner or tv tuner */
-#define CAP_TUNER          0x00020000  /* Has a tuner */
-#define CAP_AUDIO_CAPTURE  0x00040000  /* Has audio support */
-#define CAP_RADIO		   0x00080000  /* Is a radio device */
-
-// Helper Functions -> see end of file
-static inline void DeleteList(std::list<IPin*> &PinList);
-
-static inline void DeleteList(std::list<IBaseFilter*> &AudioCaptureFilterList);
-
-static inline void DeleteList(std::list<AM_MEDIA_TYPE*> &MediaTypeList);
-
-static inline void EnumMediaTypesOnPin(IPin *Pin,
-		std::list<AM_MEDIA_TYPE*> &MediaTypeList);
-
-static inline void EnumPinsOnFilter(IBaseFilter *Filter,
-		std::list<IPin*> &PinList);
-
-static inline bool GetFilterGraphFromFilter(IBaseFilter *Filter,
-		IGraphBuilder **FilterGraph,
-		ICaptureGraphBuilder2 **CaptureGraphBuilder=NULL);
-
-static inline char* WChar2Char(const wchar_t* szWChar);
-
-static inline bool FindTunerRadioSupport(IBaseFilter *CaptureFilter,
-		int *Capabilities);
-
-static inline bool RenderStream(IUnknown *FilterOrPinToRender,
-		bool RenderVideo, bool RenderAudio);
-
-static inline bool GetInstalledDeviceIDs(
-		std::list<std::string> &UniqueDeviceIDList);
-
-static inline std::string bstr2string(BSTR bstr);
-
-static inline std::string bstr2string(BSTR bstr)
-{
-
-	int length = ((DWORD*) bstr)[0];
-	wchar_t* wchar_data = (wchar_t*) (((DWORD*) bstr) );
-
-	int converted_length = WideCharToMultiByte(CP_ACP, 0, wchar_data, -1, 0, 0,
-			0, 0);
-	char* char_data = new char[converted_length];
-	WideCharToMultiByte(CP_ACP, 0, wchar_data, -1, char_data, converted_length,
-			0, 0);
-	std::string res = char_data;
-	delete[] char_data;
-	return res;
-}
-
-//######################### DEBUG FUNCTIONS - MAKE THE FILTERGRAPH VISIBLE IN GRPAHEDIT ###################
-
-static inline void EnumMediaTypesOnPin(IPin *Pin,
-		std::list<AM_MEDIA_TYPE*> &MediaTypeList)
-{
-	QzCComPtr<IEnumMediaTypes> EnumMediaTypes;
-	if (Pin->EnumMediaTypes(&EnumMediaTypes)==S_OK) {
-		AM_MEDIA_TYPE *MediaType=NULL;
-		while (EnumMediaTypes->Next(1, &MediaType, NULL) == S_OK) {
-			MediaTypeList.push_back(MediaType);
-		}
-	}
-}
-
-static inline void EnumPinsOnFilter(IBaseFilter *Filter,
-		std::list<IPin*> &PinList)
-{
-	QzCComPtr<IEnumPins> EnumPins;
-	IPin *Pin=NULL;
-	if (Filter->EnumPins(&EnumPins)==S_OK) {
-		while (EnumPins->Next(1, &Pin, 0) == S_OK) {
-			PinList.push_back(Pin);
-		}
-	}
-}
-
-static inline bool GetFilterGraphFromFilter(IBaseFilter *Filter,
-		IGraphBuilder **FilterGraph,
-		ICaptureGraphBuilder2 **CaptureGraphBuilder)
-{
-	if (Filter==NULL) {
-		return false;
-	}
-	// Get the FilterGraph from the Filter
-	FILTER_INFO FilterInfo;
-	if (FAILED(Filter->QueryFilterInfo(&FilterInfo))) {
-		return false;
-	}
-	if (FilterInfo.pGraph==NULL) {
-		return false;
-	}
-	if (FAILED(FilterInfo.pGraph->QueryInterface(IID_IGraphBuilder,
-			(void**) &*FilterGraph))) {
-		return false;
-	}
-	// Get the CaptureGraphBuilder2
-	// CaptureGraphBuilder is useful for building many kinds of custom filter graphs, not only capture graphs
-	if (CaptureGraphBuilder!=NULL) {
-		if (FAILED(CoCreateInstance(CLSID_CaptureGraphBuilder2, NULL,
-				CLSCTX_INPROC_SERVER, IID_ICaptureGraphBuilder2,
-				(void**)&*CaptureGraphBuilder))) {
-			return false;
-		}
-		if (FAILED((*CaptureGraphBuilder)->SetFiltergraph(*FilterGraph))) {
-			return false;
-		}
-	}
-
-	return true;
-}
-
-static inline char* WChar2Char(const wchar_t* szWChar)
-{
-	if (szWChar == NULL) {
-		return NULL;
-	}
-	char* szChar = NULL;
-	size_t size = 0;
-	if ((size = wcstombs(0, szWChar, 0)) == -1) {
-		return NULL;
-	}
-	szChar = new char[size + 1];
-	szChar[size] = 0;
-	wcstombs(szChar, szWChar, size);
-	return szChar;
-}
-
-static inline bool FindTunerRadioSupport(IBaseFilter *CaptureFilter,
-		int *Capabilities)
-{
-	if (CaptureFilter==NULL) {
-		return false;
-	}
-
-	// Get the CaptureBuilderGraph COM-Interface from CaptureFilter
-	QzCComPtr<ICaptureGraphBuilder2> CaptureGraphBuilder;
-	QzCComPtr<IGraphBuilder> FilterGraph;
-	if (!GetFilterGraphFromFilter(CaptureFilter, &FilterGraph,
-			&CaptureGraphBuilder)) {
-		return false;
-	}
-
-	// Look for the tuner, radio
-	QzCComPtr<IAMTVTuner> Tuner;
-	if (SUCCEEDED(CaptureGraphBuilder->FindInterface(&LOOK_UPSTREAM_ONLY, NULL,
-			CaptureFilter, IID_IAMTVTuner, (void**)&Tuner))) {
-		long lModes = 0;
-		HRESULT hr = Tuner->GetAvailableModes(&lModes);
-		if (SUCCEEDED(hr) && (lModes & AMTUNER_MODE_FM_RADIO)) {
-			*Capabilities |= CAP_RADIO;
-		}
-		if (SUCCEEDED(hr) && (lModes & AMTUNER_MODE_TV)) {
-			*Capabilities |= CAP_TUNER;
-		}
-	}
-
-	return true;
-}
-
-static inline void GetInstalledAudioDevices(
-		std::list<IBaseFilter*> &AudioCaptureFilterList)
-{
-	// Enumerate the audio category
-	std::list<CLSID> EnumCategoriesList;
-	EnumCategoriesList.push_back(CLSID_AudioInputDeviceCategory);
-
-	for (std::list<CLSID>::iterator EnumCategoriesListIter=
-			EnumCategoriesList.begin(); EnumCategoriesListIter
-			!=EnumCategoriesList.end(); EnumCategoriesListIter++) {
-		// Create the System Device Enumerator.
-		HRESULT hr;
-		ICreateDevEnum *SysDevEnum = NULL;
-		if (FAILED(CoCreateInstance(CLSID_SystemDeviceEnum, NULL,
-				CLSCTX_INPROC_SERVER, IID_ICreateDevEnum, (void **)&SysDevEnum))) {
-			return;
-		}
-
-		// Obtain a class enumerator for the device capture category.
-		IEnumMoniker *EnumCat = NULL;
-		hr = SysDevEnum->CreateClassEnumerator(*EnumCategoriesListIter,
-				&EnumCat, 0);
-
-		if (hr == S_OK) {
-			// Enumerate the monikers.
-			IMoniker *Moniker = NULL;
-			ULONG Fetched;
-			while (EnumCat->Next(1, &Moniker, &Fetched) == S_OK) {
-				IBaseFilter *AudioCaptureFilter=NULL;
-				if (SUCCEEDED(Moniker->BindToObject(0, 0, IID_IBaseFilter,
-						(void**)&AudioCaptureFilter))) {
-					AudioCaptureFilterList.push_back(AudioCaptureFilter);
-				}
-				else {
-					if (AudioCaptureFilter!=NULL) {
-						AudioCaptureFilter->Release();
-					}
-				}
-				Moniker->Release();
-			}
-			EnumCat->Release();
-		}
-		SysDevEnum->Release();
-	}
-}
-
-static inline bool RenderStream(IUnknown *FilterOrPinToRender,
-		bool RenderVideo, bool RenderAudio)
-{
-	QzCComPtr<IGraphBuilder> FilterGraph;
-	QzCComPtr<ICaptureGraphBuilder2> CaptureGraphBuilder;
-
-	// Get the IGraphBuilder and CaptureGraphBuilder2 interfaces from pin or filter
-	QzCComPtr<IPin> Pin;
-	bool IsPin=false;
-	if (SUCCEEDED(FilterOrPinToRender->QueryInterface(IID_IPin, (void**)&Pin))) // It's a pin
-	{
-		PIN_INFO PinInfo;
-		Pin->QueryPinInfo(&PinInfo);
-		IsPin=true;
-
-		if (!GetFilterGraphFromFilter(PinInfo.pFilter, &FilterGraph,
-				&CaptureGraphBuilder)) {
-			return false;
-		}
-	}
-	else // It's a filter
-	{
-		if (!GetFilterGraphFromFilter((IBaseFilter*)FilterOrPinToRender,
-				&FilterGraph, &CaptureGraphBuilder)) {
-			return false;
-		}
-	}
-
-	//if(SUCCEEDED(CaptureGraphBuilder->RenderStream(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Interleaved, CaptureFilter, NULL, NullRendererVideo))){return true;}
-
-	// Build complete filter graph
-	if (RenderVideo) {
-		// Add NullRenderer filters because we want to set formats with IAMStreamConfig COM-Interface while the complete
-		// filtergraph is connected. NullRenderer filters and the samplegrabber filter accept all formats.
-		QzCComPtr<IBaseFilter> RendererVideo;
-		if (FAILED(CoCreateInstance(CLSID_NullRenderer, 0,
-				CLSCTX_INPROC_SERVER, IID_IBaseFilter, (void**)&RendererVideo))) {
-			return false;
-		}
-		if (FAILED(FilterGraph->AddFilter(RendererVideo,L"Video Null Renderer" ))) {return false;}
-		QzCComPtr<IBaseFilter> SampleGrabberVideo;
-		if(FAILED(CoCreateInstance(CLSID_SampleGrabber, 0, CLSCTX_INPROC_SERVER, IID_IBaseFilter, (void**)&SampleGrabberVideo))) {return false;}
-		if(FAILED(FilterGraph->AddFilter(SampleGrabberVideo, VIDEO_SAMPLEGRABBER_FILTER_NAME))) {return false;}
-		// Set the video samplegrabber
-		QzCComPtr<ISampleGrabber> SampleGrabber;
-		if(FAILED(SampleGrabberVideo->QueryInterface(IID_ISampleGrabber, (void**)&SampleGrabber))) {return false;}
-		AM_MEDIA_TYPE mt;
-		mt.majortype=MEDIATYPE_Video;
-		mt.subtype=GUID_NULL;
-		mt.pUnk=NULL;
-		mt.cbFormat=0;
-		if(FAILED(SampleGrabber->SetMediaType(&mt))) {return false;}
-		//render the pin or filter
-		if(FAILED(CaptureGraphBuilder->RenderStream(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Video, FilterOrPinToRender, SampleGrabberVideo, RendererVideo))) {return false;}
-	}
-
-	if(RenderAudio)
-	{
-		// Add NullRenderer filters because we want to set formats with IAMStreamConfig COM-Interface while the complete
-		// filtergraph is connected. NullRenderer filters and the SampleGrabber filter accept all formats.
-		QzCComPtr<IBaseFilter> RendererAudio;
-		CoCreateInstance(CLSID_NullRenderer, 0, CLSCTX_INPROC_SERVER, IID_IBaseFilter, (void**)&RendererAudio); //CLSID_DSoundRender for DirectSound Filter
-		FilterGraph->AddFilter(RendererAudio, L"Audio Null Renderer");
-		QzCComPtr<IBaseFilter> SampleGrabberAudio;
-		CoCreateInstance(CLSID_SampleGrabber, 0, CLSCTX_INPROC_SERVER, IID_IBaseFilter, (void**)&SampleGrabberAudio);
-		FilterGraph->AddFilter(SampleGrabberAudio, AUDIO_SAMPLEGRABBER_FILTER_NAME);
-		// Set the audio samplegrabber filter
-		QzCComPtr<ISampleGrabber> SampleGrabber;
-		SampleGrabberAudio->QueryInterface(IID_ISampleGrabber, (void**)&SampleGrabber);
-		AM_MEDIA_TYPE mt;
-		mt.majortype=MEDIATYPE_Audio;
-		mt.subtype=GUID_NULL;
-		mt.pUnk=NULL;
-		mt.cbFormat=0;
-		SampleGrabber->SetMediaType(&mt);
-
-		//Render Audio
-		if(IsPin) //if we should render a pin
-		{
-			HRESULT hr=CaptureGraphBuilder->RenderStream(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Audio, FilterOrPinToRender, SampleGrabberAudio, RendererAudio);
-			if(hr!=S_OK) {return false;}
-		}
-		// If we should render a filter
-
-		else if(FAILED(CaptureGraphBuilder->RenderStream(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Audio, FilterOrPinToRender, SampleGrabberAudio, RendererAudio)))
-		{
-			/* The avcap library doesn't provide full audio support at this time. There are only some basic audio
-			 functions implemented (not implemented: audio capture functions, ...)*/
-
-			/* Some notes about DirectShow and audio capture
-			 - Old VFW driver based capture devices don't support audio.
-			 - New WDM driver based capture devices can support audio:
-			 1. The capture filter has audio output pins which have to be connected to a sound rendering DirectShow filter
-			 2. The capture filter has crossbar support and the audio output pins are on the crossbar and have to
-			 be connected to a sound rendering DirectShow filter.
-			 3. Many capture devices (e.g. tv tuner cards) don't provide direct audio support. They have audio
-			 connectors which have to be connected to a soundcard by cable. The soundcard takes up the
-			 capture process of the audio data. In this case, a soundcard capture DirectShow filter is needed.
-			 What we do if the function above fails?? We insert a audio capture DirectShow filter in the filtergraph
-			 and connect it to the sound rendering DirectShow filter. What can we do if multiple soundcards
-			 are installed - which audio capture DirectShow filter should we use?? Normally the user has to choose the
-			 audio capture DirectShow filter. But because of the uncomplete audio implementation of the avcap library 
-			 we use the first audio capture DirectShow Filter we'll find in the system. */
-
-			/* TODO: Complete the audio functionality */
-
-			std::list<IBaseFilter*> AudioCaptureFilterList;
-			GetInstalledAudioDevices(AudioCaptureFilterList);
-			for(std::list<IBaseFilter*>::iterator Iter=AudioCaptureFilterList.begin(); Iter!=AudioCaptureFilterList.end(); Iter++)
-			{
-				FilterGraph->AddFilter((*Iter), L"AudioCaptureFilter");
-				if(SUCCEEDED(CaptureGraphBuilder->RenderStream(NULL, &MEDIATYPE_Audio, (*Iter), SampleGrabberAudio, RendererAudio)))
-				{
-					break;
-				}
-				FilterGraph->RemoveFilter((*Iter));
-			}
-			DeleteList(AudioCaptureFilterList);
-		}
-	}
-
-	return true;
-}
-
-static inline void DeleteList(std::list<IPin*> &PinList)
-{
-	for (std::list<IPin*>::iterator Iter=PinList.begin(); Iter!=PinList.end(); Iter++) {
-		if ((*Iter)!=NULL) {
-			(*Iter)->Release();
-		}
-	}
-	PinList.clear();
-}
-
-static inline void DeleteList(std::list<IBaseFilter*> &AudioCaptureFilterList)
-{
-	for (std::list<IBaseFilter*>::iterator Iter=AudioCaptureFilterList.begin(); Iter
-			!=AudioCaptureFilterList.end(); Iter++) {
-		if ((*Iter)!=NULL) {
-			(*Iter)->Release();
-		}
-	}
-	AudioCaptureFilterList.clear();
-}
-
-static inline void DeleteList(std::list<AM_MEDIA_TYPE*> &MediaTypeList)
-{
-	for (std::list<AM_MEDIA_TYPE*>::iterator Iter=MediaTypeList.begin(); Iter
-			!=MediaTypeList.end(); Iter++) {
-		DeleteMediaType(*Iter);
-	}
-	MediaTypeList.clear();
-}
-
-#endif
diff --git a/extra_lib/include/avcap/windows/SampleGrabberCallback.h b/extra_lib/include/avcap/windows/SampleGrabberCallback.h
deleted file mode 100644
index 195615d..0000000
--- a/extra_lib/include/avcap/windows/SampleGrabberCallback.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * (c) 2005, 2008 Nico Pranke <Nico.Pranke at googlemail.com>, Robin Luedtke <RobinLu at gmx.de> 
- *
- * This file is part of avcap.
- *
- * avcap 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.
- *
- * avcap 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 avcap.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* avcap is free for non-commercial use.
- * To use it in commercial endeavors, please contact Nico Pranke <Nico.Pranke at googlemail.com>.
- */
-
-#ifndef SAMPLEGRABBER_H_
-#define SAMPLEGRABBER_H_
-
-#include "QEdit.h"
-
-#include "IOBuffer.h"
-#include "avcap-export.h"
-
-namespace avcap
-{
-class DS_VidCapManager;
-
-	//! Data capture handler for DirectShow devices.
-	
-	/*! Each time new data arrives, the method
-	 * SampleCB() is called and delivers the data to the video capture 
-	 * manager set by the SetVideoCaptureManager() method.*/
-
-	class AVCAP_Export SampleGrabberCallback : public ISampleGrabberCB
-	{
-	private:
-		DS_VidCapManager* 	mVidCapMngr;
-		ISampleGrabber* 	mSampleGrabberFilter;
-		HANDLE&				mLock;
-
-	public:
-		SampleGrabberCallback(HANDLE& lock);
-		
-		~SampleGrabberCallback();
-	
-		/*! Sets the video capture manager. 
-		 * New data will be delivered to the video capture manager.
-		 * \param vidCapManager The video capture manager. */
-		void SetVideoCaptureManager(DS_VidCapManager *vidCapManager);
-	
-		/*! Sets the samplegrabber filter. 
-		 * Needed to get some information (e.g. currently used format).
-		 * \param SampleGrabberFilter The samplegrabber filter. */
-		void SetSampleGrabberFilter(ISampleGrabber *SampleGrabberFilter);
-	
-		/* Fake referance counting - This is safe because the application 
-		 * creates the object on the stack, and the object remains in scope 
-		 * throughout the lifetime of the filter graph.*/
-		STDMETHODIMP_(ULONG) AddRef() 
-			{ return 1; }
-		
-		STDMETHODIMP_(ULONG) Release() 
-			{ return 2; }
-
-		STDMETHODIMP QueryInterface(REFIID riid, void **ppvObject);
-	
-		/*! New data (captured data) arrives here and will be
-		 * delivered to the video capture manager set 
-		 * by the SetVideoCaptureManager() method. */
-		STDMETHODIMP SampleCB(double Time, IMediaSample *pSample);
-
-		STDMETHODIMP BufferCB(double Time, BYTE *pBuffer, long BufferLen);
-	
-		friend class IOBuffer;
-	};
-}
-
-#endif // SAMPLEGRABBER_H_
diff --git a/extra_lib/include/faad.h b/extra_lib/include/faad.h
deleted file mode 100644
index 5785e71..0000000
--- a/extra_lib/include/faad.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
-** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
-**  
-** 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.
-** 
-** 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, write to the Free Software 
-** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-**
-** Any non-GPL usage of this software or parts of this software is strictly
-** forbidden.
-**
-** The "appropriate copyright message" mentioned in section 2c of the GPLv2
-** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-**
-** Commercial non-GPL licensing of this software is possible.
-** For more info contact Nero AG through Mpeg4AAClicense at nero.com.
-**
-** $Id: faad.h,v 1.2 2008-12-02 18:04:42 jeanlf Exp $
-**/
-
-/* warn people for update */
-//#pragma message("please update faad2 include filename and function names!")
-
-/* Backwards compatible link */
-#include "neaacdec.h"
diff --git a/extra_lib/include/freetype/freetype/cache/ftccache.h b/extra_lib/include/freetype/freetype/cache/ftccache.h
deleted file mode 100644
index 701b13e..0000000
--- a/extra_lib/include/freetype/freetype/cache/ftccache.h
+++ /dev/null
@@ -1,304 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftccache.h                                                             */
-/*                                                                         */
-/*    FreeType internal cache interface (specification).                   */
-/*                                                                         */
-/*  Copyright 2000-2001, 2002 by                                           */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __FTCCACHE_H__
-#define __FTCCACHE_H__
-
-
-/* define to allow cache lookup inlining */
-#define  FTC_CACHE_USE_INLINE
-
-
-FT_BEGIN_HEADER
-
-  /* handle to cache object */
-  typedef struct FTC_CacheRec_*  FTC_Cache;
-
-  /* handle to cache class */
-  typedef const struct FTC_Cache_ClassRec_*  FTC_Cache_Class;
-
-  /* handle to cache node family */
-  typedef struct FTC_FamilyRec_*  FTC_Family;
-
-  /* handle to cache root query */
-  typedef struct FTC_QueryRec_*  FTC_Query;
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*****                                                               *****/
-  /*****                   CACHE NODE DEFINITIONS                      *****/
-  /*****                                                               *****/
-  /*************************************************************************/
-  /*************************************************************************/
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Each cache controls one or more cache nodes.  Each node is part of    */
-  /* the global_lru list of the manager.  Its `data' field however is used */
-  /* as a reference count for now.                                         */
-  /*                                                                       */
-  /* A node can be anything, depending on the type of information held by  */
-  /* the cache.  It can be an individual glyph image, a set of bitmaps     */
-  /* glyphs for a given size, some metrics, etc.                           */
-  /*                                                                       */
-  /*************************************************************************/
-
-  /* structure size should be 20 bytes on 32-bits machines */
-  typedef struct  FTC_NodeRec_
-  {
-    FTC_Node   mru_next;     /* circular mru list pointer           */
-    FTC_Node   mru_prev;     /* circular mru list pointer           */
-    FTC_Node   link;         /* used for hashing                    */
-    FT_UInt32  hash;         /* used for hashing too                */
-    FT_UShort  fam_index;    /* index of family the node belongs to */
-    FT_Short   ref_count;    /* reference count for this node       */
-
-  } FTC_NodeRec;
-
-
-#define FTC_NODE( x )    ( (FTC_Node)(x) )
-#define FTC_NODE_P( x )  ( (FTC_Node*)(x) )
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* These functions are exported so that they can be called from          */
-  /* user-provided cache classes; otherwise, they are really part of the   */
-  /* cache sub-system internals.                                           */
-  /*                                                                       */
-
-  /* can be used as a FTC_Node_DoneFunc */
-  FT_EXPORT( void )
-  ftc_node_done( FTC_Node   node,
-                 FTC_Cache  cache );
-
-  /* reserved for manager's use */
-  FT_EXPORT( void )
-  ftc_node_destroy( FTC_Node     node,
-                    FTC_Manager  manager );
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*****                                                               *****/
-  /*****                   CACHE QUERY DEFINITIONS                     *****/
-  /*****                                                               *****/
-  /*************************************************************************/
-  /*************************************************************************/
-
-  /* A structure modelling a cache node query.  The following fields must  */
-  /* all be set by the @FTC_Family_CompareFunc method of a cache's family  */
-  /* list.                                                                 */
-  /*                                                                       */
-  typedef struct  FTC_QueryRec_
-  {
-    FTC_Family  family;
-    FT_UFast    hash;
-
-  } FTC_QueryRec;
-
-
-#define FTC_QUERY( x )    ( (FTC_Query)(x) )
-#define FTC_QUERY_P( x )  ( (FTC_Query*)(x) )
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*****                                                               *****/
-  /*****                   CACHE FAMILY DEFINITIONS                    *****/
-  /*****                                                               *****/
-  /*************************************************************************/
-  /*************************************************************************/
-
-  typedef struct  FTC_FamilyRec_
-  {
-    FT_LruNodeRec  lru;
-    FTC_Cache      cache;
-    FT_UInt        num_nodes;
-    FT_UInt        fam_index;
-
-  } FTC_FamilyRec;
-
-
-#define FTC_FAMILY( x )    ( (FTC_Family)(x) )
-#define FTC_FAMILY_P( x )  ( (FTC_Family*)(x) )
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* These functions are exported so that they can be called from          */
-  /* user-provided cache classes; otherwise, they are really part of the   */
-  /* cache sub-system internals.                                           */
-  /*                                                                       */
-
-  /* must be called by any FTC_Node_InitFunc routine */
-  FT_EXPORT( FT_Error )
-  ftc_family_init( FTC_Family  family,
-                   FTC_Query   query,
-                   FTC_Cache   cache );
-
-
-  /* can be used as a FTC_Family_DoneFunc; otherwise, must be called */
-  /* by any family finalizer function                                */
-  FT_EXPORT( void )
-  ftc_family_done( FTC_Family  family );
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*****                                                               *****/
-  /*****                       CACHE DEFINITIONS                       *****/
-  /*****                                                               *****/
-  /*************************************************************************/
-  /*************************************************************************/
-
-  /* each cache really implements a dynamic hash table to manage its nodes */
-  typedef struct  FTC_CacheRec_
-  {
-    FTC_Manager          manager;
-    FT_Memory            memory;
-    FTC_Cache_Class      clazz;
-
-    FT_UInt              cache_index;  /* in manager's table         */
-    FT_Pointer           cache_data;   /* used by cache node methods */
-
-    FT_UFast             p;
-    FT_UFast             mask;
-    FT_Long              slack;
-    FTC_Node*            buckets;
-
-    FT_LruList_ClassRec  family_class;
-    FT_LruList           families;
-
-  } FTC_CacheRec;
-
-
-#define FTC_CACHE( x )    ( (FTC_Cache)(x) )
-#define FTC_CACHE_P( x )  ( (FTC_Cache*)(x) )
-
-
-  /* initialize a given cache */
-  typedef FT_Error
-  (*FTC_Cache_InitFunc)( FTC_Cache  cache );
-
-  /* clear a cache */
-  typedef void
-  (*FTC_Cache_ClearFunc)( FTC_Cache  cache );
-
-  /* finalize a given cache */
-  typedef void
-  (*FTC_Cache_DoneFunc)( FTC_Cache  cache );
-
-
-  typedef FT_Error
-  (*FTC_Family_InitFunc)( FTC_Family  family,
-                          FTC_Query   query,
-                          FTC_Cache   cache );
-
-  typedef FT_Int
-  (*FTC_Family_CompareFunc)( FTC_Family  family,
-                             FTC_Query   query );
-
-  typedef void
-  (*FTC_Family_DoneFunc)( FTC_Family  family,
-                          FTC_Cache   cache );
-
-  /* initialize a new cache node */
-  typedef FT_Error
-  (*FTC_Node_InitFunc)( FTC_Node    node,
-                        FT_Pointer  type,
-                        FTC_Cache   cache );
-
-  /* compute the weight of a given cache node */
-  typedef FT_ULong
-  (*FTC_Node_WeightFunc)( FTC_Node   node,
-                          FTC_Cache  cache );
-
-  /* compare a node to a given key pair */
-  typedef FT_Bool
-  (*FTC_Node_CompareFunc)( FTC_Node    node,
-                           FT_Pointer  key,
-                           FTC_Cache   cache );
-
-  /* finalize a given cache node */
-  typedef void
-  (*FTC_Node_DoneFunc)( FTC_Node   node,
-                        FTC_Cache  cache );
-
-
-  typedef struct  FTC_Cache_ClassRec_
-  {
-    FT_UInt                 cache_size;
-    FTC_Cache_InitFunc      cache_init;
-    FTC_Cache_ClearFunc     cache_clear;
-    FTC_Cache_DoneFunc      cache_done;
-
-    FT_UInt                 family_size;
-    FTC_Family_InitFunc     family_init;
-    FTC_Family_CompareFunc  family_compare;
-    FTC_Family_DoneFunc     family_done;
-
-    FT_UInt                 node_size;
-    FTC_Node_InitFunc       node_init;
-    FTC_Node_WeightFunc     node_weight;
-    FTC_Node_CompareFunc    node_compare;
-    FTC_Node_DoneFunc       node_done;
-
-  } FTC_Cache_ClassRec;
-
-
-  /* */
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* These functions are exported so that they can be called from          */
-  /* user-provided cache classes; otherwise, they are really part of the   */
-  /* cache sub-system internals.                                           */
-  /*                                                                       */
-
-  /* can be used directly as FTC_Cache_DoneFunc(), or called by custom */
-  /* cache finalizers                                                  */
-  FT_EXPORT( void )
-  ftc_cache_done( FTC_Cache  cache );
-
-  /* can be used directly as FTC_Cache_ClearFunc(), or called by custom */
-  /* cache clear routines                                               */
-  FT_EXPORT( void )
-  ftc_cache_clear( FTC_Cache  cache );
-
-  /* initalize the hash table within the cache */
-  FT_EXPORT( FT_Error )
-  ftc_cache_init( FTC_Cache  cache );
-
-  /* can be called when the key's hash value has been computed */
-  FT_EXPORT( FT_Error )
-  ftc_cache_lookup( FTC_Cache  cache,
-                    FTC_Query  query,
-                    FTC_Node  *anode );
-
- /* */
-
-FT_END_HEADER
-
-
-#endif /* __FTCCACHE_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/cache/ftccmap.h b/extra_lib/include/freetype/freetype/cache/ftccmap.h
deleted file mode 100644
index a41989b..0000000
--- a/extra_lib/include/freetype/freetype/cache/ftccmap.h
+++ /dev/null
@@ -1,216 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftccmap.h                                                              */
-/*                                                                         */
-/*    FreeType charmap cache (specification).                              */
-/*                                                                         */
-/*  Copyright 2000-2001, 2003 by                                           */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __FTCCMAP_H__
-#define __FTCCMAP_H__
-
-#include <ft2build.h>
-#include FT_CACHE_H
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    cache_subsystem                                                    */
-  /*                                                                       */
-  /*************************************************************************/
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @type:                                                                */
-  /*    FTC_CMapCache                                                      */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    An opaque handle used to manager a charmap cache.  This cache is   */
-  /*    to hold character codes -> glyph indices mappings.                 */
-  /*                                                                       */
-  typedef struct FTC_CMapCacheRec_*  FTC_CMapCache;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @type:                                                                */
-  /*    FTC_CMapDesc                                                       */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A handle to an @FTC_CMapDescRec structure used to describe a given */
-  /*    charmap in a charmap cache.                                        */
-  /*                                                                       */
-  /*    Each @FTC_CMapDesc describes which charmap (of which @FTC_FaceID)  */
-  /*    we want to use in @FTC_CMapCache_Lookup.                           */
-  /*                                                                       */
-  typedef struct FTC_CMapDescRec_*  FTC_CMapDesc;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @enum:                                                                */
-  /*    FTC_CMapType                                                       */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    The list of valid @FTC_CMapDesc types.  They indicate how we want  */
-  /*    to address a charmap within an @FTC_FaceID.                        */
-  /*                                                                       */
-  /* @values:                                                              */
-  /*    FTC_CMAP_BY_INDEX ::                                               */
-  /*      Address a charmap by its index in the corresponding @FT_Face.    */
-  /*                                                                       */
-  /*    FTC_CMAP_BY_ENCODING ::                                            */
-  /*      Use a @FT_Face charmap that corresponds to a given encoding.     */
-  /*                                                                       */
-  /*    FTC_CMAP_BY_ID ::                                                  */
-  /*      Use an @FT_Face charmap that corresponds to a given              */
-  /*      (platform,encoding) ID.  See @FTC_CMapIdRec.                     */
-  /*                                                                       */
-  typedef enum  FTC_CMapType_
-  {
-    FTC_CMAP_BY_INDEX    = 0,
-    FTC_CMAP_BY_ENCODING = 1,
-    FTC_CMAP_BY_ID       = 2
-
-  } FTC_CMapType;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @struct:                                                              */
-  /*    FTC_CMapIdRec                                                      */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A short structure to identify a charmap by a (platform,encoding)   */
-  /*    pair of values.                                                    */
-  /*                                                                       */
-  /* @fields:                                                              */
-  /*    platform :: The platform ID.                                       */
-  /*                                                                       */
-  /*    encoding :: The encoding ID.                                       */
-  /*                                                                       */
-  typedef struct  FTC_CMapIdRec_
-  {
-    FT_UInt  platform;
-    FT_UInt  encoding;
-
-  } FTC_CMapIdRec;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @struct:                                                              */
-  /*    FTC_CMapDescRec                                                    */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A structure to describe a given charmap to @FTC_CMapCache.         */
-  /*                                                                       */
-  /* @fields:                                                              */
-  /*    face_id    :: @FTC_FaceID of the face this charmap belongs to.     */
-  /*                                                                       */
-  /*    type       :: The type of charmap, see @FTC_CMapType.              */
-  /*                                                                       */
-  /*    u.index    :: For @FTC_CMAP_BY_INDEX types, this is the charmap    */
-  /*                  index (within a @FT_Face) we want to use.            */
-  /*                                                                       */
-  /*    u.encoding :: For @FTC_CMAP_BY_ENCODING types, this is the charmap */
-  /*                  encoding we want to use. see @FT_Encoding.           */
-  /*                                                                       */
-  /*    u.id       :: For @FTC_CMAP_BY_ID types, this is the               */
-  /*                  (platform,encoding) pair we want to use. see         */
-  /*                  @FTC_CMapIdRec and @FT_CharMapRec.                   */
-  /*                                                                       */
-  typedef struct  FTC_CMapDescRec_
-  {
-    FTC_FaceID    face_id;
-    FTC_CMapType  type;
-
-    union
-    {
-      FT_UInt        index;
-      FT_Encoding    encoding;
-      FTC_CMapIdRec  id;
-
-    } u;
-
-  } FTC_CMapDescRec;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @function:                                                            */
-  /*    FTC_CMapCache_New                                                  */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    Creates a new charmap cache.                                       */
-  /*                                                                       */
-  /* @input:                                                               */
-  /*    manager :: A handle to the cache manager.                          */
-  /*                                                                       */
-  /* @output:                                                              */
-  /*    acache  :: A new cache handle.  NULL in case of error.             */
-  /*                                                                       */
-  /* @return:                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* @note:                                                                */
-  /*    Like all other caches, this one will be destroyed with the cache   */
-  /*    manager.                                                           */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FTC_CMapCache_New( FTC_Manager     manager,
-                     FTC_CMapCache  *acache );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @function:                                                            */
-  /*    FTC_CMapCache_Lookup                                               */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    Translates a character code into a glyph index, using the charmap  */
-  /*    cache.                                                             */
-  /*                                                                       */
-  /* @input:                                                               */
-  /*    cache     :: A charmap cache handle.                               */
-  /*                                                                       */
-  /*    cmap_desc :: A charmap descriptor handle.                          */
-  /*                                                                       */
-  /*    char_code :: The character code (in the corresponding charmap).    */
-  /*                                                                       */
-  /* @return:                                                              */
-  /*    Glyph index.  0 means "no glyph".                                  */
-  /*                                                                       */
-  /* @note:                                                                */
-  /*    This function doesn't return @FTC_Node handles, since there is no  */
-  /*    real use for them with typical uses of charmaps.                   */
-  /*                                                                       */
-  FT_EXPORT( FT_UInt )
-  FTC_CMapCache_Lookup( FTC_CMapCache  cache,
-                        FTC_CMapDesc   cmap_desc,
-                        FT_UInt32      char_code );
-
-  /* */
-
-
-FT_END_HEADER
-
-
-#endif /* __FTCCMAP_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/cache/ftcglyph.h b/extra_lib/include/freetype/freetype/cache/ftcglyph.h
deleted file mode 100644
index ee72c33..0000000
--- a/extra_lib/include/freetype/freetype/cache/ftcglyph.h
+++ /dev/null
@@ -1,191 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftcglyph.h                                                             */
-/*                                                                         */
-/*    FreeType abstract glyph cache (specification).                       */
-/*                                                                         */
-/*  Copyright 2000-2001, 2003 by                                           */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Important: The functions defined in this file are only used to        */
-  /*            implement an abstract glyph cache class.  You need to      */
-  /*            provide additional logic to implement a complete cache.    */
-  /*            For example, see `ftcimage.h' and `ftcimage.c' which       */
-  /*            implement a FT_Glyph cache based on this code.             */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*********                                                       *********/
-  /*********             WARNING, THIS IS BETA CODE.               *********/
-  /*********                                                       *********/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-#ifndef __FTCGLYPH_H__
-#define __FTCGLYPH_H__
-
-
-#include <ft2build.h>
-#include FT_CACHE_H
-#include FT_CACHE_MANAGER_H
-
-
-FT_BEGIN_HEADER
-
-
-  /* each glyph set is characterized by a "glyph set type" which must be */
-  /* defined by sub-classes                                              */
-  typedef struct FTC_GlyphFamilyRec_*  FTC_GlyphFamily;
-
-  /* handle to a glyph cache node */
-  typedef struct FTC_GlyphNodeRec_*  FTC_GlyphNode;
-
-
-  /* size should be 24 + chunk size on 32-bit machines;                 */
-  /* note that the node's hash is ((gfam->hash << 16) | glyph_index) -- */
-  /* this _must_ be set properly by the glyph node initializer          */
-  /*                                                                    */
-  typedef struct  FTC_GlyphNodeRec_
-  {
-    FTC_NodeRec   node;
-    FT_UShort     item_count;
-    FT_UShort     item_start;
-
-  } FTC_GlyphNodeRec;
-
-
-#define FTC_GLYPH_NODE( x )    ( (FTC_GlyphNode)(x) )
-#define FTC_GLYPH_NODE_P( x )  ( (FTC_GlyphNode*)(x) )
-
-
-  typedef struct  FTC_GlyphQueryRec_
-  {
-    FTC_QueryRec  query;
-    FT_UInt       gindex;
-
-  } FTC_GlyphQueryRec, *FTC_GlyphQuery;
-
-
-#define FTC_GLYPH_QUERY( x )  ( (FTC_GlyphQuery)(x) )
-
-
-  /* a glyph set is used to categorize glyphs of a given type */
-  typedef struct  FTC_GlyphFamilyRec_
-  {
-    FTC_FamilyRec  family;
-    FT_UInt32      hash;
-    FT_UInt        item_total;   /* total number of glyphs in family */
-    FT_UInt        item_count;   /* number of glyph items per node   */
-
-  } FTC_GlyphFamilyRec;
-
-
-#define FTC_GLYPH_FAMILY( x )         ( (FTC_GlyphFamily)(x) )
-#define FTC_GLYPH_FAMILY_P( x )       ( (FTC_GlyphFamily*)(x) )
-
-#define FTC_GLYPH_FAMILY_MEMORY( x )  FTC_FAMILY(x)->cache->memory
-
-
-  /* each glyph node contains a 'chunk' of glyph items; */
-  /* translate a glyph index into a chunk index         */
-#define FTC_GLYPH_FAMILY_CHUNK( gfam, gindex )                  \
-          ( ( gindex ) / FTC_GLYPH_FAMILY( gfam )->item_count )
-
-  /* find a glyph index's chunk, and return its start index */
-#define FTC_GLYPH_FAMILY_START( gfam, gindex )       \
-          ( FTC_GLYPH_FAMILY_CHUNK( gfam, gindex ) * \
-            FTC_GLYPH_FAMILY( gfam )->item_count )
-
-  /* compute a glyph request's hash value */
-#define FTC_GLYPH_FAMILY_HASH( gfam, gindex )                          \
-          ( (FT_UFast)(                                                \
-              ( FTC_GLYPH_FAMILY( gfam )->hash << 16 ) |               \
-              ( FTC_GLYPH_FAMILY_CHUNK( gfam, gindex ) & 0xFFFFU ) ) )
-
-  /* must be called in an FTC_Family_CompareFunc to update the query */
-  /* whenever a glyph set is matched in the lookup, or when it       */
-  /* is created                                                      */
-#define FTC_GLYPH_FAMILY_FOUND( gfam, gquery )                            \
-          do                                                              \
-          {                                                               \
-            FTC_QUERY( gquery )->family = FTC_FAMILY( gfam );             \
-            FTC_QUERY( gquery )->hash =                                   \
-              FTC_GLYPH_FAMILY_HASH( gfam,                                \
-                                     FTC_GLYPH_QUERY( gquery )->gindex ); \
-          } while ( 0 )
-
-  /* retrieve glyph index of glyph node */
-#define FTC_GLYPH_NODE_GINDEX( x )                                  \
-          ( (FT_UInt)( FTC_GLYPH_NODE( x )->node.hash & 0xFFFFU ) )
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* These functions are exported so that they can be called from          */
-  /* user-provided cache classes; otherwise, they are really part of the   */
-  /* cache sub-system internals.                                           */
-  /*                                                                       */
-
-  /* must be called by derived FTC_Node_InitFunc routines */
-  FT_EXPORT( void )
-  ftc_glyph_node_init( FTC_GlyphNode    node,
-                       FT_UInt          gindex,  /* glyph index for node */
-                       FTC_GlyphFamily  gfam );
-
-  /* returns TRUE iff the query's glyph index correspond to the node;  */
-  /* this assumes that the "family" and "hash" fields of the query are */
-  /* already correctly set                                             */
-  FT_EXPORT( FT_Bool )
-  ftc_glyph_node_compare( FTC_GlyphNode   gnode,
-                          FTC_GlyphQuery  gquery );
-
-  /* must be called by derived FTC_Node_DoneFunc routines */
-  FT_EXPORT( void )
-  ftc_glyph_node_done( FTC_GlyphNode  node,
-                       FTC_Cache      cache );
-
-
-  /* must be called by derived FTC_Family_InitFunc; */
-  /* calls "ftc_family_init"                        */
-  FT_EXPORT( FT_Error )
-  ftc_glyph_family_init( FTC_GlyphFamily  gfam,
-                         FT_UInt32        hash,
-                         FT_UInt          item_count,
-                         FT_UInt          item_total,
-                         FTC_GlyphQuery   gquery,
-                         FTC_Cache        cache );
-
-  FT_EXPORT( void )
-  ftc_glyph_family_done( FTC_GlyphFamily  gfam );
-
-
-  /* */
- 
-FT_END_HEADER
-
-
-#endif /* __FTCGLYPH_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/cache/ftcimage.h b/extra_lib/include/freetype/freetype/cache/ftcimage.h
deleted file mode 100644
index 2d0b780..0000000
--- a/extra_lib/include/freetype/freetype/cache/ftcimage.h
+++ /dev/null
@@ -1,313 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftcimage.h                                                             */
-/*                                                                         */
-/*    FreeType Image cache (specification).                                */
-/*                                                                         */
-/*  Copyright 2000-2001, 2002, 2003 by                                     */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Each image cache really manages FT_Glyph objects.                     */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-#ifndef __FTCIMAGE_H__
-#define __FTCIMAGE_H__
-
-
-#include <ft2build.h>
-#include FT_CACHE_H
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    cache_subsystem                                                    */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*****                                                               *****/
-  /*****                       IMAGE CACHE OBJECT                      *****/
-  /*****                                                               *****/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-
-
- /**************************************************************************
-  *
-  * @struct:
-  *   FTC_ImageTypeRec
-  *
-  * @description:
-  *   A simple structure used to describe the type of glyph image to be
-  *   loaded into the cache.
-  *
-  * @fields:
-  *   font  :: An @FTC_FontRec used to describe the glyph's face and size.
-  *
-  *   flags :: The load flags to be applied when loading the glyph; see
-  *            the @FT_LOAD_XXX constants for details.
-  *
-  * @note:
-  *   This type completely replaces the @FTC_Image_Desc structure which is
-  *   now obsolete.
-  */
-  typedef struct  FTC_ImageTypeRec_
-  {
-    FTC_FontRec  font;
-    FT_Int32     flags;
-
-  } FTC_ImageTypeRec;
-
-  typedef struct FTC_ImageTypeRec_*   FTC_ImageType;
-
- /* */
-
-#define FTC_IMAGE_TYPE_COMPARE( d1, d2 )                    \
-          ( FTC_FONT_COMPARE( &(d1)->font, &(d2)->font ) && \
-            (d1)->flags == (d2)->flags                   )
-
-#define FTC_IMAGE_TYPE_HASH( d )                    \
-          (FT_UFast)( FTC_FONT_HASH( &(d)->font ) ^ \
-                      ( (d)->flags << 4 )         )
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FTC_ImageCache                                                     */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A handle to an glyph image cache object.  They are designed to     */
-  /*    hold many distinct glyph images while not exceeding a certain      */
-  /*    memory threshold.                                                  */
-  /*                                                                       */
-  typedef struct FTC_ImageCacheRec_*  FTC_ImageCache;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FTC_ImageCache_New                                                 */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Creates a new glyph image cache.                                   */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    manager :: The parent manager for the image cache.                 */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    acache  :: A handle to the new glyph image cache object.           */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FTC_ImageCache_New( FTC_Manager      manager,
-                      FTC_ImageCache  *acache );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FTC_ImageCache_Lookup                                              */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Retrieves a given glyph image from a glyph image cache.            */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    cache  :: A handle to the source glyph image cache.                */
-  /*                                                                       */
-  /*    type   :: A pointer to a glyph image type descriptor.              */
-  /*                                                                       */
-  /*    gindex :: The glyph index to retrieve.                             */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    aglyph :: The corresponding @FT_Glyph object.  0 in case of        */
-  /*              failure.                                                 */
-  /*                                                                       */
-  /*    anode  :: Used to return the address of of the corresponding cache */
-  /*              node after incrementing its reference count (see note    */
-  /*              below).                                                  */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The returned glyph is owned and managed by the glyph image cache.  */
-  /*    Never try to transform or discard it manually!  You can however    */
-  /*    create a copy with @FT_Glyph_Copy and modify the new one.          */
-  /*                                                                       */
-  /*    If "anode" is _not_ NULL, it receives the address of the cache     */
-  /*    node containing the glyph image, after increasing its reference    */
-  /*    count.  This ensures that the node (as well as the FT_Glyph) will  */
-  /*    always be kept in the cache until you call @FTC_Node_Unref to      */
-  /*    "release" it.                                                      */
-  /*                                                                       */
-  /*    If "anode" is NULL, the cache node is left unchanged, which means  */
-  /*    that the FT_Glyph could be flushed out of the cache on the next    */
-  /*    call to one of the caching sub-system APIs.  Don't assume that it  */
-  /*    is persistent!                                                     */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FTC_ImageCache_Lookup( FTC_ImageCache  cache,
-                         FTC_ImageType   type,
-                         FT_UInt         gindex,
-                         FT_Glyph       *aglyph,
-                         FTC_Node       *anode );
-
-  /* */
-
-#define ftc_image_format( x )  ( (x) & 7 )
-
-
-#define ftc_image_format_bitmap    0x0000
-#define ftc_image_format_outline   0x0001
-
-#define ftc_image_format_mask      0x000F
-
-#define ftc_image_flag_monochrome  0x0010
-#define ftc_image_flag_unhinted    0x0020
-#define ftc_image_flag_autohinted  0x0040
-#define ftc_image_flag_unscaled    0x0080
-#define ftc_image_flag_no_sbits    0x0100
-
-  /* monochrome bitmap */
-#define ftc_image_mono             ftc_image_format_bitmap | \
-                                   ftc_image_flag_monochrome
-
-  /* anti-aliased bitmap */
-#define ftc_image_grays            ftc_image_format_bitmap
-
-  /* scaled outline */
-#define ftc_image_outline          ftc_image_format_outline
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FTC_Image_Desc                                                     */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    THIS TYPE IS DEPRECATED.  Use @FTC_ImageTypeRec instead.           */
-  /*                                                                       */
-  /*    A simple structure used to describe a given glyph image category.  */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    font       :: An @FTC_FontRec used to describe the glyph's face    */
-  /*                  and size.                                            */
-  /*                                                                       */
-  /*    image_type :: The glyph image's type.                              */
-  /*                                                                       */
-  typedef struct  FTC_Image_Desc_
-  {
-    FTC_FontRec  font;
-    FT_UInt      image_type;
-
-  } FTC_Image_Desc;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FTC_Image_Cache                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    THIS TYPE IS DEPRECATED.  Use @FTC_ImageCache instead.             */
-  /*                                                                       */
-  typedef FTC_ImageCache  FTC_Image_Cache;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FTC_Image_Cache_New                                                */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    THIS FUNCTION IS DEPRECATED.  Use @FTC_ImageCache_New instead.     */
-  /*                                                                       */
-  /*    Creates a new glyph image cache.                                   */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    manager :: The parent manager for the image cache.                 */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    acache  :: A handle to the new glyph image cache object.           */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FTC_Image_Cache_New( FTC_Manager       manager,
-                       FTC_Image_Cache  *acache );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FTC_Image_Cache_Lookup                                             */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    THIS FUNCTION IS DEPRECATED.  Use @FTC_ImageCache_Lookup instead.  */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    cache  :: A handle to the source glyph image cache.                */
-  /*                                                                       */
-  /*    desc   :: A pointer to a glyph image descriptor.                   */
-  /*                                                                       */
-  /*    gindex :: The glyph index to retrieve.                             */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    aglyph :: The corresponding @FT_Glyph object.  0 in case of        */
-  /*              failure.                                                 */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The returned glyph is owned and managed by the glyph image cache.  */
-  /*    Never try to transform or discard it manually!  You can however    */
-  /*    create a copy with @FT_Glyph_Copy and modify the new one.          */
-  /*                                                                       */
-  /*    Because the glyph image cache limits the total amount of memory    */
-  /*    taken by the glyphs it holds, the returned glyph might disappear   */
-  /*    on a later invocation of this function!  It is a cache after       */
-  /*    all...                                                             */
-  /*                                                                       */
-  /*    Use this function to "lock" the glyph as long as it is needed.     */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FTC_Image_Cache_Lookup( FTC_Image_Cache  cache,
-                          FTC_Image_Desc*  desc,
-                          FT_UInt          gindex,
-                          FT_Glyph        *aglyph );
-
- /* */
-
-FT_END_HEADER
-
-
-#endif /* __FTCIMAGE_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/cache/ftcmanag.h b/extra_lib/include/freetype/freetype/cache/ftcmanag.h
deleted file mode 100644
index 97c7759..0000000
--- a/extra_lib/include/freetype/freetype/cache/ftcmanag.h
+++ /dev/null
@@ -1,244 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftcmanag.h                                                             */
-/*                                                                         */
-/*    FreeType Cache Manager (specification).                              */
-/*                                                                         */
-/*  Copyright 2000-2001 by                                                 */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* A cache manager is in charge of the following:                        */
-  /*                                                                       */
-  /*  - Maintain a mapping between generic FTC_FaceIDs and live FT_Face    */
-  /*    objects.  The mapping itself is performed through a user-provided  */
-  /*    callback.  However, the manager maintains a small cache of FT_Face */
-  /*    and FT_Size objects in order to speed up things considerably.      */
-  /*                                                                       */
-  /*  - Manage one or more cache objects.  Each cache is in charge of      */
-  /*    holding a varying number of `cache nodes'.  Each cache node        */
-  /*    represents a minimal amount of individually accessible cached      */
-  /*    data.  For example, a cache node can be an FT_Glyph image          */
-  /*    containing a vector outline, or some glyph metrics, or anything    */
-  /*    else.                                                              */
-  /*                                                                       */
-  /*    Each cache node has a certain size in bytes that is added to the   */
-  /*    total amount of `cache memory' within the manager.                 */
-  /*                                                                       */
-  /*    All cache nodes are located in a global LRU list, where the oldest */
-  /*    node is at the tail of the list.                                   */
-  /*                                                                       */
-  /*    Each node belongs to a single cache, and includes a reference      */
-  /*    count to avoid destroying it (due to caching).                     */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*********                                                       *********/
-  /*********             WARNING, THIS IS BETA CODE.               *********/
-  /*********                                                       *********/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-#ifndef __FTCMANAG_H__
-#define __FTCMANAG_H__
-
-
-#include <ft2build.h>
-#include FT_CACHE_H
-#include FT_CACHE_INTERNAL_LRU_H
-#include FT_CACHE_INTERNAL_CACHE_H
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    cache_subsystem                                                    */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-#define FTC_MAX_FACES_DEFAULT  2
-#define FTC_MAX_SIZES_DEFAULT  4
-#define FTC_MAX_BYTES_DEFAULT  200000L  /* ~200kByte by default */
-
-  /* maximum number of caches registered in a single manager */
-#define FTC_MAX_CACHES         16
-
-
-  typedef struct  FTC_FamilyEntryRec_
-  {
-    FTC_Family  family;
-    FTC_Cache   cache;
-    FT_UInt     index;
-    FT_UInt     link;
-
-  } FTC_FamilyEntryRec, *FTC_FamilyEntry;
-
-
-#define FTC_FAMILY_ENTRY_NONE  ( (FT_UInt)-1 )
-
-
-  typedef struct  FTC_FamilyTableRec_
-  {
-    FT_UInt          count;
-    FT_UInt          size;
-    FTC_FamilyEntry  entries;
-    FT_UInt          free;
-  
-  } FTC_FamilyTableRec, *FTC_FamilyTable;
-
-
-  FT_EXPORT( FT_Error )
-  ftc_family_table_alloc( FTC_FamilyTable   table,
-                          FT_Memory         memory,
-                          FTC_FamilyEntry  *aentry );
-
-  FT_EXPORT( void )
-  ftc_family_table_free( FTC_FamilyTable  table,
-                         FT_UInt          idx );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FTC_ManagerRec                                                     */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    The cache manager structure.                                       */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    library      :: A handle to a FreeType library instance.           */
-  /*                                                                       */
-  /*    faces_list   :: The lru list of @FT_Face objects in the cache.     */
-  /*                                                                       */
-  /*    sizes_list   :: The lru list of @FT_Size objects in the cache.     */
-  /*                                                                       */
-  /*    max_weight   :: The maximum cache pool weight.                     */
-  /*                                                                       */
-  /*    cur_weight   :: The current cache pool weight.                     */
-  /*                                                                       */
-  /*    num_nodes    :: The current number of nodes in the manager.        */
-  /*                                                                       */
-  /*    nodes_list   :: The global lru list of all cache nodes.            */
-  /*                                                                       */
-  /*    caches       :: A table of installed/registered cache objects.     */
-  /*                                                                       */
-  /*    request_data :: User-provided data passed to the requester.        */
-  /*                                                                       */
-  /*    request_face :: User-provided function used to implement a mapping */
-  /*                    between abstract @FTC_FaceID values and real       */
-  /*                    @FT_Face objects.                                  */
-  /*                                                                       */
-  /*    families     :: Global table of families.                          */
-  /*                                                                       */
-  typedef struct  FTC_ManagerRec_
-  {
-    FT_Library          library;
-    FT_LruList          faces_list;
-    FT_LruList          sizes_list;
-
-    FT_ULong            max_weight;
-    FT_ULong            cur_weight;
-    
-    FT_UInt             num_nodes;
-    FTC_Node            nodes_list;
-    
-    FTC_Cache           caches[FTC_MAX_CACHES];
-
-    FT_Pointer          request_data;
-    FTC_Face_Requester  request_face;
-
-    FTC_FamilyTableRec  families;
-
-  } FTC_ManagerRec;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FTC_Manager_Compress                                               */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This function is used to check the state of the cache manager if   */
-  /*    its `num_bytes' field is greater than its `max_bytes' field.  It   */
-  /*    will flush as many old cache nodes as possible (ignoring cache     */
-  /*    nodes with a non-zero reference count).                            */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    manager :: A handle to the cache manager.                          */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    Client applications should not call this function directly.  It is */
-  /*    normally invoked by specific cache implementations.                */
-  /*                                                                       */
-  /*    The reason this function is exported is to allow client-specific   */
-  /*    cache classes.                                                     */
-  /*                                                                       */
-  FT_EXPORT( void )
-  FTC_Manager_Compress( FTC_Manager  manager );
-
-
-  /* this must be used internally for the moment */
-  FT_EXPORT( FT_Error )
-  FTC_Manager_Register_Cache( FTC_Manager      manager,
-                              FTC_Cache_Class  clazz,
-                              FTC_Cache       *acache );
-
-
-  /* can be called to increment a node's reference count */
-  FT_EXPORT( void )
-  FTC_Node_Ref( FTC_Node     node,
-                FTC_Manager  manager );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FTC_Node_Unref                                                     */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Decrement a cache node's internal reference count.  When the count */
-  /*    reaches 0, it is not destroyed but becomes eligible for subsequent */
-  /*    cache flushes.                                                     */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    node    :: The cache node handle.                                  */
-  /*                                                                       */
-  /*    manager :: The cache manager handle.                               */
-  /*                                                                       */
-  FT_EXPORT( void )
-  FTC_Node_Unref( FTC_Node     node,
-                  FTC_Manager  manager );
-
- /* */
-
-FT_END_HEADER
-
-
-#endif /* __FTCMANAG_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/cache/ftcsbits.h b/extra_lib/include/freetype/freetype/cache/ftcsbits.h
deleted file mode 100644
index 6f8ef99..0000000
--- a/extra_lib/include/freetype/freetype/cache/ftcsbits.h
+++ /dev/null
@@ -1,275 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftcsbits.h                                                             */
-/*                                                                         */
-/*    A small-bitmap cache (specification).                                */
-/*                                                                         */
-/*  Copyright 2000-2001, 2002 by                                           */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __FTCSBITS_H__
-#define __FTCSBITS_H__
-
-
-#include <ft2build.h>
-#include FT_CACHE_H
-#include FT_CACHE_IMAGE_H
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    cache_subsystem                                                    */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FTC_SBit                                                           */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A handle to a small bitmap descriptor.  See the @FTC_SBitRec       */
-  /*    structure for details.                                             */
-  /*                                                                       */
-  typedef struct FTC_SBitRec_*  FTC_SBit;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FTC_SBitRec                                                        */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A very compact structure used to describe a small glyph bitmap.    */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    width     :: The bitmap width in pixels.                           */
-  /*                                                                       */
-  /*    height    :: The bitmap height in pixels.                          */
-  /*                                                                       */
-  /*    left      :: The horizontal distance from the pen position to the  */
-  /*                 left bitmap border (a.k.a. `left side bearing', or    */
-  /*                 `lsb').                                               */
-  /*                                                                       */
-  /*    top       :: The vertical distance from the pen position (on the   */
-  /*                 baseline) to the upper bitmap border (a.k.a. `top     */
-  /*                 side bearing').  The distance is positive for upwards */
-  /*                 Y coordinates.                                        */
-  /*                                                                       */
-  /*    format    :: The format of the glyph bitmap (monochrome or gray).  */
-  /*                                                                       */
-  /*    max_grays :: Maximum gray level value (in the range 1 to 255).     */
-  /*                                                                       */
-  /*    pitch     :: The number of bytes per bitmap line.  May be positive */
-  /*                 or negative.                                          */
-  /*                                                                       */
-  /*    xadvance  :: The horizontal advance width in pixels.               */
-  /*                                                                       */
-  /*    yadvance  :: The vertical advance height in pixels.                */
-  /*                                                                       */
-  /*    buffer   :: A pointer to the bitmap pixels.                        */
-  /*                                                                       */
-  typedef struct  FTC_SBitRec_
-  {
-    FT_Byte   width;
-    FT_Byte   height;
-    FT_Char   left;
-    FT_Char   top;
-
-    FT_Byte   format;
-    FT_Byte   max_grays;
-    FT_Short  pitch;
-    FT_Char   xadvance;
-    FT_Char   yadvance;
-
-    FT_Byte*  buffer;
-
-  } FTC_SBitRec;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FTC_SBitCache                                                      */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A handle to a small bitmap cache.  These are special cache objects */
-  /*    used to store small glyph bitmaps (and anti-aliased pixmaps) in a  */
-  /*    much more efficient way than the traditional glyph image cache     */
-  /*    implemented by @FTC_ImageCache.                                    */
-  /*                                                                       */
-  typedef struct FTC_SBitCacheRec_*  FTC_SBitCache;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FTC_SBit_Cache                                                     */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    DEPRECATED.  Use @FTC_SBitCache instead.                           */
-  /*                                                                       */
-  typedef FTC_SBitCache  FTC_SBit_Cache;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FTC_SBitCache_New                                                  */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Creates a new cache to store small glyph bitmaps.                  */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    manager :: A handle to the source cache manager.                   */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    acache  :: A handle to the new sbit cache.  NULL in case of error. */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FTC_SBitCache_New( FTC_Manager     manager,
-                     FTC_SBitCache  *acache );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FTC_SBitCache_Lookup                                               */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Looks up a given small glyph bitmap in a given sbit cache and      */
-  /*    "lock" it to prevent its flushing from the cache until needed      */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    cache  :: A handle to the source sbit cache.                       */
-  /*                                                                       */
-  /*    type   :: A pointer to the glyph image type descriptor.            */
-  /*                                                                       */
-  /*    gindex :: The glyph index.                                         */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    sbit   :: A handle to a small bitmap descriptor.                   */
-  /*                                                                       */
-  /*    anode  :: Used to return the address of of the corresponding cache */
-  /*              node after incrementing its reference count (see note    */
-  /*              below).                                                  */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The small bitmap descriptor and its bit buffer are owned by the    */
-  /*    cache and should never be freed by the application.  They might    */
-  /*    as well disappear from memory on the next cache lookup, so don't   */
-  /*    treat them as persistent data.                                     */
-  /*                                                                       */
-  /*    The descriptor's `buffer' field is set to 0 to indicate a missing  */
-  /*    glyph bitmap.                                                      */
-  /*                                                                       */
-  /*    If "anode" is _not_ NULL, it receives the address of the cache     */
-  /*    node containing the bitmap, after increasing its reference count.  */
-  /*    This ensures that the node (as well as the image) will always be   */
-  /*    kept in the cache until you call @FTC_Node_Unref to "release" it.  */
-  /*                                                                       */
-  /*    If "anode" is NULL, the cache node is left unchanged, which means  */
-  /*    that the bitmap could be flushed out of the cache on the next      */
-  /*    call to one of the caching sub-system APIs.  Don't assume that it  */
-  /*    is persistent!                                                     */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FTC_SBitCache_Lookup( FTC_SBitCache    cache,
-                        FTC_ImageType    type,
-                        FT_UInt          gindex,
-                        FTC_SBit        *sbit,
-                        FTC_Node        *anode );
-
-
-  /* */
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FTC_SBit_Cache_New                                                 */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    DEPRECATED.  Use @FTC_SBitCache_New instead.                       */
-  /*                                                                       */
-  /*    Creates a new cache to store small glyph bitmaps.                  */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    manager :: A handle to the source cache manager.                   */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    acache  :: A handle to the new sbit cache.  NULL in case of error. */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FTC_SBit_Cache_New( FTC_Manager      manager,
-                      FTC_SBit_Cache  *acache );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FTC_SBit_Cache_Lookup                                              */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    DEPRECATED.  Use @FTC_SBitCache_Lookup instead.                    */
-  /*                                                                       */
-  /*    Looks up a given small glyph bitmap in a given sbit cache.         */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    cache  :: A handle to the source sbit cache.                       */
-  /*                                                                       */
-  /*    desc   :: A pointer to the glyph image descriptor.                 */
-  /*                                                                       */
-  /*    gindex :: The glyph index.                                         */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    sbit   :: A handle to a small bitmap descriptor.                   */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The small bitmap descriptor and its bit buffer are owned by the    */
-  /*    cache and should never be freed by the application.  They might    */
-  /*    as well disappear from memory on the next cache lookup, so don't   */
-  /*    treat them as persistent data.                                     */
-  /*                                                                       */
-  /*    The descriptor's `buffer' field is set to 0 to indicate a missing  */
-  /*    glyph bitmap.                                                      */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FTC_SBit_Cache_Lookup( FTC_SBit_Cache   cache,
-                         FTC_Image_Desc*  desc,
-                         FT_UInt          gindex,
-                         FTC_SBit        *sbit );
-
-
-FT_END_HEADER
-
-#endif /* __FTCSBITS_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/cache/ftlru.h b/extra_lib/include/freetype/freetype/cache/ftlru.h
deleted file mode 100644
index d446c60..0000000
--- a/extra_lib/include/freetype/freetype/cache/ftlru.h
+++ /dev/null
@@ -1,208 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftlru.h                                                                */
-/*                                                                         */
-/*    Simple LRU list-cache (specification).                               */
-/*                                                                         */
-/*  Copyright 2000-2001, 2003 by                                           */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* An LRU is a list that cannot hold more than a certain number of       */
-  /* elements (`max_elements').  All elements in the list are sorted in    */
-  /* least-recently-used order, i.e., the `oldest' element is at the tail  */
-  /* of the list.                                                          */
-  /*                                                                       */
-  /* When doing a lookup (either through `Lookup()' or `Lookup_Node()'),   */
-  /* the list is searched for an element with the corresponding key.  If   */
-  /* it is found, the element is moved to the head of the list and is      */
-  /* returned.                                                             */
-  /*                                                                       */
-  /* If no corresponding element is found, the lookup routine will try to  */
-  /* obtain a new element with the relevant key.  If the list is already   */
-  /* full, the oldest element from the list is discarded and replaced by a */
-  /* new one; a new element is added to the list otherwise.                */
-  /*                                                                       */
-  /* Note that it is possible to pre-allocate the element list nodes.      */
-  /* This is handy if `max_elements' is sufficiently small, as it saves    */
-  /* allocations/releases during the lookup process.                       */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*********                                                       *********/
-  /*********             WARNING, THIS IS BETA CODE.               *********/
-  /*********                                                       *********/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-#ifndef __FTLRU_H__
-#define __FTLRU_H__
-
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-#ifdef FREETYPE_H
-#error "freetype.h of FreeType 1 has been loaded!"
-#error "Please fix the directory search order for header files"
-#error "so that freetype.h of FreeType 2 is found first."
-#endif
-
-
-FT_BEGIN_HEADER
-
-
-  /* generic list key type */
-  typedef FT_Pointer  FT_LruKey;
-
-  /* a list list handle */
-  typedef struct FT_LruListRec_*  FT_LruList;
-
-  /* a list class handle */
-  typedef const struct FT_LruList_ClassRec_*  FT_LruList_Class;
-
-  /* a list node handle */
-  typedef struct FT_LruNodeRec_*  FT_LruNode;
-
-  /* the list node structure */
-  typedef struct  FT_LruNodeRec_
-  {
-    FT_LruNode  next;
-    FT_LruKey   key;
-
-  } FT_LruNodeRec;
-
-
-  /* the list structure */
-  typedef struct  FT_LruListRec_
-  {
-    FT_Memory         memory;
-    FT_LruList_Class  clazz;
-    FT_LruNode        nodes;
-    FT_UInt           max_nodes;
-    FT_UInt           num_nodes;
-    FT_Pointer        data;
-
-  } FT_LruListRec;
-
-
-  /* initialize a list list */
-  typedef FT_Error
-  (*FT_LruList_InitFunc)( FT_LruList  list );
-
-  /* finalize a list list */
-  typedef void
-  (*FT_LruList_DoneFunc)( FT_LruList  list );
-
-  /* this method is used to initialize a new list element node */
-  typedef FT_Error
-  (*FT_LruNode_InitFunc)( FT_LruNode  node,
-                          FT_LruKey   key,
-                          FT_Pointer  data );
-
-  /* this method is used to finalize a given list element node */
-  typedef void
-  (*FT_LruNode_DoneFunc)( FT_LruNode  node,
-                          FT_Pointer  data );
-
-  /* If defined, this method is called when the list if full        */
-  /* during the lookup process -- it is used to change the contents */
-  /* of a list element node instead of calling `done_element()',    */
-  /* then `init_element()'.  Set it to 0 for default behaviour.     */
-  typedef FT_Error
-  (*FT_LruNode_FlushFunc)( FT_LruNode  node,
-                           FT_LruKey   new_key,
-                           FT_Pointer  data );
-
-  /* If defined, this method is used to compare a list element node */
-  /* with a given key during a lookup.  If set to 0, the `key'      */
-  /* fields will be directly compared instead.                      */
-  typedef FT_Bool
-  (*FT_LruNode_CompareFunc)( FT_LruNode  node,
-                             FT_LruKey   key,
-                             FT_Pointer  data );
-
-  /* A selector is used to indicate whether a given list element node */
-  /* is part of a selection for FT_LruList_Remove_Selection().  The   */
-  /* functrion must return true (i.e., non-null) to indicate that the */
-  /* node is part of it.                                              */
-  typedef FT_Bool
-  (*FT_LruNode_SelectFunc)( FT_LruNode  node,
-                            FT_Pointer  data,
-                            FT_Pointer  list_data );
-
-  /* LRU class */
-  typedef struct  FT_LruList_ClassRec_
-  {
-    FT_UInt                 list_size;
-    FT_LruList_InitFunc     list_init;      /* optional */
-    FT_LruList_DoneFunc     list_done;      /* optional */
-
-    FT_UInt                 node_size;
-    FT_LruNode_InitFunc     node_init;     /* MANDATORY */
-    FT_LruNode_DoneFunc     node_done;     /* optional  */
-    FT_LruNode_FlushFunc    node_flush;    /* optional  */
-    FT_LruNode_CompareFunc  node_compare;  /* optional  */
-
-  } FT_LruList_ClassRec;
-
-
-  /* The following functions must be exported in the case where */
-  /* applications would want to write their own cache classes.  */
-
-  FT_EXPORT( FT_Error )
-  FT_LruList_New( FT_LruList_Class  clazz,
-                  FT_UInt           max_elements,
-                  FT_Pointer        user_data,
-                  FT_Memory         memory,
-                  FT_LruList       *alist );
-
-  FT_EXPORT( void )
-  FT_LruList_Reset( FT_LruList  list );
-
-  FT_EXPORT( void )
-  FT_LruList_Destroy ( FT_LruList  list );
-
-  FT_EXPORT( FT_Error )
-  FT_LruList_Lookup( FT_LruList  list,
-                     FT_LruKey   key,
-                     FT_LruNode *anode );
-
-  FT_EXPORT( void )
-  FT_LruList_Remove( FT_LruList  list,
-                     FT_LruNode  node );
-
-  FT_EXPORT( void )
-  FT_LruList_Remove_Selection( FT_LruList             list,
-                               FT_LruNode_SelectFunc  select_func,
-                               FT_Pointer             select_data );
-
- /* */
-
-FT_END_HEADER
-
-
-#endif /* __FTLRU_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/config/ftconfig.h b/extra_lib/include/freetype/freetype/config/ftconfig.h
deleted file mode 100644
index d23b73e..0000000
--- a/extra_lib/include/freetype/freetype/config/ftconfig.h
+++ /dev/null
@@ -1,340 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftconfig.h                                                             */
-/*                                                                         */
-/*    ANSI-specific configuration file (specification only).               */
-/*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003 by                                     */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* This header file contains a number of macro definitions that are used */
-  /* by the rest of the engine.  Most of the macros here are automatically */
-  /* determined at compile time, and you should not need to change it to   */
-  /* port FreeType, except to compile the library with a non-ANSI          */
-  /* compiler.                                                             */
-  /*                                                                       */
-  /* Note however that if some specific modifications are needed, we       */
-  /* advise you to place a modified copy in your build directory.          */
-  /*                                                                       */
-  /* The build directory is usually `freetype/builds/<system>', and        */
-  /* contains system-specific files that are always included first when    */
-  /* building the library.                                                 */
-  /*                                                                       */
-  /* This ANSI version should stay in `include/freetype/config'.           */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-#ifndef __FTCONFIG_H__
-#define __FTCONFIG_H__
-
-#include <ft2build.h>
-#include FT_CONFIG_OPTIONS_H
-#include FT_CONFIG_STANDARD_LIBRARY_H
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /*               PLATFORM-SPECIFIC CONFIGURATION MACROS                  */
-  /*                                                                       */
-  /* These macros can be toggled to suit a specific system.  The current   */
-  /* ones are defaults used to compile FreeType in an ANSI C environment   */
-  /* (16bit compilers are also supported).  Copy this file to your own     */
-  /* `freetype/builds/<system>' directory, and edit it to port the engine. */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /* The number of bytes in an `int' type.  */
-#if   FT_UINT_MAX == 0xFFFFFFFFUL
-#define FT_SIZEOF_INT  4
-#elif FT_UINT_MAX == 0xFFFFU
-#define FT_SIZEOF_INT  2
-#elif FT_UINT_MAX > 0xFFFFFFFFU && FT_UINT_MAX == 0xFFFFFFFFFFFFFFFFU
-#define FT_SIZEOF_INT  8
-#else
-#error "Unsupported number of bytes in `int' type!"
-#endif
-
-  /* The number of bytes in a `long' type.  */
-#if   FT_ULONG_MAX == 0xFFFFFFFFUL
-#define FT_SIZEOF_LONG  4
-#elif FT_ULONG_MAX > 0xFFFFFFFFU && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFU
-#define FT_SIZEOF_LONG  8
-#else
-#error "Unsupported number of bytes in `long' type!"
-#endif
-
-
-  /* Preferred alignment of data */
-#define FT_ALIGNMENT  8
-
-
-  /* FT_UNUSED is a macro used to indicate that a given parameter is not  */
-  /* used -- this is only used to get rid of unpleasant compiler warnings */
-#ifndef FT_UNUSED
-#define FT_UNUSED( arg )  ( (arg) = (arg) )
-#endif
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /*                     AUTOMATIC CONFIGURATION MACROS                    */
-  /*                                                                       */
-  /* These macros are computed from the ones defined above.  Don't touch   */
-  /* their definition, unless you know precisely what you are doing.  No   */
-  /* porter should need to mess with them.                                 */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Mac support                                                           */
-  /*                                                                       */
-  /*   This is the only necessary change, so it is defined here instead    */
-  /*   providing a new configuration file.                                 */
-  /*                                                                       */
-#if ( defined( __APPLE__ ) && !defined( DARWIN_NO_CARBON ) ) || \
-    ( defined( __MWERKS__ ) && defined( macintosh )        )
-#define FT_MACINTOSH 1
-#endif
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* IntN types                                                            */
-  /*                                                                       */
-  /*   Used to guarantee the size of some specific integers.               */
-  /*                                                                       */
-  typedef signed short    FT_Int16;
-  typedef unsigned short  FT_UInt16;
-
-#if FT_SIZEOF_INT == 4
-
-  typedef signed int      FT_Int32;
-  typedef unsigned int    FT_UInt32;
-
-#elif FT_SIZEOF_LONG == 4
-
-  typedef signed long     FT_Int32;
-  typedef unsigned long   FT_UInt32;
-
-#else
-#error "no 32bit type found -- please check your configuration files"
-#endif
-
-  /* look up an integer type that is at least 32 bits */
-#if FT_SIZEOF_INT >= 4
-
-  typedef int            FT_Fast;
-  typedef unsigned int   FT_UFast;
-
-#elif FT_SIZEOF_LONG >= 4
-
-  typedef long           FT_Fast;
-  typedef unsigned long  FT_UFast;
-
-#endif
-
-
-  /* determine whether we have a 64-bit int type for platforms without */
-  /* Autoconf                                                          */
-#if FT_SIZEOF_LONG == 8
-
-  /* FT_LONG64 must be defined if a 64-bit type is available */
-#define FT_LONG64
-#define FT_INT64  long
-
-#elif defined( _MSC_VER ) && _MSC_VER >= 900  /* Visual C++ (and Intel C++) */
-
-  /* this compiler provides the __int64 type */
-#define FT_LONG64
-#define FT_INT64  __int64
-
-#elif defined( __BORLANDC__ )  /* Borland C++ */
-
-  /* XXXX: We should probably check the value of __BORLANDC__ in order */
-  /*       to test the compiler version.                               */
-
-  /* this compiler provides the __int64 type */
-#define FT_LONG64
-#define FT_INT64  __int64
-
-#elif defined( __WATCOMC__ )   /* Watcom C++ */
-
-  /* Watcom doesn't provide 64-bit data types */
-
-#elif defined( __MWERKS__ )    /* Metrowerks CodeWarrior */
-
-#define FT_LONG64
-#define FT_INT64  long long int
-
-#elif defined( __GNUC__ )
-
-  /* GCC provides the "long long" type */
-#define FT_LONG64
-#define FT_INT64  long long int
-
-#endif /* FT_SIZEOF_LONG == 8 */
-
-
-#define FT_BEGIN_STMNT  do {
-#define FT_END_STMNT    } while ( 0 )
-#define FT_DUMMY_STMNT  FT_BEGIN_STMNT FT_END_STMNT
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* A 64-bit data type will create compilation problems if you compile    */
-  /* in strict ANSI mode.  To avoid them, we disable their use if          */
-  /* __STDC__ is defined.  You can however ignore this rule by             */
-  /* defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro.        */
-  /*                                                                       */
-#if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 )
-
-#ifdef __STDC__
-
-  /* undefine the 64-bit macros in strict ANSI compilation mode */
-#undef FT_LONG64
-#undef FT_INT64
-
-#endif /* __STDC__ */
-
-#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */
-
-
-#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
-
-#define FT_LOCAL( x )      static  x
-#define FT_LOCAL_DEF( x )  static  x
-
-#else
-
-#ifdef __cplusplus
-#define FT_LOCAL( x )      extern "C"  x
-#define FT_LOCAL_DEF( x )  extern "C"  x
-#else
-#define FT_LOCAL( x )      extern  x
-#define FT_LOCAL_DEF( x )  x
-#endif
-
-#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
-
-
-#ifndef FT_BASE
-
-#ifdef __cplusplus
-#define FT_BASE( x )  extern "C"  x
-#else
-#define FT_BASE( x )  extern  x
-#endif
-
-#endif /* !FT_BASE */
-
-
-#ifndef FT_BASE_DEF
-
-#ifdef __cplusplus
-#define FT_BASE_DEF( x )  extern "C"  x
-#else
-#define FT_BASE_DEF( x )  extern  x
-#endif
-
-#endif /* !FT_BASE_DEF */
-
-
-#ifndef FT_EXPORT
-
-#ifdef __cplusplus
-#define FT_EXPORT( x )  extern "C"  x
-#else
-#define FT_EXPORT( x )  extern  x
-#endif
-
-#endif /* !FT_EXPORT */
-
-
-#ifndef FT_EXPORT_DEF
-
-#ifdef __cplusplus
-#define FT_EXPORT_DEF( x )  extern "C"  x
-#else
-#define FT_EXPORT_DEF( x )  extern  x
-#endif
-
-#endif /* !FT_EXPORT_DEF */
-
-
-#ifndef FT_EXPORT_VAR
-
-#ifdef __cplusplus
-#define FT_EXPORT_VAR( x )  extern "C"  x
-#else
-#define FT_EXPORT_VAR( x )  extern  x
-#endif
-
-#endif /* !FT_EXPORT_VAR */
-
-  /* The following macros are needed to compile the library with a   */
-  /* C++ compiler and with 16bit compilers.                          */
-  /*                                                                 */
-
-  /* This is special.  Within C++, you must specify `extern "C"' for */
-  /* functions which are used via function pointers, and you also    */
-  /* must do that for structures which contain function pointers to  */
-  /* assure C linkage -- it's not possible to have (local) anonymous */
-  /* functions which are accessed by (global) function pointers.     */
-  /*                                                                 */
-  /*                                                                 */
-  /* FT_CALLBACK_DEF is used to _define_ a callback function.        */
-  /*                                                                 */
-  /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */
-  /* contains pointers to callback functions.                        */
-  /*                                                                 */
-  /* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable   */
-  /* that contains pointers to callback functions.                   */
-  /*                                                                 */
-  /*                                                                 */
-  /* Some 16bit compilers have to redefine these macros to insert    */
-  /* the infamous `_cdecl' or `__fastcall' declarations.             */
-  /*                                                                 */
-#ifndef FT_CALLBACK_DEF
-#ifdef __cplusplus
-#define FT_CALLBACK_DEF( x )  extern "C"  x
-#else
-#define FT_CALLBACK_DEF( x )  static  x
-#endif
-#endif /* FT_CALLBACK_DEF */
-
-#ifndef FT_CALLBACK_TABLE
-#ifdef __cplusplus
-#define FT_CALLBACK_TABLE      extern "C"
-#define FT_CALLBACK_TABLE_DEF  extern "C"
-#else
-#define FT_CALLBACK_TABLE      extern
-#define FT_CALLBACK_TABLE_DEF  /* nothing */
-#endif
-#endif /* FT_CALLBACK_TABLE */
-
-
-FT_END_HEADER
-
-
-#endif /* __FTCONFIG_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/config/ftheader.h b/extra_lib/include/freetype/freetype/config/ftheader.h
deleted file mode 100644
index 22cd62e..0000000
--- a/extra_lib/include/freetype/freetype/config/ftheader.h
+++ /dev/null
@@ -1,537 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftheader.h                                                             */
-/*                                                                         */
-/*    Build macros of the FreeType 2 library.                              */
-/*                                                                         */
-/*  Copyright 1996-2001, 2002 by                                           */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-#ifndef __FT_HEADER_H__
-#define __FT_HEADER_H__
-
-  /*@***********************************************************************/
-  /*                                                                       */
-  /* <Macro>                                                               */
-  /*    FT_BEGIN_HEADER                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This macro is used in association with @FT_END_HEADER in header    */
-  /*    files to ensure that the declarations within are properly          */
-  /*    encapsulated in an `extern "C" { .. }' block when included from a  */
-  /*    C++ compiler.                                                      */
-  /*                                                                       */
-#ifdef __cplusplus
-#define FT_BEGIN_HEADER  extern "C" {
-#else
-#define FT_BEGIN_HEADER  /* nothing */
-#endif
-
-
-  /*@***********************************************************************/
-  /*                                                                       */
-  /* <Macro>                                                               */
-  /*    FT_END_HEADER                                                      */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This macro is used in association with @FT_BEGIN_HEADER in header  */
-  /*    files to ensure that the declarations within are properly          */
-  /*    encapsulated in an `extern "C" { .. }' block when included from a  */
-  /*    C++ compiler.                                                      */
-  /*                                                                       */
-#ifdef __cplusplus
-#define FT_END_HEADER  }
-#else
-#define FT_END_HEADER  /* nothing */
-#endif
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Aliases for the FreeType 2 public and configuration files.            */
-  /*                                                                       */
-  /*************************************************************************/
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    header_file_macros                                                 */
-  /*                                                                       */
-  /* <Title>                                                               */
-  /*    Header File Macros                                                 */
-  /*                                                                       */
-  /* <Abstract>                                                            */
-  /*    Macro definitions used to #include specific header files.          */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    The following macros are defined to the name of specific           */
-  /*    FreeType 2 header files.  They can be used directly in #include    */
-  /*    statements as in:                                                  */
-  /*                                                                       */
-  /*    {                                                                  */
-  /*      #include FT_FREETYPE_H                                           */
-  /*      #include FT_MULTIPLE_MASTERS_H                                   */
-  /*      #include FT_GLYPH_H                                              */
-  /*    }                                                                  */
-  /*                                                                       */
-  /*    There are several reasons why we are now using macros to name      */
-  /*    public header files.  The first one is that such macros are not    */
-  /*    limited to the infamous 8.3 naming rule required by DOS (and       */
-  /*    `FT_MULTIPLE_MASTERS_H' is a lot more meaningful than `ftmm.h').   */
-  /*                                                                       */
-  /*    The second reason is that is allows for more flexibility in the    */
-  /*    way FreeType 2 is installed on a given system.                     */
-  /*                                                                       */
-  /*************************************************************************/
-
-  /* configuration files */
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_CONFIG_CONFIG_H                                                 */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro used in #include statements to name the file containing    */
-  /*    FreeType 2 configuration data.                                     */
-  /*                                                                       */
-#ifndef FT_CONFIG_CONFIG_H
-#define FT_CONFIG_CONFIG_H  <freetype/config/ftconfig.h>
-#endif
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_CONFIG_STANDARD_LIBRARY_H                                       */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro used in #include statements to name the file containing    */
-  /*    FreeType 2 configuration data.                                     */
-  /*                                                                       */
-#ifndef FT_CONFIG_STANDARD_LIBRARY_H
-#define FT_CONFIG_STANDARD_LIBRARY_H  <freetype/config/ftstdlib.h>
-#endif
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_CONFIG_OPTIONS_H                                                */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro used in #include statements to name the file containing    */
-  /*    FreeType 2 project-specific configuration options.                 */
-  /*                                                                       */
-#ifndef FT_CONFIG_OPTIONS_H
-#define FT_CONFIG_OPTIONS_H  <freetype/config/ftoption.h>
-#endif
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_CONFIG_MODULES_H                                                */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro used in #include statements to name the file containing    */
-  /*    the list of FreeType 2 modules that are statically linked to new   */
-  /*    library instances in @FT_Init_FreeType.                            */
-  /*                                                                       */
-#ifndef FT_CONFIG_MODULES_H
-#define FT_CONFIG_MODULES_H  <freetype/config/ftmodule.h>
-#endif
-
-  /* public headers */
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_FREETYPE_H                                                      */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro used in #include statements to name the file containing    */
-  /*    the base FreeType 2 API.                                           */
-  /*                                                                       */
-#define FT_FREETYPE_H  <freetype/freetype.h>
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_ERRORS_H                                                        */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro used in #include statements to name the file containing    */
-  /*    the list of FreeType 2 error codes (and messages).                 */
-  /*                                                                       */
-  /*    It is included by @FT_FREETYPE_H.                                  */
-  /*                                                                       */
-#define FT_ERRORS_H  <freetype/fterrors.h>
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_MODULE_ERRORS_H                                                 */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro used in #include statements to name the file containing    */
-  /*    the list of FreeType 2 module error offsets (and messages).        */
-  /*                                                                       */
-#define FT_MODULE_ERRORS_H  <freetype/ftmoderr.h>
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_SYSTEM_H                                                        */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro used in #include statements to name the file containing    */
-  /*    the FreeType 2 interface to low-level operations (i.e. memory      */
-  /*    management and stream i/o).                                        */
-  /*                                                                       */
-  /*    It is included by @FT_FREETYPE_H.                                  */
-  /*                                                                       */
-#define FT_SYSTEM_H  <freetype/ftsystem.h>
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_IMAGE_H                                                         */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro used in #include statements to name the file containing    */
-  /*    types definitions related to glyph images (i.e. bitmaps, outlines, */
-  /*    scan-converter parameters).                                        */
-  /*                                                                       */
-  /*    It is included by @FT_FREETYPE_H.                                  */
-  /*                                                                       */
-#define FT_IMAGE_H  <freetype/ftimage.h>
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_TYPES_H                                                         */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro used in #include statements to name the file containing    */
-  /*    the basic data types defined by FreeType 2.                        */
-  /*                                                                       */
-  /*    It is included by @FT_FREETYPE_H.                                  */
-  /*                                                                       */
-#define FT_TYPES_H  <freetype/fttypes.h>
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_LIST_H                                                          */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro used in #include statements to name the file containing    */
-  /*    the list management API of FreeType 2.                             */
-  /*                                                                       */
-  /*    (Most applications will never need to include this file.)          */
-  /*                                                                       */
-#define FT_LIST_H  <freetype/ftlist.h>
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_OUTLINE_H                                                       */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro used in #include statements to name the file containing    */
-  /*    the scalable outline management API of FreeType 2.                 */
-  /*                                                                       */
-#define FT_OUTLINE_H  <freetype/ftoutln.h>
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_SIZES_H                                                         */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro used in #include statements to name the file containing    */
-  /*    the API used to manage multiple @FT_Size objects per face.         */
-  /*                                                                       */
-#define FT_SIZES_H  <freetype/ftsizes.h>
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_MODULE_H                                                        */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro used in #include statements to name the file containing    */
-  /*    the module management API of FreeType 2.                           */
-  /*                                                                       */
-#define FT_MODULE_H  <freetype/ftmodapi.h>
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_RENDER_H                                                        */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro used in #include statements to name the file containing    */
-  /*    the renderer module management API of FreeType 2.                  */
-  /*                                                                       */
-#define FT_RENDER_H  <freetype/ftrender.h>
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_TYPE1_TABLES_H                                                  */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro used in #include statements to name the file containing    */
-  /*    the types and API specific to the Type 1 format.                   */
-  /*                                                                       */
-#define FT_TYPE1_TABLES_H  <freetype/t1tables.h>
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_TRUETYPE_IDS_H                                                  */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro used in #include statements to name the file containing    */
-  /*    the enumeration values used to identify name strings, languages,   */
-  /*    encodings, etc.  This file really contains a _large_ set of        */
-  /*    constant macro definitions, taken from the TrueType and OpenType   */
-  /*    specifications.                                                    */
-  /*                                                                       */
-#define FT_TRUETYPE_IDS_H  <freetype/ttnameid.h>
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_TRUETYPE_TABLES_H                                               */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro used in #include statements to name the file containing    */
-  /*    the types and API specific to the TrueType (as well as OpenType)   */
-  /*    format.                                                            */
-  /*                                                                       */
-#define FT_TRUETYPE_TABLES_H  <freetype/tttables.h>
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_TRUETYPE_TAGS_H                                                 */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro used in #include statements to name the file containing    */
-  /*    the definitions of TrueType 4-byte `tags' used to identify blocks  */
-  /*    in SFNT-based font formats (i.e. TrueType and OpenType).           */
-  /*                                                                       */
-#define FT_TRUETYPE_TAGS_H  <freetype/tttags.h>
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_BDF_H                                                           */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro used in #include statements to name the file containing    */
-  /*    the definitions of an API to access BDF-specific strings from a    */
-  /*    face.                                                              */
-  /*                                                                       */
-#define FT_BDF_H  <freetype/ftbdf.h>
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_GZIP_H                                                          */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro used in #include statements to name the file containing    */
-  /*    the definitions of an API to support for gzip-compressed files.    */
-  /*                                                                       */
-#define FT_GZIP_H  <freetype/ftgzip.h>
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_WINFONTS_H                                                      */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro used in #include statements to name the file containing    */
-  /*    the definitions of an API to support Windows .FNT files            */
-  /*                                                                       */
-#define FT_WINFONTS_H   <freetype/ftwinfnt.h>
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_GLYPH_H                                                         */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro used in #include statements to name the file containing    */
-  /*    the API of the optional glyph management component.                */
-  /*                                                                       */
-#define FT_GLYPH_H  <freetype/ftglyph.h>
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_BBOX_H                                                          */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro used in #include statements to name the file containing    */
-  /*    the API of the optional exact bounding box computation routines.   */
-  /*                                                                       */
-#define FT_BBOX_H  <freetype/ftbbox.h>
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_CACHE_H                                                         */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro used in #include statements to name the file containing    */
-  /*    the API of the optional FreeType 2 cache sub-system.               */
-  /*                                                                       */
-#define FT_CACHE_H  <freetype/ftcache.h>
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_CACHE_IMAGE_H                                                   */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro used in #include statements to name the file containing    */
-  /*    the `glyph image' API of the FreeType 2 cache sub-system.          */
-  /*                                                                       */
-  /*    It is used to define a cache for @FT_Glyph elements.  You can also */
-  /*    see the API defined in @FT_CACHE_SMALL_BITMAPS_H if you only need  */
-  /*    to store small glyph bitmaps, as it will use less memory.          */
-  /*                                                                       */
-#define FT_CACHE_IMAGE_H  <freetype/cache/ftcimage.h>
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_CACHE_SMALL_BITMAPS_H                                           */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro used in #include statements to name the file containing    */
-  /*    the `small bitmaps' API of the FreeType 2 cache sub-system.        */
-  /*                                                                       */
-  /*    It is used to define a cache for small glyph bitmaps in a          */
-  /*    relatively memory-efficient way.  You can also use the API defined */
-  /*    in @FT_CACHE_IMAGE_H if you want to cache arbitrary glyph images,  */
-  /*    including scalable outlines.                                       */
-  /*                                                                       */
-#define FT_CACHE_SMALL_BITMAPS_H  <freetype/cache/ftcsbits.h>
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_CACHE_CHARMAP_H                                                 */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro used in #include statements to name the file containing    */
-  /*    the `charmap' API of the FreeType 2 cache sub-system.              */
-  /*                                                                       */
-#define FT_CACHE_CHARMAP_H  <freetype/cache/ftccmap.h>
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_MAC_H                                                           */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro used in #include statements to name the file containing    */
-  /*    the Macintosh-specific FreeType 2 API. The latter is used to       */
-  /*    access fonts embedded in resource forks.                           */
-  /*                                                                       */
-  /*    This header file must be explicitly included by client             */
-  /*    applications compiled on the Mac (note that the base API still     */
-  /*    works though).                                                     */
-  /*                                                                       */
-#define FT_MAC_H  <freetype/ftmac.h>
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_MULTIPLE_MASTERS_H                                              */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro used in #include statements to name the file containing    */
-  /*    the optional multiple-masters management API of FreeType 2.        */
-  /*                                                                       */
-#define FT_MULTIPLE_MASTERS_H  <freetype/ftmm.h>
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_SFNT_NAMES_H                                                    */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro used in #include statements to name the file containing    */
-  /*    the optional FreeType 2 API used to access embedded `name' strings */
-  /*    in SFNT-based font formats (i.e. TrueType and OpenType).           */
-  /*                                                                       */
-#define FT_SFNT_NAMES_H  <freetype/ftsnames.h>
-
-  /* */
-
-#define FT_TRIGONOMETRY_H          <freetype/fttrigon.h>
-#define FT_STROKER_H               <freetype/ftstroke.h>
-#define FT_SYNTHESIS_H             <freetype/ftsynth.h>
-#define FT_ERROR_DEFINITIONS_H     <freetype/fterrdef.h>
-
-#define FT_CACHE_MANAGER_H         <freetype/cache/ftcmanag.h>
-
-#define FT_CACHE_INTERNAL_LRU_H    <freetype/cache/ftlru.h>
-#define FT_CACHE_INTERNAL_GLYPH_H  <freetype/cache/ftcglyph.h>
-#define FT_CACHE_INTERNAL_CACHE_H  <freetype/cache/ftccache.h>
-
-#define FT_XFREE86_H               <freetype/ftxf86.h>
-
-#define FT_INCREMENTAL_H           <freetype/ftincrem.h>
-
-#define FT_TRUETYPE_UNPATENTED_H   <freetype/ttunpat.h>
-
-  /* now include internal headers definitions from <freetype/internal/...> */
-
-#define  FT_INTERNAL_INTERNAL_H    <freetype/internal/internal.h>
-#include FT_INTERNAL_INTERNAL_H
-
-
-#endif /* __FT2_BUILD_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/config/ftmodule.h b/extra_lib/include/freetype/freetype/config/ftmodule.h
deleted file mode 100644
index d0e6f16..0000000
--- a/extra_lib/include/freetype/freetype/config/ftmodule.h
+++ /dev/null
@@ -1,19 +0,0 @@
-FT_USE_MODULE(autohint_module_class)
-FT_USE_MODULE(cff_driver_class)
-FT_USE_MODULE(t1cid_driver_class)
-FT_USE_MODULE(pcf_driver_class)
-FT_USE_MODULE(bdf_driver_class)
-FT_USE_MODULE(psaux_module_class)
-FT_USE_MODULE(psnames_module_class)
-FT_USE_MODULE(pshinter_module_class)
-FT_USE_MODULE(ft_raster1_renderer_class)
-FT_USE_MODULE(sfnt_module_class)
-FT_USE_MODULE(ft_smooth_renderer_class)
-FT_USE_MODULE(ft_smooth_lcd_renderer_class)
-FT_USE_MODULE(ft_smooth_lcdv_renderer_class)
-FT_USE_MODULE(tt_driver_class)
-FT_USE_MODULE(t1_driver_class)
-FT_USE_MODULE(t42_driver_class)
-FT_USE_MODULE(pfr_driver_class)
-FT_USE_MODULE(winfnt_driver_class)
-
diff --git a/extra_lib/include/freetype/freetype/config/ftoption.h b/extra_lib/include/freetype/freetype/config/ftoption.h
deleted file mode 100644
index 3581caa..0000000
--- a/extra_lib/include/freetype/freetype/config/ftoption.h
+++ /dev/null
@@ -1,530 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftoption.h                                                             */
-/*                                                                         */
-/*    User-selectable configuration macros (specification only).           */
-/*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003 by                                     */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __FTOPTION_H__
-#define __FTOPTION_H__
-
-
-#include <ft2build.h>
-
-
-FT_BEGIN_HEADER
-
-  /*************************************************************************/
-  /*                                                                       */
-  /*                 USER-SELECTABLE CONFIGURATION MACROS                  */
-  /*                                                                       */
-  /* This file contains the default configuration macro definitions for    */
-  /* a standard build of the FreeType library.  There are three ways to    */
-  /* use this file to build project-specific versions of the library:      */
-  /*                                                                       */
-  /*  - You can modify this file by hand, but this is not recommended in   */
-  /*    cases where you would like to build several versions of the        */
-  /*    library from a single source directory.                            */
-  /*                                                                       */
-  /*  - You can put a copy of this file in your build directory, more      */
-  /*    precisely in "$BUILD/freetype/config/ftoption.h", where "$BUILD"   */
-  /*    is the name of a directory that is included _before_ the FreeType  */
-  /*    include path during compilation.                                   */
-  /*                                                                       */
-  /*    The default FreeType Makefiles and Jamfiles use the build          */
-  /*    directory "builds/<system>" by default, but you can easily change  */
-  /*    that for your own projects.                                        */
-  /*                                                                       */
-  /*  - Copy the file <ft2build.h> to "$BUILD/ft2build.h" and modify it    */
-  /*    slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to       */
-  /*    locate this file during the build.  For example,                   */
-  /*                                                                       */
-  /*      #define FT_CONFIG_OPTIONS_H  <myftoptions.h>                     */
-  /*      #include <freetype/config/ftheader.h>                            */
-  /*                                                                       */
-  /*    will use "$BUILD/myftoptions.h" instead of this file for macro     */
-  /*    definitions.                                                       */
-  /*                                                                       */
-  /*    Note also that you can similarly pre-define the macro              */
-  /*    FT_CONFIG_MODULES_H used to locate the file listing of the modules */
-  /*    that are statically linked to the library at compile time.  By     */
-  /*    default, this file is <freetype/config/ftmodule.h>.                */
-  /*                                                                       */
-  /*  We highly recommend using the third method whenever possible.        */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /****                                                                 ****/
-  /**** G E N E R A L   F R E E T Y P E   2   C O N F I G U R A T I O N ****/
-  /****                                                                 ****/
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Many compilers provide a non-ANSI 64-bit data type that can be used   */
-  /* by FreeType to speed up some computations.  However, this will create */
-  /* some problems when compiling the library in strict ANSI mode.         */
-  /*                                                                       */
-  /* For this reason, the use of 64-bit integers is normally disabled when */
-  /* the __STDC__ macro is defined.  You can however disable this by       */
-  /* defining the macro FT_CONFIG_OPTION_FORCE_INT64 here.                 */
-  /*                                                                       */
-  /* For most compilers, this will only create compilation warnings when   */
-  /* building the library.                                                 */
-  /*                                                                       */
-  /* ObNote: The compiler-specific 64-bit integers are detected in the     */
-  /*         file "ftconfig.h" either statically or through the            */
-  /*         `configure' script on supported platforms.                    */
-  /*                                                                       */
-#undef  FT_CONFIG_OPTION_FORCE_INT64
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Gzip-compressed file support.                                         */
-  /*                                                                       */
-  /*   FreeType now handles font files that have been compressed with the  */
-  /*   'gzip' program.  This is mostly used to parse many of the PCF files */
-  /*   that come with XFree86.  The implementation uses `zlib' to          */
-  /*   partially uncompress the file on the fly (see src/base/ftgzip.c).   */
-  /*                                                                       */
-  /*   Define this macro if you want to enable this "feature".  Note that  */
-  /*   this will however force you to link the zlib to any program that    */
-  /*   also uses FreeType.                                                 */
-  /*                                                                       */
-#define FT_CONFIG_OPTION_USE_ZLIB
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* ZLib library selection                                                */
-  /*                                                                       */
-  /*   This macro is only used when FT_CONFIG_OPTION_USE_ZLIB is defined.  */
-  /*   It allows FreeType's "ftgzip" component to link to the system's     */
-  /*   installation of the ZLib library.  This is useful on systems like   */
-  /*   Unix or VMS where it generally is already available.                */
-  /*                                                                       */
-  /*   If you let it undefined, the component will use its own copy        */
-  /*   of the zlib sources instead.  These have been modified to be        */
-  /*   included directly within the component and *not* export external    */
-  /*   function names.  This allows you to link any program with FreeType  */
-  /*   _and_ ZLib without linking conflicts.                               */
-  /*                                                                       */
-  /*   Do not #undef this macro here since the build system might define   */
-  /*   it for certain configurations only.                                 */
-  /*                                                                       */
-/* #define  FT_CONFIG_OPTION_SYSTEM_ZLIB */
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* DLL export compilation                                                */
-  /*                                                                       */
-  /*   When compiling FreeType as a DLL, some systems/compilers need a     */
-  /*   special keyword in front OR after the return type of function       */
-  /*   declarations.                                                       */
-  /*                                                                       */
-  /*   Two macros are used within the FreeType source code to define       */
-  /*   exported library functions: FT_EXPORT and FT_EXPORT_DEF.            */
-  /*                                                                       */
-  /*     FT_EXPORT( return_type )                                          */
-  /*                                                                       */
-  /*       is used in a function declaration, as in                        */
-  /*                                                                       */
-  /*         FT_EXPORT( FT_Error )                                         */
-  /*         FT_Init_FreeType( FT_Library*  alibrary );                    */
-  /*                                                                       */
-  /*                                                                       */
-  /*     FT_EXPORT_DEF( return_type )                                      */
-  /*                                                                       */
-  /*       is used in a function definition, as in                         */
-  /*                                                                       */
-  /*         FT_EXPORT_DEF( FT_Error )                                     */
-  /*         FT_Init_FreeType( FT_Library*  alibrary )                     */
-  /*         {                                                             */
-  /*           ... some code ...                                           */
-  /*           return FT_Err_Ok;                                           */
-  /*         }                                                             */
-  /*                                                                       */
-  /*   You can provide your own implementation of FT_EXPORT and            */
-  /*   FT_EXPORT_DEF here if you want.  If you leave them undefined, they  */
-  /*   will be later automatically defined as `extern return_type' to      */
-  /*   allow normal compilation.                                           */
-  /*                                                                       */
-  /*   Do not #undef these macros here since the build system might define */
-  /*   them for certain configurations only.                               */
-  /*                                                                       */
-/* #define  FT_EXPORT(x)       extern x */
-/* #define  FT_EXPORT_DEF(x)   x */
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Glyph Postscript Names handling                                       */
-  /*                                                                       */
-  /*   By default, FreeType 2 is compiled with the `PSNames' module.  This */
-  /*   module is in charge of converting a glyph name string into a        */
-  /*   Unicode value, or return a Macintosh standard glyph name for the    */
-  /*   use with the TrueType `post' table.                                 */
-  /*                                                                       */
-  /*   Undefine this macro if you do not want `PSNames' compiled in your   */
-  /*   build of FreeType.  This has the following effects:                 */
-  /*                                                                       */
-  /*   - The TrueType driver will provide its own set of glyph names,      */
-  /*     if you build it to support postscript names in the TrueType       */
-  /*     `post' table.                                                     */
-  /*                                                                       */
-  /*   - The Type 1 driver will not be able to synthetize a Unicode        */
-  /*     charmap out of the glyphs found in the fonts.                     */
-  /*                                                                       */
-  /*   You would normally undefine this configuration macro when building  */
-  /*   a version of FreeType that doesn't contain a Type 1 or CFF driver.  */
-  /*                                                                       */
-#define FT_CONFIG_OPTION_POSTSCRIPT_NAMES
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Postscript Names to Unicode Values support                            */
-  /*                                                                       */
-  /*   By default, FreeType 2 is built with the `PSNames' module compiled  */
-  /*   in.  Among other things, the module is used to convert a glyph name */
-  /*   into a Unicode value.  This is especially useful in order to        */
-  /*   synthetize on the fly a Unicode charmap from the CFF/Type 1 driver  */
-  /*   through a big table named the `Adobe Glyph List' (AGL).             */
-  /*                                                                       */
-  /*   Undefine this macro if you do not want the Adobe Glyph List         */
-  /*   compiled in your `PSNames' module.  The Type 1 driver will not be   */
-  /*   able to synthetize a Unicode charmap out of the glyphs found in the */
-  /*   fonts.                                                              */
-  /*                                                                       */
-#define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Support for Mac fonts                                                 */
-  /*                                                                       */
-  /*   Define this macro if you want support for outline fonts in Mac      */
-  /*   format (mac dfont, mac resource, macbinary containing a mac         */
-  /*   resource) on non-Mac platforms.                                     */
-  /*                                                                       */
-  /*   Note that the `FOND' resource isn't checked.                        */
-  /*                                                                       */
-#define FT_CONFIG_OPTION_MAC_FONTS
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Allow the use of FT_Incremental_Interface to load typefaces that      */
-  /* contain no glyph data, but supply it via a callback function.         */
-  /* This allows FreeType to be used with the PostScript language, using   */
-  /* the GhostScript interpreter.                                          */
-  /*                                                                       */
-/* #define FT_CONFIG_OPTION_INCREMENTAL */
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* The size in bytes of the render pool used by the scan-line converter  */
-  /* to do all of its work.                                                */
-  /*                                                                       */
-  /* This must be greater than 4KByte.                                     */
-  /*                                                                       */
-#define FT_RENDER_POOL_SIZE  16384L
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* FT_MAX_MODULES                                                        */
-  /*                                                                       */
-  /*   The maximum number of modules that can be registered in a single    */
-  /*   FreeType library object.  32 is the default.                        */
-  /*                                                                       */
-#define FT_MAX_MODULES  32
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Debug level                                                           */
-  /*                                                                       */
-  /*   FreeType can be compiled in debug or trace mode.  In debug mode,    */
-  /*   errors are reported through the `ftdebug' component.  In trace      */
-  /*   mode, additional messages are sent to the standard output during    */
-  /*   execution.                                                          */
-  /*                                                                       */
-  /*   Define FT_DEBUG_LEVEL_ERROR to build the library in debug mode.     */
-  /*   Define FT_DEBUG_LEVEL_TRACE to build it in trace mode.              */
-  /*                                                                       */
-  /*   Don't define any of these macros to compile in `release' mode!      */
-  /*                                                                       */
-  /*   Do not #undef these macros here since the build system might define */
-  /*   them for certain configurations only.                               */
-  /*                                                                       */
-/* #define FT_DEBUG_LEVEL_ERROR */
-/* #define FT_DEBUG_LEVEL_TRACE */
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Memory Debugging                                                      */
-  /*                                                                       */
-  /*   FreeType now comes with an integrated memory debugger that is       */
-  /*   capable of detecting simple errors like memory leaks or double      */
-  /*   deletes.  To compile it within your build of the library, you       */
-  /*   should define FT_DEBUG_MEMORY here.                                 */
-  /*                                                                       */
-  /*   Note that the memory debugger is only activated at runtime when     */
-  /*   when the _environment_ variable "FT2_DEBUG_MEMORY" is defined also! */
-  /*                                                                       */
-  /*   Do not #undef this macro here since the build system might define   */
-  /*   it for certain configurations only.                                 */
-  /*                                                                       */
-/* #define FT_DEBUG_MEMORY */
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Module errors                                                         */
-  /*                                                                       */
-  /*   If this macro is set (which is _not_ the default), the higher byte  */
-  /*   of an error code gives the module in which the error has occurred,  */
-  /*   while the lower byte is the real error code.                        */
-  /*                                                                       */
-  /*   Setting this macro makes sense for debugging purposes only, since   */
-  /*   it would break source compatibility of certain programs that use    */
-  /*   FreeType 2.                                                         */
-  /*                                                                       */
-  /*   More details can be found in the files ftmoderr.h and fterrors.h.   */
-  /*                                                                       */
-#undef FT_CONFIG_OPTION_USE_MODULE_ERRORS
-
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /****                                                                 ****/
-  /****        S F N T   D R I V E R    C O N F I G U R A T I O N       ****/
-  /****                                                                 ****/
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Define TT_CONFIG_OPTION_EMBEDDED_BITMAPS if you want to support       */
-  /* embedded bitmaps in all formats using the SFNT module (namely         */
-  /* TrueType & OpenType).                                                 */
-  /*                                                                       */
-#define TT_CONFIG_OPTION_EMBEDDED_BITMAPS
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Define TT_CONFIG_OPTION_POSTSCRIPT_NAMES if you want to be able to    */
-  /* load and enumerate the glyph Postscript names in a TrueType or        */
-  /* OpenType file.                                                        */
-  /*                                                                       */
-  /* Note that when you do not compile the `PSNames' module by undefining  */
-  /* the above FT_CONFIG_OPTION_POSTSCRIPT_NAMES, the `sfnt' module will   */
-  /* contain additional code used to read the PS Names table from a font.  */
-  /*                                                                       */
-  /* (By default, the module uses `PSNames' to extract glyph names.)       */
-  /*                                                                       */
-#define TT_CONFIG_OPTION_POSTSCRIPT_NAMES
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Define TT_CONFIG_OPTION_SFNT_NAMES if your applications need to       */
-  /* access the internal name table in a SFNT-based format like TrueType   */
-  /* or OpenType.  The name table contains various strings used to         */
-  /* describe the font, like family name, copyright, version, etc.  It     */
-  /* does not contain any glyph name though.                               */
-  /*                                                                       */
-  /* Accessing SFNT names is done through the functions declared in        */
-  /* `freetype/ftnames.h'.                                                 */
-  /*                                                                       */
-#define TT_CONFIG_OPTION_SFNT_NAMES
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* TrueType CMap support                                                 */
-  /*                                                                       */
-  /*   Here you can fine-tune which TrueType CMap table format shall be    */
-  /*   supported.                                                          */
-#define TT_CONFIG_CMAP_FORMAT_0
-#define TT_CONFIG_CMAP_FORMAT_2
-#define TT_CONFIG_CMAP_FORMAT_4
-#define TT_CONFIG_CMAP_FORMAT_6
-#define TT_CONFIG_CMAP_FORMAT_8
-#define TT_CONFIG_CMAP_FORMAT_10
-#define TT_CONFIG_CMAP_FORMAT_12
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /****                                                                 ****/
-  /****    T R U E T Y P E   D R I V E R    C O N F I G U R A T I O N   ****/
-  /****                                                                 ****/
-  /*************************************************************************/
-  /*************************************************************************/
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile   */
-  /* a bytecode interpreter in the TrueType driver.  Note that there are   */
-  /* important patent issues related to the use of the interpreter.        */
-  /*                                                                       */
-  /* By undefining this, you will only compile the code necessary to load  */
-  /* TrueType glyphs without hinting.                                      */
-  /*                                                                       */
-  /*   Do not #undef this macro here, since the build system might         */
-  /*   define it for certain configurations only.                          */
-  /*                                                                       */
-/* #define  TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Define TT_CONFIG_OPTION_UNPATENTED_HINTING (in addition to            */
-  /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER) to compile the unpatented      */
-  /* work-around hinting system.  Note that for the moment, the algorithm  */
-  /* is only used when selected at runtime through the parameter tag       */
-  /* FT_PARAM_TAG_UNPATENTED_HINTING; or when the debug hook               */
-  /* FT_DEBUG_HOOK_UNPATENTED_HINTING is globally actived                  */
-  /*                                                                       */
-#define TT_CONFIG_OPTION_UNPATENTED_HINTING
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Define TT_CONFIG_OPTION_INTERPRETER_SWITCH to compile the TrueType    */
-  /* bytecode interpreter with a huge switch statement, rather than a call */
-  /* table.  This results in smaller and faster code for a number of       */
-  /* architectures.                                                        */
-  /*                                                                       */
-  /* Note however that on some compiler/processor combinations, undefining */
-  /* this macro will generate faster, though larger, code.                 */
-  /*                                                                       */
-#define TT_CONFIG_OPTION_INTERPRETER_SWITCH
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the        */
-  /* TrueType glyph loader to use Apple's definition of how to handle      */
-  /* component offsets in composite glyphs.                                */
-  /*                                                                       */
-  /* Apple and MS disagree on the default behavior of component offsets    */
-  /* in composites.  Apple says that they should be scaled by the scale    */
-  /* factors in the transformation matrix (roughly, it's more complex)     */
-  /* while MS says they should not.  OpenType defines two bits in the      */
-  /* composite flags array which can be used to disambiguate, but old      */
-  /* fonts will not have them.                                             */
-  /*                                                                       */
-  /*   http://partners.adobe.com/asn/developer/opentype/glyf.html          */
-  /*   http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html                 */
-  /*                                                                       */
-#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /****                                                                 ****/
-  /****      T Y P E 1   D R I V E R    C O N F I G U R A T I O N       ****/
-  /****                                                                 ****/
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* T1_MAX_DICT_DEPTH is the maximal depth of nest dictionaries and       */
-  /* arrays in the Type 1 stream (see t1load.c).  A minimum of 4 is        */
-  /* required.                                                             */
-  /*                                                                       */
-#define T1_MAX_DICT_DEPTH  5
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine   */
-  /* calls during glyph loading.                                           */
-  /*                                                                       */
-#define T1_MAX_SUBRS_CALLS  16
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity.  A     */
-  /* minimum of 16 is required.                                            */
-  /*                                                                       */
-  /* The Chinese font MingTiEG-Medium (CNS 11643 character set) needs 256. */
-  /*                                                                       */
-#define T1_MAX_CHARSTRINGS_OPERANDS  256
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Define this configuration macro if you want to prevent the            */
-  /* compilation of `t1afm', which is in charge of reading Type 1 AFM      */
-  /* files into an existing face.  Note that if set, the T1 driver will be */
-  /* unable to produce kerning distances.                                  */
-  /*                                                                       */
-#undef T1_CONFIG_OPTION_NO_AFM
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Define this configuration macro if you want to prevent the            */
-  /* compilation of the Multiple Masters font support in the Type 1        */
-  /* driver.                                                               */
-  /*                                                                       */
-#undef T1_CONFIG_OPTION_NO_MM_SUPPORT
-
- /* */
-
-/*
- * The FT_CONFIG_OPTION_CHESTER_XXXX macros are used to toggle some recent
- * improvements to the auto-hinter contributed by David Chester.  They will
- * most likely disappear completely in the next release.  For now, you
- * should always keep them defined.
- *
- */
-#define  FT_CONFIG_OPTION_CHESTER_HINTS
-
-#ifdef   FT_CONFIG_OPTION_CHESTER_HINTS
-
-#define  FT_CONFIG_CHESTER_SMALL_F
-#define  FT_CONFIG_CHESTER_ASCENDER
-#define  FT_CONFIG_CHESTER_SERIF
-#define  FT_CONFIG_CHESTER_STEM
-#define  FT_CONFIG_CHESTER_BLUE_SCALE
-
-#endif /* FT_CONFIG_OPTION_CHESTER_HINTS */
-
-FT_END_HEADER
-
-
-#endif /* __FTOPTION_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/config/ftstdlib.h b/extra_lib/include/freetype/freetype/config/ftstdlib.h
deleted file mode 100644
index 239bcf4..0000000
--- a/extra_lib/include/freetype/freetype/config/ftstdlib.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftstdlib.h                                                             */
-/*                                                                         */
-/*    ANSI-specific library and header configuration file (specification   */
-/*    only).                                                               */
-/*                                                                         */
-/*  Copyright 2002, 2003 by                                                */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* This file is used to group all #includes to the ANSI C library that   */
-  /* FreeType normally requires.  It also defines macros to rename the     */
-  /* standard functions within the FreeType source code.                   */
-  /*                                                                       */
-  /* Load a file which defines __FTSTDLIB_H__ before this one to override  */
-  /* it.                                                                   */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-#ifndef __FTSTDLIB_H__
-#define __FTSTDLIB_H__
-
-
-  /**********************************************************************/
-  /*                                                                    */
-  /*                           integer limits                           */
-  /*                                                                    */
-  /* UINT_MAX and ULONG_MAX are used to automatically compute the size  */
-  /* of `int' and `long' in bytes at compile-time.  So far, this works  */
-  /* for all platforms the library has been tested on.                  */
-  /*                                                                    */
-  /* Note that on the extremely rare platforms that do not provide      */
-  /* integer types that are _exactly_ 16 and 32 bits wide (e.g. some    */
-  /* old Crays where `int' is 36 bits), we do not make any guarantee    */
-  /* about the correct behaviour of FT2 with all fonts.                 */
-  /*                                                                    */
-  /* In these case, "ftconfig.h" will refuse to compile anyway with a   */
-  /* message like "couldn't find 32-bit type" or something similar.     */
-  /*                                                                    */
-  /* IMPORTANT NOTE: We do not define aliases for heap management and   */
-  /*                 i/o routines (i.e. malloc/free/fopen/fread/...)    */
-  /*                 since these functions should all be encapsulated   */
-  /*                 by platform-specific implementations of            */
-  /*                 "ftsystem.c".                                      */
-  /*                                                                    */
-  /**********************************************************************/
-
-
-#include <limits.h>
-
-#define FT_UINT_MAX   UINT_MAX
-#define FT_ULONG_MAX  ULONG_MAX
-
-
-  /**********************************************************************/
-  /*                                                                    */
-  /*                 character and string processing                    */
-  /*                                                                    */
-  /**********************************************************************/
-
-
-#include <ctype.h>
-
-#define ft_isalnum   isalnum
-#define ft_isupper   isupper
-#define ft_islower   islower
-#define ft_isdigit   isdigit
-#define ft_isxdigit  isxdigit
-
-
-#include <string.h>
-
-#define ft_strlen   strlen
-#define ft_strcat   strcat
-#define ft_strcmp   strcmp
-#define ft_strncmp  strncmp
-#define ft_memcpy   memcpy
-#define ft_strcpy   strcpy
-#define ft_strncpy  strncpy
-#define ft_memset   memset
-#define ft_memmove  memmove
-#define ft_memcmp   memcmp
-
-#include <stdio.h>
-
-#define ft_sprintf  sprintf
-
-
-  /**********************************************************************/
-  /*                                                                    */
-  /*                             sorting                                */
-  /*                                                                    */
-  /**********************************************************************/
-
-
-#include <stdlib.h>
-
-#define ft_qsort  qsort
-#define ft_exit   exit    /* only used to exit from unhandled exceptions */
-
-#define ft_atoi   atoi
-
-
-  /**********************************************************************/
-  /*                                                                    */
-  /*                         execution control                          */
-  /*                                                                    */
-  /**********************************************************************/
-
-
-#include <setjmp.h>
-
-#define ft_jmp_buf  jmp_buf   /* note: this cannot be a typedef since */
-                              /*       jmp_buf is defined as a macro  */
-                              /*       on certain platforms           */
-
-#define ft_setjmp   setjmp    /* same thing here */
-#define ft_longjmp  longjmp   /* "               */
-
-/*avoids warning..*/
-#include <stddef.h>
-#ifndef offsetof
-#define offsetof(s,m) ((size_t)&(((s*)0)->m))
-#endif
-
-  /* the following is only used for debugging purposes, i.e. when */
-  /* FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined     */
-  /*                                                              */
-#include <stdarg.h>
-
-
-#endif /* __FTSTDLIB_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/freetype.h b/extra_lib/include/freetype/freetype/freetype.h
deleted file mode 100644
index 285d8ef..0000000
--- a/extra_lib/include/freetype/freetype/freetype.h
+++ /dev/null
@@ -1,2986 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  freetype.h                                                             */
-/*                                                                         */
-/*    FreeType high-level API and common types (specification only).       */
-/*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003 by                                     */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef FT_FREETYPE_H
-#error "`ft2build.h' hasn't been included yet!"
-#error "Please always use macros to include FreeType header files."
-#error "Example:"
-#error "  #include <ft2build.h>"
-#error "  #include FT_FREETYPE_H"
-#endif
-
-
-#ifndef __FREETYPE_H__
-#define __FREETYPE_H__
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* The `raster' component duplicates some of the declarations in         */
-  /* freetype.h for stand-alone use if _FREETYPE_ isn't defined.           */
-  /*                                                                       */
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* The FREETYPE_MAJOR and FREETYPE_MINOR macros are used to version the  */
-  /* new FreeType design, which is able to host several kinds of font      */
-  /* drivers.  It starts at 2.0.                                           */
-  /*                                                                       */
-#define FREETYPE_MAJOR 2
-#define FREETYPE_MINOR 1
-#define FREETYPE_PATCH 7
-
-
-#include <ft2build.h>
-#include FT_CONFIG_CONFIG_H
-#include FT_ERRORS_H
-#include FT_TYPES_H
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*                                                                       */
-  /*                        B A S I C   T Y P E S                          */
-  /*                                                                       */
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    base_interface                                                     */
-  /*                                                                       */
-  /* <Title>                                                               */
-  /*    Base Interface                                                     */
-  /*                                                                       */
-  /* <Abstract>                                                            */
-  /*    The FreeType 2 base font interface.                                */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This section describes the public high-level API of FreeType 2.    */
-  /*                                                                       */
-  /* <Order>                                                               */
-  /*    FT_Library                                                         */
-  /*    FT_Face                                                            */
-  /*    FT_Size                                                            */
-  /*    FT_GlyphSlot                                                       */
-  /*    FT_CharMap                                                         */
-  /*    FT_Encoding                                                        */
-  /*                                                                       */
-  /*    FT_FaceRec                                                         */
-  /*                                                                       */
-  /*    FT_FACE_FLAG_SCALABLE                                              */
-  /*    FT_FACE_FLAG_FIXED_SIZES                                           */
-  /*    FT_FACE_FLAG_FIXED_WIDTH                                           */
-  /*    FT_FACE_FLAG_HORIZONTAL                                            */
-  /*    FT_FACE_FLAG_VERTICAL                                              */
-  /*    FT_FACE_FLAG_SFNT                                                  */
-  /*    FT_FACE_FLAG_KERNING                                               */
-  /*    FT_FACE_FLAG_MULTIPLE_MASTERS                                      */
-  /*    FT_FACE_FLAG_GLYPH_NAMES                                           */
-  /*    FT_FACE_FLAG_EXTERNAL_STREAM                                       */
-  /*    FT_FACE_FLAG_FAST_GLYPHS                                           */
-  /*                                                                       */
-  /*    FT_STYLE_FLAG_BOLD                                                 */
-  /*    FT_STYLE_FLAG_ITALIC                                               */
-  /*                                                                       */
-  /*    FT_SizeRec                                                         */
-  /*    FT_Size_Metrics                                                    */
-  /*                                                                       */
-  /*    FT_GlyphSlotRec                                                    */
-  /*    FT_Glyph_Metrics                                                   */
-  /*    FT_SubGlyph                                                        */
-  /*                                                                       */
-  /*    FT_Bitmap_Size                                                     */
-  /*                                                                       */
-  /*    FT_Init_FreeType                                                   */
-  /*    FT_Done_FreeType                                                   */
-  /*    FT_Library_Version                                                 */
-  /*                                                                       */
-  /*    FT_New_Face                                                        */
-  /*    FT_Done_Face                                                       */
-  /*    FT_New_Memory_Face                                                 */
-  /*    FT_Open_Face                                                       */
-  /*    FT_Open_Args                                                       */
-  /*    FT_Parameter                                                       */
-  /*    FT_Attach_File                                                     */
-  /*    FT_Attach_Stream                                                   */
-  /*                                                                       */
-  /*    FT_Set_Char_Size                                                   */
-  /*    FT_Set_Pixel_Sizes                                                 */
-  /*    FT_Set_Transform                                                   */
-  /*    FT_Load_Glyph                                                      */
-  /*    FT_Get_Char_Index                                                  */
-  /*    FT_Get_Name_Index                                                  */
-  /*    FT_Load_Char                                                       */
-  /*                                                                       */
-  /*    FT_OPEN_MEMORY                                                     */
-  /*    FT_OPEN_STREAM                                                     */
-  /*    FT_OPEN_PATHNAME                                                   */
-  /*    FT_OPEN_DRIVER                                                     */
-  /*    FT_OPEN_PARAMS                                                     */
-  /*                                                                       */
-  /*    FT_LOAD_DEFAULT                                                    */
-  /*    FT_LOAD_RENDER                                                     */
-  /*    FT_LOAD_MONOCHROME                                                 */
-  /*    FT_LOAD_LINEAR_DESIGN                                              */
-  /*    FT_LOAD_NO_SCALE                                                   */
-  /*    FT_LOAD_NO_HINTING                                                 */
-  /*    FT_LOAD_NO_BITMAP                                                  */
-  /*    FT_LOAD_CROP_BITMAP                                                */
-  /*                                                                       */
-  /*    FT_LOAD_VERTICAL_LAYOUT                                            */
-  /*    FT_LOAD_IGNORE_TRANSFORM                                           */
-  /*    FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH                                */
-  /*    FT_LOAD_FORCE_AUTOHINT                                             */
-  /*    FT_LOAD_NO_RECURSE                                                 */
-  /*    FT_LOAD_PEDANTIC                                                   */
-  /*                                                                       */
-  /*    FT_LOAD_TARGET_NORMAL                                              */
-  /*    FT_LOAD_TARGET_LIGHT                                               */
-  /*    FT_LOAD_TARGET_MONO                                                */
-  /*    FT_LOAD_TARGET_LCD                                                 */
-  /*    FT_LOAD_TARGET_LCD_V                                               */
-  /*                                                                       */
-  /*    FT_Render_Glyph                                                    */
-  /*    FT_Render_Mode                                                     */
-  /*    FT_Get_Kerning                                                     */
-  /*    FT_Kerning_Mode                                                    */
-  /*    FT_Get_Glyph_Name                                                  */
-  /*    FT_Get_Postscript_Name                                             */
-  /*                                                                       */
-  /*    FT_CharMapRec                                                      */
-  /*    FT_Select_Charmap                                                  */
-  /*    FT_Set_Charmap                                                     */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_Glyph_Metrics                                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure used to model the metrics of a single glyph.  The      */
-  /*    values are expressed in 26.6 fractional pixel format; if the flag  */
-  /*    FT_LOAD_NO_SCALE is used, values are returned in font units        */
-  /*    instead.                                                           */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    width        :: The glyph's width.                                 */
-  /*                                                                       */
-  /*    height       :: The glyph's height.                                */
-  /*                                                                       */
-  /*    horiBearingX :: Horizontal left side bearing.                      */
-  /*                                                                       */
-  /*    horiBearingY :: Horizontal top side bearing.                       */
-  /*                                                                       */
-  /*    horiAdvance  :: Horizontal advance width.                          */
-  /*                                                                       */
-  /*    vertBearingX :: Vertical left side bearing.                        */
-  /*                                                                       */
-  /*    vertBearingY :: Vertical top side bearing.                         */
-  /*                                                                       */
-  /*    vertAdvance  :: Vertical advance height.                           */
-  /*                                                                       */
-  typedef struct  FT_Glyph_Metrics_
-  {
-    FT_Pos  width;         /* glyph width  */
-    FT_Pos  height;        /* glyph height */
-
-    FT_Pos  horiBearingX;  /* left side bearing in horizontal layouts */
-    FT_Pos  horiBearingY;  /* top side bearing in horizontal layouts  */
-    FT_Pos  horiAdvance;   /* advance width for horizontal layout     */
-
-    FT_Pos  vertBearingX;  /* left side bearing in vertical layouts */
-    FT_Pos  vertBearingY;  /* top side bearing in vertical layouts  */
-    FT_Pos  vertAdvance;   /* advance height for vertical layout    */
-
-  } FT_Glyph_Metrics;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_Bitmap_Size                                                     */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This structure models the size of a bitmap strike (i.e., a bitmap  */
-  /*    instance of the font for a given resolution) in a fixed-size font  */
-  /*    face.  It is used for the `available_sizes' field of the           */
-  /*    @FT_FaceRec structure.                                             */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    height :: The (vertical) baseline-to-baseline distance in pixels.  */
-  /*              It makes most sense to define the height of a bitmap     */
-  /*              font in this way.                                        */
-  /*                                                                       */
-  /*    width  :: The average width of the font (in pixels).  Since the    */
-  /*              algorithms to compute this value are different for the   */
-  /*              various bitmap formats, it can only give an additional   */
-  /*              hint if the `height' value isn't sufficient to select    */
-  /*              the proper font.  For monospaced fonts the average width */
-  /*              is the same as the maximum width.                        */
-  /*                                                                       */
-  /*    size   :: The point size in 26.6 fractional format this font shall */
-  /*              represent (for a given vertical resolution).             */
-  /*                                                                       */
-  /*    x_ppem :: The horizontal ppem value (in 26.6 fractional format).   */
-  /*                                                                       */
-  /*    y_ppem :: The vertical ppem value (in 26.6 fractional format).     */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The values in this structure are taken from the bitmap font.  If   */
-  /*    the font doesn't provide a parameter it is set to zero to indicate */
-  /*    that the information is not available.                             */
-  /*                                                                       */
-  /*    The following formula converts from dpi to ppem:                   */
-  /*                                                                       */
-  /*      ppem = size * dpi / 72                                           */
-  /*                                                                       */
-  /*    where `size' is in points.                                         */
-  /*                                                                       */
-  /*    Windows FNT:                                                       */
-  /*      The `size', `x_ppem', and `y_ppem' parameters are not reliable:  */
-  /*      There exist fonts (e.g. app850.fon) which have a wrong size for  */
-  /*      some subfonts; since FNT files don't contain ppem but dpi values */
-  /*      the computed x_ppem and y_ppem numbers are thus wrong also.      */
-  /*                                                                       */
-  /*    TrueType embedded bitmaps:                                         */
-  /*      `size', `width', and `height' values are not contained in the    */
-  /*      bitmap strike itself.  They are computed from the global font    */
-  /*      parameters.                                                      */
-  /*                                                                       */
-  typedef struct  FT_Bitmap_Size_
-  {
-    FT_Short  height;
-    FT_Short  width;
-
-    FT_Pos    size;
-
-    FT_Pos    x_ppem;
-    FT_Pos    y_ppem;
-
-  } FT_Bitmap_Size;
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*                                                                       */
-  /*                     O B J E C T   C L A S S E S                       */
-  /*                                                                       */
-  /*************************************************************************/
-  /*************************************************************************/
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_Library                                                         */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A handle to a FreeType library instance.  Each `library' is        */
-  /*    completely independent from the others; it is the `root' of a set  */
-  /*    of objects like fonts, faces, sizes, etc.                          */
-  /*                                                                       */
-  /*    It also embeds a memory manager (see @FT_Memory), as well as a     */
-  /*    scan-line converter object (see @FT_Raster).                       */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    Library objects are normally created by @FT_Init_FreeType, and     */
-  /*    destroyed with @FT_Done_FreeType.                                  */
-  /*                                                                       */
-  typedef struct FT_LibraryRec_  *FT_Library;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_Module                                                          */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A handle to a given FreeType module object.  Each module can be a  */
-  /*    font driver, a renderer, or anything else that provides services   */
-  /*    to the formers.                                                    */
-  /*                                                                       */
-  typedef struct FT_ModuleRec_*  FT_Module;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_Driver                                                          */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A handle to a given FreeType font driver object.  Each font driver */
-  /*    is a special module capable of creating faces from font files.     */
-  /*                                                                       */
-  typedef struct FT_DriverRec_*  FT_Driver;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_Renderer                                                        */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A handle to a given FreeType renderer.  A renderer is a special    */
-  /*    module in charge of converting a glyph image to a bitmap, when     */
-  /*    necessary.  Each renderer supports a given glyph image format, and */
-  /*    one or more target surface depths.                                 */
-  /*                                                                       */
-  typedef struct FT_RendererRec_*  FT_Renderer;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_Face                                                            */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A handle to a given typographic face object.  A face object models */
-  /*    a given typeface, in a given style.                                */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    Each face object also owns a single @FT_GlyphSlot object, as well  */
-  /*    as one or more @FT_Size objects.                                   */
-  /*                                                                       */
-  /*    Use @FT_New_Face or @FT_Open_Face to create a new face object from */
-  /*    a given filepathname or a custom input stream.                     */
-  /*                                                                       */
-  /*    Use @FT_Done_Face to destroy it (along with its slot and sizes).   */
-  /*                                                                       */
-  /* <Also>                                                                */
-  /*    The @FT_FaceRec details the publicly accessible fields of a given  */
-  /*    face object.                                                       */
-  /*                                                                       */
-  typedef struct FT_FaceRec_*  FT_Face;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_Size                                                            */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A handle to a given size object.  Such an object models the data   */
-  /*    that depends on the current _resolution_ and _character size_ in a */
-  /*    given @FT_Face.                                                    */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    Each face object owns one or more sizes.  There is however a       */
-  /*    single _active_ size for the face at any time that will be used by */
-  /*    functions like @FT_Load_Glyph, @FT_Get_Kerning, etc.               */
-  /*                                                                       */
-  /*    You can use the @FT_Activate_Size API to change the current        */
-  /*    active size of any given face.                                     */
-  /*                                                                       */
-  /* <Also>                                                                */
-  /*    The @FT_SizeRec structure details the publicly accessible fields   */
-  /*    of a given face object.                                            */
-  /*                                                                       */
-  typedef struct FT_SizeRec_*  FT_Size;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_GlyphSlot                                                       */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A handle to a given `glyph slot'.  A slot is a container where it  */
-  /*    is possible to load any one of the glyphs contained in its parent  */
-  /*    face.                                                              */
-  /*                                                                       */
-  /*    In other words, each time you call @FT_Load_Glyph or               */
-  /*    @FT_Load_Char, the slot's content is erased by the new glyph data, */
-  /*    i.e. the glyph's metrics, its image (bitmap or outline), and       */
-  /*    other control information.                                         */
-  /*                                                                       */
-  /* <Also>                                                                */
-  /*    @FT_GlyphSlotRec details the publicly accessible glyph fields.     */
-  /*                                                                       */
-  typedef struct FT_GlyphSlotRec_*  FT_GlyphSlot;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_CharMap                                                         */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A handle to a given character map.  A charmap is used to translate */
-  /*    character codes in a given encoding into glyph indexes for its     */
-  /*    parent's face.  Some font formats may provide several charmaps per */
-  /*    font.                                                              */
-  /*                                                                       */
-  /*    Each face object owns zero or more charmaps, but only one of them  */
-  /*    can be "active" and used by @FT_Get_Char_Index or @FT_Load_Char.   */
-  /*                                                                       */
-  /*    The list of available charmaps in a face is available through the  */
-  /*    "face->num_charmaps" and "face->charmaps" fields of @FT_FaceRec.   */
-  /*                                                                       */
-  /*    The currently active charmap is available as "face->charmap".      */
-  /*    You should call @FT_Set_Charmap to change it.                      */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    When a new face is created (either through @FT_New_Face or         */
-  /*    @FT_Open_Face), the library looks for a Unicode charmap within     */
-  /*    the list and automatically activates it.                           */
-  /*                                                                       */
-  /* <Also>                                                                */
-  /*    The @FT_CharMapRec details the publicly accessible fields of a     */
-  /*    given character map.                                               */
-  /*                                                                       */
-  typedef struct FT_CharMapRec_*  FT_CharMap;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Macro>                                                               */
-  /*    FT_ENC_TAG                                                         */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This macro converts four letter tags into an unsigned long.  It is */
-  /*    used to define "encoding" identifiers (see @FT_Encoding).          */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    Since many 16bit compilers don't like 32bit enumerations, you      */
-  /*    should redefine this macro in case of problems to something like   */
-  /*    this:                                                              */
-  /*                                                                       */
-  /*      #define FT_ENC_TAG( value, a, b, c, d )  (value)                 */
-  /*                                                                       */
-  /*    to get a simple enumeration without assigning special numbers.     */
-  /*                                                                       */
-
-#ifndef FT_ENC_TAG
-#define FT_ENC_TAG( value, a, b, c, d )         \
-          value = ( ( (FT_UInt32)(a) << 24 ) |  \
-                    ( (FT_UInt32)(b) << 16 ) |  \
-                    ( (FT_UInt32)(c) <<  8 ) |  \
-                      (FT_UInt32)(d)         )
-
-#endif /* FT_ENC_TAG */
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Enum>                                                                */
-  /*    FT_Encoding                                                        */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    An enumeration used to specify encodings supported by charmaps.    */
-  /*    Used in the @FT_Select_Charmap API function.                       */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    Because of 32-bit charcodes defined in Unicode (i.e., surrogates), */
-  /*    all character codes must be expressed as FT_Longs.                 */
-  /*                                                                       */
-  /*    The values of this type correspond to specific character           */
-  /*    repertories (i.e. charsets), and not to text encoding methods      */
-  /*    (like UTF-8, UTF-16, GB2312_EUC, etc.).                            */
-  /*                                                                       */
-  /*    Other encodings might be defined in the future.                    */
-  /*                                                                       */
-  /* <Values>                                                              */
-  /*   FT_ENCODING_NONE ::                                                 */
-  /*     The encoding value 0 is reserved.                                 */
-  /*                                                                       */
-  /*   FT_ENCODING_UNICODE ::                                              */
-  /*     Corresponds to the Unicode character set.  This value covers      */
-  /*     all versions of the Unicode repertoire, including ASCII and       */
-  /*     Latin-1.  Most fonts include a Unicode charmap, but not all       */
-  /*     of them.                                                          */
-  /*                                                                       */
-  /*   FT_ENCODING_MS_SYMBOL ::                                            */
-  /*     Corresponds to the Microsoft Symbol encoding, used to encode      */
-  /*     mathematical symbols in the 32..255 character code range.  For    */
-  /*     more information, see `http://www.ceviz.net/symbol.htm'.          */
-  /*                                                                       */
-  /*   FT_ENCODING_SJIS ::                                                 */
-  /*     Corresponds to Japanese SJIS encoding.  More info at              */
-  /*     at `http://langsupport.japanreference.com/encoding.shtml'.        */
-  /*     See note on multi-byte encodings below.                           */
-  /*                                                                       */
-  /*   FT_ENCODING_GB2312 ::                                               */
-  /*     Corresponds to an encoding system for Simplified Chinese as used  */
-  /*     used in mainland China.                                           */
-  /*                                                                       */
-  /*   FT_ENCODING_BIG5 ::                                                 */
-  /*     Corresponds to an encoding system for Traditional Chinese as used */
-  /*     in Taiwan and Hong Kong.                                          */
-  /*                                                                       */
-  /*   FT_ENCODING_WANSUNG ::                                              */
-  /*     Corresponds to the Korean encoding system known as Wansung.       */
-  /*     For more information see                                          */
-  /*     `http://www.microsoft.com/typography/unicode/949.txt'.            */
-  /*                                                                       */
-  /*   FT_ENCODING_JOHAB ::                                                */
-  /*     The Korean standard character set (KS C-5601-1992), which         */
-  /*     corresponds to MS Windows code page 1361.  This character set     */
-  /*     includes all possible Hangeul character combinations.             */
-  /*                                                                       */
-  /*   FT_ENCODING_ADOBE_LATIN_1 ::                                        */
-  /*     Corresponds to a Latin-1 encoding as defined in a Type 1          */
-  /*     Postscript font.  It is limited to 256 character codes.           */
-  /*                                                                       */
-  /*   FT_ENCODING_ADOBE_STANDARD ::                                       */
-  /*     Corresponds to the Adobe Standard encoding, as found in Type 1,   */
-  /*     CFF, and OpenType/CFF fonts.  It is limited to 256 character      */
-  /*     codes.                                                            */
-  /*                                                                       */
-  /*   FT_ENCODING_ADOBE_EXPERT ::                                         */
-  /*     Corresponds to the Adobe Expert encoding, as found in Type 1,     */
-  /*     CFF, and OpenType/CFF fonts.  It is limited to 256 character      */
-  /*     codes.                                                            */
-  /*                                                                       */
-  /*   FT_ENCODING_ADOBE_CUSTOM ::                                         */
-  /*     Corresponds to a custom encoding, as found in Type 1, CFF, and    */
-  /*     OpenType/CFF fonts.  It is limited to 256 character codes.        */
-  /*                                                                       */
-  /*   FT_ENCODING_APPLE_ROMAN ::                                          */
-  /*     Corresponds to the 8-bit Apple roman encoding.  Many TrueType and */
-  /*     OpenType fonts contain a charmap for this encoding, since older   */
-  /*     versions of Mac OS are able to use it.                            */
-  /*                                                                       */
-  /*   FT_ENCODING_OLD_LATIN_2 ::                                          */
-  /*     This value is deprecated and was never used nor reported by       */
-  /*     FreeType.  Don't use or test for it.                              */
-  /*                                                                       */
-  /*   FT_ENCODING_MS_SJIS ::                                              */
-  /*     Same as FT_ENCODING_SJIS.  Deprecated.                            */
-  /*                                                                       */
-  /*   FT_ENCODING_MS_GB2312 ::                                            */
-  /*     Same as FT_ENCODING_GB2312.  Deprecated.                          */
-  /*                                                                       */
-  /*   FT_ENCODING_MS_BIG5 ::                                              */
-  /*     Same as FT_ENCODING_BIG5.  Deprecated.                            */
-  /*                                                                       */
-  /*   FT_ENCODING_MS_WANSUNG ::                                           */
-  /*     Same as FT_ENCODING_WANSUNG.  Deprecated.                         */
-  /*                                                                       */
-  /*   FT_ENCODING_MS_JOHAB ::                                             */
-  /*     Same as FT_ENCODING_JOHAB.  Deprecated.                           */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*   By default, FreeType automatically synthetizes a Unicode charmap    */
-  /*   for Postscript fonts, using their glyph names dictionaries.         */
-  /*   However, it will also report the encodings defined explicitly in    */
-  /*   the font file, for the cases when they are needed, with the Adobe   */
-  /*   values as well.                                                     */
-  /*                                                                       */
-  typedef enum  FT_Encoding_
-  {
-    FT_ENC_TAG( FT_ENCODING_NONE, 0, 0, 0, 0 ),
-
-    FT_ENC_TAG( FT_ENCODING_MS_SYMBOL,  's', 'y', 'm', 'b' ),
-    FT_ENC_TAG( FT_ENCODING_UNICODE,    'u', 'n', 'i', 'c' ),
-
-    FT_ENC_TAG( FT_ENCODING_SJIS,    's', 'j', 'i', 's' ),
-    FT_ENC_TAG( FT_ENCODING_GB2312,  'g', 'b', ' ', ' ' ),
-    FT_ENC_TAG( FT_ENCODING_BIG5,    'b', 'i', 'g', '5' ),
-    FT_ENC_TAG( FT_ENCODING_WANSUNG, 'w', 'a', 'n', 's' ),
-    FT_ENC_TAG( FT_ENCODING_JOHAB,   'j', 'o', 'h', 'a' ),
-
-    /* for backwards compatibility */
-    FT_ENCODING_MS_SJIS    = FT_ENCODING_SJIS,
-    FT_ENCODING_MS_GB2312  = FT_ENCODING_GB2312,
-    FT_ENCODING_MS_BIG5    = FT_ENCODING_BIG5,
-    FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG,
-    FT_ENCODING_MS_JOHAB   = FT_ENCODING_JOHAB,
-
-    FT_ENC_TAG( FT_ENCODING_ADOBE_STANDARD, 'A', 'D', 'O', 'B' ),
-    FT_ENC_TAG( FT_ENCODING_ADOBE_EXPERT,   'A', 'D', 'B', 'E' ),
-    FT_ENC_TAG( FT_ENCODING_ADOBE_CUSTOM,   'A', 'D', 'B', 'C' ),
-    FT_ENC_TAG( FT_ENCODING_ADOBE_LATIN_1,  'l', 'a', 't', '1' ),
-
-    FT_ENC_TAG( FT_ENCODING_OLD_LATIN_2, 'l', 'a', 't', '2' ),
-
-    FT_ENC_TAG( FT_ENCODING_APPLE_ROMAN, 'a', 'r', 'm', 'n' )
-
-  } FT_Encoding;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Enum>                                                                */
-  /*    ft_encoding_xxx                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    These constants are deprecated; use the corresponding @FT_Encoding */
-  /*    values instead.                                                    */
-  /*                                                                       */
-  /* <Values>                                                              */
-  /*   ft_encoding_none    :: see @FT_ENCODING_NONE                        */
-  /*   ft_encoding_unicode :: see @FT_ENCODING_UNICODE                     */
-  /*   ft_encoding_latin_2 :: see @FT_ENCODING_OLD_LATIN_2                 */
-  /*   ft_encoding_symbol  :: see @FT_ENCODING_MS_SYMBOL                   */
-  /*   ft_encoding_sjis    :: see @FT_ENCODING_SJIS                        */
-  /*   ft_encoding_gb2312  :: see @FT_ENCODING_GB2312                      */
-  /*   ft_encoding_big5    :: see @FT_ENCODING_BIG5                        */
-  /*   ft_encoding_wansung :: see @FT_ENCODING_WANSUNG                     */
-  /*   ft_encoding_johab   :: see @FT_ENCODING_JOHAB                       */
-  /*                                                                       */
-  /*   ft_encoding_adobe_standard :: see @FT_ENCODING_ADOBE_STANDARD       */
-  /*   ft_encoding_adobe_expert   :: see @FT_ENCODING_ADOBE_EXPERT         */
-  /*   ft_encoding_adobe_custom   :: see @FT_ENCODING_ADOBE_CUSTOM         */
-  /*   ft_encoding_latin_1        :: see @FT_ENCODING_ADOBE_LATIN_1        */
-  /*                                                                       */
-  /*   ft_encoding_apple_roman    :: see @FT_ENCODING_APPLE_ROMAN          */
-  /*                                                                       */
-#define ft_encoding_none            FT_ENCODING_NONE
-#define ft_encoding_unicode         FT_ENCODING_UNICODE
-#define ft_encoding_symbol          FT_ENCODING_MS_SYMBOL
-#define ft_encoding_latin_1         FT_ENCODING_ADOBE_LATIN_1
-#define ft_encoding_latin_2         FT_ENCODING_OLD_LATIN_2
-#define ft_encoding_sjis            FT_ENCODING_SJIS
-#define ft_encoding_gb2312          FT_ENCODING_GB2312
-#define ft_encoding_big5            FT_ENCODING_BIG5
-#define ft_encoding_wansung         FT_ENCODING_WANSUNG
-#define ft_encoding_johab           FT_ENCODING_JOHAB
-
-#define ft_encoding_adobe_standard  FT_ENCODING_ADOBE_STANDARD
-#define ft_encoding_adobe_expert    FT_ENCODING_ADOBE_EXPERT
-#define ft_encoding_adobe_custom    FT_ENCODING_ADOBE_CUSTOM
-#define ft_encoding_apple_roman     FT_ENCODING_APPLE_ROMAN
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_CharMapRec                                                      */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    The base charmap structure.                                        */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    face        :: A handle to the parent face object.                 */
-  /*                                                                       */
-  /*    encoding    :: An @FT_Encoding tag identifying the charmap.  Use   */
-  /*                   this with @FT_Select_Charmap.                       */
-  /*                                                                       */
-  /*    platform_id :: An ID number describing the platform for the        */
-  /*                   following encoding ID.  This comes directly from    */
-  /*                   the TrueType specification and should be emulated   */
-  /*                   for other formats.                                  */
-  /*                                                                       */
-  /*    encoding_id :: A platform specific encoding number.  This also     */
-  /*                   comes from the TrueType specification and should be */
-  /*                   emulated similarly.                                 */
-  /*                                                                       */
-  typedef struct  FT_CharMapRec_
-  {
-    FT_Face      face;
-    FT_Encoding  encoding;
-    FT_UShort    platform_id;
-    FT_UShort    encoding_id;
-
-  } FT_CharMapRec;
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*                                                                       */
-  /*                 B A S E   O B J E C T   C L A S S E S                 */
-  /*                                                                       */
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_Face_Internal                                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    An opaque handle to an FT_Face_InternalRec structure, used to      */
-  /*    model private data of a given @FT_Face object.                     */
-  /*                                                                       */
-  /*    This structure might change between releases of FreeType 2 and is  */
-  /*    not generally available to client applications.                    */
-  /*                                                                       */
-  typedef struct FT_Face_InternalRec_*  FT_Face_Internal;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_FaceRec                                                         */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    FreeType root face class structure.  A face object models the      */
-  /*    resolution and point-size independent data found in a font file.   */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    num_faces           :: In the case where the face is located in a  */
-  /*                           collection (i.e., a file which embeds       */
-  /*                           several faces), this is the total number of */
-  /*                           faces found in the resource.  1 by default. */
-  /*                                                                       */
-  /*    face_index          :: The index of the face in its font file.     */
-  /*                           Usually, this is 0 for all normal font      */
-  /*                           formats.  It can be more in the case of     */
-  /*                           collections (which embed several fonts in a */
-  /*                           single resource/file).                      */
-  /*                                                                       */
-  /*    face_flags          :: A set of bit flags that give important      */
-  /*                           information about the face; see the         */
-  /*                           @FT_FACE_FLAG_XXX constants for details.    */
-  /*                                                                       */
-  /*    style_flags         :: A set of bit flags indicating the style of  */
-  /*                           the face (i.e., italic, bold, underline,    */
-  /*                           etc).  See the @FT_STYLE_FLAG_XXX           */
-  /*                           constants.                                  */
-  /*                                                                       */
-  /*    num_glyphs          :: The total number of glyphs in the face.     */
-  /*                                                                       */
-  /*    family_name         :: The face's family name.  This is an ASCII   */
-  /*                           string, usually in English, which describes */
-  /*                           the typeface's family (like `Times New      */
-  /*                           Roman', `Bodoni', `Garamond', etc).  This   */
-  /*                           is a least common denominator used to list  */
-  /*                           fonts.  Some formats (TrueType & OpenType)  */
-  /*                           provide localized and Unicode versions of   */
-  /*                           this string.  Applications should use the   */
-  /*                           format specific interface to access them.   */
-  /*                                                                       */
-  /*    style_name          :: The face's style name.  This is an ASCII    */
-  /*                           string, usually in English, which describes */
-  /*                           the typeface's style (like `Italic',        */
-  /*                           `Bold', `Condensed', etc).  Not all font    */
-  /*                           formats provide a style name, so this field */
-  /*                           is optional, and can be set to NULL.  As    */
-  /*                           for `family_name', some formats provide     */
-  /*                           localized/Unicode versions of this string.  */
-  /*                           Applications should use the format specific */
-  /*                           interface to access them.                   */
-  /*                                                                       */
-  /*    num_fixed_sizes     :: The number of fixed sizes available in this */
-  /*                           face.  This should be set to 0 for scalable */
-  /*                           fonts, unless its face includes a set of    */
-  /*                           glyphs (called a `strike') for the          */
-  /*                           specified sizes.                            */
-  /*                                                                       */
-  /*    available_sizes     :: An array of sizes specifying the available  */
-  /*                           bitmap/graymap sizes that are contained in  */
-  /*                           in the font face.  Should be set to NULL if */
-  /*                           the field `num_fixed_sizes' is set to 0.    */
-  /*                                                                       */
-  /*    num_charmaps        :: The total number of character maps in the   */
-  /*                           face.                                       */
-  /*                                                                       */
-  /*    charmaps            :: A table of pointers to the face's charmaps. */
-  /*                           Used to scan the list of available charmaps */
-  /*                           -- this table might change after a call to  */
-  /*                           @FT_Attach_File or @FT_Attach_Stream (e.g.  */
-  /*                           if used to hook an additional encoding or   */
-  /*                           CMap to the face object).                   */
-  /*                                                                       */
-  /*    generic             :: A field reserved for client uses.  See the  */
-  /*                           @FT_Generic type description.               */
-  /*                                                                       */
-  /*    bbox                :: The font bounding box.  Coordinates are     */
-  /*                           expressed in font units (see units_per_EM). */
-  /*                           The box is large enough to contain any      */
-  /*                           glyph from the font.  Thus, bbox.yMax can   */
-  /*                           be seen as the `maximal ascender',          */
-  /*                           bbox.yMin as the `minimal descender', and   */
-  /*                           the maximal glyph width is given by         */
-  /*                           `bbox.xMax-bbox.xMin' (not to be confused   */
-  /*                           with the maximal _advance_width_).  Only    */
-  /*                           relevant for scalable formats.              */
-  /*                                                                       */
-  /*    units_per_EM        :: The number of font units per EM square for  */
-  /*                           this face.  This is typically 2048 for      */
-  /*                           TrueType fonts, 1000 for Type1 fonts, and   */
-  /*                           should be set to the (unrealistic) value 1  */
-  /*                           for fixed-sizes fonts.  Only relevant for   */
-  /*                           scalable formats.                           */
-  /*                                                                       */
-  /*    ascender            :: The face's ascender is the vertical         */
-  /*                           distance from the baseline to the topmost   */
-  /*                           point of any glyph in the face.  This       */
-  /*                           field's value is positive, expressed in     */
-  /*                           font units.  Some font designs use a value  */
-  /*                           different from `bbox.yMax'.  Only relevant  */
-  /*                           for scalable formats.                       */
-  /*                                                                       */
-  /*    descender           :: The face's descender is the vertical        */
-  /*                           distance from the baseline to the           */
-  /*                           bottommost point of any glyph in the face.  */
-  /*                           This field's value is *negative* for values */
-  /*                           below the baseline.  It is expressed in     */
-  /*                           font units.  Some font designs use a value  */
-  /*                           different from `bbox.yMin'.  Only relevant  */
-  /*                           for scalable formats.                       */
-  /*                                                                       */
-  /*    height              :: The face's height is the vertical distance  */
-  /*                           from one baseline to the next when writing  */
-  /*                           several lines of text.  Its value is always */
-  /*                           positive, expressed in font units.  The     */
-  /*                           value can be computed as                    */
-  /*                           `ascender+descender+line_gap' where the     */
-  /*                           value of `line_gap' is also called          */
-  /*                           `external leading'.  Only relevant for      */
-  /*                           scalable formats.                           */
-  /*                                                                       */
-  /*    max_advance_width   :: The maximal advance width, in font units,   */
-  /*                           for all glyphs in this face.  This can be   */
-  /*                           used to make word wrapping computations     */
-  /*                           faster.  Only relevant for scalable         */
-  /*                           formats.                                    */
-  /*                                                                       */
-  /*    max_advance_height  :: The maximal advance height, in font units,  */
-  /*                           for all glyphs in this face.  This is only  */
-  /*                           relevant for vertical layouts, and should   */
-  /*                           be set to the `height' for fonts that do    */
-  /*                           not provide vertical metrics.  Only         */
-  /*                           relevant for scalable formats.              */
-  /*                                                                       */
-  /*    underline_position  :: The position, in font units, of the         */
-  /*                           underline line for this face.  It's the     */
-  /*                           center of the underlining stem.  Only       */
-  /*                           relevant for scalable formats.              */
-  /*                                                                       */
-  /*    underline_thickness :: The thickness, in font units, of the        */
-  /*                           underline for this face.  Only relevant for */
-  /*                           scalable formats.                           */
-  /*                                                                       */
-  /*    glyph               :: The face's associated glyph slot(s).  This  */
-  /*                           object is created automatically with a new  */
-  /*                           face object.  However, certain kinds of     */
-  /*                           applications (mainly tools like converters) */
-  /*                           can need more than one slot to ease their   */
-  /*                           task.                                       */
-  /*                                                                       */
-  /*    size                :: The current active size for this face.      */
-  /*                                                                       */
-  /*    charmap             :: The current active charmap for this face.   */
-  /*                                                                       */
-  typedef struct  FT_FaceRec_
-  {
-    FT_Long           num_faces;
-    FT_Long           face_index;
-
-    FT_Long           face_flags;
-    FT_Long           style_flags;
-
-    FT_Long           num_glyphs;
-
-    FT_String*        family_name;
-    FT_String*        style_name;
-
-    FT_Int            num_fixed_sizes;
-    FT_Bitmap_Size*   available_sizes;
-
-    FT_Int            num_charmaps;
-    FT_CharMap*       charmaps;
-
-    FT_Generic        generic;
-
-    /*# the following are only relevant to scalable outlines */
-    FT_BBox           bbox;
-
-    FT_UShort         units_per_EM;
-    FT_Short          ascender;
-    FT_Short          descender;
-    FT_Short          height;
-
-    FT_Short          max_advance_width;
-    FT_Short          max_advance_height;
-
-    FT_Short          underline_position;
-    FT_Short          underline_thickness;
-
-    FT_GlyphSlot      glyph;
-    FT_Size           size;
-    FT_CharMap        charmap;
-
-    /*@private begin */
-
-    FT_Driver         driver;
-    FT_Memory         memory;
-    FT_Stream         stream;
-
-    FT_ListRec        sizes_list;
-
-    FT_Generic        autohint;
-    void*             extensions;
-
-    FT_Face_Internal  internal;
-
-    /*@private end */
-
-  } FT_FaceRec;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Enum>                                                                */
-  /*    FT_FACE_FLAG_XXX                                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A list of bit flags used in the 'face_flags' field of the          */
-  /*    @FT_FaceRec structure.  They inform client applications of         */
-  /*    properties of the corresponding face.                              */
-  /*                                                                       */
-  /* <Values>                                                              */
-  /*    FT_FACE_FLAG_SCALABLE ::                                           */
-  /*      Indicates that the face provides vectorial outlines.  This       */
-  /*      doesn't prevent embedded bitmaps, i.e., a face can have both     */
-  /*      this bit and @FT_FACE_FLAG_FIXED_SIZES set.                      */
-  /*                                                                       */
-  /*    FT_FACE_FLAG_FIXED_SIZES ::                                        */
-  /*      Indicates that the face contains `fixed sizes', i.e., bitmap     */
-  /*      strikes for some given pixel sizes.  See the `num_fixed_sizes'   */
-  /*      and `available_sizes' fields of @FT_FaceRec.                     */
-  /*                                                                       */
-  /*    FT_FACE_FLAG_FIXED_WIDTH ::                                        */
-  /*      Indicates that the face contains fixed-width characters (like    */
-  /*      Courier, Lucido, MonoType, etc.).                                */
-  /*                                                                       */
-  /*    FT_FACE_FLAG_SFNT ::                                               */
-  /*      Indicates that the face uses the `sfnt' storage scheme.  For     */
-  /*      now, this means TrueType and OpenType.                           */
-  /*                                                                       */
-  /*    FT_FACE_FLAG_HORIZONTAL ::                                         */
-  /*      Indicates that the face contains horizontal glyph metrics.  This */
-  /*      should be set for all common formats.                            */
-  /*                                                                       */
-  /*    FT_FACE_FLAG_VERTICAL ::                                           */
-  /*      Indicates that the face contains vertical glyph metrics.  This   */
-  /*      is only available in some formats, not all of them.              */
-  /*                                                                       */
-  /*    FT_FACE_FLAG_KERNING ::                                            */
-  /*      Indicates that the face contains kerning information.  If set,   */
-  /*      the kerning distance can be retrieved through the function       */
-  /*      @FT_Get_Kerning.  Note that if unset, this function will always  */
-  /*      return the vector (0,0).                                         */
-  /*                                                                       */
-  /*    FT_FACE_FLAG_FAST_GLYPHS ::                                        */
-  /*      THIS FLAG IS DEPRECATED.  DO NOT USE OR TEST IT.                 */
-  /*                                                                       */
-  /*    FT_FACE_FLAG_MULTIPLE_MASTERS ::                                   */
-  /*      Indicates that the font contains multiple masters and is capable */
-  /*      of interpolating between them.  See the multiple-masters         */
-  /*      specific API for details.                                        */
-  /*                                                                       */
-  /*    FT_FACE_FLAG_GLYPH_NAMES ::                                        */
-  /*      Indicates that the font contains glyph names that can be         */
-  /*      retrieved through @FT_Get_Glyph_Name.  Note that some TrueType   */
-  /*      fonts contain broken glyph name tables.  Use the function        */
-  /*      @FT_Has_PS_Glyph_Names when needed.                              */
-  /*                                                                       */
-  /*    FT_FACE_FLAG_EXTERNAL_STREAM ::                                    */
-  /*      Used internally by FreeType to indicate that a face's stream was */
-  /*      provided by the client application and should not be destroyed   */
-  /*      when @FT_Done_Face is called.  Don't read or test this flag.     */
-  /*                                                                       */
-#define FT_FACE_FLAG_SCALABLE          ( 1L <<  0 )
-#define FT_FACE_FLAG_FIXED_SIZES       ( 1L <<  1 )
-#define FT_FACE_FLAG_FIXED_WIDTH       ( 1L <<  2 )
-#define FT_FACE_FLAG_SFNT              ( 1L <<  3 )
-#define FT_FACE_FLAG_HORIZONTAL        ( 1L <<  4 )
-#define FT_FACE_FLAG_VERTICAL          ( 1L <<  5 )
-#define FT_FACE_FLAG_KERNING           ( 1L <<  6 )
-#define FT_FACE_FLAG_FAST_GLYPHS       ( 1L <<  7 )
-#define FT_FACE_FLAG_MULTIPLE_MASTERS  ( 1L <<  8 )
-#define FT_FACE_FLAG_GLYPH_NAMES       ( 1L <<  9 )
-#define FT_FACE_FLAG_EXTERNAL_STREAM   ( 1L << 10 )
-
-  /* */
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_HAS_HORIZONTAL( face )                                          */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro that returns true whenever a face object contains          */
-  /*    horizontal metrics (this is true for all font formats though).     */
-  /*                                                                       */
-  /* @also:                                                                */
-  /*    @FT_HAS_VERTICAL can be used to check for vertical metrics.        */
-  /*                                                                       */
-#define FT_HAS_HORIZONTAL( face ) \
-          ( face->face_flags & FT_FACE_FLAG_HORIZONTAL )
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_HAS_VERTICAL( face )                                            */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro that returns true whenever a face object contains vertical */
-  /*    metrics.                                                           */
-  /*                                                                       */
-#define FT_HAS_VERTICAL( face ) \
-          ( face->face_flags & FT_FACE_FLAG_VERTICAL )
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_HAS_KERNING( face )                                             */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro that returns true whenever a face object contains kerning  */
-  /*    data that can be accessed with @FT_Get_Kerning.                    */
-  /*                                                                       */
-#define FT_HAS_KERNING( face ) \
-          ( face->face_flags & FT_FACE_FLAG_KERNING )
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_IS_SCALABLE( face )                                             */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro that returns true whenever a face object contains a        */
-  /*    scalable font face (true for TrueType, Type 1, CID, and            */
-  /*    OpenType/CFF font formats.                                         */
-  /*                                                                       */
-#define FT_IS_SCALABLE( face ) \
-          ( face->face_flags & FT_FACE_FLAG_SCALABLE )
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_IS_SFNT( face )                                                 */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro that returns true whenever a face object contains a font   */
-  /*    whose format is based on the SFNT storage scheme.  This usually    */
-  /*    means: TrueType fonts, OpenType fonts, as well as SFNT-based       */
-  /*    embedded bitmap fonts.                                             */
-  /*                                                                       */
-  /*    If this macro is true, all functions defined in @FT_SFNT_NAMES_H   */
-  /*    and @FT_TRUETYPE_TABLES_H are available.                           */
-  /*                                                                       */
-#define FT_IS_SFNT( face ) \
-          ( face->face_flags & FT_FACE_FLAG_SFNT )
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_IS_FIXED_WIDTH( face )                                          */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro that returns true whenever a face object contains a font   */
-  /*    face that contains fixed-width (or "monospace", "fixed-pitch",     */
-  /*    etc.) glyphs.                                                      */
-  /*                                                                       */
-#define FT_IS_FIXED_WIDTH( face ) \
-          ( face->face_flags & FT_FACE_FLAG_FIXED_WIDTH )
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_HAS_FIXED_SIZES( face )                                         */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro that returns true whenever a face object contains some     */
-  /*    embedded bitmaps.  See the `available_sizes' field of the          */
-  /*    @FT_FaceRec structure.                                             */
-  /*                                                                       */
-#define FT_HAS_FIXED_SIZES( face ) \
-          ( face->face_flags & FT_FACE_FLAG_FIXED_SIZES )
-
-
-   /* */
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_HAS_FAST_GLYPHS( face )                                         */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    Deprecated; indicates that the face contains so-called "fast"      */
-  /*    glyph bitmaps.                                                     */
-  /*                                                                       */
-#define FT_HAS_FAST_GLYPHS( face ) \
-          ( face->face_flags & FT_FACE_FLAG_FAST_GLYPHS )
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_HAS_GLYPH_NAMES( face )                                         */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro that returns true whenever a face object contains some     */
-  /*    glyph names that can be accessed through @FT_Get_Glyph_Name.       */
-  /*                                                                       */
-#define FT_HAS_GLYPH_NAMES( face ) \
-          ( face->face_flags & FT_FACE_FLAG_GLYPH_NAMES )
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_HAS_MULTIPLE_MASTERS( face )                                    */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A macro that returns true whenever a face object contains some     */
-  /*    multiple masters.  The functions provided by                       */
-  /*    @FT_MULTIPLE_MASTERS_H are then available to choose the exact      */
-  /*    design you want.                                                   */
-  /*                                                                       */
-#define FT_HAS_MULTIPLE_MASTERS( face ) \
-          ( face->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS )
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Constant>                                                            */
-  /*    FT_STYLE_FLAG_XXX                                                  */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A list of bit-flags used to indicate the style of a given face.    */
-  /*    These are used in the `style_flags' field of @FT_FaceRec.          */
-  /*                                                                       */
-  /* <Values>                                                              */
-  /*    FT_STYLE_FLAG_ITALIC ::                                            */
-  /*      Indicates that a given face is italicized.                       */
-  /*                                                                       */
-  /*    FT_STYLE_FLAG_BOLD ::                                              */
-  /*      Indicates that a given face is bold.                             */
-  /*                                                                       */
-#define FT_STYLE_FLAG_ITALIC  ( 1 << 0 )
-#define FT_STYLE_FLAG_BOLD    ( 1 << 1 )
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_Size_Internal                                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    An opaque handle to an FT_Size_InternalRec structure, used to      */
-  /*    model private data of a given FT_Size object.                      */
-  /*                                                                       */
-  typedef struct FT_Size_InternalRec_*  FT_Size_Internal;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_Size_Metrics                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    The size metrics structure returned scaled important distances for */
-  /*    a given size object.                                               */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    x_ppem       :: The character width, expressed in integer pixels.  */
-  /*                    This is the width of the EM square expressed in    */
-  /*                    pixels, hence the term `ppem' (pixels per EM).     */
-  /*                                                                       */
-  /*    y_ppem       :: The character height, expressed in integer pixels. */
-  /*                    This is the height of the EM square expressed in   */
-  /*                    pixels, hence the term `ppem' (pixels per EM).     */
-  /*                                                                       */
-  /*    x_scale      :: A simple 16.16 fixed point format coefficient used */
-  /*                    to scale horizontal distances expressed in font    */
-  /*                    units to fractional (26.6) pixel coordinates.      */
-  /*                                                                       */
-  /*    y_scale      :: A simple 16.16 fixed point format coefficient used */
-  /*                    to scale vertical distances expressed in font      */
-  /*                    units to fractional (26.6) pixel coordinates.      */
-  /*                                                                       */
-  /*    ascender     :: The ascender, expressed in 26.6 fixed point        */
-  /*                    pixels.  Positive for ascenders above the          */
-  /*                    baseline.                                          */
-  /*                                                                       */
-  /*    descender    :: The descender, expressed in 26.6 fixed point       */
-  /*                    pixels.  Negative for descenders below the         */
-  /*                    baseline.                                          */
-  /*                                                                       */
-  /*    height       :: The text height, expressed in 26.6 fixed point     */
-  /*                    pixels.  Always positive.                          */
-  /*                                                                       */
-  /*    max_advance  :: Maximum horizontal advance, expressed in 26.6      */
-  /*                    fixed point pixels.  Always positive.              */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    For scalable fonts, the values of `ascender', `descender', and     */
-  /*    `height' are scaled versions of `face->ascender',                  */
-  /*    `face->descender', and `face->height', respectively.               */
-  /*                                                                       */
-  /*    Unfortunately, due to glyph hinting, these values might not be     */
-  /*    exact for certain fonts.  They thus must be treated as unreliable  */
-  /*    with an error margin of at least one pixel!                        */
-  /*                                                                       */
-  /*    Indeed, the only way to get the exact pixel ascender and descender */
-  /*    is to render _all_ glyphs.  As this would be a definite            */
-  /*    performance hit, it is up to client applications to perform such   */
-  /*    computations.                                                      */
-  /*                                                                       */
-  typedef struct  FT_Size_Metrics_
-  {
-    FT_UShort  x_ppem;      /* horizontal pixels per EM               */
-    FT_UShort  y_ppem;      /* vertical pixels per EM                 */
-
-    FT_Fixed   x_scale;     /* two scales used to convert font units  */
-    FT_Fixed   y_scale;     /* to 26.6 frac. pixel coordinates        */
-
-    FT_Pos     ascender;    /* ascender in 26.6 frac. pixels          */
-    FT_Pos     descender;   /* descender in 26.6 frac. pixels         */
-    FT_Pos     height;      /* text height in 26.6 frac. pixels       */
-    FT_Pos     max_advance; /* max horizontal advance, in 26.6 pixels */
-
-  } FT_Size_Metrics;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_SizeRec                                                         */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    FreeType root size class structure.  A size object models the      */
-  /*    resolution and pointsize dependent data of a given face.           */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    face    :: Handle to the parent face object.                       */
-  /*                                                                       */
-  /*    generic :: A typeless pointer, which is unused by the FreeType     */
-  /*               library or any of its drivers.  It can be used by       */
-  /*               client applications to link their own data to each size */
-  /*               object.                                                 */
-  /*                                                                       */
-  /*    metrics :: Metrics for this size object.  This field is read-only. */
-  /*                                                                       */
-  typedef struct  FT_SizeRec_
-  {
-    FT_Face           face;      /* parent face object              */
-    FT_Generic        generic;   /* generic pointer for client uses */
-    FT_Size_Metrics   metrics;   /* size metrics                    */
-    FT_Size_Internal  internal;
-
-  } FT_SizeRec;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_SubGlyph                                                        */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    The subglyph structure is an internal object used to describe      */
-  /*    subglyphs (for example, in the case of composites).                */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The subglyph implementation is not part of the high-level API,     */
-  /*    hence the forward structure declaration.                           */
-  /*                                                                       */
-  typedef struct FT_SubGlyphRec_*  FT_SubGlyph;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_Slot_Internal                                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    An opaque handle to an FT_Slot_InternalRec structure, used to      */
-  /*    model private data of a given FT_GlyphSlot object.                 */
-  /*                                                                       */
-  typedef struct FT_Slot_InternalRec_*  FT_Slot_Internal;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_GlyphSlotRec                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    FreeType root glyph slot class structure.  A glyph slot is a       */
-  /*    container where individual glyphs can be loaded, be they           */
-  /*    vectorial or bitmap/graymaps.                                      */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    library           :: A handle to the FreeType library instance     */
-  /*                         this slot belongs to.                         */
-  /*                                                                       */
-  /*    face              :: A handle to the parent face object.           */
-  /*                                                                       */
-  /*    next              :: In some cases (like some font tools), several */
-  /*                         glyph slots per face object can be a good     */
-  /*                         thing.  As this is rare, the glyph slots are  */
-  /*                         listed through a direct, single-linked list   */
-  /*                         using its `next' field.                       */
-  /*                                                                       */
-  /*    generic           :: A typeless pointer which is unused by the     */
-  /*                         FreeType library or any of its drivers.  It   */
-  /*                         can be used by client applications to link    */
-  /*                         their own data to each glyph slot object.     */
-  /*                                                                       */
-  /*    metrics           :: The metrics of the last loaded glyph in the   */
-  /*                         slot.  The returned values depend on the last */
-  /*                         load flags (see the @FT_Load_Glyph API        */
-  /*                         function) and can be expressed either in 26.6 */
-  /*                         fractional pixels or font units.              */
-  /*                                                                       */
-  /*                         Note that even when the glyph image is        */
-  /*                         transformed, the metrics are not.             */
-  /*                                                                       */
-  /*    linearHoriAdvance :: For scalable formats only, this field holds   */
-  /*                         the linearly scaled horizontal advance width  */
-  /*                         for the glyph (i.e. the scaled and unhinted   */
-  /*                         value of the hori advance).  This can be      */
-  /*                         important to perform correct WYSIWYG layout.  */
-  /*                                                                       */
-  /*                         Note that this value is expressed by default  */
-  /*                         in 16.16 pixels. However, when the glyph is   */
-  /*                         loaded with the FT_LOAD_LINEAR_DESIGN flag,   */
-  /*                         this field contains simply the value of the   */
-  /*                         advance in original font units.               */
-  /*                                                                       */
-  /*    linearVertAdvance :: For scalable formats only, this field holds   */
-  /*                         the linearly scaled vertical advance height   */
-  /*                         for the glyph.  See linearHoriAdvance for     */
-  /*                         comments.                                     */
-  /*                                                                       */
-  /*    advance           :: This is the transformed advance width for the */
-  /*                         glyph.                                        */
-  /*                                                                       */
-  /*    format            :: This field indicates the format of the image  */
-  /*                         contained in the glyph slot.  Typically       */
-  /*                         FT_GLYPH_FORMAT_BITMAP,                       */
-  /*                         FT_GLYPH_FORMAT_OUTLINE, and                  */
-  /*                         FT_GLYPH_FORMAT_COMPOSITE, but others are     */
-  /*                         possible.                                     */
-  /*                                                                       */
-  /*    bitmap            :: This field is used as a bitmap descriptor     */
-  /*                         when the slot format is                       */
-  /*                         FT_GLYPH_FORMAT_BITMAP.  Note that the        */
-  /*                         address and content of the bitmap buffer can  */
-  /*                         change between calls of @FT_Load_Glyph and a  */
-  /*                         few other functions.                          */
-  /*                                                                       */
-  /*    bitmap_left       :: This is the bitmap's left bearing expressed   */
-  /*                         in integer pixels.  Of course, this is only   */
-  /*                         valid if the format is                        */
-  /*                         FT_GLYPH_FORMAT_BITMAP.                       */
-  /*                                                                       */
-  /*    bitmap_top        :: This is the bitmap's top bearing expressed in */
-  /*                         integer pixels.  Remember that this is the    */
-  /*                         distance from the baseline to the top-most    */
-  /*                         glyph scanline, upwards y-coordinates being   */
-  /*                         *positive*.                                   */
-  /*                                                                       */
-  /*    outline           :: The outline descriptor for the current glyph  */
-  /*                         image if its format is                        */
-  /*                         FT_GLYPH_FORMAT_OUTLINE.                      */
-  /*                                                                       */
-  /*    num_subglyphs     :: The number of subglyphs in a composite glyph. */
-  /*                         This field is only valid for the composite    */
-  /*                         glyph format that should normally only be     */
-  /*                         loaded with the @FT_LOAD_NO_RECURSE flag.     */
-  /*                         For now this is internal to FreeType.         */
-  /*                                                                       */
-  /*    subglyphs         :: An array of subglyph descriptors for          */
-  /*                         composite glyphs.  There are `num_subglyphs'  */
-  /*                         elements in there.  Currently internal to     */
-  /*                         FreeType.                                     */
-  /*                                                                       */
-  /*    control_data      :: Certain font drivers can also return the      */
-  /*                         control data for a given glyph image (e.g.    */
-  /*                         TrueType bytecode, Type 1 charstrings, etc.). */
-  /*                         This field is a pointer to such data.         */
-  /*                                                                       */
-  /*    control_len       :: This is the length in bytes of the control    */
-  /*                         data.                                         */
-  /*                                                                       */
-  /*    other             :: Really wicked formats can use this pointer to */
-  /*                         present their own glyph image to client apps. */
-  /*                         Note that the app will need to know about the */
-  /*                         image format.                                 */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    If @FT_Load_Glyph is called with default flags (see                */
-  /*    @FT_LOAD_DEFAULT) the glyph image is loaded in the glyph slot in   */
-  /*    its native format (e.g. a vectorial outline for TrueType and       */
-  /*    Type 1 formats).                                                   */
-  /*                                                                       */
-  /*    This image can later be converted into a bitmap by calling         */
-  /*    @FT_Render_Glyph.  This function finds the current renderer for    */
-  /*    the native image's format then invokes it.                         */
-  /*                                                                       */
-  /*    The renderer is in charge of transforming the native image through */
-  /*    the slot's face transformation fields, then convert it into a      */
-  /*    bitmap that is returned in `slot->bitmap'.                         */
-  /*                                                                       */
-  /*    Note that `slot->bitmap_left' and `slot->bitmap_top' are also used */
-  /*    to specify the position of the bitmap relative to the current pen  */
-  /*    position (e.g. coordinates [0,0] on the baseline).  Of course,     */
-  /*    `slot->format' is also changed to `FT_GLYPH_FORMAT_BITMAP' .       */
-  /*                                                                       */
-  typedef struct  FT_GlyphSlotRec_
-  {
-    FT_Library        library;
-    FT_Face           face;
-    FT_GlyphSlot      next;
-    FT_UInt           reserved;       /* retained for binary compatibility */
-    FT_Generic        generic;
-
-    FT_Glyph_Metrics  metrics;
-    FT_Fixed          linearHoriAdvance;
-    FT_Fixed          linearVertAdvance;
-    FT_Vector         advance;
-
-    FT_Glyph_Format   format;
-
-    FT_Bitmap         bitmap;
-    FT_Int            bitmap_left;
-    FT_Int            bitmap_top;
-
-    FT_Outline        outline;
-
-    FT_UInt           num_subglyphs;
-    FT_SubGlyph       subglyphs;
-
-    void*             control_data;
-    long              control_len;
-
-    void*             other;
-
-    FT_Slot_Internal  internal;
-
-  } FT_GlyphSlotRec;
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*                                                                       */
-  /*                         F U N C T I O N S                             */
-  /*                                                                       */
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Init_FreeType                                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Initializes a new FreeType library object.  The set of modules     */
-  /*    that are registered by this function is determined at build time.  */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    alibrary :: A handle to a new library object.                      */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Init_FreeType( FT_Library  *alibrary );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Library_Version                                                 */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Return the version of the FreeType library being used.  This is    */
-  /*    useful when dynamically linking to the library, since one cannot   */
-  /*    use the macros FT_FREETYPE_MAJOR, FT_FREETYPE_MINOR, and           */
-  /*    FT_FREETYPE_PATCH.                                                 */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    library :: A source library handle.                                */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    amajor :: The major version number.                                */
-  /*                                                                       */
-  /*    aminor :: The minor version number.                                */
-  /*                                                                       */
-  /*    apatch :: The patch version number.                                */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The reason why this function takes a 'library' argument is because */
-  /*    certain programs implement library initialization in a custom way  */
-  /*    that doesn't use `FT_Init_FreeType'.                               */
-  /*                                                                       */
-  /*    In such cases, the library version might not be available before   */
-  /*    the library object has been created.                               */
-  /*                                                                       */
-  FT_EXPORT( void )
-  FT_Library_Version( FT_Library   library,
-                      FT_Int      *amajor,
-                      FT_Int      *aminor,
-                      FT_Int      *apatch );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Done_FreeType                                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Destroys a given FreeType library object and all of its childs,    */
-  /*    including resources, drivers, faces, sizes, etc.                   */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    library :: A handle to the target library object.                  */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Done_FreeType( FT_Library  library );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Enum>                                                                */
-  /*    FT_OPEN_XXX                                                        */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A list of bit-field constants used within the `flags' field of the */
-  /*    @FT_Open_Args structure.                                           */
-  /*                                                                       */
-  /* <Values>                                                              */
-  /*    FT_OPEN_MEMORY      :: This is a memory-based stream.              */
-  /*                                                                       */
-  /*    FT_OPEN_STREAM      :: Copy the stream from the `stream' field.    */
-  /*                                                                       */
-  /*    FT_OPEN_PATHNAME    :: Create a new input stream from a C          */
-  /*                           path name.                                  */
-  /*                                                                       */
-  /*    FT_OPEN_DRIVER      :: Use the `driver' field.                     */
-  /*                                                                       */
-  /*    FT_OPEN_PARAMS      :: Use the `num_params' & `params' field.      */
-  /*                                                                       */
-  /*    ft_open_memory      :: Deprecated; use @FT_OPEN_MEMORY instead.    */
-  /*                                                                       */
-  /*    ft_open_stream      :: Deprecated; use @FT_OPEN_STREAM instead.    */
-  /*                                                                       */
-  /*    ft_open_pathname    :: Deprecated; use @FT_OPEN_PATHNAME instead.  */
-  /*                                                                       */
-  /*    ft_open_driver      :: Deprecated; use @FT_OPEN_DRIVER instead.    */
-  /*                                                                       */
-  /*    ft_open_params      :: Deprecated; use @FT_OPEN_PARAMS instead.    */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The `FT_OPEN_MEMORY', `FT_OPEN_STREAM', and `FT_OPEN_PATHNAME'     */
-  /*    flags are mutually exclusive.                                      */
-  /*                                                                       */
-#define FT_OPEN_MEMORY    0x1
-#define FT_OPEN_STREAM    0x2
-#define FT_OPEN_PATHNAME  0x4
-#define FT_OPEN_DRIVER    0x8
-#define FT_OPEN_PARAMS    0x10
-
-#define ft_open_memory    FT_OPEN_MEMORY     /* deprecated */
-#define ft_open_stream    FT_OPEN_STREAM     /* deprecated */
-#define ft_open_pathname  FT_OPEN_PATHNAME   /* deprecated */
-#define ft_open_driver    FT_OPEN_DRIVER     /* deprecated */
-#define ft_open_params    FT_OPEN_PARAMS     /* deprecated */
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_Parameter                                                       */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A simple structure used to pass more or less generic parameters    */
-  /*    to @FT_Open_Face.                                                  */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    tag  :: A 4-byte identification tag.                               */
-  /*                                                                       */
-  /*    data :: A pointer to the parameter data.                           */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The id and function of parameters are driver-specific.             */
-  /*                                                                       */
-  typedef struct  FT_Parameter_
-  {
-    FT_ULong    tag;
-    FT_Pointer  data;
-
-  } FT_Parameter;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_Open_Args                                                       */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure used to indicate how to open a new font file/stream.   */
-  /*    A pointer to such a structure can be used as a parameter for the   */
-  /*    functions @FT_Open_Face and @FT_Attach_Stream.                     */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    flags       :: A set of bit flags indicating how to use the        */
-  /*                   structure.                                          */
-  /*                                                                       */
-  /*    memory_base :: The first byte of the file in memory.               */
-  /*                                                                       */
-  /*    memory_size :: The size in bytes of the file in memory.            */
-  /*                                                                       */
-  /*    pathname    :: A pointer to an 8-bit file pathname.                */
-  /*                                                                       */
-  /*    stream      :: A handle to a source stream object.                 */
-  /*                                                                       */
-  /*    driver      :: This field is exclusively used by @FT_Open_Face;    */
-  /*                   it simply specifies the font driver to use to open  */
-  /*                   the face.  If set to 0, FreeType will try to load   */
-  /*                   the face with each one of the drivers in its list.  */
-  /*                                                                       */
-  /*    num_params  :: The number of extra parameters.                     */
-  /*                                                                       */
-  /*    params      :: Extra parameters passed to the font driver when     */
-  /*                   opening a new face.                                 */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The stream type is determined by the contents of `flags' which     */
-  /*    are tested in the following order by @FT_Open_Face:                */
-  /*                                                                       */
-  /*    If the `FT_OPEN_MEMORY' bit is set, assume that this is a          */
-  /*    memory file of `memory_size' bytes,located at `memory_address'.    */
-  /*                                                                       */
-  /*    Otherwise, if the `FT_OPEN_STREAM' bit is set, assume that a       */
-  /*    custom input stream `stream' is used.                              */
-  /*                                                                       */
-  /*    Otherwise, if the `FT_OPEN_PATHNAME' bit is set, assume that this  */
-  /*    is a normal file and use `pathname' to open it.                    */
-  /*                                                                       */
-  /*    If the `FT_OPEN_DRIVER' bit is set, @FT_Open_Face will only try to */
-  /*    open the file with the driver whose handler is in `driver'.        */
-  /*                                                                       */
-  /*    If the `FT_OPEN_PARAMS' bit is set, the parameters given by        */
-  /*    `num_params' and `params' will be used.  They are ignored          */
-  /*    otherwise.                                                         */
-  /*                                                                       */
-  typedef struct  FT_Open_Args_
-  {
-    FT_UInt         flags;
-    const FT_Byte*  memory_base;
-    FT_Long         memory_size;
-    FT_String*      pathname;
-    FT_Stream       stream;
-    FT_Module       driver;
-    FT_Int          num_params;
-    FT_Parameter*   params;
-
-  } FT_Open_Args;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_New_Face                                                        */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Creates a new face object from a given resource and typeface index */
-  /*    using a pathname to the font file.                                 */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    library    :: A handle to the library resource.                    */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    pathname   :: A path to the font file.                             */
-  /*                                                                       */
-  /*    face_index :: The index of the face within the resource.  The      */
-  /*                  first face has index 0.                              */
-  /* <Output>                                                              */
-  /*    aface      :: A handle to a new face object.                       */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    Unlike FreeType 1.x, this function automatically creates a glyph   */
-  /*    slot for the face object which can be accessed directly through    */
-  /*    `face->glyph'.                                                     */
-  /*                                                                       */
-  /*    @FT_New_Face can be used to determine and/or check the font format */
-  /*    of a given font resource.  If the `face_index' field is negative,  */
-  /*    the function will _not_ return any face handle in `aface'.  Its    */
-  /*    return value should be 0 if the font format is recognized, or      */
-  /*    non-zero otherwise.                                                */
-  /*                                                                       */
-  /*    Each new face object created with this function also owns a        */
-  /*    default @FT_Size object, accessible as `face->size'.               */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_New_Face( FT_Library   library,
-               const char*  filepathname,
-               FT_Long      face_index,
-               FT_Face     *aface );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_New_Memory_Face                                                 */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Creates a new face object from a given resource and typeface index */
-  /*    using a font file already loaded into memory.                      */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    library    :: A handle to the library resource.                    */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    file_base  :: A pointer to the beginning of the font data.         */
-  /*                                                                       */
-  /*    file_size  :: The size of the memory chunk used by the font data.  */
-  /*                                                                       */
-  /*    face_index :: The index of the face within the resource.  The      */
-  /*                  first face has index 0.                              */
-  /* <Output>                                                              */
-  /*    aface      :: A handle to a new face object.                       */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The font data bytes are used _directly_ by the @FT_Face object.    */
-  /*    This means that they are not copied, and that the client is        */
-  /*    responsible for releasing/destroying them _after_ the              */
-  /*    corresponding call to @FT_Done_Face .                              */
-  /*                                                                       */
-  /*    Unlike FreeType 1.x, this function automatically creates a glyph   */
-  /*    slot for the face object which can be accessed directly through    */
-  /*    `face->glyph'.                                                     */
-  /*                                                                       */
-  /*    @FT_New_Memory_Face can be used to determine and/or check the font */
-  /*    format of a given font resource.  If the `face_index' field is     */
-  /*    negative, the function will _not_ return any face handle in        */
-  /*    `aface'.  Its return value should be 0 if the font format is       */
-  /*    recognized, or non-zero otherwise.                                 */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_New_Memory_Face( FT_Library      library,
-                      const FT_Byte*  file_base,
-                      FT_Long         file_size,
-                      FT_Long         face_index,
-                      FT_Face        *aface );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Open_Face                                                       */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Opens a face object from a given resource and typeface index using */
-  /*    an `FT_Open_Args' structure.  If the face object doesn't exist, it */
-  /*    will be created.                                                   */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    library    :: A handle to the library resource.                    */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    args       :: A pointer to an `FT_Open_Args' structure which must  */
-  /*                  be filled by the caller.                             */
-  /*                                                                       */
-  /*    face_index :: The index of the face within the resource.  The      */
-  /*                  first face has index 0.                              */
-  /* <Output>                                                              */
-  /*    aface      :: A handle to a new face object.                       */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    Unlike FreeType 1.x, this function automatically creates a glyph   */
-  /*    slot for the face object which can be accessed directly through    */
-  /*    `face->glyph'.                                                     */
-  /*                                                                       */
-  /*    @FT_Open_Face can be used to determine and/or check the font      */
-  /*    format of a given font resource.  If the `face_index' field is     */
-  /*    negative, the function will _not_ return any face handle in        */
-  /*    `*face'.  Its return value should be 0 if the font format is       */
-  /*    recognized, or non-zero otherwise.                                 */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Open_Face( FT_Library           library,
-                const FT_Open_Args*  args,
-                FT_Long              face_index,
-                FT_Face             *aface );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Attach_File                                                     */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    `Attaches' a given font file to an existing face.  This is usually */
-  /*    to read additional information for a single face object.  For      */
-  /*    example, it is used to read the AFM files that come with Type 1    */
-  /*    fonts in order to add kerning data and other metrics.              */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    face         :: The target face object.                            */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    filepathname :: An 8-bit pathname naming the `metrics' file.       */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    If your font file is in memory, or if you want to provide your     */
-  /*    own input stream object, use @FT_Attach_Stream.                    */
-  /*                                                                       */
-  /*    The meaning of the `attach' action (i.e., what really happens when */
-  /*    the new file is read) is not fixed by FreeType itself.  It really  */
-  /*    depends on the font format (and thus the font driver).             */
-  /*                                                                       */
-  /*    Client applications are expected to know what they are doing       */
-  /*    when invoking this function.  Most drivers simply do not implement */
-  /*    file attachments.                                                  */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Attach_File( FT_Face      face,
-                  const char*  filepathname );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Attach_Stream                                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This function is similar to @FT_Attach_File with the exception     */
-  /*    that it reads the attachment from an arbitrary stream.             */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    face       :: The target face object.                              */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    parameters :: A pointer to an FT_Open_Args structure used to       */
-  /*                  describe the input stream to FreeType.               */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The meaning of the `attach' (i.e. what really happens when the     */
-  /*    new file is read) is not fixed by FreeType itself.  It really      */
-  /*    depends on the font format (and thus the font driver).             */
-  /*                                                                       */
-  /*    Client applications are expected to know what they are doing       */
-  /*    when invoking this function.  Most drivers simply do not implement */
-  /*    file attachments.                                                  */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Attach_Stream( FT_Face        face,
-                    FT_Open_Args*  parameters );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Done_Face                                                       */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Discards a given face object, as well as all of its child slots    */
-  /*    and sizes.                                                         */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    face :: A handle to a target face object.                          */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Done_Face( FT_Face  face );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Set_Char_Size                                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Sets the character dimensions of a given face object.  The         */
-  /*    `char_width' and `char_height' values are used for the width and   */
-  /*    height, respectively, expressed in 26.6 fractional points.         */
-  /*                                                                       */
-  /*    If the horizontal or vertical resolution values are zero, a        */
-  /*    default value of 72dpi is used.  Similarly, if one of the          */
-  /*    character dimensions is zero, its value is set equal to the other. */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    face            :: A handle to a target face object.               */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    char_width      :: The character width, in 26.6 fractional points. */
-  /*                                                                       */
-  /*    char_height     :: The character height, in 26.6 fractional        */
-  /*                       points.                                         */
-  /*                                                                       */
-  /*    horz_resolution :: The horizontal resolution.                      */
-  /*                                                                       */
-  /*    vert_resolution :: The vertical resolution.                        */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    When dealing with fixed-size faces (i.e., non-scalable formats),   */
-  /*    @FT_Set_Pixel_Sizes provides a more convenient interface.          */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Set_Char_Size( FT_Face     face,
-                    FT_F26Dot6  char_width,
-                    FT_F26Dot6  char_height,
-                    FT_UInt     horz_resolution,
-                    FT_UInt     vert_resolution );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Set_Pixel_Sizes                                                 */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Sets the character dimensions of a given face object.  The width   */
-  /*    and height are expressed in integer pixels.                        */
-  /*                                                                       */
-  /*    If one of the character dimensions is zero, its value is set equal */
-  /*    to the other.                                                      */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    face         :: A handle to the target face object.                */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    pixel_width  :: The character width, in integer pixels.            */
-  /*                                                                       */
-  /*    pixel_height :: The character height, in integer pixels.           */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The values of `pixel_width' and `pixel_height' correspond to the   */
-  /*    pixel values of the _typographic_ character size, which are NOT    */
-  /*    necessarily the same as the dimensions of the glyph `bitmap        */
-  /*    cells'.                                                            */
-  /*                                                                       */
-  /*    The `character size' is really the size of an abstract square      */
-  /*    called the `EM', used to design the font.  However, depending      */
-  /*    on the font design, glyphs will be smaller or greater than the     */
-  /*    EM.                                                                */
-  /*                                                                       */
-  /*    This means that setting the pixel size to, say, 8x8 doesn't        */
-  /*    guarantee in any way that you will get glyph bitmaps that all fit  */
-  /*    within an 8x8 cell (sometimes even far from it).                   */
-  /*                                                                       */
-  /*    For bitmap fonts, `pixel_height' usually is a reliable value for   */
-  /*    the height of the bitmap cell.  Drivers for bitmap font formats    */
-  /*    which contain a single bitmap strike only (BDF, PCF, FNT) ignore   */
-  /*    `pixel_width'.                                                     */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Set_Pixel_Sizes( FT_Face  face,
-                      FT_UInt  pixel_width,
-                      FT_UInt  pixel_height );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Load_Glyph                                                      */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A function used to load a single glyph within a given glyph slot,  */
-  /*    for a given size.                                                  */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    face        :: A handle to the target face object where the glyph  */
-  /*                   will be loaded.                                     */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    glyph_index :: The index of the glyph in the font file.            */
-  /*                                                                       */
-  /*    load_flags  :: A flag indicating what to load for this glyph.  The */
-  /*                   @FT_LOAD_XXX constants can be used to control the   */
-  /*                   glyph loading process (e.g., whether the outline    */
-  /*                   should be scaled, whether to load bitmaps or not,   */
-  /*                   whether to hint the outline, etc).                  */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    If the glyph image is not a bitmap, and if the bit flag            */
-  /*    FT_LOAD_IGNORE_TRANSFORM is unset, the glyph image will be         */
-  /*    transformed with the information passed to a previous call to      */
-  /*    @FT_Set_Transform.                                                 */
-  /*                                                                       */
-  /*    Note that this also transforms the `face.glyph.advance' field, but */
-  /*    *not* the values in `face.glyph.metrics'.                          */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Load_Glyph( FT_Face   face,
-                 FT_UInt   glyph_index,
-                 FT_Int32  load_flags );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Load_Char                                                       */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A function used to load a single glyph within a given glyph slot,  */
-  /*    for a given size, according to its character code.                 */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    face        :: A handle to a target face object where the glyph    */
-  /*                   will be loaded.                                     */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    char_code   :: The glyph's character code, according to the        */
-  /*                   current charmap used in the face.                   */
-  /*                                                                       */
-  /*    load_flags  :: A flag indicating what to load for this glyph.  The */
-  /*                   @FT_LOAD_XXX constants can be used to control the   */
-  /*                   glyph loading process (e.g., whether the outline    */
-  /*                   should be scaled, whether to load bitmaps or not,   */
-  /*                   whether to hint the outline, etc).                  */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    If the face has no current charmap, or if the character code       */
-  /*    is not defined in the charmap, this function will return an        */
-  /*    error.                                                             */
-  /*                                                                       */
-  /*    If the glyph image is not a bitmap, and if the bit flag            */
-  /*    FT_LOAD_IGNORE_TRANSFORM is unset, the glyph image will be         */
-  /*    transformed with the information passed to a previous call to      */
-  /*    @FT_Set_Transform.                                                 */
-  /*                                                                       */
-  /*    Note that this also transforms the `face.glyph.advance' field, but */
-  /*    *not* the values in `face.glyph.metrics'.                          */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Load_Char( FT_Face   face,
-                FT_ULong  char_code,
-                FT_Int32  load_flags );
-
-
- /***************************************************************************
-  *
-  * @enum:
-  *   FT_LOAD_XXX
-  *
-  * @description:
-  *   A list of bit-field constants, used with @FT_Load_Glyph to indicate
-  *   what kind of operations to perform during glyph loading.
-  *
-  * @values:
-  *   FT_LOAD_DEFAULT ::
-  *     Corresponding to 0, this value is used a default glyph load.  In this
-  *     case, the following will happen:
-  *
-  *     1. FreeType looks for a bitmap for the glyph corresponding to the
-  *        face's current size.  If one is found, the function returns.  The
-  *        bitmap data can be accessed from the glyph slot (see note below).
-  *
-  *     2. If no embedded bitmap is searched or found, FreeType looks for a
-  *        scalable outline.  If one is found, it is loaded from the font
-  *        file, scaled to device pixels, then "hinted" to the pixel grid in
-  *        order to optimize it.  The outline data can be accessed from the
-  *        glyph slot (see note below).
-  *
-  *     Note that by default, the glyph loader doesn't render outlines into
-  *     bitmaps.  The following flags are used to modify this default
-  *     behaviour to more specific and useful cases.
-  *
-  *   FT_LOAD_NO_SCALE ::
-  *     Don't scale the vector outline being loaded to 26.6 fractional
-  *     pixels, but kept in font units.  Note that this also disables
-  *     hinting and the loading of embedded bitmaps.  You should only use it
-  *     when you want to retrieve the original glyph outlines in font units.
-  *
-  *   FT_LOAD_NO_HINTING ::
-  *     Don't hint glyph outlines after their scaling to device pixels.
-  *     This generally generates "blurrier" glyphs in anti-aliased modes.
-  *
-  *     This flag is ignored if @FT_LOAD_NO_SCALE is set.
-  *
-  *   FT_LOAD_RENDER ::
-  *     Render the glyph outline immediately into a bitmap before the glyph
-  *     loader returns.  By default, the glyph is rendered for the
-  *     @FT_RENDER_MODE_NORMAL mode, which corresponds to 8-bit anti-aliased
-  *     bitmaps using 256 opacity levels.  You can use either
-  *     @FT_LOAD_TARGET_MONO or @FT_LOAD_MONOCHROME to render 1-bit
-  *     monochrome bitmaps.
-  *
-  *     This flag is ignored if @FT_LOAD_NO_SCALE is set.
-  *
-  *   FT_LOAD_NO_BITMAP ::
-  *     Don't look for bitmaps when loading the glyph.  Only scalable
-  *     outlines will be loaded when available, and scaled, hinted, or
-  *     rendered depending on other bit flags.
-  *
-  *     This does not prevent you from rendering outlines to bitmaps
-  *     with @FT_LOAD_RENDER, however.
-  *
-  *   FT_LOAD_VERTICAL_LAYOUT ::
-  *     Prepare the glyph image for vertical text layout.  This basically
-  *     means that `face.glyph.advance' will correspond to the vertical
-  *     advance height (instead of the default horizontal advance width),
-  *     and that the glyph image will be translated to match the vertical
-  *     bearings positions.
-  *
-  *   FT_LOAD_FORCE_AUTOHINT ::
-  *     Force the use of the FreeType auto-hinter when a glyph outline is
-  *     loaded.  You shouldn't need this in a typical application, since it
-  *     is mostly used to experiment with its algorithm.
-  *
-  *   FT_LOAD_CROP_BITMAP ::
-  *     Indicates that the glyph loader should try to crop the bitmap (i.e.,
-  *     remove all space around its black bits) when loading it.  This is
-  *     only useful when loading embedded bitmaps in certain fonts, since
-  *     bitmaps rendered with @FT_LOAD_RENDER are always cropped by default.
-  *
-  *   FT_LOAD_PEDANTIC ::
-  *     Indicates that the glyph loader should perform pedantic
-  *     verifications during glyph loading, rejecting invalid fonts.  This
-  *     is mostly used to detect broken glyphs in fonts.  By default,
-  *     FreeType tries to handle broken fonts also.
-  *
-  *   FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ::
-  *     Indicates that the glyph loader should ignore the global advance
-  *     width defined in the font.  As far as we know, this is only used by
-  *     the X-TrueType font server, in order to deal correctly with the
-  *     incorrect metrics contained in DynaLab's TrueType CJK fonts.
-  *
-  *   FT_LOAD_NO_RECURSE ::
-  *     This flag is only used internally.  It merely indicates that the
-  *     glyph loader should not load composite glyphs recursively.  Instead,
-  *     it should set the `num_subglyph' and `subglyphs' values of the glyph
-  *     slot accordingly, and set "glyph->format" to
-  *     @FT_GLYPH_FORMAT_COMPOSITE.
-  *
-  *     The description of sub-glyphs is not available to client
-  *     applications for now.
-  *
-  *   FT_LOAD_IGNORE_TRANSFORM ::
-  *     Indicates that the glyph loader should not try to transform the
-  *     loaded glyph image.  This doesn't prevent scaling, hinting, or
-  *     rendering.
-  *
-  *   FT_LOAD_MONOCHROME ::
-  *     This flag is used with @FT_LOAD_RENDER to indicate that you want
-  *     to render a 1-bit monochrome glyph bitmap from a vectorial outline.
-  *
-  *     Note that this has no effect on the hinting algorithm used by the
-  *     glyph loader.  You should better use @FT_LOAD_TARGET_MONO if you
-  *     want to render monochrome-optimized glyph images instead.
-  *
-  *   FT_LOAD_LINEAR_DESIGN ::
-  *     Return the linearly scaled metrics expressed in original font units
-  *     instead of the default 16.16 pixel values.
-  *
-  *   FT_LOAD_NO_AUTOHINT ::
-  *     Indicates that the auto-hinter should never be used to hint glyph
-  *     outlines.  This doesn't prevent native format-specific hinters from
-  *     being used.  This can be important for certain fonts where unhinted
-  *     output is better than auto-hinted one.
-  */
-#define FT_LOAD_DEFAULT                      0x0
-#define FT_LOAD_NO_SCALE                     0x1
-#define FT_LOAD_NO_HINTING                   0x2
-#define FT_LOAD_RENDER                       0x4
-#define FT_LOAD_NO_BITMAP                    0x8
-#define FT_LOAD_VERTICAL_LAYOUT              0x10
-#define FT_LOAD_FORCE_AUTOHINT               0x20
-#define FT_LOAD_CROP_BITMAP                  0x40
-#define FT_LOAD_PEDANTIC                     0x80
-#define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH  0x200
-#define FT_LOAD_NO_RECURSE                   0x400
-#define FT_LOAD_IGNORE_TRANSFORM             0x800
-#define FT_LOAD_MONOCHROME                   0x1000
-#define FT_LOAD_LINEAR_DESIGN                0x2000
-
-  /* temporary hack! */
-#define FT_LOAD_SBITS_ONLY                   0x4000
-#define FT_LOAD_NO_AUTOHINT                  0x8000U
-
-  /* */
-
-
-#define FT_LOAD_TARGET_( x )      ( (FT_Int32)( (x) & 15 ) << 16 )
-#define FT_LOAD_TARGET_MODE( x )  ( (FT_Render_Mode)( ( (x) >> 16 ) & 15 ) )
-
-
- /***************************************************************************
-  *
-  * @enum:
-  *   FT_LOAD_TARGET_XXX
-  *
-  * @description:
-  *   A list of load targets.  XXX
-  *
-  * @values:
-  *   FT_LOAD_TARGET_NORMAL ::
-  *     XXX
-  *
-  *   FT_LOAD_TARGET_LIGHT ::
-  *     XXX
-  *
-  *   FT_LOAD_TARGET_MONO ::
-  *     XXX
-  *
-  *   FT_LOAD_TARGET_LCD ::
-  *     XXX
-  *
-  *   FT_LOAD_TARGET_LCD_V ::
-  *     XXX
-  */
-
-#define FT_LOAD_TARGET_NORMAL     FT_LOAD_TARGET_( FT_RENDER_MODE_NORMAL )
-#define FT_LOAD_TARGET_LIGHT      FT_LOAD_TARGET_( FT_RENDER_MODE_LIGHT  )
-#define FT_LOAD_TARGET_MONO       FT_LOAD_TARGET_( FT_RENDER_MODE_MONO   )
-#define FT_LOAD_TARGET_LCD        FT_LOAD_TARGET_( FT_RENDER_MODE_LCD    )
-#define FT_LOAD_TARGET_LCD_V      FT_LOAD_TARGET_( FT_RENDER_MODE_LCD_V  )
-
-  /* */
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Set_Transform                                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A function used to set the transformation that is applied to glyph */
-  /*    images just before they are converted to bitmaps in a glyph slot   */
-  /*    when @FT_Render_Glyph is called.                                   */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    face   :: A handle to the source face object.                      */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    matrix :: A pointer to the transformation's 2x2 matrix.  Use 0 for */
-  /*              the identity matrix.                                     */
-  /*    delta  :: A pointer to the translation vector.  Use 0 for the null */
-  /*              vector.                                                  */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The transformation is only applied to scalable image formats after */
-  /*    the glyph has been loaded.  It means that hinting is unaltered by  */
-  /*    the transformation and is performed on the character size given in */
-  /*    the last call to @FT_Set_Char_Size or @FT_Set_Pixel_Sizes.         */
-  /*                                                                       */
-  FT_EXPORT( void )
-  FT_Set_Transform( FT_Face     face,
-                    FT_Matrix*  matrix,
-                    FT_Vector*  delta );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Enum>                                                                */
-  /*    FT_Render_Mode                                                     */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    An enumeration type that lists the render modes supported by       */
-  /*    FreeType 2.  Each mode corresponds to a specific type of scanline  */
-  /*    conversion performed on the outline, as well as specific           */
-  /*    hinting optimizations.                                             */
-  /*                                                                       */
-  /*    For bitmap fonts the `bitmap->pixel_mode' field in the             */
-  /*    @FT_GlyphSlotRec structure gives the format of the returned        */
-  /*    bitmap.                                                            */
-  /*                                                                       */
-  /* <Values>                                                              */
-  /*    FT_RENDER_MODE_NORMAL ::                                           */
-  /*      This is the default render mode; it corresponds to 8-bit         */
-  /*      anti-aliased bitmaps, using 256 levels of opacity.               */
-  /*                                                                       */
-  /*    FT_RENDER_MODE_LIGHT ::                                            */
-  /*      This is similar to @FT_RENDER_MODE_NORMAL, except that this      */
-  /*      changes the hinting to prevent stem width quantization.  This    */
-  /*      results in glyph shapes that are more similar to the original,   */
-  /*      while being a bit more fuzzy ("better shapes", instead of        */
-  /*      "better contrast" if you want :-).                               */
-  /*                                                                       */
-  /*    FT_RENDER_MODE_MONO ::                                             */
-  /*      This mode corresponds to 1-bit bitmaps.                          */
-  /*                                                                       */
-  /*    FT_RENDER_MODE_LCD ::                                              */
-  /*      This mode corresponds to horizontal RGB/BGR sub-pixel displays,  */
-  /*      like LCD-screens.  It produces 8-bit bitmaps that are 3 times    */
-  /*      the width of the original glyph outline in pixels, and which use */
-  /*      the @FT_PIXEL_MODE_LCD mode.                                     */
-  /*                                                                       */
-  /*    FT_RENDER_MODE_LCD_V ::                                            */
-  /*      This mode corresponds to vertical RGB/BGR sub-pixel displays     */
-  /*      (like PDA screens, rotated LCD displays, etc.).  It produces     */
-  /*      8-bit bitmaps that are 3 times the height of the original        */
-  /*      glyph outline in pixels and use the @FT_PIXEL_MODE_LCD_V mode.   */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*   The LCD-optimized glyph bitmaps produced by FT_Render_Glyph are     */
-  /*   _not filtered_ to reduce color-fringes.  It is up to the caller to  */
-  /*   perform this pass.                                                  */
-  /*                                                                       */
-  typedef enum  FT_Render_Mode_
-  {
-    FT_RENDER_MODE_NORMAL = 0,
-    FT_RENDER_MODE_LIGHT,
-    FT_RENDER_MODE_MONO,
-    FT_RENDER_MODE_LCD,
-    FT_RENDER_MODE_LCD_V,
-
-    FT_RENDER_MODE_MAX
-
-  } FT_Render_Mode;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Enum>                                                                */
-  /*    ft_render_mode_xxx                                                 */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    These constats are deprecated.  Use the corresponding              */
-  /*    @FT_Render_Mode values instead.                                    */
-  /*                                                                       */
-  /* <Values>                                                              */
-  /*   ft_render_mode_normal :: see @FT_RENDER_MODE_NORMAL                 */
-  /*   ft_render_mode_mono   :: see @FT_RENDER_MODE_MONO                   */
-  /*                                                                       */
-#define ft_render_mode_normal  FT_RENDER_MODE_NORMAL
-#define ft_render_mode_mono    FT_RENDER_MODE_MONO
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Render_Glyph                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Converts a given glyph image to a bitmap.  It does so by           */
-  /*    inspecting the glyph image format, find the relevant renderer, and */
-  /*    invoke it.                                                         */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    slot        :: A handle to the glyph slot containing the image to  */
-  /*                   convert.                                            */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    render_mode :: This is the render mode used to render the glyph    */
-  /*                   image into a bitmap.  See FT_Render_Mode for a list */
-  /*                   of possible values.                                 */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Render_Glyph( FT_GlyphSlot    slot,
-                   FT_Render_Mode  render_mode );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Enum>                                                                */
-  /*    FT_Kerning_Mode                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    An enumeration used to specify which kerning values to return in   */
-  /*    @FT_Get_Kerning.                                                   */
-  /*                                                                       */
-  /* <Values>                                                              */
-  /*    FT_KERNING_DEFAULT  :: Return scaled and grid-fitted kerning       */
-  /*                           distances (value is 0).                     */
-  /*                                                                       */
-  /*    FT_KERNING_UNFITTED :: Return scaled but un-grid-fitted kerning    */
-  /*                           distances.                                  */
-  /*                                                                       */
-  /*    FT_KERNING_UNSCALED :: Return the kerning vector in original font  */
-  /*                           units.                                      */
-  /*                                                                       */
-  typedef enum  FT_Kerning_Mode_
-  {
-    FT_KERNING_DEFAULT  = 0,
-    FT_KERNING_UNFITTED,
-    FT_KERNING_UNSCALED
-
-  } FT_Kerning_Mode;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Const>                                                               */
-  /*    ft_kerning_default                                                 */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This constant is deprecated.  Please use @FT_KERNING_DEFAULT       */
-  /*    instead.                                                           */
-  /*                                                                       */
-#define ft_kerning_default   FT_KERNING_DEFAULT
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Const>                                                               */
-  /*    ft_kerning_unfitted                                                */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This constant is deprecated.  Please use @FT_KERNING_UNFITTED      */
-  /*    instead.                                                           */
-  /*                                                                       */
-#define ft_kerning_unfitted  FT_KERNING_UNFITTED
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Const>                                                               */
-  /*    ft_kerning_unscaled                                                */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This constant is deprecated.  Please use @FT_KERNING_UNSCALED      */
-  /*    instead.                                                           */
-  /*                                                                       */
-#define ft_kerning_unscaled  FT_KERNING_UNSCALED
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Get_Kerning                                                     */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Returns the kerning vector between two glyphs of a same face.      */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    face        :: A handle to a source face object.                   */
-  /*                                                                       */
-  /*    left_glyph  :: The index of the left glyph in the kern pair.       */
-  /*                                                                       */
-  /*    right_glyph :: The index of the right glyph in the kern pair.      */
-  /*                                                                       */
-  /*    kern_mode   :: See @FT_Kerning_Mode for more information.          */
-  /*                   Determines the scale/dimension of the returned      */
-  /*                   kerning vector.                                     */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    akerning    :: The kerning vector.  This is in font units for      */
-  /*                   scalable formats, and in pixels for fixed-sizes     */
-  /*                   formats.                                            */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    Only horizontal layouts (left-to-right & right-to-left) are        */
-  /*    supported by this method.  Other layouts, or more sophisticated    */
-  /*    kernings, are out of the scope of this API function -- they can be */
-  /*    implemented through format-specific interfaces.                    */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Get_Kerning( FT_Face     face,
-                  FT_UInt     left_glyph,
-                  FT_UInt     right_glyph,
-                  FT_UInt     kern_mode,
-                  FT_Vector  *akerning );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Get_Glyph_Name                                                  */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Retrieves the ASCII name of a given glyph in a face.  This only    */
-  /*    works for those faces where FT_HAS_GLYPH_NAME(face) returns true.  */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    face        :: A handle to a source face object.                   */
-  /*                                                                       */
-  /*    glyph_index :: The glyph index.                                    */
-  /*                                                                       */
-  /*    buffer_max  :: The maximal number of bytes available in the        */
-  /*                   buffer.                                             */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    buffer      :: A pointer to a target buffer where the name will be */
-  /*                   copied to.                                          */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    An error is returned if the face doesn't provide glyph names or if */
-  /*    the glyph index is invalid.  In all cases of failure, the first    */
-  /*    byte of `buffer' will be set to 0 to indicate an empty name.       */
-  /*                                                                       */
-  /*    The glyph name is truncated to fit within the buffer if it is too  */
-  /*    long.  The returned string is always zero-terminated.              */
-  /*                                                                       */
-  /*    This function is not compiled within the library if the config     */
-  /*    macro FT_CONFIG_OPTION_NO_GLYPH_NAMES is defined in                */
-  /*    `include/freetype/config/ftoptions.h'                              */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Get_Glyph_Name( FT_Face     face,
-                     FT_UInt     glyph_index,
-                     FT_Pointer  buffer,
-                     FT_UInt     buffer_max );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Get_Postscript_Name                                             */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Retrieves the ASCII Postscript name of a given face, if available. */
-  /*    This should only work with Postscript and TrueType fonts.          */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    face :: A handle to the source face object.                        */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    A pointer to the face's Postscript name.  NULL if un-available.    */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The returned pointer is owned by the face and will be destroyed    */
-  /*    with it.                                                           */
-  /*                                                                       */
-  FT_EXPORT( const char* )
-  FT_Get_Postscript_Name( FT_Face  face );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Select_Charmap                                                  */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Selects a given charmap by its encoding tag (as listed in          */
-  /*    `freetype.h').                                                     */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    face     :: A handle to the source face object.                    */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    encoding :: A handle to the selected charmap.                      */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    This function will return an error if no charmap in the face       */
-  /*    corresponds to the encoding queried here.                          */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Select_Charmap( FT_Face      face,
-                     FT_Encoding  encoding );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Set_Charmap                                                     */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Selects a given charmap for character code to glyph index          */
-  /*    decoding.                                                          */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    face    :: A handle to the source face object.                     */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    charmap :: A handle to the selected charmap.                       */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    This function will return an error if the charmap is not part of   */
-  /*    the face (i.e., if it is not listed in the face->charmaps[]        */
-  /*    table).                                                            */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Set_Charmap( FT_Face     face,
-                  FT_CharMap  charmap );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Get_Char_Index                                                  */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Returns the glyph index of a given character code.  This function  */
-  /*    uses a charmap object to do the translation.                       */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    face     :: A handle to the source face object.                    */
-  /*                                                                       */
-  /*    charcode :: The character code.                                    */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    The glyph index.  0 means `undefined character code'.              */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    FreeType computes its own glyph indices which are not necessarily  */
-  /*    the same as used in the font in case the font is based on glyph    */
-  /*    indices.  Reason for this behaviour is to assure that index 0 is   */
-  /*    never used, representing the missing glyph.                        */
-  /*                                                                       */
-  FT_EXPORT( FT_UInt )
-  FT_Get_Char_Index( FT_Face   face,
-                     FT_ULong  charcode );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Get_First_Char                                                  */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This function is used to return the first character code in the    */
-  /*    current charmap of a given face.  It will also return the          */
-  /*    corresponding glyph index.                                         */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    face    :: A handle to the source face object.                     */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    agindex :: Glyph index of first character code.  0 if charmap is   */
-  /*               empty.                                                  */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    The charmap's first character code.                                */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    You should use this function with @FT_Get_Next_Char to be able to  */
-  /*    parse all character codes available in a given charmap.  The code  */
-  /*    should look like this:                                             */
-  /*                                                                       */
-  /*    {                                                                  */
-  /*      FT_ULong  charcode;                                              */
-  /*      FT_UInt   gindex;                                                */
-  /*                                                                       */
-  /*                                                                       */
-  /*      charcode = FT_Get_First_Char( face, &gindex );                   */
-  /*      while ( gindex != 0 )                                            */
-  /*      {                                                                */
-  /*        ... do something with (charcode,gindex) pair ...               */
-  /*                                                                       */
-  /*        charcode = FT_Get_Next_Char( face, charcode, &gindex );        */
-  /*      }                                                                */
-  /*    }                                                                  */
-  /*                                                                       */
-  /*    Note that `*agindex' will be set to 0 if the charmap is empty.     */
-  /*    The result itself can be 0 in two cases: if the charmap is empty   */
-  /*    or when the value 0 is the first valid character code.             */
-  /*                                                                       */
-  FT_EXPORT( FT_ULong )
-  FT_Get_First_Char( FT_Face   face,
-                     FT_UInt  *agindex );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Get_Next_Char                                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This function is used to return the next character code in the     */
-  /*    current charmap of a given face following the value 'char_code',   */
-  /*    as well as the corresponding glyph index.                          */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    face      :: A handle to the source face object.                   */
-  /*    char_code :: The starting character code.                          */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    agindex   :: Glyph index of first character code.  0 if charmap    */
-  /*                 is empty.                                             */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    The charmap's next character code.                                 */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    You should use this function with @FT_Get_First_Char to walk       */
-  /*    through all character codes available in a given charmap.  See     */
-  /*    the note for this function for a simple code example.              */
-  /*                                                                       */
-  /*    Note that `*agindex' will be set to 0 when there are no more codes */
-  /*    in the charmap.                                                    */
-  /*                                                                       */
-  FT_EXPORT( FT_ULong )
-  FT_Get_Next_Char( FT_Face    face,
-                    FT_ULong   char_code,
-                    FT_UInt   *agindex );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Get_Name_Index                                                  */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Returns the glyph index of a given glyph name.  This function uses */
-  /*    driver specific objects to do the translation.                     */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    face       :: A handle to the source face object.                  */
-  /*                                                                       */
-  /*    glyph_name :: The glyph name.                                      */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    The glyph index.  0 means `undefined character code'.              */
-  /*                                                                       */
-  FT_EXPORT( FT_UInt )
-  FT_Get_Name_Index( FT_Face     face,
-                     FT_String*  glyph_name );
-
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    computations                                                       */
-  /*                                                                       */
-  /* <Title>                                                               */
-  /*    Computations                                                       */
-  /*                                                                       */
-  /* <Abstract>                                                            */
-  /*    Crunching fixed numbers and vectors                                */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This section contains various functions used to perform            */
-  /*    computations on 16.16 fixed-float numbers or 2d vectors.           */
-  /*                                                                       */
-  /* <Order>                                                               */
-  /*    FT_MulDiv                                                          */
-  /*    FT_MulFix                                                          */
-  /*    FT_DivFix                                                          */
-  /*    FT_RoundFix                                                        */
-  /*    FT_CeilFix                                                         */
-  /*    FT_FloorFix                                                        */
-  /*    FT_Vector_Transform                                                */
-  /*    FT_Matrix_Multiply                                                 */
-  /*    FT_Matrix_Invert                                                   */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_MulDiv                                                          */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A very simple function used to perform the computation `(a*b)/c'   */
-  /*    with maximal accuracy (it uses a 64-bit intermediate integer       */
-  /*    whenever necessary).                                               */
-  /*                                                                       */
-  /*    This function isn't necessarily as fast as some processor specific */
-  /*    operations, but is at least completely portable.                   */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    a :: The first multiplier.                                         */
-  /*    b :: The second multiplier.                                        */
-  /*    c :: The divisor.                                                  */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    The result of `(a*b)/c'.  This function never traps when trying to */
-  /*    divide by zero; it simply returns `MaxInt' or `MinInt' depending   */
-  /*    on the signs of `a' and `b'.                                       */
-  /*                                                                       */
-  FT_EXPORT( FT_Long )
-  FT_MulDiv( FT_Long  a,
-             FT_Long  b,
-             FT_Long  c );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_MulFix                                                          */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A very simple function used to perform the computation             */
-  /*    `(a*b)/0x10000' with maximal accuracy.  Most of the time this is   */
-  /*    used to multiply a given value by a 16.16 fixed float factor.      */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    a :: The first multiplier.                                         */
-  /*    b :: The second multiplier.  Use a 16.16 factor here whenever      */
-  /*         possible (see note below).                                    */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    The result of `(a*b)/0x10000'.                                     */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    This function has been optimized for the case where the absolute   */
-  /*    value of `a' is less than 2048, and `b' is a 16.16 scaling factor. */
-  /*    As this happens mainly when scaling from notional units to         */
-  /*    fractional pixels in FreeType, it resulted in noticeable speed     */
-  /*    improvements between versions 2.x and 1.x.                         */
-  /*                                                                       */
-  /*    As a conclusion, always try to place a 16.16 factor as the         */
-  /*    _second_ argument of this function; this can make a great          */
-  /*    difference.                                                        */
-  /*                                                                       */
-  FT_EXPORT( FT_Long )
-  FT_MulFix( FT_Long  a,
-             FT_Long  b );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_DivFix                                                          */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A very simple function used to perform the computation             */
-  /*    `(a*0x10000)/b' with maximal accuracy.  Most of the time, this is  */
-  /*    used to divide a given value by a 16.16 fixed float factor.        */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    a :: The first multiplier.                                         */
-  /*    b :: The second multiplier.  Use a 16.16 factor here whenever      */
-  /*         possible (see note below).                                    */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    The result of `(a*0x10000)/b'.                                     */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The optimization for FT_DivFix() is simple: If (a << 16) fits in   */
-  /*    32 bits, then the division is computed directly.  Otherwise, we    */
-  /*    use a specialized version of @FT_MulDiv.                           */
-  /*                                                                       */
-  FT_EXPORT( FT_Long )
-  FT_DivFix( FT_Long  a,
-             FT_Long  b );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_RoundFix                                                        */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A very simple function used to round a 16.16 fixed number.         */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    a :: The number to be rounded.                                     */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    The result of `(a + 0x8000) & -0x10000'.                           */
-  /*                                                                       */
-  FT_EXPORT( FT_Fixed )
-  FT_RoundFix( FT_Fixed  a );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_CeilFix                                                         */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A very simple function used to compute the ceiling function of a   */
-  /*    16.16 fixed number.                                                */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    a :: The number for which the ceiling function is to be computed.  */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    The result of `(a + 0x10000 - 1) & -0x10000'.                      */
-  /*                                                                       */
-  FT_EXPORT( FT_Fixed )
-  FT_CeilFix( FT_Fixed  a );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_FloorFix                                                        */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A very simple function used to compute the floor function of a     */
-  /*    16.16 fixed number.                                                */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    a :: The number for which the floor function is to be computed.    */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    The result of `a & -0x10000'.                                      */
-  /*                                                                       */
-  FT_EXPORT( FT_Fixed )
-  FT_FloorFix( FT_Fixed  a );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Vector_Transform                                                */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Transforms a single vector through a 2x2 matrix.                   */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    vector :: The target vector to transform.                          */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    matrix :: A pointer to the source 2x2 matrix.                      */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The result is undefined if either `vector' or `matrix' is invalid. */
-  /*                                                                       */
-  FT_EXPORT( void )
-  FT_Vector_Transform( FT_Vector*  vec,
-                       FT_Matrix*  matrix );
-
-
-  /* */
-
-
-FT_END_HEADER
-
-#endif /* __FREETYPE_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/ftbbox.h b/extra_lib/include/freetype/freetype/ftbbox.h
deleted file mode 100644
index f98c89e..0000000
--- a/extra_lib/include/freetype/freetype/ftbbox.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftbbox.h                                                               */
-/*                                                                         */
-/*    FreeType exact bbox computation (specification).                     */
-/*                                                                         */
-/*  Copyright 1996-2001, 2003 by                                           */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* This component has a _single_ role: to compute exact outline bounding */
-  /* boxes.                                                                */
-  /*                                                                       */
-  /* It is separated from the rest of the engine for various technical     */
-  /* reasons.  It may well be integrated in `ftoutln' later.               */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-#ifndef __FTBBOX_H__
-#define __FTBBOX_H__
-
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-#ifdef FREETYPE_H
-#error "freetype.h of FreeType 1 has been loaded!"
-#error "Please fix the directory search order for header files"
-#error "so that freetype.h of FreeType 2 is found first."
-#endif
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    outline_processing                                                 */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Outline_Get_BBox                                                */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Computes the exact bounding box of an outline.  This is slower     */
-  /*    than computing the control box.  However, it uses an advanced      */
-  /*    algorithm which returns _very_ quickly when the two boxes          */
-  /*    coincide.  Otherwise, the outline Bezier arcs are walked over to   */
-  /*    extract their extrema.                                             */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    outline :: A pointer to the source outline.                        */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    abbox   :: The outline's exact bounding box.                       */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Outline_Get_BBox( FT_Outline*  outline,
-                       FT_BBox     *abbox );
-
-
-  /* */
-
-
-FT_END_HEADER
-
-#endif /* __FTBBOX_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/ftbdf.h b/extra_lib/include/freetype/freetype/ftbdf.h
deleted file mode 100644
index aa41144..0000000
--- a/extra_lib/include/freetype/freetype/ftbdf.h
+++ /dev/null
@@ -1,200 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftbdf.h                                                                */
-/*                                                                         */
-/*    FreeType API for accessing BDF-specific strings (specification).     */
-/*                                                                         */
-/*  Copyright 2002, 2003 by                                                */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __FTBDF_H__
-#define __FTBDF_H__
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-#ifdef FREETYPE_H
-#error "freetype.h of FreeType 1 has been loaded!"
-#error "Please fix the directory search order for header files"
-#error "so that freetype.h of FreeType 2 is found first."
-#endif
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    bdf_fonts                                                          */
-  /*                                                                       */
-  /* <Title>                                                               */
-  /*    BDF Fonts                                                          */
-  /*                                                                       */
-  /* <Abstract>                                                            */
-  /*    BDF-specific APIs                                                  */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This section contains the declaration of BDF-specific functions.   */
-  /*                                                                       */
-  /*************************************************************************/
-
-
- /**********************************************************************
-  *
-  * @enum:
-  *    FT_PropertyType
-  *
-  * @description:
-  *    A list of BDF property types.
-  *
-  * @values:
-  *    BDF_PROPERTY_TYPE_NONE ::
-  *      Value 0 is used to indicate a missing property.
-  *
-  *    BDF_PROPERTY_TYPE_ATOM ::
-  *      Property is a string atom.
-  *
-  *    BDF_PROPERTY_TYPE_INTEGER ::
-  *      Property is a 32-bit signed integer.
-  *
-  *    BDF_PROPERTY_TYPE_CARDINAL ::
-  *      Property is a 32-bit unsigned integer.
-  */
-  typedef enum  BDF_PropertyType_
-  {
-    BDF_PROPERTY_TYPE_NONE     = 0,
-    BDF_PROPERTY_TYPE_ATOM     = 1,
-    BDF_PROPERTY_TYPE_INTEGER  = 2,
-    BDF_PROPERTY_TYPE_CARDINAL = 3
-
-  } BDF_PropertyType;
-
-
- /**********************************************************************
-  *
-  * @type:
-  *    BDF_Property
-  *
-  * @description:
-  *    A handle to a @BDF_PropertyRec structure to model a given
-  *    BDF/PCF property.
-  */
-  typedef struct BDF_PropertyRec_*  BDF_Property;
-
-
- /**********************************************************************
-  *
-  * @struct:
-  *    BDF_PropertyRec
-  *
-  * @description:
-  *    This structure models a given BDF/PCF property.
-  *
-  * @fields:
-  *    type ::
-  *      The property type.
-  *
-  *    u.atom ::
-  *      The atom string, if type is @BDF_PROPERTY_TYPE_ATOM.
-  *
-  *    u.integer ::
-  *      A signed integer, if type is @BDF_PROPERTY_TYPE_INTEGER.
-  *
-  *    u.cardinal ::
-  *      An unsigned integer, if type is @BDF_PROPERTY_TYPE_CARDINAL.
-  */
-  typedef struct  BDF_PropertyRec_
-  {
-    BDF_PropertyType  type;
-    union {
-      const char*     atom;
-      FT_Int32        integer;
-      FT_UInt32       cardinal;
-
-    } u;
-
-  } BDF_PropertyRec;
-
-
- /**********************************************************************
-  *
-  * @function:
-  *    FT_Get_BDF_Charset_ID
-  *
-  * @description:
-  *    Retrieves a BDF font character set identity, according to
-  *    the BDF specification.
-  *
-  * @input:
-  *    face ::
-  *       A handle to the input face.
-  *
-  * @output:
-  *    acharset_encoding ::
-  *       Charset encoding, as a C string, owned by the face.
-  *
-  *    acharset_registry ::
-  *       Charset registry, as a C string, owned by the face.
-  *
-  * @return:
-  *   FreeType error code.  0 means success.
-  *
-  * @note:
-  *   This function only works with BDF faces, returning an error otherwise.
-  */
-  FT_EXPORT( FT_Error )
-  FT_Get_BDF_Charset_ID( FT_Face       face,
-                         const char*  *acharset_encoding,
-                         const char*  *acharset_registry );
-
-
- /**********************************************************************
-  *
-  * @function:
-  *    FT_Get_BDF_Property
-  *
-  * @description:
-  *    Retrieves a BDF property from a BDF or PCF font file.
-  *
-  * @input:
-  *    face :: A handle to the input face.
-  *
-  *    name :: The property name.
-  *
-  * @output:
-  *    aproperty :: The property.
-  *
-  * @return:
-  *   FreeType error code.  0 means success.
-  *
-  * @note:
-  *   This function works with BDF _and_ PCF fonts.  It returns an error
-  *   otherwise.  It also returns an error if the property is not in the
-  *   font.
-  *
-  *   In case of error, "aproperty->type" is always set to
-  *   @BDF_PROPERTY_TYPE_NONE.
-  */
-  FT_EXPORT( FT_Error )
-  FT_Get_BDF_Property( FT_Face           face,
-                       const char*       prop_name,
-                       BDF_PropertyRec  *aproperty );
-
- /* */
-
-FT_END_HEADER
-
-#endif /* __FTBDF_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/ftcache.h b/extra_lib/include/freetype/freetype/ftcache.h
deleted file mode 100644
index fd13f5d..0000000
--- a/extra_lib/include/freetype/freetype/ftcache.h
+++ /dev/null
@@ -1,414 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftcache.h                                                              */
-/*                                                                         */
-/*    FreeType Cache subsystem (specification).                            */
-/*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003 by                                     */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*********                                                       *********/
-  /*********             WARNING, THIS IS BETA CODE.               *********/
-  /*********                                                       *********/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-#ifndef __FTCACHE_H__
-#define __FTCACHE_H__
-
-
-#include <ft2build.h>
-#include FT_GLYPH_H
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    cache_subsystem                                                    */
-  /*                                                                       */
-  /* <Title>                                                               */
-  /*    Cache Sub-System                                                   */
-  /*                                                                       */
-  /* <Abstract>                                                            */
-  /*    How to cache face, size, and glyph data with FreeType 2.           */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*   This section describes the FreeType 2 cache sub-system which is     */
-  /*   stile in beta.                                                      */
-  /*                                                                       */
-  /* <Order>                                                               */
-  /*   FTC_Manager                                                         */
-  /*   FTC_FaceID                                                          */
-  /*   FTC_Face_Requester                                                  */
-  /*                                                                       */
-  /*   FTC_Manager_New                                                     */
-  /*   FTC_Manager_Lookup_Face                                             */
-  /*   FTC_Manager_Lookup_Size                                             */
-  /*                                                                       */
-  /*   FTC_Node                                                            */
-  /*   FTC_Node_Ref                                                        */
-  /*   FTC_Node_Unref                                                      */
-  /*                                                                       */
-  /*   FTC_Font                                                            */
-  /*   FTC_ImageCache                                                      */
-  /*   FTC_ImageCache_New                                                  */
-  /*   FTC_ImageCache_Lookup                                               */
-  /*                                                                       */
-  /*   FTC_SBit                                                            */
-  /*   FTC_SBitCache                                                       */
-  /*   FTC_SBitCache_New                                                   */
-  /*   FTC_SBitCache_Lookup                                                */
-  /*                                                                       */
-  /*                                                                       */
-  /*   FTC_Image_Desc                                                      */
-  /*   FTC_Image_Cache                                                     */
-  /*   FTC_Image_Cache_Lookup                                              */
-  /*                                                                       */
-  /*   FTC_SBit_Cache                                                      */
-  /*   FTC_SBit_Cache_Lookup                                               */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*****                                                               *****/
-  /*****                    BASIC TYPE DEFINITIONS                     *****/
-  /*****                                                               *****/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FTC_FaceID                                                         */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A generic pointer type that is used to identity face objects.  The */
-  /*    contents of such objects is application-dependent.                 */
-  /*                                                                       */
-  typedef FT_Pointer  FTC_FaceID;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    FTC_Face_Requester                                                 */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A callback function provided by client applications.  It is used   */
-  /*    to translate a given @FTC_FaceID into a new valid @FT_Face object. */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    face_id :: The face ID to resolve.                                 */
-  /*                                                                       */
-  /*    library :: A handle to a FreeType library object.                  */
-  /*                                                                       */
-  /*    data    :: Application-provided request data.                      */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    aface   :: A new @FT_Face handle.                                  */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The face requester should not perform funny things on the returned */
-  /*    face object, like creating a new @FT_Size for it, or setting a     */
-  /*    transformation through @FT_Set_Transform!                          */
-  /*                                                                       */
-  typedef FT_Error
-  (*FTC_Face_Requester)( FTC_FaceID  face_id,
-                         FT_Library  library,
-                         FT_Pointer  request_data,
-                         FT_Face*    aface );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FTC_FontRec                                                        */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A simple structure used to describe a given `font' to the cache    */
-  /*    manager.  Note that a `font' is the combination of a given face    */
-  /*    with a given character size.                                       */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    face_id    :: The ID of the face to use.                           */
-  /*                                                                       */
-  /*    pix_width  :: The character width in integer pixels.               */
-  /*                                                                       */
-  /*    pix_height :: The character height in integer pixels.              */
-  /*                                                                       */
-  typedef struct  FTC_FontRec_
-  {
-    FTC_FaceID  face_id;
-    FT_UShort   pix_width;
-    FT_UShort   pix_height;
-
-  } FTC_FontRec;
-
-
-  /* */
-
-
-#define FTC_FONT_COMPARE( f1, f2 )                  \
-          ( (f1)->face_id    == (f2)->face_id    && \
-            (f1)->pix_width  == (f2)->pix_width  && \
-            (f1)->pix_height == (f2)->pix_height )
-
-#define FT_POINTER_TO_ULONG( p )  ((FT_ULong)(FT_Pointer)(p))
-
-#define FTC_FACE_ID_HASH( i )                              \
-          ((FT_UInt32)(( FT_POINTER_TO_ULONG( i ) >> 3 ) ^ \
-                       ( FT_POINTER_TO_ULONG( i ) << 7 ) ) )
-
-#define FTC_FONT_HASH( f )                              \
-          (FT_UInt32)( FTC_FACE_ID_HASH((f)->face_id) ^ \
-                       ((f)->pix_width << 8)          ^ \
-                       ((f)->pix_height)              )
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FTC_Font                                                           */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A simple handle to an @FTC_FontRec structure.                      */
-  /*                                                                       */
-  typedef FTC_FontRec*  FTC_Font;
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*****                                                               *****/
-  /*****                      CACHE MANAGER OBJECT                     *****/
-  /*****                                                               *****/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FTC_Manager                                                        */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This object is used to cache one or more @FT_Face objects, along   */
-  /*    with corresponding @FT_Size objects.                               */
-  /*                                                                       */
-  typedef struct FTC_ManagerRec_*  FTC_Manager;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FTC_Node                                                           */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    An opaque handle to a cache node object.  Each cache node is       */
-  /*    reference-counted.  A node with a count of 0 might be flushed      */
-  /*    out of a full cache whenever a lookup request is performed.        */
-  /*                                                                       */
-  /*    If you lookup nodes, you have the ability to "acquire" them, i.e., */
-  /*    to increment their reference count.  This will prevent the node    */
-  /*    from being flushed out of the cache until you explicitly "release" */
-  /*    it (see @FTC_Node_Unref).                                          */
-  /*                                                                       */
-  /*    See also @FTC_SBitCache_Lookup and @FTC_ImageCache_Lookup.         */
-  /*                                                                       */
-  typedef struct FTC_NodeRec_*  FTC_Node;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FTC_Manager_New                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Creates a new cache manager.                                       */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    library   :: The parent FreeType library handle to use.            */
-  /*                                                                       */
-  /*    max_faces :: Maximum number of faces to keep alive in manager.     */
-  /*                 Use 0 for defaults.                                   */
-  /*                                                                       */
-  /*    max_sizes :: Maximum number of sizes to keep alive in manager.     */
-  /*                 Use 0 for defaults.                                   */
-  /*                                                                       */
-  /*    max_bytes :: Maximum number of bytes to use for cached data.       */
-  /*                 Use 0 for defaults.                                   */
-  /*                                                                       */
-  /*    requester :: An application-provided callback used to translate    */
-  /*                 face IDs into real @FT_Face objects.                  */
-  /*                                                                       */
-  /*    req_data  :: A generic pointer that is passed to the requester     */
-  /*                 each time it is called (see @FTC_Face_Requester).     */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    amanager  :: A handle to a new manager object.  0 in case of       */
-  /*                 failure.                                              */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FTC_Manager_New( FT_Library          library,
-                   FT_UInt             max_faces,
-                   FT_UInt             max_sizes,
-                   FT_ULong            max_bytes,
-                   FTC_Face_Requester  requester,
-                   FT_Pointer          req_data,
-                   FTC_Manager        *amanager );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FTC_Manager_Reset                                                  */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Empties a given cache manager.  This simply gets rid of all the    */
-  /*    currently cached @FT_Face and @FT_Size objects within the manager. */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    manager :: A handle to the manager.                                */
-  /*                                                                       */
-  FT_EXPORT( void )
-  FTC_Manager_Reset( FTC_Manager  manager );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FTC_Manager_Done                                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Destroys a given manager after emptying it.                        */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    manager :: A handle to the target cache manager object.            */
-  /*                                                                       */
-  FT_EXPORT( void )
-  FTC_Manager_Done( FTC_Manager  manager );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FTC_Manager_Lookup_Face                                            */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Retrieves the @FT_Face object that corresponds to a given face ID  */
-  /*    through a cache manager.                                           */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    manager :: A handle to the cache manager.                          */
-  /*                                                                       */
-  /*    face_id :: The ID of the face object.                              */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    aface   :: A handle to the face object.                            */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The returned @FT_Face object is always owned by the manager.  You  */
-  /*    should never try to discard it yourself.                           */
-  /*                                                                       */
-  /*    The @FT_Face object doesn't necessarily have a current size object */
-  /*    (i.e., face->size can be 0).  If you need a specific `font size',  */
-  /*    use @FTC_Manager_Lookup_Size instead.                              */
-  /*                                                                       */
-  /*    Never change the face's transformation matrix (i.e., never call    */
-  /*    the @FT_Set_Transform function) on a returned face!  If you need   */
-  /*    to transform glyphs, do it yourself after glyph loading.           */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FTC_Manager_Lookup_Face( FTC_Manager  manager,
-                           FTC_FaceID   face_id,
-                           FT_Face     *aface );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FTC_Manager_Lookup_Size                                            */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Retrieves the @FT_Face and @FT_Size objects that correspond to a   */
-  /*    given font.                                                        */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    manager :: A handle to the cache manager.                          */
-  /*                                                                       */
-  /*    font    :: The font to use.                                        */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    aface   :: A pointer to the handle of the face object.  Set it to  */
-  /*               zero if you don't need it.                              */
-  /*                                                                       */
-  /*    asize   :: A pointer to the handle of the size object.  Set it to  */
-  /*               zero if you don't need it.                              */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The returned @FT_Face object is always owned by the manager.  You  */
-  /*    should never try to discard it yourself.                           */
-  /*                                                                       */
-  /*    Never change the face's transformation matrix (i.e., never call    */
-  /*    the @FT_Set_Transform function) on a returned face!  If you need   */
-  /*    to transform glyphs, do it yourself after glyph loading.           */
-  /*                                                                       */
-  /*    Similarly, the returned @FT_Size object is always owned by the     */
-  /*    manager.  You should never try to discard it, and never change its */
-  /*    settings with @FT_Set_Pixel_Sizes or @FT_Set_Char_Size!            */
-  /*                                                                       */
-  /*    The returned size object is the face's current size, which means   */
-  /*    that you can call @FT_Load_Glyph with the face if you need to.     */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FTC_Manager_Lookup_Size( FTC_Manager  manager,
-                           FTC_Font     font,
-                           FT_Face     *aface,
-                           FT_Size     *asize );
-
-
-FT_END_HEADER
-
-#endif /* __FTCACHE_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/ftchapters.h b/extra_lib/include/freetype/freetype/ftchapters.h
deleted file mode 100644
index c134ec1..0000000
--- a/extra_lib/include/freetype/freetype/ftchapters.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/* <Chapter>                                                               */
-/*    core_api                                                             */
-/*                                                                         */
-/* <Title>                                                                 */
-/*    Core API                                                             */
-/*                                                                         */
-/* <Sections>                                                              */
-/*    basic_types                                                          */
-/*    base_interface                                                       */
-/*    glyph_management                                                     */
-/*    mac_specific                                                         */
-/*    sizes_management                                                     */
-/*    header_file_macros                                                   */
-/*                                                                         */
-/***************************************************************************/
-
-/***************************************************************************/
-/*                                                                         */
-/* <Chapter>                                                               */
-/*    format_specific                                                      */
-/*                                                                         */
-/* <Title>                                                                 */
-/*    Format-Specific API                                                  */
-/*                                                                         */
-/* <Sections>                                                              */
-/*    multiple_masters                                                     */
-/*    truetype_tables                                                      */
-/*    type1_tables                                                         */
-/*    sfnt_names                                                           */
-/*    bdf_fonts                                                            */
-/*    pfr_fonts                                                            */
-/*                                                                         */
-/***************************************************************************/
-
-
-/***************************************************************************/
-/*                                                                         */
-/* <Chapter>                                                               */
-/*    cache_subsystem                                                      */
-/*                                                                         */
-/* <Title>                                                                 */
-/*    Cache Sub-System                                                     */
-/*                                                                         */
-/* <Sections>                                                              */
-/*    cache_subsystem                                                      */
-/*                                                                         */
-/***************************************************************************/
-
-
-/***************************************************************************/
-/*                                                                         */
-/* <Chapter>                                                               */
-/*    support_api                                                          */
-/*                                                                         */
-/* <Title>                                                                 */
-/*    Support API                                                          */
-/*                                                                         */
-/* <Sections>                                                              */
-/*    computations                                                         */
-/*    list_processing                                                      */
-/*    outline_processing                                                   */
-/*    raster                                                               */
-/*    system_interface                                                     */
-/*    module_management                                                    */
-/*                                                                         */
-/***************************************************************************/
-
diff --git a/extra_lib/include/freetype/freetype/fterrdef.h b/extra_lib/include/freetype/freetype/fterrdef.h
deleted file mode 100644
index 4ef606d..0000000
--- a/extra_lib/include/freetype/freetype/fterrdef.h
+++ /dev/null
@@ -1,229 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  fterrdef.h                                                             */
-/*                                                                         */
-/*    FreeType error codes (specification).                                */
-/*                                                                         */
-/*  Copyright 2002 by                                                      */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-  /*******************************************************************/
-  /*******************************************************************/
-  /*****                                                         *****/
-  /*****                LIST OF ERROR CODES/MESSAGES             *****/
-  /*****                                                         *****/
-  /*******************************************************************/
-  /*******************************************************************/
-
-
-  /* You need to define both FT_ERRORDEF_ and FT_NOERRORDEF_ before */
-  /* including this file.                                           */
-
-
-  /* generic errors */
-
-  FT_NOERRORDEF_( Ok,                                        0x00, \
-                  "no error" )
-
-  FT_ERRORDEF_( Cannot_Open_Resource,                        0x01, \
-                "cannot open resource" )
-  FT_ERRORDEF_( Unknown_File_Format,                         0x02, \
-                "unknown file format" )
-  FT_ERRORDEF_( Invalid_File_Format,                         0x03, \
-                "broken file" )
-  FT_ERRORDEF_( Invalid_Version,                             0x04, \
-                "invalid FreeType version" )
-  FT_ERRORDEF_( Lower_Module_Version,                        0x05, \
-                "module version is too low" )
-  FT_ERRORDEF_( Invalid_Argument,                            0x06, \
-                "invalid argument" )
-  FT_ERRORDEF_( Unimplemented_Feature,                       0x07, \
-                "unimplemented feature" )
-  FT_ERRORDEF_( Invalid_Table,                               0x08, \
-                "broken table" )
-  FT_ERRORDEF_( Invalid_Offset,                              0x09, \
-                "broken offset within table" )
-
-  /* glyph/character errors */
-
-  FT_ERRORDEF_( Invalid_Glyph_Index,                         0x10, \
-                "invalid glyph index" )
-  FT_ERRORDEF_( Invalid_Character_Code,                      0x11, \
-                "invalid character code" )
-  FT_ERRORDEF_( Invalid_Glyph_Format,                        0x12, \
-                "unsupported glyph image format" )
-  FT_ERRORDEF_( Cannot_Render_Glyph,                         0x13, \
-                "cannot render this glyph format" )
-  FT_ERRORDEF_( Invalid_Outline,                             0x14, \
-                "invalid outline" )
-  FT_ERRORDEF_( Invalid_Composite,                           0x15, \
-                "invalid composite glyph" )
-  FT_ERRORDEF_( Too_Many_Hints,                              0x16, \
-                "too many hints" )
-  FT_ERRORDEF_( Invalid_Pixel_Size,                          0x17, \
-                "invalid pixel size" )
-
-  /* handle errors */
-
-  FT_ERRORDEF_( Invalid_Handle,                              0x20, \
-                "invalid object handle" )
-  FT_ERRORDEF_( Invalid_Library_Handle,                      0x21, \
-                "invalid library handle" )
-  FT_ERRORDEF_( Invalid_Driver_Handle,                       0x22, \
-                "invalid module handle" )
-  FT_ERRORDEF_( Invalid_Face_Handle,                         0x23, \
-                "invalid face handle" )
-  FT_ERRORDEF_( Invalid_Size_Handle,                         0x24, \
-                "invalid size handle" )
-  FT_ERRORDEF_( Invalid_Slot_Handle,                         0x25, \
-                "invalid glyph slot handle" )
-  FT_ERRORDEF_( Invalid_CharMap_Handle,                      0x26, \
-                "invalid charmap handle" )
-  FT_ERRORDEF_( Invalid_Cache_Handle,                        0x27, \
-                "invalid cache manager handle" )
-  FT_ERRORDEF_( Invalid_Stream_Handle,                       0x28, \
-                "invalid stream handle" )
-
-  /* driver errors */
-
-  FT_ERRORDEF_( Too_Many_Drivers,                            0x30, \
-                "too many modules" )
-  FT_ERRORDEF_( Too_Many_Extensions,                         0x31, \
-                "too many extensions" )
-
-  /* memory errors */
-
-  FT_ERRORDEF_( Out_Of_Memory,                               0x40, \
-                "out of memory" )
-  FT_ERRORDEF_( Unlisted_Object,                             0x41, \
-                "unlisted object" )
-
-  /* stream errors */
-
-  FT_ERRORDEF_( Cannot_Open_Stream,                          0x51, \
-                "cannot open stream" )
-  FT_ERRORDEF_( Invalid_Stream_Seek,                         0x52, \
-                "invalid stream seek" )
-  FT_ERRORDEF_( Invalid_Stream_Skip,                         0x53, \
-                "invalid stream skip" )
-  FT_ERRORDEF_( Invalid_Stream_Read,                         0x54, \
-                "invalid stream read" )
-  FT_ERRORDEF_( Invalid_Stream_Operation,                    0x55, \
-                "invalid stream operation" )
-  FT_ERRORDEF_( Invalid_Frame_Operation,                     0x56, \
-                "invalid frame operation" )
-  FT_ERRORDEF_( Nested_Frame_Access,                         0x57, \
-                "nested frame access" )
-  FT_ERRORDEF_( Invalid_Frame_Read,                          0x58, \
-                "invalid frame read" )
-
-  /* raster errors */
-
-  FT_ERRORDEF_( Raster_Uninitialized,                        0x60, \
-                "raster uninitialized" )
-  FT_ERRORDEF_( Raster_Corrupted,                            0x61, \
-                "raster corrupted" )
-  FT_ERRORDEF_( Raster_Overflow,                             0x62, \
-                "raster overflow" )
-  FT_ERRORDEF_( Raster_Negative_Height,                      0x63, \
-                "negative height while rastering" )
-
-  /* cache errors */
-
-  FT_ERRORDEF_( Too_Many_Caches,                             0x70, \
-                "too many registered caches" )
-
-  /* TrueType and SFNT errors */
-
-  FT_ERRORDEF_( Invalid_Opcode,                              0x80, \
-                "invalid opcode" )
-  FT_ERRORDEF_( Too_Few_Arguments,                           0x81, \
-                "too few arguments" )
-  FT_ERRORDEF_( Stack_Overflow,                              0x82, \
-                "stack overflow" )
-  FT_ERRORDEF_( Code_Overflow,                               0x83, \
-                "code overflow" )
-  FT_ERRORDEF_( Bad_Argument,                                0x84, \
-                "bad argument" )
-  FT_ERRORDEF_( Divide_By_Zero,                              0x85, \
-                "division by zero" )
-  FT_ERRORDEF_( Invalid_Reference,                           0x86, \
-                "invalid reference" )
-  FT_ERRORDEF_( Debug_OpCode,                                0x87, \
-                "found debug opcode" )
-  FT_ERRORDEF_( ENDF_In_Exec_Stream,                         0x88, \
-                "found ENDF opcode in execution stream" )
-  FT_ERRORDEF_( Nested_DEFS,                                 0x89, \
-                "nested DEFS" )
-  FT_ERRORDEF_( Invalid_CodeRange,                           0x8A, \
-                "invalid code range" )
-  FT_ERRORDEF_( Execution_Too_Long,                          0x8B, \
-                "execution context too long" )
-  FT_ERRORDEF_( Too_Many_Function_Defs,                      0x8C, \
-                "too many function definitions" )
-  FT_ERRORDEF_( Too_Many_Instruction_Defs,                   0x8D, \
-                "too many instruction definitions" )
-  FT_ERRORDEF_( Table_Missing,                               0x8E, \
-                "SFNT font table missing" )
-  FT_ERRORDEF_( Horiz_Header_Missing,                        0x8F, \
-                "horizontal header (hhea) table missing" )
-  FT_ERRORDEF_( Locations_Missing,                           0x90, \
-                "locations (loca) table missing" )
-  FT_ERRORDEF_( Name_Table_Missing,                          0x91, \
-                "name table missing" )
-  FT_ERRORDEF_( CMap_Table_Missing,                          0x92, \
-                "character map (cmap) table missing" )
-  FT_ERRORDEF_( Hmtx_Table_Missing,                          0x93, \
-                "horizontal metrics (hmtx) table missing" )
-  FT_ERRORDEF_( Post_Table_Missing,                          0x94, \
-                "PostScript (post) table missing" )
-  FT_ERRORDEF_( Invalid_Horiz_Metrics,                       0x95, \
-                "invalid horizontal metrics" )
-  FT_ERRORDEF_( Invalid_CharMap_Format,                      0x96, \
-                "invalid character map (cmap) format" )
-  FT_ERRORDEF_( Invalid_PPem,                                0x97, \
-                "invalid ppem value" )
-  FT_ERRORDEF_( Invalid_Vert_Metrics,                        0x98, \
-                "invalid vertical metrics" )
-  FT_ERRORDEF_( Could_Not_Find_Context,                      0x99, \
-                "could not find context" )
-  FT_ERRORDEF_( Invalid_Post_Table_Format,                   0x9A, \
-                "invalid PostScript (post) table format" )
-  FT_ERRORDEF_( Invalid_Post_Table,                          0x9B, \
-                "invalid PostScript (post) table" )
-
-  /* CFF, CID, and Type 1 errors */
-
-  FT_ERRORDEF_( Syntax_Error,                                0xA0, \
-                "opcode syntax error" )
-  FT_ERRORDEF_( Stack_Underflow,                             0xA1, \
-                "argument stack underflow" )
-
-  /* BDF errors */
-
-  FT_ERRORDEF_( Missing_Startfont_Field,                     0xB0, \
-                "`STARTFONT' field missing" )
-  FT_ERRORDEF_( Missing_Font_Field,                          0xB1, \
-                "`FONT' field missing" )
-  FT_ERRORDEF_( Missing_Size_Field,                          0xB2, \
-                "`SIZE' field missing" )
-  FT_ERRORDEF_( Missing_Chars_Field,                         0xB3, \
-                "`CHARS' field missing" )
-  FT_ERRORDEF_( Missing_Startchar_Field,                     0xB4, \
-                "`STARTCHAR' field missing" )
-  FT_ERRORDEF_( Missing_Encoding_Field,                      0xB5, \
-                "`ENCODING' field missing" )
-  FT_ERRORDEF_( Missing_Bbx_Field,                           0xB6, \
-                "`BBX' field missing" )
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/fterrors.h b/extra_lib/include/freetype/freetype/fterrors.h
deleted file mode 100644
index 1def4f9..0000000
--- a/extra_lib/include/freetype/freetype/fterrors.h
+++ /dev/null
@@ -1,207 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  fterrors.h                                                             */
-/*                                                                         */
-/*    FreeType error code handling (specification).                        */
-/*                                                                         */
-/*  Copyright 1996-2001, 2002 by                                           */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* This special header file is used to define the handling of FT2        */
-  /* enumeration constants.  It can also be used to generate error message */
-  /* strings with a small macro trick explained below.                     */
-  /*                                                                       */
-  /* I - Error Formats                                                     */
-  /* -----------------                                                     */
-  /*                                                                       */
-  /*   Since release 2.1, the error constants have changed.  The lower     */
-  /*   byte of the error value gives the "generic" error code, while the   */
-  /*   higher byte indicates in which module the error occurred.           */
-  /*                                                                       */
-  /*   You can use the macro FT_ERROR_BASE(x) macro to extract the generic */
-  /*   error code from an FT_Error value.                                  */
-  /*                                                                       */
-  /*   The configuration macro FT_CONFIG_OPTION_USE_MODULE_ERRORS can be   */
-  /*   undefined in ftoption.h in order to make the higher byte always     */
-  /*   zero, in case you need to be compatible with previous versions of   */
-  /*   FreeType 2.                                                         */
-  /*                                                                       */
-  /*                                                                       */
-  /* II - Error Message strings                                            */
-  /* --------------------------                                            */
-  /*                                                                       */
-  /*   The error definitions below are made through special macros that    */
-  /*   allow client applications to build a table of error message strings */
-  /*   if they need it.  The strings are not included in a normal build of */
-  /*   FreeType 2 to save space (most client applications do not use       */
-  /*   them).                                                              */
-  /*                                                                       */
-  /*   To do so, you have to define the following macros before including  */
-  /*   this file:                                                          */
-  /*                                                                       */
-  /*   FT_ERROR_START_LIST ::                                              */
-  /*     This macro is called before anything else to define the start of  */
-  /*     the error list.  It is followed by several FT_ERROR_DEF calls     */
-  /*     (see below).                                                      */
-  /*                                                                       */
-  /*   FT_ERROR_DEF( e, v, s ) ::                                          */
-  /*     This macro is called to define one single error.                  */
-  /*     `e' is the error code identifier (e.g. FT_Err_Invalid_Argument).  */
-  /*     `v' is the error numerical value.                                 */
-  /*     `s' is the corresponding error string.                            */
-  /*                                                                       */
-  /*   FT_ERROR_END_LIST ::                                                */
-  /*     This macro ends the list.                                         */
-  /*                                                                       */
-  /*   Additionally, you have to undefine __FTERRORS_H__ before #including */
-  /*   this file.                                                          */
-  /*                                                                       */
-  /*   Here is a simple example:                                           */
-  /*                                                                       */
-  /*     {                                                                 */
-  /*       #undef __FTERRORS_H__                                           */
-  /*       #define FT_ERRORDEF( e, v, s )  { e, s },                       */
-  /*       #define FT_ERROR_START_LIST     {                               */
-  /*       #define FT_ERROR_END_LIST       { 0, 0 } };                     */
-  /*                                                                       */
-  /*       const struct                                                    */
-  /*       {                                                               */
-  /*         int          err_code;                                        */
-  /*         const char*  err_msg                                          */
-  /*       } ft_errors[] =                                                 */
-  /*                                                                       */
-  /*       #include FT_ERRORS_H                                            */
-  /*     }                                                                 */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-#ifndef __FTERRORS_H__
-#define __FTERRORS_H__
-
-
-  /* include module base error codes */
-#include FT_MODULE_ERRORS_H
-
-
-  /*******************************************************************/
-  /*******************************************************************/
-  /*****                                                         *****/
-  /*****                       SETUP MACROS                      *****/
-  /*****                                                         *****/
-  /*******************************************************************/
-  /*******************************************************************/
-
-
-#undef  FT_NEED_EXTERN_C
-
-#undef  FT_ERR_XCAT
-#undef  FT_ERR_CAT
-
-#define FT_ERR_XCAT( x, y )  x ## y
-#define FT_ERR_CAT( x, y )   FT_ERR_XCAT( x, y )
-
-
-  /* FT_ERR_PREFIX is used as a prefix for error identifiers. */
-  /* By default, we use `FT_Err_'.                            */
-  /*                                                          */
-#ifndef FT_ERR_PREFIX
-#define FT_ERR_PREFIX  FT_Err_
-#endif
-
-
-  /* FT_ERR_BASE is used as the base for module-specific errors. */
-  /*                                                             */
-#ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS
-
-#ifndef FT_ERR_BASE
-#define FT_ERR_BASE  FT_Mod_Err_Base
-#endif
-
-#else
-
-#undef FT_ERR_BASE
-#define FT_ERR_BASE  0
-
-#endif /* FT_CONFIG_OPTION_USE_MODULE_ERRORS */
-
-
-  /* If FT_ERRORDEF is not defined, we need to define a simple */
-  /* enumeration type.                                         */
-  /*                                                           */
-#ifndef FT_ERRORDEF
-
-#define FT_ERRORDEF( e, v, s )  e = v,
-#define FT_ERROR_START_LIST     enum {
-#define FT_ERROR_END_LIST       FT_ERR_CAT( FT_ERR_PREFIX, Max ) };
-
-#ifdef __cplusplus
-#define FT_NEED_EXTERN_C
-  extern "C" {
-#endif
-
-#endif /* !FT_ERRORDEF */
-
-
-  /* this macro is used to define an error */
-#define FT_ERRORDEF_( e, v, s )   \
-          FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v + FT_ERR_BASE, s )
-
-  /* this is only used for FT_Err_Ok, which must be 0! */
-#define FT_NOERRORDEF_( e, v, s ) \
-          FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v, s )
-
-
-#ifdef FT_ERROR_START_LIST
-  FT_ERROR_START_LIST
-#endif
-
-
-  /* no include the error codes */
-#include FT_ERROR_DEFINITIONS_H
-
-
-#ifdef FT_ERROR_END_LIST
-  FT_ERROR_END_LIST
-#endif
-
-
-  /*******************************************************************/
-  /*******************************************************************/
-  /*****                                                         *****/
-  /*****                      SIMPLE CLEANUP                     *****/
-  /*****                                                         *****/
-  /*******************************************************************/
-  /*******************************************************************/
-
-#ifdef FT_NEED_EXTERN_C
-  }
-#endif
-
-#undef FT_ERROR_START_LIST
-#undef FT_ERROR_END_LIST
-
-#undef FT_ERRORDEF
-#undef FT_ERRORDEF_
-#undef FT_NOERRORDEF_
-
-#undef FT_NEED_EXTERN_C
-#undef FT_ERR_PREFIX
-#undef FT_ERR_BASE
-#undef FT_ERR_CONCAT
-
-#endif /* __FTERRORS_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/ftglyph.h b/extra_lib/include/freetype/freetype/ftglyph.h
deleted file mode 100644
index 8019e16..0000000
--- a/extra_lib/include/freetype/freetype/ftglyph.h
+++ /dev/null
@@ -1,566 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftglyph.h                                                              */
-/*                                                                         */
-/*    FreeType convenience functions to handle glyphs (specification).     */
-/*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003 by                                     */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* This file contains the definition of several convenience functions    */
-  /* that can be used by client applications to easily retrieve glyph      */
-  /* bitmaps and outlines from a given face.                               */
-  /*                                                                       */
-  /* These functions should be optional if you are writing a font server   */
-  /* or text layout engine on top of FreeType.  However, they are pretty   */
-  /* handy for many other simple uses of the library.                      */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-#ifndef __FTGLYPH_H__
-#define __FTGLYPH_H__
-
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-#ifdef FREETYPE_H
-#error "freetype.h of FreeType 1 has been loaded!"
-#error "Please fix the directory search order for header files"
-#error "so that freetype.h of FreeType 2 is found first."
-#endif
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    glyph_management                                                   */
-  /*                                                                       */
-  /* <Title>                                                               */
-  /*    Glyph Management                                                   */
-  /*                                                                       */
-  /* <Abstract>                                                            */
-  /*    Generic interface to manage individual glyph data.                 */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This section contains definitions used to manage glyph data        */
-  /*    through generic FT_Glyph objects.  Each of them can contain a      */
-  /*    bitmap, a vector outline, or even images in other formats.         */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /* forward declaration to a private type */
-  typedef struct FT_Glyph_Class_  FT_Glyph_Class;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_Glyph                                                           */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Handle to an object used to model generic glyph images.  It is a   */
-  /*    pointer to the @FT_GlyphRec structure and can contain a glyph      */
-  /*    bitmap or pointer.                                                 */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    Glyph objects are not owned by the library.  You must thus release */
-  /*    them manually (through @FT_Done_Glyph) _before_ calling            */
-  /*    @FT_Done_FreeType.                                                 */
-  /*                                                                       */
-  typedef struct FT_GlyphRec_*  FT_Glyph;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_GlyphRec                                                        */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    The root glyph structure contains a given glyph image plus its     */
-  /*    advance width in 16.16 fixed float format.                         */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    library :: A handle to the FreeType library object.                */
-  /*                                                                       */
-  /*    clazz   :: A pointer to the glyph's class.  Private.               */
-  /*                                                                       */
-  /*    format  :: The format of the glyph's image.                        */
-  /*                                                                       */
-  /*    advance :: A 16.16 vector that gives the glyph's advance width.    */
-  /*                                                                       */
-  typedef struct  FT_GlyphRec_
-  {
-    FT_Library             library;
-    const FT_Glyph_Class*  clazz;
-    FT_Glyph_Format        format;
-    FT_Vector              advance;
-
-  } FT_GlyphRec;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_BitmapGlyph                                                     */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A handle to an object used to model a bitmap glyph image.  This is */
-  /*    a sub-class of @FT_Glyph, and a pointer to @FT_BitmapGlyphRec.     */
-  /*                                                                       */
-  typedef struct FT_BitmapGlyphRec_*  FT_BitmapGlyph;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_BitmapGlyphRec                                                  */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure used for bitmap glyph images.  This really is a        */
-  /*    `sub-class' of `FT_GlyphRec'.                                      */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    root   :: The root FT_Glyph fields.                                */
-  /*                                                                       */
-  /*    left   :: The left-side bearing, i.e., the horizontal distance     */
-  /*              from the current pen position to the left border of the  */
-  /*              glyph bitmap.                                            */
-  /*                                                                       */
-  /*    top    :: The top-side bearing, i.e., the vertical distance from   */
-  /*              the current pen position to the top border of the glyph  */
-  /*              bitmap.  This distance is positive for upwards-y!        */
-  /*                                                                       */
-  /*    bitmap :: A descriptor for the bitmap.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    You can typecast FT_Glyph to FT_BitmapGlyph if you have            */
-  /*    glyph->format == FT_GLYPH_FORMAT_BITMAP.  This lets you access     */
-  /*    the bitmap's contents easily.                                      */
-  /*                                                                       */
-  /*    The corresponding pixel buffer is always owned by the BitmapGlyph  */
-  /*    and is thus created and destroyed with it.                         */
-  /*                                                                       */
-  typedef struct  FT_BitmapGlyphRec_
-  {
-    FT_GlyphRec  root;
-    FT_Int       left;
-    FT_Int       top;
-    FT_Bitmap    bitmap;
-
-  } FT_BitmapGlyphRec;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_OutlineGlyph                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A handle to an object used to model an outline glyph image.  This  */
-  /*    is a sub-class of @FT_Glyph, and a pointer to @FT_OutlineGlyphRec. */
-  /*                                                                       */
-  typedef struct FT_OutlineGlyphRec_*  FT_OutlineGlyph;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_OutlineGlyphRec                                                 */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure used for outline (vectorial) glyph images.  This       */
-  /*    really is a `sub-class' of `FT_GlyphRec'.                          */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    root    :: The root FT_Glyph fields.                               */
-  /*                                                                       */
-  /*    outline :: A descriptor for the outline.                           */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    You can typecast FT_Glyph to FT_OutlineGlyph if you have           */
-  /*    glyph->format == FT_GLYPH_FORMAT_OUTLINE.  This lets you access    */
-  /*    the outline's content easily.                                      */
-  /*                                                                       */
-  /*    As the outline is extracted from a glyph slot, its coordinates are */
-  /*    expressed normally in 26.6 pixels, unless the flag                 */
-  /*    FT_LOAD_NO_SCALE was used in FT_Load_Glyph() or FT_Load_Char().    */
-  /*                                                                       */
-  /*    The outline's tables are always owned by the object and are        */
-  /*    destroyed with it.                                                 */
-  /*                                                                       */
-  typedef struct  FT_OutlineGlyphRec_
-  {
-    FT_GlyphRec  root;
-    FT_Outline   outline;
-
-  } FT_OutlineGlyphRec;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Get_Glyph                                                       */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A function used to extract a glyph image from a slot.              */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    slot   :: A handle to the source glyph slot.                       */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    aglyph :: A handle to the glyph object.                            */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Get_Glyph( FT_GlyphSlot  slot,
-                FT_Glyph     *aglyph );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Glyph_Copy                                                      */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A function used to copy a glyph image.  Note that the created      */
-  /*    @FT_Glyph object must be released with @FT_Done_Glyph.             */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    source :: A handle to the source glyph object.                     */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    target :: A handle to the target glyph object.  0 in case of       */
-  /*              error.                                                   */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Glyph_Copy( FT_Glyph   source,
-                 FT_Glyph  *target );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Glyph_Transform                                                 */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Transforms a glyph image if its format is scalable.                */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    glyph  :: A handle to the target glyph object.                     */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    matrix :: A pointer to a 2x2 matrix to apply.                      */
-  /*                                                                       */
-  /*    delta  :: A pointer to a 2d vector to apply.  Coordinates are      */
-  /*              expressed in 1/64th of a pixel.                          */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code (the glyph format is not scalable if it is     */
-  /*    not zero).                                                         */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The 2x2 transformation matrix is also applied to the glyph's       */
-  /*    advance vector.                                                    */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Glyph_Transform( FT_Glyph    glyph,
-                      FT_Matrix*  matrix,
-                      FT_Vector*  delta );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Enum>                                                                */
-  /*    FT_Glyph_BBox_Mode                                                 */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    The mode how the values of @FT_Glyph_Get_CBox are returned.        */
-  /*                                                                       */
-  /* <Values>                                                              */
-  /*    FT_GLYPH_BBOX_UNSCALED ::                                          */
-  /*      Return unscaled font units.                                      */
-  /*                                                                       */
-  /*    FT_GLYPH_BBOX_SUBPIXELS ::                                         */
-  /*      Return unfitted 26.6 coordinates.                                */
-  /*                                                                       */
-  /*    FT_GLYPH_BBOX_GRIDFIT ::                                           */
-  /*      Return grid-fitted 26.6 coordinates.                             */
-  /*                                                                       */
-  /*    FT_GLYPH_BBOX_TRUNCATE ::                                          */
-  /*      Return coordinates in integer pixels.                            */
-  /*                                                                       */
-  /*    FT_GLYPH_BBOX_PIXELS ::                                            */
-  /*      Return grid-fitted pixel coordinates.                            */
-  /*                                                                       */
-  typedef enum  FT_Glyph_BBox_Mode_
-  {
-    FT_GLYPH_BBOX_UNSCALED  = 0,
-    FT_GLYPH_BBOX_SUBPIXELS = 0,
-    FT_GLYPH_BBOX_GRIDFIT   = 1,
-    FT_GLYPH_BBOX_TRUNCATE  = 2,
-    FT_GLYPH_BBOX_PIXELS    = 3
-
-  } FT_Glyph_BBox_Mode;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Enum>                                                                */
-  /*    ft_glyph_bbox_xxx                                                  */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    These constants are deprecated.  Use the corresponding             */
-  /*    @FT_Glyph_BBox_Mode values instead.                                */
-  /*                                                                       */
-  /* <Values>                                                              */
-  /*   ft_glyph_bbox_unscaled  :: see @FT_GLYPH_BBOX_UNSCALED              */
-  /*   ft_glyph_bbox_subpixels :: see @FT_GLYPH_BBOX_SUBPIXELS             */
-  /*   ft_glyph_bbox_gridfit   :: see @FT_GLYPH_BBOX_GRIDFIT               */
-  /*   ft_glyph_bbox_truncate  :: see @FT_GLYPH_BBOX_TRUNCATE              */
-  /*   ft_glyph_bbox_pixels    :: see @FT_GLYPH_BBOX_PIXELS                */
-  /*                                                                       */
-#define ft_glyph_bbox_unscaled   FT_GLYPH_BBOX_UNSCALED
-#define ft_glyph_bbox_subpixels  FT_GLYPH_BBOX_SUBPIXELS
-#define ft_glyph_bbox_gridfit    FT_GLYPH_BBOX_GRIDFIT
-#define ft_glyph_bbox_truncate   FT_GLYPH_BBOX_TRUNCATE
-#define ft_glyph_bbox_pixels     FT_GLYPH_BBOX_PIXELS
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Glyph_Get_CBox                                                  */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Returns a glyph's `control box'.  The control box encloses all the */
-  /*    outline's points, including Bezier control points.  Though it      */
-  /*    coincides with the exact bounding box for most glyphs, it can be   */
-  /*    slightly larger in some situations (like when rotating an outline  */
-  /*    which contains Bezier outside arcs).                               */
-  /*                                                                       */
-  /*    Computing the control box is very fast, while getting the bounding */
-  /*    box can take much more time as it needs to walk over all segments  */
-  /*    and arcs in the outline.  To get the latter, you can use the       */
-  /*    `ftbbox' component which is dedicated to this single task.         */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    glyph :: A handle to the source glyph object.                      */
-  /*                                                                       */
-  /*    mode  :: The mode which indicates how to interpret the returned    */
-  /*             bounding box values.                                      */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    acbox :: The glyph coordinate bounding box.  Coordinates are       */
-  /*             expressed in 1/64th of pixels if it is grid-fitted.       */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    Coordinates are relative to the glyph origin, using the Y-upwards  */
-  /*    convention.                                                        */
-  /*                                                                       */
-  /*    If the glyph has been loaded with FT_LOAD_NO_SCALE, `bbox_mode'    */
-  /*    must be set to `FT_GLYPH_BBOX_UNSCALED' to get unscaled font       */
-  /*    units in 26.6 pixel format.  The value `FT_GLYPH_BBOX_SUBPIXELS'   */
-  /*    is another name for this constant.                                 */
-  /*                                                                       */
-  /*    Note that the maximum coordinates are exclusive, which means that  */
-  /*    one can compute the width and height of the glyph image (be it in  */
-  /*    integer or 26.6 pixels) as:                                        */
-  /*                                                                       */
-  /*      width  = bbox.xMax - bbox.xMin;                                  */
-  /*      height = bbox.yMax - bbox.yMin;                                  */
-  /*                                                                       */
-  /*    Note also that for 26.6 coordinates, if `bbox_mode' is set to      */
-  /*    `FT_GLYPH_BBOX_GRIDFIT', the coordinates will also be grid-fitted, */
-  /*    which corresponds to:                                              */
-  /*                                                                       */
-  /*      bbox.xMin = FLOOR(bbox.xMin);                                    */
-  /*      bbox.yMin = FLOOR(bbox.yMin);                                    */
-  /*      bbox.xMax = CEILING(bbox.xMax);                                  */
-  /*      bbox.yMax = CEILING(bbox.yMax);                                  */
-  /*                                                                       */
-  /*    To get the bbox in pixel coordinates, set `bbox_mode' to           */
-  /*    `FT_GLYPH_BBOX_TRUNCATE'.                                          */
-  /*                                                                       */
-  /*    To get the bbox in grid-fitted pixel coordinates, set `bbox_mode'  */
-  /*    to `FT_GLYPH_BBOX_PIXELS'.                                         */
-  /*                                                                       */
-  FT_EXPORT( void )
-  FT_Glyph_Get_CBox( FT_Glyph  glyph,
-                     FT_UInt   bbox_mode,
-                     FT_BBox  *acbox );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Glyph_To_Bitmap                                                 */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Converts a given glyph object to a bitmap glyph object.            */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    the_glyph   :: A pointer to a handle to the target glyph.          */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    render_mode :: An enumeration that describe how the data is        */
-  /*                   rendered.                                           */
-  /*                                                                       */
-  /*    origin      :: A pointer to a vector used to translate the glyph   */
-  /*                   image before rendering.  Can be 0 (if no            */
-  /*                   translation).  The origin is expressed in           */
-  /*                   26.6 pixels.                                        */
-  /*                                                                       */
-  /*    destroy     :: A boolean that indicates that the original glyph    */
-  /*                   image should be destroyed by this function.  It is  */
-  /*                   never destroyed in case of error.                   */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The glyph image is translated with the `origin' vector before      */
-  /*    rendering.                                                         */
-  /*                                                                       */
-  /*    The first parameter is a pointer to a FT_Glyph handle, that will   */
-  /*    be replaced by this function.  Typically, you would use (omitting  */
-  /*    error handling):                                                   */
-  /*                                                                       */
-  /*                                                                       */
-  /*      {                                                                */
-  /*        FT_Glyph        glyph;                                         */
-  /*        FT_BitmapGlyph  glyph_bitmap;                                  */
-  /*                                                                       */
-  /*                                                                       */
-  /*        // load glyph                                                  */
-  /*        error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAUT );     */
-  /*                                                                       */
-  /*        // extract glyph image                                         */
-  /*        error = FT_Get_Glyph( face->glyph, &glyph );                   */
-  /*                                                                       */
-  /*        // convert to a bitmap (default render mode + destroy old)     */
-  /*        if ( glyph->format != FT_GLYPH_FORMAT_BITMAP )                 */
-  /*        {                                                              */
-  /*          error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_DEFAULT,  */
-  /*                                      0, 1 );                          */
-  /*          if ( error ) // glyph unchanged                              */
-  /*            ...                                                        */
-  /*        }                                                              */
-  /*                                                                       */
-  /*        // access bitmap content by typecasting                        */
-  /*        glyph_bitmap = (FT_BitmapGlyph)glyph;                          */
-  /*                                                                       */
-  /*        // do funny stuff with it, like blitting/drawing               */
-  /*        ...                                                            */
-  /*                                                                       */
-  /*        // discard glyph image (bitmap or not)                         */
-  /*        FT_Done_Glyph( glyph );                                        */
-  /*      }                                                                */
-  /*                                                                       */
-  /*                                                                       */
-  /*    This function will always fail if the glyph's format isn't         */
-  /*    scalable.                                                          */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Glyph_To_Bitmap( FT_Glyph*       the_glyph,
-                      FT_Render_Mode  render_mode,
-                      FT_Vector*      origin,
-                      FT_Bool         destroy );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Done_Glyph                                                      */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Destroys a given glyph.                                            */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    glyph :: A handle to the target glyph object.                      */
-  /*                                                                       */
-  FT_EXPORT( void )
-  FT_Done_Glyph( FT_Glyph  glyph );
-
-
-  /* other helpful functions */
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    computations                                                       */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Matrix_Multiply                                                 */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Performs the matrix operation `b = a*b'.                           */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    a :: A pointer to matrix `a'.                                      */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    b :: A pointer to matrix `b'.                                      */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The result is undefined if either `a' or `b' is zero.              */
-  /*                                                                       */
-  FT_EXPORT( void )
-  FT_Matrix_Multiply( const FT_Matrix*  a,
-                      FT_Matrix*  b );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Matrix_Invert                                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Inverts a 2x2 matrix.  Returns an error if it can't be inverted.   */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    matrix :: A pointer to the target matrix.  Remains untouched in    */
-  /*              case of error.                                           */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Matrix_Invert( FT_Matrix*  matrix );
-
-
-  /* */
-
-
-FT_END_HEADER
-
-#endif /* __FTGLYPH_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/ftgzip.h b/extra_lib/include/freetype/freetype/ftgzip.h
deleted file mode 100644
index 5d7228b..0000000
--- a/extra_lib/include/freetype/freetype/ftgzip.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftgzip.h                                                               */
-/*                                                                         */
-/*    Gzip-compressed stream support.                                      */
-/*                                                                         */
-/*  Copyright 2002, 2003 by                                                */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __FTGZIP_H__
-#define __FTGZIP_H__
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-#ifdef FREETYPE_H
-#error "freetype.h of FreeType 1 has been loaded!"
-#error "Please fix the directory search order for header files"
-#error "so that freetype.h of FreeType 2 is found first."
-#endif
-
-
-FT_BEGIN_HEADER
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    gzip                                                               */
-  /*                                                                       */
-  /* <Title>                                                               */
-  /*    GZIP Streams                                                       */
-  /*                                                                       */
-  /* <Abstract>                                                            */
-  /*    Using gzip-compressed font files                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This section contains the declaration of Gzip-specific functions.  */
-  /*                                                                       */
-  /*************************************************************************/
-
-
- /************************************************************************
-  *
-  * @function:
-  *   FT_Stream_OpenGzip
-  *
-  * @description:
-  *   Open a new stream to parse gzip-compressed font files.  This is
-  *   mainly used to support the compressed *.pcf.gz fonts that come
-  *   with XFree86.
-  *
-  * @input:
-  *   stream :: The target embedding stream.
-  *
-  *   source :: The source stream.
-  *
-  * @return:
-  *   FreeType error code.  0 means success.
-  *
-  * @note:
-  *   The source stream must be opened _before_ calling this function.
-  *
-  *   Calling the internal function FT_Stream_Close on the new stream will
-  *   *not* call FT_Stream_Close on the source stream.  None of the stream
-  *   objects will be released to the heap.
-  *
-  *   The stream implementation is very basic and resets the decompression
-  *   process each time seeking backwards is needed within the stream.
-  *
-  *   In certain builds of the library, gzip compression recognition is
-  *   automatically handled when calling @FT_New_Face or @FT_Open_Face.
-  *   This means that if no font driver is capable of handling the raw
-  *   compressed file, the library will try to open a gzipped stream from
-  *   it and re-open the face with it.
-  *
-  *   This function may return "FT_Err_Unimplemented" if your build of
-  *   FreeType was not compiled with zlib support.
-  */
-  FT_EXPORT( FT_Error )
-  FT_Stream_OpenGzip( FT_Stream  stream,
-                      FT_Stream  source );
-
- /* */
-
-
-FT_END_HEADER
-
-#endif /* __FTGZIP_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/ftimage.h b/extra_lib/include/freetype/freetype/ftimage.h
deleted file mode 100644
index 2875965..0000000
--- a/extra_lib/include/freetype/freetype/ftimage.h
+++ /dev/null
@@ -1,1236 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftimage.h                                                              */
-/*                                                                         */
-/*    FreeType glyph image formats and default raster interface            */
-/*    (specification).                                                     */
-/*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003 by                                     */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Note: A `raster' is simply a scan-line converter, used to render      */
-  /*       FT_Outlines into FT_Bitmaps.                                    */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-#ifndef __FTIMAGE_H__
-#define __FTIMAGE_H__
-
-
-/* _STANDALONE_ is from ftgrays.c */
-#ifndef _STANDALONE_
-#include <ft2build.h>
-#endif
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    basic_types                                                        */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_Pos                                                             */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    The type FT_Pos is a 32-bit integer used to store vectorial        */
-  /*    coordinates.  Depending on the context, these can represent        */
-  /*    distances in integer font units, or 16,16, or 26.6 fixed float     */
-  /*    pixel coordinates.                                                 */
-  /*                                                                       */
-  typedef signed long  FT_Pos;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_Vector                                                          */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A simple structure used to store a 2D vector; coordinates are of   */
-  /*    the FT_Pos type.                                                   */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    x :: The horizontal coordinate.                                    */
-  /*    y :: The vertical coordinate.                                      */
-  /*                                                                       */
-  typedef struct  FT_Vector_
-  {
-    FT_Pos  x;
-    FT_Pos  y;
-
-  } FT_Vector;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_BBox                                                            */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure used to hold an outline's bounding box, i.e., the      */
-  /*    coordinates of its extrema in the horizontal and vertical          */
-  /*    directions.                                                        */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    xMin :: The horizontal minimum (left-most).                        */
-  /*                                                                       */
-  /*    yMin :: The vertical minimum (bottom-most).                        */
-  /*                                                                       */
-  /*    xMax :: The horizontal maximum (right-most).                       */
-  /*                                                                       */
-  /*    yMax :: The vertical maximum (top-most).                           */
-  /*                                                                       */
-  typedef struct  FT_BBox_
-  {
-    FT_Pos  xMin, yMin;
-    FT_Pos  xMax, yMax;
-
-  } FT_BBox;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Enum>                                                                */
-  /*    FT_Pixel_Mode                                                      */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    An enumeration type used to describe the format of pixels in a     */
-  /*    given bitmap.  Note that additional formats may be added in the    */
-  /*    future.                                                            */
-  /*                                                                       */
-  /* <Values>                                                              */
-  /*    FT_PIXEL_MODE_NONE ::                                              */
-  /*      Value 0 is reserved.                                             */
-  /*                                                                       */
-  /*    FT_PIXEL_MODE_MONO ::                                              */
-  /*      A monochrome bitmap, using 1 bit per pixel.  Note that pixels    */
-  /*      are stored in most-significant order (MSB), which means that     */
-  /*      the left-most pixel in a byte has value 128.                     */
-  /*                                                                       */
-  /*    FT_PIXEL_MODE_GRAY ::                                              */
-  /*      An 8-bit bitmap, generally used to represent anti-aliased glyph  */
-  /*      images.  Each pixel is stored in one byte.  Note that the number */
-  /*      of value "gray" levels is stored in the `num_bytes' field of     */
-  /*      the @FT_Bitmap structure (it generally is 256).                  */
-  /*                                                                       */
-  /*    FT_PIXEL_MODE_GRAY2 ::                                             */
-  /*      A 2-bit/pixel bitmap, used to represent embedded anti-aliased    */
-  /*      bitmaps in font files according to the OpenType specification.   */
-  /*      We haven't found a single font using this format, however.       */
-  /*                                                                       */
-  /*    FT_PIXEL_MODE_GRAY4 ::                                             */
-  /*      A 4-bit/pixel bitmap, used to represent embedded anti-aliased    */
-  /*      bitmaps in font files according to the OpenType specification.   */
-  /*      We haven't found a single font using this format, however.       */
-  /*                                                                       */
-  /*    FT_PIXEL_MODE_LCD ::                                               */
-  /*      An 8-bit bitmap, used to represent RGB or BGR decimated glyph    */
-  /*      images used for display on LCD displays; the bitmap's width is   */
-  /*      three times wider than the original glyph image.  See also       */
-  /*      @FT_RENDER_MODE_LCD.                                             */
-  /*                                                                       */
-  /*    FT_PIXEL_MODE_LCD_V ::                                             */
-  /*      An 8-bit bitmap, used to represent RGB or BGR decimated glyph    */
-  /*      images used for display on rotated LCD displays; the bitmap's    */
-  /*      height is three times taller than the original glyph image.      */
-  /*      See also @FT_RENDER_MODE_LCD_V.                                  */
-  /*                                                                       */
-  typedef enum  FT_Pixel_Mode_
-  {
-    FT_PIXEL_MODE_NONE = 0,
-    FT_PIXEL_MODE_MONO,
-    FT_PIXEL_MODE_GRAY,
-    FT_PIXEL_MODE_GRAY2,
-    FT_PIXEL_MODE_GRAY4,
-    FT_PIXEL_MODE_LCD,
-    FT_PIXEL_MODE_LCD_V,
-
-    FT_PIXEL_MODE_MAX      /* do not remove */
-
-  } FT_Pixel_Mode;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Enum>                                                                */
-  /*    ft_pixel_mode_xxx                                                  */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A list of deprecated constants.  Use the corresponding             */
-  /*    @FT_Pixel_Mode values instead.                                     */
-  /*                                                                       */
-  /* <Values>                                                              */
-  /*    ft_pixel_mode_none  :: see @FT_PIXEL_MODE_NONE                     */
-  /*    ft_pixel_mode_mono  :: see @FT_PIXEL_MODE_MONO                     */
-  /*    ft_pixel_mode_grays :: see @FT_PIXEL_MODE_GRAY                     */
-  /*    ft_pixel_mode_pal2  :: see @FT_PIXEL_MODE_GRAY2                    */
-  /*    ft_pixel_mode_pal4  :: see @FT_PIXEL_MODE_GRAY4                    */
-  /*                                                                       */
-#define ft_pixel_mode_none   FT_PIXEL_MODE_NONE
-#define ft_pixel_mode_mono   FT_PIXEL_MODE_MONO
-#define ft_pixel_mode_grays  FT_PIXEL_MODE_GRAY
-#define ft_pixel_mode_pal2   FT_PIXEL_MODE_GRAY2
-#define ft_pixel_mode_pal4   FT_PIXEL_MODE_GRAY4
-
- /* */
-
-#if 0
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Enum>                                                                */
-  /*    FT_Palette_Mode                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    THIS TYPE IS DEPRECATED.  DO NOT USE IT!                           */
-  /*                                                                       */
-  /*    An enumeration type used to describe the format of a bitmap        */
-  /*    palette, used with ft_pixel_mode_pal4 and ft_pixel_mode_pal8.      */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    ft_palette_mode_rgb  :: The palette is an array of 3-bytes RGB     */
-  /*                            records.                                   */
-  /*                                                                       */
-  /*    ft_palette_mode_rgba :: The palette is an array of 4-bytes RGBA    */
-  /*                            records.                                   */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    As ft_pixel_mode_pal2, pal4 and pal8 are currently unused by       */
-  /*    FreeType, these types are not handled by the library itself.       */
-  /*                                                                       */
-  typedef enum  FT_Palette_Mode_
-  {
-    ft_palette_mode_rgb = 0,
-    ft_palette_mode_rgba,
-
-    ft_palettte_mode_max   /* do not remove */
-
-  } FT_Palette_Mode;
-
-  /* */
-
-#endif
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_Bitmap                                                          */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure used to describe a bitmap or pixmap to the raster.     */
-  /*    Note that we now manage pixmaps of various depths through the      */
-  /*    `pixel_mode' field.                                                */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    rows         :: The number of bitmap rows.                         */
-  /*                                                                       */
-  /*    width        :: The number of pixels in bitmap row.                */
-  /*                                                                       */
-  /*    pitch        :: The pitch's absolute value is the number of bytes  */
-  /*                    taken by one bitmap row, including padding.        */
-  /*                    However, the pitch is positive when the bitmap has */
-  /*                    a `down' flow, and negative when it has an `up'    */
-  /*                    flow.  In all cases, the pitch is an offset to add */
-  /*                    to a bitmap pointer in order to go down one row.   */
-  /*                                                                       */
-  /*    buffer       :: A typeless pointer to the bitmap buffer.  This     */
-  /*                    value should be aligned on 32-bit boundaries in    */
-  /*                    most cases.                                        */
-  /*                                                                       */
-  /*    num_grays    :: This field is only used with                       */
-  /*                    `FT_PIXEL_MODE_GRAY'; it gives the number of gray  */
-  /*                    levels used in the bitmap.                         */
-  /*                                                                       */
-  /*    pixel_mode   :: The pixel mode, i.e., how pixel bits are stored.   */
-  /*                    See @FT_Pixel_Mode for possible values.            */
-  /*                                                                       */
-  /*    palette_mode :: This field is only used with paletted pixel modes; */
-  /*                    it indicates how the palette is stored.            */
-  /*                                                                       */
-  /*    palette      :: A typeless pointer to the bitmap palette; only     */
-  /*                    used for paletted pixel modes.                     */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*   For now, the only pixel mode supported by FreeType are mono and     */
-  /*   grays.  However, drivers might be added in the future to support    */
-  /*   more `colorful' options.                                            */
-  /*                                                                       */
-  /*   When using pixel modes pal2, pal4 and pal8 with a void `palette'    */
-  /*   field, a gray pixmap with respectively 4, 16, and 256 levels of     */
-  /*   gray is assumed.  This, in order to be compatible with some         */
-  /*   embedded bitmap formats defined in the TrueType specification.      */
-  /*                                                                       */
-  /*   Note that no font was found presenting such embedded bitmaps, so    */
-  /*   this is currently completely unhandled by the library.              */
-  /*                                                                       */
-  typedef struct  FT_Bitmap_
-  {
-    int             rows;
-    int             width;
-    int             pitch;
-    unsigned char*  buffer;
-    short           num_grays;
-    char            pixel_mode;
-    char            palette_mode;
-    void*           palette;
-
-  } FT_Bitmap;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    outline_processing                                                 */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_Outline                                                         */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This structure is used to describe an outline to the scan-line     */
-  /*    converter.                                                         */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    n_contours :: The number of contours in the outline.               */
-  /*                                                                       */
-  /*    n_points   :: The number of points in the outline.                 */
-  /*                                                                       */
-  /*    points     :: A pointer to an array of `n_points' FT_Vector        */
-  /*                  elements, giving the outline's point coordinates.    */
-  /*                                                                       */
-  /*    tags       :: A pointer to an array of `n_points' chars, giving    */
-  /*                  each outline point's type.  If bit 0 is unset, the   */
-  /*                  point is `off' the curve, i.e. a Bezier control      */
-  /*                  point, while it is `on' when set.                    */
-  /*                                                                       */
-  /*                  Bit 1 is meaningful for `off' points only.  If set,  */
-  /*                  it indicates a third-order Bezier arc control point; */
-  /*                  and a second-order control point if unset.           */
-  /*                                                                       */
-  /*    contours   :: An array of `n_contours' shorts, giving the end      */
-  /*                  point of each contour within the outline.  For       */
-  /*                  example, the first contour is defined by the points  */
-  /*                  `0' to `contours[0]', the second one is defined by   */
-  /*                  the points `contours[0]+1' to `contours[1]', etc.    */
-  /*                                                                       */
-  /*    flags      :: A set of bit flags used to characterize the outline  */
-  /*                  and give hints to the scan-converter and hinter on   */
-  /*                  how to convert/grid-fit it.  See FT_Outline_Flags.   */
-  /*                                                                       */
-  typedef struct  FT_Outline_
-  {
-    short       n_contours;      /* number of contours in glyph        */
-    short       n_points;        /* number of points in the glyph      */
-
-    FT_Vector*  points;          /* the outline's points               */
-    char*       tags;            /* the points flags                   */
-    short*      contours;        /* the contour end points             */
-
-    int         flags;           /* outline masks                      */
-
-  } FT_Outline;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Enum>                                                                */
-  /*   FT_OUTLINE_FLAGS                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A list of bit-field constants use for the flags in an outline's    */
-  /*    `flags' field.                                                     */
-  /*                                                                       */
-  /* <Values>                                                              */
-  /*    FT_OUTLINE_NONE           :: Value 0 is reserved.                  */
-  /*                                                                       */
-  /*    FT_OUTLINE_OWNER          :: If set, this flag indicates that the  */
-  /*                                 outline's field arrays (i.e.          */
-  /*                                 `points', `flags' & `contours') are   */
-  /*                                 `owned' by the outline object, and    */
-  /*                                 should thus be freed when it is       */
-  /*                                 destroyed.                            */
-  /*                                                                       */
-  /*   FT_OUTLINE_EVEN_ODD_FILL   :: By default, outlines are filled using */
-  /*                                 the non-zero winding rule.  If set to */
-  /*                                 1, the outline will be filled using   */
-  /*                                 the even-odd fill rule (only works    */
-  /*                                 with the smooth raster).              */
-  /*                                                                       */
-  /*   FT_OUTLINE_REVERSE_FILL    :: By default, outside contours of an    */
-  /*                                 outline are oriented in clock-wise    */
-  /*                                 direction, as defined in the TrueType */
-  /*                                 specification.  This flag is set if   */
-  /*                                 the outline uses the opposite         */
-  /*                                 direction (typically for Type 1       */
-  /*                                 fonts).  This flag is ignored by the  */
-  /*                                 scan-converter.  However, it is very  */
-  /*                                 important for the auto-hinter.        */
-  /*                                                                       */
-  /*   FT_OUTLINE_IGNORE_DROPOUTS :: By default, the scan converter will   */
-  /*                                 try to detect drop-outs in an outline */
-  /*                                 and correct the glyph bitmap to       */
-  /*                                 ensure consistent shape continuity.   */
-  /*                                 If set, this flag hints the scan-line */
-  /*                                 converter to ignore such cases.       */
-  /*                                                                       */
-  /*   FT_OUTLINE_HIGH_PRECISION  :: This flag indicates that the          */
-  /*                                 scan-line converter should try to     */
-  /*                                 convert this outline to bitmaps with  */
-  /*                                 the highest possible quality.  It is  */
-  /*                                 typically set for small character     */
-  /*                                 sizes.  Note that this is only a      */
-  /*                                 hint, that might be completely        */
-  /*                                 ignored by a given scan-converter.    */
-  /*                                                                       */
-  /*   FT_OUTLINE_SINGLE_PASS     :: This flag is set to force a given     */
-  /*                                 scan-converter to only use a single   */
-  /*                                 pass over the outline to render a     */
-  /*                                 bitmap glyph image.  Normally, it is  */
-  /*                                 set for very large character sizes.   */
-  /*                                 It is only a hint, that might be      */
-  /*                                 completely ignored by a given         */
-  /*                                 scan-converter.                       */
-  /*                                                                       */
-#define FT_OUTLINE_NONE             0x0
-#define FT_OUTLINE_OWNER            0x1
-#define FT_OUTLINE_EVEN_ODD_FILL    0x2
-#define FT_OUTLINE_REVERSE_FILL     0x4
-#define FT_OUTLINE_IGNORE_DROPOUTS  0x8
-
-#define FT_OUTLINE_HIGH_PRECISION   0x100
-#define FT_OUTLINE_SINGLE_PASS      0x200
-
-
- /*************************************************************************
-  *
-  * @enum:
-  *   ft_outline_flags
-  *
-  * @description:
-  *   These constants are deprecated.  Please use the corresponding
-  *   @FT_OUTLINE_FLAGS values.
-  *
-  * @values:
-  *   ft_outline_none            :: See @FT_OUTLINE_NONE.
-  *   ft_outline_owner           :: See @FT_OUTLINE_OWNER.
-  *   ft_outline_even_odd_fill   :: See @FT_OUTLINE_EVEN_ODD_FILL.
-  *   ft_outline_reverse_fill    :: See @FT_OUTLINE_REVERSE_FILL.
-  *   ft_outline_ignore_dropouts :: See @FT_OUTLINE_IGNORE_DROPOUTS.
-  *   ft_outline_high_precision  :: See @FT_OUTLINE_HIGH_PRECISION.
-  *   ft_outline_single_pass     :: See @FT_OUTLINE_SINGLE_PASS.
-  */
-#define ft_outline_none             FT_OUTLINE_NONE
-#define ft_outline_owner            FT_OUTLINE_OWNER
-#define ft_outline_even_odd_fill    FT_OUTLINE_EVEN_ODD_FILL
-#define ft_outline_reverse_fill     FT_OUTLINE_REVERSE_FILL
-#define ft_outline_ignore_dropouts  FT_OUTLINE_IGNORE_DROPOUTS
-#define ft_outline_high_precision   FT_OUTLINE_HIGH_PRECISION
-#define ft_outline_single_pass      FT_OUTLINE_SINGLE_PASS
-
-  /* */
-
-#define FT_CURVE_TAG( flag )  ( flag & 3 )
-
-#define FT_CURVE_TAG_ON           1
-#define FT_CURVE_TAG_CONIC        0
-#define FT_CURVE_TAG_CUBIC        2
-
-#define FT_CURVE_TAG_TOUCH_X      8  /* reserved for the TrueType hinter */
-#define FT_CURVE_TAG_TOUCH_Y     16  /* reserved for the TrueType hinter */
-
-#define FT_CURVE_TAG_TOUCH_BOTH  ( FT_CURVE_TAG_TOUCH_X | \
-                                   FT_CURVE_TAG_TOUCH_Y )
-
-#define  FT_Curve_Tag_On       FT_CURVE_TAG_ON
-#define  FT_Curve_Tag_Conic    FT_CURVE_TAG_CONIC
-#define  FT_Curve_Tag_Cubic    FT_CURVE_TAG_CUBIC
-#define  FT_Curve_Tag_Touch_X  FT_CURVE_TAG_TOUCH_X
-#define  FT_Curve_Tag_Touch_Y  FT_CURVE_TAG_TOUCH_Y
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    FT_Outline_MoveToFunc                                              */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A function pointer type used to describe the signature of a `move  */
-  /*    to' function during outline walking/decomposition.                 */
-  /*                                                                       */
-  /*    A `move to' is emitted to start a new contour in an outline.       */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    to   :: A pointer to the target point of the `move to'.            */
-  /*                                                                       */
-  /*    user :: A typeless pointer which is passed from the caller of the  */
-  /*            decomposition function.                                    */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    Error code.  0 means success.                                      */
-  /*                                                                       */
-  typedef int
-  (*FT_Outline_MoveToFunc)( FT_Vector*  to,
-                            void*       user );
-
-#define FT_Outline_MoveTo_Func  FT_Outline_MoveToFunc
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    FT_Outline_LineToFunc                                              */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A function pointer type used to describe the signature of a `line  */
-  /*    to' function during outline walking/decomposition.                 */
-  /*                                                                       */
-  /*    A `line to' is emitted to indicate a segment in the outline.       */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    to   :: A pointer to the target point of the `line to'.            */
-  /*                                                                       */
-  /*    user :: A typeless pointer which is passed from the caller of the  */
-  /*            decomposition function.                                    */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    Error code.  0 means success.                                      */
-  /*                                                                       */
-  typedef int
-  (*FT_Outline_LineToFunc)( FT_Vector*  to,
-                            void*       user );
-
-#define  FT_Outline_LineTo_Func  FT_Outline_LineToFunc
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    FT_Outline_ConicToFunc                                             */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A function pointer type use to describe the signature of a `conic  */
-  /*    to' function during outline walking/decomposition.                 */
-  /*                                                                       */
-  /*    A `conic to' is emitted to indicate a second-order Bezier arc in   */
-  /*    the outline.                                                       */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    control :: An intermediate control point between the last position */
-  /*               and the new target in `to'.                             */
-  /*                                                                       */
-  /*    to      :: A pointer to the target end point of the conic arc.     */
-  /*                                                                       */
-  /*    user    :: A typeless pointer which is passed from the caller of   */
-  /*               the decomposition function.                             */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    Error code.  0 means success.                                      */
-  /*                                                                       */
-  typedef int
-  (*FT_Outline_ConicToFunc)( FT_Vector*  control,
-                             FT_Vector*  to,
-                             void*       user );
-
-#define  FT_Outline_ConicTo_Func  FT_Outline_ConicToFunc
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    FT_Outline_CubicToFunc                                             */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A function pointer type used to describe the signature of a `cubic */
-  /*    to' function during outline walking/decomposition.                 */
-  /*                                                                       */
-  /*    A `cubic to' is emitted to indicate a third-order Bezier arc.      */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    control1 :: A pointer to the first Bezier control point.           */
-  /*                                                                       */
-  /*    control2 :: A pointer to the second Bezier control point.          */
-  /*                                                                       */
-  /*    to       :: A pointer to the target end point.                     */
-  /*                                                                       */
-  /*    user     :: A typeless pointer which is passed from the caller of  */
-  /*                the decomposition function.                            */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    Error code.  0 means success.                                      */
-  /*                                                                       */
-  typedef int
-  (*FT_Outline_CubicToFunc)( FT_Vector*  control1,
-                             FT_Vector*  control2,
-                             FT_Vector*  to,
-                             void*       user );
-
-#define  FT_Outline_CubicTo_Func  FT_Outline_CubicToFunc
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_Outline_Funcs                                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure to hold various function pointers used during outline  */
-  /*    decomposition in order to emit segments, conic, and cubic Beziers, */
-  /*    as well as `move to' and `close to' operations.                    */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    move_to  :: The `move to' emitter.                                 */
-  /*                                                                       */
-  /*    line_to  :: The segment emitter.                                   */
-  /*                                                                       */
-  /*    conic_to :: The second-order Bezier arc emitter.                   */
-  /*                                                                       */
-  /*    cubic_to :: The third-order Bezier arc emitter.                    */
-  /*                                                                       */
-  /*    shift    :: The shift that is applied to coordinates before they   */
-  /*                are sent to the emitter.                               */
-  /*                                                                       */
-  /*    delta    :: The delta that is applied to coordinates before they   */
-  /*                are sent to the emitter, but after the shift.          */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The point coordinates sent to the emitters are the transformed     */
-  /*    version of the original coordinates (this is important for high    */
-  /*    accuracy during scan-conversion).  The transformation is simple:   */
-  /*                                                                       */
-  /*      x' = (x << shift) - delta                                        */
-  /*      y' = (x << shift) - delta                                        */
-  /*                                                                       */
-  /*    Set the value of `shift' and `delta' to 0 to get the original      */
-  /*    point coordinates.                                                 */
-  /*                                                                       */
-  typedef struct  FT_Outline_Funcs_
-  {
-    FT_Outline_MoveToFunc   move_to;
-    FT_Outline_LineToFunc   line_to;
-    FT_Outline_ConicToFunc  conic_to;
-    FT_Outline_CubicToFunc  cubic_to;
-
-    int                     shift;
-    FT_Pos                  delta;
-
-  } FT_Outline_Funcs;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    basic_types                                                        */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Macro>                                                               */
-  /*    FT_IMAGE_TAG                                                       */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This macro converts four letter tags into an unsigned long.        */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    Since many 16bit compilers don't like 32bit enumerations, you      */
-  /*    should redefine this macro in case of problems to something like   */
-  /*    this:                                                              */
-  /*                                                                       */
-  /*      #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 )  (value)       */
-  /*                                                                       */
-  /*    to get a simple enumeration without assigning special numbers.     */
-  /*                                                                       */
-#ifndef FT_IMAGE_TAG
-#define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 )  \
-          value = ( ( (unsigned long)_x1 << 24 ) | \
-                    ( (unsigned long)_x2 << 16 ) | \
-                    ( (unsigned long)_x3 << 8  ) | \
-                      (unsigned long)_x4         )
-#endif /* FT_IMAGE_TAG */
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Enum>                                                                */
-  /*    FT_Glyph_Format                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    An enumeration type used to describe the format of a given glyph   */
-  /*    image.  Note that this version of FreeType only supports two image */
-  /*    formats, even though future font drivers will be able to register  */
-  /*    their own format.                                                  */
-  /*                                                                       */
-  /* <Values>                                                              */
-  /*    FT_GLYPH_FORMAT_NONE ::                                            */
-  /*      The value 0 is reserved and does describe a glyph format.        */
-  /*                                                                       */
-  /*    FT_GLYPH_FORMAT_COMPOSITE ::                                       */
-  /*      The glyph image is a composite of several other images.  This    */
-  /*      format is _only_ used with @FT_LOAD_NO_RECURSE, and is used to   */
-  /*      report compound glyphs (like accented characters).               */
-  /*                                                                       */
-  /*    FT_GLYPH_FORMAT_BITMAP ::                                          */
-  /*      The glyph image is a bitmap, and can be described as an          */
-  /*      @FT_Bitmap.  You generally need to access the `bitmap' field of  */
-  /*      the @FT_GlyphSlotRec structure to read it.                       */
-  /*                                                                       */
-  /*    FT_GLYPH_FORMAT_OUTLINE ::                                         */
-  /*      The glyph image is a vertorial outline made of line segments     */
-  /*      and Bezier arcs; it can be described as an @FT_Outline; you      */
-  /*      generally want to access the `outline' field of the              */
-  /*      @FT_GlyphSlotRec structure to read it.                           */
-  /*                                                                       */
-  /*    FT_GLYPH_FORMAT_PLOTTER ::                                         */
-  /*      The glyph image is a vectorial path with no inside/outside       */
-  /*      contours.  Some Type 1 fonts, like those in the Hershey family,  */
-  /*      contain glyphs in this format.  These are described as           */
-  /*      @FT_Outline, but FreeType isn't currently capable of rendering   */
-  /*      them correctly.                                                  */
-  /*                                                                       */
-  typedef enum  FT_Glyph_Format_
-  {
-    FT_IMAGE_TAG( FT_GLYPH_FORMAT_NONE, 0, 0, 0, 0 ),
-
-    FT_IMAGE_TAG( FT_GLYPH_FORMAT_COMPOSITE, 'c', 'o', 'm', 'p' ),
-    FT_IMAGE_TAG( FT_GLYPH_FORMAT_BITMAP,    'b', 'i', 't', 's' ),
-    FT_IMAGE_TAG( FT_GLYPH_FORMAT_OUTLINE,   'o', 'u', 't', 'l' ),
-    FT_IMAGE_TAG( FT_GLYPH_FORMAT_PLOTTER,   'p', 'l', 'o', 't' )
-
-  } FT_Glyph_Format;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Enum>                                                                */
-  /*    ft_glyph_format_xxx                                                */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A list of decprecated constants.  Use the corresponding            */
-  /*    @FT_Glyph_Format values instead.                                   */
-  /*                                                                       */
-  /* <Values>                                                              */
-  /*    ft_glyph_format_none      :: see @FT_GLYPH_FORMAT_NONE             */
-  /*    ft_glyph_format_composite :: see @FT_GLYPH_FORMAT_COMPOSITE        */
-  /*    ft_glyph_format_bitmap    :: see @FT_GLYPH_FORMAT_BITMAP           */
-  /*    ft_glyph_format_outline   :: see @FT_GLYPH_FORMAT_OUTLINE          */
-  /*    ft_glyph_format_plotter   :: see @FT_GLYPH_FORMAT_PLOTTER          */
-  /*                                                                       */
-#define ft_glyph_format_none       FT_GLYPH_FORMAT_NONE
-#define ft_glyph_format_composite  FT_GLYPH_FORMAT_COMPOSITE
-#define ft_glyph_format_bitmap     FT_GLYPH_FORMAT_BITMAP
-#define ft_glyph_format_outline    FT_GLYPH_FORMAT_OUTLINE
-#define ft_glyph_format_plotter    FT_GLYPH_FORMAT_PLOTTER
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*****                                                               *****/
-  /*****            R A S T E R   D E F I N I T I O N S                *****/
-  /*****                                                               *****/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* A raster is a scan converter, in charge of rendering an outline into  */
-  /* a a bitmap.  This section contains the public API for rasters.        */
-  /*                                                                       */
-  /* Note that in FreeType 2, all rasters are now encapsulated within      */
-  /* specific modules called `renderers'.  See `freetype/ftrender.h' for   */
-  /* more details on renderers.                                            */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    raster                                                             */
-  /*                                                                       */
-  /* <Title>                                                               */
-  /*    Scanline converter                                                 */
-  /*                                                                       */
-  /* <Abstract>                                                            */
-  /*    How vectorial outlines are converted into bitmaps and pixmaps.     */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This section contains technical definitions.                       */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_Raster                                                          */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A handle (pointer) to a raster object.  Each object can be used    */
-  /*    independently to convert an outline into a bitmap or pixmap.       */
-  /*                                                                       */
-  typedef struct FT_RasterRec_*  FT_Raster;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_Span                                                            */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure used to model a single span of gray (or black) pixels  */
-  /*    when rendering a monochrome or anti-aliased bitmap.                */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    x        :: The span's horizontal start position.                  */
-  /*                                                                       */
-  /*    len      :: The span's length in pixels.                           */
-  /*                                                                       */
-  /*    coverage :: The span color/coverage, ranging from 0 (background)   */
-  /*                to 255 (foreground).  Only used for anti-aliased       */
-  /*                rendering.                                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    This structure is used by the span drawing callback type named     */
-  /*    FT_SpanFunc which takes the y-coordinate of the span as a          */
-  /*    a parameter.                                                       */
-  /*                                                                       */
-  /*    The coverage value is always between 0 and 255, even if the number */
-  /*    of gray levels have been set through FT_Set_Gray_Levels().         */
-  /*                                                                       */
-  typedef struct  FT_Span_
-  {
-    short           x;
-    unsigned short  len;
-    unsigned char   coverage;
-
-  } FT_Span;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    FT_SpanFunc                                                        */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A function used as a call-back by the anti-aliased renderer in     */
-  /*    order to let client applications draw themselves the gray pixel    */
-  /*    spans on each scan line.                                           */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    y     :: The scanline's y-coordinate.                              */
-  /*                                                                       */
-  /*    count :: The number of spans to draw on this scanline.             */
-  /*                                                                       */
-  /*    spans :: A table of `count' spans to draw on the scanline.         */
-  /*                                                                       */
-  /*    user  :: User-supplied data that is passed to the callback.        */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    This callback allows client applications to directly render the    */
-  /*    gray spans of the anti-aliased bitmap to any kind of surfaces.     */
-  /*                                                                       */
-  /*    This can be used to write anti-aliased outlines directly to a      */
-  /*    given background bitmap, and even perform translucency.            */
-  /*                                                                       */
-  /*    Note that the `count' field cannot be greater than a fixed value   */
-  /*    defined by the FT_MAX_GRAY_SPANS configuration macro in            */
-  /*    ftoption.h.  By default, this value is set to 32, which means that */
-  /*    if there are more than 32 spans on a given scanline, the callback  */
-  /*    will be called several times with the same `y' parameter in order  */
-  /*    to draw all callbacks.                                             */
-  /*                                                                       */
-  /*    Otherwise, the callback is only called once per scan-line, and     */
-  /*    only for those scanlines that do have `gray' pixels on them.       */
-  /*                                                                       */
-  typedef void
-  (*FT_SpanFunc)( int       y,
-                  int       count,
-                  FT_Span*  spans,
-                  void*     user );
-
-#define FT_Raster_Span_Func   FT_SpanFunc
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    FT_Raster_BitTest_Func                                             */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    THIS TYPE IS DEPRECATED.  DO NOT USE IT.                           */
-  /*                                                                       */
-  /*    A function used as a call-back by the monochrome scan-converter    */
-  /*    to test whether a given target pixel is already set to the drawing */
-  /*    `color'.  These tests are crucial to implement drop-out control    */
-  /*    per-se the TrueType spec.                                          */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    y     :: The pixel's y-coordinate.                                 */
-  /*                                                                       */
-  /*    x     :: The pixel's x-coordinate.                                 */
-  /*                                                                       */
-  /*    user  :: User-supplied data that is passed to the callback.        */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*   1 if the pixel is `set', 0 otherwise.                               */
-  /*                                                                       */
-  typedef int
-  (*FT_Raster_BitTest_Func)( int    y,
-                             int    x,
-                             void*  user );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    FT_Raster_BitSet_Func                                              */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    THIS TYPE IS DEPRECATED.  DO NOT USE IT.                           */
-  /*                                                                       */
-  /*    A function used as a call-back by the monochrome scan-converter    */
-  /*    to set an individual target pixel.  This is crucial to implement   */
-  /*    drop-out control according to the TrueType specification.          */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    y     :: The pixel's y-coordinate.                                 */
-  /*                                                                       */
-  /*    x     :: The pixel's x-coordinate.                                 */
-  /*                                                                       */
-  /*    user  :: User-supplied data that is passed to the callback.        */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    1 if the pixel is `set', 0 otherwise.                              */
-  /*                                                                       */
-  typedef void
-  (*FT_Raster_BitSet_Func)( int    y,
-                            int    x,
-                            void*  user );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Enum>                                                                */
-  /*    FT_RASTER_FLAG_XXX                                                 */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A list of bit flag constants as used in the `flags' field of a     */
-  /*    @FT_Raster_Params structure.                                       */
-  /*                                                                       */
-  /* <Values>                                                              */
-  /*    FT_RASTER_FLAG_DEFAULT :: This value is 0.                         */
-  /*                                                                       */
-  /*    FT_RASTER_FLAG_AA      :: This flag is set to indicate that an     */
-  /*                              anti-aliased glyph image should be       */
-  /*                              generated.  Otherwise, it will be        */
-  /*                              monochrome (1-bit).                      */
-  /*                                                                       */
-  /*    FT_RASTER_FLAG_DIRECT  :: This flag is set to indicate direct      */
-  /*                              rendering.  In this mode, client         */
-  /*                              applications must provide their own span */
-  /*                              callback.  This lets them directly       */
-  /*                              draw or compose over an existing bitmap. */
-  /*                              If this bit is not set, the target       */
-  /*                              pixmap's buffer _must_ be zeroed before  */
-  /*                              rendering.                               */
-  /*                                                                       */
-  /*                              Note that for now, direct rendering is   */
-  /*                              only possible with anti-aliased glyphs.  */
-  /*                                                                       */
-  /*    FT_RASTER_FLAG_CLIP    :: This flag is only used in direct         */
-  /*                              rendering mode.  If set, the output will */
-  /*                              be clipped to a box specified in the     */
-  /*                              "clip_box" field of the FT_Raster_Params */
-  /*                              structure.                               */
-  /*                                                                       */
-  /*                              Note that by default, the glyph bitmap   */
-  /*                              is clipped to the target pixmap, except  */
-  /*                              in direct rendering mode where all spans */
-  /*                              are generated if no clipping box is set. */
-  /*                                                                       */
-#define FT_RASTER_FLAG_DEFAULT  0x0
-#define FT_RASTER_FLAG_AA       0x1
-#define FT_RASTER_FLAG_DIRECT   0x2
-#define FT_RASTER_FLAG_CLIP     0x4
-
-  /* deprecated */
-#define ft_raster_flag_default  FT_RASTER_FLAG_DEFAULT
-#define ft_raster_flag_aa       FT_RASTER_FLAG_AA
-#define ft_raster_flag_direct   FT_RASTER_FLAG_DIRECT
-#define ft_raster_flag_clip     FT_RASTER_FLAG_CLIP
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_Raster_Params                                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure to hold the arguments used by a raster's render        */
-  /*    function.                                                          */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    target      :: The target bitmap.                                  */
-  /*                                                                       */
-  /*    source      :: A pointer to the source glyph image (e.g. an        */
-  /*                   FT_Outline).                                        */
-  /*                                                                       */
-  /*    flags       :: The rendering flags.                                */
-  /*                                                                       */
-  /*    gray_spans  :: The gray span drawing callback.                     */
-  /*                                                                       */
-  /*    black_spans :: The black span drawing callback.                    */
-  /*                                                                       */
-  /*    bit_test    :: The bit test callback.  UNIMPLEMENTED!              */
-  /*                                                                       */
-  /*    bit_set     :: The bit set callback.  UNIMPLEMENTED!               */
-  /*                                                                       */
-  /*    user        :: User-supplied data that is passed to each drawing   */
-  /*                   callback.                                           */
-  /*                                                                       */
-  /*    clip_box    :: An optional clipping box.  It is only used in       */
-  /*                   direct rendering mode.  Note that coordinates here  */
-  /*                   should be expressed in _integer_ pixels (and not in */
-  /*                   26.6 fixed-point units).                            */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    An anti-aliased glyph bitmap is drawn if the FT_RASTER_FLAG_AA bit */
-  /*    flag is set in the `flags' field, otherwise a monochrome bitmap    */
-  /*    will be generated.                                                 */
-  /*                                                                       */
-  /*    If the FT_RASTER_FLAG_DIRECT bit flag is set in `flags', the       */
-  /*    raster will call the `gray_spans' callback to draw gray pixel      */
-  /*    spans, in the case of an aa glyph bitmap, it will call             */
-  /*    `black_spans', and `bit_test' and `bit_set' in the case of a       */
-  /*    monochrome bitmap.  This allows direct composition over a          */
-  /*    pre-existing bitmap through user-provided callbacks to perform the */
-  /*    span drawing/composition.                                          */
-  /*                                                                       */
-  /*    Note that the `bit_test' and `bit_set' callbacks are required when */
-  /*    rendering a monochrome bitmap, as they are crucial to implement    */
-  /*    correct drop-out control as defined in the TrueType specification. */
-  /*                                                                       */
-  typedef struct  FT_Raster_Params_
-  {
-    FT_Bitmap*              target;
-    void*                   source;
-    int                     flags;
-    FT_SpanFunc             gray_spans;
-    FT_SpanFunc             black_spans;
-    FT_Raster_BitTest_Func  bit_test;     /* doesn't work! */
-    FT_Raster_BitSet_Func   bit_set;      /* doesn't work! */
-    void*                   user;
-    FT_BBox                 clip_box;
-
-  } FT_Raster_Params;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    FT_Raster_NewFunc                                                  */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A function used to create a new raster object.                     */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    memory :: A handle to the memory allocator.                        */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    raster :: A handle to the new raster object.                       */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    Error code.  0 means success.                                      */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The `memory' parameter is a typeless pointer in order to avoid     */
-  /*    un-wanted dependencies on the rest of the FreeType code.  In       */
-  /*    practice, it is a FT_Memory, i.e., a handle to the standard        */
-  /*    FreeType memory allocator.  However, this field can be completely  */
-  /*    ignored by a given raster implementation.                          */
-  /*                                                                       */
-  typedef int
-  (*FT_Raster_NewFunc)( void*       memory,
-                        FT_Raster*  raster );
-
-#define  FT_Raster_New_Func    FT_Raster_NewFunc
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    FT_Raster_DoneFunc                                                 */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A function used to destroy a given raster object.                  */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    raster :: A handle to the raster object.                           */
-  /*                                                                       */
-  typedef void
-  (*FT_Raster_DoneFunc)( FT_Raster  raster );
-
-#define  FT_Raster_Done_Func   FT_Raster_DoneFunc
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    FT_Raster_ResetFunc                                                */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    FreeType provides an area of memory called the `render pool',      */
-  /*    available to all registered rasters.  This pool can be freely used */
-  /*    during a given scan-conversion but is shared by all rasters.  Its  */
-  /*    content is thus transient.                                         */
-  /*                                                                       */
-  /*    This function is called each time the render pool changes, or just */
-  /*    after a new raster object is created.                              */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    raster    :: A handle to the new raster object.                    */
-  /*                                                                       */
-  /*    pool_base :: The address in memory of the render pool.             */
-  /*                                                                       */
-  /*    pool_size :: The size in bytes of the render pool.                 */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    Rasters can ignore the render pool and rely on dynamic memory      */
-  /*    allocation if they want to (a handle to the memory allocator is    */
-  /*    passed to the raster constructor).  However, this is not           */
-  /*    recommended for efficiency purposes.                               */
-  /*                                                                       */
-  typedef void
-  (*FT_Raster_ResetFunc)( FT_Raster       raster,
-                          unsigned char*  pool_base,
-                          unsigned long   pool_size );
-
-#define  FT_Raster_Reset_Func   FT_Raster_ResetFunc
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    FT_Raster_SetModeFunc                                              */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This function is a generic facility to change modes or attributes  */
-  /*    in a given raster.  This can be used for debugging purposes, or    */
-  /*    simply to allow implementation-specific `features' in a given      */
-  /*    raster module.                                                     */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    raster :: A handle to the new raster object.                       */
-  /*                                                                       */
-  /*    mode   :: A 4-byte tag used to name the mode or property.          */
-  /*                                                                       */
-  /*    args   :: A pointer to the new mode/property to use.               */
-  /*                                                                       */
-  typedef int
-  (*FT_Raster_SetModeFunc)( FT_Raster      raster,
-                            unsigned long  mode,
-                            void*          args );
-
-#define  FT_Raster_Set_Mode_Func  FT_Raster_SetModeFunc
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    FT_Raster_RenderFunc                                               */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*   Invokes a given raster to scan-convert a given glyph image into a   */
-  /*   target bitmap.                                                      */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    raster :: A handle to the raster object.                           */
-  /*                                                                       */
-  /*    params :: A pointer to a FT_Raster_Params structure used to store  */
-  /*              the rendering parameters.                                */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    Error code.  0 means success.                                      */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The exact format of the source image depends on the raster's glyph */
-  /*    format defined in its FT_Raster_Funcs structure.  It can be an     */
-  /*    FT_Outline or anything else in order to support a large array of   */
-  /*    glyph formats.                                                     */
-  /*                                                                       */
-  /*    Note also that the render function can fail and return a           */
-  /*    FT_Err_Unimplemented_Feature error code if the raster used does    */
-  /*    not support direct composition.                                    */
-  /*                                                                       */
-  /*    XXX: For now, the standard raster doesn't support direct           */
-  /*         composition but this should change for the final release (see */
-  /*         the files demos/src/ftgrays.c and demos/src/ftgrays2.c for    */
-  /*         examples of distinct implementations which support direct     */
-  /*         composition).                                                 */
-  /*                                                                       */
-  typedef int
-  (*FT_Raster_RenderFunc)( FT_Raster          raster,
-                           FT_Raster_Params*  params );
-
-#define  FT_Raster_Render_Func    FT_Raster_RenderFunc
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_Raster_Funcs                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*   A structure used to describe a given raster class to the library.   */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    glyph_format  :: The supported glyph format for this raster.       */
-  /*                                                                       */
-  /*    raster_new    :: The raster constructor.                           */
-  /*                                                                       */
-  /*    raster_reset  :: Used to reset the render pool within the raster.  */
-  /*                                                                       */
-  /*    raster_render :: A function to render a glyph into a given bitmap. */
-  /*                                                                       */
-  /*    raster_done   :: The raster destructor.                            */
-  /*                                                                       */
-  typedef struct  FT_Raster_Funcs_
-  {
-    FT_Glyph_Format         glyph_format;
-    FT_Raster_NewFunc       raster_new;
-    FT_Raster_ResetFunc     raster_reset;
-    FT_Raster_SetModeFunc   raster_set_mode;
-    FT_Raster_RenderFunc    raster_render;
-    FT_Raster_DoneFunc      raster_done;
-
-  } FT_Raster_Funcs;
-
-
-  /* */
-
-
-FT_END_HEADER
-
-#endif /* __FTIMAGE_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/ftincrem.h b/extra_lib/include/freetype/freetype/ftincrem.h
deleted file mode 100644
index 6a1aa1f..0000000
--- a/extra_lib/include/freetype/freetype/ftincrem.h
+++ /dev/null
@@ -1,292 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftincrem.h                                                             */
-/*                                                                         */
-/*    FreeType incremental loading (specification).                        */
-/*                                                                         */
-/*  Copyright 2002, 2003 by                                                */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __FTINCREM_H__
-#define __FTINCREM_H__
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-#ifdef FREETYPE_H
-#error "freetype.h of FreeType 1 has been loaded!"
-#error "Please fix the directory search order for header files"
-#error "so that freetype.h of FreeType 2 is found first."
-#endif
-
-
-FT_BEGIN_HEADER
-
-
- /***************************************************************************
-  *
-  * @type:
-  *   FT_Incremental
-  *
-  * @description:
-  *   An opaque type describing a user-provided object used to implement
-  *   "incremental" glyph loading within FreeType.  This is used to support
-  *   embedded fonts in certain environments (e.g. Postscript interpreters),
-  *   where the glyph data isn't in the font file, or must be overridden by
-  *   different values.
-  *
-  * @note:
-  *   It is up to client applications to create and implement @FT_Incremental
-  *   objects, as long as they provide implementations for the methods
-  *   @FT_Incremental_GetGlyphDataFunc, @FT_Incremental_FreeGlyphDataFunc
-  *   and @FT_Incremental_GetGlyphMetricsFunc.
-  *
-  *   See the description of @FT_Incremental_InterfaceRec to understand how
-  *   to use incremental objects with FreeType.
-  */
-  typedef struct FT_IncrementalRec_*  FT_Incremental;
-
-
- /***************************************************************************
-  *
-  * @struct:
-  *   FT_Incremental_Metrics
-  *
-  * @description:
-  *   A small structure used to contain the basic glyph metrics returned
-  *   by the @FT_Incremental_GetGlyphMetricsFunc method.
-  *
-  * @fields:
-  *   bearing_x ::
-  *     Left bearing, in font units.
-  *
-  *   bearing_y ::
-  *     Top bearing, in font units.
-  *
-  *   advance ::
-  *     Glyph advance, in font units.
-  *
-  * @note:
-  *   These correspond to horizontal or vertical metrics depending on the
-  *   value of the 'vertical' argument to the function
-  *   @FT_Incremental_GetGlyphMetricsFunc.
-  */
-  typedef struct  FT_Incremental_MetricsRec_
-  {
-    FT_Long  bearing_x;
-    FT_Long  bearing_y;
-    FT_Long  advance;
-
-  } FT_Incremental_MetricsRec, *FT_Incremental_Metrics;
-
-
- /***************************************************************************
-  *
-  * @type:
-  *   FT_Incremental_GetGlyphDataFunc
-  *
-  * @description:
-  *   A function called by FreeType to access a given glyph's data bytes
-  *   during @FT_Load_Glyph or @FT_Load_Char if incremental loading is
-  *   enabled.
-  *
-  *   Note that the format of the glyph's data bytes depends on the font
-  *   file format.  For TrueType, it must correspond to the raw bytes within
-  *   the 'glyf' table.  For Postscript formats, it must correspond to the
-  *   *unencrypted* charstring bytes, without any 'lenIV' header.  It is
-  *   undefined for any other format.
-  *
-  * @input:
-  *   incremental ::
-  *     Handle to an opaque @FT_Incremental handle provided by the client
-  *     application.
-  *
-  *   glyph_index ::
-  *     Index of relevant glyph.
-  *
-  * @output:
-  *   adata ::
-  *     A structure describing the returned glyph data bytes (which will be
-  *     accessed as a read-only byte block).
-  *
-  * @return:
-  *   FreeType error code.  0 means success.
-  *
-  * @note:
-  *   If this function returns succesfully the method
-  *   @FT_Incremental_FreeGlyphDataFunc will be called later to release
-  *   the data bytes.
-  *
-  *   Nested calls to @FT_Incremental_GetGlyphDataFunc can happen for
-  *   compound glyphs.
-  */
-  typedef FT_Error
-  (*FT_Incremental_GetGlyphDataFunc)( FT_Incremental  incremental,
-                                      FT_UInt         glyph_index,
-                                      FT_Data*        adata );
-
-
- /***************************************************************************
-  *
-  * @type:
-  *   FT_Incremental_FreeGlyphDataFunc
-  *
-  * @description:
-  *   A function used to release the glyph data bytes returned by a
-  *   successful call to @FT_Incremental_GetGlyphDataFunc.
-  *
-  * @input:
-  *   incremental ::
-  *     A handle to an opaque @FT_Incremental handle provided by the client
-  *     application.
-  *
-  *   data ::
-  *     A structure describing the glyph data bytes (which will be accessed
-  *     as a read-only byte block).
-  */
-  typedef void
-  (*FT_Incremental_FreeGlyphDataFunc)( FT_Incremental  incremental,
-                                       FT_Data*        data );
-
-
- /***************************************************************************
-  *
-  * @type:
-  *   FT_Incremental_GetGlyphMetricsFunc
-  *
-  * @description:
-  *   A function used to retrieve the basic metrics of a given glyph index
-  *   before accessing its data.  This is necessary because, in certain
-  *   formats like TrueType, the metrics are stored in a different place from
-  *   the glyph images proper.
-  *
-  * @input:
-  *   incremental ::
-  *     A handle to an opaque @FT_Incremental handle provided by the client
-  *     application.
-  *
-  *   glyph_index ::
-  *     Index of relevant glyph.
-  *
-  *   vertical ::
-  *     If true, return vertical metrics.
-  *
-  *   ametrics ::
-  *     This parameter is used for both input and output.
-  *     The original glyph metrics, if any, in font units.  If metrics are
-  *     not available all the values must be set to zero.
-  *
-  * @output:
-  *   ametrics ::
-  *     The replacement glyph metrics in font units.
-  *
-  */
-  typedef FT_Error
-  (*FT_Incremental_GetGlyphMetricsFunc)
-                      ( FT_Incremental              incremental,
-                        FT_UInt                     glyph_index,
-                        FT_Bool                     vertical,
-                        FT_Incremental_MetricsRec  *ametrics );
-
-
-  /**************************************************************************
-   *
-   * @struct:
-   *   FT_Incremental_FuncsRec
-   * 
-   * @description:
-   *   A table of functions for accessing fonts that load data
-   *   incrementally.  Used in @FT_Incremental_InterfaceRec.
-   * 
-   * @fields:
-   *   get_glyph_data ::
-   *     The function to get glyph data.  Must not be null.
-   *
-   *   free_glyph_data ::
-   *     The function to release glyph data.  Must not be null.
-   *
-   *   get_glyph_metrics ::
-   *     The function to get glyph metrics.  May be null if the font does
-   *     not provide overriding glyph metrics. 
-   */
-  typedef struct  FT_Incremental_FuncsRec_
-  {
-    FT_Incremental_GetGlyphDataFunc     get_glyph_data;
-    FT_Incremental_FreeGlyphDataFunc    free_glyph_data;
-    FT_Incremental_GetGlyphMetricsFunc  get_glyph_metrics;
-
-  } FT_Incremental_FuncsRec;
-
-
- /***************************************************************************
-  *
-  * @struct:
-  *   FT_Incremental_InterfaceRec
-  *
-  * @description:
-  *   A structure to be used with @FT_Open_Face to indicate that the user
-  *   wants to support incremental glyph loading.  You should use it with
-  *   @FT_PARAM_TAG_INCREMENTAL as in the following example:
-  *
-  *     {
-  *       FT_Incremental_InterfaceRec  inc_int;
-  *       FT_Parameter                 parameter;
-  *       FT_Open_Args                 open_args;
-  *
-  *
-  *       // set up incremental descriptor
-  *       inc_int.funcs  = my_funcs;
-  *       inc_int.object = my_object;
-  *
-  *       // set up optional parameter
-  *       parameter.tag  = FT_PARAM_TAG_INCREMENTAL;
-  *       parameter.data = &inc_int;
-  *
-  *       // set up FT_Open_Args structure
-  *       open_args.flags      = FT_OPEN_PATHNAME | FT_OPEN_PARAMS;
-  *       open_args.pathname   = my_font_pathname;
-  *       open_args.num_params = 1;
-  *       open_args.params     = ¶meter; // we use one optional argument
-  *
-  *       // open the font
-  *       error = FT_Open_Face( library, &open_args, index, &face );
-  *       ...
-  *     }
-  */
-  typedef struct  FT_Incremental_InterfaceRec_
-  {
-    const FT_Incremental_FuncsRec*  funcs;
-    FT_Incremental                  object;
-  
-  } FT_Incremental_InterfaceRec;
-
-
- /***************************************************************************
-  *
-  * @constant:
-  *   FT_PARAM_TAG_INCREMENTAL
-  *
-  * @description:
-  *   A constant used as the tag of @FT_Parameter structures to indicate
-  *   an incremental loading object to be used by FreeType.
-  *
-  */
-#define FT_PARAM_TAG_INCREMENTAL  FT_MAKE_TAG( 'i', 'n', 'c', 'r' )
-
- /* */  
-
-FT_END_HEADER
-
-#endif /* __FTINCREM_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/ftlist.h b/extra_lib/include/freetype/freetype/ftlist.h
deleted file mode 100644
index ae9801b..0000000
--- a/extra_lib/include/freetype/freetype/ftlist.h
+++ /dev/null
@@ -1,274 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftlist.h                                                               */
-/*                                                                         */
-/*    Generic list support for FreeType (specification).                   */
-/*                                                                         */
-/*  Copyright 1996-2001, 2003 by                                           */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /*  This file implements functions relative to list processing.  Its     */
-  /*  data structures are defined in `freetype.h'.                         */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-#ifndef __FTLIST_H__
-#define __FTLIST_H__
-
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-#ifdef FREETYPE_H
-#error "freetype.h of FreeType 1 has been loaded!"
-#error "Please fix the directory search order for header files"
-#error "so that freetype.h of FreeType 2 is found first."
-#endif
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    list_processing                                                    */
-  /*                                                                       */
-  /* <Title>                                                               */
-  /*    List Processing                                                    */
-  /*                                                                       */
-  /* <Abstract>                                                            */
-  /*    Simple management of lists.                                        */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This section contains various definitions related to list          */
-  /*    processing using doubly-linked nodes.                              */
-  /*                                                                       */
-  /* <Order>                                                               */
-  /*    FT_List                                                            */
-  /*    FT_ListNode                                                        */
-  /*    FT_ListRec                                                         */
-  /*    FT_ListNodeRec                                                     */
-  /*                                                                       */
-  /*    FT_List_Add                                                        */
-  /*    FT_List_Insert                                                     */
-  /*    FT_List_Find                                                       */
-  /*    FT_List_Remove                                                     */
-  /*    FT_List_Up                                                         */
-  /*    FT_List_Iterate                                                    */
-  /*    FT_List_Iterator                                                   */
-  /*    FT_List_Finalize                                                   */
-  /*    FT_List_Destructor                                                 */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_List_Find                                                       */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Finds the list node for a given listed object.                     */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    list :: A pointer to the parent list.                              */
-  /*    data :: The address of the listed object.                          */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    List node.  NULL if it wasn't found.                               */
-  /*                                                                       */
-  FT_EXPORT( FT_ListNode )
-  FT_List_Find( FT_List  list,
-                void*    data );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_List_Add                                                        */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Appends an element to the end of a list.                           */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    list :: A pointer to the parent list.                              */
-  /*    node :: The node to append.                                        */
-  /*                                                                       */
-  FT_EXPORT( void )
-  FT_List_Add( FT_List      list,
-               FT_ListNode  node );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_List_Insert                                                     */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Inserts an element at the head of a list.                          */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    list :: A pointer to parent list.                                  */
-  /*    node :: The node to insert.                                        */
-  /*                                                                       */
-  FT_EXPORT( void )
-  FT_List_Insert( FT_List      list,
-                  FT_ListNode  node );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_List_Remove                                                     */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Removes a node from a list.  This function doesn't check whether   */
-  /*    the node is in the list!                                           */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    node :: The node to remove.                                        */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    list :: A pointer to the parent list.                              */
-  /*                                                                       */
-  FT_EXPORT( void )
-  FT_List_Remove( FT_List      list,
-                  FT_ListNode  node );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_List_Up                                                         */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Moves a node to the head/top of a list.  Used to maintain LRU      */
-  /*    lists.                                                             */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    list :: A pointer to the parent list.                              */
-  /*    node :: The node to move.                                          */
-  /*                                                                       */
-  FT_EXPORT( void )
-  FT_List_Up( FT_List      list,
-              FT_ListNode  node );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    FT_List_Iterator                                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    An FT_List iterator function which is called during a list parse   */
-  /*    by FT_List_Iterate().                                              */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    node :: The current iteration list node.                           */
-  /*                                                                       */
-  /*    user :: A typeless pointer passed to FT_List_Iterate().            */
-  /*            Can be used to point to the iteration's state.             */
-  /*                                                                       */
-  typedef FT_Error
-  (*FT_List_Iterator)( FT_ListNode  node,
-                       void*        user );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_List_Iterate                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Parses a list and calls a given iterator function on each element. */
-  /*    Note that parsing is stopped as soon as one of the iterator calls  */
-  /*    returns a non-zero value.                                          */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    list     :: A handle to the list.                                  */
-  /*    iterator :: An interator function, called on each node of the      */
-  /*                list.                                                  */
-  /*    user     :: A user-supplied field which is passed as the second    */
-  /*                argument to the iterator.                              */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    The result (a FreeType error code) of the last iterator call.      */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_List_Iterate( FT_List           list,
-                   FT_List_Iterator  iterator,
-                   void*             user );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    FT_List_Destructor                                                 */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    An FT_List iterator function which is called during a list         */
-  /*    finalization by FT_List_Finalize() to destroy all elements in a    */
-  /*    given list.                                                        */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    system :: The current system object.                               */
-  /*                                                                       */
-  /*    data   :: The current object to destroy.                           */
-  /*                                                                       */
-  /*    user   :: A typeless pointer passed to FT_List_Iterate().  It can  */
-  /*              be used to point to the iteration's state.               */
-  /*                                                                       */
-  typedef void
-  (*FT_List_Destructor)( FT_Memory  memory,
-                         void*      data,
-                         void*      user );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_List_Finalize                                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Destroys all elements in the list as well as the list itself.      */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    list    :: A handle to the list.                                   */
-  /*                                                                       */
-  /*    destroy :: A list destructor that will be applied to each element  */
-  /*               of the list.                                            */
-  /*                                                                       */
-  /*    memory  :: The current memory object which handles deallocation.   */
-  /*                                                                       */
-  /*    user    :: A user-supplied field which is passed as the last       */
-  /*               argument to the destructor.                             */
-  /*                                                                       */
-  FT_EXPORT( void )
-  FT_List_Finalize( FT_List             list,
-                    FT_List_Destructor  destroy,
-                    FT_Memory           memory,
-                    void*               user );
-
-
-  /* */
-
-
-FT_END_HEADER
-
-#endif /* __FTLIST_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/ftmac.h b/extra_lib/include/freetype/freetype/ftmac.h
deleted file mode 100644
index b9f89ba..0000000
--- a/extra_lib/include/freetype/freetype/ftmac.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftmac.h                                                                */
-/*                                                                         */
-/*    Additional Mac-specific API.                                         */
-/*                                                                         */
-/*  Copyright 1996-2001 by                                                 */
-/*  Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg.     */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-/***************************************************************************/
-/*                                                                         */
-/* NOTE: Include this file after <freetype/freetype.h> and after the       */
-/*       Mac-specific <Types.h> header (or any other Mac header that       */
-/*       includes <Types.h>); we use Handle type.                          */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __FTMAC_H__
-#define __FTMAC_H__
-
-
-#include <ft2build.h>
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    mac_specific                                                       */
-  /*                                                                       */
-  /* <Title>                                                               */
-  /*    Mac-Specific Interface                                             */
-  /*                                                                       */
-  /* <Abstract>                                                            */
-  /*    Only available on the Macintosh.                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    The following definitions are only available if FreeType is        */
-  /*    compiled on a Macintosh.                                           */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_New_Face_From_FOND                                              */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Creates a new face object from an FOND resource.                   */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    library    :: A handle to the library resource.                    */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    fond       :: An FOND resource.                                    */
-  /*                                                                       */
-  /*    face_index :: Only supported for the -1 `sanity check' special     */
-  /*                  case.                                                */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    aface      :: A handle to a new face object.                       */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Notes>                                                               */
-  /*    This function can be used to create FT_Face abjects from fonts     */
-  /*    that are installed in the system like so:                          */
-  /*                                                                       */
-  /*    {                                                                  */
-  /*      fond = GetResource( 'FOND', fontName );                          */
-  /*      error = FT_New_Face_From_FOND( library, fond, 0, &face );        */
-  /*    }                                                                  */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_New_Face_From_FOND( FT_Library  library,
-                         Handle      fond,
-                         FT_Long     face_index,
-                         FT_Face    *aface );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_GetFile_From_Mac_Name                                           */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Returns an FSSpec for the disk file containing the named font.     */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    fontName   :: Mac OS name of the font (eg. Times New Roman Bold).  */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    pathSpec   :: FSSpec to the file.  For passing to @FT_New_Face.    */
-  /*                                                                       */
-  /*    face_index :: Index of the face.  For passing to @FT_New_Face.     */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  FT_EXPORT_DEF( FT_Error )
-  FT_GetFile_From_Mac_Name( char*     fontName, 
-                            FSSpec*   pathSpec,
-                            FT_Long*  face_index );
-
-  /* */
-
-
-FT_END_HEADER
-
-
-#endif /* __FTMAC_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/ftmm.h b/extra_lib/include/freetype/freetype/ftmm.h
deleted file mode 100644
index 7f565be..0000000
--- a/extra_lib/include/freetype/freetype/ftmm.h
+++ /dev/null
@@ -1,188 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftmm.h                                                                 */
-/*                                                                         */
-/*    FreeType Multiple Master font interface (specification).             */
-/*                                                                         */
-/*  Copyright 1996-2001 by                                                 */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __FTMM_H__
-#define __FTMM_H__
-
-
-#include <ft2build.h>
-#include FT_TYPE1_TABLES_H
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    multiple_masters                                                   */
-  /*                                                                       */
-  /* <Title>                                                               */
-  /*    Multiple Masters                                                   */
-  /*                                                                       */
-  /* <Abstract>                                                            */
-  /*    How to manage Multiple Masters fonts.                              */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    The following types and functions are used to manage Multiple      */
-  /*    Master fonts, i.e. the selection of specific design instances by   */
-  /*    setting design axis coordinates.                                   */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_MM_Axis                                                         */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A simple structure used to model a given axis in design space for  */
-  /*    Multiple Masters fonts.                                            */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    name    :: The axis's name.                                        */
-  /*                                                                       */
-  /*    minimum :: The axis's minimum design coordinate.                   */
-  /*                                                                       */
-  /*    maximum :: The axis's maximum design coordinate.                   */
-  /*                                                                       */
-  typedef struct  FT_MM_Axis_
-  {
-    FT_String*  name;
-    FT_Long     minimum;
-    FT_Long     maximum;
-
-  } FT_MM_Axis;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_Multi_Master                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure used to model the axes and space of a Multiple Masters */
-  /*    font.                                                              */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    num_axis    :: Number of axes.  Cannot exceed 4.                   */
-  /*                                                                       */
-  /*    num_designs :: Number of designs; should ne normally 2^num_axis    */
-  /*                   even though the Type 1 specification strangely      */
-  /*                   allows for intermediate designs to be present. This */
-  /*                   number cannot exceed 16.                            */
-  /*                                                                       */
-  /*    axis        :: A table of axis descriptors.                        */
-  /*                                                                       */
-  typedef struct  FT_Multi_Master_
-  {
-    FT_UInt     num_axis;
-    FT_UInt     num_designs;
-    FT_MM_Axis  axis[T1_MAX_MM_AXIS];
-
-  } FT_Multi_Master;
-
-  /* */
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Get_Multi_Master                                                */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Retrieves the Multiple Master descriptor of a given font.          */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    face    :: A handle to the source face.                            */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    amaster :: The Multiple Masters descriptor.                        */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Get_Multi_Master( FT_Face           face,
-                       FT_Multi_Master  *amaster );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Set_MM_Design_Coordinates                                       */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    For Multiple Masters fonts, choose an interpolated font design     */
-  /*    through design coordinates.                                        */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    face       :: A handle to the source face.                         */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    num_coords :: The number of design coordinates (must be equal to   */
-  /*                  the number of axes in the font).                     */
-  /*                                                                       */
-  /*    coords     :: An array of design coordinates.                      */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Set_MM_Design_Coordinates( FT_Face   face,
-                                FT_UInt   num_coords,
-                                FT_Long*  coords );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Set_MM_Blend_Coordinates                                        */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    For Multiple Masters fonts, choose an interpolated font design     */
-  /*    through normalized blend coordinates.                              */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    face       :: A handle to the source face.                         */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    num_coords :: The number of design coordinates (must be equal to   */
-  /*                  the number of axes in the font).                     */
-  /*                                                                       */
-  /*    coords     :: The design coordinates array (each element must be   */
-  /*                  between 0 and 1.0).                                  */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Set_MM_Blend_Coordinates( FT_Face    face,
-                               FT_UInt    num_coords,
-                               FT_Fixed*  coords );
-
-
-  /* */
-
-
-FT_END_HEADER
-
-#endif /* __FTMM_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/ftmoderr.h b/extra_lib/include/freetype/freetype/ftmoderr.h
deleted file mode 100644
index c9b8121..0000000
--- a/extra_lib/include/freetype/freetype/ftmoderr.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftmoderr.h                                                             */
-/*                                                                         */
-/*    FreeType module error offsets (specification).                       */
-/*                                                                         */
-/*  Copyright 2001, 2002, 2003 by                                          */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* This file is used to define the FreeType module error offsets.        */
-  /*                                                                       */
-  /* The lower byte gives the error code, the higher byte gives the        */
-  /* module.  The base module has error offset 0.  For example, the error  */
-  /* `FT_Err_Invalid_File_Format' has value 0x003, the error               */
-  /* `TT_Err_Invalid_File_Format' has value 0xF03, the error               */
-  /* `T1_Err_Invalid_File_Format' has value 0x1003, etc.                   */
-  /*                                                                       */
-  /* Undefine the macro FT_CONFIG_OPTION_USE_MODULE_ERRORS in ftoption.h   */
-  /* to make the higher byte always zero (disabling the module error       */
-  /* mechanism).                                                           */
-  /*                                                                       */
-  /* It can also be used to create a module error message table easily     */
-  /* with something like                                                   */
-  /*                                                                       */
-  /*   {                                                                   */
-  /*     #undef __FTMODERR_H__                                             */
-  /*     #define FT_MODERRDEF( e, v, s )  { FT_Mod_Err_ ## e, s },         */
-  /*     #define FT_MODERR_START_LIST     {                                */
-  /*     #define FT_MODERR_END_LIST       { 0, 0 } };                      */
-  /*                                                                       */
-  /*     const struct                                                      */
-  /*     {                                                                 */
-  /*       int          mod_err_offset;                                    */
-  /*       const char*  mod_err_msg                                        */
-  /*     } ft_mod_errors[] =                                               */
-  /*                                                                       */
-  /*     #include FT_MODULE_ERRORS_H                                       */
-  /*   }                                                                   */
-  /*                                                                       */
-  /* To use such a table, all errors must be ANDed with 0xFF00 to remove   */
-  /* the error code.                                                       */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-#ifndef __FTMODERR_H__
-#define __FTMODERR_H__
-
-
-  /*******************************************************************/
-  /*******************************************************************/
-  /*****                                                         *****/
-  /*****                       SETUP MACROS                      *****/
-  /*****                                                         *****/
-  /*******************************************************************/
-  /*******************************************************************/
-
-
-#undef  FT_NEED_EXTERN_C
-
-#ifndef FT_MODERRDEF
-
-#ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS
-#define FT_MODERRDEF( e, v, s )  FT_Mod_Err_ ## e = v,
-#else
-#define FT_MODERRDEF( e, v, s )  FT_Mod_Err_ ## e = 0,
-#endif
-
-#define FT_MODERR_START_LIST  enum {
-#define FT_MODERR_END_LIST    FT_Mod_Err_Max };
-
-#ifdef __cplusplus
-#define FT_NEED_EXTERN_C
-  extern "C" {
-#endif
-
-#endif /* !FT_MODERRDEF */
-
-
-  /*******************************************************************/
-  /*******************************************************************/
-  /*****                                                         *****/
-  /*****               LIST MODULE ERROR BASES                   *****/
-  /*****                                                         *****/
-  /*******************************************************************/
-  /*******************************************************************/
-
-
-#ifdef FT_MODERR_START_LIST
-  FT_MODERR_START_LIST
-#endif
-
-
-  FT_MODERRDEF( Base,      0x000, "base module" )
-  FT_MODERRDEF( Autohint,  0x100, "autohinter module" )
-  FT_MODERRDEF( BDF,       0x200, "BDF module" )
-  FT_MODERRDEF( Cache,     0x300, "cache module" )
-  FT_MODERRDEF( CFF,       0x400, "CFF module" )
-  FT_MODERRDEF( CID,       0x500, "CID module" )
-  FT_MODERRDEF( Gzip,      0x600, "Gzip module" )
-  FT_MODERRDEF( PCF,       0x700, "PCF module" )
-  FT_MODERRDEF( PFR,       0x800, "PFR module" )
-  FT_MODERRDEF( PSaux,     0x900, "PS auxiliary module" )
-  FT_MODERRDEF( PShinter,  0xA00, "PS hinter module" )
-  FT_MODERRDEF( PSnames,   0xB00, "PS names module" )
-  FT_MODERRDEF( Raster,    0xC00, "raster module" )
-  FT_MODERRDEF( SFNT,      0xD00, "SFNT module" )
-  FT_MODERRDEF( Smooth,    0xE00, "smooth raster module" )
-  FT_MODERRDEF( TrueType,  0xF00, "TrueType module" )
-  FT_MODERRDEF( Type1,    0x1000, "Type 1 module" )
-  FT_MODERRDEF( Type42,   0x1100, "Type 42 module" )
-  FT_MODERRDEF( Winfonts, 0x1200, "Windows FON/FNT module" )
-
-
-#ifdef FT_MODERR_END_LIST
-  FT_MODERR_END_LIST
-#endif
-
-
-  /*******************************************************************/
-  /*******************************************************************/
-  /*****                                                         *****/
-  /*****                      CLEANUP                            *****/
-  /*****                                                         *****/
-  /*******************************************************************/
-  /*******************************************************************/
-
-
-#ifdef FT_NEED_EXTERN_C
-  }
-#endif
-
-#undef FT_MODERR_START_LIST
-#undef FT_MODERR_END_LIST
-#undef FT_MODERRDEF
-#undef FT_NEED_EXTERN_C
-
-
-#endif /* __FTMODERR_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/ftmodule.h b/extra_lib/include/freetype/freetype/ftmodule.h
deleted file mode 100644
index caf081d..0000000
--- a/extra_lib/include/freetype/freetype/ftmodule.h
+++ /dev/null
@@ -1,314 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftmodule.h                                                             */
-/*                                                                         */
-/*    FreeType modules public interface (specification).                   */
-/*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003 by                                     */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __FTMODULE_H__
-#define __FTMODULE_H__
-
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    module_management                                                  */
-  /*                                                                       */
-  /* <Title>                                                               */
-  /*    Module Management                                                  */
-  /*                                                                       */
-  /* <Abstract>                                                            */
-  /*    How to add, upgrade, and remove modules from FreeType.             */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    The definitions below are used to manage modules within FreeType.  */
-  /*    Modules can be added, upgraded, and removed at runtime.            */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /* module bit flags */
-#define FT_MODULE_FONT_DRIVER         1  /* this module is a font driver  */
-#define FT_MODULE_RENDERER            2  /* this module is a renderer     */
-#define FT_MODULE_HINTER              4  /* this module is a glyph hinter */
-#define FT_MODULE_STYLER              8  /* this module is a styler       */
-
-#define FT_MODULE_DRIVER_SCALABLE     0x100   /* the driver supports      */
-                                              /* scalable fonts           */
-#define FT_MODULE_DRIVER_NO_OUTLINES  0x200   /* the driver does not      */
-                                              /* support vector outlines  */
-#define FT_MODULE_DRIVER_HAS_HINTER   0x400   /* the driver provides its  */
-                                              /* own hinter               */
-
-
-  /* deprecated values */
-#define ft_module_font_driver         FT_MODULE_FONT_DRIVER
-#define ft_module_renderer            FT_MODULE_RENDERER
-#define ft_module_hinter              FT_MODULE_HINTER
-#define ft_module_styler              FT_MODULE_STYLER
-
-#define ft_module_driver_scalable     FT_MODULE_DRIVER_SCALABLE
-#define ft_module_driver_no_outlines  FT_MODULE_DRIVER_NO_OUTLINES
-#define ft_module_driver_has_hinter   FT_MODULE_DRIVER_HAS_HINTER
-
-
-  typedef void
-  (*FT_Module_Interface)( void );
-
-  typedef FT_Error
-  (*FT_Module_Constructor)( FT_Module  module );
-
-  typedef void
-  (*FT_Module_Destructor)( FT_Module  module );
-
-  typedef FT_Module_Interface
-  (*FT_Module_Requester)( FT_Module    module,
-                          const char*  name );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_Module_Class                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    The module class descriptor.                                       */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    module_flags      :: Bit flags describing the module.              */
-  /*                                                                       */
-  /*    module_size       :: The size of one module object/instance in     */
-  /*                         bytes.                                        */
-  /*                                                                       */
-  /*    module_name       :: The name of the module.                       */
-  /*                                                                       */
-  /*    module_version    :: The version, as a 16.16 fixed number          */
-  /*                         (major.minor).                                */
-  /*                                                                       */
-  /*    module_requires   :: The version of FreeType this module requires  */
-  /*                         (starts at version 2.0, i.e 0x20000)          */
-  /*                                                                       */
-  /*    module_init       :: A function used to initialize (not create) a  */
-  /*                         new module object.                            */
-  /*                                                                       */
-  /*    module_done       :: A function used to finalize (not destroy) a   */
-  /*                         given module object                           */
-  /*                                                                       */
-  /*    get_interface     :: Queries a given module for a specific         */
-  /*                         interface by name.                            */
-  /*                                                                       */
-  typedef struct  FT_Module_Class_
-  {
-    FT_ULong               module_flags;
-    FT_Long                module_size;
-    const FT_String*       module_name;
-    FT_Fixed               module_version;
-    FT_Fixed               module_requires;
-
-    const void*            module_interface;
-
-    FT_Module_Constructor  module_init;
-    FT_Module_Destructor   module_done;
-    FT_Module_Requester    get_interface;
-
-  } FT_Module_Class;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Add_Module                                                      */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Adds a new module to a given library instance.                     */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    library :: A handle to the library object.                         */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    clazz   :: A pointer to class descriptor for the module.           */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    An error will be returned if a module already exists by that name, */
-  /*    or if the module requires a version of FreeType that is too great. */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Add_Module( FT_Library              library,
-                 const FT_Module_Class*  clazz );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Get_Module                                                      */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Finds a module by its name.                                        */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    library     :: A handle to the library object.                     */
-  /*                                                                       */
-  /*    module_name :: The module's name (as an ASCII string).             */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    A module handle.  0 if none was found.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    You should better be familiar with FreeType internals to know      */
-  /*    which module to look for :-)                                       */
-  /*                                                                       */
-  FT_EXPORT( FT_Module )
-  FT_Get_Module( FT_Library   library,
-                 const char*  module_name );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Remove_Module                                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Removes a given module from a library instance.                    */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    library :: A handle to a library object.                           */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    module  :: A handle to a module object.                            */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The module object is destroyed by the function in case of success. */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Remove_Module( FT_Library  library,
-                    FT_Module   module );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_New_Library                                                     */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This function is used to create a new FreeType library instance    */
-  /*    from a given memory object.  It is thus possible to use libraries  */
-  /*    with distinct memory allocators within the same program.           */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    memory   :: A handle to the original memory object.                */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    alibrary :: A pointer to handle of a new library object.           */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_New_Library( FT_Memory    memory,
-                  FT_Library  *alibrary );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Done_Library                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Discards a given library object.  This closes all drivers and      */
-  /*    discards all resource objects.                                     */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    library :: A handle to the target library.                         */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Done_Library( FT_Library  library );
-
-
-
-  typedef void
-  (*FT_DebugHook_Func)( void*  arg );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Set_Debug_Hook                                                  */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Sets a debug hook function for debugging the interpreter of a font */
-  /*    format.                                                            */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    library    :: A handle to the library object.                      */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    hook_index :: The index of the debug hook.  You should use the     */
-  /*                  values defined in ftobjs.h, e.g.                     */
-  /*                  FT_DEBUG_HOOK_TRUETYPE.                              */
-  /*                                                                       */
-  /*    debug_hook :: The function used to debug the interpreter.          */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    Currently, four debug hook slots are available, but only two (for  */
-  /*    the TrueType and the Type 1 interpreter) are defined.              */
-  /*                                                                       */
-  FT_EXPORT( void )
-  FT_Set_Debug_Hook( FT_Library         library,
-                     FT_UInt            hook_index,
-                     FT_DebugHook_Func  debug_hook );
-
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Add_Default_Modules                                             */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Adds the set of default drivers to a given library object.         */
-  /*    This is only useful when you create a library object with          */
-  /*    FT_New_Library() (usually to plug a custom memory manager).        */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    library :: A handle to a new library object.                       */
-  /*                                                                       */
-  FT_EXPORT( void )
-  FT_Add_Default_Modules( FT_Library  library );
-
-
-  /* */
-
-
-FT_END_HEADER
-
-#endif /* __FTMODULE_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/ftoutln.h b/extra_lib/include/freetype/freetype/ftoutln.h
deleted file mode 100644
index 79ed35b..0000000
--- a/extra_lib/include/freetype/freetype/ftoutln.h
+++ /dev/null
@@ -1,472 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftoutln.h                                                              */
-/*                                                                         */
-/*    Support for the FT_Outline type used to store glyph shapes of        */
-/*    most scalable font formats (specification).                          */
-/*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003 by                                     */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __FTOUTLN_H__
-#define __FTOUTLN_H__
-
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-#ifdef FREETYPE_H
-#error "freetype.h of FreeType 1 has been loaded!"
-#error "Please fix the directory search order for header files"
-#error "so that freetype.h of FreeType 2 is found first."
-#endif
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    outline_processing                                                 */
-  /*                                                                       */
-  /* <Title>                                                               */
-  /*    Outline Processing                                                 */
-  /*                                                                       */
-  /* <Abstract>                                                            */
-  /*    Functions to create, transform, and render vectorial glyph images. */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This section contains routines used to create and destroy scalable */
-  /*    glyph images known as `outlines'.  These can also be measured,     */
-  /*    transformed, and converted into bitmaps and pixmaps.               */
-  /*                                                                       */
-  /* <Order>                                                               */
-  /*    FT_Outline                                                         */
-  /*    FT_OUTLINE_FLAGS                                                   */
-  /*    FT_Outline_New                                                     */
-  /*    FT_Outline_Done                                                    */
-  /*    FT_Outline_Copy                                                    */
-  /*    FT_Outline_Translate                                               */
-  /*    FT_Outline_Transform                                               */
-  /*    FT_Outline_Reverse                                                 */
-  /*    FT_Outline_Check                                                   */
-  /*                                                                       */
-  /*    FT_Outline_Get_CBox                                                */
-  /*    FT_Outline_Get_BBox                                                */
-  /*                                                                       */
-  /*    FT_Outline_Get_Bitmap                                              */
-  /*    FT_Outline_Render                                                  */
-  /*                                                                       */
-  /*    FT_Outline_Decompose                                               */
-  /*    FT_Outline_Funcs                                                   */
-  /*    FT_Outline_MoveTo_Func                                             */
-  /*    FT_Outline_LineTo_Func                                             */
-  /*    FT_Outline_ConicTo_Func                                            */
-  /*    FT_Outline_CubicTo_Func                                            */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Outline_Decompose                                               */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Walks over an outline's structure to decompose it into individual  */
-  /*    segments and Bezier arcs.  This function is also able to emit      */
-  /*    `move to' and `close to' operations to indicate the start and end  */
-  /*    of new contours in the outline.                                    */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    outline        :: A pointer to the source target.                  */
-  /*                                                                       */
-  /*    func_interface :: A table of `emitters', i.e,. function pointers   */
-  /*                      called during decomposition to indicate path     */
-  /*                      operations.                                      */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    user           :: A typeless pointer which is passed to each       */
-  /*                      emitter during the decomposition.  It can be     */
-  /*                      used to store the state during the               */
-  /*                      decomposition.                                   */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means sucess.                              */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Outline_Decompose( FT_Outline*              outline,
-                        const FT_Outline_Funcs*  func_interface,
-                        void*                    user );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Outline_New                                                     */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Creates a new outline of a given size.                             */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    library     :: A handle to the library object from where the       */
-  /*                   outline is allocated.  Note however that the new    */
-  /*                   outline will NOT necessarily be FREED, when         */
-  /*                   destroying the library, by FT_Done_FreeType().      */
-  /*                                                                       */
-  /*    numPoints   :: The maximal number of points within the outline.    */
-  /*                                                                       */
-  /*    numContours :: The maximal number of contours within the outline.  */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    anoutline   :: A handle to the new outline.  NULL in case of       */
-  /*                   error.                                              */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The reason why this function takes a `library' parameter is simply */
-  /*    to use the library's memory allocator.                             */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Outline_New( FT_Library   library,
-                  FT_UInt      numPoints,
-                  FT_Int       numContours,
-                  FT_Outline  *anoutline );
-
-
-  FT_EXPORT( FT_Error )
-  FT_Outline_New_Internal( FT_Memory    memory,
-                           FT_UInt      numPoints,
-                           FT_Int       numContours,
-                           FT_Outline  *anoutline );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Outline_Done                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Destroys an outline created with FT_Outline_New().                 */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    library :: A handle of the library object used to allocate the     */
-  /*               outline.                                                */
-  /*                                                                       */
-  /*    outline :: A pointer to the outline object to be discarded.        */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    If the outline's `owner' field is not set, only the outline        */
-  /*    descriptor will be released.                                       */
-  /*                                                                       */
-  /*    The reason why this function takes an `library' parameter is       */
-  /*    simply to use FT_Free().                                           */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Outline_Done( FT_Library   library,
-                   FT_Outline*  outline );
-
-
-  FT_EXPORT( FT_Error )
-  FT_Outline_Done_Internal( FT_Memory    memory,
-                            FT_Outline*  outline );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Outline_Check                                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Check the contents of an outline descriptor.                       */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    outline :: A handle to a source outline.                           */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Outline_Check( FT_Outline*  outline );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Outline_Get_CBox                                                */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Returns an outline's `control box'.  The control box encloses all  */
-  /*    the outline's points, including Bezier control points.  Though it  */
-  /*    coincides with the exact bounding box for most glyphs, it can be   */
-  /*    slightly larger in some situations (like when rotating an outline  */
-  /*    which contains Bezier outside arcs).                               */
-  /*                                                                       */
-  /*    Computing the control box is very fast, while getting the bounding */
-  /*    box can take much more time as it needs to walk over all segments  */
-  /*    and arcs in the outline.  To get the latter, you can use the       */
-  /*    `ftbbox' component which is dedicated to this single task.         */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    outline :: A pointer to the source outline descriptor.             */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    acbox   :: The outline's control box.                              */
-  /*                                                                       */
-  FT_EXPORT( void )
-  FT_Outline_Get_CBox( FT_Outline*  outline,
-                       FT_BBox     *acbox );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Outline_Translate                                               */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Applies a simple translation to the points of an outline.          */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    outline :: A pointer to the target outline descriptor.             */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    xOffset :: The horizontal offset.                                  */
-  /*                                                                       */
-  /*    yOffset :: The vertical offset.                                    */
-  /*                                                                       */
-  FT_EXPORT( void )
-  FT_Outline_Translate( FT_Outline*  outline,
-                        FT_Pos       xOffset,
-                        FT_Pos       yOffset );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Outline_Copy                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Copies an outline into another one.  Both objects must have the    */
-  /*    same sizes (number of points & number of contours) when this       */
-  /*    function is called.                                                */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    source :: A handle to the source outline.                          */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    target :: A handle to the target outline.                          */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Outline_Copy( FT_Outline*  source,
-                   FT_Outline  *target );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Outline_Transform                                               */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Applies a simple 2x2 matrix to all of an outline's points.  Useful */
-  /*    for applying rotations, slanting, flipping, etc.                   */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    outline :: A pointer to the target outline descriptor.             */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    matrix  :: A pointer to the transformation matrix.                 */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    You can use FT_Outline_Translate() if you need to translate the    */
-  /*    outline's points.                                                  */
-  /*                                                                       */
-  FT_EXPORT( void )
-  FT_Outline_Transform( FT_Outline*  outline,
-                        FT_Matrix*   matrix );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Outline_Reverse                                                 */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Reverses the drawing direction of an outline.  This is used to     */
-  /*    ensure consistent fill conventions for mirrored glyphs.            */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    outline :: A pointer to the target outline descriptor.             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    This functions toggles the bit flag `FT_OUTLINE_REVERSE_FILL' in   */
-  /*    the outline's `flags' field.                                       */
-  /*                                                                       */
-  /*    It shouldn't be used by a normal client application, unless it     */
-  /*    knows what it is doing.                                            */
-  /*                                                                       */
-  FT_EXPORT( void )
-  FT_Outline_Reverse( FT_Outline*  outline );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Outline_Get_Bitmap                                              */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Renders an outline within a bitmap.  The outline's image is simply */
-  /*    OR-ed to the target bitmap.                                        */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    library :: A handle to a FreeType library object.                  */
-  /*                                                                       */
-  /*    outline :: A pointer to the source outline descriptor.             */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    abitmap :: A pointer to the target bitmap descriptor.              */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    This function does NOT CREATE the bitmap, it only renders an       */
-  /*    outline image within the one you pass to it!                       */
-  /*                                                                       */
-  /*    It will use the raster correponding to the default glyph format.   */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Outline_Get_Bitmap( FT_Library   library,
-                         FT_Outline*  outline,
-                         FT_Bitmap   *abitmap );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Outline_Render                                                  */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Renders an outline within a bitmap using the current scan-convert. */
-  /*    This functions uses an FT_Raster_Params structure as an argument,  */
-  /*    allowing advanced features like direct composition, translucency,  */
-  /*    etc.                                                               */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    library :: A handle to a FreeType library object.                  */
-  /*                                                                       */
-  /*    outline :: A pointer to the source outline descriptor.             */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    params  :: A pointer to a FT_Raster_Params structure used to       */
-  /*               describe the rendering operation.                       */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    You should know what you are doing and how FT_Raster_Params works  */
-  /*    to use this function.                                              */
-  /*                                                                       */
-  /*    The field `params.source' will be set to `outline' before the scan */
-  /*    converter is called, which means that the value you give to it is  */
-  /*    actually ignored.                                                  */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Outline_Render( FT_Library         library,
-                     FT_Outline*        outline,
-                     FT_Raster_Params*  params );
-
-
- /**************************************************************************
-  *
-  * @enum:
-  *   FT_Orientation
-  *  
-  * @description:
-  *   A list of values used to describe an outline's contour orientation.
-  *
-  *   The TrueType and Postscript specifications use different conventions
-  *   to determine whether outline contours should be filled or unfilled.
-  *   
-  * @values:
-  *   FT_ORIENTATION_TRUETYPE ::
-  *     According to the TrueType specification, clockwise contours must
-  *     be filled, and counter-clockwise ones must be unfilled.
-  *
-  *   FT_ORIENTATION_POSTSCRIPT ::
-  *     According to the Postscript specification, counter-clockwise contours
-  *     must be filled, and clockwise ones must be unfilled.
-  *
-  *   FT_ORIENTATION_FILL_RIGHT ::
-  *     This is identical to @FT_ORIENTATION_TRUETYPE, but is used to
-  *     remember that in TrueType, everything that is to the right of
-  *     the drawing direction of a contour must be filled.
-  *
-  *   FT_ORIENTATION_FILL_LEFT ::
-  *     This is identical to @FT_ORIENTATION_POSTSCRIPT, but is used to
-  *     remember that in Postscript, everything that is to the left of
-  *     the drawing direction of a contour must be filled.
-  */
-  typedef enum
-  {
-    FT_ORIENTATION_TRUETYPE   = 0,
-    FT_ORIENTATION_POSTSCRIPT = 1,
-    FT_ORIENTATION_FILL_RIGHT = FT_ORIENTATION_TRUETYPE,
-    FT_ORIENTATION_FILL_LEFT  = FT_ORIENTATION_POSTSCRIPT
-  
-  } FT_Orientation;
-
-
- /**************************************************************************
-  *
-  * @function:
-  *   FT_Outline_Get_Orientation
-  *  
-  * @description:
-  *   This function analyzes a glyph outline and tries to compute its
-  *   fill orientation (see @FT_Orientation).  This is done by computing
-  *   the direction of each global horizontal and/or vertical extrema
-  *   within the outline.
-  *
-  *   Note that this will return @FT_ORIENTATION_TRUETYPE for empty
-  *   outlines.
-  *
-  * @input:
-  *   outline ::
-  *     A handle to the source outline.
-  *
-  * @return:
-  *   The orientation.
-  *
-  */
-  FT_EXPORT( FT_Orientation )
-  FT_Outline_Get_Orientation( FT_Outline*  outline );
-
-
-  /* */
-
-
-FT_END_HEADER
-
-#endif /* __FTOUTLN_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/ftpfr.h b/extra_lib/include/freetype/freetype/ftpfr.h
deleted file mode 100644
index c9a5675..0000000
--- a/extra_lib/include/freetype/freetype/ftpfr.h
+++ /dev/null
@@ -1,172 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftpfr.h                                                                */
-/*                                                                         */
-/*    FreeType API for accessing PFR-specific data (specification only).   */
-/*                                                                         */
-/*  Copyright 2002, 2003 by                                                */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __FTPFR_H__
-#define __FTPFR_H__
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-#ifdef FREETYPE_H
-#error "freetype.h of FreeType 1 has been loaded!"
-#error "Please fix the directory search order for header files"
-#error "so that freetype.h of FreeType 2 is found first."
-#endif
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    pfr_fonts                                                          */
-  /*                                                                       */
-  /* <Title>                                                               */
-  /*    PFR Fonts                                                          */
-  /*                                                                       */
-  /* <Abstract>                                                            */
-  /*    PFR/TrueDoc specific APIs                                          */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This section contains the declaration of PFR-specific functions.   */
-  /*                                                                       */
-  /*************************************************************************/
-
-
- /**********************************************************************
-  *
-  * @function:
-  *    FT_Get_PFR_Metrics
-  *
-  * @description:
-  *    Return the outline and metrics resolutions of a given PFR face.
-  *
-  * @input:
-  *    face :: Handle to the input face.  It can be a non-PFR face.
-  *
-  * @output:
-  *    aoutline_resolution ::
-  *      Outline resolution.  This is equivalent to `face->units_per_EM'.
-  *      Optional (parameter can be NULL).
-  *
-  *    ametrics_resolution ::
-  *      Metrics resolution.  This is equivalent to `outline_resolution'
-  *      for non-PFR fonts.  Optional (parameter can be NULL).
-  *
-  *    ametrics_x_scale ::
-  *      A 16.16 fixed-point number used to scale distance expressed
-  *      in metrics units to device sub-pixels.  This is equivalent to
-  *      `face->size->x_scale', but for metrics only.  Optional (parameter
-  *      can be NULL)
-  *
-  *    ametrics_y_scale ::
-  *      Same as `ametrics_x_scale' but for the vertical direction.
-  *      optional (parameter can be NULL)
-  *
-  * @return:
-  *    FreeType error code.  0 means success.
-  *
-  * @note:
-  *   If the input face is not a PFR, this function will return an error.
-  *   However, in all cases, it will return valid values.
-  */
-  FT_EXPORT( FT_Error )
-  FT_Get_PFR_Metrics( FT_Face    face,
-                      FT_UInt   *aoutline_resolution,
-                      FT_UInt   *ametrics_resolution,
-                      FT_Fixed  *ametrics_x_scale,
-                      FT_Fixed  *ametrics_y_scale );
-
-
- /**********************************************************************
-  *
-  * @function:
-  *    FT_Get_PFR_Kerning
-  *
-  * @description:
-  *    Return the kerning pair corresponding to two glyphs in a PFR face.
-  *    The distance is expressed in metrics units, unlike the result of
-  *    @FT_Get_Kerning.
-  *
-  * @input:
-  *    face  :: A handle to the input face.
-  *
-  *    left  :: Index of the left glyph.
-  *
-  *    right :: Index of the right glyph.
-  *
-  * @output:
-  *    avector :: A kerning vector.
-  *
-  * @return:
-  *    FreeType error code.  0 means success.
-  *
-  * @note:
-  *    This function always return distances in original PFR metrics
-  *    units.  This is unlike @FT_Get_Kerning with the @FT_KERNING_UNSCALED
-  *    mode, which always returns distances converted to outline units.
-  *
-  *    You can use the value of the `x_scale' and `y_scale' parameters
-  *    returned by @FT_Get_PFR_Metrics to scale these to device sub-pixels.
-  */
-  FT_EXPORT( FT_Error )
-  FT_Get_PFR_Kerning( FT_Face     face,
-                      FT_UInt     left,
-                      FT_UInt     right,
-                      FT_Vector  *avector );
-
-
- /**********************************************************************
-  *
-  * @function:
-  *    FT_Get_PFR_Advance
-  *
-  * @description:
-  *    Return a given glyph advance, expressed in original metrics units,
-  *    from a PFR font.
-  *
-  * @input:
-  *    face   :: A handle to the input face.
-  *
-  *    gindex :: The glyph index.
-  *
-  * @output:
-  *    aadvance :: The glyph advance in metrics units.
-  *
-  * @return:
-  *    FreeType error code.  0 means success.
-  *
-  * @note:
-  *    You can use the `x_scale' or `y_scale' results of @FT_Get_PFR_Metrics
-  *    to convert the advance to device sub-pixels (i.e. 1/64th of pixels).
-  */
-  FT_EXPORT( FT_Error )
-  FT_Get_PFR_Advance( FT_Face   face,
-                      FT_UInt   gindex,
-                      FT_Pos   *aadvance );
-
- /* */
-
-
-FT_END_HEADER
-
-#endif /* __FTBDF_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/ftrender.h b/extra_lib/include/freetype/freetype/ftrender.h
deleted file mode 100644
index db3ca94..0000000
--- a/extra_lib/include/freetype/freetype/ftrender.h
+++ /dev/null
@@ -1,229 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftrender.h                                                             */
-/*                                                                         */
-/*    FreeType renderer modules public interface (specification).          */
-/*                                                                         */
-/*  Copyright 1996-2001 by                                                 */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __FTRENDER_H__
-#define __FTRENDER_H__
-
-
-#include <ft2build.h>
-#include FT_MODULE_H
-#include FT_GLYPH_H
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    module_management                                                  */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /* create a new glyph object */
-  typedef FT_Error
-  (*FT_Glyph_InitFunc)( FT_Glyph      glyph,
-                        FT_GlyphSlot  slot );
-
-  /* destroys a given glyph object */
-  typedef void
-  (*FT_Glyph_DoneFunc)( FT_Glyph  glyph );
-
-  typedef void
-  (*FT_Glyph_TransformFunc)( FT_Glyph    glyph,
-                             FT_Matrix*  matrix,
-                             FT_Vector*  delta );
-
-  typedef void
-  (*FT_Glyph_GetBBoxFunc)( FT_Glyph  glyph,
-                           FT_BBox*  abbox );
-
-  typedef FT_Error
-  (*FT_Glyph_CopyFunc)( FT_Glyph   source,
-                        FT_Glyph   target );
-
-  typedef FT_Error
-  (*FT_Glyph_PrepareFunc)( FT_Glyph      glyph,
-                           FT_GlyphSlot  slot );
-
-/* deprecated */
-#define FT_Glyph_Init_Func       FT_Glyph_InitFunc
-#define FT_Glyph_Done_Func       FT_Glyph_DoneFunc
-#define FT_Glyph_Transform_Func  FT_Glyph_TransformFunc
-#define FT_Glyph_BBox_Func       FT_Glyph_GetBBoxFunc
-#define FT_Glyph_Copy_Func       FT_Glyph_CopyFunc
-#define FT_Glyph_Prepare_Func    FT_Glyph_PrepareFunc
-
-
-  struct  FT_Glyph_Class_
-  {
-    FT_Long                 glyph_size;
-    FT_Glyph_Format         glyph_format;
-    FT_Glyph_InitFunc       glyph_init;
-    FT_Glyph_DoneFunc       glyph_done;
-    FT_Glyph_CopyFunc       glyph_copy;
-    FT_Glyph_TransformFunc  glyph_transform;
-    FT_Glyph_GetBBoxFunc    glyph_bbox;
-    FT_Glyph_PrepareFunc    glyph_prepare;
-  };
-
-
-  typedef FT_Error
-  (*FT_Renderer_RenderFunc)( FT_Renderer   renderer,
-                             FT_GlyphSlot  slot,
-                             FT_UInt       mode,
-                             FT_Vector*    origin );
-
-  typedef FT_Error
-  (*FT_Renderer_TransformFunc)( FT_Renderer   renderer,
-                                FT_GlyphSlot  slot,
-                                FT_Matrix*    matrix,
-                                FT_Vector*    delta );
-
-
-  typedef void
-  (*FT_Renderer_GetCBoxFunc)( FT_Renderer   renderer,
-                              FT_GlyphSlot  slot,
-                              FT_BBox*      cbox );
-
-
-  typedef FT_Error
-  (*FT_Renderer_SetModeFunc)( FT_Renderer  renderer,
-                              FT_ULong     mode_tag,
-                              FT_Pointer   mode_ptr );
-
-/* deprecated identifiers */
-#define FTRenderer_render  FT_Renderer_RenderFunc
-#define FTRenderer_transform  FT_Renderer_TransformFunc
-#define FTRenderer_getCBox  FT_Renderer_GetCBoxFunc
-#define FTRenderer_setMode  FT_Renderer_SetModeFunc
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_Renderer_Class                                                  */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    The renderer module class descriptor.                              */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    root         :: The root FT_Module_Class fields.                   */
-  /*                                                                       */
-  /*    glyph_format :: The glyph image format this renderer handles.      */
-  /*                                                                       */
-  /*    render_glyph :: A method used to render the image that is in a     */
-  /*                    given glyph slot into a bitmap.                    */
-  /*                                                                       */
-  /*    set_mode     :: A method used to pass additional parameters.       */
-  /*                                                                       */
-  /*    raster_class :: For `FT_GLYPH_FORMAT_OUTLINE' renderers only, this */
-  /*                    is a pointer to its raster's class.                */
-  /*                                                                       */
-  /*    raster       :: For `FT_GLYPH_FORMAT_OUTLINE' renderers only. this */
-  /*                    is a pointer to the corresponding raster object,   */
-  /*                    if any.                                            */
-  /*                                                                       */
-  typedef struct  FT_Renderer_Class_
-  {
-    FT_Module_Class       root;
-
-    FT_Glyph_Format       glyph_format;
-
-    FT_Renderer_RenderFunc     render_glyph;
-    FT_Renderer_TransformFunc  transform_glyph;
-    FT_Renderer_GetCBoxFunc    get_glyph_cbox;
-    FT_Renderer_SetModeFunc    set_mode;
-
-    FT_Raster_Funcs*           raster_class;
-
-  } FT_Renderer_Class;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Get_Renderer                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Retrieves the current renderer for a given glyph format.           */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    library :: A handle to the library object.                         */
-  /*                                                                       */
-  /*    format  :: The glyph format.                                       */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    A renderer handle.  0 if none found.                               */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    An error will be returned if a module already exists by that name, */
-  /*    or if the module requires a version of FreeType that is too great. */
-  /*                                                                       */
-  /*    To add a new renderer, simply use FT_Add_Module().  To retrieve a  */
-  /*    renderer by its name, use FT_Get_Module().                         */
-  /*                                                                       */
-  FT_EXPORT( FT_Renderer )
-  FT_Get_Renderer( FT_Library       library,
-                   FT_Glyph_Format  format );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Set_Renderer                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Sets the current renderer to use, and set additional mode.         */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    library    :: A handle to the library object.                      */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    renderer   :: A handle to the renderer object.                     */
-  /*                                                                       */
-  /*    num_params :: The number of additional parameters.                 */
-  /*                                                                       */
-  /*    parameters :: Additional parameters.                               */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    In case of success, the renderer will be used to convert glyph     */
-  /*    images in the renderer's known format into bitmaps.                */
-  /*                                                                       */
-  /*    This doesn't change the current renderer for other formats.        */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Set_Renderer( FT_Library     library,
-                   FT_Renderer    renderer,
-                   FT_UInt        num_params,
-                   FT_Parameter*  parameters );
-
-
-  /* */
-
-
-FT_END_HEADER
-
-#endif /* __FTRENDER_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/ftsizes.h b/extra_lib/include/freetype/freetype/ftsizes.h
deleted file mode 100644
index f0ec915..0000000
--- a/extra_lib/include/freetype/freetype/ftsizes.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftsizes.h                                                              */
-/*                                                                         */
-/*    FreeType size objects management (specification).                    */
-/*                                                                         */
-/*  Copyright 1996-2001, 2003 by                                           */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Typical application would normally not need to use these functions.   */
-  /* However, they have been placed in a public API for the rare cases     */
-  /* where they are needed.                                                */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-#ifndef __FTSIZES_H__
-#define __FTSIZES_H__
-
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-#ifdef FREETYPE_H
-#error "freetype.h of FreeType 1 has been loaded!"
-#error "Please fix the directory search order for header files"
-#error "so that freetype.h of FreeType 2 is found first."
-#endif
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    sizes_management                                                   */
-  /*                                                                       */
-  /* <Title>                                                               */
-  /*    Size management                                                    */
-  /*                                                                       */
-  /* <Abstract>                                                            */
-  /*    Managing multiple sizes per face                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    When creating a new face object (e.g. with @FT_New_Face), an       */
-  /*    @FT_Size object is automatically created and used to store all     */
-  /*    pixel-size dependent information, available in the "face->size"    */
-  /*    field.                                                             */
-  /*                                                                       */
-  /*    It is however possible to create more sizes for a given face,      */
-  /*    mostly in order to manage several character pixel sizes of the     */
-  /*    same font family and style.  See @FT_New_Size and @FT_Done_Size.   */
-  /*                                                                       */
-  /*    Note that @FT_Set_Pixel_Sizes and @FT_Set_Char_Size only           */
-  /*    modify the contents of the current "active" size; you thus need    */
-  /*    to use @FT_Activate_Size to change it.                             */
-  /*                                                                       */
-  /*    99% of applications won't need the functions provided here,        */
-  /*    especially if they use the caching sub-system, so be cautious      */
-  /*    when using these.                                                  */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_New_Size                                                        */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Creates a new size object from a given face object.                */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    face :: A handle to a parent face object.                          */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    asize :: A handle to a new size object.                            */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    You need to call @FT_Activate_Size in order to select the new size */
-  /*    for upcoming calls to @FT_Set_Pixel_Sizes, @FT_Set_Char_Size,      */
-  /*    @FT_Load_Glyph, @FT_Load_Char, etc.                                */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_New_Size( FT_Face   face,
-               FT_Size*  size );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Done_Size                                                       */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Discards a given size object.  Note that @FT_Done_Face             */
-  /*    automatically discards all size objects allocated with             */
-  /*    @FT_New_Size.                                                      */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    size :: A handle to a target size object.                          */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Done_Size( FT_Size  size );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Activate_Size                                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Even though it is possible to create several size objects for a    */
-  /*    given face (see @FT_New_Size for details), functions like          */
-  /*    @FT_Load_Glyph or @FT_Load_Char only use the last-created one to   */
-  /*    determine the "current character pixel size".                      */
-  /*                                                                       */
-  /*    This function can be used to "activate" a previously created size  */
-  /*    object.                                                            */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    size :: A handle to a target size object.                          */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    If "face" is the size's parent face object, this function changes  */
-  /*    the value of "face->size" to the input size handle.                */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Activate_Size( FT_Size  size );
-
-  /* */
-
-
-FT_END_HEADER
-
-#endif /* __FTSIZES_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/ftsnames.h b/extra_lib/include/freetype/freetype/ftsnames.h
deleted file mode 100644
index 0e2d9a4..0000000
--- a/extra_lib/include/freetype/freetype/ftsnames.h
+++ /dev/null
@@ -1,167 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftsnames.h                                                             */
-/*                                                                         */
-/*    Simple interface to access SFNT name tables (which are used          */
-/*    to hold font names, copyright info, notices, etc.) (specification).  */
-/*                                                                         */
-/*    This is _not_ used to retrieve glyph names!                          */
-/*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003 by                                     */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __FT_SFNT_NAMES_H__
-#define __FT_SFNT_NAMES_H__
-
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-#ifdef FREETYPE_H
-#error "freetype.h of FreeType 1 has been loaded!"
-#error "Please fix the directory search order for header files"
-#error "so that freetype.h of FreeType 2 is found first."
-#endif
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    sfnt_names                                                         */
-  /*                                                                       */
-  /* <Title>                                                               */
-  /*    SFNT Names                                                         */
-  /*                                                                       */
-  /* <Abstract>                                                            */
-  /*    Access the names embedded in TrueType and OpenType files.          */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    The TrueType and OpenType specification allow the inclusion of     */
-  /*    a special `names table' in font files.  This table contains        */
-  /*    textual (and internationalized) information regarding the font,    */
-  /*    like family name, copyright, version, etc.                         */
-  /*                                                                       */
-  /*    The definitions below are used to access them if available.        */
-  /*                                                                       */
-  /*    Note that this has nothing to do with glyph names!                 */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_SfntName                                                        */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure used to model an SFNT `name' table entry.              */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    platform_id :: The platform ID for `string'.                       */
-  /*                                                                       */
-  /*    encoding_id :: The encoding ID for `string'.                       */
-  /*                                                                       */
-  /*    language_id :: The language ID for `string'.                       */
-  /*                                                                       */
-  /*    name_id     :: An identifier for `string'.                         */
-  /*                                                                       */
-  /*    string      :: The `name' string.  Note that its format differs    */
-  /*                   depending on the (platform,encoding) pair. It can   */
-  /*                   be a Pascal String, a UTF-16 one, etc..             */
-  /*                                                                       */
-  /*                   Generally speaking, the string is not               */
-  /*                   zero-terminated. Please refer to the TrueType       */
-  /*                   specification for details..                         */
-  /*                                                                       */
-  /*    string_len  :: The length of `string' in bytes.                    */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    Possible values for `platform_id', `encoding_id', `language_id',   */
-  /*    and `name_id' are given in the file `ttnameid.h'.  For details     */
-  /*    please refer to the TrueType or OpenType specification.            */
-  /*                                                                       */
-  typedef struct  FT_SfntName_
-  {
-    FT_UShort  platform_id;
-    FT_UShort  encoding_id;
-    FT_UShort  language_id;
-    FT_UShort  name_id;
-
-    FT_Byte*   string;      /* this string is *not* null-terminated! */
-    FT_UInt    string_len;  /* in bytes */
-
-  } FT_SfntName;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Get_Sfnt_Name_Count                                             */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Retrieves the number of name strings in the SFNT `name' table.     */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    face :: A handle to the source face.                               */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    The number of strings in the `name' table.                         */
-  /*                                                                       */
-  FT_EXPORT( FT_UInt )
-  FT_Get_Sfnt_Name_Count( FT_Face  face );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Get_Sfnt_Name                                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Retrieves a string of the SFNT `name' table for a given index.     */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    face  :: A handle to the source face.                              */
-  /*                                                                       */
-  /*    idx   :: The index of the `name' string.                           */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    aname :: The indexed FT_SfntName structure.                        */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The `string' array returned in the `aname' structure is not        */
-  /*    null-terminated.                                                   */
-  /*                                                                       */
-  /*    Use FT_Get_Sfnt_Name_Count() to get the total number of available  */
-  /*    `name' table entries, then do a loop until you get the right       */
-  /*    platform, encoding, and name ID.                                   */
-  /*                                                                       */
-  FT_EXPORT( FT_Error )
-  FT_Get_Sfnt_Name( FT_Face       face,
-                    FT_UInt       idx,
-                    FT_SfntName  *aname );
-
-
-  /* */
-
-
-FT_END_HEADER
-
-#endif /* __FT_SFNT_NAMES_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/ftstroker.h b/extra_lib/include/freetype/freetype/ftstroker.h
deleted file mode 100644
index a714056..0000000
--- a/extra_lib/include/freetype/freetype/ftstroker.h
+++ /dev/null
@@ -1,139 +0,0 @@
-#ifndef __FT_STROKER_H__
-#define __FT_STROKER_H__
-
-#include <ft2build.h>
-#include FT_OUTLINE_H
-
-FT_BEGIN_HEADER
-
-/*@*************************************************************
- *
- * @type: FT_Stroker
- *
- * @description:
- *    opaque handler to a path stroker object
- */
-  typedef struct FT_StrokerRec_*    FT_Stroker;
-
-
-/*@*************************************************************
- *
- * @enum: FT_Stroker_LineJoin
- *
- * @description:
- *    these values determine how two joining lines are rendered
- *    in a stroker.
- *
- * @values:
- *    FT_STROKER_LINEJOIN_ROUND ::
- *      used to render rounded line joins. circular arcs are used
- *      to join two lines smoothly
- *
- *    FT_STROKER_LINEJOIN_BEVEL ::
- *      used to render beveled line joins; i.e. the two joining lines
- *      are extended until they intersect
- *
- *    FT_STROKER_LINEJOIN_MITER ::
- *      same as beveled rendering, except that an additional line
- *      break is added if the angle between the two joining lines
- *      is too closed (this is useful to avoid unpleasant spikes
- *      in beveled rendering).
- */
-  typedef enum
-  {
-    FT_STROKER_LINEJOIN_ROUND = 0,
-    FT_STROKER_LINEJOIN_BEVEL,
-    FT_STROKER_LINEJOIN_MITER
-
-  } FT_Stroker_LineJoin;
-
-
-/*@*************************************************************
- *
- * @enum: FT_Stroker_LineCap
- *
- * @description:
- *    these values determine how the end of opened sub-paths are
- *    rendered in a stroke
- *
- * @values:
- *    FT_STROKER_LINECAP_BUTT ::
- *      the end of lines is rendered as a full stop on the last
- *      point itself
- *
- *    FT_STROKER_LINECAP_ROUND ::
- *      the end of lines is rendered as a half-circle around the
- *      last point
- *
- *    FT_STROKER_LINECAP_SQUARE ::
- *      the end of lines is rendered as a square around the
- *      last point
- */
-  typedef enum
-  {
-    FT_STROKER_LINECAP_BUTT = 0,
-    FT_STROKER_LINECAP_ROUND,
-    FT_STROKER_LINECAP_SQUARE
-
-  } FT_Stroker_LineCap;
-
- /* */
-
-  FT_EXPORT( FT_Error )
-  FT_Stroker_New( FT_Memory    memory,
-                  FT_Stroker  *astroker );
-
-  FT_EXPORT( void )
-  FT_Stroker_Set( FT_Stroker           stroker,
-                  FT_Fixed             radius,
-                  FT_Stroker_LineCap   line_cap,
-                  FT_Stroker_LineJoin  line_join,
-                  FT_Fixed             miter_limit );
-
-
-  FT_EXPORT( FT_Error )
-  FT_Stroker_ParseOutline( FT_Stroker   stroker,
-                           FT_Outline*  outline,
-                           FT_Bool      opened );
-
-  FT_EXPORT( FT_Error )
-  FT_Stroker_BeginSubPath( FT_Stroker  stroker,
-                           FT_Vector*  to,
-                           FT_Bool     open );
-
-  FT_EXPORT( FT_Error )
-  FT_Stroker_EndSubPath( FT_Stroker  stroker );
-
-
-  FT_EXPORT( FT_Error )
-  FT_Stroker_LineTo( FT_Stroker  stroker,
-                     FT_Vector*  to );
-
-  FT_EXPORT( FT_Error )
-  FT_Stroker_ConicTo( FT_Stroker  stroker,
-                      FT_Vector*  control,
-                      FT_Vector*  to );
-
-  FT_EXPORT( FT_Error )
-  FT_Stroker_CubicTo( FT_Stroker  stroker,
-                      FT_Vector*  control1,
-                      FT_Vector*  control2,
-                      FT_Vector*  to );
-
-
-  FT_EXPORT( FT_Error )
-  FT_Stroker_GetCounts( FT_Stroker  stroker,
-                        FT_UInt    *anum_points,
-                        FT_UInt    *anum_contours );
-
-  FT_EXPORT( void )
-  FT_Stroker_Export( FT_Stroker   stroker,
-                     FT_Outline*  outline );
-
-  FT_EXPORT( void )
-  FT_Stroker_Done( FT_Stroker  stroker );
-
-
-FT_END_HEADER
-
-#endif /* __FT_STROKER_H__ */
diff --git a/extra_lib/include/freetype/freetype/ftsynth.h b/extra_lib/include/freetype/freetype/ftsynth.h
deleted file mode 100644
index f0c7385..0000000
--- a/extra_lib/include/freetype/freetype/ftsynth.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftsynth.h                                                              */
-/*                                                                         */
-/*    FreeType synthesizing code for emboldening and slanting              */
-/*    (specification).                                                     */
-/*                                                                         */
-/*  Copyright 2000-2001, 2003 by                                           */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*********                                                       *********/
-  /*********        WARNING, THIS IS ALPHA CODE, THIS API          *********/
-  /*********    IS DUE TO CHANGE UNTIL STRICTLY NOTIFIED BY THE    *********/
-  /*********            FREETYPE DEVELOPMENT TEAM                  *********/
-  /*********                                                       *********/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-#ifndef __FTSYNTH_H__
-#define __FTSYNTH_H__
-
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-#ifdef FREETYPE_H
-#error "freetype.h of FreeType 1 has been loaded!"
-#error "Please fix the directory search order for header files"
-#error "so that freetype.h of FreeType 2 is found first."
-#endif
-
-
-FT_BEGIN_HEADER
-
-
-  /* This code is completely experimental -- use with care! */
-  /* It will probably be completely rewritten in the future */
-  /* or even integrated into the library.                   */
-  FT_EXPORT( void )
-  FT_GlyphSlot_Embolden( FT_GlyphSlot  slot );
-
-
-  FT_EXPORT( void )
-  FT_GlyphSlot_Oblique( FT_GlyphSlot  slot );
-
- /* */
-
-FT_END_HEADER
-
-#endif /* __FTSYNTH_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/ftsysio.h b/extra_lib/include/freetype/freetype/ftsysio.h
deleted file mode 100644
index f8e4954..0000000
--- a/extra_lib/include/freetype/freetype/ftsysio.h
+++ /dev/null
@@ -1,195 +0,0 @@
-#ifndef __FT_SYSTEM_IO_H__
-#define __FT_SYSTEM_IO_H__
-
- /************************************************************************/
- /************************************************************************/
- /*****                                                              *****/
- /*****    NOTE: THE CONTENT OF THIS FILE IS NOT CURRENTLY USED      *****/
- /*****          IN NORMAL BUILDS.  CONSIDER IT EXPERIMENTAL.        *****/
- /*****                                                              *****/
- /************************************************************************/
- /************************************************************************/
-
-
- /********************************************************************
-  *
-  *  designing custom streams is a bit different now
-  *
-  *
-  *
-  *
-  *
-  *
-  *
-  *
-  *
-  *
-  *
-  *
-  *
-  *
-  *
-  *
-  *
-  *
-  *
-  *
-  *
-  *
-  *
-  *
-  */
-
-#include <ft2build.h>
-#include FT_INTERNAL_OBJECT_H
-
-FT_BEGIN_HEADER
-
- /*@*******************************************************************
-  *
-  * @type: FT_Stream
-  *
-  * @description:
-  *   handle to an input stream object. These are also @FT_Object handles
-  */
-  typedef struct FT_StreamRec_*    FT_Stream;
-
-
- /*@*******************************************************************
-  *
-  * @type: FT_Stream_Class
-  *
-  * @description:
-  *   opaque handle to a @FT_Stream_ClassRec class structure describing
-  *   the methods of input streams
-  */
-  typedef const struct FT_Stream_ClassRec_*   FT_Stream_Class;
-
-
- /*@*******************************************************************
-  *
-  * @functype: FT_Stream_ReadFunc
-  *
-  * @description:
-  *   a method used to read bytes from an input stream into memory
-  *
-  * @input:
-  *   stream  :: target stream handle
-  *   buffer  :: target buffer address
-  *   size    :: number of bytes to read
-  *
-  * @return:
-  *   number of bytes effectively read. Must be <= 'size'.
-  */
-  typedef FT_ULong  (*FT_Stream_ReadFunc)( FT_Stream   stream,
-                                           FT_Byte*    buffer,
-                                           FT_ULong    size );
-
-
- /*@*******************************************************************
-  *
-  * @functype: FT_Stream_SeekFunc
-  *
-  * @description:
-  *   a method used to seek to a new position within a stream
-  *
-  * @input:
-  *   stream  :: target stream handle
-  *   pos     :: new read position, from start of stream
-  *
-  * @return:
-  *   error code. 0 means success
-  */
-  typedef FT_Error  (*FT_Stream_SeekFunc)( FT_Stream   stream,
-                                           FT_ULong    pos );
-
-
- /*@*******************************************************************
-  *
-  * @struct: FT_Stream_ClassRec
-  *
-  * @description:
-  *   a structure used to describe an input stream class
-  *
-  * @input:
-  *   clazz       :: root @FT_ClassRec fields
-  *   stream_read :: stream byte read method
-  *   stream_seek :: stream seek method
-  */
-  typedef struct FT_Stream_ClassRec_
-  {
-    FT_ClassRec          clazz;
-    FT_Stream_ReadFunc   stream_read;
-    FT_Stream_SeekFunc   stream_seek;
-
-  } FT_Stream_ClassRec;
-
- /* */
-
-#define  FT_STREAM_CLASS(x)        ((FT_Stream_Class)(x))
-#define  FT_STREAM_CLASS__READ(x)  FT_STREAM_CLASS(x)->stream_read
-#define  FT_STREAM_CLASS__SEEK(x)  FT_STREAM_CLASS(x)->stream_seek;
-
- /*@*******************************************************************
-  *
-  * @struct: FT_StreamRec
-  *
-  * @description:
-  *   the input stream object structure. See @FT_Stream_ClassRec for
-  *   its class descriptor
-  *
-  * @fields:
-  *   object      :: root @FT_ObjectRec fields
-  *   size        :: size of stream in bytes (0 if unknown)
-  *   pos         :: current position within stream
-  *   base        :: for memory-based streams, the address of the stream's
-  *                  first data byte in memory. NULL otherwise
-  *
-  *   cursor      :: the current cursor position within an input stream
-  *                  frame. Only valid within a FT_FRAME_ENTER .. FT_FRAME_EXIT
-  *                  block; NULL otherwise
-  *
-  *   limit       :: the current frame limit within a FT_FRAME_ENTER ..
-  *                  FT_FRAME_EXIT block. NULL otherwise
-  */
-  typedef struct FT_StreamRec_
-  {
-    FT_ObjectRec        object;
-    FT_ULong            size;
-    FT_ULong            pos;
-    const FT_Byte*      base;
-    const FT_Byte*      cursor;
-    const FT_Byte*      limit;
-
-  } FT_StreamRec;
-
- /* some useful macros */
-#define  FT_STREAM(x)    ((FT_Stream)(x))
-#define  FT_STREAM_P(x)  ((FT_Stream*)(x))
-
-#define  FT_STREAM__READ(x)  FT_STREAM_CLASS__READ(FT_OBJECT__CLASS(x))
-#define  FT_STREAM__SEEK(x)  FT_STREAM_CLASS__SEEK(FT_OBJECT__CLASS(x))
-
-#define  FT_STREAM_IS_BASED(x)  ( FT_STREAM(x)->base != NULL )
-
- /* */
-
- /* create new memory-based stream */
-  FT_BASE( FT_Error )   ft_stream_new_memory( const FT_Byte*  stream_base,
-                                              FT_ULong        stream_size,
-                                              FT_Memory       memory,
-                                              FT_Stream      *astream );
-
-  FT_BASE( FT_Error )   ft_stream_new_iso( const char*  pathanme,
-                                           FT_Memory    memory,
-                                           FT_Stream   *astream );
-
-
- /* handle to default stream class implementation for a given build */
- /* this is used by "FT_New_Face"                                   */
- /*                                                                 */
-  FT_APIVAR( FT_Type )   ft_stream_default_type;
-
-FT_END_HEADER
-
-#endif /* __FT_SYSTEM_STREAM_H__ */
diff --git a/extra_lib/include/freetype/freetype/ftsysmem.h b/extra_lib/include/freetype/freetype/ftsysmem.h
deleted file mode 100644
index 8de0c4d..0000000
--- a/extra_lib/include/freetype/freetype/ftsysmem.h
+++ /dev/null
@@ -1,202 +0,0 @@
-#ifndef __FT_SYSTEM_MEMORY_H__
-#define __FT_SYSTEM_MEMORY_H__
-
-#include <ft2build.h>
-
-FT_BEGIN_HEADER
-
- /************************************************************************/
- /************************************************************************/
- /*****                                                              *****/
- /*****    NOTE: THE CONTENT OF THIS FILE IS NOT CURRENTLY USED      *****/
- /*****          IN NORMAL BUILDS.  CONSIDER IT EXPERIMENTAL.        *****/
- /*****                                                              *****/
- /************************************************************************/
- /************************************************************************/
-
-
- /*@**********************************************************************
-  *
-  * @type: FT_Memory
-  *
-  * @description:
-  *   opaque handle to a memory manager handle. Note that since FreeType
-  *   2.2, the memory manager structure FT_MemoryRec is hidden to client
-  *   applications.
-  *
-  *   however, you can still define custom allocators easily using the
-  *   @ft_memory_new API
-  */
-  typedef struct FT_MemoryRec_*   FT_Memory;
-
-
- /*@**********************************************************************
-  *
-  * @functype: FT_Memory_AllocFunc
-  *
-  * @description:
-  *   a function used to allocate a block of memory.
-  *
-  * @input:
-  *   size     :: size of blocks in bytes. Always > 0 !!
-  *   mem_data :: memory-manager specific optional argument
-  *               (see @ft_memory_new)
-  *
-  * @return:
-  *   address of new block. NULL in case of memory exhaustion
-  */
-  typedef FT_Pointer  (*FT_Memory_AllocFunc)( FT_ULong   size,
-                                              FT_Pointer mem_data );
-
-
- /*@**********************************************************************
-  *
-  * @functype: FT_Memory_FreeFunc
-  *
-  * @description:
-  *   a function used to release a block of memory created through
-  *   @FT_Memory_AllocFunc or @FT_Memory_ReallocFunc
-  *
-  * @input:
-  *   block    :: address of target memory block. cannot be NULL !!
-  *   mem_data :: memory-manager specific optional argument
-  *               (see @ft_memory_new)
-  */
-  typedef void        (*FT_Memory_FreeFunc) ( FT_Pointer  block,
-                                              FT_Pointer  mem_data );
-
-
- /*@**********************************************************************
-  *
-  * @functype: FT_Memory_ReallocFunc
-  *
-  * @description:
-  *   a function used to reallocate a memory block.
-  *
-  * @input:
-  *   block    :: address of target memory block. cannot be NULL !!
-  *   new_size :: new requested size in bytes
-  *   cur_size :: current block size in bytes
-  *   mem_data :: memory-manager specific optional argument
-  *               (see @ft_memory_new)
-  */
-  typedef FT_Pointer  (*FT_Memory_ReallocFunc)( FT_Pointer   block,
-                                                FT_ULong     new_size,
-                                                FT_ULong     cur_size,
-                                                FT_Pointer   mem_data );
-
-
- /*@**********************************************************************
-  *
-  * @functype: FT_Memory_CreateFunc
-  *
-  * @description:
-  *   a function used to create a @FT_Memory object to model a
-  *   memory manager
-  *
-  * @input:
-  *   size      :: size of memory manager structure in bytes
-  *   init_data :: optional initialisation argument
-  *
-  * @output:
-  *   amem_data :: memory-manager specific argument to block management
-  *                routines.
-  *
-  * @return:
-  *   handle to new memory manager object. NULL in case of failure
-  */
-  typedef FT_Pointer  (*FT_Memory_CreateFunc)( FT_UInt     size,
-                                               FT_Pointer  init_data,
-                                               FT_Pointer *amem_data );
-
-
- /*@**********************************************************************
-  *
-  * @functype: FT_Memory_DestroyFunc
-  *
-  * @description:
-  *   a function used to destroy a given @FT_Memory manager
-  *
-  * @input:
-  *   memory   :: target memory manager handle
-  *   mem_data :: option manager-specific argument
-  */
-  typedef void        (*FT_Memory_DestroyFunc)( FT_Memory  memory,
-                                                FT_Pointer mem_data );
-
-
- /*@**********************************************************************
-  *
-  * @struct: FT_Memory_FuncsRec
-  *
-  * @description:
-  *   a function used to hold all methods of a given memory manager
-  *   implementation.
-  *
-  * @fields:
-  *   mem_alloc   :: block allocation routine
-  *   mem_free    :: block release routine
-  *   mem_realloc :: block re-allocation routine
-  *   mem_create  :: manager creation routine
-  *   mem_destroy :: manager destruction routine
-  */
-  typedef struct FT_Memory_FuncsRec_
-  {
-    FT_Memory_AllocFunc     mem_alloc;
-    FT_Memory_FreeFunc      mem_free;
-    FT_Memory_ReallocFunc   mem_realloc;
-    FT_Memory_CreateFunc    mem_create;
-    FT_Memory_DestroyFunc   mem_destroy;
-
-  } FT_Memory_FuncsRec, *FT_Memory_Funcs;
-
-
- /*@**********************************************************************
-  *
-  * @type: FT_Memory_Funcs
-  *
-  * @description:
-  *   a pointer to a constant @FT_Memory_FuncsRec structure used to
-  *   describe a given memory manager implementation.
-  */
-  typedef const FT_Memory_FuncsRec*  FT_Memory_Funcs;
-
-
- /*@**********************************************************************
-  *
-  * @function: ft_memory_new
-  *
-  * @description:
-  *   create a new memory manager, given a set of memory methods
-  *
-  * @input:
-  *   mem_funcs     :: handle to memory manager implementation descriptor
-  *   mem_init_data :: optional initialisation argument, passed to
-  *                    @FT_Memory_CreateFunc
-  *
-  * @return:
-  *   new memory manager handle. NULL in case of failure
-  */
-  FT_BASE( FT_Memory )
-  ft_memory_new( FT_Memory_Funcs  mem_funcs,
-                 FT_Pointer       mem_init_data );
-
-
- /*@**********************************************************************
-  *
-  * @function: ft_memory_destroy
-  *
-  * @description:
-  *   destroy a given memory manager
-  *
-  * @input:
-  *   memory :: handle to target memory manager
-  */
-  FT_BASE( void )
-  ft_memory_destroy( FT_Memory  memory );
-
-/* */
-
-FT_END_HEADER
-
-#endif /* __FT_SYSTEM_MEMORY_H__ */
diff --git a/extra_lib/include/freetype/freetype/ftsystem.h b/extra_lib/include/freetype/freetype/ftsystem.h
deleted file mode 100644
index d1c55f7..0000000
--- a/extra_lib/include/freetype/freetype/ftsystem.h
+++ /dev/null
@@ -1,309 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftsystem.h                                                             */
-/*                                                                         */
-/*    FreeType low-level system interface definition (specification).      */
-/*                                                                         */
-/*  Copyright 1996-2001, 2002 by                                           */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __FTSYSTEM_H__
-#define __FTSYSTEM_H__
-
-
-#include <ft2build.h>
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    system_interface                                                   */
-  /*                                                                       */
-  /* <Title>                                                               */
-  /*    System Interface                                                   */
-  /*                                                                       */
-  /* <Abstract>                                                            */
-  /*    How FreeType manages memory and i/o.                               */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This section contains various definitions related to memory        */
-  /*    management and i/o access.  You need to understand this            */
-  /*    information if you want to use a custom memory manager or you own  */
-  /*    input i/o streams.                                                 */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /*                  M E M O R Y   M A N A G E M E N T                    */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @type:                                                                */
-  /*    FT_Memory                                                          */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A handle to a given memory manager object, defined with a          */
-  /*    @FT_MemoryRec structure.                                           */
-  /*                                                                       */
-  typedef struct FT_MemoryRec_*  FT_Memory;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @functype:                                                            */
-  /*    FT_Alloc_Func                                                      */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A function used to allocate `size' bytes from `memory'.            */
-  /*                                                                       */
-  /* @input:                                                               */
-  /*    memory :: A handle to the source memory manager.                   */
-  /*                                                                       */
-  /*    size   :: The size in bytes to allocate.                           */
-  /*                                                                       */
-  /* @return:                                                              */
-  /*    Address of new memory block.  0 in case of failure.                */
-  /*                                                                       */
-  typedef void*
-  (*FT_Alloc_Func)( FT_Memory  memory,
-                    long       size );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @functype:                                                            */
-  /*    FT_Free_Func                                                       */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A function used to release a given block of memory.                */
-  /*                                                                       */
-  /* @input:                                                               */
-  /*    memory :: A handle to the source memory manager.                   */
-  /*                                                                       */
-  /*    block  :: The address of the target memory block.                  */
-  /*                                                                       */
-  typedef void
-  (*FT_Free_Func)( FT_Memory  memory,
-                   void*      block );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @functype:                                                            */
-  /*    FT_Realloc_Func                                                    */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    a function used to re-allocate a given block of memory.            */
-  /*                                                                       */
-  /* @input:                                                               */
-  /*    memory   :: A handle to the source memory manager.                 */
-  /*                                                                       */
-  /*    cur_size :: The block's current size in bytes.                     */
-  /*                                                                       */
-  /*    new_size :: The block's requested new size.                        */
-  /*                                                                       */
-  /*    block    :: The block's current address.                           */
-  /*                                                                       */
-  /* @return:                                                              */
-  /*    New block address.  0 in case of memory shortage.                  */
-  /*                                                                       */
-  /* @note:                                                                */
-  /*   In case of error, the old block must still be available.            */
-  /*                                                                       */
-  typedef void*
-  (*FT_Realloc_Func)( FT_Memory  memory,
-                      long       cur_size,
-                      long       new_size,
-                      void*      block );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @struct:                                                              */
-  /*    FT_MemoryRec                                                       */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A structure used to describe a given memory manager to FreeType 2. */
-  /*                                                                       */
-  /* @fields:                                                              */
-  /*    user    :: A generic typeless pointer for user data.               */
-  /*                                                                       */
-  /*    alloc   :: A pointer type to an allocation function.               */
-  /*                                                                       */
-  /*    free    :: A pointer type to an memory freeing function.           */
-  /*                                                                       */
-  /*    realloc :: A pointer type to a reallocation function.              */
-  /*                                                                       */
-  struct  FT_MemoryRec_
-  {
-    void*            user;
-    FT_Alloc_Func    alloc;
-    FT_Free_Func     free;
-    FT_Realloc_Func  realloc;
-  };
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /*                       I / O   M A N A G E M E N T                     */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @type:                                                                */
-  /*    FT_Stream                                                          */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A handle to an input stream.                                       */
-  /*                                                                       */
-  typedef struct FT_StreamRec_*  FT_Stream;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @struct:                                                              */
-  /*    FT_StreamDesc                                                      */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A union type used to store either a long or a pointer.  This is    */
-  /*    used to store a file descriptor or a FILE* in an input stream.     */
-  /*                                                                       */
-  typedef union  FT_StreamDesc_
-  {
-    long   value;
-    void*  pointer;
-
-  } FT_StreamDesc;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @functype:                                                            */
-  /*    FT_Stream_IoFunc                                                   */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A function used to seek and read data from a given input stream.   */
-  /*                                                                       */
-  /* @input:                                                               */
-  /*    stream :: A handle to the source stream.                           */
-  /*                                                                       */
-  /*    offset :: The offset of read in stream (always from start).        */
-  /*                                                                       */
-  /*    buffer :: The address of the read buffer.                          */
-  /*                                                                       */
-  /*    count  :: The number of bytes to read from the stream.             */
-  /*                                                                       */
-  /* @return:                                                              */
-  /*    The number of bytes effectively read by the stream.                */
-  /*                                                                       */
-  /* @note:                                                                */
-  /*    This function might be called to perform a seek or skip operation  */
-  /*    with a `count' of 0.                                               */
-  /*                                                                       */
-  typedef unsigned long
-  (*FT_Stream_IoFunc)( FT_Stream       stream,
-                       unsigned long   offset,
-                       unsigned char*  buffer,
-                       unsigned long   count );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @functype:                                                            */
-  /*    FT_Stream_CloseFunc                                                */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A function used to close a given input stream.                     */
-  /*                                                                       */
-  /* @input:                                                               */
-  /*   stream :: A handle to the target stream.                            */
-  /*                                                                       */
-  typedef void
-  (*FT_Stream_CloseFunc)( FT_Stream  stream );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @struct:                                                              */
-  /*    FT_StreamRec                                                       */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*   A structure used to describe an input stream.                       */
-  /*                                                                       */
-  /* @input:                                                               */
-  /*   base       :: For memory-based streams, this is the address of the  */
-  /*                 first stream byte in memory.  This field should       */
-  /*                 always be set to NULL for disk-based streams.         */
-  /*                                                                       */
-  /*   size       :: The stream size in bytes.                             */
-  /*                                                                       */
-  /*   pos        :: The current position within the stream.               */
-  /*                                                                       */
-  /*   descriptor :: This field is a union that can hold an integer or a   */
-  /*                 pointer.  It is used by stream implementations to     */
-  /*                 store file descriptors or FILE* pointers.             */
-  /*                                                                       */
-  /*   pathname   :: This field is completely ignored by FreeType.         */
-  /*                 However, it is often useful during debugging to use   */
-  /*                 it to store the stream's filename (where available).  */
-  /*                                                                       */
-  /*   read       :: The stream's input function.                          */
-  /*                                                                       */
-  /*   close      :: The stream;s close function.                          */
-  /*                                                                       */
-  /*   memory     :: The memory manager to use to preload frames.  This is */
-  /*                 set internally by FreeType and shouldn't be touched   */
-  /*                 by stream implementations.                            */
-  /*                                                                       */
-  /*   cursor     :: This field is set and used internally by FreeType     */
-  /*                 when parsing frames.                                  */
-  /*                                                                       */
-  /*   limit      :: This field is set and used internally by FreeType     */
-  /*                 when parsing frames.                                  */
-  /*                                                                       */
-  typedef struct  FT_StreamRec_
-  {
-    unsigned char*       base;
-    unsigned long        size;
-    unsigned long        pos;
-
-    FT_StreamDesc        descriptor;
-    FT_StreamDesc        pathname;
-    FT_Stream_IoFunc     read;
-    FT_Stream_CloseFunc  close;
-
-    FT_Memory            memory;
-    unsigned char*       cursor;
-    unsigned char*       limit;
-
-  } FT_StreamRec;
-
-
-  /* */
-
-
-FT_END_HEADER
-
-#endif /* __FTSYSTEM_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/fttrigon.h b/extra_lib/include/freetype/freetype/fttrigon.h
deleted file mode 100644
index 0462265..0000000
--- a/extra_lib/include/freetype/freetype/fttrigon.h
+++ /dev/null
@@ -1,315 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  fttrigon.h                                                             */
-/*                                                                         */
-/*    FreeType trigonometric functions (specification).                    */
-/*                                                                         */
-/*  Copyright 2001, 2003 by                                                */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __FTTRIGON_H__
-#define __FTTRIGON_H__
-
-#include FT_FREETYPE_H
-
-#ifdef FREETYPE_H
-#error "freetype.h of FreeType 1 has been loaded!"
-#error "Please fix the directory search order for header files"
-#error "so that freetype.h of FreeType 2 is found first."
-#endif
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @section:                                                             */
-  /*   computations                                                        */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @type:                                                                */
-  /*    FT_Angle                                                           */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    This type is used to model angle values in FreeType.  Note that    */
-  /*    the angle is a 16.16 fixed float value expressed in degrees.       */
-  /*                                                                       */
-  typedef FT_Fixed  FT_Angle;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_ANGLE_PI                                                        */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*   The angle pi expressed in @FT_Angle units.                          */
-  /*                                                                       */
-#define FT_ANGLE_PI  ( 180L << 16 )
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_ANGLE_2PI                                                       */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    The angle 2*pi expressed in @FT_Angle units.                       */
-  /*                                                                       */
-#define FT_ANGLE_2PI  ( FT_ANGLE_PI * 2 )
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_ANGLE_PI2                                                       */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    The angle pi/2 expressed in @FT_Angle units.                       */
-  /*                                                                       */
-#define FT_ANGLE_PI2  ( FT_ANGLE_PI / 2 )
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @macro:                                                               */
-  /*    FT_ANGLE_PI4                                                       */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    The angle pi/4 expressed in @FT_Angle units.                       */
-  /*                                                                       */
-#define FT_ANGLE_PI4  ( FT_ANGLE_PI / 4 )
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @function:                                                            */
-  /*    FT_Sin                                                             */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    Return the sinus of a given angle in fixed point format.           */
-  /*                                                                       */
-  /* @input:                                                               */
-  /*    angle :: The input angle.                                          */
-  /*                                                                       */
-  /* @return:                                                              */
-  /*    The sinus value.                                                   */
-  /*                                                                       */
-  /* @note:                                                                */
-  /*    If you need both the sinus and cosinus for a given angle, use the  */
-  /*    function @FT_Vector_Unit.                                          */
-  /*                                                                       */
-  FT_EXPORT( FT_Fixed )
-  FT_Sin( FT_Angle  angle );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @function:                                                            */
-  /*    FT_Cos                                                             */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    Return the cosinus of a given angle in fixed point format.         */
-  /*                                                                       */
-  /* @input:                                                               */
-  /*    angle :: The input angle.                                          */
-  /*                                                                       */
-  /* @return:                                                              */
-  /*    The cosinus value.                                                 */
-  /*                                                                       */
-  /* @note:                                                                */
-  /*    If you need both the sinus and cosinus for a given angle, use the  */
-  /*    function @FT_Vector_Unit.                                          */
-  /*                                                                       */
-  FT_EXPORT( FT_Fixed )
-  FT_Cos( FT_Angle  angle );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @function:                                                            */
-  /*    FT_Tan                                                             */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    Return the tangent of a given angle in fixed point format.         */
-  /*                                                                       */
-  /* @input:                                                               */
-  /*    angle :: The input angle.                                          */
-  /*                                                                       */
-  /* @return:                                                              */
-  /*    The tangent value.                                                 */
-  /*                                                                       */
-  FT_EXPORT( FT_Fixed )
-  FT_Tan( FT_Angle  angle );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @function:                                                            */
-  /*    FT_Atan2                                                           */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    Return the arc-tangent corresponding to a given vector (x,y) in    */
-  /*    the 2d plane.                                                      */
-  /*                                                                       */
-  /* @input:                                                               */
-  /*    x :: The horizontal vector coordinate.                             */
-  /*                                                                       */
-  /*    y :: The vertical vector coordinate.                               */
-  /*                                                                       */
-  /* @return:                                                              */
-  /*    The arc-tangent value (i.e. angle).                                */
-  /*                                                                       */
-  FT_EXPORT( FT_Angle )
-  FT_Atan2( FT_Fixed  x,
-            FT_Fixed  y );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @function:                                                            */
-  /*    FT_Angle_Diff                                                      */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    Return the difference between two angles.  The result is always    */
-  /*    constrained to the ]-PI..PI] interval.                             */
-  /*                                                                       */
-  /* @input:                                                               */
-  /*    angle1 :: First angle.                                             */
-  /*                                                                       */
-  /*    angle2 :: Second angle.                                            */
-  /*                                                                       */
-  /* @return:                                                              */
-  /*    Contrainted value of `value2-value1'.                              */
-  /*                                                                       */
-  FT_EXPORT( FT_Angle )
-  FT_Angle_Diff( FT_Angle  angle1,
-                 FT_Angle  angle2 );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @function:                                                            */
-  /*    FT_Vector_Unit                                                     */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    Return the unit vector corresponding to a given angle.  After the  */
-  /*    call, the value of `vec.x' will be `sin(angle)', and the value of  */
-  /*    `vec.y' will be `cos(angle)'.                                      */
-  /*                                                                       */
-  /*    This function is useful to retrieve both the sinus and cosinus of  */
-  /*    a given angle quickly.                                             */
-  /*                                                                       */
-  /* @output:                                                              */
-  /*    vec   :: The address of target vector.                             */
-  /*                                                                       */
-  /* @input:                                                               */
-  /*    angle :: The address of angle.                                     */
-  /*                                                                       */
-  FT_EXPORT( void )
-  FT_Vector_Unit( FT_Vector*  vec,
-                  FT_Angle    angle );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @function:                                                            */
-  /*    FT_Vector_Rotate                                                   */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    Rotate a vector by a given angle.                                  */
-  /*                                                                       */
-  /* @inout:                                                               */
-  /*    vec   :: The address of target vector.                             */
-  /*                                                                       */
-  /* @input:                                                               */
-  /*    angle :: The address of angle.                                     */
-  /*                                                                       */
-  FT_EXPORT( void )
-  FT_Vector_Rotate( FT_Vector*  vec,
-                    FT_Angle    angle );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @function:                                                            */
-  /*   FT_Vector_Length                                                    */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*   Return the length of a given vector.                                */
-  /*                                                                       */
-  /* @input:                                                               */
-  /*   vec :: The address of target vector.                                */
-  /*                                                                       */
-  /* @return:                                                              */
-  /*   The vector length, expressed in the same units that the original    */
-  /*   vector coordinates.                                                 */
-  /*                                                                       */
-  FT_EXPORT( FT_Fixed )
-  FT_Vector_Length( FT_Vector*  vec );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @function:                                                            */
-  /*    FT_Vector_Polarize                                                 */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    Compute both the length and angle of a given vector.               */
-  /*                                                                       */
-  /* @input:                                                               */
-  /*    vec    :: The address of source vector.                            */
-  /*                                                                       */
-  /* @output:                                                              */
-  /*    length :: The vector length.                                       */
-  /*    angle  :: The vector angle.                                        */
-  /*                                                                       */
-  FT_EXPORT( void )
-  FT_Vector_Polarize( FT_Vector*  vec,
-                      FT_Fixed   *length,
-                      FT_Angle   *angle );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @function:                                                            */
-  /*    FT_Vector_From_Polar                                               */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    Compute vector coordinates from a length and angle.                */
-  /*                                                                       */
-  /* @output:                                                              */
-  /*    vec    :: The address of source vector.                            */
-  /*                                                                       */
-  /* @input:                                                               */
-  /*    length :: The vector length.                                       */
-  /*    angle  :: The vector angle.                                        */
-  /*                                                                       */
-  FT_EXPORT( void )
-  FT_Vector_From_Polar( FT_Vector*  vec,
-                        FT_Fixed    length,
-                        FT_Angle    angle );
-
-  /* */
-
-
-FT_END_HEADER
-
-#endif /* __FTTRIGON_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/fttypes.h b/extra_lib/include/freetype/freetype/fttypes.h
deleted file mode 100644
index 2782f74..0000000
--- a/extra_lib/include/freetype/freetype/fttypes.h
+++ /dev/null
@@ -1,558 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  fttypes.h                                                              */
-/*                                                                         */
-/*    FreeType simple types definitions (specification only).              */
-/*                                                                         */
-/*  Copyright 1996-2001 by                                                 */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __FTTYPES_H__
-#define __FTTYPES_H__
-
-
-#include <ft2build.h>
-#include FT_CONFIG_CONFIG_H
-#include FT_SYSTEM_H
-#include FT_IMAGE_H
-
-#include <stddef.h>
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    basic_types                                                        */
-  /*                                                                       */
-  /* <Title>                                                               */
-  /*    Basic Data Types                                                   */
-  /*                                                                       */
-  /* <Abstract>                                                            */
-  /*    The basic data types defined by the library.                       */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This section contains the basic data types defined by FreeType 2,  */
-  /*    ranging from simple scalar types to bitmap descriptors.  More      */
-  /*    font-specific structures are defined in a different section.       */
-  /*                                                                       */
-  /* <Order>                                                               */
-  /*    FT_Byte                                                            */
-  /*    FT_Char                                                            */
-  /*    FT_Int                                                             */
-  /*    FT_UInt                                                            */
-  /*    FT_Short                                                           */
-  /*    FT_UShort                                                          */
-  /*    FT_Long                                                            */
-  /*    FT_ULong                                                           */
-  /*    FT_Bool                                                            */
-  /*    FT_Offset                                                          */
-  /*    FT_PtrDist                                                         */
-  /*    FT_String                                                          */
-  /*    FT_Error                                                           */
-  /*    FT_Fixed                                                           */
-  /*    FT_Pointer                                                         */
-  /*    FT_Pos                                                             */
-  /*    FT_Vector                                                          */
-  /*    FT_BBox                                                            */
-  /*    FT_Matrix                                                          */
-  /*    FT_FWord                                                           */
-  /*    FT_UFWord                                                          */
-  /*    FT_F2Dot14                                                         */
-  /*    FT_UnitVector                                                      */
-  /*    FT_F26Dot6                                                         */
-  /*                                                                       */
-  /*                                                                       */
-  /*    FT_Generic                                                         */
-  /*    FT_Generic_Finalizer                                               */
-  /*                                                                       */
-  /*    FT_Bitmap                                                          */
-  /*    FT_Pixel_Mode                                                      */
-  /*    FT_Palette_Mode                                                    */
-  /*    FT_Glyph_Format                                                    */
-  /*    FT_IMAGE_TAG                                                       */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_Bool                                                            */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A typedef of unsigned char, used for simple booleans.              */
-  /*                                                                       */
-  typedef unsigned char  FT_Bool;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_FWord                                                           */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A signed 16-bit integer used to store a distance in original font  */
-  /*    units.                                                             */
-  /*                                                                       */
-  typedef signed short  FT_FWord;   /* distance in FUnits */
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_UFWord                                                          */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    An unsigned 16-bit integer used to store a distance in original    */
-  /*    font units.                                                        */
-  /*                                                                       */
-  typedef unsigned short  FT_UFWord;  /* unsigned distance */
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_Char                                                            */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A simple typedef for the _signed_ char type.                       */
-  /*                                                                       */
-  typedef signed char  FT_Char;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_Byte                                                            */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A simple typedef for the _unsigned_ char type.                     */
-  /*                                                                       */
-  typedef unsigned char  FT_Byte;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_String                                                          */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A simple typedef for the char type, usually used for strings.      */
-  /*                                                                       */
-  typedef char  FT_String;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_Short                                                           */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A typedef for signed short.                                        */
-  /*                                                                       */
-  typedef signed short  FT_Short;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_UShort                                                          */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A typedef for unsigned short.                                      */
-  /*                                                                       */
-  typedef unsigned short  FT_UShort;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_Int                                                             */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A typedef for the int type.                                        */
-  /*                                                                       */
-  typedef int  FT_Int;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_UInt                                                            */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A typedef for the unsigned int type.                               */
-  /*                                                                       */
-  typedef unsigned int  FT_UInt;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_Long                                                            */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A typedef for signed long.                                         */
-  /*                                                                       */
-  typedef signed long  FT_Long;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_ULong                                                           */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A typedef for unsigned long.                                       */
-  /*                                                                       */
-  typedef unsigned long  FT_ULong;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_F2Dot14                                                         */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A signed 2.14 fixed float type used for unit vectors.              */
-  /*                                                                       */
-  typedef signed short  FT_F2Dot14;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_F26Dot6                                                         */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A signed 26.6 fixed float type used for vectorial pixel            */
-  /*    coordinates.                                                       */
-  /*                                                                       */
-  typedef signed long  FT_F26Dot6;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_Fixed                                                           */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This type is used to store 16.16 fixed float values, like scales   */
-  /*    or matrix coefficients.                                            */
-  /*                                                                       */
-  typedef signed long  FT_Fixed;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_Error                                                           */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    The FreeType error code type.  A value of 0 is always interpreted  */
-  /*    as a successful operation.                                         */
-  /*                                                                       */
-  typedef int  FT_Error;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_Pointer                                                         */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A simple typedef for a typeless pointer.                           */
-  /*                                                                       */
-  typedef void*  FT_Pointer;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_Offset                                                          */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This is equivalent to the ANSI C `size_t' type, i.e. the largest   */
-  /*    _unsigned_ integer type used to express a file size or position,   */
-  /*    or a memory block size.                                            */
-  /*                                                                       */
-  typedef size_t  FT_Offset;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_PtrDist                                                         */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This is equivalent to the ANSI C `ptrdiff_t' type, i.e. the        */
-  /*    largest _signed_ integer type used to express the distance         */
-  /*    between two pointers.                                              */
-  /*                                                                       */
-  typedef size_t  FT_PtrDist;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_UnitVector                                                      */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A simple structure used to store a 2D vector unit vector.  Uses    */
-  /*    FT_F2Dot14 types.                                                  */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    x :: Horizontal coordinate.                                        */
-  /*                                                                       */
-  /*    y :: Vertical coordinate.                                          */
-  /*                                                                       */
-  typedef struct  FT_UnitVector_
-  {
-    FT_F2Dot14  x;
-    FT_F2Dot14  y;
-
-  } FT_UnitVector;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_Matrix                                                          */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A simple structure used to store a 2x2 matrix.  Coefficients are   */
-  /*    in 16.16 fixed float format.  The computation performed is:        */
-  /*                                                                       */
-  /*       {                                                               */
-  /*          x' = x*xx + y*xy                                             */
-  /*          y' = x*yx + y*yy                                             */
-  /*       }                                                               */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    xx :: Matrix coefficient.                                          */
-  /*                                                                       */
-  /*    xy :: Matrix coefficient.                                          */
-  /*                                                                       */
-  /*    yx :: Matrix coefficient.                                          */
-  /*                                                                       */
-  /*    yy :: Matrix coefficient.                                          */
-  /*                                                                       */
-  typedef struct  FT_Matrix_
-  {
-    FT_Fixed  xx, xy;
-    FT_Fixed  yx, yy;
-
-  } FT_Matrix;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_Data	                                                           */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Read-only binary data represented as a pointer and a length.       */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    pointer :: The data.                                               */
-  /*                                                                       */
-  /*    length  :: The length of the data in bytes.                        */
-  /*                                                                       */
-  typedef struct  FT_Data_
-  {
-    const FT_Byte*  pointer;
-    FT_Int          length;
-
-  } FT_Data;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    FT_Generic_Finalizer                                               */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Describes a function used to destroy the `client' data of any      */
-  /*    FreeType object.  See the description of the FT_Generic type for   */
-  /*    details of usage.                                                  */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    The address of the FreeType object which is under finalization.    */
-  /*    Its client data is accessed through its `generic' field.           */
-  /*                                                                       */
-  typedef void  (*FT_Generic_Finalizer)(void*  object);
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_Generic                                                         */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Client applications often need to associate their own data to a    */
-  /*    variety of FreeType core objects.  For example, a text layout API  */
-  /*    might want to associate a glyph cache to a given size object.      */
-  /*                                                                       */
-  /*    Most FreeType object contains a `generic' field, of type           */
-  /*    FT_Generic, which usage is left to client applications and font    */
-  /*    servers.                                                           */
-  /*                                                                       */
-  /*    It can be used to store a pointer to client-specific data, as well */
-  /*    as the address of a `finalizer' function, which will be called by  */
-  /*    FreeType when the object is destroyed (for example, the previous   */
-  /*    client example would put the address of the glyph cache destructor */
-  /*    in the `finalizer' field).                                         */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    data      :: A typeless pointer to any client-specified data. This */
-  /*                 field is completely ignored by the FreeType library.  */
-  /*                                                                       */
-  /*    finalizer :: A pointer to a `generic finalizer' function, which    */
-  /*                 will be called when the object is destroyed.  If this */
-  /*                 field is set to NULL, no code will be called.         */
-  /*                                                                       */
-  typedef struct  FT_Generic_
-  {
-    void*                 data;
-    FT_Generic_Finalizer  finalizer;
-
-  } FT_Generic;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Macro>                                                               */
-  /*    FT_MAKE_TAG                                                        */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This macro converts four letter tags which are used to label       */
-  /*    TrueType tables into an unsigned long to be used within FreeType.  */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The produced values *must* be 32bit integers.  Don't redefine this */
-  /*    macro.                                                             */
-  /*                                                                       */
-#define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \
-          ( ( (FT_ULong)_x1 << 24 ) |     \
-            ( (FT_ULong)_x2 << 16 ) |     \
-            ( (FT_ULong)_x3 <<  8 ) |     \
-              (FT_ULong)_x4         )
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*                                                                       */
-  /*                    L I S T   M A N A G E M E N T                      */
-  /*                                                                       */
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    list_processing                                                    */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_ListNode                                                        */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*     Many elements and objects in FreeType are listed through a        */
-  /*     FT_List record (see FT_ListRec).  As its name suggests, a         */
-  /*     FT_ListNode is a handle to a single list element.                 */
-  /*                                                                       */
-  typedef struct FT_ListNodeRec_*  FT_ListNode;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    FT_List                                                            */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A handle to a list record (see FT_ListRec).                        */
-  /*                                                                       */
-  typedef struct FT_ListRec_*  FT_List;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_ListNodeRec                                                     */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure used to hold a single list element.                    */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    prev :: The previous element in the list.  NULL if first.          */
-  /*                                                                       */
-  /*    next :: The next element in the list.  NULL if last.               */
-  /*                                                                       */
-  /*    data :: A typeless pointer to the listed object.                   */
-  /*                                                                       */
-  typedef struct  FT_ListNodeRec_
-  {
-    FT_ListNode  prev;
-    FT_ListNode  next;
-    void*        data;
-
-  } FT_ListNodeRec;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_ListRec                                                         */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure used to hold a simple doubly-linked list.  These are   */
-  /*    used in many parts of FreeType.                                    */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    head :: The head (first element) of doubly-linked list.            */
-  /*                                                                       */
-  /*    tail :: The tail (last element) of doubly-linked list.             */
-  /*                                                                       */
-  typedef struct  FT_ListRec_
-  {
-    FT_ListNode  head;
-    FT_ListNode  tail;
-
-  } FT_ListRec;
-
-
-  /* */
-
-#define FT_IS_EMPTY( list )  ( (list).head == 0 )
-
-  /* return base error code (without module-specific prefix) */
-#define FT_ERROR_BASE( x )    ( (x) & 0xFF )
-
-  /* return module error code */
-#define FT_ERROR_MODULE( x )  ( (x) & 0xFF00U )
-
-#define FT_BOOL( x )  ( (FT_Bool)( x ) )
-
-FT_END_HEADER
-
-#endif /* __FTTYPES_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/ftwinfnt.h b/extra_lib/include/freetype/freetype/ftwinfnt.h
deleted file mode 100644
index 61234d4..0000000
--- a/extra_lib/include/freetype/freetype/ftwinfnt.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftwinfnt.h                                                             */
-/*                                                                         */
-/*    FreeType API for accessing Windows fnt-specific data.                */
-/*                                                                         */
-/*  Copyright 2003 by                                                      */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __FTWINFNT_H__
-#define __FTWINFNT_H__
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-#ifdef FREETYPE_H
-#error "freetype.h of FreeType 1 has been loaded!"
-#error "Please fix the directory search order for header files"
-#error "so that freetype.h of FreeType 2 is found first."
-#endif
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    winfnt_fonts                                                       */
-  /*                                                                       */
-  /* <Title>                                                               */
-  /*    Window FNT Fonts                                                   */
-  /*                                                                       */
-  /* <Abstract>                                                            */
-  /*    Windows FNT specific APIs                                          */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This section contains the declaration of Windows FNT specific      */
-  /*    functions.                                                         */
-  /*                                                                       */
-  /*************************************************************************/
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_WinFNT_HeaderRec_                                               */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Windows FNT Header info.                                           */
-  /*                                                                       */
-  typedef struct  FT_WinFNT_HeaderRec_
-  {
-    FT_UShort  version;
-    FT_ULong   file_size;
-    FT_Byte    copyright[60];
-    FT_UShort  file_type;
-    FT_UShort  nominal_point_size;
-    FT_UShort  vertical_resolution;
-    FT_UShort  horizontal_resolution;
-    FT_UShort  ascent;
-    FT_UShort  internal_leading;
-    FT_UShort  external_leading;
-    FT_Byte    italic;
-    FT_Byte    underline;
-    FT_Byte    strike_out;
-    FT_UShort  weight;
-    FT_Byte    charset;
-    FT_UShort  pixel_width;
-    FT_UShort  pixel_height;
-    FT_Byte    pitch_and_family;
-    FT_UShort  avg_width;
-    FT_UShort  max_width;
-    FT_Byte    first_char;
-    FT_Byte    last_char;
-    FT_Byte    default_char;
-    FT_Byte    break_char;
-    FT_UShort  bytes_per_row;
-    FT_ULong   device_offset;
-    FT_ULong   face_name_offset;
-    FT_ULong   bits_pointer;
-    FT_ULong   bits_offset;
-    FT_Byte    reserved;
-    FT_ULong   flags;
-    FT_UShort  A_space;
-    FT_UShort  B_space;
-    FT_UShort  C_space;
-    FT_UShort  color_table_offset;
-    FT_ULong   reserved1[4];
-
-  } FT_WinFNT_HeaderRec, *FT_WinFNT_Header;
-
-
- /**********************************************************************
-  *
-  * @function:
-  *    FT_Get_WinFNT_Header
-  *
-  * @description:
-  *    Retrieve a Windows FNT font info header.
-  *
-  * @input:
-  *    face    :: A handle to the input face.
-  *
-  * @output:
-  *    aheader :: The WinFNT header.
-  *
-  * @return:
-  *   FreeType error code.  0 means success.
-  *
-  * @note:
-  *   This function only works with Windows FNT faces, returning an error
-  *   otherwise.
-  */
-  FT_EXPORT( FT_Error )
-  FT_Get_WinFNT_Header( FT_Face               face,
-                        FT_WinFNT_HeaderRec  *aheader );
-
-
- /* */
-
-FT_END_HEADER
-
-#endif /* __FTWINFNT_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/ftxf86.h b/extra_lib/include/freetype/freetype/ftxf86.h
deleted file mode 100644
index aa93275..0000000
--- a/extra_lib/include/freetype/freetype/ftxf86.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftxf86.h                                                               */
-/*                                                                         */
-/*    Support functions for X11.                                           */
-/*                                                                         */
-/*  Copyright 2002, 2003 by                                                */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __FTXF86_H__
-#define __FTXF86_H__
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-#ifdef FREETYPE_H
-#error "freetype.h of FreeType 1 has been loaded!"
-#error "Please fix the directory search order for header files"
-#error "so that freetype.h of FreeType 2 is found first."
-#endif
-
-
-FT_BEGIN_HEADER
-
-  /* this comment is intentionally disabled for now, to prevent this       */
-  /* function from appearing in the API Reference.                         */
-
-  /*@***********************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Get_X11_Font_Format                                             */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Return a string describing the format of a given face as an X11    */
-  /*    FONT_PROPERTY.  It should only be used by the FreeType 2 font      */
-  /*    backend of the XFree86 font server.                                */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    face :: Input face handle.                                         */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    Font format string.  NULL in case of error.                        */
-  /*                                                                       */
-  FT_EXPORT_DEF( const char* )
-  FT_Get_X11_Font_Format( FT_Face  face );
-
- /* */
-
-FT_END_HEADER
-
-#endif /* __FTXF86_H__ */
diff --git a/extra_lib/include/freetype/freetype/internal/autohint.h b/extra_lib/include/freetype/freetype/internal/autohint.h
deleted file mode 100644
index 22340af..0000000
--- a/extra_lib/include/freetype/freetype/internal/autohint.h
+++ /dev/null
@@ -1,205 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  autohint.h                                                             */
-/*                                                                         */
-/*    High-level `autohint' module-specific interface (specification).     */
-/*                                                                         */
-/*  Copyright 1996-2001, 2002 by                                           */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* The auto-hinter is used to load and automatically hint glyphs if a    */
-  /* format-specific hinter isn't available.                               */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-#ifndef __AUTOHINT_H__
-#define __AUTOHINT_H__
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* A small technical note regarding automatic hinting in order to        */
-  /* clarify this module interface.                                        */
-  /*                                                                       */
-  /* An automatic hinter might compute two kinds of data for a given face: */
-  /*                                                                       */
-  /* - global hints: Usually some metrics that describe global properties  */
-  /*                 of the face.  It is computed by scanning more or less */
-  /*                 agressively the glyphs in the face, and thus can be   */
-  /*                 very slow to compute (even if the size of global      */
-  /*                 hints is really small).                               */
-  /*                                                                       */
-  /* - glyph hints:  These describe some important features of the glyph   */
-  /*                 outline, as well as how to align them.  They are      */
-  /*                 generally much faster to compute than global hints.   */
-  /*                                                                       */
-  /* The current FreeType auto-hinter does a pretty good job while         */
-  /* performing fast computations for both global and glyph hints.         */
-  /* However, we might be interested in introducing more complex and       */
-  /* powerful algorithms in the future, like the one described in the John */
-  /* D. Hobby paper, which unfortunately requires a lot more horsepower.   */
-  /*                                                                       */
-  /* Because a sufficiently sophisticated font management system would     */
-  /* typically implement an LRU cache of opened face objects to reduce     */
-  /* memory usage, it is a good idea to be able to avoid recomputing       */
-  /* global hints every time the same face is re-opened.                   */
-  /*                                                                       */
-  /* We thus provide the ability to cache global hints outside of the face */
-  /* object, in order to speed up font re-opening time.  Of course, this   */
-  /* feature is purely optional, so most client programs won't even notice */
-  /* it.                                                                   */
-  /*                                                                       */
-  /* I initially thought that it would be a good idea to cache the glyph   */
-  /* hints too.  However, my general idea now is that if you really need   */
-  /* to cache these too, you are simply in need of a new font format,      */
-  /* where all this information could be stored within the font file and   */
-  /* decoded on the fly.                                                   */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-
-FT_BEGIN_HEADER
-
-
-  typedef struct FT_AutoHinterRec_  *FT_AutoHinter;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    FT_AutoHinter_GlobalGetFunc                                        */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Retrieves the global hints computed for a given face object the    */
-  /*    resulting data is dissociated from the face and will survive a     */
-  /*    call to FT_Done_Face().  It must be discarded through the API      */
-  /*    FT_AutoHinter_GlobalDoneFunc().                                    */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    hinter        :: A handle to the source auto-hinter.               */
-  /*                                                                       */
-  /*    face          :: A handle to the source face object.               */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    global_hints  :: A typeless pointer to the global hints.           */
-  /*                                                                       */
-  /*    global_len    :: The size in bytes of the global hints.            */
-  /*                                                                       */
-  typedef void
-  (*FT_AutoHinter_GlobalGetFunc)( FT_AutoHinter  hinter,
-                                  FT_Face        face,
-                                  void**         global_hints,
-                                  long*          global_len );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    FT_AutoHinter_GlobalDoneFunc                                       */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Discards the global hints retrieved through                        */
-  /*    FT_AutoHinter_GlobalGetFunc().  This is the only way these hints   */
-  /*    are freed from memory.                                             */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    hinter :: A handle to the auto-hinter module.                      */
-  /*                                                                       */
-  /*    global :: A pointer to retrieved global hints to discard.          */
-  /*                                                                       */
-  typedef void
-  (*FT_AutoHinter_GlobalDoneFunc)( FT_AutoHinter  hinter,
-                                   void*          global );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    FT_AutoHinter_GlobalResetFunc                                      */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This function is used to recompute the global metrics in a given   */
-  /*    font.  This is useful when global font data changes (e.g. Multiple */
-  /*    Masters fonts where blend coordinates change).                     */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    hinter :: A handle to the source auto-hinter.                      */
-  /*                                                                       */
-  /*    face   :: A handle to the face.                                    */
-  /*                                                                       */
-  typedef void
-  (*FT_AutoHinter_GlobalResetFunc)( FT_AutoHinter  hinter,
-                                    FT_Face        face );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    FT_AutoHinter_GlyphLoadFunc                                        */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This function is used to load, scale, and automatically hint a     */
-  /*    glyph from a given face.                                           */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    face        :: A handle to the face.                               */
-  /*                                                                       */
-  /*    glyph_index :: The glyph index.                                    */
-  /*                                                                       */
-  /*    load_flags  :: The load flags.                                     */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    This function is capable of loading composite glyphs by hinting    */
-  /*    each sub-glyph independently (which improves quality).             */
-  /*                                                                       */
-  /*    It will call the font driver with FT_Load_Glyph(), with            */
-  /*    FT_LOAD_NO_SCALE set.                                              */
-  /*                                                                       */
-  typedef FT_Error
-  (*FT_AutoHinter_GlyphLoadFunc)( FT_AutoHinter  hinter,
-                                  FT_GlyphSlot   slot,
-                                  FT_Size        size,
-                                  FT_UInt        glyph_index,
-                                  FT_Int32       load_flags );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_AutoHinter_ServiceRec                                           */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    The auto-hinter module's interface.                                */
-  /*                                                                       */
-  typedef struct  FT_AutoHinter_ServiceRec_
-  {
-    FT_AutoHinter_GlobalResetFunc  reset_face;
-    FT_AutoHinter_GlobalGetFunc    get_global_hints;
-    FT_AutoHinter_GlobalDoneFunc   done_global_hints;
-    FT_AutoHinter_GlyphLoadFunc    load_glyph;
-
-  } FT_AutoHinter_ServiceRec, *FT_AutoHinter_Service;
-
-
-FT_END_HEADER
-
-#endif /* __AUTOHINT_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/internal/bdftypes.h b/extra_lib/include/freetype/freetype/internal/bdftypes.h
deleted file mode 100644
index 3a1ec64..0000000
--- a/extra_lib/include/freetype/freetype/internal/bdftypes.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*  bdftypes.h
-
-  FreeType font driver for bdf fonts
-
-  Copyright (C) 2001, 2002 by
-  Francesco Zappa Nardelli
-
-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 __BDFTYPES_H__
-#define __BDFTYPES_H__
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_BDF_H
-
-
-FT_BEGIN_HEADER
-
-
-  typedef struct  BDF_Public_FaceRec_
-  {
-    FT_FaceRec  root;
-
-    char*       charset_encoding;
-    char*       charset_registry;
-
-  } BDF_Public_FaceRec, *BDF_Public_Face;
-
-
-  typedef FT_Error  (*BDF_GetPropertyFunc)( FT_Face           face,
-                                            const char*       prop_name,
-                                            BDF_PropertyRec  *aproperty );
-
-FT_END_HEADER
-
-
-#endif  /* __BDFTYPES_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/internal/cfftypes.h b/extra_lib/include/freetype/freetype/internal/cfftypes.h
deleted file mode 100644
index e19e593..0000000
--- a/extra_lib/include/freetype/freetype/internal/cfftypes.h
+++ /dev/null
@@ -1,256 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  cfftypes.h                                                             */
-/*                                                                         */
-/*    Basic OpenType/CFF type definitions and interface (specification     */
-/*    only).                                                               */
-/*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003 by                                     */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __CFFTYPES_H__
-#define __CFFTYPES_H__
-
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    CFF_IndexRec                                                       */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure used to model a CFF Index table.                       */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    stream      :: The source input stream.                            */
-  /*                                                                       */
-  /*    count       :: The number of elements in the index.                */
-  /*                                                                       */
-  /*    off_size    :: The size in bytes of object offsets in index.       */
-  /*                                                                       */
-  /*    data_offset :: The position of first data byte in the index's      */
-  /*                   bytes.                                              */
-  /*                                                                       */
-  /*    offsets     :: A table of element offsets in the index.            */
-  /*                                                                       */
-  /*    bytes       :: If the index is loaded in memory, its bytes.        */
-  /*                                                                       */
-  typedef struct  CFF_IndexRec_
-  {
-    FT_Stream  stream;
-    FT_UInt    count;
-    FT_Byte    off_size;
-    FT_ULong   data_offset;
-
-    FT_ULong*  offsets;
-    FT_Byte*   bytes;
-
-  } CFF_IndexRec, *CFF_Index;
-
-
-  typedef struct  CFF_EncodingRec_
-  {
-    FT_UInt     format;
-    FT_ULong    offset;
-
-    FT_UInt     count;
-    FT_UShort   sids [256];  /* avoid dynamic allocations */
-    FT_UShort   codes[256];
-
-  } CFF_EncodingRec, *CFF_Encoding;
-
-
-  typedef struct  CFF_CharsetRec_
-  {
-
-    FT_UInt     format;
-    FT_ULong    offset;
-
-    FT_UShort*  sids;
-
-  } CFF_CharsetRec, *CFF_Charset;
-
-
-  typedef struct  CFF_FontRecDictRec_
-  {
-    FT_UInt    version;
-    FT_UInt    notice;
-    FT_UInt    copyright;
-    FT_UInt    full_name;
-    FT_UInt    family_name;
-    FT_UInt    weight;
-    FT_Bool    is_fixed_pitch;
-    FT_Fixed   italic_angle;
-    FT_Fixed   underline_position;
-    FT_Fixed   underline_thickness;
-    FT_Int     paint_type;
-    FT_Int     charstring_type;
-    FT_Matrix  font_matrix;
-    FT_UShort  units_per_em;
-    FT_Vector  font_offset;
-    FT_ULong   unique_id;
-    FT_BBox    font_bbox;
-    FT_Pos     stroke_width;
-    FT_ULong   charset_offset;
-    FT_ULong   encoding_offset;
-    FT_ULong   charstrings_offset;
-    FT_ULong   private_offset;
-    FT_ULong   private_size;
-    FT_Long    synthetic_base;
-    FT_UInt    embedded_postscript;
-    FT_UInt    base_font_name;
-    FT_UInt    postscript;
-
-    /* these should only be used for the top-level font dictionary */
-    FT_UInt    cid_registry;
-    FT_UInt    cid_ordering;
-    FT_ULong   cid_supplement;
-
-    FT_Long    cid_font_version;
-    FT_Long    cid_font_revision;
-    FT_Long    cid_font_type;
-    FT_Long    cid_count;
-    FT_ULong   cid_uid_base;
-    FT_ULong   cid_fd_array_offset;
-    FT_ULong   cid_fd_select_offset;
-    FT_UInt    cid_font_name;
-
-  } CFF_FontRecDictRec, *CFF_FontRecDict;
-
-
-  typedef struct  CFF_PrivateRec_
-  {
-    FT_Byte   num_blue_values;
-    FT_Byte   num_other_blues;
-    FT_Byte   num_family_blues;
-    FT_Byte   num_family_other_blues;
-
-    FT_Pos    blue_values[14];
-    FT_Pos    other_blues[10];
-    FT_Pos    family_blues[14];
-    FT_Pos    family_other_blues[10];
-
-    FT_Fixed  blue_scale;
-    FT_Pos    blue_shift;
-    FT_Pos    blue_fuzz;
-    FT_Pos    standard_width;
-    FT_Pos    standard_height;
-
-    FT_Byte   num_snap_widths;
-    FT_Byte   num_snap_heights;
-    FT_Pos    snap_widths[13];
-    FT_Pos    snap_heights[13];
-    FT_Bool   force_bold;
-    FT_Fixed  force_bold_threshold;
-    FT_Int    lenIV;
-    FT_Int    language_group;
-    FT_Fixed  expansion_factor;
-    FT_Long   initial_random_seed;
-    FT_ULong  local_subrs_offset;
-    FT_Pos    default_width;
-    FT_Pos    nominal_width;
-
-  } CFF_PrivateRec, *CFF_Private;
-
-
-  typedef struct  CFF_FDSelectRec_
-  {
-    FT_Byte   format;
-    FT_UInt   range_count;
-
-    /* that's the table, taken from the file `as is' */
-    FT_Byte*  data;
-    FT_UInt   data_size;
-
-    /* small cache for format 3 only */
-    FT_UInt   cache_first;
-    FT_UInt   cache_count;
-    FT_Byte   cache_fd;
-
-  } CFF_FDSelectRec, *CFF_FDSelect;
-
-
-  /* A SubFont packs a font dict and a private dict together.  They are */
-  /* needed to support CID-keyed CFF fonts.                             */
-  typedef struct  CFF_SubFontRec_
-  {
-    CFF_FontRecDictRec  font_dict;
-    CFF_PrivateRec      private_dict;
-
-    CFF_IndexRec        local_subrs_index;
-    FT_UInt             num_local_subrs;
-    FT_Byte**           local_subrs;
-
-  } CFF_SubFontRec, *CFF_SubFont;
-
-
-  /* maximum number of sub-fonts in a CID-keyed file */
-#define CFF_MAX_CID_FONTS  16
-
-
-  typedef struct  CFF_FontRec_
-  {
-    FT_Stream        stream;
-    FT_Memory        memory;
-    FT_UInt          num_faces;
-    FT_UInt          num_glyphs;
-
-    FT_Byte          version_major;
-    FT_Byte          version_minor;
-    FT_Byte          header_size;
-    FT_Byte          absolute_offsize;
-
-
-    CFF_IndexRec     name_index;
-    CFF_IndexRec     top_dict_index;
-    CFF_IndexRec     string_index;
-    CFF_IndexRec     global_subrs_index;
-
-    CFF_EncodingRec  encoding;
-    CFF_CharsetRec   charset;
-
-    CFF_IndexRec     charstrings_index;
-    CFF_IndexRec     font_dict_index;
-    CFF_IndexRec     private_index;
-    CFF_IndexRec     local_subrs_index;
-
-    FT_String*       font_name;
-    FT_UInt          num_global_subrs;
-    FT_Byte**        global_subrs;
-
-    CFF_SubFontRec   top_font;
-    FT_UInt          num_subfonts;
-    CFF_SubFont      subfonts[CFF_MAX_CID_FONTS];
-
-    CFF_FDSelectRec  fd_select;
-
-    /* interface to PostScript hinter */
-    void*            pshinter;
-
-    /* interface to Postscript Names service */
-    void*            psnames;
-
-  } CFF_FontRec, *CFF_Font;
-
-
-FT_END_HEADER
-
-#endif /* __CFFTYPES_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/internal/fnttypes.h b/extra_lib/include/freetype/freetype/internal/fnttypes.h
deleted file mode 100644
index 3efa860..0000000
--- a/extra_lib/include/freetype/freetype/internal/fnttypes.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  fnttypes.h                                                             */
-/*                                                                         */
-/*    Basic Windows FNT/FON type definitions and interface (specification  */
-/*    only).                                                               */
-/*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003 by                                     */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __FNTTYPES_H__
-#define __FNTTYPES_H__
-
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_WINFONTS_H
-
-
-FT_BEGIN_HEADER
-
-
-  typedef struct  WinMZ_HeaderRec_
-  {
-    FT_UShort  magic;
-    /* skipped content */
-    FT_UShort  lfanew;
-
-  } WinMZ_HeaderRec;
-
-
-  typedef struct  WinNE_HeaderRec_
-  {
-    FT_UShort  magic;
-    /* skipped content */
-    FT_UShort  resource_tab_offset;
-    FT_UShort  rname_tab_offset;
-
-  } WinNE_HeaderRec;
-
-
-  typedef struct  WinNameInfoRec_
-  {
-    FT_UShort  offset;
-    FT_UShort  length;
-    FT_UShort  flags;
-    FT_UShort  id;
-    FT_UShort  handle;
-    FT_UShort  usage;
-
-  } WinNameInfoRec;
-
-
-  typedef struct  WinResourceInfoRec_
-  {
-    FT_UShort  type_id;
-    FT_UShort  count;
-
-  } WinResourceInfoRec;
-
-
-#define WINFNT_MZ_MAGIC  0x5A4D
-#define WINFNT_NE_MAGIC  0x454E
-
-
-  typedef struct  FNT_FontRec_
-  {
-    FT_ULong             offset;
-    FT_Int               size_shift;
-
-    FT_WinFNT_HeaderRec  header;
-
-    FT_Byte*             fnt_frame;
-    FT_ULong             fnt_size;
-
-  } FNT_FontRec, *FNT_Font;
-
-
-  typedef struct  FNT_FaceRec_
-  {
-    FT_FaceRec     root;
-    FNT_Font       font;
-
-    FT_CharMap     charmap_handle;
-    FT_CharMapRec  charmap;  /* a single charmap per face */
-
-  } FNT_FaceRec, *FNT_Face;
-
-
-FT_END_HEADER
-
-#endif /* __FNTTYPES_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/internal/ftcalc.h b/extra_lib/include/freetype/freetype/internal/ftcalc.h
deleted file mode 100644
index af1f640..0000000
--- a/extra_lib/include/freetype/freetype/internal/ftcalc.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftcalc.h                                                               */
-/*                                                                         */
-/*    Arithmetic computations (specification).                             */
-/*                                                                         */
-/*  Copyright 1996-2001, 2002 by                                           */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __FTCALC_H__
-#define __FTCALC_H__
-
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-
-FT_BEGIN_HEADER
-
-
-  FT_EXPORT( FT_Int32 )  FT_SqrtFixed( FT_Int32  x );
-
-
-#define SQRT_32( x )  FT_Sqrt32( x )
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Sqrt32                                                          */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Computes the square root of an Int32 integer (which will be        */
-  /*    handled as an unsigned long value).                                */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    x :: The value to compute the root for.                            */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    The result of `sqrt(x)'.                                           */
-  /*                                                                       */
-  FT_EXPORT( FT_Int32 )
-  FT_Sqrt32( FT_Int32  x );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* FT_MulDiv() and FT_MulFix() are declared in freetype.h.               */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-#define INT_TO_F26DOT6( x )    ( (FT_Long)(x) << 6  )
-#define INT_TO_F2DOT14( x )    ( (FT_Long)(x) << 14 )
-#define INT_TO_FIXED( x )      ( (FT_Long)(x) << 16 )
-#define F2DOT14_TO_FIXED( x )  ( (FT_Long)(x) << 2  )
-#define FLOAT_TO_FIXED( x )    ( (FT_Long)( x * 65536.0 ) )
-
-#define ROUND_F26DOT6( x )     ( x >= 0 ? (    ( (x) + 32 ) & -64 )     \
-                                        : ( -( ( 32 - (x) ) & -64 ) ) )
-
-
-FT_END_HEADER
-
-#endif /* __FTCALC_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/internal/ftcore.h b/extra_lib/include/freetype/freetype/internal/ftcore.h
deleted file mode 100644
index 3c3c94f..0000000
--- a/extra_lib/include/freetype/freetype/internal/ftcore.h
+++ /dev/null
@@ -1,185 +0,0 @@
-#ifndef __FT_CORE_H__
-#define __FT_CORE_H__
-
-#include <ft2build.h>
-#include FT_TYPES_H
-#include FT_SYSTEM_MEMORY_H
-
-FT_BEGIN_HEADER
-
- /**************************************************************************/
- /**************************************************************************/
- /*****                                                                *****/
- /*****                  C L E A N U P   S T A C K                     *****/
- /*****                                                                *****/
- /**************************************************************************/
- /**************************************************************************/
-
-
- /************************************************************************
-  *
-  * @functype: FT_CleanupFunc
-  *
-  * @description:
-  *   a function used to cleanup a given item on the cleanup stack
-  *
-  * @input:
-  *   item      :: target item pointer
-  *   item_data :: optional argument to cleanup routine
-  */
-  typedef void  (*FT_CleanupFunc)( FT_Pointer  item,
-                                   FT_Pointer  item_data );
-
-
-
- /************************************************************************
-  *
-  * @type: FT_XHandler
-  *
-  * @description:
-  *   handle to an exception-handler structure for the FreeType
-  *   exception sub-system
-  *
-  * @note:
-  *   exception handlers are allocated on the stack within a
-  *   @FT_XTRY macro. Do not try to access them directly.
-  */
-  typedef struct FT_XHandlerRec_*  FT_XHandler;
-
-
-/* the size of a cleanup chunk in bytes is FT_CLEANUP_CHUNK_SIZE*12 + 4 */
-/* this must be a small power of 2 whenever possible..                  */
-/*                                                                      */
-/* with a value of 5, we have a byte size of 64 bytes per chunk..       */
-/*                                                                      */
-#define  FT_CLEANUP_CHUNK_SIZE   5
-
-
-
-  typedef struct FT_CleanupItemRec_
-  {
-    FT_Pointer      item;
-    FT_CleanupFunc  item_func;
-    FT_Pointer      item_data;
-
-  } FT_CleanupItemRec;
-
-
-  typedef struct FT_CleanupChunkRec_*   FT_CleanupChunk;
-
-  typedef struct FT_CleanupChunkRec_
-  {
-    FT_CleanupChunk    link;
-    FT_CleanupItemRec  items[ FT_CLEANUP_CHUNK_SIZE ];
-
-  } FT_CleanupChunkRec;
-
-
-  typedef struct FT_CleanupStackRec_
-  {
-    FT_CleanupItem     top;
-    FT_CleanupItem     limit;
-    FT_CleanupChunk    chunk;
-    FT_CleanupChunkRec chunk_0;  /* avoids stupid dynamic allocation */
-    FT_Memory          memory;
-
-  } FT_CleanupStackRec, *FT_CleanupStack;
-
-
-  FT_BASE( void )
-  ft_cleanup_stack_push( FT_CleanupStack  stack,
-                         FT_Pointer       item,
-                         FT_CleanupFunc   item_func,
-                         FT_Pointer       item_data );
-
-  FT_BASE( void )
-  ft_cleanup_stack_pop( FT_CleanupStack   stack,
-                        FT_Int            destroy );
-
-  FT_BASE( FT_CleanupItem )
-  ft_cleanup_stack_peek( FT_CleanupStack  stack );
-
-  FT_BASE( void )
-  ft_cleanup_throw( FT_CleanupStack  stack,
-                    FT_Error         error );
-
-
-
- /**************************************************************************/
- /**************************************************************************/
- /*****                                                                *****/
- /*****                 M E M O R Y   M A N A G E R                    *****/
- /*****                                                                *****/
- /**************************************************************************/
- /**************************************************************************/
-
-  typedef struct FT_MemoryRec_
-  {
-    FT_Memory_AllocFunc     mem_alloc;   /* shortcut to funcs->mem_alloc */
-    FT_Memory_FreeFunc      mem_free;    /* shortcut to funcs->mem_free  */
-    FT_Pointer              mem_data;
-    const FT_Memory_Funcs   mem_funcs;
-
-    FT_CleanupStackRec      cleanup_stack;
-    FT_Pointer              meta_class;
-
-  } FT_MemoryRec;
-
-
-#define  FT_MEMORY(x)  ((FT_Memory)(x))
-#define  FT_MEMORY__ALLOC(x)       FT_MEMORY(x)->mem_alloc
-#define  FT_MEMORY__FREE(x)        FT_MEMORY(x)->mem_free
-#define  FT_MEMORY__REALLOC(x)     FT_MEMORY(x)->mem_funcs->mem_realloc
-#define  FT_MEMORY__CLEANUP(x)     (&FT_MEMORY(x)->cleanup_stack)
-#define  FT_MEMORY__META_CLASS(x)  ((FT_MetaClass)(FT_MEMORY(x)->meta_class))
-
-
- /**************************************************************************/
- /**************************************************************************/
- /*****                                                                *****/
- /*****             E X C E P T I O N   H A N D L I N G                *****/
- /*****                                                                *****/
- /**************************************************************************/
- /**************************************************************************/
-
-
- /************************************************************************
-  *
-  * @struct: FT_XHandlerRec
-  *
-  * @description:
-  *   exception handler structure
-  *
-  * @fields:
-  *   previous   :: previous handler in chain.
-  *   jum_buffer :: processor state used by setjmp/longjmp to implement
-  *                 exception control transfer
-  *   error      :: exception error code
-  *   mark       :: top of cleanup stack when @FT_XTRY is used
-  */
-  typedef struct FT_XHandlerRec_
-  {
-    FT_XHandler        previous;
-    ft_jmp_buf         jump_buffer;
-    volatile FT_Error  error;
-    FT_Pointer         mark;
-
-  } FT_XHandlerRec;
-
-  FT_BASE( void )
-  ft_xhandler_enter( FT_XHandler  xhandler,
-                     FT_Memory    memory );
-
-  FT_BASE( void )
-  ft_xhandler_exit( FT_XHandler  xhandler );
-
-
-
-
-
-
-
-
-FT_END_HEADER
-
-#endif /* __FT_CORE_H__ */
diff --git a/extra_lib/include/freetype/freetype/internal/ftdebug.h b/extra_lib/include/freetype/freetype/internal/ftdebug.h
deleted file mode 100644
index 129c91f..0000000
--- a/extra_lib/include/freetype/freetype/internal/ftdebug.h
+++ /dev/null
@@ -1,196 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftdebug.h                                                              */
-/*                                                                         */
-/*    Debugging and logging component (specification).                     */
-/*                                                                         */
-/*  Copyright 1996-2001, 2002 by                                           */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/*                                                                         */
-/*  IMPORTANT: A description of FreeType's debugging support can be        */
-/*             found in "docs/DEBUG.TXT".  Read it if you need to use or   */
-/*             understand this code.                                       */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __FTDEBUG_H__
-#define __FTDEBUG_H__
-
-
-#include <ft2build.h>
-#include FT_CONFIG_CONFIG_H
-
-
-FT_BEGIN_HEADER
-
-
-  /* force the definition of FT_DEBUG_LEVEL_ERROR if FT_DEBUG_LEVEL_TRACE */
-  /* is already defined; this simplifies the following #ifdefs            */
-  /*                                                                      */
-#ifdef FT_DEBUG_LEVEL_TRACE
-#undef  FT_DEBUG_LEVEL_ERROR
-#define FT_DEBUG_LEVEL_ERROR
-#endif
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Define the trace enums as well as the trace levels array when they    */
-  /* are needed.                                                           */
-  /*                                                                       */
-  /*************************************************************************/
-
-#ifdef FT_DEBUG_LEVEL_TRACE
-
-#define FT_TRACE_DEF( x )  trace_ ## x ,
-
-  /* defining the enumeration */
-  typedef enum
-  {
-#include FT_INTERNAL_TRACE_H
-    trace_count
-
-  } FT_Trace;
-
-
-  /* defining the array of trace levels, provided by `src/base/ftdebug.c' */
-  extern int  ft_trace_levels[trace_count];
-
-#undef FT_TRACE_DEF
-
-#endif /* FT_DEBUG_LEVEL_TRACE */
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Define the FT_TRACE macro                                             */
-  /*                                                                       */
-  /* IMPORTANT!                                                            */
-  /*                                                                       */
-  /* Each component must define the macro FT_COMPONENT to a valid FT_Trace */
-  /* value before using any TRACE macro.                                   */
-  /*                                                                       */
-  /*************************************************************************/
-
-#ifdef FT_DEBUG_LEVEL_TRACE
-
-#define FT_TRACE( level, varformat )                      \
-          do                                              \
-          {                                               \
-            if ( ft_trace_levels[FT_COMPONENT] >= level ) \
-              FT_Message varformat;                       \
-          } while ( 0 )
-
-#else /* !FT_DEBUG_LEVEL_TRACE */
-
-#define FT_TRACE( level, varformat )  do ; while ( 0 )      /* nothing */
-
-#endif /* !FT_DEBUG_LEVEL_TRACE */
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* You need two opening resp. closing parentheses!                       */
-  /*                                                                       */
-  /* Example: FT_TRACE0(( "Value is %i", foo ))                            */
-  /*                                                                       */
-  /*************************************************************************/
-
-#define FT_TRACE0( varformat )  FT_TRACE( 0, varformat )
-#define FT_TRACE1( varformat )  FT_TRACE( 1, varformat )
-#define FT_TRACE2( varformat )  FT_TRACE( 2, varformat )
-#define FT_TRACE3( varformat )  FT_TRACE( 3, varformat )
-#define FT_TRACE4( varformat )  FT_TRACE( 4, varformat )
-#define FT_TRACE5( varformat )  FT_TRACE( 5, varformat )
-#define FT_TRACE6( varformat )  FT_TRACE( 6, varformat )
-#define FT_TRACE7( varformat )  FT_TRACE( 7, varformat )
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /*  Define the FT_ERROR macro                                            */
-  /*                                                                       */
-  /*************************************************************************/
-
-#ifdef FT_DEBUG_LEVEL_ERROR
-
-#define FT_ERROR( varformat )  FT_Message  varformat
-
-#else  /* !FT_DEBUG_LEVEL_ERROR */
-
-#define FT_ERROR( varformat )  do ; while ( 0 )      /* nothing */
-
-#endif /* !FT_DEBUG_LEVEL_ERROR */
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Define the FT_ASSERT macro                                            */
-  /*                                                                       */
-  /*************************************************************************/
-
-#ifdef FT_DEBUG_LEVEL_ERROR
-
-#define FT_ASSERT( condition )                                      \
-          do                                                        \
-          {                                                         \
-            if ( !( condition ) )                                   \
-              FT_Panic( "assertion failed on line %d of file %s\n", \
-                        __LINE__, __FILE__ );                       \
-          } while ( 0 )
-
-#else /* !FT_DEBUG_LEVEL_ERROR */
-
-#define FT_ASSERT( condition )  do ; while ( 0 )
-
-#endif /* !FT_DEBUG_LEVEL_ERROR */
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /*  Define 'FT_Message' and 'FT_Panic' when needed                       */
-  /*                                                                       */
-  /*************************************************************************/
-
-#ifdef FT_DEBUG_LEVEL_ERROR
-
-#include "stdio.h"  /* for vprintf() */
-
-  /* print a message */
-  FT_EXPORT( void )
-  FT_Message( const char*  fmt, ... );
-
-  /* print a message and exit */
-  FT_EXPORT( void )
-  FT_Panic( const char*  fmt, ... );
-
-#endif /* FT_DEBUG_LEVEL_ERROR */
-
-
-  FT_BASE( void )
-  ft_debug_init( void );
-
-
-#if defined( _MSC_VER )      /* Visual C++ (and Intel C++) */
-
-  /* we disable the warning `conditional expression is constant' here */
-  /* in order to compile cleanly with the maximum level of warnings   */
-#pragma warning( disable : 4127 )
-
-#endif /* _MSC_VER */
-
-
-FT_END_HEADER
-
-#endif /* __FTDEBUG_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/internal/ftdriver.h b/extra_lib/include/freetype/freetype/internal/ftdriver.h
deleted file mode 100644
index 1f1c55a..0000000
--- a/extra_lib/include/freetype/freetype/internal/ftdriver.h
+++ /dev/null
@@ -1,202 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftdriver.h                                                             */
-/*                                                                         */
-/*    FreeType font driver interface (specification).                      */
-/*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003 by                                     */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __FTDRIVER_H__
-#define __FTDRIVER_H__
-
-
-#include <ft2build.h>
-#include FT_MODULE_H
-
-
-FT_BEGIN_HEADER
-
-
-  typedef FT_Error
-  (*FT_Face_InitFunc)( FT_Stream      stream,
-                       FT_Face        face,
-                       FT_Int         typeface_index,
-                       FT_Int         num_params,
-                       FT_Parameter*  parameters );
-
-  typedef void
-  (*FT_Face_DoneFunc)( FT_Face  face );
-
-
-  typedef FT_Error
-  (*FT_Size_InitFunc)( FT_Size  size );
-
-  typedef void
-  (*FT_Size_DoneFunc)( FT_Size  size );
-
-
-  typedef FT_Error
-  (*FT_Slot_InitFunc)( FT_GlyphSlot  slot );
-
-  typedef void
-  (*FT_Slot_DoneFunc)( FT_GlyphSlot  slot );
-
-
-  typedef FT_Error
-  (*FT_Size_ResetPointsFunc)( FT_Size     size,
-                              FT_F26Dot6  char_width,
-                              FT_F26Dot6  char_height,
-                              FT_UInt     horz_resolution,
-                              FT_UInt     vert_resolution );
-
-  typedef FT_Error
-  (*FT_Size_ResetPixelsFunc)( FT_Size  size,
-                              FT_UInt  pixel_width,
-                              FT_UInt  pixel_height );
-
-  typedef FT_Error
-  (*FT_Slot_LoadFunc)( FT_GlyphSlot  slot,
-                       FT_Size       size,
-                       FT_UInt       glyph_index,
-                       FT_Int32      load_flags );
-
-
-  typedef FT_UInt
-  (*FT_CharMap_CharIndexFunc)( FT_CharMap  charmap,
-                               FT_Long     charcode );
-
-  typedef FT_Long
-  (*FT_CharMap_CharNextFunc)( FT_CharMap  charmap,
-                              FT_Long     charcode );
-
-  typedef FT_Error
-  (*FT_Face_GetKerningFunc)( FT_Face     face,
-                             FT_UInt     left_glyph,
-                             FT_UInt     right_glyph,
-                             FT_Vector*  kerning );
-
-
-  typedef FT_Error
-  (*FT_Face_AttachFunc)( FT_Face    face,
-                         FT_Stream  stream );
-
-
-  typedef FT_Error
-  (*FT_Face_GetAdvancesFunc)( FT_Face     face,
-                              FT_UInt     first,
-                              FT_UInt     count,
-                              FT_Bool     vertical,
-                              FT_UShort*  advances );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_Driver_ClassRec                                                 */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    The font driver class.  This structure mostly contains pointers to */
-  /*    driver methods.                                                    */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    root             :: The parent module.                             */
-  /*                                                                       */
-  /*    face_object_size :: The size of a face object in bytes.            */
-  /*                                                                       */
-  /*    size_object_size :: The size of a size object in bytes.            */
-  /*                                                                       */
-  /*    slot_object_size :: The size of a glyph object in bytes.           */
-  /*                                                                       */
-  /*    init_face        :: The format-specific face constructor.          */
-  /*                                                                       */
-  /*    done_face        :: The format-specific face destructor.           */
-  /*                                                                       */
-  /*    init_size        :: The format-specific size constructor.          */
-  /*                                                                       */
-  /*    done_size        :: The format-specific size destructor.           */
-  /*                                                                       */
-  /*    init_slot        :: The format-specific slot constructor.          */
-  /*                                                                       */
-  /*    done_slot        :: The format-specific slot destructor.           */
-  /*                                                                       */
-  /*    set_char_sizes   :: A handle to a function used to set the new     */
-  /*                        character size in points + resolution.  Can be */
-  /*                        set to 0 to indicate default behaviour.        */
-  /*                                                                       */
-  /*    set_pixel_sizes  :: A handle to a function used to set the new     */
-  /*                        character size in pixels.  Can be set to 0 to  */
-  /*                        indicate default behaviour.                    */
-  /*                                                                       */
-  /*    load_glyph       :: A function handle to load a given glyph image  */
-  /*                        in a slot.  This field is mandatory!           */
-  /*                                                                       */
-  /*    get_char_index   :: A function handle to return the glyph index of */
-  /*                        a given character for a given charmap.  This   */
-  /*                        field is mandatory!                            */
-  /*                                                                       */
-  /*    get_kerning      :: A function handle to return the unscaled       */
-  /*                        kerning for a given pair of glyphs.  Can be    */
-  /*                        set to 0 if the format doesn't support         */
-  /*                        kerning.                                       */
-  /*                                                                       */
-  /*    attach_file      :: This function handle is used to read           */
-  /*                        additional data for a face from another        */
-  /*                        file/stream.  For example, this can be used to */
-  /*                        add data from AFM or PFM files on a Type 1     */
-  /*                        face, or a CIDMap on a CID-keyed face.         */
-  /*                                                                       */
-  /*    get_advances     :: A function handle used to return the advances  */
-  /*                        of 'count' glyphs, starting at `index'.  the   */
-  /*                        `vertical' flags must be set when vertical     */
-  /*                        advances are queried.  The advances buffer is  */
-  /*                        caller-allocated.                              */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    Most function pointers, with the exception of `load_glyph' and     */
-  /*    `get_char_index' can be set to 0 to indicate a default behaviour.  */
-  /*                                                                       */
-  typedef struct  FT_Driver_ClassRec_
-  {
-    FT_Module_Class           root;
-
-    FT_Long                   face_object_size;
-    FT_Long                   size_object_size;
-    FT_Long                   slot_object_size;
-
-    FT_Face_InitFunc          init_face;
-    FT_Face_DoneFunc          done_face;
-
-    FT_Size_InitFunc          init_size;
-    FT_Size_DoneFunc          done_size;
-
-    FT_Slot_InitFunc          init_slot;
-    FT_Slot_DoneFunc          done_slot;
-
-    FT_Size_ResetPointsFunc   set_char_sizes;
-    FT_Size_ResetPixelsFunc   set_pixel_sizes;
-
-    FT_Slot_LoadFunc          load_glyph;
-
-    FT_Face_GetKerningFunc    get_kerning;
-    FT_Face_AttachFunc        attach_file;
-    FT_Face_GetAdvancesFunc   get_advances;
-
-  } FT_Driver_ClassRec, *FT_Driver_Class;
-
-
-FT_END_HEADER
-
-#endif /* __FTDRIVER_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/internal/ftexcept.h b/extra_lib/include/freetype/freetype/internal/ftexcept.h
deleted file mode 100644
index 5d20765..0000000
--- a/extra_lib/include/freetype/freetype/internal/ftexcept.h
+++ /dev/null
@@ -1,79 +0,0 @@
-#ifndef __FT_EXCEPT_H__
-#define __FT_EXCEPT_H__
-
-#include <ft2build.h>
-#include FT_INTERNAL_OBJECTS_H
-
-FT_BEGIN_HEADER
-
-
-
- /* I can't find a better place for this for now */
-
-
-/* the size of a cleanup chunk in bytes is FT_CLEANUP_CHUNK_SIZE*12 + 4 */
-/* this must be a small power of 2 whenever possible..                  */
-/*                                                                      */
-/* with a value of 5, we have a byte size of 64 bytes per chunk..       */
-/*                                                                      */
-#define  FT_CLEANUP_CHUNK_SIZE   5
-
-
-
-  typedef struct FT_CleanupItemRec_
-  {
-    FT_Pointer      item;
-    FT_CleanupFunc  item_func;
-    FT_Pointer      item_data;
-
-  } FT_CleanupItemRec;
-
-  typedef struct FT_CleanupChunkRec_*   FT_CleanupChunk;
-  
-  typedef struct FT_CleanupChunkRec_
-  {
-    FT_CleanupChunk    link;
-    FT_CleanupItemRec  items[ FT_CLEANUP_CHUNK_SIZE ];
-
-  } FT_CleanupChunkRec;
-
-
-  typedef struct FT_CleanupStackRec_
-  {
-    FT_CleanupItem     top;
-    FT_CleanupItem     limit;
-    FT_CleanupChunk    chunk;
-    FT_CleanupChunkRec chunk_0;  /* avoids stupid dynamic allocation */
-    FT_Memory          memory;
-
-  } FT_CleanupStackRec, *FT_CleanupStack;
-
-
-  FT_BASE( void )
-  ft_cleanup_stack_push( FT_CleanupStack  stack,
-                         FT_Pointer       item,
-                         FT_CleanupFunc   item_func,
-                         FT_Pointer       item_data );
-
-  FT_BASE( void )
-  ft_cleanup_stack_pop( FT_CleanupStack   stack,
-                        FT_Int            destroy );
-
-  FT_BASE( FT_CleanupItem )
-  ft_cleanup_stack_peek( FT_CleanupStack  stack );
-
-  FT_BASE( void )
-  ft_xhandler_enter( FT_XHandler  xhandler,
-                     FT_Memory    memory );                         
-
-  FT_BASE( void )
-  ft_xhandler_exit( FT_XHandler  xhandler );
-
-
-  FT_BASE( void )
-  ft_cleanup_throw( FT_CleanupStack  stack,
-                    FT_Error         error );
-
-FT_END_HEADER
-
-#endif /* __FT_EXCEPT_H__ */
diff --git a/extra_lib/include/freetype/freetype/internal/ftgloadr.h b/extra_lib/include/freetype/freetype/internal/ftgloadr.h
deleted file mode 100644
index 284f4e3..0000000
--- a/extra_lib/include/freetype/freetype/internal/ftgloadr.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftgloadr.h                                                             */
-/*                                                                         */
-/*    The FreeType glyph loader (specification).                           */
-/*                                                                         */
-/*  Copyright 2002, 2003 by                                                */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg                       */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __FTGLOADR_H__
-#define __FTGLOADR_H__
-
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_GlyphLoader                                                     */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    The glyph loader is an internal object used to load several glyphs */
-  /*    together (for example, in the case of composites).                 */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The glyph loader implementation is not part of the high-level API, */
-  /*    hence the forward structure declaration.                           */
-  /*                                                                       */
-  typedef struct FT_GlyphLoaderRec_*  FT_GlyphLoader ;
-
-
-#define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS          1
-#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES      2
-#define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID        4
-#define FT_SUBGLYPH_FLAG_SCALE                   8
-#define FT_SUBGLYPH_FLAG_XY_SCALE             0x40
-#define FT_SUBGLYPH_FLAG_2X2                  0x80
-#define FT_SUBGLYPH_FLAG_USE_MY_METRICS      0x200
-
-
-  typedef struct  FT_SubGlyphRec_
-  {
-    FT_Int     index;
-    FT_UShort  flags;
-    FT_Int     arg1;
-    FT_Int     arg2;
-    FT_Matrix  transform;
-    
-  } FT_SubGlyphRec;
-
-
-  typedef struct  FT_GlyphLoadRec_
-  {
-    FT_Outline   outline;       /* outline             */
-    FT_Vector*   extra_points;  /* extra points table  */
-    FT_UInt      num_subglyphs; /* number of subglyphs */
-    FT_SubGlyph  subglyphs;     /* subglyphs           */
-
-  } FT_GlyphLoadRec, *FT_GlyphLoad;
-
-
-  typedef struct  FT_GlyphLoaderRec_
-  {
-    FT_Memory        memory;
-    FT_UInt          max_points;
-    FT_UInt          max_contours;
-    FT_UInt          max_subglyphs;
-    FT_Bool          use_extra;
-
-    FT_GlyphLoadRec  base;
-    FT_GlyphLoadRec  current;
-
-    void*            other;            /* for possible future extension? */
-
-  } FT_GlyphLoaderRec;
-
-
-  /* create new empty glyph loader */
-  FT_BASE( FT_Error )
-  FT_GlyphLoader_New( FT_Memory        memory,
-                      FT_GlyphLoader  *aloader );
-
-  /* add an extra points table to a glyph loader */
-  FT_BASE( FT_Error )
-  FT_GlyphLoader_CreateExtra( FT_GlyphLoader  loader );
-
-  /* destroy a glyph loader */
-  FT_BASE( void )
-  FT_GlyphLoader_Done( FT_GlyphLoader  loader );
-
-  /* reset a glyph loader (frees everything int it) */
-  FT_BASE( void )
-  FT_GlyphLoader_Reset( FT_GlyphLoader  loader );
-
-  /* rewind a glyph loader */
-  FT_BASE( void )
-  FT_GlyphLoader_Rewind( FT_GlyphLoader  loader );
-
-  /* check that there is enough room to add 'n_points' and 'n_contours' */
-  /* to the glyph loader                                                */
-  FT_BASE( FT_Error )
-  FT_GlyphLoader_CheckPoints( FT_GlyphLoader  loader,
-                              FT_UInt         n_points,
-                              FT_UInt         n_contours );
-
-  /* check that there is enough room to add 'n_subs' sub-glyphs to */
-  /* a glyph loader                                                */
-  FT_BASE( FT_Error )
-  FT_GlyphLoader_CheckSubGlyphs( FT_GlyphLoader  loader,
-                                 FT_UInt         n_subs );
-
-  /* prepare a glyph loader, i.e. empty the current glyph */
-  FT_BASE( void )
-  FT_GlyphLoader_Prepare( FT_GlyphLoader  loader );
-
-  /* add the current glyph to the base glyph */
-  FT_BASE( void )
-  FT_GlyphLoader_Add( FT_GlyphLoader  loader );
-
-  /* copy points from one glyph loader to another */
-  FT_BASE( FT_Error )
-  FT_GlyphLoader_CopyPoints( FT_GlyphLoader  target,
-                             FT_GlyphLoader  source );
-
- /* */
-
-
-FT_END_HEADER
-
-#endif /* __FTGLOADR_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/internal/fthash.h b/extra_lib/include/freetype/freetype/internal/fthash.h
deleted file mode 100644
index b95b6c9..0000000
--- a/extra_lib/include/freetype/freetype/internal/fthash.h
+++ /dev/null
@@ -1,502 +0,0 @@
-/******************************************************************
- *
- *  fthash.h  - fast dynamic hash tables
- *
- *  Copyright 2002 by
- *  David Turner, Robert Wilhelm, and Werner Lemberg
- *
- *  This file is part of the FreeType project, and may only be used,
- *  modified, and distributed under the terms of the FreeType project
- *  license, LICENSE.TXT.  By continuing to use, modify, or distribute
- *  this file you indicate that you have read the license and
- *  understand and accept it fully.
- *
- *
- *  This header is used to define dynamic hash tables as described
- *  by the article "Main-Memory Linear Hashing - Some Enhancements
- *  of Larson's Algorithm" by Mikael Petterson.
- *
- *  Basically, linear hashing prevents big "stalls" during
- *  resizes of the buckets array by only splitting one bucket
- *  at a time. This ensures excellent response time even when
- *  the table is frequently resized..
- *
- *
- *  Note that the use of the FT_Hash type is rather unusual in order
- *  to be as generic and efficient as possible. See the comments in the
- *  following definitions for more details.
- */
-
-#ifndef __FT_HASH_H__
-#define __FT_HASH_H__
-
-#include <ft2build.h>
-#include FT_TYPES_H
-
-FT_BEGIN_HEADER
-
- /***********************************************************
-  *
-  * @type: FT_Hash
-  *
-  * @description:
-  *   handle to a @FT_HashRec structure used to model a
-  *   dynamic hash table
-  */
-  typedef struct FT_HashRec_*      FT_Hash;
-
-
- /***********************************************************
-  *
-  * @type: FT_HashNode
-  *
-  * @description:
-  *   handle to a @FT_HashNodeRec structure used to model a
-  *   single node of a hash table
-  */
-  typedef struct FT_HashNodeRec_*  FT_HashNode;
-
-
- /***********************************************************
-  *
-  * @type: FT_HashLookup
-  *
-  * @description:
-  *   handle to a @FT_HashNode pointer. This is returned by
-  *   the @ft_hash_lookup function and can later be used by
-  *   @ft_hash_add or @ft_hash_remove
-  */
-  typedef FT_HashNode*     FT_HashLookup;
-
-
- /***********************************************************
-  *
-  * @type: FT_Hash_EqualFunc
-  *
-  * @description:
-  *   a function used to compare two nodes of the hash table
-  *
-  * @input:
-  *   node1 :: handle to first node
-  *   node2 :: handle to second node
-  *
-  * @return:
-  *   1 iff the 'keys' in 'node1' and 'node2' are identical.
-  *   0 otherwise.
-  */
-  typedef FT_Int  (*FT_Hash_EqualFunc)( FT_HashNode  node1,
-                                        FT_HashNode  node2 );
-
-
- /***********************************************************
-  *
-  * @struct: FT_HashRec
-  *
-  * @description:
-  *   a structure used to model a dynamic hash table.
-  *
-  * @fields:
-  *   memory       :: memory manager used to allocate
-  *                   the buckets array and the hash nodes
-  *
-  *   buckets      :: array of hash buckets
-  *
-  *   node_size    :: size of node in bytes
-  *   node_compare :: a function used to compare two nodes
-  *   node_hash    :: a function used to compute the hash
-  *                   value of a given node
-  *   p            ::
-  *   mask         ::
-  *   slack        ::
-  *
-  * @note:
-  *   'p', 'mask' and 'slack' are control values managed by
-  *   the hash table. Do not try to interpret them directly.
-  *
-  *   You can grab the hash table size by calling
-  *   '@ft_hash_get_size'.
-  */
-  typedef struct FT_HashRec_
-  {
-    FT_HashNode*         buckets;
-    FT_UInt              p;
-    FT_UInt              mask;  /* really maxp-1 */
-    FT_Long              slack;
-    FT_Hash_EqualFunc    node_equal;
-    FT_Memory            memory;
-
-  } FT_HashRec;
-
-
- /***********************************************************
-  *
-  * @struct: FT_HashNodeRec
-  *
-  * @description:
-  *   a structure used to model the root fields of a dynamic
-  *   hash table node.
-  *
-  *   it's up to client applications to "sub-class" this
-  *   structure to add relevant (key,value) definitions
-  *
-  * @fields:
-  *   link :: pointer to next node in bucket's collision list
-  *   hash :: 32-bit hash value for this node
-  *
-  * @note:
-  *   it's up to client applications to "sub-class" this structure
-  *   to add relevant (key,value) type definitions. For example,
-  *   if we want to build a "string -> int" mapping, we could use
-  *   something like:
-  *
-  *   {
-  *     typedef struct MyNodeRec_
-  *     {
-  *       FT_HashNodeRec  hnode;
-  *       const char*     key;
-  *       int             value;
-  *
-  *     } MyNodeRec, *MyNode;
-  *   }
-  *
-  */
-  typedef struct FT_HashNodeRec_
-  {
-    FT_HashNode  link;
-    FT_UInt32    hash;
-
-  } FT_HashNodeRec;
-
-
- /****************************************************************
-  *
-  * @function: ft_hash_init
-  *
-  * @description:
-  *   initialize a dynamic hash table
-  *
-  * @input:
-  *   table      :: handle to target hash table structure
-  *   node_equal :: node comparison function
-  *   memory     :: memory manager handle used to allocate the
-  *                 buckets array within the hash table
-  *
-  * @return:
-  *   error code. 0 means success
-  *
-  * @note:
-  *   the node comparison function should only compare node _keys_
-  *   and ignore values !! with good hashing computation (which the
-  *   user must perform itself), the comparison function should be
-  *   pretty seldom called.
-  *
-  *   here is a simple example:
-  *
-  *   {
-  *     static int my_equal( MyNode  node1,
-  *                          MyNode  node2 )
-  *     {
-  *       // compare keys of 'node1' and 'node2'
-  *       return (strcmp( node1->key, node2->key ) == 0);
-  *     }
-  *
-  *     ....
-  *
-  *     ft_hash_init( &hash, (FT_Hash_EqualFunc) my_compare, memory );
-  *     ....
-  *   }
-  */
-  FT_BASE( FT_Error )
-  ft_hash_init( FT_Hash              table,
-                FT_Hash_EqualFunc  compare,
-                FT_Memory            memory );
-
-
- /****************************************************************
-  *
-  * @function: ft_hash_lookup
-  *
-  * @description:
-  *   search a hash table to find a node corresponding to a given
-  *   key.
-  *
-  * @input:
-  *   table   :: handle to target hash table structure
-  *   keynode :: handle to a reference hash node that will be
-  *              only used for key comparisons with the table's
-  *              elements
-  *
-  * @return:
-  *   a pointer-to-hash-node value, which must be used as followed:
-  *
-  *   - if '*result' is NULL, the key wasn't found in the hash
-  *     table. The value of 'result' can be used to add new elements
-  *     through @ft_hash_add however..
-  *
-  *   - if '*result' is not NULL, it's a handle to the first table
-  *     node that corresponds to the search key. The value of 'result'
-  *     can be used to remove this element through @ft_hash_remove
-  *
-  * @note:
-  *   here is an example:
-  *
-  *   {
-  *     // maps a string to an integer with a hash table
-  *     // returns -1 in case of failure
-  *     //
-  *     int  my_lookup( FT_Hash      table,
-  *                     const char*  key )
-  *     {
-  *       MyNode*    pnode;
-  *       MyNodeRec  noderec;
-  *
-  *       // set-up key node. It's 'hash' and 'key' fields must
-  *       // be set correctly.. we ignore 'link' and 'value'
-  *       //
-  *       noderec.hnode.hash = strhash( key );
-  *       noderec.key        = key;
-  *
-  *       // perform search - return value
-  *       //
-  *       pnode = (MyNode) ft_hash_lookup( table, &noderec );
-  *       if ( *pnode )
-  *       {
-  *         // we found it
-  *         return (*pnode)->value;
-  *       }
-  *       return -1;
-  *     }
-  *   }
-  */
-  FT_BASE_DEF( FT_HashLookup )
-  ft_hash_lookup( FT_Hash      table,
-                  FT_HashNode  keynode );
-
-
- /****************************************************************
-  *
-  * @function: ft_hash_add
-  *
-  * @description:
-  *   add a new node to a dynamic hash table. the user must
-  *   call @ft_hash_lookup and allocate a new node before calling
-  *   this function.
-  *
-  * @input:
-  *   table    :: hash table handle
-  *   lookup   :: pointer-to-hash-node value returned by @ft_hash_lookup
-  *   new_node :: handle to new hash node. All its fields must be correctly
-  *               set, including 'hash'.
-  *
-  * @return:
-  *   error code. 0 means success
-  *
-  * @note:
-  *   this function should always be used _after_ a call to @ft_hash_lookup
-  *   that returns a pointer to a NULL  handle. Here's an example:
-  *
-  *   {
-  *     // sets the value corresponding to a given string key
-  *     //
-  *     void  my_set( FT_Hash      table,
-  *                   const char*  key,
-  *                   int          value )
-  *     {
-  *       MyNode*    pnode;
-  *       MyNodeRec  noderec;
-  *       MyNode     node;
-  *
-  *       // set-up key node. It's 'hash' and 'key' fields must
-  *       // be set correctly..
-  *       noderec.hnode.hash = strhash( key );
-  *       noderec.key        = key;
-  *
-  *       // perform search - return value
-  *       pnode = (MyNode) ft_hash_lookup( table, &noderec );
-  *       if ( *pnode )
-  *       {
-  *         // we found it, simply replace the value in the node
-  *         (*pnode)->value = value;
-  *         return;
-  *       }
-  *
-  *       // allocate a new node - and set it up
-  *       node = (MyNode) malloc( sizeof(*node) );
-  *       if ( node == NULL ) .....
-  *
-  *       node->hnode.hash = noderec.hnode.hash;
-  *       node->key        = key;
-  *       node->value      = value;
-  *
-  *       // add it to the hash table
-  *       error = ft_hash_add( table, pnode, node );
-  *       if (error) ....
-  *     }
-  */
-  FT_BASE( FT_Error )
-  ft_hash_add( FT_Hash        table,
-               FT_HashLookup  lookup,
-               FT_HashNode    new_node );
-
-
- /****************************************************************
-  *
-  * @function: ft_hash_remove
-  *
-  * @description:
-  *   try to remove the node corresponding to a given key from
-  *   a hash table. This must be called after @ft_hash_lookup
-  *
-  * @input:
-  *   table   :: hash table handle
-  *   lookup  :: pointer-to-hash-node value returned by @ft_hash_lookup
-  *
-  * @note:
-  *   this function doesn't free the node itself !! Here's an example:
-  *
-  *   {
-  *     // sets the value corresponding to a given string key
-  *     //
-  *     void  my_remove( FT_Hash      table,
-  *                      const char*  key )
-  *     {
-  *       MyNodeRec  noderec;
-  *       MyNode     node;
-  *
-  *       noderec.hnode.hash = strhash(key);
-  *       noderec.key        = key;
-  *       node               = &noderec;
-  *
-  *       pnode = ft_hash_lookup( table, &noderec );
-  *       node  = *pnode;
-  *       if ( node != NULL )
-  *       {
-  *         error = ft_hash_remove( table, pnode );
-  *         if ( !error )
-  *           free( node );
-  *       }
-  *     }
-  *   }
-  */
-  FT_BASE( FT_Error )
-  ft_hash_remove( FT_Hash        table,
-                  FT_HashLookup  lookup );
-
-
-
- /****************************************************************
-  *
-  * @function: ft_hash_get_size
-  *
-  * @description:
-  *   return the number of elements in a given hash table
-  *
-  * @input:
-  *   table   :: handle to target hash table structure
-  *
-  * @return:
-  *   number of elements. 0 if empty
-  */
-  FT_BASE( FT_UInt )
-  ft_hash_get_size( FT_Hash  table );
-
-
-
- /****************************************************************
-  *
-  * @functype: FT_Hash_ForeachFunc
-  *
-  * @description:
-  *   a function used to iterate over all elements of a given
-  *   hash table
-  *
-  * @input:
-  *   node :: handle to target @FT_HashNodeRec node structure
-  *   data :: optional argument to iteration routine
-  *
-  * @also:  @ft_hash_foreach
-  */
-  typedef void  (*FT_Hash_ForeachFunc)( const FT_HashNode  node,
-                                        const FT_Pointer   data );
-
-
- /****************************************************************
-  *
-  * @function: ft_hash_foreach
-  *
-  * @description:
-  *   parse over all elements in a hash table
-  *
-  * @input:
-  *   table        :: handle to target hash table structure
-  *   foreach_func :: iteration routine called for each element
-  *   foreach_data :: optional argument to the iteration routine
-  *
-  * @note:
-  *   this function is often used to release all elements from a
-  *   hash table. See the example given for @ft_hash_done
-  */
-  FT_BASE( void )
-  ft_hash_foreach( FT_Hash              table,
-                   FT_Hash_ForeachFunc  foreach_func,
-                   const FT_Pointer     foreach_data );
-
-
-
- /****************************************************************
-  *
-  * @function: ft_hash_done
-  *
-  * @description:
-  *   finalize a given hash table
-  *
-  * @input:
-  *   table     :: handle to target hash table structure
-  *   node_func :: optional iteration function pointer. this
-  *                can be used to destroy all nodes explicitely
-  *   node_data :: optional argument to the node iterator
-  *
-  * @note:
-  *   this function simply frees the hash table's buckets.
-  *   you probably will need to call @ft_hash_foreach to
-  *   destroy all its elements before @ft_hash_done, as in
-  *   the following example:
-  *
-  *   {
-  *     static void  my_node_clear( const MyNode  node )
-  *     {
-  *       free( node );
-  *     }
-  *
-  *     static void  my_done( FT_Hash  table )
-  *     {
-  *       ft_hash_done( table, (FT_Hash_ForeachFunc) my_node_clear, NULL );
-  *     }
-  *   }
-  */
-  FT_BASE( void )
-  ft_hash_done( FT_Hash              table,
-                FT_Hash_ForeachFunc  item_func,
-                const FT_Pointer     item_data );
-
- /* */
-
- /* compute bucket index from hash value in a dynamic hash table */
- /* this is only used to break encapsulation to speed lookups in */
- /* the FreeType cache manager !!                                */
- /*                                                              */
-
-#define  FT_HASH_COMPUTE_INDEX(_table,_hash,_index)                  \
-             {                                                       \
-               FT_UInt  _mask  = (_table)->mask;                     \
-               FT_UInt  _hash0 = (_hash);                            \
-                                                                     \
-               (_index) = (FT_UInt)( (_hash0) & _mask ) );           \
-               if ( (_index) < (_table)->p )                         \
-                 (_index) = (FT_uInt)( (_hash0) & ( 2*_mask+1 ) );   \
-             }
-
-
-FT_END_HEADER
-
-#endif /* __FT_HASH_H__ */
diff --git a/extra_lib/include/freetype/freetype/internal/ftmemory.h b/extra_lib/include/freetype/freetype/internal/ftmemory.h
deleted file mode 100644
index 8da5fad..0000000
--- a/extra_lib/include/freetype/freetype/internal/ftmemory.h
+++ /dev/null
@@ -1,293 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftmemory.h                                                             */
-/*                                                                         */
-/*    The FreeType memory management macros (specification).               */
-/*                                                                         */
-/*  Copyright 1996-2001, 2002 by                                           */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg                       */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __FTMEMORY_H__
-#define __FTMEMORY_H__
-
-
-#include <ft2build.h>
-#include FT_CONFIG_CONFIG_H
-#include FT_TYPES_H
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Macro>                                                               */
-  /*    FT_SET_ERROR                                                       */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This macro is used to set an implicit `error' variable to a given  */
-  /*    expression's value (usually a function call), and convert it to a  */
-  /*    boolean which is set whenever the value is != 0.                   */
-  /*                                                                       */
-#undef  FT_SET_ERROR
-#define FT_SET_ERROR( expression ) \
-          ( ( error = (expression) ) != 0 )
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /****                                                                 ****/
-  /****                                                                 ****/
-  /****                           M E M O R Y                           ****/
-  /****                                                                 ****/
-  /****                                                                 ****/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-
-#ifdef FT_DEBUG_MEMORY
-
-  FT_BASE( FT_Error )
-  FT_Alloc_Debug( FT_Memory    memory,
-                  FT_Long      size,
-                  void*       *P,
-                  const char*  file_name,
-                  FT_Long      line_no );
-
-  FT_BASE( FT_Error )
-  FT_Realloc_Debug( FT_Memory    memory,
-                    FT_Long      current,
-                    FT_Long      size,
-                    void*       *P,
-                    const char*  file_name,
-                    FT_Long      line_no );
-
-  FT_BASE( void )
-  FT_Free_Debug( FT_Memory    memory,
-                 FT_Pointer   block,
-                 const char*  file_name,
-                 FT_Long      line_no );
-
-#endif
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Alloc                                                           */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Allocates a new block of memory.  The returned area is always      */
-  /*    zero-filled; this is a strong convention in many FreeType parts.   */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    memory :: A handle to a given `memory object' which handles        */
-  /*              allocation.                                              */
-  /*                                                                       */
-  /*    size   :: The size in bytes of the block to allocate.              */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    P      :: A pointer to the fresh new block.  It should be set to   */
-  /*              NULL if `size' is 0, or in case of error.                */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  FT_BASE( FT_Error )
-  FT_Alloc( FT_Memory  memory,
-            FT_Long    size,
-            void*     *P );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Realloc                                                         */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Reallocates a block of memory pointed to by `*P' to `Size' bytes   */
-  /*    from the heap, possibly changing `*P'.                             */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    memory  :: A handle to a given `memory object' which handles       */
-  /*               reallocation.                                           */
-  /*                                                                       */
-  /*    current :: The current block size in bytes.                        */
-  /*                                                                       */
-  /*    size    :: The new block size in bytes.                            */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    P       :: A pointer to the fresh new block.  It should be set to  */
-  /*               NULL if `size' is 0, or in case of error.               */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    All callers of FT_Realloc() _must_ provide the current block size  */
-  /*    as well as the new one.                                            */
-  /*                                                                       */
-  FT_BASE( FT_Error )
-  FT_Realloc( FT_Memory  memory,
-              FT_Long    current,
-              FT_Long    size,
-              void*     *P );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Free                                                            */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Releases a given block of memory allocated through FT_Alloc().     */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    memory :: A handle to a given `memory object' which handles        */
-  /*              memory deallocation                                      */
-  /*                                                                       */
-  /*    P      :: This is the _address_ of a _pointer_ which points to the */
-  /*              allocated block.  It is always set to NULL on exit.      */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    If P or *P is NULL, this function should return successfully.      */
-  /*    This is a strong convention within all of FreeType and its         */
-  /*    drivers.                                                           */
-  /*                                                                       */
-  FT_BASE( void )
-  FT_Free( FT_Memory  memory,
-           void*     *P );
-
-
-#define FT_MEM_SET( dest, byte, count )     ft_memset( dest, byte, count )
-
-#define FT_MEM_COPY( dest, source, count )  ft_memcpy( dest, source, count )
-
-#define FT_MEM_MOVE( dest, source, count )  ft_memmove( dest, source, count )
-
-
-#define FT_MEM_ZERO( dest, count )  FT_MEM_SET( dest, 0, count )
-
-#define FT_ZERO( p )                FT_MEM_ZERO( p, sizeof ( *(p) ) )
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* We first define FT_MEM_ALLOC, FT_MEM_REALLOC, and FT_MEM_FREE.  All   */
-  /* macros use an _implicit_ `memory' parameter to access the current     */
-  /* memory allocator.                                                     */
-  /*                                                                       */
-
-#ifdef FT_DEBUG_MEMORY
-
-#define FT_MEM_ALLOC( _pointer_, _size_ )                            \
-          FT_Alloc_Debug( memory, _size_,                            \
-                          (void**)&(_pointer_), __FILE__, __LINE__ )
-
-#define FT_MEM_REALLOC( _pointer_, _current_, _size_ )                 \
-          FT_Realloc_Debug( memory, _current_, _size_,                 \
-                            (void**)&(_pointer_), __FILE__, __LINE__ )
-
-#define FT_MEM_FREE( _pointer_ )                                            \
-          FT_Free_Debug( memory, (void**)&(_pointer_), __FILE__, __LINE__ )
-
-
-#else  /* !FT_DEBUG_MEMORY */
-
-
-#define FT_MEM_ALLOC( _pointer_, _size_ )                  \
-          FT_Alloc( memory, _size_, (void**)&(_pointer_) )
-
-#define FT_MEM_FREE( _pointer_ )                  \
-          FT_Free( memory, (void**)&(_pointer_) )
-
-#define FT_MEM_REALLOC( _pointer_, _current_, _size_ )                  \
-          FT_Realloc( memory, _current_, _size_, (void**)&(_pointer_) )
-
-
-#endif /* !FT_DEBUG_MEMORY */
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* The following functions macros expect that their pointer argument is  */
-  /* _typed_ in order to automatically compute array element sizes.        */
-  /*                                                                       */
-
-#define FT_MEM_NEW( _pointer_ )                               \
-          FT_MEM_ALLOC( _pointer_, sizeof ( *(_pointer_) ) )
-
-#define FT_MEM_NEW_ARRAY( _pointer_, _count_ )                           \
-          FT_MEM_ALLOC( _pointer_, (_count_) * sizeof ( *(_pointer_) ) )
-
-#define FT_MEM_RENEW_ARRAY( _pointer_, _old_, _new_ )                    \
-          FT_MEM_REALLOC( _pointer_, (_old_) * sizeof ( *(_pointer_) ),  \
-                                     (_new_) * sizeof ( *(_pointer_) ) )
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* the following macros are obsolete but kept for compatibility reasons  */
-  /*                                                                       */
-
-#define FT_MEM_ALLOC_ARRAY( _pointer_, _count_, _type_ )           \
-          FT_MEM_ALLOC( _pointer_, (_count_) * sizeof ( _type_ ) )
-
-#define FT_MEM_REALLOC_ARRAY( _pointer_, _old_, _new_, _type_ )    \
-          FT_MEM_REALLOC( _pointer_, (_old_) * sizeof ( _type ),   \
-                                     (_new_) * sizeof ( _type_ ) )
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* The following macros are variants of their FT_MEM_XXXX equivalents;   */
-  /* they are used to set an _implicit_ `error' variable and return TRUE   */
-  /* if an error occured (i.e. if 'error != 0').                           */
-  /*                                                                       */
-
-#define FT_ALLOC( _pointer_, _size_ )                       \
-          FT_SET_ERROR( FT_MEM_ALLOC( _pointer_, _size_ ) )
-
-#define FT_REALLOC( _pointer_, _current_, _size_ )                       \
-          FT_SET_ERROR( FT_MEM_REALLOC( _pointer_, _current_, _size_ ) )
-
-#define FT_FREE( _pointer_ )       \
-          FT_MEM_FREE( _pointer_ )
-
-#define FT_NEW( _pointer_ )  \
-          FT_SET_ERROR( FT_MEM_NEW( _pointer_ ) )
-
-#define FT_NEW_ARRAY( _pointer_, _count_ )  \
-          FT_SET_ERROR( FT_MEM_NEW_ARRAY( _pointer_, _count_ ) )
-
-#define FT_RENEW_ARRAY( _pointer_, _old_, _new_ )   \
-          FT_SET_ERROR( FT_MEM_RENEW_ARRAY( _pointer_, _old_, _new_ ) )
-
-#define FT_ALLOC_ARRAY( _pointer_, _count_, _type_ )                    \
-          FT_SET_ERROR( FT_MEM_ALLOC( _pointer_,                        \
-                                      (_count_) * sizeof ( _type_ ) ) )
-
-#define FT_REALLOC_ARRAY( _pointer_, _old_, _new_, _type_ )             \
-          FT_SET_ERROR( FT_MEM_REALLOC( _pointer_,                      \
-                                        (_old_) * sizeof ( _type_ ),    \
-                                        (_new_) * sizeof ( _type_ ) ) )
-
- /* */
-
-
-FT_END_HEADER
-
-#endif /* __FTMEMORY_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/internal/ftobject.h b/extra_lib/include/freetype/freetype/internal/ftobject.h
deleted file mode 100644
index f285d9e..0000000
--- a/extra_lib/include/freetype/freetype/internal/ftobject.h
+++ /dev/null
@@ -1,533 +0,0 @@
-#ifndef __FT_OBJECT_H__
-#define __FT_OBJECT_H__
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-FT_BEGIN_HEADER
-
- /**************************************************************
-  *
-  * @type: FT_Object
-  *
-  * @description:
-  *   handle to a FreeType Object. See @FT_ObjectRec
-  */
-  typedef struct FT_ObjectRec_*        FT_Object;
-
-
- /**************************************************************
-  *
-  * @type: FT_Class
-  *
-  * @description:
-  *   handle to a constant class handle to a FreeType Object.
-  *
-  *   Note that a class is itself a @FT_Object and are dynamically
-  *   allocated on the heap.
-  *
-  * @also:
-  *  @FT_ClassRec, @FT_Object, @FT_ObjectRec, @FT_Type, @FT_TypeRec
-  */
-  typedef const struct FT_ClassRec_*   FT_Class;
-
-
- /**************************************************************
-  *
-  * @type: FT_Type
-  *
-  * @description:
-  *   handle to a constant structure (of type @FT_TypeRec) used
-  *   to describe a given @FT_Class type to the FreeType object
-  *   sub-system.
-  */
-  typedef const struct FT_TypeRec_*    FT_Type;
-
-
-
- /**************************************************************
-  *
-  * @struct: FT_ObjectRec
-  *
-  * @description:
-  *   a structure describing the root fields of all @FT_Object
-  *   class instances in FreeType
-  *
-  * @fields:
-  *   clazz     :: handle to the object's class
-  *   ref_count :: object's reference count. Starts at 1
-  */
-  typedef struct FT_ObjectRec_
-  {
-    FT_Class  clazz;
-    FT_Int    ref_count;
-
-  } FT_ObjectRec;
-
-
- /**************************************************************
-  *
-  * @macro: FT_OBJECT (x)
-  *
-  * @description:
-  *   a useful macro to type-cast anything to a @FT_Object
-  *   handle. No check performed..
-  */
-#define  FT_OBJECT(x)    ((FT_Object)(x))
-
-
- /**************************************************************
-  *
-  * @macro: FT_OBJECT_P (x)
-  *
-  * @description:
-  *   a useful macro to type-cast anything to a pointer to
-  *   @FT_Object handle.
-  */
-#define  FT_OBJECT_P(x)  ((FT_Object*)(x))
-
-
- /**************************************************************
-  *
-  * @macro: FT_OBJECT__CLASS (obj)
-  *
-  * @description:
-  *   a useful macro to return the class of any object
-  */
-#define  FT_OBJECT__CLASS(x)      FT_OBJECT(x)->clazz
-
-
- /**************************************************************
-  *
-  * @macro: FT_OBJECT__REF_COUNT (obj)
-  *
-  * @description:
-  *   a useful macro to return the reference count of any object
-  */
-#define  FT_OBJECT__REF_COUNT(x)  FT_OBJECT(x)->ref_count
-
-
- /**************************************************************
-  *
-  * @macro: FT_OBJECT__MEMORY (obj)
-  *
-  * @description:
-  *   a useful macro to return a handle to the memory manager
-  *   used to allocate a given object
-  */
-#define  FT_OBJECT__MEMORY(x)     FT_CLASS__MEMORY(FT_OBJECT(x)->clazz)
-
-
- /**************************************************************
-  *
-  * @macro: FT_OBJECT__LIBRARY (obj)
-  *
-  * @description:
-  *   a useful macro to return a handle to the library handle
-  *   that owns the object
-  */
-#define  FT_OBJECT__LIBRARY(x)    FT_CLASS__LIBRARY(FT_OBJECT(x)->clazz)
-
-
- /**************************************************************
-  *
-  * @functype: FT_Object_InitFunc
-  *
-  * @description:
-  *   a function used to initialize a new object
-  *
-  * @input:
-  *   object    :: target object handle
-  *   init_data :: optional pointer to initialization data
-  *
-  * @return:
-  *   error code. 0 means success
-  */
-  typedef FT_Error  (*FT_Object_InitFunc)( FT_Object   object,
-                                           FT_Pointer  init_data );
-
- /**************************************************************
-  *
-  * @functype: FT_Object_DoneFunc
-  *
-  * @description:
-  *   a function used to finalize a given object
-  *
-  * @input:
-  *   object    :: handle to target object
-  */
-  typedef void  (*FT_Object_DoneFunc)( FT_Object   object );
-
-
- /**************************************************************
-  *
-  * @struct: FT_ClassRec
-  *
-  * @description:
-  *   a structure used to describe a given object class within
-  *   FreeType
-  *
-  * @fields:
-  *   object   :: root @FT_ObjectRec fields, since each class is
-  *               itself an object. (it's an instance of the
-  *               "metaclass", a special object of the FreeType
-  *               object sub-system.)
-  *
-  *   magic    :: a 32-bit magic number used for decoding
-  *   super    :: pointer to super class
-  *   type     :: the @FT_Type descriptor of this class
-  *   memory   :: the current memory manager handle
-  *   library  :: the current library handle
-  *   info     :: an opaque pointer to class-specific information
-  *               managed by the FreeType object sub-system
-  *
-  *   class_done :: the class destructor function
-  *
-  *   obj_size :: size of class instances in bytes
-  *   obj_init :: class instance constructor
-  *   obj_done :: class instance destructor
-  */
-  typedef struct FT_ClassRec_
-  {
-    FT_ObjectRec        object;
-    FT_UInt32           magic;
-    FT_Class            super;
-    FT_Type             type;
-    FT_Memory           memory;
-    FT_Library          library;
-    FT_Pointer          info;
-
-    FT_Object_DoneFunc  class_done;
-
-    FT_UInt             obj_size;
-    FT_Object_InitFunc  obj_init;
-    FT_Object_DoneFunc  obj_done;
-
-  } FT_ClassRec;
-
-
- /**************************************************************
-  *
-  * @macro: FT_CLASS (x)
-  *
-  * @description:
-  *   a useful macro to convert anything to a class handle
-  *   without checks
-  */
-#define  FT_CLASS(x)    ((FT_Class)(x))
-
-
- /**************************************************************
-  *
-  * @macro: FT_CLASS_P (x)
-  *
-  * @description:
-  *   a useful macro to convert anything to a pointer to a class
-  *   handle without checks
-  */
-#define  FT_CLASS_P(x)  ((FT_Class*)(x))
-
-
- /**************************************************************
-  *
-  * @macro: FT_CLASS__MEMORY (clazz)
-  *
-  * @description:
-  *   a useful macro to return the memory manager handle of a
-  *   given class
-  */
-#define  FT_CLASS__MEMORY(x)   FT_CLASS(x)->memory
-
-
- /**************************************************************
-  *
-  * @macro: FT_CLASS__LIBRARY (clazz)
-  *
-  * @description:
-  *   a useful macro to return the library handle of a
-  *   given class
-  */
-#define  FT_CLASS__LIBRARY(x)  FT_CLASS(x)->library
-
-
-
- /**************************************************************
-  *
-  * @macro: FT_CLASS__TYPE (clazz)
-  *
-  * @description:
-  *   a useful macro to return the type of a given class
-  *   given class
-  */
-#define  FT_CLASS__TYPE(x)     FT_CLASS(x)->type
-
- /* */
-#define  FT_CLASS__INFO(x)     FT_CLASS(x)->info
-#define  FT_CLASS__MAGIC(x)    FT_CLASS(x)->magic
-
-
- /**************************************************************
-  *
-  * @struct: FT_TypeRec
-  *
-  * @description:
-  *   a structure used to describe a given class to the FreeType
-  *   object sub-system.
-  *
-  * @fields:
-  *   name       :: class name. only used for debugging
-  *   super      :: type of super-class. NULL if none
-  *
-  *   class_size :: size of class structure in bytes
-  *   class_init :: class constructor
-  *   class_done :: class finalizer
-  *
-  *   obj_size   :: instance size in bytes
-  *   obj_init   :: instance constructor. can be NULL
-  *   obj_done   :: instance destructor. can be NULL
-  *
-  * @note:
-  *   if 'obj_init' is NULL, the class will use it's parent
-  *   constructor, if any
-  *
-  *   if 'obj_done' is NULL, the class will use it's parent
-  *   finalizer, if any
-  *
-  *   the object sub-system allocates a new class, copies
-  *   the content of its super-class into the new structure,
-  *   _then_ calls 'clazz_init'.
-  *
-  *   'class_init' and 'class_done' can be NULL, in which case
-  *   the parent's class constructor and destructor wil be used
-  */
-  typedef struct FT_TypeRec_
-  {
-    const char*         name;
-    FT_Type             super;
-
-    FT_UInt             class_size;
-    FT_Object_InitFunc  class_init;
-    FT_Object_DoneFunc  class_done;
-
-    FT_UInt             obj_size;
-    FT_Object_InitFunc  obj_init;
-    FT_Object_DoneFunc  obj_done;
-
-  } FT_TypeRec;
-
-
- /**************************************************************
-  *
-  * @macro: FT_TYPE (x)
-  *
-  * @description:
-  *   a useful macro to convert anything to a class type handle
-  *   without checks
-  */
-#define  FT_TYPE(x)  ((FT_Type)(x))
-
-
- /**************************************************************
-  *
-  * @function: ft_object_check
-  *
-  * @description:
-  *   checks that a handle points to a valid @FT_Object
-  *
-  * @input:
-  *   obj :: handle/pointer
-  *
-  * @return:
-  *   1 iff the handle points to a valid object. 0 otherwise
-  */
-  FT_BASE( FT_Int )
-  ft_object_check( FT_Pointer  obj );
-
-
- /**************************************************************
-  *
-  * @function: ft_object_is_a
-  *
-  * @description:
-  *   checks that a handle points to a valid @FT_Object that
-  *   is an instance of a given class (or of any of its sub-classes)
-  *
-  * @input:
-  *   obj   :: handle/pointer
-  *   clazz :: class handle to check
-  *
-  * @return:
-  *   1 iff the handle points to a valid 'clazz' instance. 0
-  *   otherwise.
-  */
-  FT_BASE( FT_Int )
-  ft_object_is_a( FT_Pointer  obj,
-                  FT_Class    clazz );
-
-
- /**************************************************************
-  *
-  * @function: ft_object_create
-  *
-  * @description:
-  *   create a new object (class instance)
-  *
-  * @output:
-  *   aobject   :: new object handle. NULL in case of error
-  *
-  * @input:
-  *   clazz     :: object's class pointer
-  *   init_data :: optional pointer to initialization data
-  *
-  * @return:
-  *   error code. 0 means success
-  */
-  FT_BASE( FT_Error )
-  ft_object_create( FT_Object  *aobject,
-                    FT_Class    clazz,
-                    FT_Pointer  init_data );
-
-
- /**************************************************************
-  *
-  * @function: ft_object_create_from_type
-  *
-  * @description:
-  *   create a new object (class instance) from a @FT_Type
-  *
-  * @output:
-  *   aobject   :: new object handle. NULL in case of error
-  *
-  * @input:
-  *   type      :: object's type descriptor
-  *   init_data :: optional pointer to initialization data
-  *
-  * @return:
-  *   error code. 0 means success
-  *
-  * @note:
-  *   this function is slower than @ft_object_create
-  *
-  *   this is equivalent to calling @ft_class_from_type followed by
-  *   @ft_object_create
-  */
-  FT_BASE( FT_Error )
-  ft_object_create_from_type( FT_Object  *aobject,
-                              FT_Type     type,
-                              FT_Pointer  init_data,
-                              FT_Library  library );
-
-
-
- /**************************************************************
-  *
-  * @macro FT_OBJ_CREATE (object,class,init)
-  *
-  * @description:
-  *   a convenient macro used to create new objects. see
-  *   @ft_object_create for details
-  */
-#define  FT_OBJ_CREATE( _obj, _clazz, _init )   \
-               ft_object_create( FT_OBJECT_P(&(_obj)), _clazz, _init )
-
-
- /**************************************************************
-  *
-  * @macro FT_CREATE (object,class,init)
-  *
-  * @description:
-  *   a convenient macro used to create new objects. It also
-  *   sets an _implicit_ local variable named "error" to the error
-  *   code returned by the object constructor.
-  */
-#define  FT_CREATE( _obj, _clazz, _init )  \
-             FT_SET_ERROR( FT_OBJ_CREATE( _obj, _clazz, _init ) )
-
- /**************************************************************
-  *
-  * @macro FT_OBJ_CREATE_FROM_TYPE (object,type,init)
-  *
-  * @description:
-  *   a convenient macro used to create new objects. see
-  *   @ft_object_create_from_type for details
-  */
-#define  FT_OBJ_CREATE_FROM_TYPE( _obj, _type, _init, _lib )   \
-               ft_object_create_from_type( FT_OBJECT_P(&(_obj)), _type, _init, _lib )
-
-
- /**************************************************************
-  *
-  * @macro FT_CREATE_FROM_TYPE (object,type,init)
-  *
-  * @description:
-  *   a convenient macro used to create new objects. It also
-  *   sets an _implicit_ local variable named "error" to the error
-  *   code returned by the object constructor.
-  */
-#define  FT_CREATE_FROM_TYPE( _obj, _type, _init, _lib )  \
-             FT_SET_ERROR( FT_OBJ_CREATE_FROM_TYPE( _obj, _type, _init, _lib ) )
-
-
- /* */
-
- /**************************************************************
-  *
-  * @function: ft_class_from_type
-  *
-  * @description:
-  *   retrieves the class object corresponding to a given type
-  *   descriptor. The class is created when needed
-  *
-  * @output:
-  *   aclass  :: handle to corresponding class object. NULL in
-  *              case of error
-  *
-  * @input:
-  *   type    :: type descriptor handle
-  *   library :: library handle
-  *
-  * @return:
-  *   error code. 0 means success
-  */
-  FT_BASE( FT_Error )
-  ft_class_from_type( FT_Class   *aclass,
-                      FT_Type     type,
-                      FT_Library  library );
-
-
- /* */
-
-#include FT_INTERNAL_HASH_H
-
-  typedef struct FT_ClassHNodeRec_*  FT_ClassHNode;
-
-  typedef struct FT_ClassHNodeRec_
-  {
-    FT_HashNodeRec  hnode;
-    FT_Type         type;
-    FT_Class        clazz;
-
-  } FT_ClassHNodeRec;
-
-  typedef struct FT_MetaClassRec_
-  {
-    FT_ClassRec   clazz;         /* the meta-class is a class itself */
-    FT_HashRec    type_to_class; /* the type => class hash table */
-
-  } FT_MetaClassRec, *FT_MetaClass;
-
-
- /* initialize meta class */
-  FT_BASE( FT_Error )
-  ft_metaclass_init( FT_MetaClass  meta,
-                     FT_Library    library );
-
- /* finalize meta class - destroy all registered class objects */
-  FT_BASE( void )
-  ft_metaclass_done( FT_MetaClass  meta );
-
- /* */
-
-FT_END_HEADER
-
-#endif /* __FT_OBJECT_H__ */
diff --git a/extra_lib/include/freetype/freetype/internal/ftobjs.h b/extra_lib/include/freetype/freetype/internal/ftobjs.h
deleted file mode 100644
index fa1b29f..0000000
--- a/extra_lib/include/freetype/freetype/internal/ftobjs.h
+++ /dev/null
@@ -1,845 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftobjs.h                                                               */
-/*                                                                         */
-/*    The FreeType private base classes (specification).                   */
-/*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003 by                                     */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /*  This file contains the definition of all internal FreeType classes.  */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-#ifndef __FTOBJS_H__
-#define __FTOBJS_H__
-
-#include <ft2build.h>
-#include FT_CONFIG_STANDARD_LIBRARY_H   /* for ft_setjmp and ft_longjmp */
-#include FT_RENDER_H
-#include FT_SIZES_H
-#include FT_INTERNAL_MEMORY_H
-#include FT_INTERNAL_GLYPH_LOADER_H
-#include FT_INTERNAL_DRIVER_H
-#include FT_INTERNAL_AUTOHINT_H
-#include FT_INTERNAL_SERVICE_H
-
-#ifdef FT_CONFIG_OPTION_INCREMENTAL
-#include FT_INCREMENTAL_H
-#endif
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Some generic definitions.                                             */
-  /*                                                                       */
-#ifndef TRUE
-#define TRUE  1
-#endif
-
-#ifndef FALSE
-#define FALSE  0
-#endif
-
-#ifndef NULL
-#define NULL  (void*)0
-#endif
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* The min and max functions missing in C.  As usual, be careful not to  */
-  /* write things like MIN( a++, b++ ) to avoid side effects.              */
-  /*                                                                       */
-#ifndef MIN
-#define MIN( a, b )  ( (a) < (b) ? (a) : (b) )
-#endif
-
-#ifndef MAX
-#define MAX( a, b )  ( (a) > (b) ? (a) : (b) )
-#endif
-
-#ifndef ABS
-#define ABS( a )     ( (a) < 0 ? -(a) : (a) )
-#endif
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /****                                                                 ****/
-  /****                                                                 ****/
-  /****                    V A L I D A T I O N                          ****/
-  /****                                                                 ****/
-  /****                                                                 ****/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-
-  /* handle to a validation object */
-  typedef struct FT_ValidatorRec_*  FT_Validator;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* There are three distinct validation levels defined here:              */
-  /*                                                                       */
-  /* FT_VALIDATE_DEFAULT ::                                                */
-  /*   A table that passes this validation level can be used reliably by   */
-  /*   FreeType.  It generally means that all offsets have been checked to */
-  /*   prevent out-of-bound reads, array counts are correct, etc.          */
-  /*                                                                       */
-  /* FT_VALIDATE_TIGHT ::                                                  */
-  /*   A table that passes this validation level can be used reliably and  */
-  /*   doesn't contain invalid data.  For example, a charmap table that    */
-  /*   returns invalid glyph indices will not pass, even though it can     */
-  /*   be used with FreeType in default mode (the library will simply      */
-  /*   return an error later when trying to load the glyph).               */
-  /*                                                                       */
-  /*   It also check that fields that must be a multiple of 2, 4, or 8     */
-  /*   don't have incorrect values, etc.                                   */
-  /*                                                                       */
-  /* FT_VALIDATE_PARANOID ::                                               */
-  /*   Only for font debugging.  Checks that a table follows the           */
-  /*   specification by 100%.  Very few fonts will be able to pass this    */
-  /*   level anyway but it can be useful for certain tools like font       */
-  /*   editors/converters.                                                 */
-  /*                                                                       */
-  typedef enum  FT_ValidationLevel_
-  {
-    FT_VALIDATE_DEFAULT = 0,
-    FT_VALIDATE_TIGHT,
-    FT_VALIDATE_PARANOID
-
-  } FT_ValidationLevel;
-
-
-  /* validator structure */
-  typedef struct  FT_ValidatorRec_
-  {
-    const FT_Byte*      base;        /* address of table in memory       */
-    const FT_Byte*      limit;       /* `base' + sizeof(table) in memory */
-    FT_ValidationLevel  level;       /* validation level                 */
-    FT_Error            error;       /* error returned. 0 means success  */
-
-    ft_jmp_buf          jump_buffer; /* used for exception handling      */
-
-  } FT_ValidatorRec;
-
-
-#define FT_VALIDATOR( x )  ((FT_Validator)( x ))
-
-
-  FT_BASE( void )
-  ft_validator_init( FT_Validator        valid,
-                     const FT_Byte*      base,
-                     const FT_Byte*      limit,
-                     FT_ValidationLevel  level );
-
-  FT_BASE( FT_Int )
-  ft_validator_run( FT_Validator  valid );
-
-  /* Sets the error field in a validator, then calls `longjmp' to return */
-  /* to high-level caller.  Using `setjmp/longjmp' avoids many stupid    */
-  /* error checks within the validation routines.                        */
-  /*                                                                     */
-  FT_BASE( void )
-  ft_validator_error( FT_Validator  valid,
-                      FT_Error      error );
-
-
-  /* Calls ft_validate_error.  Assumes that the `valid' local variable */
-  /* holds a pointer to the current validator object.                  */
-  /*                                                                   */
-#define FT_INVALID( _error )  ft_validator_error( valid, _error )
-
-  /* called when a broken table is detected */
-#define FT_INVALID_TOO_SHORT  FT_INVALID( FT_Err_Invalid_Table )
-
-  /* called when an invalid offset is detected */
-#define FT_INVALID_OFFSET     FT_INVALID( FT_Err_Invalid_Offset )
-
-  /* called when an invalid format/value is detected */
-#define FT_INVALID_FORMAT     FT_INVALID( FT_Err_Invalid_Table )
-
-  /* called when an invalid glyph index is detected */
-#define FT_INVALID_GLYPH_ID   FT_INVALID( FT_Err_Invalid_Glyph_Index )
-
-  /* called when an invalid field value is detected */
-#define FT_INVALID_DATA       FT_INVALID( FT_Err_Invalid_Table )
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /****                                                                 ****/
-  /****                                                                 ****/
-  /****                       C H A R M A P S                           ****/
-  /****                                                                 ****/
-  /****                                                                 ****/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-
-  /* handle to internal charmap object */
-  typedef struct FT_CMapRec_*              FT_CMap;
-
-  /* handle to charmap class structure */
-  typedef const struct FT_CMap_ClassRec_*  FT_CMap_Class;
-
-  /* internal charmap object structure */
-  typedef struct  FT_CMapRec_
-  {
-    FT_CharMapRec  charmap;
-    FT_CMap_Class  clazz;
-
-  } FT_CMapRec;
-
-  /* typecase any pointer to a charmap handle */
-#define FT_CMAP( x )              ((FT_CMap)( x ))
-
-  /* obvious macros */
-#define FT_CMAP_PLATFORM_ID( x )  FT_CMAP( x )->charmap.platform_id
-#define FT_CMAP_ENCODING_ID( x )  FT_CMAP( x )->charmap.encoding_id
-#define FT_CMAP_ENCODING( x )     FT_CMAP( x )->charmap.encoding
-#define FT_CMAP_FACE( x )         FT_CMAP( x )->charmap.face
-
-
-  /* class method definitions */
-  typedef FT_Error
-  (*FT_CMap_InitFunc)( FT_CMap     cmap,
-                       FT_Pointer  init_data );
-
-  typedef void
-  (*FT_CMap_DoneFunc)( FT_CMap  cmap );
-
-  typedef FT_UInt
-  (*FT_CMap_CharIndexFunc)( FT_CMap    cmap,
-                            FT_UInt32  char_code );
-
-  typedef FT_UInt
-  (*FT_CMap_CharNextFunc)( FT_CMap     cmap,
-                           FT_UInt32  *achar_code );
-
-
-  typedef struct  FT_CMap_ClassRec_
-  {
-    FT_ULong               size;
-    FT_CMap_InitFunc       init;
-    FT_CMap_DoneFunc       done;
-    FT_CMap_CharIndexFunc  char_index;
-    FT_CMap_CharNextFunc   char_next;
-
-  } FT_CMap_ClassRec;
-
-
-  /* create a new charmap and add it to charmap->face */
-  FT_BASE( FT_Error )
-  FT_CMap_New( FT_CMap_Class  clazz,
-               FT_Pointer     init_data,
-               FT_CharMap     charmap,
-               FT_CMap       *acmap );
-
-  /* destroy a charmap (don't remove it from face's list though) */
-  FT_BASE( void )
-  FT_CMap_Done( FT_CMap  cmap );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_Face_InternalRec                                                */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This structure contains the internal fields of each FT_Face        */
-  /*    object.  These fields may change between different releases of     */
-  /*    FreeType.                                                          */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    max_points ::                                                      */
-  /*      The maximal number of points used to store the vectorial outline */
-  /*      of any glyph in this face.  If this value cannot be known in     */
-  /*      advance, or if the face isn't scalable, this should be set to 0. */
-  /*      Only relevant for scalable formats.                              */
-  /*                                                                       */
-  /*    max_contours ::                                                    */
-  /*      The maximal number of contours used to store the vectorial       */
-  /*      outline of any glyph in this face.  If this value cannot be      */
-  /*      known in advance, or if the face isn't scalable, this should be  */
-  /*      set to 0.  Only relevant for scalable formats.                   */
-  /*                                                                       */
-  /*    transform_matrix ::                                                */
-  /*      A 2x2 matrix of 16.16 coefficients used to transform glyph       */
-  /*      outlines after they are loaded from the font.  Only used by the  */
-  /*      convenience functions.                                           */
-  /*                                                                       */
-  /*    transform_delta ::                                                 */
-  /*      A translation vector used to transform glyph outlines after they */
-  /*      are loaded from the font.  Only used by the convenience          */
-  /*      functions.                                                       */
-  /*                                                                       */
-  /*    transform_flags ::                                                 */
-  /*      Some flags used to classify the transform.  Only used by the     */
-  /*      convenience functions.                                           */
-  /*                                                                       */
-  /*    services ::                                                        */
-  /*      A cache for frequently used services.  It should be only         */
-  /*      accessed with the macro `FT_FACE_LOOKUP_SERVICE'.                */
-  /*                                                                       */
-  /*    incremental_interface ::                                           */
-  /*      If non-null, the interface through which glyph data and metrics  */
-  /*      are loaded incrementally for faces that do not provide all of    */
-  /*      this data when first opened.  This field exists only if          */
-  /*      @FT_CONFIG_OPTION_INCREMENTAL is defined.                        */
-  /*                                                                       */
-  typedef struct  FT_Face_InternalRec_
-  {
-    FT_UShort           max_points;
-    FT_Short            max_contours;
-
-    FT_Matrix           transform_matrix;
-    FT_Vector           transform_delta;
-    FT_Int              transform_flags;
-
-    FT_ServiceCacheRec  services;
-
-#ifdef FT_CONFIG_OPTION_INCREMENTAL
-    FT_Incremental_InterfaceRec*  incremental_interface;
-#endif
-
-  } FT_Face_InternalRec;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_Slot_InternalRec                                                */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This structure contains the internal fields of each FT_GlyphSlot   */
-  /*    object.  These fields may change between different releases of     */
-  /*    FreeType.                                                          */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    loader            :: The glyph loader object used to load outlines */
-  /*                         into the glyph slot.                          */
-  /*                                                                       */
-  /*    flags             :: Possible values are zero or                   */
-  /*                         FT_GLYPH_OWN_BITMAP.  The latter indicates    */
-  /*                         that the FT_GlyphSlot structure owns the      */
-  /*                         bitmap buffer.                                */
-  /*                                                                       */
-  /*    glyph_transformed :: Boolean.  Set to TRUE when the loaded glyph   */
-  /*                         must be transformed through a specific        */
-  /*                         font transformation.  This is _not_ the same  */
-  /*                         as the face transform set through             */
-  /*                         FT_Set_Transform().                           */
-  /*                                                                       */
-  /*    glyph_matrix      :: The 2x2 matrix corresponding to the glyph     */
-  /*                         transformation, if necessary.                 */
-  /*                                                                       */
-  /*    glyph_delta       :: The 2d translation vector corresponding to    */
-  /*                         the glyph transformation, if necessary.       */
-  /*                                                                       */
-  /*    glyph_hints       :: Format-specific glyph hints management.       */
-  /*                                                                       */
-
-#define FT_GLYPH_OWN_BITMAP  0x1
-
-  typedef struct  FT_Slot_InternalRec_
-  {
-    FT_GlyphLoader  loader;
-    FT_UInt         flags;
-    FT_Bool         glyph_transformed;
-    FT_Matrix       glyph_matrix;
-    FT_Vector       glyph_delta;
-    void*           glyph_hints;
-
-  } FT_GlyphSlot_InternalRec;
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /****                                                                 ****/
-  /****                                                                 ****/
-  /****                         M O D U L E S                           ****/
-  /****                                                                 ****/
-  /****                                                                 ****/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_ModuleRec                                                       */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A module object instance.                                          */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    clazz   :: A pointer to the module's class.                        */
-  /*                                                                       */
-  /*    library :: A handle to the parent library object.                  */
-  /*                                                                       */
-  /*    memory  :: A handle to the memory manager.                         */
-  /*                                                                       */
-  /*    generic :: A generic structure for user-level extensibility (?).   */
-  /*                                                                       */
-  typedef struct  FT_ModuleRec_
-  {
-    FT_Module_Class*  clazz;
-    FT_Library        library;
-    FT_Memory         memory;
-    FT_Generic        generic;
-
-  } FT_ModuleRec;
-
-
-  /* typecast an object to a FT_Module */
-#define FT_MODULE( x )          ((FT_Module)( x ))
-#define FT_MODULE_CLASS( x )    FT_MODULE( x )->clazz
-#define FT_MODULE_LIBRARY( x )  FT_MODULE( x )->library
-#define FT_MODULE_MEMORY( x )   FT_MODULE( x )->memory
-
-
-#define FT_MODULE_IS_DRIVER( x )  ( FT_MODULE_CLASS( x )->module_flags & \
-                                    FT_MODULE_FONT_DRIVER )
-
-#define FT_MODULE_IS_RENDERER( x )  ( FT_MODULE_CLASS( x )->module_flags & \
-                                      FT_MODULE_RENDERER )
-
-#define FT_MODULE_IS_HINTER( x )  ( FT_MODULE_CLASS( x )->module_flags & \
-                                    FT_MODULE_HINTER )
-
-#define FT_MODULE_IS_STYLER( x )  ( FT_MODULE_CLASS( x )->module_flags & \
-                                    FT_MODULE_STYLER )
-
-#define FT_DRIVER_IS_SCALABLE( x )  ( FT_MODULE_CLASS( x )->module_flags & \
-                                      FT_MODULE_DRIVER_SCALABLE )
-
-#define FT_DRIVER_USES_OUTLINES( x )  !( FT_MODULE_CLASS( x )->module_flags & \
-                                         FT_MODULE_DRIVER_NO_OUTLINES )
-
-#define FT_DRIVER_HAS_HINTER( x )  ( FT_MODULE_CLASS( x )->module_flags & \
-                                     FT_MODULE_DRIVER_HAS_HINTER )
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Get_Module_Interface                                            */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Finds a module and returns its specific interface as a typeless    */
-  /*    pointer.                                                           */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    library     :: A handle to the library object.                     */
-  /*                                                                       */
-  /*    module_name :: The module's name (as an ASCII string).             */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    A module-specific interface if available, 0 otherwise.             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    You should better be familiar with FreeType internals to know      */
-  /*    which module to look for, and what its interface is :-)            */
-  /*                                                                       */
-  FT_BASE( const void* )
-  FT_Get_Module_Interface( FT_Library   library,
-                           const char*  mod_name );
-
-  FT_BASE( FT_Pointer )
-  ft_module_get_service( FT_Module    module,
-                         const char*  service_id );
-
- /* */
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /****                                                                 ****/
-  /****                                                                 ****/
-  /****               FACE, SIZE & GLYPH SLOT OBJECTS                   ****/
-  /****                                                                 ****/
-  /****                                                                 ****/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-
-  /* a few macros used to perform easy typecasts with minimal brain damage */
-
-#define FT_FACE( x )          ((FT_Face)(x))
-#define FT_SIZE( x )          ((FT_Size)(x))
-#define FT_SLOT( x )          ((FT_GlyphSlot)(x))
-
-#define FT_FACE_DRIVER( x )   FT_FACE( x )->driver
-#define FT_FACE_LIBRARY( x )  FT_FACE_DRIVER( x )->root.library
-#define FT_FACE_MEMORY( x )   FT_FACE( x )->memory
-#define FT_FACE_STREAM( x )   FT_FACE( x )->stream
-
-#define FT_SIZE_FACE( x )     FT_SIZE( x )->face
-#define FT_SLOT_FACE( x )     FT_SLOT( x )->face
-
-#define FT_FACE_SLOT( x )     FT_FACE( x )->glyph
-#define FT_FACE_SIZE( x )     FT_FACE( x )->size
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_New_GlyphSlot                                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    It is sometimes useful to have more than one glyph slot for a      */
-  /*    given face object.  This function is used to create additional     */
-  /*    slots.  All of them are automatically discarded when the face is   */
-  /*    destroyed.                                                         */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    face  :: A handle to a parent face object.                         */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    aslot :: A handle to a new glyph slot object.                      */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  FT_BASE( FT_Error )
-  FT_New_GlyphSlot( FT_Face        face,
-                    FT_GlyphSlot  *aslot );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Done_GlyphSlot                                                  */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Destroys a given glyph slot.  Remember however that all slots are  */
-  /*    automatically destroyed with its parent.  Using this function is   */
-  /*    not always mandatory.                                              */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    slot :: A handle to a target glyph slot.                           */
-  /*                                                                       */
-  FT_BASE( void )
-  FT_Done_GlyphSlot( FT_GlyphSlot  slot );
-
- /* */
-
- /*
-  * Free the bitmap of a given glyphslot when needed
-  * (i.e., only when it was allocated with ft_glyphslot_alloc_bitmap).
-  */
-  FT_BASE( void )
-  ft_glyphslot_free_bitmap( FT_GlyphSlot  slot );
-
-
- /*
-  * Allocate a new bitmap buffer in a glyph slot.
-  */
-  FT_BASE( FT_Error )
-  ft_glyphslot_alloc_bitmap( FT_GlyphSlot  slot,
-                             FT_ULong      size );
-
-
- /*
-  * Set the bitmap buffer in a glyph slot to a given pointer.
-  * The buffer will not be freed by a later call to ft_glyphslot_free_bitmap.
-  */
-  FT_BASE( void )
-  ft_glyphslot_set_bitmap( FT_GlyphSlot  slot,
-                           FT_Byte*      buffer );
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /****                                                                 ****/
-  /****                                                                 ****/
-  /****                        R E N D E R E R S                        ****/
-  /****                                                                 ****/
-  /****                                                                 ****/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-#define FT_RENDERER( x )      ((FT_Renderer)( x ))
-#define FT_GLYPH( x )         ((FT_Glyph)( x ))
-#define FT_BITMAP_GLYPH( x )  ((FT_BitmapGlyph)( x ))
-#define FT_OUTLINE_GLYPH( x ) ((FT_OutlineGlyph)( x ))
-
-
-  typedef struct  FT_RendererRec_
-  {
-    FT_ModuleRec            root;
-    FT_Renderer_Class*      clazz;
-    FT_Glyph_Format         glyph_format;
-    FT_Glyph_Class          glyph_class;
-
-    FT_Raster               raster;
-    FT_Raster_Render_Func   raster_render;
-    FT_Renderer_RenderFunc  render;
-
-  } FT_RendererRec;
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /****                                                                 ****/
-  /****                                                                 ****/
-  /****                    F O N T   D R I V E R S                      ****/
-  /****                                                                 ****/
-  /****                                                                 ****/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-  /* typecast a module into a driver easily */
-#define FT_DRIVER( x )        ((FT_Driver)(x))
-
-  /* typecast a module as a driver, and get its driver class */
-#define FT_DRIVER_CLASS( x )  FT_DRIVER( x )->clazz
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_DriverRec                                                       */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    The root font driver class.  A font driver is responsible for      */
-  /*    managing and loading font files of a given format.                 */
-  /*                                                                       */
-  /*  <Fields>                                                             */
-  /*     root         :: Contains the fields of the root module class.     */
-  /*                                                                       */
-  /*     clazz        :: A pointer to the font driver's class.  Note that  */
-  /*                     this is NOT root.clazz.  `class' wasn't used      */
-  /*                     as it is a reserved word in C++.                  */
-  /*                                                                       */
-  /*     faces_list   :: The list of faces currently opened by this        */
-  /*                     driver.                                           */
-  /*                                                                       */
-  /*     extensions   :: A typeless pointer to the driver's extensions     */
-  /*                     registry, if they are supported through the       */
-  /*                     configuration macro FT_CONFIG_OPTION_EXTENSIONS.  */
-  /*                                                                       */
-  /*     glyph_loader :: The glyph loader for all faces managed by this    */
-  /*                     driver.  This object isn't defined for unscalable */
-  /*                     formats.                                          */
-  /*                                                                       */
-  typedef struct  FT_DriverRec_
-  {
-    FT_ModuleRec     root;
-    FT_Driver_Class  clazz;
-
-    FT_ListRec       faces_list;
-    void*            extensions;
-
-    FT_GlyphLoader   glyph_loader;
-
-  } FT_DriverRec;
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /****                                                                 ****/
-  /****                                                                 ****/
-  /****                       L I B R A R I E S                         ****/
-  /****                                                                 ****/
-  /****                                                                 ****/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-/* this hook is used by the TrueType debugger. It must be set to an alternate
- * truetype bytecode interpreter function
- */
-#define FT_DEBUG_HOOK_TRUETYPE            0
-
-
-/* set this debug hook to a non-null pointer to force unpatented hinting
- * for all faces when both TT_CONFIG_OPTION_BYTECODE_INTERPRETER and
- * TT_CONFIG_OPTION_UNPATENTED_HINTING are defined. this is only used
- * during debugging
- */
-#define FT_DEBUG_HOOK_UNPATENTED_HINTING  1
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    FT_LibraryRec                                                      */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    The FreeType library class.  This is the root of all FreeType      */
-  /*    data.  Use FT_New_Library() to create a library object, and        */
-  /*    FT_Done_Library() to discard it and all child objects.             */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    memory           :: The library's memory object.  Manages memory   */
-  /*                        allocation.                                    */
-  /*                                                                       */
-  /*    generic          :: Client data variable.  Used to extend the      */
-  /*                        Library class by higher levels and clients.    */
-  /*                                                                       */
-  /*    version_major    :: The major version number of the library.       */
-  /*                                                                       */
-  /*    version_minor    :: The minor version number of the library.       */
-  /*                                                                       */
-  /*    version_patch    :: The current patch level of the library.        */
-  /*                                                                       */
-  /*    num_modules      :: The number of modules currently registered     */
-  /*                        within this library.  This is set to 0 for new */
-  /*                        libraries.  New modules are added through the  */
-  /*                        FT_Add_Module() API function.                  */
-  /*                                                                       */
-  /*    modules          :: A table used to store handles to the currently */
-  /*                        registered modules. Note that each font driver */
-  /*                        contains a list of its opened faces.           */
-  /*                                                                       */
-  /*    renderers        :: The list of renderers currently registered     */
-  /*                        within the library.                            */
-  /*                                                                       */
-  /*    cur_renderer     :: The current outline renderer.  This is a       */
-  /*                        shortcut used to avoid parsing the list on     */
-  /*                        each call to FT_Outline_Render().  It is a     */
-  /*                        handle to the current renderer for the         */
-  /*                        FT_GLYPH_FORMAT_OUTLINE format.                */
-  /*                                                                       */
-  /*    auto_hinter      :: XXX                                            */
-  /*                                                                       */
-  /*    raster_pool      :: The raster object's render pool.  This can     */
-  /*                        ideally be changed dynamically at run-time.    */
-  /*                                                                       */
-  /*    raster_pool_size :: The size of the render pool in bytes.          */
-  /*                                                                       */
-  /*    debug_hooks      :: XXX                                            */
-  /*                                                                       */
-  typedef struct  FT_LibraryRec_
-  {
-    FT_Memory          memory;           /* library's memory manager */
-
-    FT_Generic         generic;
-
-    FT_Int             version_major;
-    FT_Int             version_minor;
-    FT_Int             version_patch;
-
-    FT_UInt            num_modules;
-    FT_Module          modules[FT_MAX_MODULES];  /* module objects  */
-
-    FT_ListRec         renderers;        /* list of renderers        */
-    FT_Renderer        cur_renderer;     /* current outline renderer */
-    FT_Module          auto_hinter;
-
-    FT_Byte*           raster_pool;      /* scan-line conversion */
-                                         /* render pool          */
-    FT_ULong           raster_pool_size; /* size of render pool in bytes */
-
-    FT_DebugHook_Func  debug_hooks[4];
-
-  } FT_LibraryRec;
-
-
-  FT_BASE( FT_Renderer )
-  FT_Lookup_Renderer( FT_Library       library,
-                      FT_Glyph_Format  format,
-                      FT_ListNode*     node );
-
-  FT_BASE( FT_Error )
-  FT_Render_Glyph_Internal( FT_Library      library,
-                            FT_GlyphSlot    slot,
-                            FT_Render_Mode  render_mode );
-
-  typedef const char*
-  (*FT_Face_GetPostscriptNameFunc)( FT_Face  face );
-
-  typedef FT_Error
-  (*FT_Face_GetGlyphNameFunc)( FT_Face     face,
-                               FT_UInt     glyph_index,
-                               FT_Pointer  buffer,
-                               FT_UInt     buffer_max );
-
-  typedef FT_UInt
-  (*FT_Face_GetGlyphNameIndexFunc)( FT_Face     face,
-                                    FT_String*  glyph_name );
-
-
-#ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_New_Memory                                                      */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Creates a new memory object.                                       */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    A pointer to the new memory object.  0 in case of error.           */
-  /*                                                                       */
-  FT_EXPORT( FT_Memory )
-  FT_New_Memory( void );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Done_Memory                                                     */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Discards memory manager.                                           */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    memory :: A handle to the memory manager.                          */
-  /*                                                                       */
-  FT_EXPORT( void )
-  FT_Done_Memory( FT_Memory  memory );
-
-#endif /* !FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM */
-
-
-  /* Define default raster's interface.  The default raster is located in  */
-  /* `src/base/ftraster.c'.                                                */
-  /*                                                                       */
-  /* Client applications can register new rasters through the              */
-  /* FT_Set_Raster() API.                                                  */
-
-#ifndef FT_NO_DEFAULT_RASTER
-  FT_EXPORT_VAR( FT_Raster_Funcs )  ft_default_raster;
-#endif
-
-
-FT_END_HEADER
-
-#endif /* __FTOBJS_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/internal/ftserv.h b/extra_lib/include/freetype/freetype/internal/ftserv.h
deleted file mode 100644
index d77e1d5..0000000
--- a/extra_lib/include/freetype/freetype/internal/ftserv.h
+++ /dev/null
@@ -1,259 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftserv.h                                                               */
-/*                                                                         */
-/*    The FreeType services (specification only).                          */
-/*                                                                         */
-/*  Copyright 2003 by                                                      */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-  /*************************************************************************/
-  /*                                                                       */
-  /*  Each module can export one or more `services'.  Each service is      */
-  /*  identified by a constant string and modeled by a pointer; the latter */
-  /*  generally corresponds to a structure containing function pointers.   */
-  /*                                                                       */
-  /*  Note that a service's data cannot be a mere function pointer because */
-  /*  in C it is possible that function pointers might be implemented      */
-  /*  differently than data pointers (e.g. 48 bits instead of 32).         */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-#ifndef __FTSERV_H__
-#define __FTSERV_H__
-
-
-FT_BEGIN_HEADER
-
-
-  /*
-   * @macro:
-   *   FT_FACE_FIND_SERVICE
-   *
-   * @description:
-   *   This macro is used to look up a service from a face's driver module.
-   *
-   * @input:
-   *   face ::
-   *     The source face handle.
-   *
-   *   id ::
-   *     A string describing the service as defined in the service's
-   *     header files (e.g. FT_SERVICE_ID_MULTI_MASTERS which expands to
-   *     `multi-masters').  It is automatically prefixed with
-   *     `FT_SERVICE_ID_'.
-   *
-   * @output:
-   *   ptr ::
-   *     A variable that receives the service pointer.  Will be NULL
-   *     if not found.
-   */
-#define FT_FACE_FIND_SERVICE( face, ptr, id )                               \
-  FT_BEGIN_STMNT                                                            \
-    FT_Module    module = FT_MODULE( FT_FACE(face)->driver );               \
-    /* the strange cast is to allow C++ compilation */                      \
-    FT_Pointer*  Pptr   = (FT_Pointer*) &(ptr);                             \
-                                                                            \
-                                                                            \
-    *Pptr = NULL;                                                           \
-    if ( module->clazz->get_interface )                                     \
-      *Pptr = module->clazz->get_interface( module, FT_SERVICE_ID_ ## id ); \
-  FT_END_STMNT
-
-
-  /*
-   * @macro:
-   *   FT_FACE_FIND_GLOBAL_SERVICE
-   *
-   * @description:
-   *   This macro is used to look up a service from all modules.
-   *
-   * @input:
-   *   face ::
-   *     The source face handle.
-   *
-   *   id ::
-   *     A string describing the service as defined in the service's
-   *     header files (e.g. FT_SERVICE_ID_MULTI_MASTERS which expands to
-   *     `multi-masters').  It is automatically prefixed with
-   *     `FT_SERVICE_ID_'.
-   *
-   * @output:
-   *   ptr ::
-   *     A variable that receives the service pointer.  Will be NULL
-   *     if not found.
-   */
-#define FT_FACE_FIND_GLOBAL_SERVICE( face, ptr, id )               \
-  FT_BEGIN_STMNT                                                   \
-    FT_Module    module = FT_MODULE( FT_FACE(face)->driver );      \
-    /* the strange cast is to allow C++ compilation */             \
-    FT_Pointer*  Pptr   = (FT_Pointer*) &(ptr);                    \
-                                                                   \
-                                                                   \
-    *Pptr = ft_module_get_service( module, FT_SERVICE_ID_ ## id ); \
-  FT_END_STMNT
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*****                                                               *****/
-  /*****         S E R V I C E   D E S C R I P T O R S                 *****/
-  /*****                                                               *****/
-  /*************************************************************************/
-  /*************************************************************************/
-
-  /*
-   *  The following structure is used to _describe_ a given service
-   *  to the library.  This is useful to build simple static service lists.
-   */
-  typedef struct  FT_ServiceDescRec_
-  {
-    const char*  serv_id;     /* service name         */
-    const void*  serv_data;   /* service pointer/data */
-
-  } FT_ServiceDescRec;
-
-  typedef const FT_ServiceDescRec*  FT_ServiceDesc;
-
-
-  /*
-   *  Parse a list of FT_ServiceDescRec descriptors and look for
-   *  a specific service by ID.  Note that the last element in the
-   *  array must be { NULL, NULL }, and that the function should
-   *  return NULL if the service isn't available.
-   *
-   *  This function can be used by modules to implement their
-   *  `get_service' method.
-   */
-  FT_BASE( FT_Pointer )
-  ft_service_list_lookup( FT_ServiceDesc  service_descriptors,
-                          const char*     service_id );
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*****                                                               *****/
-  /*****             S E R V I C E S   C A C H E                       *****/
-  /*****                                                               *****/
-  /*************************************************************************/
-  /*************************************************************************/
-
-  /*
-   *  This structure is used to store a cache for several frequently used
-   *  services.  It is the type of `face->internal->services'.  You
-   *  should only use FT_FACE_LOOKUP_SERVICE to access it.
-   *
-   *  All fields should have the type FT_Pointer to relax compilation
-   *  dependencies.  We assume the developer isn't completely stupid.
-   *
-   *  Each field must be named `service_XXXX' where `XXX' corresponds to
-   *  the correct FT_SERVICE_ID_XXXX macro.  See the definition of
-   *  FT_FACE_LOOKUP_SERVICE below how this is implemented.
-   *
-   */
-  typedef struct  FT_ServiceCacheRec_
-  {
-    FT_Pointer  service_POSTSCRIPT_FONT_NAME;
-    FT_Pointer  service_MULTI_MASTERS;
-    FT_Pointer  service_GLYPH_DICT;
-    FT_Pointer  service_PFR_METRICS;
-    FT_Pointer  service_WINFNT;
-
-  } FT_ServiceCacheRec, *FT_ServiceCache;
-
-
-  /*
-   *  A magic number used within the services cache.
-   */
-#define FT_SERVICE_UNAVAILABLE  ((FT_Pointer)-2)  /* magic number */
-
-
-  /*
-   * @macro:
-   *   FT_FACE_LOOKUP_SERVICE
-   *
-   * @description:
-   *   This macro is used to lookup a service from a face's driver module
-   *   using its cache.
-   *
-   * @input:
-   *   face::
-   *     The source face handle containing the cache.
-   *
-   *   field ::
-   *     The field name in the cache.
-   *
-   *   id ::
-   *     The service ID.
-   *
-   * @output:
-   *   ptr ::
-   *     A variable receiving the service data.  NULL if not available.
-   */
-#define FT_FACE_LOOKUP_SERVICE( face, ptr, id )                  \
-  FT_BEGIN_STMNT                                                 \
-    /* the strange cast is to allow C++ compilation */           \
-    FT_Pointer*  pptr = (FT_Pointer*)&(ptr);                     \
-    FT_Pointer   svc;                                            \
-                                                                 \
-                                                                 \
-    svc = FT_FACE(face)->internal->services. service_ ## id ;    \
-    if ( svc == FT_SERVICE_UNAVAILABLE )                         \
-      svc = NULL;                                                \
-    else if ( svc == NULL )                                      \
-    {                                                            \
-      FT_FACE_FIND_SERVICE( face, svc, id );                     \
-                                                                 \
-      FT_FACE(face)->internal->services. service_ ## id =        \
-        (FT_Pointer)( svc != NULL ? svc                          \
-                                  : FT_SERVICE_UNAVAILABLE );    \
-    }                                                            \
-    *pptr = svc;                                                 \
-  FT_END_STMNT
-
-
-  /*
-   *  A macro used to define new service structure types.
-   */
-
-#define FT_DEFINE_SERVICE( name )            \
-  typedef struct FT_Service_ ## name ## Rec_ \
-    FT_Service_ ## name ## Rec ;             \
-  typedef struct FT_Service_ ## name ## Rec_ \
-    const * FT_Service_ ## name ;            \
-  struct FT_Service_ ## name ## Rec_
-
-  /* */
-
-  /*
-   *  The header files containing the services.
-   */
-
-#define FT_SERVICE_MULTIPLE_MASTERS_H  <freetype/internal/services/svmm.h>
-#define FT_SERVICE_POSTSCRIPT_NAME_H   <freetype/internal/services/svpostnm.h>
-#define FT_SERVICE_POSTSCRIPT_CMAPS_H  <freetype/internal/services/svpscmap.h>
-#define FT_SERVICE_POSTSCRIPT_INFO_H   <freetype/internal/services/svpsinfo.h>
-#define FT_SERVICE_GLYPH_DICT_H        <freetype/internal/services/svgldict.h>
-#define FT_SERVICE_BDF_H               <freetype/internal/services/svbdf.h>
-#define FT_SERVICE_XFREE86_NAME_H      <freetype/internal/services/svxf86nm.h>
-#define FT_SERVICE_SFNT_H              <freetype/internal/services/svsfnt.h>
-#define FT_SERVICE_PFR_H               <freetype/internal/services/svpfr.h>
-#define FT_SERVICE_WINFNT_H            <freetype/internal/services/svwinfnt.h>
-
- /* */
-
-FT_END_HEADER
-
-#endif /* __FTSERV_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/internal/ftstream.h b/extra_lib/include/freetype/freetype/internal/ftstream.h
deleted file mode 100644
index 618f64a..0000000
--- a/extra_lib/include/freetype/freetype/internal/ftstream.h
+++ /dev/null
@@ -1,498 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ftstream.h                                                             */
-/*                                                                         */
-/*    Stream handling (specification).                                     */
-/*                                                                         */
-/*  Copyright 1996-2001, 2002 by                                           */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __FTSTREAM_H__
-#define __FTSTREAM_H__
-
-
-#include <ft2build.h>
-#include FT_SYSTEM_H
-#include FT_INTERNAL_OBJECTS_H
-
-
-FT_BEGIN_HEADER
-
-
-  /* format of an 8-bit frame_op value:           */
-  /*                                              */
-  /* bit  76543210                                */
-  /*      xxxxxxes                                */
-  /*                                              */
-  /* s is set to 1 if the value is signed.        */
-  /* e is set to 1 if the value is little-endian. */
-  /* xxx is a command.                            */
-
-#define FT_FRAME_OP_SHIFT         2
-#define FT_FRAME_OP_SIGNED        1
-#define FT_FRAME_OP_LITTLE        2
-#define FT_FRAME_OP_COMMAND( x )  ( x >> FT_FRAME_OP_SHIFT )
-
-#define FT_MAKE_FRAME_OP( command, little, sign ) \
-          ( ( command << FT_FRAME_OP_SHIFT ) | ( little << 1 ) | sign )
-
-#define FT_FRAME_OP_END    0
-#define FT_FRAME_OP_START  1  /* start a new frame     */
-#define FT_FRAME_OP_BYTE   2  /* read 1-byte value     */
-#define FT_FRAME_OP_SHORT  3  /* read 2-byte value     */
-#define FT_FRAME_OP_LONG   4  /* read 4-byte value     */
-#define FT_FRAME_OP_OFF3   5  /* read 3-byte value     */
-#define FT_FRAME_OP_BYTES  6  /* read a bytes sequence */
-
-
-  typedef enum  FT_Frame_Op_
-  {
-    ft_frame_end       = 0,
-    ft_frame_start     = FT_MAKE_FRAME_OP( FT_FRAME_OP_START, 0, 0 ),
-
-    ft_frame_byte      = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTE,  0, 0 ),
-    ft_frame_schar     = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTE,  0, 1 ),
-
-    ft_frame_ushort_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 0, 0 ),
-    ft_frame_short_be  = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 0, 1 ),
-    ft_frame_ushort_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 1, 0 ),
-    ft_frame_short_le  = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 1, 1 ),
-
-    ft_frame_ulong_be  = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 0, 0 ),
-    ft_frame_long_be   = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 0, 1 ),
-    ft_frame_ulong_le  = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 1, 0 ),
-    ft_frame_long_le   = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 1, 1 ),
-
-    ft_frame_uoff3_be  = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 0, 0 ),
-    ft_frame_off3_be   = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 0, 1 ),
-    ft_frame_uoff3_le  = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 1, 0 ),
-    ft_frame_off3_le   = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 1, 1 ),
-
-    ft_frame_bytes     = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTES, 0, 0 ),
-    ft_frame_skip      = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTES, 0, 1 )
-
-  } FT_Frame_Op;
-
-
-  typedef struct  FT_Frame_Field_
-  {
-    FT_Byte    value;
-    FT_Byte    size;
-    FT_UShort  offset;
-
-  } FT_Frame_Field;
-
-
-  /* Construct an FT_Frame_Field out of a structure type and a field name. */
-  /* The structure type must be set in the FT_STRUCTURE macro before       */
-  /* calling the FT_FRAME_START() macro.                                   */
-  /*                                                                       */
-#define FT_FIELD_SIZE( f ) \
-          (FT_Byte)sizeof ( ((FT_STRUCTURE*)0)->f )
-
-#define FT_FIELD_SIZE_DELTA( f ) \
-          (FT_Byte)sizeof ( ((FT_STRUCTURE*)0)->f[0] )
-
-#define FT_FIELD_OFFSET( f ) \
-          (FT_UShort)( offsetof( FT_STRUCTURE, f ) )
-
-#define FT_FRAME_FIELD( frame_op, field ) \
-          {                               \
-            frame_op,                     \
-            FT_FIELD_SIZE( field ),       \
-            FT_FIELD_OFFSET( field )      \
-          }
-
-#define FT_MAKE_EMPTY_FIELD( frame_op )  { frame_op, 0, 0 }
-
-#define FT_FRAME_START( size )   { ft_frame_start, 0, size }
-#define FT_FRAME_END             { ft_frame_end, 0, 0 }
-
-#define FT_FRAME_LONG( f )       FT_FRAME_FIELD( ft_frame_long_be, f )
-#define FT_FRAME_ULONG( f )      FT_FRAME_FIELD( ft_frame_ulong_be, f )
-#define FT_FRAME_SHORT( f )      FT_FRAME_FIELD( ft_frame_short_be, f )
-#define FT_FRAME_USHORT( f )     FT_FRAME_FIELD( ft_frame_ushort_be, f )
-#define FT_FRAME_OFF3( f )       FT_FRAME_FIELD( ft_frame_off3_be, f )
-#define FT_FRAME_UOFF3( f )      FT_FRAME_FIELD( ft_frame_uoff3_be, f )
-#define FT_FRAME_BYTE( f )       FT_FRAME_FIELD( ft_frame_byte, f )
-#define FT_FRAME_CHAR( f )       FT_FRAME_FIELD( ft_frame_schar, f )
-
-#define FT_FRAME_LONG_LE( f )    FT_FRAME_FIELD( ft_frame_long_le, f )
-#define FT_FRAME_ULONG_LE( f )   FT_FRAME_FIELD( ft_frame_ulong_le, f )
-#define FT_FRAME_SHORT_LE( f )   FT_FRAME_FIELD( ft_frame_short_le, f )
-#define FT_FRAME_USHORT_LE( f )  FT_FRAME_FIELD( ft_frame_ushort_le, f )
-#define FT_FRAME_OFF3_LE( f )    FT_FRAME_FIELD( ft_frame_off3_le, f )
-#define FT_FRAME_UOFF3_LE( f )   FT_FRAME_FIELD( ft_frame_uoff3_le, f )
-
-#define FT_FRAME_SKIP_LONG       { ft_frame_long_be, 0, 0 }
-#define FT_FRAME_SKIP_SHORT      { ft_frame_short_be, 0, 0 }
-#define FT_FRAME_SKIP_BYTE       { ft_frame_byte, 0, 0 }
-
-#define FT_FRAME_BYTES( field, count ) \
-          {                            \
-            ft_frame_bytes,            \
-            count,                     \
-            FT_FIELD_OFFSET( field )   \
-          }
-
-#define FT_FRAME_SKIP_BYTES( count )  { ft_frame_skip, count, 0 }
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Integer extraction macros -- the `buffer' parameter must ALWAYS be of */
-  /* type `char*' or equivalent (1-byte elements).                         */
-  /*                                                                       */
-
-#define FT_BYTE_( p, i )  ( ((const FT_Byte*)(p))[(i)] )
-#define FT_INT8_( p, i )  ( ((const FT_Char*)(p))[(i)] )
-
-#define FT_INT16( x )   ( (FT_Int16)(x)  )
-#define FT_UINT16( x )  ( (FT_UInt16)(x) )
-#define FT_INT32( x )   ( (FT_Int32)(x)  )
-#define FT_UINT32( x )  ( (FT_UInt32)(x) )
-
-#define FT_BYTE_I16( p, i, s )  ( FT_INT16(  FT_BYTE_( p, i ) ) << (s) )
-#define FT_BYTE_U16( p, i, s )  ( FT_UINT16( FT_BYTE_( p, i ) ) << (s) )
-#define FT_BYTE_I32( p, i, s )  ( FT_INT32(  FT_BYTE_( p, i ) ) << (s) )
-#define FT_BYTE_U32( p, i, s )  ( FT_UINT32( FT_BYTE_( p, i ) ) << (s) )
-
-#define FT_INT8_I16( p, i, s )  ( FT_INT16(  FT_INT8_( p, i ) ) << (s) )
-#define FT_INT8_U16( p, i, s )  ( FT_UINT16( FT_INT8_( p, i ) ) << (s) )
-#define FT_INT8_I32( p, i, s )  ( FT_INT32(  FT_INT8_( p, i ) ) << (s) )
-#define FT_INT8_U32( p, i, s )  ( FT_UINT32( FT_INT8_( p, i ) ) << (s) )
-
-
-#define FT_PEEK_SHORT( p )  FT_INT16( FT_INT8_I16( p, 0, 8) | \
-                                      FT_BYTE_I16( p, 1, 0) )
-
-#define FT_PEEK_USHORT( p )  FT_UINT16( FT_BYTE_U16( p, 0, 8 ) | \
-                                        FT_BYTE_U16( p, 1, 0 ) )
-
-#define FT_PEEK_LONG( p )  FT_INT32( FT_INT8_I32( p, 0, 24 ) | \
-                                     FT_BYTE_I32( p, 1, 16 ) | \
-                                     FT_BYTE_I32( p, 2,  8 ) | \
-                                     FT_BYTE_I32( p, 3,  0 ) )
-
-#define FT_PEEK_ULONG( p )  FT_UINT32( FT_BYTE_U32( p, 0, 24 ) | \
-                                       FT_BYTE_U32( p, 1, 16 ) | \
-                                       FT_BYTE_U32( p, 2,  8 ) | \
-                                       FT_BYTE_U32( p, 3,  0 ) )
-
-#define FT_PEEK_OFF3( p )  FT_INT32( FT_INT8_I32( p, 0, 16 ) | \
-                                     FT_BYTE_I32( p, 1,  8 ) | \
-                                     FT_BYTE_I32( p, 2,  0 ) )
-
-#define FT_PEEK_UOFF3( p )  FT_UINT32( FT_BYTE_U32( p, 0, 16 ) | \
-                                       FT_BYTE_U32( p, 1,  8 ) | \
-                                       FT_BYTE_U32( p, 2,  0 ) )
-
-#define FT_PEEK_SHORT_LE( p )  FT_INT16( FT_INT8_I16( p, 1, 8 ) | \
-                                         FT_BYTE_I16( p, 0, 0 ) )
-
-#define FT_PEEK_USHORT_LE( p )  FT_UINT16( FT_BYTE_U16( p, 1, 8 ) |  \
-                                           FT_BYTE_U16( p, 0, 0 ) )
-
-#define FT_PEEK_LONG_LE( p )  FT_INT32( FT_INT8_I32( p, 3, 24 ) | \
-                                        FT_BYTE_I32( p, 2, 16 ) | \
-                                        FT_BYTE_I32( p, 1,  8 ) | \
-                                        FT_BYTE_I32( p, 0,  0 ) )
-
-#define FT_PEEK_ULONG_LE( p )  FT_UINT32( FT_BYTE_U32( p, 3, 24 ) | \
-                                          FT_BYTE_U32( p, 2, 16 ) | \
-                                          FT_BYTE_U32( p, 1,  8 ) | \
-                                          FT_BYTE_U32( p, 0,  0 ) )
-
-#define FT_PEEK_OFF3_LE( p )  FT_INT32( FT_INT8_I32( p, 2, 16 ) | \
-                                        FT_BYTE_I32( p, 1,  8 ) | \
-                                        FT_BYTE_I32( p, 0,  0 ) )
-
-#define FT_PEEK_UOFF3_LE( p )  FT_UINT32( FT_BYTE_U32( p, 2, 16 ) | \
-                                          FT_BYTE_U32( p, 1,  8 ) | \
-                                          FT_BYTE_U32( p, 0,  0 ) )
-
-
-#define FT_NEXT_CHAR( buffer )       \
-          ( (signed char)*buffer++ )
-
-#define FT_NEXT_BYTE( buffer )         \
-          ( (unsigned char)*buffer++ )
-
-#define FT_NEXT_SHORT( buffer )                                   \
-          ( (short)( buffer += 2, FT_PEEK_SHORT( buffer - 2 ) ) )
-
-#define FT_NEXT_USHORT( buffer )                                            \
-          ( (unsigned short)( buffer += 2, FT_PEEK_USHORT( buffer - 2 ) ) )
-
-#define FT_NEXT_OFF3( buffer )                                  \
-          ( (long)( buffer += 3, FT_PEEK_OFF3( buffer - 3 ) ) )
-
-#define FT_NEXT_UOFF3( buffer )                                           \
-          ( (unsigned long)( buffer += 3, FT_PEEK_UOFF3( buffer - 3 ) ) )
-
-#define FT_NEXT_LONG( buffer )                                  \
-          ( (long)( buffer += 4, FT_PEEK_LONG( buffer - 4 ) ) )
-
-#define FT_NEXT_ULONG( buffer )                                           \
-          ( (unsigned long)( buffer += 4, FT_PEEK_ULONG( buffer - 4 ) ) )
-
-
-#define FT_NEXT_SHORT_LE( buffer )                                   \
-          ( (short)( buffer += 2, FT_PEEK_SHORT_LE( buffer - 2 ) ) )
-
-#define FT_NEXT_USHORT_LE( buffer )                                            \
-          ( (unsigned short)( buffer += 2, FT_PEEK_USHORT_LE( buffer - 2 ) ) )
-
-#define FT_NEXT_OFF3_LE( buffer )                                  \
-          ( (long)( buffer += 3, FT_PEEK_OFF3_LE( buffer - 3 ) ) )
-
-#define FT_NEXT_UOFF3_LE( buffer )                                           \
-          ( (unsigned long)( buffer += 3, FT_PEEK_UOFF3_LE( buffer - 3 ) ) )
-
-#define FT_NEXT_LONG_LE( buffer )                                  \
-          ( (long)( buffer += 4, FT_PEEK_LONG_LE( buffer - 4 ) ) )
-
-#define FT_NEXT_ULONG_LE( buffer )                                           \
-          ( (unsigned long)( buffer += 4, FT_PEEK_ULONG_LE( buffer - 4 ) ) )
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Each GET_xxxx() macro uses an implicit `stream' variable.             */
-  /*                                                                       */
-#define FT_GET_MACRO( func, type )        ( (type)func( stream ) )
-
-#define FT_GET_CHAR()       FT_GET_MACRO( FT_Stream_GetChar, FT_Char )
-#define FT_GET_BYTE()       FT_GET_MACRO( FT_Stream_GetChar, FT_Byte )
-#define FT_GET_SHORT()      FT_GET_MACRO( FT_Stream_GetShort, FT_Short )
-#define FT_GET_USHORT()     FT_GET_MACRO( FT_Stream_GetShort, FT_UShort )
-#define FT_GET_OFF3()       FT_GET_MACRO( FT_Stream_GetOffset, FT_Long )
-#define FT_GET_UOFF3()      FT_GET_MACRO( FT_Stream_GetOffset, FT_ULong )
-#define FT_GET_LONG()       FT_GET_MACRO( FT_Stream_GetLong, FT_Long )
-#define FT_GET_ULONG()      FT_GET_MACRO( FT_Stream_GetLong, FT_ULong )
-#define FT_GET_TAG4()       FT_GET_MACRO( FT_Stream_GetLong, FT_ULong )
-
-#define FT_GET_SHORT_LE()   FT_GET_MACRO( FT_Stream_GetShortLE, FT_Short )
-#define FT_GET_USHORT_LE()  FT_GET_MACRO( FT_Stream_GetShortLE, FT_UShort )
-#define FT_GET_LONG_LE()    FT_GET_MACRO( FT_Stream_GetLongLE, FT_Long )
-#define FT_GET_ULONG_LE()   FT_GET_MACRO( FT_Stream_GetLongLE, FT_ULong )
-
-#define FT_READ_MACRO( func, type, var )        \
-          ( var = (type)func( stream, &error ), \
-            error != FT_Err_Ok )
-
-#define FT_READ_BYTE( var )       FT_READ_MACRO( FT_Stream_ReadChar, FT_Byte, var )
-#define FT_READ_CHAR( var )       FT_READ_MACRO( FT_Stream_ReadChar, FT_Char, var )
-#define FT_READ_SHORT( var )      FT_READ_MACRO( FT_Stream_ReadShort, FT_Short, var )
-#define FT_READ_USHORT( var )     FT_READ_MACRO( FT_Stream_ReadShort, FT_UShort, var )
-#define FT_READ_OFF3( var )       FT_READ_MACRO( FT_Stream_ReadOffset, FT_Long, var )
-#define FT_READ_UOFF3( var )      FT_READ_MACRO( FT_Stream_ReadOffset, FT_ULong, var )
-#define FT_READ_LONG( var )       FT_READ_MACRO( FT_Stream_ReadLong, FT_Long, var )
-#define FT_READ_ULONG( var )      FT_READ_MACRO( FT_Stream_ReadLong, FT_ULong, var )
-
-#define FT_READ_SHORT_LE( var )   FT_READ_MACRO( FT_Stream_ReadShortLE, FT_Short, var )
-#define FT_READ_USHORT_LE( var )  FT_READ_MACRO( FT_Stream_ReadShortLE, FT_UShort, var )
-#define FT_READ_LONG_LE( var )    FT_READ_MACRO( FT_Stream_ReadLongLE, FT_Long, var )
-#define FT_READ_ULONG_LE( var )   FT_READ_MACRO( FT_Stream_ReadLongLE, FT_ULong, var )
-
-
-#ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM
-
-  /* initialize a stream for reading a regular system stream */
-  FT_EXPORT( FT_Error )
-  FT_Stream_Open( FT_Stream    stream,
-                  const char*  filepathname );
-
-#endif /* FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM */
-
-
-  /* initialize a stream for reading in-memory data */
-  FT_BASE( void )
-  FT_Stream_OpenMemory( FT_Stream       stream,
-                        const FT_Byte*  base,
-                        FT_ULong        size );
-
-  /* close a stream (does not destroy the stream structure) */
-  FT_BASE( void )
-  FT_Stream_Close( FT_Stream  stream );
-
-
-  /* seek within a stream. position is relative to start of stream */
-  FT_BASE( FT_Error )
-  FT_Stream_Seek( FT_Stream  stream,
-                  FT_ULong   pos );
-
-  /* skip bytes in a stream */
-  FT_BASE( FT_Error )
-  FT_Stream_Skip( FT_Stream  stream,
-                  FT_Long    distance );
-
-  /* return current stream position */
-  FT_BASE( FT_Long )
-  FT_Stream_Pos( FT_Stream  stream );
-
-  /* read bytes from a stream into a user-allocated buffer, returns an */
-  /* error if not all bytes could be read.                             */
-  FT_BASE( FT_Error )
-  FT_Stream_Read( FT_Stream  stream,
-                  FT_Byte*   buffer,
-                  FT_ULong   count );
-
-  /* read bytes from a stream at a given position */
-  FT_BASE( FT_Error )
-  FT_Stream_ReadAt( FT_Stream  stream,
-                    FT_ULong   pos,
-                    FT_Byte*   buffer,
-                    FT_ULong   count );
-
-  /* Enter a frame of `count' consecutive bytes in a stream.  Returns an */
-  /* error if the frame could not be read/accessed.  The caller can use  */
-  /* the FT_Stream_Get_XXX functions to retrieve frame data without      */
-  /* error checks.                                                       */
-  /*                                                                     */
-  /* You must _always_ call FT_Stream_ExitFrame() once you have entered  */
-  /* a stream frame!                                                     */
-  /*                                                                     */
-  FT_BASE( FT_Error )
-  FT_Stream_EnterFrame( FT_Stream  stream,
-                        FT_ULong   count );
-
-  /* exit a stream frame */
-  FT_BASE( void )
-  FT_Stream_ExitFrame( FT_Stream  stream );
-
-  /* Extract a stream frame.  If the stream is disk-based, a heap block */
-  /* is allocated and the frame bytes are read into it.  If the stream  */
-  /* is memory-based, this function simply set a pointer to the data.   */
-  /*                                                                    */
-  /* Useful to optimize access to memory-based streams transparently.   */
-  /*                                                                    */
-  /* All extracted frames must be `freed` with a call to the function   */
-  /* FT_Stream_ReleaseFrame().                                          */
-  /*                                                                    */
-  FT_BASE( FT_Error )
-  FT_Stream_ExtractFrame( FT_Stream  stream,
-                          FT_ULong   count,
-                          FT_Byte**  pbytes );
-
-  /* release an extract frame (see FT_Stream_ExtractFrame) */
-  FT_BASE( void )
-  FT_Stream_ReleaseFrame( FT_Stream  stream,
-                          FT_Byte**  pbytes );
-
-  /* read a byte from an entered frame */
-  FT_BASE( FT_Char )
-  FT_Stream_GetChar( FT_Stream  stream );
-
-  /* read a 16-bit big-endian integer from an entered frame */
-  FT_BASE( FT_Short )
-  FT_Stream_GetShort( FT_Stream  stream );
-
-  /* read a 24-bit big-endian integer from an entered frame */
-  FT_BASE( FT_Long )
-  FT_Stream_GetOffset( FT_Stream  stream );
-
-  /* read a 32-bit big-endian integer from an entered frame */
-  FT_BASE( FT_Long )
-  FT_Stream_GetLong( FT_Stream  stream );
-
-  /* read a 16-bit little-endian integer from an entered frame */
-  FT_BASE( FT_Short )
-  FT_Stream_GetShortLE( FT_Stream  stream );
-
-  /* read a 32-bit little-endian integer from an entered frame */
-  FT_BASE( FT_Long )
-  FT_Stream_GetLongLE( FT_Stream  stream );
-
-
-  /* read a byte from a stream */
-  FT_BASE( FT_Char )
-  FT_Stream_ReadChar( FT_Stream  stream,
-                      FT_Error*  error );
-
-  /* read a 16-bit big-endian integer from a stream */
-  FT_BASE( FT_Short )
-  FT_Stream_ReadShort( FT_Stream  stream,
-                       FT_Error*  error );
-
-  /* read a 24-bit big-endian integer from a stream */
-  FT_BASE( FT_Long )
-  FT_Stream_ReadOffset( FT_Stream  stream,
-                        FT_Error*  error );
-
-  /* read a 32-bit big-endian integer from a stream */
-  FT_BASE( FT_Long )
-  FT_Stream_ReadLong( FT_Stream  stream,
-                      FT_Error*  error );
-
-  /* read a 16-bit little-endian integer from a stream */
-  FT_BASE( FT_Short )
-  FT_Stream_ReadShortLE( FT_Stream  stream,
-                         FT_Error*  error );
-
-  /* read a 32-bit little-endian integer from a stream */
-  FT_BASE( FT_Long )
-  FT_Stream_ReadLongLE( FT_Stream  stream,
-                        FT_Error*  error );
-
-  /* Read a structure from a stream.  The structure must be described */
-  /* by an array of FT_Frame_Field records.                           */
-  FT_BASE( FT_Error )
-  FT_Stream_ReadFields( FT_Stream              stream,
-                        const FT_Frame_Field*  fields,
-                        void*                  structure );
-
-
-#define FT_STREAM_POS()           \
-          FT_Stream_Pos( stream )
-
-#define FT_STREAM_SEEK( position )                           \
-          FT_SET_ERROR( FT_Stream_Seek( stream, position ) )
-
-#define FT_STREAM_SKIP( distance )                           \
-          FT_SET_ERROR( FT_Stream_Skip( stream, distance ) )
-
-#define FT_STREAM_READ( buffer, count )                   \
-          FT_SET_ERROR( FT_Stream_Read( stream,           \
-                                        (FT_Byte*)buffer, \
-                                        count ) )
-
-#define FT_STREAM_READ_AT( position, buffer, count )         \
-          FT_SET_ERROR( FT_Stream_ReadAt( stream,            \
-                                           position,         \
-                                           (FT_Byte*)buffer, \
-                                           count ) )
-
-#define FT_STREAM_READ_FIELDS( fields, object )                          \
-          FT_SET_ERROR( FT_Stream_ReadFields( stream, fields, object ) )
-
-
-#define FT_FRAME_ENTER( size )                                 \
-          FT_SET_ERROR( FT_Stream_EnterFrame( stream, size ) )
-
-#define FT_FRAME_EXIT()                 \
-          FT_Stream_ExitFrame( stream )
-
-#define FT_FRAME_EXTRACT( size, bytes )                                 \
-          FT_SET_ERROR( FT_Stream_ExtractFrame( stream, size,           \
-                                                (FT_Byte**)&(bytes) ) )
-
-#define FT_FRAME_RELEASE( bytes )                               \
-          FT_Stream_ReleaseFrame( stream, (FT_Byte**)&(bytes) )
-
-
-FT_END_HEADER
-
-#endif /* __FTSTREAM_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/internal/fttrace.h b/extra_lib/include/freetype/freetype/internal/fttrace.h
deleted file mode 100644
index ffc0b14..0000000
--- a/extra_lib/include/freetype/freetype/internal/fttrace.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  fttrace.h                                                              */
-/*                                                                         */
-/*    Tracing handling (specification only).                               */
-/*                                                                         */
-/*  Copyright 2002 by                                                      */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-/* definitions of trace levels for FreeType 2 */
-
-/* the first level must always be `trace_any' */
-FT_TRACE_DEF( any )
-
-/* base components */
-FT_TRACE_DEF( calc )      /* calculations            (ftcalc.c)   */
-FT_TRACE_DEF( memory )    /* memory manager          (ftobjs.c)   */
-FT_TRACE_DEF( stream )    /* stream manager          (ftstream.c) */
-FT_TRACE_DEF( io )        /* i/o interface           (ftsystem.c) */
-FT_TRACE_DEF( list )      /* list management         (ftlist.c)   */
-FT_TRACE_DEF( init )      /* initialization          (ftinit.c)   */
-FT_TRACE_DEF( objs )      /* base objects            (ftobjs.c)   */
-FT_TRACE_DEF( outline )   /* outline management      (ftoutln.c)  */
-FT_TRACE_DEF( glyph )     /* glyph management        (ftglyph.c)  */
-
-FT_TRACE_DEF( raster )    /* monochrome rasterizer   (ftraster.c) */
-FT_TRACE_DEF( smooth )    /* anti-aliasing raster    (ftgrays.c)  */
-FT_TRACE_DEF( mm )        /* MM interface            (ftmm.c)     */
-
-/* Cache sub-system */
-FT_TRACE_DEF( cache )     /* cache sub-system        (ftcache.c, etc..) */
-
-/* SFNT driver components */
-FT_TRACE_DEF( sfobjs )    /*  SFNT object handler     (sfobjs.c)   */
-FT_TRACE_DEF( ttcmap )    /* charmap handler         (ttcmap.c)    */
-FT_TRACE_DEF( ttload )    /* basic TrueType tables   (ttload.c)    */
-FT_TRACE_DEF( ttpost )    /* PS table processing     (ttpost.c)   */
-FT_TRACE_DEF( ttsbit )    /* TrueType sbit handling  (ttsbit.c)   */
-
-/* TrueType driver components */
-FT_TRACE_DEF( ttdriver )  /* TT font driver          (ttdriver.c) */
-FT_TRACE_DEF( ttgload )   /* TT glyph loader         (ttgload.c)  */
-FT_TRACE_DEF( ttinterp )  /* bytecode interpreter    (ttinterp.c) */
-FT_TRACE_DEF( ttobjs )    /* TT objects manager      (ttobjs.c)   */
-FT_TRACE_DEF( ttpload )   /* TT data/program loader  (ttpload.c)  */
-
-/* Type 1 driver components */
-FT_TRACE_DEF( t1driver )
-FT_TRACE_DEF( t1gload )
-FT_TRACE_DEF( t1hint )
-FT_TRACE_DEF( t1load )
-FT_TRACE_DEF( t1objs )
-FT_TRACE_DEF( t1parse )
-
-/* PostScript helper module `psaux' */
-FT_TRACE_DEF( t1decode )
-FT_TRACE_DEF( psobjs )
-
-/* PostScript hinting module `pshinter' */
-FT_TRACE_DEF( pshrec )
-FT_TRACE_DEF( pshalgo1 )
-FT_TRACE_DEF( pshalgo2 )
-
-/* Type 2 driver components */
-FT_TRACE_DEF( cffdriver )
-FT_TRACE_DEF( cffgload )
-FT_TRACE_DEF( cffload )
-FT_TRACE_DEF( cffobjs )
-FT_TRACE_DEF( cffparse )
-
-/* Type 42 driver component */
-FT_TRACE_DEF( t42 )
-
-/* CID driver components */
-FT_TRACE_DEF( cidafm )
-FT_TRACE_DEF( ciddriver )
-FT_TRACE_DEF( cidgload )
-FT_TRACE_DEF( cidload )
-FT_TRACE_DEF( cidobjs )
-FT_TRACE_DEF( cidparse )
-
-/* Windows fonts component */
-FT_TRACE_DEF( winfnt )
-
-/* PCF fonts components */
-FT_TRACE_DEF( pcfdriver )
-FT_TRACE_DEF( pcfread )
-
-/* BDF fonts component */
-FT_TRACE_DEF( bdfdriver )
-FT_TRACE_DEF( bdflib )
-
-/* PFR fonts component */
-FT_TRACE_DEF( pfr )
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/internal/internal.h b/extra_lib/include/freetype/freetype/internal/internal.h
deleted file mode 100644
index 0348789..0000000
--- a/extra_lib/include/freetype/freetype/internal/internal.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  internal.h                                                             */
-/*                                                                         */
-/*    Internal header files (specification only).                          */
-/*                                                                         */
-/*  Copyright 1996-2001, 2002 by                                           */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* This file is automatically included by `ft2build.h'.                  */
-  /* Do not include it manually!                                           */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-#define FT_INTERNAL_OBJECTS_H             <freetype/internal/ftobjs.h>
-#define FT_INTERNAL_STREAM_H              <freetype/internal/ftstream.h>
-#define FT_INTERNAL_MEMORY_H              <freetype/internal/ftmemory.h>
-#define FT_INTERNAL_DEBUG_H               <freetype/internal/ftdebug.h>
-#define FT_INTERNAL_CALC_H                <freetype/internal/ftcalc.h>
-#define FT_INTERNAL_DRIVER_H              <freetype/internal/ftdriver.h>
-#define FT_INTERNAL_TRACE_H               <freetype/internal/fttrace.h>
-#define FT_INTERNAL_GLYPH_LOADER_H        <freetype/internal/ftgloadr.h>
-#define FT_INTERNAL_SFNT_H                <freetype/internal/sfnt.h>
-#define FT_INTERNAL_SERVICE_H             <freetype/internal/ftserv.h>
-
-#define FT_INTERNAL_TRUETYPE_TYPES_H      <freetype/internal/tttypes.h>
-#define FT_INTERNAL_TYPE1_TYPES_H         <freetype/internal/t1types.h>
-
-#define FT_INTERNAL_POSTSCRIPT_AUX_H      <freetype/internal/psaux.h>
-#define FT_INTERNAL_POSTSCRIPT_HINTS_H    <freetype/internal/pshints.h>
-#define FT_INTERNAL_POSTSCRIPT_GLOBALS_H  <freetype/internal/psglobal.h>
-
-#define FT_INTERNAL_AUTOHINT_H            <freetype/internal/autohint.h>
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/internal/pcftypes.h b/extra_lib/include/freetype/freetype/internal/pcftypes.h
deleted file mode 100644
index 382796f..0000000
--- a/extra_lib/include/freetype/freetype/internal/pcftypes.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*  pcftypes.h
-
-  FreeType font driver for pcf fonts
-
-  Copyright (C) 2000, 2001, 2002 by
-  Francesco Zappa Nardelli
-
-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 __PCFTYPES_H__
-#define __PCFTYPES_H__
-
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-
-FT_BEGIN_HEADER
-
-
-  typedef struct  PCF_Public_FaceRec_
-  {
-    FT_FaceRec    root;
-    FT_StreamRec  gzip_stream;
-    FT_Stream     gzip_source;
-
-    char*         charset_encoding;
-    char*         charset_registry;
-
-  } PCF_Public_FaceRec, *PCF_Public_Face;
-
-
-FT_END_HEADER
-
-#endif  /* __PCFTYPES_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/internal/pfr.h b/extra_lib/include/freetype/freetype/internal/pfr.h
deleted file mode 100644
index 51be620..0000000
--- a/extra_lib/include/freetype/freetype/internal/pfr.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  pfr.h                                                                  */
-/*                                                                         */
-/*    Internal PFR service functions (specification only).                 */
-/*                                                                         */
-/*  Copyright 2002, 2003 by                                                */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __PFR_H__
-#define __PFR_H__
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-
-FT_BEGIN_HEADER
-
-  typedef FT_Error  (*FT_PFR_GetMetricsFunc)( FT_Face    face,
-                                              FT_UInt   *aoutline,
-                                              FT_UInt   *ametrics,
-                                              FT_Fixed  *ax_scale,
-                                              FT_Fixed  *ay_scale );
-
-  typedef FT_Error  (*FT_PFR_GetKerningFunc)( FT_Face     face,
-                                              FT_UInt     left,
-                                              FT_UInt     right,
-                                              FT_Vector  *avector );
-
-  typedef FT_Error  (*FT_PFR_GetAdvanceFunc)( FT_Face   face,
-                                              FT_UInt   gindex,
-                                              FT_Pos   *aadvance );
-
-
-  typedef struct  FT_PFR_ServiceRec_
-  {
-    FT_PFR_GetMetricsFunc  get_metrics;
-    FT_PFR_GetKerningFunc  get_kerning;
-    FT_PFR_GetAdvanceFunc  get_advance;
-
-  } FT_PFR_ServiceRec, *FT_PFR_Service;
-
-#define FT_PFR_SERVICE_NAME  "pfr"
-
-
-FT_END_HEADER
-
-#endif /* __PFR_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/internal/psaux.h b/extra_lib/include/freetype/freetype/internal/psaux.h
deleted file mode 100644
index e013d52..0000000
--- a/extra_lib/include/freetype/freetype/internal/psaux.h
+++ /dev/null
@@ -1,733 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  psaux.h                                                                */
-/*                                                                         */
-/*    Auxiliary functions and data structures related to PostScript fonts  */
-/*    (specification).                                                     */
-/*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003 by                                     */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __PSAUX_H__
-#define __PSAUX_H__
-
-
-#include <ft2build.h>
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_TYPE1_TYPES_H
-#include FT_SERVICE_POSTSCRIPT_CMAPS_H
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*****                                                               *****/
-  /*****                             T1_TABLE                          *****/
-  /*****                                                               *****/
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-  typedef struct PS_TableRec_*              PS_Table;
-  typedef const struct PS_Table_FuncsRec_*  PS_Table_Funcs;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    PS_Table_FuncsRec                                                  */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A set of function pointers to manage PS_Table objects.             */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    table_init    :: Used to initialize a table.                       */
-  /*                                                                       */
-  /*    table_done    :: Finalizes resp. destroy a given table.            */
-  /*                                                                       */
-  /*    table_add     :: Adds a new object to a table.                     */
-  /*                                                                       */
-  /*    table_release :: Releases table data, then finalizes it.           */
-  /*                                                                       */
-  typedef struct  PS_Table_FuncsRec_
-  {
-    FT_Error
-    (*init)( PS_Table   table,
-             FT_Int     count,
-             FT_Memory  memory );
-
-    void
-    (*done)( PS_Table  table );
-
-    FT_Error
-    (*add)( PS_Table    table,
-            FT_Int      idx,
-            void*       object,
-            FT_PtrDist  length );
-
-    void
-    (*release)( PS_Table  table );
-
-  } PS_Table_FuncsRec;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    PS_TableRec                                                        */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A PS_Table is a simple object used to store an array of objects in */
-  /*    a single memory block.                                             */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    block     :: The address in memory of the growheap's block.  This  */
-  /*                 can change between two object adds, due to            */
-  /*                 reallocation.                                         */
-  /*                                                                       */
-  /*    cursor    :: The current top of the grow heap within its block.    */
-  /*                                                                       */
-  /*    capacity  :: The current size of the heap block.  Increments by    */
-  /*                 1kByte chunks.                                        */
-  /*                                                                       */
-  /*    max_elems :: The maximum number of elements in table.              */
-  /*                                                                       */
-  /*    num_elems :: The current number of elements in table.              */
-  /*                                                                       */
-  /*    elements  :: A table of element addresses within the block.        */
-  /*                                                                       */
-  /*    lengths   :: A table of element sizes within the block.            */
-  /*                                                                       */
-  /*    memory    :: The object used for memory operations                 */
-  /*                 (alloc/realloc).                                      */
-  /*                                                                       */
-  /*    funcs     :: A table of method pointers for this object.           */
-  /*                                                                       */
-  typedef struct  PS_TableRec_
-  {
-    FT_Byte*           block;          /* current memory block           */
-    FT_Offset          cursor;         /* current cursor in memory block */
-    FT_Offset          capacity;       /* current size of memory block   */
-    FT_Long            init;
-
-    FT_Int             max_elems;
-    FT_Int             num_elems;
-    FT_Byte**          elements;       /* addresses of table elements */
-    FT_Int*            lengths;        /* lengths of table elements   */
-
-    FT_Memory          memory;
-    PS_Table_FuncsRec  funcs;
-
-  } PS_TableRec;
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*****                                                               *****/
-  /*****                       T1 FIELDS & TOKENS                      *****/
-  /*****                                                               *****/
-  /*************************************************************************/
-  /*************************************************************************/
-
-  typedef struct PS_ParserRec_*  PS_Parser;
-
-  typedef struct T1_TokenRec_*   T1_Token;
-
-  typedef struct T1_FieldRec_*   T1_Field;
-
-
-  /* simple enumeration type used to identify token types */
-  typedef enum  T1_TokenType_
-  {
-    T1_TOKEN_TYPE_NONE = 0,
-    T1_TOKEN_TYPE_ANY,
-    T1_TOKEN_TYPE_STRING,
-    T1_TOKEN_TYPE_ARRAY,
-
-    /* do not remove */
-    T1_TOKEN_TYPE_MAX
-
-  } T1_TokenType;
-
-
-  /* a simple structure used to identify tokens */
-  typedef struct  T1_TokenRec_
-  {
-    FT_Byte*      start;   /* first character of token in input stream */
-    FT_Byte*      limit;   /* first character after the token          */
-    T1_TokenType  type;    /* type of token                            */
-
-  } T1_TokenRec;
-
-
-  /* enumeration type used to identify object fields */
-  typedef enum  T1_FieldType_
-  {
-    T1_FIELD_TYPE_NONE = 0,
-    T1_FIELD_TYPE_BOOL,
-    T1_FIELD_TYPE_INTEGER,
-    T1_FIELD_TYPE_FIXED,
-    T1_FIELD_TYPE_FIXED_1000,
-    T1_FIELD_TYPE_STRING,
-    T1_FIELD_TYPE_KEY,
-    T1_FIELD_TYPE_BBOX,
-    T1_FIELD_TYPE_INTEGER_ARRAY,
-    T1_FIELD_TYPE_FIXED_ARRAY,
-    T1_FIELD_TYPE_CALLBACK,
-
-    /* do not remove */
-    T1_FIELD_TYPE_MAX
-
-  } T1_FieldType;
-
-
-  typedef enum  T1_FieldLocation_
-  {
-    T1_FIELD_LOCATION_CID_INFO,
-    T1_FIELD_LOCATION_FONT_DICT,
-    T1_FIELD_LOCATION_FONT_INFO,
-    T1_FIELD_LOCATION_PRIVATE,
-    T1_FIELD_LOCATION_BBOX,
-
-    /* do not remove */
-    T1_FIELD_LOCATION_MAX
-
-  } T1_FieldLocation;
-
-
-  typedef void
-  (*T1_Field_ParseFunc)( FT_Face     face,
-                         FT_Pointer  parser );
-
-
-  /* structure type used to model object fields */
-  typedef struct  T1_FieldRec_
-  {
-    const char*         ident;        /* field identifier               */
-    T1_FieldLocation    location;
-    T1_FieldType        type;         /* type of field                  */
-    T1_Field_ParseFunc  reader;
-    FT_UInt             offset;       /* offset of field in object      */
-    FT_Byte             size;         /* size of field in bytes         */
-    FT_UInt             array_max;    /* maximal number of elements for */
-                                      /* array                          */
-    FT_UInt             count_offset; /* offset of element count for    */
-                                      /* arrays                         */
-  } T1_FieldRec;
-
-
-#define T1_NEW_SIMPLE_FIELD( _ident, _type, _fname ) \
-          {                                          \
-            _ident, T1CODE, _type,                   \
-            0,                                       \
-            FT_FIELD_OFFSET( _fname ),               \
-            FT_FIELD_SIZE( _fname ),                 \
-            0, 0                                     \
-          },
-
-#define T1_NEW_CALLBACK_FIELD( _ident, _reader )    \
-          {                                         \
-            _ident, T1CODE, T1_FIELD_TYPE_CALLBACK, \
-            (T1_Field_ParseFunc)_reader,            \
-            0, 0,                                   \
-            0, 0                                    \
-          },
-
-#define T1_NEW_TABLE_FIELD( _ident, _type, _fname, _max ) \
-          {                                               \
-            _ident, T1CODE, _type,                        \
-            0,                                            \
-            FT_FIELD_OFFSET( _fname ),                    \
-            FT_FIELD_SIZE_DELTA( _fname ),                \
-            _max,                                         \
-            FT_FIELD_OFFSET( num_ ## _fname )             \
-          },
-
-#define T1_NEW_TABLE_FIELD2( _ident, _type, _fname, _max ) \
-          {                                                \
-            _ident, T1CODE, _type,                         \
-            0,                                             \
-            FT_FIELD_OFFSET( _fname ),                     \
-            FT_FIELD_SIZE_DELTA( _fname ),                 \
-            _max, 0                                        \
-          },
-
-
-#define T1_FIELD_BOOL( _ident, _fname )                             \
-          T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_BOOL, _fname )
-
-#define T1_FIELD_NUM( _ident, _fname )                                 \
-          T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_INTEGER, _fname )
-
-#define T1_FIELD_FIXED( _ident, _fname )                             \
-          T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_FIXED, _fname )
-
-#define T1_FIELD_FIXED_1000( _ident, _fname )                             \
-          T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_FIXED_1000, _fname )
-
-#define T1_FIELD_STRING( _ident, _fname )                             \
-          T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_STRING, _fname )
-
-#define T1_FIELD_KEY( _ident, _fname )                             \
-          T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_KEY, _fname )
-
-#define T1_FIELD_BBOX( _ident, _fname )                             \
-          T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_BBOX, _fname )
-
-
-#define T1_FIELD_NUM_TABLE( _ident, _fname, _fmax )                \
-          T1_NEW_TABLE_FIELD( _ident, T1_FIELD_TYPE_INTEGER_ARRAY, \
-                              _fname, _fmax )
-
-#define T1_FIELD_FIXED_TABLE( _ident, _fname, _fmax )            \
-          T1_NEW_TABLE_FIELD( _ident, T1_FIELD_TYPE_FIXED_ARRAY, \
-                              _fname, _fmax )
-
-#define T1_FIELD_NUM_TABLE2( _ident, _fname, _fmax )                \
-          T1_NEW_TABLE_FIELD2( _ident, T1_FIELD_TYPE_INTEGER_ARRAY, \
-                               _fname, _fmax )
-
-#define T1_FIELD_FIXED_TABLE2( _ident, _fname, _fmax )            \
-          T1_NEW_TABLE_FIELD2( _ident, T1_FIELD_TYPE_FIXED_ARRAY, \
-                               _fname, _fmax )
-
-#define T1_FIELD_CALLBACK( _ident, _name )       \
-          T1_NEW_CALLBACK_FIELD( _ident, _name )
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*****                                                               *****/
-  /*****                            T1 PARSER                          *****/
-  /*****                                                               *****/
-  /*************************************************************************/
-  /*************************************************************************/
-
-  typedef const struct PS_Parser_FuncsRec_*  PS_Parser_Funcs;
-
-  typedef struct  PS_Parser_FuncsRec_
-  {
-    void
-    (*init)( PS_Parser  parser,
-             FT_Byte*   base,
-             FT_Byte*   limit,
-             FT_Memory  memory );
-
-    void
-    (*done)( PS_Parser  parser );
-
-    void
-    (*skip_spaces)( PS_Parser  parser );
-    void
-    (*skip_PS_token)( PS_Parser  parser );
-
-    FT_Long
-    (*to_int)( PS_Parser  parser );
-    FT_Fixed
-    (*to_fixed)( PS_Parser  parser,
-                 FT_Int     power_ten );
-
-    FT_Error
-    (*to_bytes)( PS_Parser  parser,
-                 FT_Byte*   bytes,
-                 FT_Long    max_bytes,
-                 FT_Long*   pnum_bytes,
-                 FT_Bool    delimiters );
-
-    FT_Int
-    (*to_coord_array)( PS_Parser  parser,
-                       FT_Int     max_coords,
-                       FT_Short*  coords );
-    FT_Int
-    (*to_fixed_array)( PS_Parser  parser,
-                       FT_Int     max_values,
-                       FT_Fixed*  values,
-                       FT_Int     power_ten );
-
-    void
-    (*to_token)( PS_Parser  parser,
-                 T1_Token   token );
-    void
-    (*to_token_array)( PS_Parser  parser,
-                       T1_Token   tokens,
-                       FT_UInt    max_tokens,
-                       FT_Int*    pnum_tokens );
-
-    FT_Error
-    (*load_field)( PS_Parser       parser,
-                   const T1_Field  field,
-                   void**          objects,
-                   FT_UInt         max_objects,
-                   FT_ULong*       pflags );
-
-    FT_Error
-    (*load_field_table)( PS_Parser       parser,
-                         const T1_Field  field,
-                         void**          objects,
-                         FT_UInt         max_objects,
-                         FT_ULong*       pflags );
-
-  } PS_Parser_FuncsRec;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    PS_ParserRec                                                       */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A PS_Parser is an object used to parse a Type 1 font very quickly. */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    cursor :: The current position in the text.                        */
-  /*                                                                       */
-  /*    base   :: Start of the processed text.                             */
-  /*                                                                       */
-  /*    limit  :: End of the processed text.                               */
-  /*                                                                       */
-  /*    error  :: The last error returned.                                 */
-  /*                                                                       */
-  /*    memory :: The object used for memory operations (alloc/realloc).   */
-  /*                                                                       */
-  /*    funcs  :: A table of functions for the parser.                     */
-  /*                                                                       */
-  typedef struct  PS_ParserRec_
-  {
-    FT_Byte*   cursor;
-    FT_Byte*   base;
-    FT_Byte*   limit;
-    FT_Error   error;
-    FT_Memory  memory;
-
-    PS_Parser_FuncsRec  funcs;
-
-  } PS_ParserRec;
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*****                                                               *****/
-  /*****                         T1 BUILDER                            *****/
-  /*****                                                               *****/
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-  typedef struct T1_BuilderRec_*  T1_Builder;
-
-
-  typedef FT_Error
-  (*T1_Builder_Check_Points_Func)( T1_Builder  builder,
-                                   FT_Int      count );
-
-  typedef void
-  (*T1_Builder_Add_Point_Func)( T1_Builder  builder,
-                                FT_Pos      x,
-                                FT_Pos      y,
-                                FT_Byte     flag );
-
-  typedef FT_Error
-  (*T1_Builder_Add_Point1_Func)( T1_Builder  builder,
-                                 FT_Pos      x,
-                                 FT_Pos      y );
-
-  typedef FT_Error
-  (*T1_Builder_Add_Contour_Func)( T1_Builder  builder );
-
-  typedef FT_Error
-  (*T1_Builder_Start_Point_Func)( T1_Builder  builder,
-                                  FT_Pos      x,
-                                  FT_Pos      y );
-
-  typedef void
-  (*T1_Builder_Close_Contour_Func)( T1_Builder  builder );
-
-
-  typedef const struct T1_Builder_FuncsRec_*  T1_Builder_Funcs;
-
-  typedef struct  T1_Builder_FuncsRec_
-  {
-    void
-    (*init)( T1_Builder    builder,
-             FT_Face       face,
-             FT_Size       size,
-             FT_GlyphSlot  slot,
-             FT_Bool       hinting );
-
-    void
-    (*done)( T1_Builder   builder );
-
-    T1_Builder_Check_Points_Func   check_points;
-    T1_Builder_Add_Point_Func      add_point;
-    T1_Builder_Add_Point1_Func     add_point1;
-    T1_Builder_Add_Contour_Func    add_contour;
-    T1_Builder_Start_Point_Func    start_point;
-    T1_Builder_Close_Contour_Func  close_contour;
-
-  } T1_Builder_FuncsRec;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Structure>                                                           */
-  /*    T1_BuilderRec                                                      */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*     A structure used during glyph loading to store its outline.       */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    memory       :: The current memory object.                         */
-  /*                                                                       */
-  /*    face         :: The current face object.                           */
-  /*                                                                       */
-  /*    glyph        :: The current glyph slot.                            */
-  /*                                                                       */
-  /*    loader       :: XXX                                                */
-  /*                                                                       */
-  /*    base         :: The base glyph outline.                            */
-  /*                                                                       */
-  /*    current      :: The current glyph outline.                         */
-  /*                                                                       */
-  /*    max_points   :: maximum points in builder outline                  */
-  /*                                                                       */
-  /*    max_contours :: Maximal number of contours in builder outline.     */
-  /*                                                                       */
-  /*    last         :: The last point position.                           */
-  /*                                                                       */
-  /*    scale_x      :: The horizontal scale (FUnits to sub-pixels).       */
-  /*                                                                       */
-  /*    scale_y      :: The vertical scale (FUnits to sub-pixels).         */
-  /*                                                                       */
-  /*    pos_x        :: The horizontal translation (if composite glyph).   */
-  /*                                                                       */
-  /*    pos_y        :: The vertical translation (if composite glyph).     */
-  /*                                                                       */
-  /*    left_bearing :: The left side bearing point.                       */
-  /*                                                                       */
-  /*    advance      :: The horizontal advance vector.                     */
-  /*                                                                       */
-  /*    bbox         :: Unused.                                            */
-  /*                                                                       */
-  /*    path_begun   :: A flag which indicates that a new path has begun.  */
-  /*                                                                       */
-  /*    load_points  :: If this flag is not set, no points are loaded.     */
-  /*                                                                       */
-  /*    no_recurse   :: Set but not used.                                  */
-  /*                                                                       */
-  /*    error        :: An error code that is only used to report memory   */
-  /*                    allocation problems.                               */
-  /*                                                                       */
-  /*    metrics_only :: A boolean indicating that we only want to compute  */
-  /*                    the metrics of a given glyph, not load all of its  */
-  /*                    points.                                            */
-  /*                                                                       */
-  /*    funcs        :: An array of function pointers for the builder.     */
-  /*                                                                       */
-  typedef struct  T1_BuilderRec_
-  {
-    FT_Memory       memory;
-    FT_Face         face;
-    FT_GlyphSlot    glyph;
-    FT_GlyphLoader  loader;
-    FT_Outline*     base;
-    FT_Outline*     current;
-
-    FT_Vector       last;
-
-    FT_Fixed        scale_x;
-    FT_Fixed        scale_y;
-
-    FT_Pos          pos_x;
-    FT_Pos          pos_y;
-
-    FT_Vector       left_bearing;
-    FT_Vector       advance;
-
-    FT_BBox         bbox;          /* bounding box */
-    FT_Bool         path_begun;
-    FT_Bool         load_points;
-    FT_Bool         no_recurse;
-    FT_Bool         shift;
-
-    FT_Error        error;         /* only used for memory errors */
-    FT_Bool         metrics_only;
-
-    void*           hints_funcs;    /* hinter-specific */
-    void*           hints_globals;  /* hinter-specific */
-
-    T1_Builder_FuncsRec  funcs;
-
-  } T1_BuilderRec;
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*****                                                               *****/
-  /*****                         T1 DECODER                            *****/
-  /*****                                                               *****/
-  /*************************************************************************/
-  /*************************************************************************/
-
-#if 0
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine   */
-  /* calls during glyph loading.                                           */
-  /*                                                                       */
-#define T1_MAX_SUBRS_CALLS  8
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity.  A     */
-  /* minimum of 16 is required.                                            */
-  /*                                                                       */
-#define T1_MAX_CHARSTRINGS_OPERANDS  32
-
-#endif /* 0 */
-
-
-  typedef struct  T1_Decoder_ZoneRec_
-  {
-    FT_Byte*  cursor;
-    FT_Byte*  base;
-    FT_Byte*  limit;
-
-  } T1_Decoder_ZoneRec, *T1_Decoder_Zone;
-
-
-  typedef struct T1_DecoderRec_*              T1_Decoder;
-  typedef const struct T1_Decoder_FuncsRec_*  T1_Decoder_Funcs;
-
-
-  typedef FT_Error
-  (*T1_Decoder_Callback)( T1_Decoder  decoder,
-                          FT_UInt     glyph_index );
-
-
-  typedef struct  T1_Decoder_FuncsRec_
-  {
-    FT_Error
-    (*init)( T1_Decoder           decoder,
-             FT_Face              face,
-             FT_Size              size,
-             FT_GlyphSlot         slot,
-             FT_Byte**            glyph_names,
-             PS_Blend             blend,
-             FT_Bool              hinting,
-             FT_Render_Mode       hint_mode,
-             T1_Decoder_Callback  callback );
-
-    void
-    (*done)( T1_Decoder  decoder );
-
-    FT_Error
-    (*parse_charstrings)( T1_Decoder  decoder,
-                          FT_Byte*    base,
-                          FT_UInt     len );
-
-  } T1_Decoder_FuncsRec;
-
-
-  typedef struct  T1_DecoderRec_
-  {
-    T1_BuilderRec        builder;
-
-    FT_Long              stack[T1_MAX_CHARSTRINGS_OPERANDS];
-    FT_Long*             top;
-
-    T1_Decoder_ZoneRec   zones[T1_MAX_SUBRS_CALLS + 1];
-    T1_Decoder_Zone      zone;
-
-    FT_Service_PsCMaps   psnames;      /* for seac */
-    FT_UInt              num_glyphs;
-    FT_Byte**            glyph_names;
-
-    FT_Int               lenIV;        /* internal for sub routine calls */
-    FT_UInt              num_subrs;
-    FT_Byte**            subrs;
-    FT_Int*              subrs_len;    /* array of subrs length (optional) */
-
-    FT_Matrix            font_matrix;
-    FT_Vector            font_offset;
-
-    FT_Int               flex_state;
-    FT_Int               num_flex_vectors;
-    FT_Vector            flex_vectors[7];
-
-    PS_Blend             blend;       /* for multiple master support */
-
-    FT_Render_Mode       hint_mode;
-
-    T1_Decoder_Callback  parse_callback;
-    T1_Decoder_FuncsRec  funcs;
-
-  } T1_DecoderRec;
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*****                                                               *****/
-  /*****                     TYPE1 CHARMAPS                            *****/
-  /*****                                                               *****/
-  /*************************************************************************/
-  /*************************************************************************/
-
-  typedef const struct T1_CMap_ClassesRec_*  T1_CMap_Classes;
-
-  typedef struct T1_CMap_ClassesRec_
-  {
-    FT_CMap_Class  standard;
-    FT_CMap_Class  expert;
-    FT_CMap_Class  custom;
-    FT_CMap_Class  unicode;
-
-  } T1_CMap_ClassesRec;
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*****                                                               *****/
-  /*****                        PSAux Module Interface                 *****/
-  /*****                                                               *****/
-  /*************************************************************************/
-  /*************************************************************************/
-
-  typedef struct  PSAux_ServiceRec_
-  {
-    /* don't use `PS_Table_Funcs' and friends to avoid compiler warnings */
-    const PS_Table_FuncsRec*    ps_table_funcs;
-    const PS_Parser_FuncsRec*   ps_parser_funcs;
-    const T1_Builder_FuncsRec*  t1_builder_funcs;
-    const T1_Decoder_FuncsRec*  t1_decoder_funcs;
-
-    void
-    (*t1_decrypt)( FT_Byte*   buffer,
-                   FT_Offset  length,
-                   FT_UShort  seed );
-
-    T1_CMap_Classes  t1_cmap_classes;
-
-  } PSAux_ServiceRec, *PSAux_Service;
-
-  /* backwards-compatible type definition */
-  typedef PSAux_ServiceRec   PSAux_Interface;
-
-FT_END_HEADER
-
-#endif /* __PSAUX_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/internal/pshints.h b/extra_lib/include/freetype/freetype/internal/pshints.h
deleted file mode 100644
index cd48f6c..0000000
--- a/extra_lib/include/freetype/freetype/internal/pshints.h
+++ /dev/null
@@ -1,626 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  pshints.h                                                              */
-/*                                                                         */
-/*    Interface to Postscript-specific (Type 1 and Type 2) hints           */
-/*    recorders (specification only).  These are used to support native    */
-/*    T1/T2 hints in the "type1", "cid" and "cff" font drivers.            */
-/*                                                                         */
-/*  Copyright 2001, 2002, 2003 by                                          */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __PSHINTS_H__
-#define __PSHINTS_H__
-
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_TYPE1_TABLES_H
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*****                                                               *****/
-  /*****               INTERNAL REPRESENTATION OF GLOBALS              *****/
-  /*****                                                               *****/
-  /*************************************************************************/
-  /*************************************************************************/
-
-  typedef struct PSH_GlobalsRec_*  PSH_Globals;
-
-  typedef FT_Error
-  (*PSH_Globals_NewFunc)( FT_Memory     memory,
-                          T1_Private*   private_dict,
-                          PSH_Globals*  aglobals );
-
-  typedef FT_Error
-  (*PSH_Globals_SetScaleFunc)( PSH_Globals  globals,
-                               FT_Fixed     x_scale,
-                               FT_Fixed     y_scale,
-                               FT_Fixed     x_delta,
-                               FT_Fixed     y_delta );
-
-  typedef void
-  (*PSH_Globals_DestroyFunc)( PSH_Globals  globals );
-
-
-  typedef struct  PSH_Globals_FuncsRec_
-  {
-    PSH_Globals_NewFunc       create;
-    PSH_Globals_SetScaleFunc  set_scale;
-    PSH_Globals_DestroyFunc   destroy;
-
-  } PSH_Globals_FuncsRec, *PSH_Globals_Funcs;
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*****                                                               *****/
-  /*****                  PUBLIC TYPE 1 HINTS RECORDER                 *****/
-  /*****                                                               *****/
-  /*************************************************************************/
-  /*************************************************************************/
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @type:                                                                */
-  /*    T1_Hints                                                           */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    This is a handle to an opaque structure used to record glyph hints */
-  /*    from a Type 1 character glyph character string.                    */
-  /*                                                                       */
-  /*    The methods used to operate on this object are defined by the      */
-  /*    @T1_Hints_FuncsRec structure.  Recording glyph hints is normally   */
-  /*    achieved through the following scheme:                             */
-  /*                                                                       */
-  /*    - Open a new hint recording session by calling the "open" method.  */
-  /*      This will rewind the recorder and prepare it for new input.      */
-  /*                                                                       */
-  /*    - For each hint found in the glyph charstring, call the            */
-  /*      corresponding method ("stem", "stem3", or "reset").  Note that   */
-  /*      these functions do not return an error code.                     */
-  /*                                                                       */
-  /*    - Close the recording session by calling the "close" method.  It   */
-  /*      will return an error code if the hints were invalid or something */
-  /*      strange happened (e.g. memory shortage).                         */
-  /*                                                                       */
-  /*    The hints accumulated in the object can later be used by the       */
-  /*    PostScript hinter.                                                 */
-  /*                                                                       */
-  typedef struct T1_HintsRec_*  T1_Hints;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @type:                                                                */
-  /*    T1_Hints_Funcs                                                     */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A pointer to the @T1_Hints_FuncsRec structure that defines the     */
-  /*    API of a given @T1_Hints object.                                   */
-  /*                                                                       */
-  typedef const struct T1_Hints_FuncsRec_*  T1_Hints_Funcs;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @functype:                                                            */
-  /*    T1_Hints_OpenFunc                                                  */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A method of the @T1_Hints class used to prepare it for a new       */
-  /*    Type 1 hints recording session.                                    */
-  /*                                                                       */
-  /* @input:                                                               */
-  /*    hints :: A handle to the Type 1 hints recorder.                    */
-  /*                                                                       */
-  /* @note:                                                                */
-  /*    You should always call the @T1_Hints_CloseFunc method in order to  */
-  /*    close an opened recording session.                                 */
-  /*                                                                       */
-  typedef void
-  (*T1_Hints_OpenFunc)( T1_Hints  hints );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @functype:                                                            */
-  /*    T1_Hints_SetStemFunc                                               */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A method of the @T1_Hints class used to record a new horizontal or */
-  /*    vertical stem.  This corresponds to the Type 1 "hstem" and "vstem" */
-  /*    operators.                                                         */
-  /*                                                                       */
-  /* @input:                                                               */
-  /*    hints     :: A handle to the Type 1 hints recorder.                */
-  /*                                                                       */
-  /*    dimension :: 0 for horizontal stems (hstem), 1 for vertical ones   */
-  /*                 (vstem).                                              */
-  /*                                                                       */
-  /*    coords    :: Array of 2 integers, used as (position,length) stem   */
-  /*                 descriptor.                                           */
-  /*                                                                       */
-  /* @note:                                                                */
-  /*    Use vertical coordinates (y) for horizontal stems (dim=0).  Use    */
-  /*    horizontal coordinates (x) for vertical stems (dim=1).             */
-  /*                                                                       */
-  /*    "coords[0]" is the absolute stem position (lowest coordinate);     */
-  /*    "coords[1]" is the length.                                         */
-  /*                                                                       */
-  /*    The length can be negative, in which case it must be either -20 or */
-  /*    -21.  It will be interpreted as a "ghost" stem, according to       */
-  /*    Type 1 specification.                                              */
-  /*                                                                       */
-  /*    If the length is -21 (corresponding to a bottom ghost stem), then  */
-  /*    the real stem position is "coords[0]+coords[1]".                   */
-  /*                                                                       */
-  typedef void
-  (*T1_Hints_SetStemFunc)( T1_Hints  hints,
-                           FT_UInt   dimension,
-                           FT_Long*  coords );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @functype:                                                            */
-  /*    T1_Hints_SetStem3Func                                              */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A method of the @T1_Hints class used to record three               */
-  /*    counter-controlled horizontal or vertical stems at once.           */
-  /*                                                                       */
-  /* @input:                                                               */
-  /*    hints     :: A handle to the Type 1 hints recorder.                */
-  /*                                                                       */
-  /*    dimension :: 0 for horizontal stems, 1 for vertical ones.          */
-  /*                                                                       */
-  /*    coords    :: An array of 6 integers, holding 3 (position,length)   */
-  /*                 pairs for the counter-controlled stems.               */
-  /*                                                                       */
-  /* @note:                                                                */
-  /*    Use vertical coordinates (y) for horizontal stems (dim=0).  Use    */
-  /*    horizontal coordinates (x) for vertical stems (dim=1).             */
-  /*                                                                       */
-  /*    The lengths cannot be negative (ghost stems are never              */
-  /*    counter-controlled).                                               */
-  /*                                                                       */
-  typedef void
-  (*T1_Hints_SetStem3Func)( T1_Hints  hints,
-                            FT_UInt   dimension,
-                            FT_Long*  coords );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @functype:                                                            */
-  /*    T1_Hints_ResetFunc                                                 */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A method of the @T1_Hints class used to reset the stems hints in a */
-  /*    recording session.                                                 */
-  /*                                                                       */
-  /* @input:                                                               */
-  /*    hints     :: A handle to the Type 1 hints recorder.                */
-  /*                                                                       */
-  /*    end_point :: The index of the last point in the input glyph in     */
-  /*                 which the previously defined hints apply.             */
-  /*                                                                       */
-  typedef void
-  (*T1_Hints_ResetFunc)( T1_Hints  hints,
-                         FT_UInt   end_point );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @functype:                                                            */
-  /*    T1_Hints_CloseFunc                                                 */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A method of the @T1_Hints class used to close a hint recording     */
-  /*    session.                                                           */
-  /*                                                                       */
-  /* @input:                                                               */
-  /*    hints     :: A handle to the Type 1 hints recorder.                */
-  /*                                                                       */
-  /*    end_point :: The index of the last point in the input glyph.       */
-  /*                                                                       */
-  /* @return:                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* @note:                                                                */
-  /*    The error code will be set to indicate that an error occured       */
-  /*    during the recording session.                                      */
-  /*                                                                       */
-  typedef FT_Error
-  (*T1_Hints_CloseFunc)( T1_Hints  hints,
-                         FT_UInt   end_point );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @functype:                                                            */
-  /*    T1_Hints_ApplyFunc                                                 */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A method of the @T1_Hints class used to apply hints to the         */
-  /*    corresponding glyph outline.  Must be called once all hints have   */
-  /*    been recorded.                                                     */
-  /*                                                                       */
-  /* @input:                                                               */
-  /*   hints     :: A handle to the Type 1 hints recorder.                 */
-  /*                                                                       */
-  /*   outline   :: A pointer to the target outline descriptor.            */
-  /*                                                                       */
-  /*   globals   :: The hinter globals for this font.                      */
-  /*                                                                       */
-  /*   hint_mode :: Hinting information.                                   */
-  /*                                                                       */
-  /* @return:                                                              */
-  /*   FreeType error code.  0 means success.                              */
-  /*                                                                       */
-  /* @note:                                                                */
-  /*    On input, all points within the outline are in font coordinates.   */
-  /*    On output, they are in 1/64th of pixels.                           */
-  /*                                                                       */
-  /*    The scaling transformation is taken from the "globals" object      */
-  /*    which must correspond to the same font as the glyph.               */
-  /*                                                                       */
-  typedef FT_Error
-  (*T1_Hints_ApplyFunc)( T1_Hints        hints,
-                         FT_Outline*     outline,
-                         PSH_Globals     globals,
-                         FT_Render_Mode  hint_mode );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @struct:                                                              */
-  /*    T1_Hints_FuncsRec                                                  */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    The structure used to provide the API to @T1_Hints objects.        */
-  /*                                                                       */
-  /* @fields:                                                              */
-  /*    hints :: A handle to the T1 Hints recorder.                        */
-  /*                                                                       */
-  /*    open  :: The function to open a recording session.                 */
-  /*                                                                       */
-  /*    close :: The function to close a recording session.                */
-  /*                                                                       */
-  /*    stem  :: The function to set a simple stem.                        */
-  /*                                                                       */
-  /*    stem3 :: The function to set counter-controlled stems.             */
-  /*                                                                       */
-  /*    reset :: The function to reset stem hints.                         */
-  /*                                                                       */
-  /*    apply :: The function to apply the hints to the corresponding      */
-  /*             glyph outline.                                            */
-  /*                                                                       */
-  typedef struct  T1_Hints_FuncsRec_
-  {
-    T1_Hints               hints;
-    T1_Hints_OpenFunc      open;
-    T1_Hints_CloseFunc     close;
-    T1_Hints_SetStemFunc   stem;
-    T1_Hints_SetStem3Func  stem3;
-    T1_Hints_ResetFunc     reset;
-    T1_Hints_ApplyFunc     apply;
-
-  } T1_Hints_FuncsRec;
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*****                                                               *****/
-  /*****                  PUBLIC TYPE 2 HINTS RECORDER                 *****/
-  /*****                                                               *****/
-  /*************************************************************************/
-  /*************************************************************************/
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @type:                                                                */
-  /*    T2_Hints                                                           */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    This is a handle to an opaque structure used to record glyph hints */
-  /*    from a Type 2 character glyph character string.                    */
-  /*                                                                       */
-  /*    The methods used to operate on this object are defined by the      */
-  /*    @T2_Hints_FuncsRec structure.  Recording glyph hints is normally   */
-  /*    achieved through the following scheme:                             */
-  /*                                                                       */
-  /*    - Open a new hint recording session by calling the "open" method.  */
-  /*      This will rewind the recorder and prepare it for new input.      */
-  /*                                                                       */
-  /*    - For each hint found in the glyph charstring, call the            */
-  /*      corresponding method ("stems", "hintmask", "counters").  Note    */
-  /*      that these functions do not return an error code.                */
-  /*                                                                       */
-  /*    - Close the recording session by calling the "close" method.  It   */
-  /*      will return an error code if the hints were invalid or something */
-  /*      strange happened (e.g. memory shortage).                         */
-  /*                                                                       */
-  /*    The hints accumulated in the object can later be used by the       */
-  /*    Postscript hinter.                                                 */
-  /*                                                                       */
-  typedef struct T2_HintsRec_*  T2_Hints;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @type:                                                                */
-  /*    T2_Hints_Funcs                                                     */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A pointer to the @T2_Hints_FuncsRec structure that defines the API */
-  /*    of a given @T2_Hints object.                                       */
-  /*                                                                       */
-  typedef const struct T2_Hints_FuncsRec_*  T2_Hints_Funcs;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @functype:                                                            */
-  /*    T2_Hints_OpenFunc                                                  */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A method of the @T2_Hints class used to prepare it for a new       */
-  /*    Type 2 hints recording session.                                    */
-  /*                                                                       */
-  /* @input:                                                               */
-  /*    hints :: A handle to the Type 2 hints recorder.                    */
-  /*                                                                       */
-  /* @note:                                                                */
-  /*    You should always call the @T2_Hints_CloseFunc method in order to  */
-  /*    close an opened recording session.                                 */
-  /*                                                                       */
-  typedef void
-  (*T2_Hints_OpenFunc)( T2_Hints  hints );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @functype:                                                            */
-  /*    T2_Hints_StemsFunc                                                 */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A method of the @T2_Hints class used to set the table of stems in  */
-  /*    either the vertical or horizontal dimension.  Equivalent to the    */
-  /*    "hstem", "vstem", "hstemhm", and "vstemhm" Type 2 operators.       */
-  /*                                                                       */
-  /* @input:                                                               */
-  /*    hints     :: A handle to the Type 2 hints recorder.                */
-  /*                                                                       */
-  /*    dimension :: 0 for horizontal stems (hstem), 1 for vertical ones   */
-  /*                 (vstem).                                              */
-  /*                                                                       */
-  /*    count     :: The number of stems.                                  */
-  /*                                                                       */
-  /*    coords    :: An array of "count" (position,length) pairs.          */
-  /*                                                                       */
-  /* @note:                                                                */
-  /*    Use vertical coordinates (y) for horizontal stems (dim=0).  Use    */
-  /*    horizontal coordinates (x) for vertical stems (dim=1).             */
-  /*                                                                       */
-  /*    There are "2*count" elements in the "coords" aray.  Each even      */
-  /*    element is an absolute position in font units, each odd element is */
-  /*    a length in font units.                                            */
-  /*                                                                       */
-  /*    A length can be negative, in which case it must be either -20 or   */
-  /*    -21.  It will be interpreted as a "ghost" stem, according to the   */
-  /*    Type 1 specification.                                              */
-  /*                                                                       */
-  typedef void
-  (*T2_Hints_StemsFunc)( T2_Hints   hints,
-                         FT_UInt    dimension,
-                         FT_UInt    count,
-                         FT_Fixed*  coordinates );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @functype:                                                            */
-  /*    T2_Hints_MaskFunc                                                  */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A method of the @T2_Hints class used to set a given hintmask       */
-  /*    (this corresponds to the "hintmask" Type 2 operator).              */
-  /*                                                                       */
-  /* @input:                                                               */
-  /*    hints     :: A handle to the Type 2 hints recorder.                */
-  /*                                                                       */
-  /*    end_point :: The glyph index of the last point to which the        */
-  /*                 previously defined/activated hints apply.             */
-  /*                                                                       */
-  /*    bit_count :: The number of bits in the hint mask.                  */
-  /*                                                                       */
-  /*    bytes     :: An array of bytes modelling the hint mask.            */
-  /*                                                                       */
-  /* @note:                                                                */
-  /*    If the hintmask starts the charstring (before any glyph point      */
-  /*    definition), the value of "end_point" should be 0.                 */
-  /*                                                                       */
-  /*    "bit_count" is the number of meaningful bits in the "bytes" array; */
-  /*    it must be equal to the total number of hints defined so far       */
-  /*    (i.e. horizontal+verticals).                                       */
-  /*                                                                       */
-  /*    The "bytes" array can come directly from the Type 2 charstring and */
-  /*    respects the same format.                                          */
-  /*                                                                       */
-  typedef void
-  (*T2_Hints_MaskFunc)( T2_Hints        hints,
-                        FT_UInt         end_point,
-                        FT_UInt         bit_count,
-                        const FT_Byte*  bytes );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @functype:                                                            */
-  /*    T2_Hints_CounterFunc                                               */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A method of the @T2_Hints class used to set a given counter mask   */
-  /*    (this corresponds to the "hintmask" Type 2 operator).              */
-  /*                                                                       */
-  /* @input:                                                               */
-  /*    hints     :: A handle to the Type 2 hints recorder.                */
-  /*                                                                       */
-  /*    end_point :: A glyph index of the last point to which the          */
-  /*                 previously defined/active hints apply.                */
-  /*                                                                       */
-  /*    bit_count :: The number of bits in the hint mask.                  */
-  /*                                                                       */
-  /*    bytes     :: An array of bytes modelling the hint mask.            */
-  /*                                                                       */
-  /* @note:                                                                */
-  /*    If the hintmask starts the charstring (before any glyph point      */
-  /*    definition), the value of "end_point" should be 0.                 */
-  /*                                                                       */
-  /*    "bit_count" is the number of meaningful bits in the "bytes" array; */
-  /*    it must be equal to the total number of hints defined so far       */
-  /*    (i.e. horizontal+verticals).                                       */
-  /*                                                                       */
-  /*    The "bytes" array can come directly from the Type 2 charstring and */
-  /*    respects the same format.                                          */
-  /*                                                                       */
-  typedef void
-  (*T2_Hints_CounterFunc)( T2_Hints        hints,
-                           FT_UInt         bit_count,
-                           const FT_Byte*  bytes );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @functype:                                                            */
-  /*    T2_Hints_CloseFunc                                                 */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A method of the @T2_Hints class used to close a hint recording     */
-  /*    session.                                                           */
-  /*                                                                       */
-  /* @input:                                                               */
-  /*    hints     :: A handle to the Type 2 hints recorder.                */
-  /*                                                                       */
-  /*    end_point :: The index of the last point in the input glyph.       */
-  /*                                                                       */
-  /* @return:                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* @note:                                                                */
-  /*    The error code will be set to indicate that an error occured       */
-  /*    during the recording session.                                      */
-  /*                                                                       */
-  typedef FT_Error
-  (*T2_Hints_CloseFunc)( T2_Hints  hints,
-                         FT_UInt   end_point );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @functype:                                                            */
-  /*    T2_Hints_ApplyFunc                                                 */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    A method of the @T2_Hints class used to apply hints to the         */
-  /*    corresponding glyph outline.  Must be called after the "close"     */
-  /*    method.                                                            */
-  /*                                                                       */
-  /* @input:                                                               */
-  /*    hints     :: A handle to the Type 2 hints recorder.                */
-  /*                                                                       */
-  /*    outline   :: A pointer to the target outline descriptor.           */
-  /*                                                                       */
-  /*    globals   :: The hinter globals for this font.                     */
-  /*                                                                       */
-  /*    hint_mode :: Hinting information.                                  */
-  /*                                                                       */
-  /* @return:                                                              */
-  /*   FreeType error code.  0 means success.                              */
-  /*                                                                       */
-  /* @note:                                                                */
-  /*    On input, all points within the outline are in font coordinates.   */
-  /*    On output, they are in 1/64th of pixels.                           */
-  /*                                                                       */
-  /*    The scaling transformation is taken from the "globals" object      */
-  /*    which must correspond to the same font than the glyph.             */
-  /*                                                                       */
-  typedef FT_Error
-  (*T2_Hints_ApplyFunc)( T2_Hints        hints,
-                         FT_Outline*     outline,
-                         PSH_Globals     globals,
-                         FT_Render_Mode  hint_mode );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* @struct:                                                              */
-  /*    T2_Hints_FuncsRec                                                  */
-  /*                                                                       */
-  /* @description:                                                         */
-  /*    The structure used to provide the API to @T2_Hints objects.        */
-  /*                                                                       */
-  /* @fields:                                                              */
-  /*    hints    :: A handle to the T2 hints recorder object.              */
-  /*                                                                       */
-  /*    open     :: The function to open a recording session.              */
-  /*                                                                       */
-  /*    close    :: The function to close a recording session.             */
-  /*                                                                       */
-  /*    stems    :: The function to set the dimension's stems table.       */
-  /*                                                                       */
-  /*    hintmask :: The function to set hint masks.                        */
-  /*                                                                       */
-  /*    counter  :: The function to set counter masks.                     */
-  /*                                                                       */
-  /*    apply    :: The function to apply the hints on the corresponding   */
-  /*                glyph outline.                                         */
-  /*                                                                       */
-  typedef struct  T2_Hints_FuncsRec_
-  {
-    T2_Hints              hints;
-    T2_Hints_OpenFunc     open;
-    T2_Hints_CloseFunc    close;
-    T2_Hints_StemsFunc    stems;
-    T2_Hints_MaskFunc     hintmask;
-    T2_Hints_CounterFunc  counter;
-    T2_Hints_ApplyFunc    apply;
-
-  } T2_Hints_FuncsRec;
-
-
-  /* */
-
-
-  typedef struct  PSHinter_Interface_
-  {
-    PSH_Globals_Funcs  (*get_globals_funcs)( FT_Module  module );
-    T1_Hints_Funcs     (*get_t1_funcs)     ( FT_Module  module );
-    T2_Hints_Funcs     (*get_t2_funcs)     ( FT_Module  module );
-
-  } PSHinter_Interface;
-
-  typedef PSHinter_Interface*  PSHinter_Service;
-
-
-FT_END_HEADER
-
-#endif /* __PSHINTS_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/internal/psnames.h b/extra_lib/include/freetype/freetype/internal/psnames.h
deleted file mode 100644
index 0f4ec86..0000000
--- a/extra_lib/include/freetype/freetype/internal/psnames.h
+++ /dev/null
@@ -1,241 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  psnames.h                                                              */
-/*                                                                         */
-/*    High-level interface for the `PSNames' module (in charge of          */
-/*    various functions related to Postscript glyph names conversion).     */
-/*                                                                         */
-/*  Copyright 1996-2001, 2002 by                                           */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __PSNAMES_H__
-#define __PSNAMES_H__
-
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    PS_Unicode_Value_Func                                              */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A function used to return the Unicode index corresponding to a     */
-  /*    given glyph name.                                                  */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    glyph_name :: The glyph name.                                      */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    The Unicode character index resp. the non-Unicode value 0xFFFF if  */
-  /*    the glyph name has no known Unicode meaning.                       */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    This function is able to map several different glyph names to the  */
-  /*    same Unicode value, according to the rules defined in the Adobe    */
-  /*    Glyph List table.                                                  */
-  /*                                                                       */
-  /*    This function will not be compiled if the configuration macro      */
-  /*    FT_CONFIG_OPTION_ADOBE_GLYPH_LIST is undefined.                    */
-  /*                                                                       */
-  typedef FT_UInt32
-  (*PS_Unicode_Value_Func)( const char*  glyph_name );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    PS_Unicode_Index_Func                                              */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A function used to return the glyph index corresponding to a given */
-  /*    Unicode value.                                                     */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    num_glyphs  :: The number of glyphs in the face.                   */
-  /*                                                                       */
-  /*    glyph_names :: An array of glyph name pointers.                    */
-  /*                                                                       */
-  /*    unicode     :: The Unicode value.                                  */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    The glyph index resp. 0xFFFF if no glyph corresponds to this       */
-  /*    Unicode value.                                                     */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    This function is able to recognize several glyph names per Unicode */
-  /*    value, according to the Adobe Glyph List.                          */
-  /*                                                                       */
-  /*    This function will not be compiled if the configuration macro      */
-  /*    FT_CONFIG_OPTION_ADOBE_GLYPH_LIST is undefined.                    */
-  /*                                                                       */
-  typedef FT_UInt
-  (*PS_Unicode_Index_Func)( FT_UInt       num_glyphs,
-                            const char**  glyph_names,
-                            FT_ULong      unicode );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    PS_Macintosh_Name_Func                                             */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A function used to return the glyph name corresponding to an Apple */
-  /*    glyph name index.                                                  */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    name_index :: The index of the Mac name.                           */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    The glyph name, or 0 if the index is invalid.                      */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    This function will not be compiled if the configuration macro      */
-  /*    FT_CONFIG_OPTION_POSTSCRIPT_NAMES is undefined.                    */
-  /*                                                                       */
-  typedef const char*
-  (*PS_Macintosh_Name_Func)( FT_UInt  name_index );
-
-
-  typedef const char*
-  (*PS_Adobe_Std_Strings_Func)( FT_UInt  string_index );
-
-
-  typedef struct  PS_UniMap_
-  {
-    FT_UInt  unicode;
-    FT_UInt  glyph_index;
-
-  } PS_UniMap;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    PS_Unicodes                                                        */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A simple table used to map Unicode values to glyph indices.  It is */
-  /*    built by the PS_Build_Unicodes table according to the glyphs       */
-  /*    present in a font file.                                            */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    num_codes :: The number of glyphs in the font that match a given   */
-  /*                 Unicode value.                                        */
-  /*                                                                       */
-  /*    unicodes  :: An array of unicode values, sorted in increasing      */
-  /*                 order.                                                */
-  /*                                                                       */
-  /*    gindex    :: An array of glyph indices, corresponding to each      */
-  /*                 Unicode value.                                        */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    Use the function PS_Lookup_Unicode() to retrieve the glyph index   */
-  /*    corresponding to a given Unicode character code.                   */
-  /*                                                                       */
-  typedef struct  PS_Unicodes_
-  {
-    FT_UInt     num_maps;
-    PS_UniMap*  maps;
-
-  } PS_Unicodes;
-
-
-  typedef FT_Error
-  (*PS_Build_Unicodes_Func)( FT_Memory     memory,
-                             FT_UInt       num_glyphs,
-                             const char**  glyph_names,
-                             PS_Unicodes*  unicodes );
-
-  typedef FT_UInt
-  (*PS_Lookup_Unicode_Func)( PS_Unicodes*  unicodes,
-                             FT_UInt       unicode );
-
-  typedef FT_ULong
-  (*PS_Next_Unicode_Func)( PS_Unicodes*  unicodes,
-                           FT_ULong      unicode );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    PSNames_Interface                                                  */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This structure defines the PSNames interface.                      */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    unicode_value         :: A function used to convert a glyph name   */
-  /*                             into a Unicode character code.            */
-  /*                                                                       */
-  /*    build_unicodes        :: A function which builds up the Unicode    */
-  /*                             mapping table.                            */
-  /*                                                                       */
-  /*    lookup_unicode        :: A function used to return the glyph index */
-  /*                             corresponding to a given Unicode          */
-  /*                             character.                                */
-  /*                                                                       */
-  /*    macintosh_name        :: A function used to return the standard    */
-  /*                             Apple glyph Postscript name corresponding */
-  /*                             to a given string index (used by the      */
-  /*                             TrueType `post' table).                   */
-  /*                                                                       */
-  /*    adobe_std_strings     :: A function that returns a pointer to a    */
-  /*                             Adobe Standard String for a given SID.    */
-  /*                                                                       */
-  /*    adobe_std_encoding    :: A table of 256 unsigned shorts that maps  */
-  /*                             character codes in the Adobe Standard     */
-  /*                             Encoding to SIDs.                         */
-  /*                                                                       */
-  /*    adobe_expert_encoding :: A table of 256 unsigned shorts that maps  */
-  /*                             character codes in the Adobe Expert       */
-  /*                             Encoding to SIDs.                         */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    `unicode_value' and `unicode_index' will be set to 0 if the        */
-  /*    configuration macro FT_CONFIG_OPTION_ADOBE_GLYPH_LIST is           */
-  /*    undefined.                                                         */
-  /*                                                                       */
-  /*    `macintosh_name' will be set to 0 if the configuration macro       */
-  /*    FT_CONFIG_OPTION_POSTSCRIPT_NAMES is undefined.                    */
-  /*                                                                       */
-  typedef struct  PSNames_Interface_
-  {
-    PS_Unicode_Value_Func      unicode_value;
-    PS_Build_Unicodes_Func     build_unicodes;
-    PS_Lookup_Unicode_Func     lookup_unicode;
-    PS_Macintosh_Name_Func     macintosh_name;
-
-    PS_Adobe_Std_Strings_Func  adobe_std_strings;
-    const unsigned short*      adobe_std_encoding;
-    const unsigned short*      adobe_expert_encoding;
-
-    PS_Next_Unicode_Func       next_unicode;
-
-  } PSNames_Interface;
-
-
-  typedef PSNames_Interface*  PSNames_Service;
-
-
-FT_END_HEADER
-
-#endif /* __PSNAMES_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/internal/services/svbdf.h b/extra_lib/include/freetype/freetype/internal/services/svbdf.h
deleted file mode 100644
index 0f7fc61..0000000
--- a/extra_lib/include/freetype/freetype/internal/services/svbdf.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  svbdf.h                                                                */
-/*                                                                         */
-/*    The FreeType BDF services (specification).                           */
-/*                                                                         */
-/*  Copyright 2003 by                                                      */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __SVBDF_H__
-#define __SVBDF_H__
-
-#include FT_BDF_H
-#include FT_INTERNAL_SERVICE_H
-
-
-FT_BEGIN_HEADER
-
-
-#define FT_SERVICE_ID_BDF  "bdf"
-
-  typedef FT_Error
-  (*FT_BDF_GetCharsetIdFunc)( FT_Face       face,
-                              const char*  *acharset_encoding,
-                              const char*  *acharset_registry );
-
-  typedef FT_Error
-  (*FT_BDF_GetPropertyFunc)( FT_Face           face,
-                             const char*       prop_name,
-                             BDF_PropertyRec  *aproperty );
-
-
-  FT_DEFINE_SERVICE( BDF )
-  {
-    FT_BDF_GetCharsetIdFunc  get_charset_id;
-    FT_BDF_GetPropertyFunc   get_property;
-  };
-
-  /* */
-
-
-FT_END_HEADER
-
-
-#endif /* __SVBDF_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/internal/services/svgldict.h b/extra_lib/include/freetype/freetype/internal/services/svgldict.h
deleted file mode 100644
index e5e56b2..0000000
--- a/extra_lib/include/freetype/freetype/internal/services/svgldict.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  svgldict.h                                                             */
-/*                                                                         */
-/*    The FreeType glyph dictionary services (specification).              */
-/*                                                                         */
-/*  Copyright 2003 by                                                      */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __SVGLDICT_H__
-#define __SVGLDICT_H__
-
-#include FT_INTERNAL_SERVICE_H
-
-
-FT_BEGIN_HEADER
-
-
-  /*
-   *  A service used to retrieve glyph names, as well as to find the
-   *  index of a given glyph name in a font.
-   *
-   */
-
-#define FT_SERVICE_ID_GLYPH_DICT  "glyph-dict"
-
-
-  typedef FT_Error
-  (*FT_GlyphDict_GetNameFunc)( FT_Face     face,
-                               FT_UInt     glyph_index,
-                               FT_Pointer  buffer,
-                               FT_UInt     buffer_max );
-
-  typedef FT_UInt
-  (*FT_GlyphDict_NameIndexFunc)( FT_Face     face,
-                                 FT_String*  glyph_name );
-
-
-  FT_DEFINE_SERVICE( GlyphDict )
-  {
-    FT_GlyphDict_GetNameFunc    get_name;
-    FT_GlyphDict_NameIndexFunc  name_index;  /* optional */
-  };
-
-  /* */
-
-
-FT_END_HEADER
-
-
-#endif /* __SVGLDICT_H__ */
diff --git a/extra_lib/include/freetype/freetype/internal/services/svmm.h b/extra_lib/include/freetype/freetype/internal/services/svmm.h
deleted file mode 100644
index 926975c..0000000
--- a/extra_lib/include/freetype/freetype/internal/services/svmm.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  svmm.h                                                                 */
-/*                                                                         */
-/*    The FreeType Multiple Masters services (specification).              */
-/*                                                                         */
-/*  Copyright 2003 by                                                      */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __SVMM_H__
-#define __SVMM_H__
-
-#include FT_INTERNAL_SERVICE_H
-
-
-FT_BEGIN_HEADER
-
-
-  /*
-   *  A service used to manage multiple-masters data in a given face.
-   *
-   *  See the related APIs in `ftmm.h' (FT_MULTIPLE_MASTERS_H).
-   *
-   */
-
-#define FT_SERVICE_ID_MULTI_MASTERS  "multi-masters"
-
-
-  typedef FT_Error
-  (*FT_Get_MM_Func)( FT_Face           face,
-                     FT_Multi_Master*  master );
-
-  typedef FT_Error
-  (*FT_Set_MM_Design_Func)( FT_Face   face,
-                            FT_UInt   num_coords,
-                            FT_Long*  coords );
-
-  typedef FT_Error
-  (*FT_Set_MM_Blend_Func)( FT_Face   face,
-                           FT_UInt   num_coords,
-                           FT_Long*  coords );
-
-
-  FT_DEFINE_SERVICE( MultiMasters )
-  {
-    FT_Get_MM_Func         get_mm;
-    FT_Set_MM_Design_Func  set_mm_design;
-    FT_Set_MM_Blend_Func   set_mm_blend;
-  };
-
-  /* */
-
-
-FT_END_HEADER
-
-#endif /* __SVMM_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/internal/services/svpfr.h b/extra_lib/include/freetype/freetype/internal/services/svpfr.h
deleted file mode 100644
index b610505..0000000
--- a/extra_lib/include/freetype/freetype/internal/services/svpfr.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  svpfr.h                                                                */
-/*                                                                         */
-/*    Internal PFR service functions (specification).                      */
-/*                                                                         */
-/*  Copyright 2003 by                                                      */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __SVPFR_H__
-#define __SVPFR_H__
-
-#include FT_INTERNAL_SERVICE_H
-
-
-FT_BEGIN_HEADER
-
-
-#define FT_SERVICE_ID_PFR_METRICS  "pfr-metrics"
-
-
-  typedef FT_Error
-  (*FT_PFR_GetMetricsFunc)( FT_Face    face,
-                            FT_UInt   *aoutline,
-                            FT_UInt   *ametrics,
-                            FT_Fixed  *ax_scale,
-                            FT_Fixed  *ay_scale );
-
-  typedef FT_Error
-  (*FT_PFR_GetKerningFunc)( FT_Face     face,
-                            FT_UInt     left,
-                            FT_UInt     right,
-                            FT_Vector  *avector );
-
-  typedef FT_Error
-  (*FT_PFR_GetAdvanceFunc)( FT_Face   face,
-                            FT_UInt   gindex,
-                            FT_Pos   *aadvance );
-
-
-  FT_DEFINE_SERVICE( PfrMetrics )
-  {
-    FT_PFR_GetMetricsFunc  get_metrics;
-    FT_PFR_GetKerningFunc  get_kerning;
-    FT_PFR_GetAdvanceFunc  get_advance;
-
-  };
-
- /* */
-
-FT_END_HEADER
-
-#endif /* __SVPFR_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/internal/services/svpostnm.h b/extra_lib/include/freetype/freetype/internal/services/svpostnm.h
deleted file mode 100644
index 7f1700a..0000000
--- a/extra_lib/include/freetype/freetype/internal/services/svpostnm.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  svpostnm.h                                                             */
-/*                                                                         */
-/*    The FreeType PostScript name services (specification).               */
-/*                                                                         */
-/*  Copyright 2003 by                                                      */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __SVPOSTNM_H__
-#define __SVPOSTNM_H__
-
-#include FT_INTERNAL_SERVICE_H
-
-
-FT_BEGIN_HEADER
-
-  /*
-   *  A trivial service used to retrieve the PostScript name of a given
-   *  font when available.  The `get_name' field should never be NULL.
-   *
-   *  The correponding function can return NULL to indicate that the
-   *  PostScript name is not available.
-   *
-   *  The name is owned by the face and will be destroyed with it.
-   */
-
-#define FT_SERVICE_ID_POSTSCRIPT_FONT_NAME  "postscript-font-name"
-
-
-  typedef const char*
-  (*FT_PsName_GetFunc)( FT_Face  face );
-
-
-  FT_DEFINE_SERVICE( PsFontName )
-  {
-    FT_PsName_GetFunc  get_ps_font_name;
-  };
-
-  /* */
-
-
-FT_END_HEADER
-
-
-#endif /* __SVPOSTNM_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/internal/services/svpscmap.h b/extra_lib/include/freetype/freetype/internal/services/svpscmap.h
deleted file mode 100644
index ade96ef..0000000
--- a/extra_lib/include/freetype/freetype/internal/services/svpscmap.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  svpscmap.h                                                             */
-/*                                                                         */
-/*    The FreeType PostScript charmap service (specification).             */
-/*                                                                         */
-/*  Copyright 2003 by                                                      */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __SVPSCMAP_H__
-#define __SVPSCMAP_H__
-
-
-FT_BEGIN_HEADER
-
-
-#define FT_SERVICE_ID_POSTSCRIPT_CMAPS  "postscript-cmaps"
-
-
-  /*
-   *  Adobe glyph name to unicode value
-   */
-  typedef FT_UInt32
-  (*PS_Unicode_ValueFunc)( const char*  glyph_name );
-
-  /*
-   *  Unicode value to Adobe glyph name index.  0xFFFF if not found.
-   */
-  typedef FT_UInt
-  (*PS_Unicode_Index_Func)( FT_UInt       num_glyphs,
-                            const char**  glyph_names,
-                            FT_ULong      unicode );
-
-  /*
-   *  Macintosh name id to glyph name.  NULL if invalid index.
-   */
-  typedef const char*
-  (*PS_Macintosh_Name_Func)( FT_UInt  name_index );
-
-  /*
-   *  Adobe standard string ID to glyph name.  NULL if invalid index.
-   */
-  typedef const char*
-  (*PS_Adobe_Std_Strings_Func)( FT_UInt  string_index );
-
-  /*
-   *  Simple unicode -> glyph index charmap built from font glyph names
-   *  table.
-   */
-  typedef struct  PS_UniMap_
-  {
-    FT_UInt  unicode;
-    FT_UInt  glyph_index;
-
-  } PS_UniMap;
-
-
-  typedef struct  PS_Unicodes_
-  {
-    FT_UInt     num_maps;
-    PS_UniMap*  maps;
-
-  } PS_Unicodes;
-
-
-  typedef FT_Error
-  (*PS_Unicodes_InitFunc)( FT_Memory     memory,
-                           FT_UInt       num_glyphs,
-                           const char**  glyph_names,
-                           PS_Unicodes*  unicodes );
-
-  typedef FT_UInt
-  (*PS_Unicodes_CharIndexFunc)( PS_Unicodes*  unicodes,
-                                FT_UInt       unicode );
-
-  typedef FT_ULong
-  (*PS_Unicodes_CharNextFunc)( PS_Unicodes*  unicodes,
-                               FT_ULong      unicode );
-
-
-  FT_DEFINE_SERVICE( PsCMaps )
-  {
-    PS_Unicode_ValueFunc       unicode_value;
-
-    PS_Unicodes_InitFunc       unicodes_init;
-    PS_Unicodes_CharIndexFunc  unicodes_char_index;
-    PS_Unicodes_CharNextFunc   unicodes_char_next;
-
-    PS_Macintosh_Name_Func     macintosh_name;
-    PS_Adobe_Std_Strings_Func  adobe_std_strings;
-    const unsigned short*      adobe_std_encoding;
-    const unsigned short*      adobe_expert_encoding;
-  };
-
-  /* */
-
-
-FT_END_HEADER
-
-
-#endif /* __SVPSCMAP_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/internal/services/svpsinfo.h b/extra_lib/include/freetype/freetype/internal/services/svpsinfo.h
deleted file mode 100644
index 73c02cd..0000000
--- a/extra_lib/include/freetype/freetype/internal/services/svpsinfo.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  svpsinfo.h                                                             */
-/*                                                                         */
-/*    The FreeType PostScript info service (specification).                */
-/*                                                                         */
-/*  Copyright 2003 by                                                      */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __SVPSINFO_H__
-#define __SVPSINFO_H__
-
-#include FT_INTERNAL_SERVICE_H
-#include FT_INTERNAL_TYPE1_TYPES_H
-
-
-FT_BEGIN_HEADER
-
-
-#define FT_SERVICE_ID_POSTSCRIPT_INFO  "postscript-info"
-
-
-  typedef FT_Error
-  (*PS_GetFontInfoFunc)( FT_Face          face,
-                         PS_FontInfoRec*  afont_info );
-
-  typedef FT_Int
-  (*PS_HasGlyphNamesFunc)( FT_Face   face );
-
-
-  FT_DEFINE_SERVICE( PsInfo )
-  {
-    PS_GetFontInfoFunc    ps_get_font_info;
-    PS_HasGlyphNamesFunc  ps_has_glyph_names;
-  };
-
-  /* */
-
-
-FT_END_HEADER
-
-
-#endif /* __SVPSINFO_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/internal/services/svsfnt.h b/extra_lib/include/freetype/freetype/internal/services/svsfnt.h
deleted file mode 100644
index 06a5b1c..0000000
--- a/extra_lib/include/freetype/freetype/internal/services/svsfnt.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  svsfnt.h                                                               */
-/*                                                                         */
-/*    The FreeType PostScript name services (specification).               */
-/*                                                                         */
-/*  Copyright 2003 by                                                      */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __SVSFNT_H__
-#define __SVSFNT_H__
-
-#include FT_INTERNAL_SERVICE_H
-#include FT_TRUETYPE_TABLES_H
-
-
-FT_BEGIN_HEADER
-
-
-  /*
-   *  SFNT table loading service.
-   */
-
-#define FT_SERVICE_ID_SFNT_TABLE  "sfnt-table"
-
-
-  /*
-   * Used to implement FT_Load_Sfnt_Table().
-   */
-  typedef FT_Error
-  (*FT_SFNT_TableLoadFunc)( FT_Face    face,
-                            FT_ULong   tag,
-                            FT_Long    offset,
-                            FT_Byte*   buffer,
-                            FT_ULong*  length );
-
-  /*
-   * Used to implement FT_Get_Sfnt_Table().
-   */
-  typedef void*
-  (*FT_SFNT_TableGetFunc)( FT_Face      face,
-                           FT_Sfnt_Tag  tag );
-
- 
-  FT_DEFINE_SERVICE( SFNT_Table )
-  {
-    FT_SFNT_TableLoadFunc  load_table;
-    FT_SFNT_TableGetFunc   get_table;
-  };
-
-  /* */
-
- 
-FT_END_HEADER
-
-
-#endif /* __SVSFNT_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/internal/services/svwinfnt.h b/extra_lib/include/freetype/freetype/internal/services/svwinfnt.h
deleted file mode 100644
index 57f7765..0000000
--- a/extra_lib/include/freetype/freetype/internal/services/svwinfnt.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  svwinfnt.h                                                             */
-/*                                                                         */
-/*    The FreeType Windows FNT/FONT service (specification).               */
-/*                                                                         */
-/*  Copyright 2003 by                                                      */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __SVWINFNT_H__
-#define __SVWINFNT_H__
-
-#include FT_INTERNAL_SERVICE_H
-#include FT_WINFONTS_H
-
-
-FT_BEGIN_HEADER
-
-
-#define FT_SERVICE_ID_WINFNT  "winfonts"
-
-  typedef FT_Error
-  (*FT_WinFnt_GetHeaderFunc)( FT_Face               face,
-                              FT_WinFNT_HeaderRec  *aheader );
-
-
-  FT_DEFINE_SERVICE( WinFnt )
-  {
-    FT_WinFnt_GetHeaderFunc  get_header;
-  };
-
-  /* */
-
-
-FT_END_HEADER
-
-
-#endif /* __SVWINFNT_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/internal/services/svxf86nm.h b/extra_lib/include/freetype/freetype/internal/services/svxf86nm.h
deleted file mode 100644
index 3a33abc..0000000
--- a/extra_lib/include/freetype/freetype/internal/services/svxf86nm.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  svxf86nm.h                                                             */
-/*                                                                         */
-/*    The FreeType XFree86 services (specification only).                  */
-/*                                                                         */
-/*  Copyright 2003 by                                                      */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __SVXF86NM_H__
-#define __SVXF86NM_H__
-
-#include FT_INTERNAL_SERVICE_H
-
-
-FT_BEGIN_HEADER
-
-
-  /*
-   *  A trivial service used to return the name of a face's font driver,
-   *  according to the XFree86 nomenclature.  Note that the service data
-   *  is a simple constant string pointer.
-   */
-
-#define FT_SERVICE_ID_XF86_NAME  "xf86-driver-name"
-
-#define FT_XF86_FORMAT_TRUETYPE  "TrueType"
-#define FT_XF86_FORMAT_TYPE_1    "Type 1"
-#define FT_XF86_FORMAT_BDF       "BDF"
-#define FT_XF86_FORMAT_PCF       "PCF"
-#define FT_XF86_FORMAT_TYPE_42   "Type 42"
-#define FT_XF86_FORMAT_CID       "CID Type 1"
-#define FT_XF86_FORMAT_CFF       "CFF"
-#define FT_XF86_FORMAT_PFR       "PFR"
-#define FT_XF86_FORMAT_WINFNT    "Windows FNT"
-
-  /* */
-
- 
-FT_END_HEADER
-
-
-#endif /* __SVXF86NM_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/internal/sfnt.h b/extra_lib/include/freetype/freetype/internal/sfnt.h
deleted file mode 100644
index 76a92e8..0000000
--- a/extra_lib/include/freetype/freetype/internal/sfnt.h
+++ /dev/null
@@ -1,529 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  sfnt.h                                                                 */
-/*                                                                         */
-/*    High-level `sfnt' driver interface (specification).                  */
-/*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003 by                                     */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __SFNT_H__
-#define __SFNT_H__
-
-
-#include <ft2build.h>
-#include FT_INTERNAL_DRIVER_H
-#include FT_INTERNAL_TRUETYPE_TYPES_H
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    TT_Init_Face_Func                                                  */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    First part of the SFNT face object initialization.  This will find */
-  /*    the face in a SFNT file or collection, and load its format tag in  */
-  /*    face->format_tag.                                                  */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    stream     :: The input stream.                                    */
-  /*                                                                       */
-  /*    face       :: A handle to the target face object.                  */
-  /*                                                                       */
-  /*    face_index :: The index of the TrueType font, if we are opening a  */
-  /*                  collection.                                          */
-  /*                                                                       */
-  /*    num_params :: The number of additional parameters.                 */
-  /*                                                                       */
-  /*    params     :: Optional additional parameters.                      */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The stream cursor must be at the font file's origin.               */
-  /*                                                                       */
-  /*    This function recognizes fonts embedded in a `TrueType             */
-  /*    collection'.                                                       */
-  /*                                                                       */
-  /*    Once the format tag has been validated by the font driver, it      */
-  /*    should then call the TT_Load_Face_Func() callback to read the rest */
-  /*    of the SFNT tables in the object.                                  */
-  /*                                                                       */
-  typedef FT_Error
-  (*TT_Init_Face_Func)( FT_Stream      stream,
-                        TT_Face        face,
-                        FT_Int         face_index,
-                        FT_Int         num_params,
-                        FT_Parameter*  params );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    TT_Load_Face_Func                                                  */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Second part of the SFNT face object initialization.  This will     */
-  /*    load the common SFNT tables (head, OS/2, maxp, metrics, etc.) in   */
-  /*    the face object.                                                   */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    stream     :: The input stream.                                    */
-  /*                                                                       */
-  /*    face       :: A handle to the target face object.                  */
-  /*                                                                       */
-  /*    face_index :: The index of the TrueType font, if we are opening a  */
-  /*                  collection.                                          */
-  /*                                                                       */
-  /*    num_params :: The number of additional parameters.                 */
-  /*                                                                       */
-  /*    params     :: Optional additional parameters.                      */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    This function must be called after TT_Init_Face_Func().            */
-  /*                                                                       */
-  typedef FT_Error
-  (*TT_Load_Face_Func)( FT_Stream      stream,
-                        TT_Face        face,
-                        FT_Int         face_index,
-                        FT_Int         num_params,
-                        FT_Parameter*  params );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    TT_Done_Face_Func                                                  */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A callback used to delete the common SFNT data from a face.        */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    face :: A handle to the target face object.                        */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    This function does NOT destroy the face object.                    */
-  /*                                                                       */
-  typedef void
-  (*TT_Done_Face_Func)( TT_Face  face );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    TT_Load_SFNT_HeaderRec_Func                                        */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Loads the header of a SFNT font file.  Supports collections.       */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    face       :: A handle to the target face object.                  */
-  /*                                                                       */
-  /*    stream     :: The input stream.                                    */
-  /*                                                                       */
-  /*    face_index :: The index of the TrueType font, if we are opening a  */
-  /*                  collection.                                          */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    sfnt       :: The SFNT header.                                     */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The stream cursor must be at the font file's origin.               */
-  /*                                                                       */
-  /*    This function recognizes fonts embedded in a `TrueType             */
-  /*    collection'.                                                       */
-  /*                                                                       */
-  /*    This function checks that the header is valid by looking at the    */
-  /*    values of `search_range', `entry_selector', and `range_shift'.     */
-  /*                                                                       */
-  typedef FT_Error
-  (*TT_Load_SFNT_HeaderRec_Func)( TT_Face      face,
-                                  FT_Stream    stream,
-                                  FT_Long      face_index,
-                                  SFNT_Header  sfnt );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    TT_Load_Directory_Func                                             */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Loads the table directory into a face object.                      */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    face      :: A handle to the target face object.                   */
-  /*                                                                       */
-  /*    stream    :: The input stream.                                     */
-  /*                                                                       */
-  /*    sfnt      :: The SFNT header.                                      */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The stream cursor must be on the first byte after the 4-byte font  */
-  /*    format tag.  This is the case just after a call to                 */
-  /*    TT_Load_Format_Tag().                                              */
-  /*                                                                       */
-  typedef FT_Error
-  (*TT_Load_Directory_Func)( TT_Face      face,
-                             FT_Stream    stream,
-                             SFNT_Header  sfnt );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    TT_Load_Any_Func                                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Loads any font table into client memory.                           */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    face   :: The face object to look for.                             */
-  /*                                                                       */
-  /*    tag    :: The tag of table to load.  Use the value 0 if you want   */
-  /*              to access the whole font file, else set this parameter   */
-  /*              to a valid TrueType table tag that you can forge with    */
-  /*              the MAKE_TT_TAG macro.                                   */
-  /*                                                                       */
-  /*    offset :: The starting offset in the table (or the file if         */
-  /*              tag == 0).                                               */
-  /*                                                                       */
-  /*    length :: The address of the decision variable:                    */
-  /*                                                                       */
-  /*                If length == NULL:                                     */
-  /*                  Loads the whole table.  Returns an error if          */
-  /*                  `offset' == 0!                                       */
-  /*                                                                       */
-  /*                If *length == 0:                                       */
-  /*                  Exits immediately; returning the length of the given */
-  /*                  table or of the font file, depending on the value of */
-  /*                  `tag'.                                               */
-  /*                                                                       */
-  /*                If *length != 0:                                       */
-  /*                  Loads the next `length' bytes of table or font,      */
-  /*                  starting at offset `offset' (in table or font too).  */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    buffer :: The address of target buffer.                            */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    TrueType error code.  0 means success.                             */
-  /*                                                                       */
-  typedef FT_Error
-  (*TT_Load_Any_Func)( TT_Face    face,
-                       FT_ULong   tag,
-                       FT_Long    offset,
-                       FT_Byte   *buffer,
-                       FT_ULong*  length );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    TT_Load_SBit_Image_Func                                            */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Loads a given glyph sbit image from the font resource.  This also  */
-  /*    returns its metrics.                                               */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    face        :: The target face object.                             */
-  /*                                                                       */
-  /*    x_ppem      :: The horizontal resolution in points per EM.         */
-  /*                                                                       */
-  /*    y_ppem      :: The vertical resolution in points per EM.           */
-  /*                                                                       */
-  /*    glyph_index :: The current glyph index.                            */
-  /*                                                                       */
-  /*    stream      :: The input stream.                                   */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    amap        :: The target pixmap.                                  */
-  /*                                                                       */
-  /*    ametrics    :: A big sbit metrics structure for the glyph image.   */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.  Returns an error if no     */
-  /*    glyph sbit exists for the index.                                   */
-  /*                                                                       */
-  /*  <Note>                                                               */
-  /*    The `map.buffer' field is always freed before the glyph is loaded. */
-  /*                                                                       */
-  typedef FT_Error
-  (*TT_Load_SBit_Image_Func)( TT_Face              face,
-                              FT_ULong             strike_index,
-                              FT_UInt              glyph_index,
-                              FT_UInt              load_flags,
-                              FT_Stream            stream,
-                              FT_Bitmap           *amap,
-                              TT_SBit_MetricsRec  *ametrics );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    TT_Set_SBit_Strike_Func                                            */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Selects an sbit strike for given horizontal and vertical ppem      */
-  /*    values.                                                            */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    face          :: The target face object.                           */
-  /*                                                                       */
-  /*    x_ppem        :: The horizontal resolution in points per EM.       */
-  /*                                                                       */
-  /*    y_ppem        :: The vertical resolution in points per EM.         */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    astrike_index :: The index of the sbit strike.                     */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.  Returns an error if no     */
-  /*    sbit strike exists for the selected ppem values.                   */
-  /*                                                                       */
-  typedef FT_Error
-  (*TT_Set_SBit_Strike_Func)( TT_Face    face,
-                              FT_Int     x_ppem,
-                              FT_Int     y_ppem,
-                              FT_ULong  *astrike_index );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    TT_Get_PS_Name_Func                                                */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Gets the PostScript glyph name of a glyph.                         */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    idx  :: The glyph index.                                           */
-  /*                                                                       */
-  /*    PSname :: The address of a string pointer.  Will be NULL in case   */
-  /*              of error, otherwise it is a pointer to the glyph name.   */
-  /*                                                                       */
-  /*              You must not modify the returned string!                 */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  typedef FT_Error
-  (*TT_Get_PS_Name_Func)( TT_Face      face,
-                          FT_UInt      idx,
-                          FT_String**  PSname );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    TT_Load_Metrics_Func                                               */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Loads the horizontal or vertical header in a face object.          */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    face     :: A handle to the target face object.                    */
-  /*                                                                       */
-  /*    stream   :: The input stream.                                      */
-  /*                                                                       */
-  /*    vertical :: A boolean flag.  If set, load vertical metrics.        */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  typedef FT_Error
-  (*TT_Load_Metrics_Func)( TT_Face    face,
-                           FT_Stream  stream,
-                           FT_Bool    vertical );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    TT_CharMap_Load_Func                                               */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Loads a given TrueType character map into memory.                  */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    face   :: A handle to the parent face object.                      */
-  /*                                                                       */
-  /*    stream :: A handle to the current stream object.                   */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    cmap   :: A pointer to a cmap object.                              */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The function assumes that the stream is already in use (i.e.,      */
-  /*    opened).  In case of error, all partially allocated tables are     */
-  /*    released.                                                          */
-  /*                                                                       */
-  typedef FT_Error
-  (*TT_CharMap_Load_Func)( TT_Face       face,
-                           TT_CMapTable  cmap,
-                           FT_Stream     input );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    TT_CharMap_Free_Func                                               */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Destroys a character mapping table.                                */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    face :: A handle to the parent face object.                        */
-  /*                                                                       */
-  /*    cmap :: A handle to a cmap object.                                 */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  typedef FT_Error
-  (*TT_CharMap_Free_Func)( TT_Face       face,
-                           TT_CMapTable  cmap );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    TT_Load_Table_Func                                                 */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Loads a given TrueType table.                                      */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    face   :: A handle to the target face object.                      */
-  /*                                                                       */
-  /*    stream :: The input stream.                                        */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The function will use `face->goto_table' to seek the stream to     */
-  /*    the start of the table.                                            */
-  /*                                                                       */
-  typedef FT_Error
-  (*TT_Load_Table_Func)( TT_Face    face,
-                         FT_Stream  stream );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    TT_Free_Table_Func                                                 */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Frees a given TrueType table.                                      */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    face :: A handle to the target face object.                        */
-  /*                                                                       */
-  typedef void
-  (*TT_Free_Table_Func)( TT_Face  face );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    SFNT_Interface                                                     */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This structure holds pointers to the functions used to load and    */
-  /*    free the basic tables that are required in a `sfnt' font file.     */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    Check the various xxx_Func() descriptions for details.             */
-  /*                                                                       */
-  typedef struct  SFNT_Interface_
-  {
-    TT_Loader_GotoTableFunc      goto_table;
-
-    TT_Init_Face_Func            init_face;
-    TT_Load_Face_Func            load_face;
-    TT_Done_Face_Func            done_face;
-    FT_Module_Requester          get_interface;
-
-    TT_Load_Any_Func             load_any;
-    TT_Load_SFNT_HeaderRec_Func  load_sfnt_header;
-    TT_Load_Directory_Func       load_directory;
-
-    /* these functions are called by `load_face' but they can also  */
-    /* be called from external modules, if there is a need to do so */
-    TT_Load_Table_Func           load_header;
-    TT_Load_Metrics_Func         load_metrics;
-    TT_Load_Table_Func           load_charmaps;
-    TT_Load_Table_Func           load_max_profile;
-    TT_Load_Table_Func           load_os2;
-    TT_Load_Table_Func           load_psnames;
-
-    TT_Load_Table_Func           load_names;
-    TT_Free_Table_Func           free_names;
-
-    /* optional tables */
-    TT_Load_Table_Func           load_hdmx;
-    TT_Free_Table_Func           free_hdmx;
-
-    TT_Load_Table_Func           load_kerning;
-    TT_Load_Table_Func           load_gasp;
-    TT_Load_Table_Func           load_pclt;
-
-    /* see `ttload.h' */
-    TT_Load_Table_Func           load_bitmap_header;
-
-    /* see `ttsbit.h' */
-    TT_Set_SBit_Strike_Func      set_sbit_strike;
-    TT_Load_Table_Func           load_sbits;
-    TT_Load_SBit_Image_Func      load_sbit_image;
-    TT_Free_Table_Func           free_sbits;
-
-    /* see `ttpost.h' */
-    TT_Get_PS_Name_Func          get_psname;
-    TT_Free_Table_Func           free_psnames;
-
-    /* see `ttcmap.h' */
-    TT_CharMap_Load_Func         load_charmap;
-    TT_CharMap_Free_Func         free_charmap;
-
-  } SFNT_Interface;
-
-
-  /* transitional */
-  typedef SFNT_Interface*   SFNT_Service;
-
-
-FT_END_HEADER
-
-#endif /* __SFNT_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/internal/t1types.h b/extra_lib/include/freetype/freetype/internal/t1types.h
deleted file mode 100644
index 08bdfb1..0000000
--- a/extra_lib/include/freetype/freetype/internal/t1types.h
+++ /dev/null
@@ -1,200 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  t1types.h                                                              */
-/*                                                                         */
-/*    Basic Type1/Type2 type definitions and interface (specification      */
-/*    only).                                                               */
-/*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003 by                                     */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __T1TYPES_H__
-#define __T1TYPES_H__
-
-
-#include <ft2build.h>
-#include FT_TYPE1_TABLES_H
-#include FT_INTERNAL_POSTSCRIPT_HINTS_H
-#include FT_INTERNAL_SERVICE_H
-#include FT_SERVICE_POSTSCRIPT_CMAPS_H
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /***                                                                   ***/
-  /***                                                                   ***/
-  /***              REQUIRED TYPE1/TYPE2 TABLES DEFINITIONS              ***/
-  /***                                                                   ***/
-  /***                                                                   ***/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    T1_EncodingRec                                                     */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure modeling a custom encoding.                            */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    num_chars  :: The number of character codes in the encoding.       */
-  /*                  Usually 256.                                         */
-  /*                                                                       */
-  /*    code_first :: The lowest valid character code in the encoding.     */
-  /*                                                                       */
-  /*    code_last  :: The highest valid character code in the encoding.    */
-  /*                                                                       */
-  /*    char_index :: An array of corresponding glyph indices.             */
-  /*                                                                       */
-  /*    char_name  :: An array of corresponding glyph names.               */
-  /*                                                                       */
-  typedef struct  T1_EncodingRecRec_
-  {
-    FT_Int       num_chars;
-    FT_Int       code_first;
-    FT_Int       code_last;
-
-    FT_UShort*   char_index;
-    FT_String**  char_name;
-
-  } T1_EncodingRec, *T1_Encoding;
-
-
-  typedef enum  T1_EncodingType_
-  {
-    T1_ENCODING_TYPE_NONE = 0,
-    T1_ENCODING_TYPE_ARRAY,
-    T1_ENCODING_TYPE_STANDARD,
-    T1_ENCODING_TYPE_ISOLATIN1,
-    T1_ENCODING_TYPE_EXPERT
-
-  } T1_EncodingType;
-
-
-  typedef struct  T1_FontRec_
-  {
-    PS_FontInfoRec   font_info;         /* font info dictionary */
-    PS_PrivateRec    private_dict;      /* private dictionary   */
-    FT_String*       font_name;         /* top-level dictionary */
-
-    T1_EncodingType  encoding_type;
-    T1_EncodingRec   encoding;
-
-    FT_Byte*         subrs_block;
-    FT_Byte*         charstrings_block;
-    FT_Byte*         glyph_names_block;
-
-    FT_Int           num_subrs;
-    FT_Byte**        subrs;
-    FT_Int*          subrs_len;
-
-    FT_Int           num_glyphs;
-    FT_String**      glyph_names;       /* array of glyph names       */
-    FT_Byte**        charstrings;       /* array of glyph charstrings */
-    FT_Int*          charstrings_len;
-
-    FT_Byte          paint_type;
-    FT_Byte          font_type;
-    FT_Matrix        font_matrix;
-    FT_Vector        font_offset;
-    FT_BBox          font_bbox;
-    FT_Long          font_id;
-
-    FT_Fixed         stroke_width;
-
-  } T1_FontRec, *T1_Font;
-
-
-  typedef struct  CID_SubrsRec_
-  {
-    FT_UInt    num_subrs;
-    FT_Byte**  code;
-
-  } CID_SubrsRec, *CID_Subrs;
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /***                                                                   ***/
-  /***                                                                   ***/
-  /***                ORIGINAL T1_FACE CLASS DEFINITION                  ***/
-  /***                                                                   ***/
-  /***                                                                   ***/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* This structure/class is defined here because it is common to the      */
-  /* following formats: TTF, OpenType-TT, and OpenType-CFF.                */
-  /*                                                                       */
-  /* Note, however, that the classes TT_Size, TT_GlyphSlot, and TT_CharMap */
-  /* are not shared between font drivers, and are thus defined normally in */
-  /* `ttobjs.h'.                                                           */
-  /*                                                                       */
-  /*************************************************************************/
-
-  typedef struct T1_FaceRec_*   T1_Face;
-  typedef struct CID_FaceRec_*  CID_Face;
-
-
-  typedef struct  T1_FaceRec_
-  {
-    FT_FaceRec     root;
-    T1_FontRec     type1;
-    const void*    psnames;
-    const void*    psaux;
-    const void*    afm_data;
-    FT_CharMapRec  charmaprecs[2];
-    FT_CharMap     charmaps[2];
-    PS_Unicodes    unicode_map;
-
-    /* support for Multiple Masters fonts */
-    PS_Blend       blend;
-
-    /* since FT 2.1 - interface to PostScript hinter */
-    const void*    pshinter;
-
-  } T1_FaceRec;
-
-
-  typedef struct  CID_FaceRec_
-  {
-    FT_FaceRec       root;
-    void*            psnames;
-    void*            psaux;
-    CID_FaceInfoRec  cid;
-    void*            afm_data;
-    CID_Subrs        subrs;
-
-    /* since FT 2.1 - interface to PostScript hinter */
-    void*            pshinter;
-
-  } CID_FaceRec;
-
-
-FT_END_HEADER
-
-#endif /* __T1TYPES_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/internal/t42types.h b/extra_lib/include/freetype/freetype/internal/t42types.h
deleted file mode 100644
index 7562252..0000000
--- a/extra_lib/include/freetype/freetype/internal/t42types.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  t42types.h                                                             */
-/*                                                                         */
-/*    Type 42 font data types (specification only).                        */
-/*                                                                         */
-/*  Copyright 2002 by Roberto Alameda.                                     */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __T42TYPES_H__
-#define __T42TYPES_H__
-
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_TYPE1_TABLES_H
-#include FT_INTERNAL_TYPE1_TYPES_H
-#include FT_INTERNAL_POSTSCRIPT_NAMES_H
-#include FT_INTERNAL_POSTSCRIPT_HINTS_H
-
-
-FT_BEGIN_HEADER
-
-
-  typedef struct  T42_FaceRec_
-  {
-    FT_FaceRec     root;
-    T1_FontRec     type1;
-    const void*    psnames;
-    const void*    psaux;
-    const void*    afm_data;
-    FT_Byte*       ttf_data;
-    FT_ULong       ttf_size;
-    FT_Face        ttf_face;
-    FT_CharMapRec  charmaprecs[2];
-    FT_CharMap     charmaps[2];
-    PS_Unicodes    unicode_map;
-
-  } T42_FaceRec, *T42_Face;
-
-
-FT_END_HEADER
-
-#endif /* __T1TYPES_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/internal/tttypes.h b/extra_lib/include/freetype/freetype/internal/tttypes.h
deleted file mode 100644
index 2b419f1..0000000
--- a/extra_lib/include/freetype/freetype/internal/tttypes.h
+++ /dev/null
@@ -1,1678 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  tttypes.h                                                              */
-/*                                                                         */
-/*    Basic SFNT/TrueType type definitions and interface (specification    */
-/*    only).                                                               */
-/*                                                                         */
-/*  Copyright 1996-2001, 2002 by                                           */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __TTTYPES_H__
-#define __TTTYPES_H__
-
-
-#include <ft2build.h>
-#include FT_TRUETYPE_TABLES_H
-#include FT_INTERNAL_OBJECTS_H
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /***                                                                   ***/
-  /***                                                                   ***/
-  /***             REQUIRED TRUETYPE/OPENTYPE TABLES DEFINITIONS         ***/
-  /***                                                                   ***/
-  /***                                                                   ***/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TTC_HeaderRec                                                      */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    TrueType collection header.  This table contains the offsets of    */
-  /*    the font headers of each distinct TrueType face in the file.       */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    tag     :: Must be `ttc ' to indicate a TrueType collection.       */
-  /*                                                                       */
-  /*    version :: The version number.                                     */
-  /*                                                                       */
-  /*    count   :: The number of faces in the collection.  The             */
-  /*               specification says this should be an unsigned long, but */
-  /*               we use a signed long since we need the value -1 for     */
-  /*               specific purposes.                                      */
-  /*                                                                       */
-  /*    offsets :: The offsets of the font headers, one per face.          */
-  /*                                                                       */
-  typedef struct  TTC_HeaderRec_
-  {
-    FT_ULong   tag;
-    FT_Fixed   version;
-    FT_Long    count;
-    FT_ULong*  offsets;
-
-  } TTC_HeaderRec;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    SFNT_HeaderRec                                                     */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    SFNT file format header.                                           */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    format_tag     :: The font format tag.                             */
-  /*                                                                       */
-  /*    num_tables     :: The number of tables in file.                    */
-  /*                                                                       */
-  /*    search_range   :: Must be `16 * (max power of 2 <= num_tables)'.   */
-  /*                                                                       */
-  /*    entry_selector :: Must be log2 of `search_range / 16'.             */
-  /*                                                                       */
-  /*    range_shift    :: Must be `num_tables * 16 - search_range'.        */
-  /*                                                                       */
-  typedef struct  SFNT_HeaderRec_
-  {
-    FT_ULong   format_tag;
-    FT_UShort  num_tables;
-    FT_UShort  search_range;
-    FT_UShort  entry_selector;
-    FT_UShort  range_shift;
-
-    FT_ULong   offset;  /* not in file */
-
-  } SFNT_HeaderRec, *SFNT_Header;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_TableDirRec                                                     */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This structure models a TrueType table directory.  It is used to   */
-  /*    access the various tables of the font face.                        */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    version       :: The version number; starts with 0x00010000.       */
-  /*                                                                       */
-  /*    numTables     :: The number of tables.                             */
-  /*                                                                       */
-  /*    searchRange   :: Unused.                                           */
-  /*                                                                       */
-  /*    entrySelector :: Unused.                                           */
-  /*                                                                       */
-  /*    rangeShift    :: Unused.                                           */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    This structure is only used during font opening.                   */
-  /*                                                                       */
-  typedef struct  TT_TableDirRec_
-  {
-    FT_Fixed   version;        /* should be 0x10000 */
-    FT_UShort  numTables;      /* number of tables  */
-
-    FT_UShort  searchRange;    /* These parameters are only used  */
-    FT_UShort  entrySelector;  /* for a dichotomy search in the   */
-    FT_UShort  rangeShift;     /* directory.  We ignore them.     */
-
-  } TT_TableDirRec;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_TableRec                                                        */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This structure describes a given table of a TrueType font.         */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    Tag      :: A four-bytes tag describing the table.                 */
-  /*                                                                       */
-  /*    CheckSum :: The table checksum.  This value can be ignored.        */
-  /*                                                                       */
-  /*    Offset   :: The offset of the table from the start of the TrueType */
-  /*                font in its resource.                                  */
-  /*                                                                       */
-  /*    Length   :: The table length (in bytes).                           */
-  /*                                                                       */
-  typedef struct  TT_TableRec_
-  {
-    FT_ULong  Tag;        /*        table type */
-    FT_ULong  CheckSum;   /*    table checksum */
-    FT_ULong  Offset;     /* table file offset */
-    FT_ULong  Length;     /*      table length */
-
-  } TT_TableRec, *TT_Table;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_CMapDirRec                                                      */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This structure describes the directory of the `cmap' table,        */
-  /*    containing the font's character mappings table.                    */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    tableVersionNumber :: The version number.                          */
-  /*                                                                       */
-  /*    numCMaps           :: The number of charmaps in the font.          */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    This structure is only used during font loading.                   */
-  /*                                                                       */
-  typedef struct  TT_CMapDirRec_
-  {
-    FT_UShort  tableVersionNumber;
-    FT_UShort  numCMaps;
-
-  } TT_CMapDirRec, *TT_CMapDir;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_CMapDirEntryRec                                                 */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This structure describes a charmap in a TrueType font.             */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    platformID :: An ID used to specify for which platform this        */
-  /*                  charmap is defined (FreeType manages all platforms). */
-  /*                                                                       */
-  /*    encodingID :: A platform-specific ID used to indicate which source */
-  /*                  encoding is used in this charmap.                    */
-  /*                                                                       */
-  /*    offset     :: The offset of the charmap relative to the start of   */
-  /*                  the `cmap' table.                                    */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    This structure is only used during font loading.                   */
-  /*                                                                       */
-  typedef struct  TT_CMapDirEntryRec_
-  {
-    FT_UShort  platformID;
-    FT_UShort  platformEncodingID;
-    FT_Long    offset;
-
-  } TT_CMapDirEntryRec, *TT_CMapDirEntry;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_LongMetricsRec                                                  */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure modeling the long metrics of the `hmtx' and `vmtx'     */
-  /*    TrueType tables.  The values are expressed in font units.          */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    advance :: The advance width or height for the glyph.              */
-  /*                                                                       */
-  /*    bearing :: The left-side or top-side bearing for the glyph.        */
-  /*                                                                       */
-  typedef struct  TT_LongMetricsRec_
-  {
-    FT_UShort  advance;
-    FT_Short   bearing;
-
-  } TT_LongMetricsRec, *TT_LongMetrics;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    TT_ShortMetrics                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A simple type to model the short metrics of the `hmtx' and `vmtx'  */
-  /*    tables.                                                            */
-  /*                                                                       */
-  typedef FT_Short  TT_ShortMetrics;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_NameEntryRec                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure modeling TrueType name records.  Name records are used */
-  /*    to store important strings like family name, style name,           */
-  /*    copyright, etc. in _localized_ versions (i.e., language, encoding, */
-  /*    etc).                                                              */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    platformID   :: The ID of the name's encoding platform.            */
-  /*                                                                       */
-  /*    encodingID   :: The platform-specific ID for the name's encoding.  */
-  /*                                                                       */
-  /*    languageID   :: The platform-specific ID for the name's language.  */
-  /*                                                                       */
-  /*    nameID       :: The ID specifying what kind of name this is.       */
-  /*                                                                       */
-  /*    stringLength :: The length of the string in bytes.                 */
-  /*                                                                       */
-  /*    stringOffset :: The offset to the string in the `name' table.      */
-  /*                                                                       */
-  /*    string       :: A pointer to the string's bytes.  Note that these  */
-  /*                    are usually UTF-16 encoded characters.             */
-  /*                                                                       */
-  typedef struct  TT_NameEntryRec_
-  {
-    FT_UShort  platformID;
-    FT_UShort  encodingID;
-    FT_UShort  languageID;
-    FT_UShort  nameID;
-    FT_UShort  stringLength;
-    FT_ULong   stringOffset;
-
-    /* this last field is not defined in the spec */
-    /* but used by the FreeType engine            */
-
-    FT_Byte*   string;
-
-  } TT_NameEntryRec, *TT_NameEntry;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_NameTableRec                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure modeling the TrueType name table.                      */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    format         :: The format of the name table.                    */
-  /*                                                                       */
-  /*    numNameRecords :: The number of names in table.                    */
-  /*                                                                       */
-  /*    storageOffset  :: The offset of the name table in the `name'       */
-  /*                      TrueType table.                                  */
-  /*                                                                       */
-  /*    names          :: An array of name records.                        */
-  /*                                                                       */
-  /*    stream         :: the file's input stream.                         */
-  /*                                                                       */
-  typedef struct  TT_NameTableRec_
-  {
-    FT_UShort         format;
-    FT_UInt           numNameRecords;
-    FT_UInt           storageOffset;
-    TT_NameEntryRec*  names;
-    FT_Stream         stream;
-
-  } TT_NameTableRec, *TT_NameTable;
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /***                                                                   ***/
-  /***                                                                   ***/
-  /***             OPTIONAL TRUETYPE/OPENTYPE TABLES DEFINITIONS         ***/
-  /***                                                                   ***/
-  /***                                                                   ***/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_GaspRangeRec                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A tiny structure used to model a gasp range according to the       */
-  /*    TrueType specification.                                            */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    maxPPEM  :: The maximum ppem value to which `gaspFlag' applies.    */
-  /*                                                                       */
-  /*    gaspFlag :: A flag describing the grid-fitting and anti-aliasing   */
-  /*                modes to be used.                                      */
-  /*                                                                       */
-  typedef struct  TT_GaspRangeRec_
-  {
-    FT_UShort  maxPPEM;
-    FT_UShort  gaspFlag;
-
-  } TT_GaspRangeRec, *TT_GaspRange;
-
-
-#define TT_GASP_GRIDFIT  0x01
-#define TT_GASP_DOGRAY   0x02
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_GaspRec                                                         */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure modeling the TrueType `gasp' table used to specify     */
-  /*    grid-fitting and anti-aliasing behaviour.                          */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    version    :: The version number.                                  */
-  /*                                                                       */
-  /*    numRanges  :: The number of gasp ranges in table.                  */
-  /*                                                                       */
-  /*    gaspRanges :: An array of gasp ranges.                             */
-  /*                                                                       */
-  typedef struct  TT_Gasp_
-  {
-    FT_UShort     version;
-    FT_UShort     numRanges;
-    TT_GaspRange  gaspRanges;
-
-  } TT_GaspRec;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_HdmxEntryRec                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A small structure used to model the pre-computed widths of a given */
-  /*    size.  They are found in the `hdmx' table.                         */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    ppem      :: The pixels per EM value at which these metrics apply. */
-  /*                                                                       */
-  /*    max_width :: The maximum advance width for this metric.            */
-  /*                                                                       */
-  /*    widths    :: An array of widths.  Note: These are 8-bit bytes.     */
-  /*                                                                       */
-  typedef struct  TT_HdmxEntryRec_
-  {
-    FT_Byte   ppem;
-    FT_Byte   max_width;
-    FT_Byte*  widths;
-
-  } TT_HdmxEntryRec, *TT_HdmxEntry;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_HdmxRec                                                         */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure used to model the `hdmx' table, which contains         */
-  /*    pre-computed widths for a set of given sizes/dimensions.           */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    version     :: The version number.                                 */
-  /*                                                                       */
-  /*    num_records :: The number of hdmx records.                         */
-  /*                                                                       */
-  /*    records     :: An array of hdmx records.                           */
-  /*                                                                       */
-  typedef struct  TT_HdmxRec_
-  {
-    FT_UShort     version;
-    FT_Short      num_records;
-    TT_HdmxEntry  records;
-
-  } TT_HdmxRec, *TT_Hdmx;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_Kern0_PairRec                                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure used to model a kerning pair for the kerning table     */
-  /*    format 0.  The engine now loads this table if it finds one in the  */
-  /*    font file.                                                         */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    left  :: The index of the left glyph in pair.                      */
-  /*                                                                       */
-  /*    right :: The index of the right glyph in pair.                     */
-  /*                                                                       */
-  /*    value :: The kerning distance.  A positive value spaces the        */
-  /*             glyphs, a negative one makes them closer.                 */
-  /*                                                                       */
-  typedef struct  TT_Kern0_PairRec_
-  {
-    FT_UShort  left;   /* index of left  glyph in pair */
-    FT_UShort  right;  /* index of right glyph in pair */
-    FT_FWord   value;  /* kerning value                */
-
-  } TT_Kern0_PairRec, *TT_Kern0_Pair;
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /***                                                                   ***/
-  /***                                                                   ***/
-  /***                    EMBEDDED BITMAPS SUPPORT                       ***/
-  /***                                                                   ***/
-  /***                                                                   ***/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_SBit_MetricsRec                                                 */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure used to hold the big metrics of a given glyph bitmap   */
-  /*    in a TrueType or OpenType font.  These are usually found in the    */
-  /*    `EBDT' (Microsoft) or `bloc' (Apple) table.                        */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    height       :: The glyph height in pixels.                        */
-  /*                                                                       */
-  /*    width        :: The glyph width in pixels.                         */
-  /*                                                                       */
-  /*    horiBearingX :: The horizontal left bearing.                       */
-  /*                                                                       */
-  /*    horiBearingY :: The horizontal top bearing.                        */
-  /*                                                                       */
-  /*    horiAdvance  :: The horizontal advance.                            */
-  /*                                                                       */
-  /*    vertBearingX :: The vertical left bearing.                         */
-  /*                                                                       */
-  /*    vertBearingY :: The vertical top bearing.                          */
-  /*                                                                       */
-  /*    vertAdvance  :: The vertical advance.                              */
-  /*                                                                       */
-  typedef struct  TT_SBit_MetricsRec_
-  {
-    FT_Byte  height;
-    FT_Byte  width;
-
-    FT_Char  horiBearingX;
-    FT_Char  horiBearingY;
-    FT_Byte  horiAdvance;
-
-    FT_Char  vertBearingX;
-    FT_Char  vertBearingY;
-    FT_Byte  vertAdvance;
-
-  } TT_SBit_MetricsRec, *TT_SBit_Metrics;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_SBit_SmallMetricsRec                                            */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure used to hold the small metrics of a given glyph bitmap */
-  /*    in a TrueType or OpenType font.  These are usually found in the    */
-  /*    `EBDT' (Microsoft) or the `bdat' (Apple) table.                    */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    height   :: The glyph height in pixels.                            */
-  /*                                                                       */
-  /*    width    :: The glyph width in pixels.                             */
-  /*                                                                       */
-  /*    bearingX :: The left-side bearing.                                 */
-  /*                                                                       */
-  /*    bearingY :: The top-side bearing.                                  */
-  /*                                                                       */
-  /*    advance  :: The advance width or height.                           */
-  /*                                                                       */
-  typedef struct  TT_SBit_Small_Metrics_
-  {
-    FT_Byte  height;
-    FT_Byte  width;
-
-    FT_Char  bearingX;
-    FT_Char  bearingY;
-    FT_Byte  advance;
-
-  } TT_SBit_SmallMetricsRec, *TT_SBit_SmallMetrics;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_SBit_LineMetricsRec                                             */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure used to describe the text line metrics of a given      */
-  /*    bitmap strike, for either a horizontal or vertical layout.         */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    ascender                :: The ascender in pixels.                 */
-  /*                                                                       */
-  /*    descender               :: The descender in pixels.                */
-  /*                                                                       */
-  /*    max_width               :: The maximum glyph width in pixels.      */
-  /*                                                                       */
-  /*    caret_slope_enumerator  :: Rise of the caret slope, typically set  */
-  /*                               to 1 for non-italic fonts.              */
-  /*                                                                       */
-  /*    caret_slope_denominator :: Rise of the caret slope, typically set  */
-  /*                               to 0 for non-italic fonts.              */
-  /*                                                                       */
-  /*    caret_offset            :: Offset in pixels to move the caret for  */
-  /*                               proper positioning.                     */
-  /*                                                                       */
-  /*    min_origin_SB           :: Minimum of horiBearingX (resp.          */
-  /*                               vertBearingY).                          */
-  /*    min_advance_SB          :: Minimum of                              */
-  /*                                                                       */
-  /*                                 horizontal advance -                  */
-  /*                                   ( horiBearingX + width )            */
-  /*                                                                       */
-  /*                               resp.                                   */
-  /*                                                                       */
-  /*                                 vertical advance -                    */
-  /*                                   ( vertBearingY + height )           */
-  /*                                                                       */
-  /*    max_before_BL           :: Maximum of horiBearingY (resp.          */
-  /*                               vertBearingY).                          */
-  /*                                                                       */
-  /*    min_after_BL            :: Minimum of                              */
-  /*                                                                       */
-  /*                                 horiBearingY - height                 */
-  /*                                                                       */
-  /*                               resp.                                   */
-  /*                                                                       */
-  /*                                 vertBearingX - width                  */
-  /*                                                                       */
-  /*    pads                    :: Unused (to make the size of the record  */
-  /*                               a multiple of 32 bits.                  */
-  /*                                                                       */
-  typedef struct  TT_SBit_LineMetricsRec_
-  {
-    FT_Char  ascender;
-    FT_Char  descender;
-    FT_Byte  max_width;
-    FT_Char  caret_slope_numerator;
-    FT_Char  caret_slope_denominator;
-    FT_Char  caret_offset;
-    FT_Char  min_origin_SB;
-    FT_Char  min_advance_SB;
-    FT_Char  max_before_BL;
-    FT_Char  min_after_BL;
-    FT_Char  pads[2];
-
-  } TT_SBit_LineMetricsRec, *TT_SBit_LineMetrics;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_SBit_RangeRec                                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A TrueType/OpenType subIndexTable as defined in the `EBLC'         */
-  /*    (Microsoft) or `bloc' (Apple) tables.                              */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    first_glyph   :: The first glyph index in the range.               */
-  /*                                                                       */
-  /*    last_glyph    :: The last glyph index in the range.                */
-  /*                                                                       */
-  /*    index_format  :: The format of index table.  Valid values are 1    */
-  /*                     to 5.                                             */
-  /*                                                                       */
-  /*    image_format  :: The format of `EBDT' image data.                  */
-  /*                                                                       */
-  /*    image_offset  :: The offset to image data in `EBDT'.               */
-  /*                                                                       */
-  /*    image_size    :: For index formats 2 and 5.  This is the size in   */
-  /*                     bytes of each glyph bitmap.                       */
-  /*                                                                       */
-  /*    big_metrics   :: For index formats 2 and 5.  This is the big       */
-  /*                     metrics for each glyph bitmap.                    */
-  /*                                                                       */
-  /*    num_glyphs    :: For index formats 4 and 5.  This is the number of */
-  /*                     glyphs in the code array.                         */
-  /*                                                                       */
-  /*    glyph_offsets :: For index formats 1 and 3.                        */
-  /*                                                                       */
-  /*    glyph_codes   :: For index formats 4 and 5.                        */
-  /*                                                                       */
-  /*    table_offset  :: The offset of the index table in the `EBLC'       */
-  /*                     table.  Only used during strike loading.          */
-  /*                                                                       */
-  typedef struct  TT_SBit_RangeRec
-  {
-    FT_UShort           first_glyph;
-    FT_UShort           last_glyph;
-
-    FT_UShort           index_format;
-    FT_UShort           image_format;
-    FT_ULong            image_offset;
-
-    FT_ULong            image_size;
-    TT_SBit_MetricsRec  metrics;
-    FT_ULong            num_glyphs;
-
-    FT_ULong*           glyph_offsets;
-    FT_UShort*          glyph_codes;
-
-    FT_ULong            table_offset;
-
-  } TT_SBit_RangeRec, *TT_SBit_Range;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_SBit_StrikeRec                                                  */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure used describe a given bitmap strike in the `EBLC'      */
-  /*    (Microsoft) or `bloc' (Apple) tables.                              */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*   num_index_ranges :: The number of index ranges.                     */
-  /*                                                                       */
-  /*   index_ranges     :: An array of glyph index ranges.                 */
-  /*                                                                       */
-  /*   color_ref        :: Unused.  `color_ref' is put in for future       */
-  /*                       enhancements, but these fields are already      */
-  /*                       in use by other platforms (e.g. Newton).        */
-  /*                       For details, please see                         */
-  /*                                                                       */
-  /*                         http://fonts.apple.com/                       */
-  /*                                TTRefMan/RM06/Chap6bloc.html           */
-  /*                                                                       */
-  /*   hori             :: The line metrics for horizontal layouts.        */
-  /*                                                                       */
-  /*   vert             :: The line metrics for vertical layouts.          */
-  /*                                                                       */
-  /*   start_glyph      :: The lowest glyph index for this strike.         */
-  /*                                                                       */
-  /*   end_glyph        :: The highest glyph index for this strike.        */
-  /*                                                                       */
-  /*   x_ppem           :: The number of horizontal pixels per EM.         */
-  /*                                                                       */
-  /*   y_ppem           :: The number of vertical pixels per EM.           */
-  /*                                                                       */
-  /*   bit_depth        :: The bit depth.  Valid values are 1, 2, 4,       */
-  /*                       and 8.                                          */
-  /*                                                                       */
-  /*   flags            :: Is this a vertical or horizontal strike?  For   */
-  /*                       details, please see                             */
-  /*                                                                       */
-  /*                         http://fonts.apple.com/                       */
-  /*                                TTRefMan/RM06/Chap6bloc.html           */
-  /*                                                                       */
-  typedef struct  TT_SBit_StrikeRec_
-  {
-    FT_Int                  num_ranges;
-    TT_SBit_Range           sbit_ranges;
-    FT_ULong                ranges_offset;
-
-    FT_ULong                color_ref;
-
-    TT_SBit_LineMetricsRec  hori;
-    TT_SBit_LineMetricsRec  vert;
-
-    FT_UShort               start_glyph;
-    FT_UShort               end_glyph;
-
-    FT_Byte                 x_ppem;
-    FT_Byte                 y_ppem;
-
-    FT_Byte                 bit_depth;
-    FT_Char                 flags;
-
-  } TT_SBit_StrikeRec, *TT_SBit_Strike;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_SBit_ComponentRec                                               */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A simple structure to describe a compound sbit element.            */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    glyph_code :: The element's glyph index.                           */
-  /*                                                                       */
-  /*    x_offset   :: The element's left bearing.                          */
-  /*                                                                       */
-  /*    y_offset   :: The element's top bearing.                           */
-  /*                                                                       */
-  typedef struct  TT_SBit_ComponentRec_
-  {
-    FT_UShort  glyph_code;
-    FT_Char    x_offset;
-    FT_Char    y_offset;
-
-  } TT_SBit_ComponentRec, *TT_SBit_Component;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_SBit_ScaleRec                                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure used describe a given bitmap scaling table, as defined */
-  /*    in the `EBSC' table.                                               */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    hori              :: The horizontal line metrics.                  */
-  /*                                                                       */
-  /*    vert              :: The vertical line metrics.                    */
-  /*                                                                       */
-  /*    x_ppem            :: The number of horizontal pixels per EM.       */
-  /*                                                                       */
-  /*    y_ppem            :: The number of vertical pixels per EM.         */
-  /*                                                                       */
-  /*    x_ppem_substitute :: Substitution x_ppem value.                    */
-  /*                                                                       */
-  /*    y_ppem_substitute :: Substitution y_ppem value.                    */
-  /*                                                                       */
-  typedef struct  TT_SBit_ScaleRec_
-  {
-    TT_SBit_LineMetricsRec  hori;
-    TT_SBit_LineMetricsRec  vert;
-
-    FT_Byte                 x_ppem;
-    FT_Byte                 y_ppem;
-
-    FT_Byte                 x_ppem_substitute;
-    FT_Byte                 y_ppem_substitute;
-
-  } TT_SBit_ScaleRec, *TT_SBit_Scale;
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /***                                                                   ***/
-  /***                                                                   ***/
-  /***                  POSTSCRIPT GLYPH NAMES SUPPORT                   ***/
-  /***                                                                   ***/
-  /***                                                                   ***/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_Post_20Rec                                                      */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Postscript names sub-table, format 2.0.  Stores the PS name of     */
-  /*    each glyph in the font face.                                       */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    num_glyphs    :: The number of named glyphs in the table.          */
-  /*                                                                       */
-  /*    num_names     :: The number of PS names stored in the table.       */
-  /*                                                                       */
-  /*    glyph_indices :: The indices of the glyphs in the names arrays.    */
-  /*                                                                       */
-  /*    glyph_names   :: The PS names not in Mac Encoding.                 */
-  /*                                                                       */
-  typedef struct  TT_Post_20Rec_
-  {
-    FT_UShort   num_glyphs;
-    FT_UShort   num_names;
-    FT_UShort*  glyph_indices;
-    FT_Char**   glyph_names;
-
-  } TT_Post_20Rec, *TT_Post_20;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_Post_25Rec                                                      */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Postscript names sub-table, format 2.5.  Stores the PS name of     */
-  /*    each glyph in the font face.                                       */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    num_glyphs :: The number of glyphs in the table.                   */
-  /*                                                                       */
-  /*    offsets    :: An array of signed offsets in a normal Mac           */
-  /*                  Postscript name encoding.                            */
-  /*                                                                       */
-  typedef struct  TT_Post_25_
-  {
-    FT_UShort  num_glyphs;
-    FT_Char*   offsets;
-
-  } TT_Post_25Rec, *TT_Post_25;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_Post_NamesRec                                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Postscript names table, either format 2.0 or 2.5.                  */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    loaded    :: A flag to indicate whether the PS names are loaded.   */
-  /*                                                                       */
-  /*    format_20 :: The sub-table used for format 2.0.                    */
-  /*                                                                       */
-  /*    format_25 :: The sub-table used for format 2.5.                    */
-  /*                                                                       */
-  typedef struct  TT_Post_NamesRec_
-  {
-    FT_Bool  loaded;
-
-    union
-    {
-      TT_Post_20Rec  format_20;
-      TT_Post_25Rec  format_25;
-
-    } names;
-
-  } TT_Post_NamesRec, *TT_Post_Names;
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /***                                                                   ***/
-  /***                                                                   ***/
-  /***                  TRUETYPE CHARMAPS SUPPORT                        ***/
-  /***                                                                   ***/
-  /***                                                                   ***/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-  /* format 0 */
-
-  typedef struct  TT_CMap0_
-  {
-    FT_ULong  language;       /* for Mac fonts (originally ushort) */
-
-    FT_Byte*  glyphIdArray;
-
-  } TT_CMap0Rec, *TT_CMap0;
-
-
-  /* format 2 */
-
-  typedef struct  TT_CMap2SubHeaderRec_
-  {
-    FT_UShort  firstCode;      /* first valid low byte         */
-    FT_UShort  entryCount;     /* number of valid low bytes    */
-    FT_Short   idDelta;        /* delta value to glyphIndex    */
-    FT_UShort  idRangeOffset;  /* offset from here to 1st code */
-
-  } TT_CMap2SubHeaderRec, *TT_CMap2SubHeader;
-
-
-  typedef struct  TT_CMap2Rec_
-  {
-    FT_ULong            language;     /* for Mac fonts (originally ushort) */
-
-    FT_UShort*          subHeaderKeys;  /* high byte mapping table     */
-                                        /* value = subHeader index * 8 */
-    TT_CMap2SubHeader   subHeaders;
-    FT_UShort*          glyphIdArray;
-    FT_UShort           numGlyphId;   /* control value */
-
-  } TT_CMap2Rec, *TT_CMap2;
-
-
-  /* format 4 */
-
-  typedef struct  TT_CMap4Segment_
-  {
-    FT_UShort  endCount;
-    FT_UShort  startCount;
-    FT_Short   idDelta;
-    FT_UShort  idRangeOffset;
-
-  } TT_CMap4SegmentRec, *TT_CMap4Segment;
-
-
-  typedef struct  TT_CMap4Rec_
-  {
-    FT_ULong         language;       /* for Mac fonts (originally ushort) */
-
-    FT_UShort        segCountX2;     /* number of segments * 2            */
-    FT_UShort        searchRange;    /* these parameters can be used      */
-    FT_UShort        entrySelector;  /* for a binary search               */
-    FT_UShort        rangeShift;
-
-    TT_CMap4Segment  segments;
-    FT_UShort*       glyphIdArray;
-    FT_UShort        numGlyphId;     /* control value */
-
-    TT_CMap4Segment  last_segment;   /* last used segment; this is a small  */
-                                     /* cache to potentially increase speed */
-  } TT_CMap4Rec, *TT_CMap4;
-
-
-  /* format 6 */
-
-  typedef struct  TT_CMap6_
-  {
-    FT_ULong    language;       /* for Mac fonts (originally ushort)     */
-
-    FT_UShort   firstCode;      /* first character code of subrange      */
-    FT_UShort   entryCount;     /* number of character codes in subrange */
-
-    FT_UShort*  glyphIdArray;
-
-  } TT_CMap6Rec, *TT_CMap6;
-
-
-  /* auxiliary table for format 8 and 12 */
-
-  typedef struct  TT_CMapGroupRec_
-  {
-    FT_ULong  startCharCode;
-    FT_ULong  endCharCode;
-    FT_ULong  startGlyphID;
-
-  } TT_CMapGroupRec, *TT_CMapGroup;
-
-
-  /* FreeType handles format 8 and 12 identically.  It is not necessary to
-     cover mixed 16bit and 32bit codes since FreeType always uses FT_ULong
-     for input character codes -- converting Unicode surrogates to 32bit
-     character codes must be done by the application.                      */
-
-  typedef struct  TT_CMap8_12Rec_
-  {
-    FT_ULong      language;        /* for Mac fonts */
-
-    FT_ULong      nGroups;
-    TT_CMapGroup  groups;
-
-    TT_CMapGroup  last_group;      /* last used group; this is a small    */
-                                   /* cache to potentially increase speed */
-  } TT_CMap8_12Rec, *TT_CMap8_12;
-
-
-  /* format 10 */
-
-  typedef struct  TT_CMap10Rec_
-  {
-    FT_ULong    language;           /* for Mac fonts */
-
-    FT_ULong    startCharCode;      /* first character covered */
-    FT_ULong    numChars;           /* number of characters covered */
-
-    FT_UShort*  glyphs;
-
-  } TT_CMap10Rec, *TT_CMap10;
-
-
-  typedef struct TT_CMapTableRec_*  TT_CMapTable;
-
-
-  typedef FT_UInt
-  (*TT_CharMap_Func)( TT_CMapTable  charmap,
-                      FT_ULong      char_code );
-
-  typedef FT_ULong
-  (*TT_CharNext_Func)( TT_CMapTable  charmap,
-                       FT_ULong      char_code );
-
-
-  /* charmap table */
-  typedef struct  TT_CMapTableRec_
-  {
-    FT_UShort  platformID;
-    FT_UShort  platformEncodingID;
-    FT_UShort  format;
-    FT_ULong   length;          /* must be ulong for formats 8, 10, and 12 */
-
-    FT_Bool    loaded;
-    FT_ULong   offset;
-
-    union
-    {
-      TT_CMap0Rec     cmap0;
-      TT_CMap2Rec     cmap2;
-      TT_CMap4Rec     cmap4;
-      TT_CMap6Rec     cmap6;
-      TT_CMap8_12Rec  cmap8_12;
-      TT_CMap10Rec    cmap10;
-    } c;
-
-    TT_CharMap_Func   get_index;
-    TT_CharNext_Func  get_next_char;
-
-  } TT_CMapTableRec;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_CharMapRec                                                      */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    The TrueType character map object type.                            */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    root :: The parent character map structure.                        */
-  /*                                                                       */
-  /*    cmap :: The used character map.                                    */
-  /*                                                                       */
-  typedef struct  TT_CharMapRec_
-  {
-    FT_CharMapRec    root;
-    TT_CMapTableRec  cmap;
-
-  } TT_CharMapRec;
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /***                                                                   ***/
-  /***                                                                   ***/
-  /***                  ORIGINAL TT_FACE CLASS DEFINITION                ***/
-  /***                                                                   ***/
-  /***                                                                   ***/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* This structure/class is defined here because it is common to the      */
-  /* following formats: TTF, OpenType-TT, and OpenType-CFF.                */
-  /*                                                                       */
-  /* Note, however, that the classes TT_Size, TT_GlyphSlot, and TT_CharMap */
-  /* are not shared between font drivers, and are thus defined in          */
-  /* `ttobjs.h'.                                                           */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    TT_Face                                                            */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A handle to a TrueType face/font object.  A TT_Face encapsulates   */
-  /*    the resolution and scaling independent parts of a TrueType font    */
-  /*    resource.                                                          */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The TT_Face structure is also used as a `parent class' for the     */
-  /*    OpenType-CFF class (T2_Face).                                      */
-  /*                                                                       */
-  typedef struct TT_FaceRec_*  TT_Face;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    TT_CharMap                                                         */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A handle to a TrueType character mapping object.                   */
-  /*                                                                       */
-  typedef struct TT_CharMapRec_*  TT_CharMap;
-
-
-  /* a function type used for the truetype bytecode interpreter hooks */
-  typedef FT_Error
-  (*TT_Interpreter)( void*  exec_context );
-
-  /* forward declaration */
-  typedef struct TT_LoaderRec_*  TT_Loader;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    TT_Loader_GotoTableFunc                                            */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Seeks a stream to the start of a given TrueType table.             */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    face   :: A handle to the target face object.                      */
-  /*                                                                       */
-  /*    tag    :: A 4-byte tag used to name the table.                     */
-  /*                                                                       */
-  /*    stream :: The input stream.                                        */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    length :: The length of the table in bytes.  Set to 0 if not       */
-  /*              needed.                                                  */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The stream cursor must be at the font file's origin.               */
-  /*                                                                       */
-  typedef FT_Error
-  (*TT_Loader_GotoTableFunc)( TT_Face    face,
-                              FT_ULong   tag,
-                              FT_Stream  stream,
-                              FT_ULong*  length );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    TT_Loader_StartGlyphFunc                                           */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Seeks a stream to the start of a given glyph element, and opens a  */
-  /*    frame for it.                                                      */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    loader      :: The current TrueType glyph loader object.           */
-  /*                                                                       */
-  /*    glyph index :: The index of the glyph to access.                   */
-  /*                                                                       */
-  /*    offset      :: The offset of the glyph according to the            */
-  /*                   `locations' table.                                  */
-  /*                                                                       */
-  /*    byte_count  :: The size of the frame in bytes.                     */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    This function is normally equivalent to FT_STREAM_SEEK(offset)     */
-  /*    followed by FT_FRAME_ENTER(byte_count) with the loader's stream,   */
-  /*    but alternative formats (e.g. compressed ones) might use something */
-  /*    different.                                                         */
-  /*                                                                       */
-  typedef FT_Error
-  (*TT_Loader_StartGlyphFunc)( TT_Loader  loader,
-                               FT_UInt    glyph_index,
-                               FT_ULong   offset,
-                               FT_UInt    byte_count );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    TT_Loader_ReadGlyphFunc                                            */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Reads one glyph element (its header, a simple glyph, or a          */
-  /*    composite) from the loader's current stream frame.                 */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    loader :: The current TrueType glyph loader object.                */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  typedef FT_Error
-  (*TT_Loader_ReadGlyphFunc)( TT_Loader  loader );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    TT_Loader_EndGlyphFunc                                             */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Closes the current loader stream frame for the glyph.              */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    loader :: The current TrueType glyph loader object.                */
-  /*                                                                       */
-  typedef void
-  (*TT_Loader_EndGlyphFunc)( TT_Loader  loader );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /*                         TrueType Face Type                            */
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_Face                                                            */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    The TrueType face class.  These objects model the resolution and   */
-  /*    point-size independent data found in a TrueType font file.         */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    root                 :: The base FT_Face structure, managed by the */
-  /*                            base layer.                                */
-  /*                                                                       */
-  /*    ttc_header           :: The TrueType collection header, used when  */
-  /*                            the file is a `ttc' rather than a `ttf'.   */
-  /*                            For ordinary font files, the field         */
-  /*                            `ttc_header.count' is set to 0.            */
-  /*                                                                       */
-  /*    format_tag           :: The font format tag.                       */
-  /*                                                                       */
-  /*    num_tables           :: The number of TrueType tables in this font */
-  /*                            file.                                      */
-  /*                                                                       */
-  /*    dir_tables           :: The directory of TrueType tables for this  */
-  /*                            font file.                                 */
-  /*                                                                       */
-  /*    header               :: The font's font header (`head' table).     */
-  /*                            Read on font opening.                      */
-  /*                                                                       */
-  /*    horizontal           :: The font's horizontal header (`hhea'       */
-  /*                            table).  This field also contains the      */
-  /*                            associated horizontal metrics table        */
-  /*                            (`hmtx').                                  */
-  /*                                                                       */
-  /*    max_profile          :: The font's maximum profile table.  Read on */
-  /*                            font opening.  Note that some maximum      */
-  /*                            values cannot be taken directly from this  */
-  /*                            table.  We thus define additional fields   */
-  /*                            below to hold the computed maxima.         */
-  /*                                                                       */
-  /*    max_components       :: The maximum number of glyph components     */
-  /*                            required to load any composite glyph from  */
-  /*                            this font.  Used to size the load stack.   */
-  /*                                                                       */
-  /*    vertical_info        :: A boolean which is set when the font file  */
-  /*                            contains vertical metrics.  If not, the    */
-  /*                            value of the `vertical' field is           */
-  /*                            undefined.                                 */
-  /*                                                                       */
-  /*    vertical             :: The font's vertical header (`vhea' table). */
-  /*                            This field also contains the associated    */
-  /*                            vertical metrics table (`vmtx'), if found. */
-  /*                            IMPORTANT: The contents of this field is   */
-  /*                            undefined if the `verticalInfo' field is   */
-  /*                            unset.                                     */
-  /*                                                                       */
-  /*    num_names            :: The number of name records within this     */
-  /*                            TrueType font.                             */
-  /*                                                                       */
-  /*    name_table           :: The table of name records (`name').        */
-  /*                                                                       */
-  /*    os2                  :: The font's OS/2 table (`OS/2').            */
-  /*                                                                       */
-  /*    postscript           :: The font's PostScript table (`post'        */
-  /*                            table).  The PostScript glyph names are    */
-  /*                            not loaded by the driver on face opening.  */
-  /*                            See the `ttpost' module for more details.  */
-  /*                                                                       */
-  /*    cmap_table           :: Address of the face's `cmap' SFNT table    */
-  /*                            in memory (it's an extracted frame).       */
-  /*                                                                       */
-  /*    cmap_size            :: The size in bytes of the `cmap_table'      */
-  /*                            described above.                           */
-  /*                                                                       */
-  /*    num_charmaps         :: The number of character mappings in the    */
-  /*                            font.                                      */
-  /*                                                                       */
-  /*    charmaps             :: The array of charmap objects for this font */
-  /*                            file.  Note that this field is a typeless  */
-  /*                            pointer.  The Reason is that the format of */
-  /*                            charmaps varies with the underlying font   */
-  /*                            format and cannot be determined here.      */
-  /*                                                                       */
-  /*    goto_table           :: A function called by each TrueType table   */
-  /*                            loader to position a stream's cursor to    */
-  /*                            the start of a given table according to    */
-  /*                            its tag.  It defaults to TT_Goto_Face but  */
-  /*                            can be different for strange formats (e.g. */
-  /*                            Type 42).                                  */
-  /*                                                                       */
-  /*    access_glyph_frame   :: A function used to access the frame of a   */
-  /*                            given glyph within the face's font file.   */
-  /*                                                                       */
-  /*    forget_glyph_frame   :: A function used to forget the frame of a   */
-  /*                            given glyph when all data has been loaded. */
-  /*                                                                       */
-  /*    read_glyph_header    :: A function used to read a glyph header.    */
-  /*                            It must be called between an `access' and  */
-  /*                            `forget'.                                  */
-  /*                                                                       */
-  /*    read_simple_glyph    :: A function used to read a simple glyph.    */
-  /*                            It must be called after the header was     */
-  /*                            read, and before the `forget'.             */
-  /*                                                                       */
-  /*    read_composite_glyph :: A function used to read a composite glyph. */
-  /*                            It must be called after the header was     */
-  /*                            read, and before the `forget'.             */
-  /*                                                                       */
-  /*    sfnt                 :: A pointer to the SFNT service.             */
-  /*                                                                       */
-  /*    psnames              :: A pointer to the PostScript names service. */
-  /*                                                                       */
-  /*    hdmx                 :: The face's horizontal device metrics       */
-  /*                            (`hdmx' table).  This table is optional in */
-  /*                            TrueType/OpenType fonts.                   */
-  /*                                                                       */
-  /*    gasp                 :: The grid-fitting and scaling properties    */
-  /*                            table (`gasp').  This table is optional in */
-  /*                            TrueType/OpenType fonts.                   */
-  /*                                                                       */
-  /*    pclt                 :: The `pclt' SFNT table.                     */
-  /*                                                                       */
-  /*    num_sbit_strikes     :: The number of sbit strikes, i.e., bitmap   */
-  /*                            sizes, embedded in this font.              */
-  /*                                                                       */
-  /*    sbit_strikes         :: An array of sbit strikes embedded in this  */
-  /*                            font.  This table is optional in a         */
-  /*                            TrueType/OpenType font.                    */
-  /*                                                                       */
-  /*    num_sbit_scales      :: The number of sbit scales for this font.   */
-  /*                                                                       */
-  /*    sbit_scales          :: Array of sbit scales embedded in this      */
-  /*                            font.  This table is optional in a         */
-  /*                            TrueType/OpenType font.                    */
-  /*                                                                       */
-  /*    postscript_names     :: A table used to store the Postscript names */
-  /*                            of  the glyphs for this font.  See the     */
-  /*                            file  `ttconfig.h' for comments on the     */
-  /*                            TT_CONFIG_OPTION_POSTSCRIPT_NAMES option.  */
-  /*                                                                       */
-  /*    num_locations        :: The number of glyph locations in this      */
-  /*                            TrueType file.  This should be             */
-  /*                            identical to the number of glyphs.         */
-  /*                            Ignored for Type 2 fonts.                  */
-  /*                                                                       */
-  /*    glyph_locations      :: An array of longs.  These are offsets to   */
-  /*                            glyph data within the `glyf' table.        */
-  /*                            Ignored for Type 2 font faces.             */
-  /*                                                                       */
-  /*    font_program_size    :: Size in bytecodes of the face's font       */
-  /*                            program.  0 if none defined.  Ignored for  */
-  /*                            Type 2 fonts.                              */
-  /*                                                                       */
-  /*    font_program         :: The face's font program (bytecode stream)  */
-  /*                            executed at load time, also used during    */
-  /*                            glyph rendering.  Comes from the `fpgm'    */
-  /*                            table.  Ignored for Type 2 font fonts.     */
-  /*                                                                       */
-  /*    cvt_program_size     :: The size in bytecodes of the face's cvt    */
-  /*                            program.  Ignored for Type 2 fonts.        */
-  /*                                                                       */
-  /*    cvt_program          :: The face's cvt program (bytecode stream)   */
-  /*                            executed each time an instance/size is     */
-  /*                            changed/reset.  Comes from the `prep'      */
-  /*                            table.  Ignored for Type 2 fonts.          */
-  /*                                                                       */
-  /*    cvt_size             :: Size of the control value table (in        */
-  /*                            entries).   Ignored for Type 2 fonts.      */
-  /*                                                                       */
-  /*    cvt                  :: The face's original control value table.   */
-  /*                            Coordinates are expressed in unscaled font */
-  /*                            units.  Comes from the `cvt ' table.       */
-  /*                            Ignored for Type 2 fonts.                  */
-  /*                                                                       */
-  /*    num_kern_pairs       :: The number of kerning pairs present in the */
-  /*                            font file.  The engine only loads the      */
-  /*                            first horizontal format 0 kern table it    */
-  /*                            finds in the font file.  Ignored for       */
-  /*                            Type 2 fonts.                              */
-  /*                                                                       */
-  /*    kern_table_index     :: The index of the kerning table in the font */
-  /*                            kerning directory.  Ignored for Type 2     */
-  /*                            fonts.                                     */
-  /*                                                                       */
-  /*    interpreter          :: A pointer to the TrueType bytecode         */
-  /*                            interpreters field is also used to hook    */
-  /*                            the debugger in `ttdebug'.                 */
-  /*                                                                       */
-  /*    unpatented_hinting   :: If true, use only unpatented methods in    */
-  /*                            the bytecode interpreter.                  */
-  /*                                                                       */
-  /*    extra                :: Reserved for third-party font drivers.     */
-  /*                                                                       */
-  typedef struct  TT_FaceRec_
-  {
-    FT_FaceRec            root;
-
-    TTC_HeaderRec         ttc_header;
-
-    FT_ULong              format_tag;
-    FT_UShort             num_tables;
-    TT_Table              dir_tables;
-
-    TT_Header             header;       /* TrueType header table          */
-    TT_HoriHeader         horizontal;   /* TrueType horizontal header     */
-
-    TT_MaxProfile         max_profile;
-    FT_ULong              max_components;
-
-    FT_Bool               vertical_info;
-    TT_VertHeader         vertical;     /* TT Vertical header, if present */
-
-    FT_UShort             num_names;    /* number of name records  */
-    TT_NameTableRec       name_table;   /* name table              */
-
-    TT_OS2                os2;          /* TrueType OS/2 table            */
-    TT_Postscript         postscript;   /* TrueType Postscript table      */
-
-    FT_Byte*              cmap_table;   /* extracted 'cmap' table */
-    FT_ULong              cmap_size;
-
-    TT_Loader_GotoTableFunc   goto_table;
-
-    TT_Loader_StartGlyphFunc  access_glyph_frame;
-    TT_Loader_EndGlyphFunc    forget_glyph_frame;
-    TT_Loader_ReadGlyphFunc   read_glyph_header;
-    TT_Loader_ReadGlyphFunc   read_simple_glyph;
-    TT_Loader_ReadGlyphFunc   read_composite_glyph;
-
-    /* a typeless pointer to the SFNT_Interface table used to load */
-    /* the basic TrueType tables in the face object                */
-    void*                 sfnt;
-
-    /* a typeless pointer to the FT_Service_PsCMapsRec table used to */
-    /* handle glyph names <-> unicode & Mac values                   */
-    void*                 psnames;
-
-
-    /***********************************************************************/
-    /*                                                                     */
-    /* Optional TrueType/OpenType tables                                   */
-    /*                                                                     */
-    /***********************************************************************/
-
-    /* horizontal device metrics */
-    TT_HdmxRec            hdmx;
-
-    /* grid-fitting and scaling table */
-    TT_GaspRec            gasp;                 /* the `gasp' table */
-
-    /* PCL 5 table */
-    TT_PCLT               pclt;
-
-    /* embedded bitmaps support */
-    FT_ULong              num_sbit_strikes;
-    TT_SBit_Strike        sbit_strikes;
-
-    FT_ULong              num_sbit_scales;
-    TT_SBit_Scale         sbit_scales;
-
-    /* postscript names table */
-    TT_Post_NamesRec      postscript_names;
-
-
-    /***********************************************************************/
-    /*                                                                     */
-    /* TrueType-specific fields (ignored by the OTF-Type2 driver)          */
-    /*                                                                     */
-    /***********************************************************************/
-
-    /* the glyph locations */
-    FT_UShort             num_locations;
-    FT_Long*              glyph_locations;
-
-    /* the font program, if any */
-    FT_ULong              font_program_size;
-    FT_Byte*              font_program;
-
-    /* the cvt program, if any */
-    FT_ULong              cvt_program_size;
-    FT_Byte*              cvt_program;
-
-    /* the original, unscaled, control value table */
-    FT_ULong              cvt_size;
-    FT_Short*             cvt;
-
-    /* the format 0 kerning table, if any */
-    FT_Int                num_kern_pairs;
-    FT_Int                kern_table_index;
-    TT_Kern0_Pair         kern_pairs;
-
-    /* A pointer to the bytecode interpreter to use.  This is also */
-    /* used to hook the debugger for the `ttdebug' utility.        */
-    TT_Interpreter        interpreter;
-
-#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
-    /* Use unpatented hinting only. */
-    FT_Bool               unpatented_hinting;
-#endif
-
-    /***********************************************************************/
-    /*                                                                     */
-    /* Other tables or fields. This is used by derivative formats like     */
-    /* OpenType.                                                           */
-    /*                                                                     */
-    /***********************************************************************/
-
-    FT_Generic            extra;
-
-    const char*           postscript_name;
-
-  } TT_FaceRec;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /*  <Struct>                                                             */
-  /*     TT_GlyphZoneRec                                                   */
-  /*                                                                       */
-  /*  <Description>                                                        */
-  /*     A glyph zone is used to load, scale and hint glyph outline        */
-  /*     coordinates.                                                      */
-  /*                                                                       */
-  /*  <Fields>                                                             */
-  /*     memory       :: A handle to the memory manager.                   */
-  /*                                                                       */
-  /*     max_points   :: The maximal size in points of the zone.           */
-  /*                                                                       */
-  /*     max_contours :: Max size in links contours of thez one.           */
-  /*                                                                       */
-  /*     n_points     :: The current number of points in the zone.         */
-  /*                                                                       */
-  /*     n_contours   :: The current number of contours in the zone.       */
-  /*                                                                       */
-  /*     org          :: The original glyph coordinates (font              */
-  /*                     units/scaled).                                    */
-  /*                                                                       */
-  /*     cur          :: The current glyph coordinates (scaled/hinted).    */
-  /*                                                                       */
-  /*     tags         :: The point control tags.                           */
-  /*                                                                       */
-  /*     contours     :: The contours end points.                          */
-  /*                                                                       */
-  typedef struct  TT_GlyphZoneRec_
-  {
-    FT_Memory   memory;
-    FT_UShort   max_points;
-    FT_UShort   max_contours;
-    FT_UShort   n_points;   /* number of points in zone    */
-    FT_Short    n_contours; /* number of contours          */
-
-    FT_Vector*  org;        /* original point coordinates  */
-    FT_Vector*  cur;        /* current point coordinates   */
-
-    FT_Byte*    tags;       /* current touch flags         */
-    FT_UShort*  contours;   /* contour end points          */
-
-  } TT_GlyphZoneRec, *TT_GlyphZone;
-
-
-  /* handle to execution context */
-  typedef struct TT_ExecContextRec_*  TT_ExecContext;
-
-  /* glyph loader structure */
-  typedef struct  TT_LoaderRec_
-  {
-    FT_Face          face;
-    FT_Size          size;
-    FT_GlyphSlot     glyph;
-    FT_GlyphLoader   gloader;
-
-    FT_ULong         load_flags;
-    FT_UInt          glyph_index;
-
-    FT_Stream        stream;
-    FT_Int           byte_len;
-
-    FT_Short         n_contours;
-    FT_BBox          bbox;
-    FT_Int           left_bearing;
-    FT_Int           advance;
-    FT_Int           linear;
-    FT_Bool          linear_def;
-    FT_Bool          preserve_pps;
-    FT_Vector        pp1;
-    FT_Vector        pp2;
-
-    FT_ULong         glyf_offset;
-
-    /* the zone where we load our glyphs */
-    TT_GlyphZoneRec  base;
-    TT_GlyphZoneRec  zone;
-
-    TT_ExecContext   exec;
-    FT_Byte*         instructions;
-    FT_ULong         ins_pos;
-
-    /* for possible extensibility in other formats */
-    void*            other;
-
-  } TT_LoaderRec;
-
-
-FT_END_HEADER
-
-#endif /* __TTTYPES_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/t1tables.h b/extra_lib/include/freetype/freetype/t1tables.h
deleted file mode 100644
index af8c416..0000000
--- a/extra_lib/include/freetype/freetype/t1tables.h
+++ /dev/null
@@ -1,397 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  t1tables.h                                                             */
-/*                                                                         */
-/*    Basic Type 1/Type 2 tables definitions and interface (specification  */
-/*    only).                                                               */
-/*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003 by                                     */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __T1TABLES_H__
-#define __T1TABLES_H__
-
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-#ifdef FREETYPE_H
-#error "freetype.h of FreeType 1 has been loaded!"
-#error "Please fix the directory search order for header files"
-#error "so that freetype.h of FreeType 2 is found first."
-#endif
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    type1_tables                                                       */
-  /*                                                                       */
-  /* <Title>                                                               */
-  /*    Type 1 Tables                                                      */
-  /*                                                                       */
-  /* <Abstract>                                                            */
-  /*    Type 1 (PostScript) specific font tables.                          */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This section contains the definition of Type 1-specific tables,    */
-  /*    including structures related to other PostScript font formats.     */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /* Note that we separate font data in PS_FontInfoRec and PS_PrivateRec */
-  /* structures in order to support Multiple Master fonts.               */
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    PS_FontInfoRec                                                     */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure used to model a Type1/Type2 FontInfo dictionary.  Note */
-  /*    that for Multiple Master fonts, each instance has its own          */
-  /*    FontInfo.                                                          */
-  /*                                                                       */
-  typedef struct  PS_FontInfoRec
-  {
-    FT_String*  version;
-    FT_String*  notice;
-    FT_String*  full_name;
-    FT_String*  family_name;
-    FT_String*  weight;
-    FT_Long     italic_angle;
-    FT_Bool     is_fixed_pitch;
-    FT_Short    underline_position;
-    FT_UShort   underline_thickness;
-
-  } PS_FontInfoRec, *PS_FontInfo;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    T1_FontInfo                                                        */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This type is equivalent to @PS_FontInfoRec.  It is deprecated but  */
-  /*    kept to maintain source compatibility between various versions of  */
-  /*    FreeType.                                                          */
-  /*                                                                       */
-  typedef PS_FontInfoRec  T1_FontInfo;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    PS_PrivateRec                                                      */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure used to model a Type1/Type2 private dictionary.  Note  */
-  /*    that for Multiple Master fonts, each instance has its own Private  */
-  /*    dictionary.                                                        */
-  /*                                                                       */
-  typedef struct  PS_PrivateRec_
-  {
-    FT_Int     unique_id;
-    FT_Int     lenIV;
-
-    FT_Byte    num_blue_values;
-    FT_Byte    num_other_blues;
-    FT_Byte    num_family_blues;
-    FT_Byte    num_family_other_blues;
-
-    FT_Short   blue_values[14];
-    FT_Short   other_blues[10];
-
-    FT_Short   family_blues      [14];
-    FT_Short   family_other_blues[10];
-
-    FT_Fixed   blue_scale;
-    FT_Int     blue_shift;
-    FT_Int     blue_fuzz;
-
-    FT_UShort  standard_width[1];
-    FT_UShort  standard_height[1];
-
-    FT_Byte    num_snap_widths;
-    FT_Byte    num_snap_heights;
-    FT_Bool    force_bold;
-    FT_Bool    round_stem_up;
-
-    FT_Short   snap_widths [13];  /* including std width  */
-    FT_Short   snap_heights[13];  /* including std height */
-
-    FT_Long    language_group;
-    FT_Long    password;
-
-    FT_Short   min_feature[2];
-
-  } PS_PrivateRec, *PS_Private;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    T1_Private                                                         */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*   This type is equivalent to @PS_PrivateRec.  It is deprecated but    */
-  /*   kept to maintain source compatibility between various versions of   */
-  /*   FreeType.                                                           */
-  /*                                                                       */
-  typedef PS_PrivateRec  T1_Private;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Enum>                                                                */
-  /*    T1_Blend_Flags                                                     */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A set of flags used to indicate which fields are present in a      */
-  /*    given blen dictionary (font info or private).  Used to support     */
-  /*    Multiple Masters fonts.                                            */
-  /*                                                                       */
-  typedef enum
-  {
-    /*# required fields in a FontInfo blend dictionary */
-    T1_BLEND_UNDERLINE_POSITION = 0,
-    T1_BLEND_UNDERLINE_THICKNESS,
-    T1_BLEND_ITALIC_ANGLE,
-
-    /*# required fields in a Private blend dictionary */
-    T1_BLEND_BLUE_VALUES,
-    T1_BLEND_OTHER_BLUES,
-    T1_BLEND_STANDARD_WIDTH,
-    T1_BLEND_STANDARD_HEIGHT,
-    T1_BLEND_STEM_SNAP_WIDTHS,
-    T1_BLEND_STEM_SNAP_HEIGHTS,
-    T1_BLEND_BLUE_SCALE,
-    T1_BLEND_BLUE_SHIFT,
-    T1_BLEND_FAMILY_BLUES,
-    T1_BLEND_FAMILY_OTHER_BLUES,
-    T1_BLEND_FORCE_BOLD,
-
-    /*# never remove */
-    T1_BLEND_MAX
-
-  } T1_Blend_Flags;
-
-
-  /*# backwards compatible definitions */
-#define t1_blend_underline_position   T1_BLEND_UNDERLINE_POSITION
-#define t1_blend_underline_thickness  T1_BLEND_UNDERLINE_THICKNESS
-#define t1_blend_italic_angle         T1_BLEND_ITALIC_ANGLE
-#define t1_blend_blue_values          T1_BLEND_BLUE_VALUES
-#define t1_blend_other_blues          T1_BLEND_OTHER_BLUES
-#define t1_blend_standard_widths      T1_BLEND_STANDARD_WIDTH
-#define t1_blend_standard_height      T1_BLEND_STANDARD_HEIGHT
-#define t1_blend_stem_snap_widths     T1_BLEND_STEM_SNAP_WIDTHS
-#define t1_blend_stem_snap_heights    T1_BLEND_STEM_SNAP_HEIGHTS
-#define t1_blend_blue_scale           T1_BLEND_BLUE_SCALE
-#define t1_blend_blue_shift           T1_BLEND_BLUE_SHIFT
-#define t1_blend_family_blues         T1_BLEND_FAMILY_BLUES
-#define t1_blend_family_other_blues   T1_BLEND_FAMILY_OTHER_BLUES
-#define t1_blend_force_bold           T1_BLEND_FORCE_BOLD
-#define t1_blend_max                  T1_BLEND_MAX
-
-
-  /* maximum number of Multiple Masters designs, as defined in the spec */
-#define T1_MAX_MM_DESIGNS     16
-
-  /* maximum number of Multiple Masters axes, as defined in the spec */
-#define T1_MAX_MM_AXIS        4
-
-  /* maximum number of elements in a design map */
-#define T1_MAX_MM_MAP_POINTS  20
-
-
-  /* this structure is used to store the BlendDesignMap entry for an axis */
-  typedef struct  PS_DesignMap_
-  {
-    FT_Byte    num_points;
-    FT_Fixed*  design_points;
-    FT_Fixed*  blend_points;
-
-  } PS_DesignMapRec, *PS_DesignMap;
-
-  /* backwards-compatible definition */
-  typedef PS_DesignMapRec  T1_DesignMap;
-
-
-  typedef struct  PS_BlendRec_
-  {
-    FT_UInt          num_designs;
-    FT_UInt          num_axis;
-
-    FT_String*       axis_names[T1_MAX_MM_AXIS];
-    FT_Fixed*        design_pos[T1_MAX_MM_DESIGNS];
-    PS_DesignMapRec  design_map[T1_MAX_MM_AXIS];
-
-    FT_Fixed*        weight_vector;
-    FT_Fixed*        default_weight_vector;
-
-    PS_FontInfo      font_infos[T1_MAX_MM_DESIGNS + 1];
-    PS_Private       privates  [T1_MAX_MM_DESIGNS + 1];
-
-    FT_ULong         blend_bitflags;
-
-    FT_BBox*         bboxes    [T1_MAX_MM_DESIGNS + 1];
-
-  } PS_BlendRec, *PS_Blend;
-
-
-  /* backwards-compatible definition */
-  typedef PS_BlendRec  T1_Blend;
-
-
-  typedef struct  CID_FaceDictRec_
-  {
-    PS_PrivateRec  private_dict;
-
-    FT_UInt        len_buildchar;
-    FT_Fixed       forcebold_threshold;
-    FT_Pos         stroke_width;
-    FT_Fixed       expansion_factor;
-
-    FT_Byte        paint_type;
-    FT_Byte        font_type;
-    FT_Matrix      font_matrix;
-    FT_Vector      font_offset;
-
-    FT_UInt        num_subrs;
-    FT_ULong       subrmap_offset;
-    FT_Int         sd_bytes;
-
-  } CID_FaceDictRec, *CID_FaceDict;
-
-
-  /* backwards-compatible definition */
-  typedef CID_FaceDictRec  CID_FontDict;
-
-
-  typedef struct  CID_FaceInfoRec_
-  {
-    FT_String*      cid_font_name;
-    FT_Fixed        cid_version;
-    FT_Int          cid_font_type;
-
-    FT_String*      registry;
-    FT_String*      ordering;
-    FT_Int          supplement;
-
-    PS_FontInfoRec  font_info;
-    FT_BBox         font_bbox;
-    FT_ULong        uid_base;
-
-    FT_Int          num_xuid;
-    FT_ULong        xuid[16];
-
-    FT_ULong        cidmap_offset;
-    FT_Int          fd_bytes;
-    FT_Int          gd_bytes;
-    FT_ULong        cid_count;
-
-    FT_Int          num_dicts;
-    CID_FaceDict    font_dicts;
-
-    FT_ULong        data_offset;
-
-  } CID_FaceInfoRec, *CID_FaceInfo;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    CID_Info                                                           */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*   This type is equivalent to CID_FaceInfoRec.  It is deprecated but   */
-  /*   kept to maintain source compatibility between various versions of   */
-  /*   FreeType.                                                           */
-  /*                                                                       */
-  typedef CID_FaceInfoRec  CID_Info;
-
-  /* */
-
-
- /************************************************************************
-  *
-  * @function:
-  *    FT_Has_PS_Glyph_Names
-  *
-  * @description:
-  *    Return true if a given face provides reliable Postscript glyph
-  *    names.  This is similar to using the @FT_HAS_GLYPH_NAMES macro,
-  *    except that certain fonts (mostly TrueType) contain incorrect
-  *    glyph name tables.
-  *
-  *    When this function returns true, the caller is sure that the glyph
-  *    names returned by @FT_Get_Glyph_Name are reliable.
-  *
-  * @input:
-  *    face ::
-  *       face handle
-  *
-  * @return:
-  *    Boolean.  True if glyph names are reliable.
-  */
-  FT_EXPORT( FT_Int )
-  FT_Has_PS_Glyph_Names( FT_Face  face );
-
-
- /************************************************************************
-  *
-  * @function:
-  *    FT_Get_PS_Font_Info
-  *
-  * @description:
-  *    Retrieve the @PS_FontInfoRec structure corresponding to a given
-  *    Postscript font.
-  *
-  * @input:
-  *    face ::
-  *       Postscript face handle.
-  *
-  * @output:
-  *    afont_info ::
-  *       Output font info structure pointer.
-  *
-  * @return:
-  *    FreeType error code.  0 means success.
-  *
-  * @note:
-  *    The string pointers within the font info structure are owned by
-  *    the face and don't need to be freed by the caller.
-  *
-  *    If the font's format is not Postscript-based, this function will
-  *    return the FT_Err_Invalid_Argument error code.
-  */
-  FT_EXPORT( FT_Error )
-  FT_Get_PS_Font_Info( FT_Face          face,
-                       PS_FontInfoRec  *afont_info );
-
- /* */
-
-
-
-FT_END_HEADER
-
-#endif /* __T1TABLES_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/ttnameid.h b/extra_lib/include/freetype/freetype/ttnameid.h
deleted file mode 100644
index 8b56686..0000000
--- a/extra_lib/include/freetype/freetype/ttnameid.h
+++ /dev/null
@@ -1,1075 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ttnameid.h                                                             */
-/*                                                                         */
-/*    TrueType name ID definitions (specification only).                   */
-/*                                                                         */
-/*  Copyright 1996-2002, 2003 by                                           */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __TTNAMEID_H__
-#define __TTNAMEID_H__
-
-
-#include <ft2build.h>
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Possible values for the `platform' identifier code in the name        */
-  /* records of the TTF `name' table.                                      */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /***********************************************************************
-   *
-   * @enum:
-   *   TT_PLATFORM_XXX
-   *
-   * @description:
-   *   A list of valid values for the `platform_id' identifier code in
-   *   @FT_CharMapRec and @FT_SfntName structures.
-   *
-   * @values:
-   *   TT_PLATFORM_APPLE_UNICODE ::
-   *     Used by Apple to indicate a Unicode character map and/or name entry.
-   *     See @TT_APPLE_ID_XXX for corresponding `encoding_id' values.  Note
-   *     that name entries in this format are coded as big-endian UCS-2
-   *     character codes _only_.
-   *
-   *   TT_PLATFORM_MACINTOSH ::
-   *     Used by Apple to indicate a MacOS-specific charmap and/or name entry.
-   *     See @TT_MAC_ID_XXX for corresponding `encoding_id' values.  Note that
-   *     most TrueType fonts contain an Apple roman charmap to be usable on
-   *     MacOS systems (even if they contain a Microsoft charmap as well).
-   *
-   *   TT_PLATFORM_ISO ::
-   *     This value was used to specify Unicode charmaps.  It is however
-   *     now deprecated.  See @TT_ISO_ID_XXX for a list of corresponding
-   *     `encoding_id' values.
-   *
-   *   TT_PLATFORM_MICROSOFT ::
-   *     Used by Microsoft to indicate Windows-specific charmaps.  See
-   *     @TT_MS_ID_XXX for a list of corresponding `encoding_id' values.
-   *     Note that most fonts contain a Unicode charmap using
-   *     (@TT_PLATFORM_MICROSOFT, @TT_MS_ID_UNICODE_CS).
-   *
-   *   TT_PLATFORM_CUSTOM ::
-   *     Used to indicate application-specific charmaps.
-   *
-   *   TT_PLATFORM_ADOBE ::
-   *     This value isn't part of any font format specification, but is used
-   *     by FreeType to report Adobe-specific charmaps in an @FT_CharMapRec
-   *     structure.  See @TT_ADOBE_ID_XXX.
-   */
-
-#define TT_PLATFORM_APPLE_UNICODE  0
-#define TT_PLATFORM_MACINTOSH      1
-#define TT_PLATFORM_ISO            2 /* deprecated */
-#define TT_PLATFORM_MICROSOFT      3
-#define TT_PLATFORM_CUSTOM         4
-#define TT_PLATFORM_ADOBE          7 /* artificial */
-
-
-  /***********************************************************************
-   *
-   * @enum:
-   *   TT_APPLE_ID_XXX
-   *
-   * @description:
-   *   A list of valid values for the `encoding_id' for
-   *   @TT_PLATFORM_APPLE_UNICODE charmaps and name entries.
-   *
-   * @values:
-   *   TT_APPLE_ID_DEFAULT ::
-   *     Unicode version 1.0.
-   *   TT_APPLE_ID_UNICODE_1_1 ::
-   *     Unicode 1.1; specifies Hangul characters starting at U+34xx.
-   *   TT_APPLE_ID_ISO_10646 ::
-   *     Deprecated (identical to preceding.)
-   *   TT_APPLE_ID_UNICODE_2_0 ::
-   *     Unicode 2.0 and beyond (UTF-16 BMP only.)
-   *   TT_APPLE_ID_UNICODE_32 ::
-   *     Unicode 3.1 and beyond, using UTF-32
-   */
-
-#define TT_APPLE_ID_DEFAULT      0 /* Unicode 1.0 */
-#define TT_APPLE_ID_UNICODE_1_1  1 /* specify Hangul at U+34xx */
-#define TT_APPLE_ID_ISO_10646    2 /* deprecated */
-#define TT_APPLE_ID_UNICODE_2_0  3 /* or later */
-#define TT_APPLE_ID_UNICODE_32   4 /* 2.0 or later, full repertoire */
-
-
-  /***********************************************************************
-   *
-   * @enum:
-   *   TT_MAC_ID_XXX
-   *
-   * @description:
-   *   A list of valid values for the `encoding_id' for
-   *   @TT_PLATFORM_MACINTOSH charmaps and name entries.
-   *
-   * @values:
-   *   TT_MAC_ID_ROMAN ::
-   *   TT_MAC_ID_JAPANESE ::
-   *   TT_MAC_ID_TRADITIONAL_CHINESE ::
-   *   TT_MAC_ID_KOREAN ::
-   *   TT_MAC_ID_ARABIC ::
-   *   TT_MAC_ID_HEBREW ::
-   *   TT_MAC_ID_GREEK ::
-   *   TT_MAC_ID_RUSSIAN ::
-   *   TT_MAC_ID_RSYMBOL ::
-   *   TT_MAC_ID_DEVANAGARI ::
-   *   TT_MAC_ID_GURMUKHI ::
-   *   TT_MAC_ID_GUJARATI ::
-   *   TT_MAC_ID_ORIYA ::
-   *   TT_MAC_ID_BENGALI ::
-   *   TT_MAC_ID_TAMIL ::
-   *   TT_MAC_ID_TELUGU ::
-   *   TT_MAC_ID_KANNADA ::
-   *   TT_MAC_ID_MALAYALAM ::
-   *   TT_MAC_ID_SINHALESE ::
-   *   TT_MAC_ID_BURMESE ::
-   *   TT_MAC_ID_KHMER ::
-   *   TT_MAC_ID_THAI ::
-   *   TT_MAC_ID_LAOTIAN ::
-   *   TT_MAC_ID_GEORGIAN ::
-   *   TT_MAC_ID_ARMENIAN ::
-   *   TT_MAC_ID_MALDIVIAN ::
-   *   TT_MAC_ID_SIMPLIFIED_CHINESE ::
-   *   TT_MAC_ID_TIBETAN ::
-   *   TT_MAC_ID_MONGOLIAN ::
-   *   TT_MAC_ID_GEEZ ::
-   *   TT_MAC_ID_SLAVIC ::
-   *   TT_MAC_ID_VIETNAMESE ::
-   *   TT_MAC_ID_SINDHI ::
-   *   TT_MAC_ID_UNINTERP ::
-   */
-
-#define TT_MAC_ID_ROMAN                 0
-#define TT_MAC_ID_JAPANESE              1
-#define TT_MAC_ID_TRADITIONAL_CHINESE   2
-#define TT_MAC_ID_KOREAN                3
-#define TT_MAC_ID_ARABIC                4
-#define TT_MAC_ID_HEBREW                5
-#define TT_MAC_ID_GREEK                 6
-#define TT_MAC_ID_RUSSIAN               7
-#define TT_MAC_ID_RSYMBOL               8
-#define TT_MAC_ID_DEVANAGARI            9
-#define TT_MAC_ID_GURMUKHI             10
-#define TT_MAC_ID_GUJARATI             11
-#define TT_MAC_ID_ORIYA                12
-#define TT_MAC_ID_BENGALI              13
-#define TT_MAC_ID_TAMIL                14
-#define TT_MAC_ID_TELUGU               15
-#define TT_MAC_ID_KANNADA              16
-#define TT_MAC_ID_MALAYALAM            17
-#define TT_MAC_ID_SINHALESE            18
-#define TT_MAC_ID_BURMESE              19
-#define TT_MAC_ID_KHMER                20
-#define TT_MAC_ID_THAI                 21
-#define TT_MAC_ID_LAOTIAN              22
-#define TT_MAC_ID_GEORGIAN             23
-#define TT_MAC_ID_ARMENIAN             24
-#define TT_MAC_ID_MALDIVIAN            25
-#define TT_MAC_ID_SIMPLIFIED_CHINESE   25
-#define TT_MAC_ID_TIBETAN              26
-#define TT_MAC_ID_MONGOLIAN            27
-#define TT_MAC_ID_GEEZ                 28
-#define TT_MAC_ID_SLAVIC               29
-#define TT_MAC_ID_VIETNAMESE           30
-#define TT_MAC_ID_SINDHI               31
-#define TT_MAC_ID_UNINTERP             32
-
-
-  /***********************************************************************
-   *
-   * @enum:
-   *   TT_ISO_ID_XXX
-   *
-   * @description:
-   *   A list of valid values for the `encoding_id' for
-   *   @TT_PLATFORM_ISO charmaps and name entries.
-   *
-   *   Their use is now deprecated.
-   *
-   * @values:
-   *   TT_ISO_ID_7BIT_ASCII ::
-   *     ASCII.
-   *   TT_ISO_ID_10646 ::
-   *     ISO/10646.
-   *   TT_ISO_ID_8859_1 ::
-   *     Also known as Latin-1.
-   */
-
-#define TT_ISO_ID_7BIT_ASCII  0
-#define TT_ISO_ID_10646       1
-#define TT_ISO_ID_8859_1      2
-
-
-  /***********************************************************************
-   *
-   * @enum:
-   *   TT_MS_ID_XXX
-   *
-   * @description:
-   *   A list of valid values for the `encoding_id' for
-   *   @TT_PLATFORM_MICROSOFT charmaps and name entries.
-   *
-   * @values:
-   *   TT_MS_ID_SYMBOL_CS ::
-   *     Corresponds to Microsoft symbol encoding. See
-   *     @FT_ENCODING_MS_SYMBOL.
-   *
-   *   TT_MS_ID_UNICODE_CS ::
-   *     Corresponds to a Microsoft WGL4 charmap, matching Unicode.  See
-   *     @FT_ENCODING_UNICODE.
-   *
-   *   TT_MS_ID_SJIS ::
-   *     Corresponds to SJIS Japanese encoding.  See @FT_ENCODING_SJIS.
-   *
-   *   TT_MS_ID_GB2312 ::
-   *     Corresponds to Simplified Chinese as used in Mainland China.  See
-   *     @FT_ENCODING_GB2312.
-   *
-   *   TT_MS_ID_BIG_5 ::
-   *     Corresponds to Traditional Chinese as used in Taiwan and Hong Kong.
-   *     See @FT_ENCODING_BIG5.
-   *
-   *   TT_MS_ID_WANSUNG ::
-   *     Corresponds to Korean Wansung encoding.  See @FT_ENCODING_WANSUNG.
-   *
-   *   TT_MS_ID_JOHAB ::
-   *     Corresponds to Johab encoding.  See @FT_ENCODING_JOHAB.
-   *
-   *   TT_MS_ID_UCS_4 ::
-   *     Corresponds to UCS-4 or UTF-32 charmaps.  This has been added to
-   *     the OpenType specification version 1.4 (mid-2001.)
-   */
-
-#define TT_MS_ID_SYMBOL_CS    0
-#define TT_MS_ID_UNICODE_CS   1
-#define TT_MS_ID_SJIS         2
-#define TT_MS_ID_GB2312       3
-#define TT_MS_ID_BIG_5        4
-#define TT_MS_ID_WANSUNG      5
-#define TT_MS_ID_JOHAB        6
-#define TT_MS_ID_UCS_4       10
-
-
-  /***********************************************************************
-   *
-   * @enum:
-   *   TT_ADOBE_ID_XXX
-   *
-   * @description:
-   *   A list of valid values for the `encoding_id' for
-   *   @TT_PLATFORM_ADOBE charmaps.  This is a FreeType-specific extension!
-   *
-   * @values:
-   *   TT_ADOBE_ID_STANDARD ::
-   *     Adobe standard encoding.
-   *   TT_ADOBE_ID_EXPERT ::
-   *     Adobe expert encoding.
-   *   TT_ADOBE_ID_CUSTOM ::
-   *     Adobe custom encoding.
-   */
-
-#define TT_ADOBE_ID_STANDARD  0
-#define TT_ADOBE_ID_EXPERT    1
-#define TT_ADOBE_ID_CUSTOM    2
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Possible values of the language identifier field in the name records  */
-  /* of the TTF `name' table if the `platform' identifier code is          */
-  /* TT_PLATFORM_MACINTOSH.                                                */
-  /*                                                                       */
-  /* The canonical source for the Apple assigned Language ID's is at       */
-  /*                                                                       */
-  /*   http://fonts.apple.com/TTRefMan/RM06/Chap6name.html                 */
-  /*                                                                       */
-#define TT_MAC_LANGID_ENGLISH                       0
-#define TT_MAC_LANGID_FRENCH                        1
-#define TT_MAC_LANGID_GERMAN                        2
-#define TT_MAC_LANGID_ITALIAN                       3
-#define TT_MAC_LANGID_DUTCH                         4
-#define TT_MAC_LANGID_SWEDISH                       5
-#define TT_MAC_LANGID_SPANISH                       6
-#define TT_MAC_LANGID_DANISH                        7
-#define TT_MAC_LANGID_PORTUGUESE                    8
-#define TT_MAC_LANGID_NORWEGIAN                     9
-#define TT_MAC_LANGID_HEBREW                       10
-#define TT_MAC_LANGID_JAPANESE                     11
-#define TT_MAC_LANGID_ARABIC                       12
-#define TT_MAC_LANGID_FINNISH                      13
-#define TT_MAC_LANGID_GREEK                        14
-#define TT_MAC_LANGID_ICELANDIC                    15
-#define TT_MAC_LANGID_MALTESE                      16
-#define TT_MAC_LANGID_TURKISH                      17
-#define TT_MAC_LANGID_CROATIAN                     18
-#define TT_MAC_LANGID_CHINESE_TRADITIONAL          19
-#define TT_MAC_LANGID_URDU                         20
-#define TT_MAC_LANGID_HINDI                        21
-#define TT_MAC_LANGID_THAI                         22
-#define TT_MAC_LANGID_KOREAN                       23
-#define TT_MAC_LANGID_LITHUANIAN                   24
-#define TT_MAC_LANGID_POLISH                       25
-#define TT_MAC_LANGID_HUNGARIAN                    26
-#define TT_MAC_LANGID_ESTONIAN                     27
-#define TT_MAC_LANGID_LETTISH                      28
-#define TT_MAC_LANGID_SAAMISK                      29
-#define TT_MAC_LANGID_FAEROESE                     30
-#define TT_MAC_LANGID_FARSI                        31
-#define TT_MAC_LANGID_RUSSIAN                      32
-#define TT_MAC_LANGID_CHINESE_SIMPLIFIED           33
-#define TT_MAC_LANGID_FLEMISH                      34
-#define TT_MAC_LANGID_IRISH                        35
-#define TT_MAC_LANGID_ALBANIAN                     36
-#define TT_MAC_LANGID_ROMANIAN                     37
-#define TT_MAC_LANGID_CZECH                        38
-#define TT_MAC_LANGID_SLOVAK                       39
-#define TT_MAC_LANGID_SLOVENIAN                    40
-#define TT_MAC_LANGID_YIDDISH                      41
-#define TT_MAC_LANGID_SERBIAN                      42
-#define TT_MAC_LANGID_MACEDONIAN                   43
-#define TT_MAC_LANGID_BULGARIAN                    44
-#define TT_MAC_LANGID_UKRAINIAN                    45
-#define TT_MAC_LANGID_BYELORUSSIAN                 46
-#define TT_MAC_LANGID_UZBEK                        47
-#define TT_MAC_LANGID_KAZAKH                       48
-#define TT_MAC_LANGID_AZERBAIJANI                  49
-#define TT_MAC_LANGID_AZERBAIJANI_CYRILLIC_SCRIPT  49
-#define TT_MAC_LANGID_AZERBAIJANI_ARABIC_SCRIPT    50
-#define TT_MAC_LANGID_ARMENIAN                     51
-#define TT_MAC_LANGID_GEORGIAN                     52
-#define TT_MAC_LANGID_MOLDAVIAN                    53
-#define TT_MAC_LANGID_KIRGHIZ                      54
-#define TT_MAC_LANGID_TAJIKI                       55
-#define TT_MAC_LANGID_TURKMEN                      56
-#define TT_MAC_LANGID_MONGOLIAN                    57
-#define TT_MAC_LANGID_MONGOLIAN_MONGOLIAN_SCRIPT   57
-#define TT_MAC_LANGID_MONGOLIAN_CYRILLIC_SCRIPT    58
-#define TT_MAC_LANGID_PASHTO                       59
-#define TT_MAC_LANGID_KURDISH                      60
-#define TT_MAC_LANGID_KASHMIRI                     61
-#define TT_MAC_LANGID_SINDHI                       62
-#define TT_MAC_LANGID_TIBETAN                      63
-#define TT_MAC_LANGID_NEPALI                       64
-#define TT_MAC_LANGID_SANSKRIT                     65
-#define TT_MAC_LANGID_MARATHI                      66
-#define TT_MAC_LANGID_BENGALI                      67
-#define TT_MAC_LANGID_ASSAMESE                     68
-#define TT_MAC_LANGID_GUJARATI                     69
-#define TT_MAC_LANGID_PUNJABI                      70
-#define TT_MAC_LANGID_ORIYA                        71
-#define TT_MAC_LANGID_MALAYALAM                    72
-#define TT_MAC_LANGID_KANNADA                      73
-#define TT_MAC_LANGID_TAMIL                        74
-#define TT_MAC_LANGID_TELUGU                       75
-#define TT_MAC_LANGID_SINHALESE                    76
-#define TT_MAC_LANGID_BURMESE                      77
-#define TT_MAC_LANGID_KHMER                        78
-#define TT_MAC_LANGID_LAO                          79
-#define TT_MAC_LANGID_VIETNAMESE                   80
-#define TT_MAC_LANGID_INDONESIAN                   81
-#define TT_MAC_LANGID_TAGALOG                      82
-#define TT_MAC_LANGID_MALAY_ROMAN_SCRIPT           83
-#define TT_MAC_LANGID_MALAY_ARABIC_SCRIPT          84
-#define TT_MAC_LANGID_AMHARIC                      85
-#define TT_MAC_LANGID_TIGRINYA                     86
-#define TT_MAC_LANGID_GALLA                        87
-#define TT_MAC_LANGID_SOMALI                       88
-#define TT_MAC_LANGID_SWAHILI                      89
-#define TT_MAC_LANGID_RUANDA                       90
-#define TT_MAC_LANGID_RUNDI                        91
-#define TT_MAC_LANGID_CHEWA                        92
-#define TT_MAC_LANGID_MALAGASY                     93
-#define TT_MAC_LANGID_ESPERANTO                    94
-#define TT_MAC_LANGID_WELSH                       128
-#define TT_MAC_LANGID_BASQUE                      129
-#define TT_MAC_LANGID_CATALAN                     130
-#define TT_MAC_LANGID_LATIN                       131
-#define TT_MAC_LANGID_QUECHUA                     132
-#define TT_MAC_LANGID_GUARANI                     133
-#define TT_MAC_LANGID_AYMARA                      134
-#define TT_MAC_LANGID_TATAR                       135
-#define TT_MAC_LANGID_UIGHUR                      136
-#define TT_MAC_LANGID_DZONGKHA                    137
-#define TT_MAC_LANGID_JAVANESE                    138
-#define TT_MAC_LANGID_SUNDANESE                   139
-
-
-#if 0  /* these seem to be errors that have been dropped */
-
-#define TT_MAC_LANGID_SCOTTISH_GAELIC             140
-#define TT_MAC_LANGID_IRISH_GAELIC                141
-
-#endif
-
-
-  /* The following codes are new as of 2000-03-10 */
-#define TT_MAC_LANGID_GALICIAN                    140
-#define TT_MAC_LANGID_AFRIKAANS                   141
-#define TT_MAC_LANGID_BRETON                      142
-#define TT_MAC_LANGID_INUKTITUT                   143
-#define TT_MAC_LANGID_SCOTTISH_GAELIC             144
-#define TT_MAC_LANGID_MANX_GAELIC                 145
-#define TT_MAC_LANGID_IRISH_GAELIC                146
-#define TT_MAC_LANGID_TONGAN                      147
-#define TT_MAC_LANGID_GREEK_POLYTONIC             148
-#define TT_MAC_LANGID_GREELANDIC                  149
-#define TT_MAC_LANGID_AZERBAIJANI_ROMAN_SCRIPT    150
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Possible values of the language identifier field in the name records  */
-  /* of the TTF `name' table if the `platform' identifier code is          */
-  /* TT_PLATFORM_MICROSOFT.                                                */
-  /*                                                                       */
-  /* The canonical source for the MS assigned LCID's used to be at         */
-  /*                                                                       */
-  /*   http://www.microsoft.com/typography/OTSPEC/lcid-cp.txt              */
-  /*                                                                       */
-  /* Now (2002-11-15), the Microsoft site directs to                       */
-  /*                                                                       */
-  /*   http://www.microsoft.com/globaldev/reference/loclanghome.asp        */
-  /*   http://support.microsoft.com/support/kb/articles/Q224/8/04.ASP      */
-  /*                                                                       */
-#define TT_MS_LANGID_ARABIC_SAUDI_ARABIA               0x0401
-#define TT_MS_LANGID_ARABIC_IRAQ                       0x0801
-#define TT_MS_LANGID_ARABIC_EGYPT                      0x0c01
-#define TT_MS_LANGID_ARABIC_LIBYA                      0x1001
-#define TT_MS_LANGID_ARABIC_ALGERIA                    0x1401
-#define TT_MS_LANGID_ARABIC_MOROCCO                    0x1801
-#define TT_MS_LANGID_ARABIC_TUNISIA                    0x1c01
-#define TT_MS_LANGID_ARABIC_OMAN                       0x2001
-#define TT_MS_LANGID_ARABIC_YEMEN                      0x2401
-#define TT_MS_LANGID_ARABIC_SYRIA                      0x2801
-#define TT_MS_LANGID_ARABIC_JORDAN                     0x2c01
-#define TT_MS_LANGID_ARABIC_LEBANON                    0x3001
-#define TT_MS_LANGID_ARABIC_KUWAIT                     0x3401
-#define TT_MS_LANGID_ARABIC_UAE                        0x3801
-#define TT_MS_LANGID_ARABIC_BAHRAIN                    0x3c01
-#define TT_MS_LANGID_ARABIC_QATAR                      0x4001
-#define TT_MS_LANGID_BULGARIAN_BULGARIA                0x0402
-#define TT_MS_LANGID_CATALAN_SPAIN                     0x0403
-#define TT_MS_LANGID_CHINESE_TAIWAN                    0x0404
-#define TT_MS_LANGID_CHINESE_PRC                       0x0804
-#define TT_MS_LANGID_CHINESE_HONG_KONG                 0x0c04
-#define TT_MS_LANGID_CHINESE_SINGAPORE                 0x1004
-
-#if 1  /* this used to be this value (and it still is in many places) */
-#define TT_MS_LANGID_CHINESE_MACAU                     0x1404
-#else  /* but beware, Microsoft may change its mind...
-          the most recent Word reference has the following: */
-#define TT_MS_LANGID_CHINESE_MACAU  TT_MS_LANGID_CHINESE_HONG_KONG
-#endif
-
-#define TT_MS_LANGID_CZECH_CZECH_REPUBLIC              0x0405
-#define TT_MS_LANGID_DANISH_DENMARK                    0x0406
-#define TT_MS_LANGID_GERMAN_GERMANY                    0x0407
-#define TT_MS_LANGID_GERMAN_SWITZERLAND                0x0807
-#define TT_MS_LANGID_GERMAN_AUSTRIA                    0x0c07
-#define TT_MS_LANGID_GERMAN_LUXEMBOURG                 0x1007
-#define TT_MS_LANGID_GERMAN_LIECHTENSTEI               0x1407
-#define TT_MS_LANGID_GREEK_GREECE                      0x0408
-#define TT_MS_LANGID_ENGLISH_UNITED_STATES             0x0409
-#define TT_MS_LANGID_ENGLISH_UNITED_KINGDOM            0x0809
-#define TT_MS_LANGID_ENGLISH_AUSTRALIA                 0x0c09
-#define TT_MS_LANGID_ENGLISH_CANADA                    0x1009
-#define TT_MS_LANGID_ENGLISH_NEW_ZEALAND               0x1409
-#define TT_MS_LANGID_ENGLISH_IRELAND                   0x1809
-#define TT_MS_LANGID_ENGLISH_SOUTH_AFRICA              0x1c09
-#define TT_MS_LANGID_ENGLISH_JAMAICA                   0x2009
-#define TT_MS_LANGID_ENGLISH_CARIBBEAN                 0x2409
-#define TT_MS_LANGID_ENGLISH_BELIZE                    0x2809
-#define TT_MS_LANGID_ENGLISH_TRINIDAD                  0x2c09
-#define TT_MS_LANGID_ENGLISH_ZIMBABWE                  0x3009
-#define TT_MS_LANGID_ENGLISH_PHILIPPINES               0x3409
-#define TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT    0x040a
-#define TT_MS_LANGID_SPANISH_MEXICO                    0x080a
-#define TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT  0x0c0a
-#define TT_MS_LANGID_SPANISH_GUATEMALA                 0x100a
-#define TT_MS_LANGID_SPANISH_COSTA_RICA                0x140a
-#define TT_MS_LANGID_SPANISH_PANAMA                    0x180a
-#define TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC        0x1c0a
-#define TT_MS_LANGID_SPANISH_VENEZUELA                 0x200a
-#define TT_MS_LANGID_SPANISH_COLOMBIA                  0x240a
-#define TT_MS_LANGID_SPANISH_PERU                      0x280a
-#define TT_MS_LANGID_SPANISH_ARGENTINA                 0x2c0a
-#define TT_MS_LANGID_SPANISH_ECUADOR                   0x300a
-#define TT_MS_LANGID_SPANISH_CHILE                     0x340a
-#define TT_MS_LANGID_SPANISH_URUGUAY                   0x380a
-#define TT_MS_LANGID_SPANISH_PARAGUAY                  0x3c0a
-#define TT_MS_LANGID_SPANISH_BOLIVIA                   0x400a
-#define TT_MS_LANGID_SPANISH_EL_SALVADOR               0x440a
-#define TT_MS_LANGID_SPANISH_HONDURAS                  0x480a
-#define TT_MS_LANGID_SPANISH_NICARAGUA                 0x4c0a
-#define TT_MS_LANGID_SPANISH_PUERTO_RICO               0x500a
-#define TT_MS_LANGID_FINNISH_FINLAND                   0x040b
-#define TT_MS_LANGID_FRENCH_FRANCE                     0x040c
-#define TT_MS_LANGID_FRENCH_BELGIUM                    0x080c
-#define TT_MS_LANGID_FRENCH_CANADA                     0x0c0c
-#define TT_MS_LANGID_FRENCH_SWITZERLAND                0x100c
-#define TT_MS_LANGID_FRENCH_LUXEMBOURG                 0x140c
-#define TT_MS_LANGID_FRENCH_MONACO                     0x180c
-#define TT_MS_LANGID_HEBREW_ISRAEL                     0x040d
-#define TT_MS_LANGID_HUNGARIAN_HUNGARY                 0x040e
-#define TT_MS_LANGID_ICELANDIC_ICELAND                 0x040f
-#define TT_MS_LANGID_ITALIAN_ITALY                     0x0410
-#define TT_MS_LANGID_ITALIAN_SWITZERLAND               0x0810
-#define TT_MS_LANGID_JAPANESE_JAPAN                    0x0411
-#define TT_MS_LANGID_KOREAN_EXTENDED_WANSUNG_KOREA     0x0412
-#define TT_MS_LANGID_KOREAN_JOHAB_KOREA                0x0812
-#define TT_MS_LANGID_DUTCH_NETHERLANDS                 0x0413
-#define TT_MS_LANGID_DUTCH_BELGIUM                     0x0813
-#define TT_MS_LANGID_NORWEGIAN_NORWAY_BOKMAL           0x0414
-#define TT_MS_LANGID_NORWEGIAN_NORWAY_NYNORSK          0x0814
-#define TT_MS_LANGID_POLISH_POLAND                     0x0415
-#define TT_MS_LANGID_PORTUGUESE_BRAZIL                 0x0416
-#define TT_MS_LANGID_PORTUGUESE_PORTUGAL               0x0816
-#define TT_MS_LANGID_RHAETO_ROMANIC_SWITZERLAND        0x0417
-#define TT_MS_LANGID_ROMANIAN_ROMANIA                  0x0418
-#define TT_MS_LANGID_MOLDAVIAN_MOLDAVIA                0x0818
-#define TT_MS_LANGID_RUSSIAN_RUSSIA                    0x0419
-#define TT_MS_LANGID_RUSSIAN_MOLDAVIA                  0x0819
-#define TT_MS_LANGID_CROATIAN_CROATIA                  0x041a
-#define TT_MS_LANGID_SERBIAN_SERBIA_LATIN              0x081a
-#define TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC           0x0c1a
-#define TT_MS_LANGID_SLOVAK_SLOVAKIA                   0x041b
-#define TT_MS_LANGID_ALBANIAN_ALBANIA                  0x041c
-#define TT_MS_LANGID_SWEDISH_SWEDEN                    0x041d
-#define TT_MS_LANGID_SWEDISH_FINLAND                   0x081d
-#define TT_MS_LANGID_THAI_THAILAND                     0x041e
-#define TT_MS_LANGID_TURKISH_TURKEY                    0x041f
-#define TT_MS_LANGID_URDU_PAKISTAN                     0x0420
-#define TT_MS_LANGID_INDONESIAN_INDONESIA              0x0421
-#define TT_MS_LANGID_UKRAINIAN_UKRAINE                 0x0422
-#define TT_MS_LANGID_BELARUSIAN_BELARUS                0x0423
-#define TT_MS_LANGID_SLOVENE_SLOVENIA                  0x0424
-#define TT_MS_LANGID_ESTONIAN_ESTONIA                  0x0425
-#define TT_MS_LANGID_LATVIAN_LATVIA                    0x0426
-#define TT_MS_LANGID_LITHUANIAN_LITHUANIA              0x0427
-#define TT_MS_LANGID_CLASSIC_LITHUANIAN_LITHUANIA      0x0827
-
-#if 0  /* this seems to be an error that have been dropped */
-#define TT_MS_LANGID_MAORI_NEW_ZEALAND                 0x0428
-#endif
-
-#define TT_MS_LANGID_FARSI_IRAN                        0x0429
-#define TT_MS_LANGID_VIETNAMESE_VIET_NAM               0x042a
-#define TT_MS_LANGID_ARMENIAN_ARMENIA                  0x042b
-#define TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN            0x042c
-#define TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC         0x082c
-#define TT_MS_LANGID_BASQUE_SPAIN                      0x042d
-#define TT_MS_LANGID_SORBIAN_GERMANY                   0x042e
-#define TT_MS_LANGID_MACEDONIAN_MACEDONIA              0x042f
-#define TT_MS_LANGID_SUTU_SOUTH_AFRICA                 0x0430
-#define TT_MS_LANGID_TSONGA_SOUTH_AFRICA               0x0431
-#define TT_MS_LANGID_TSWANA_SOUTH_AFRICA               0x0432
-#define TT_MS_LANGID_VENDA_SOUTH_AFRICA                0x0433
-#define TT_MS_LANGID_XHOSA_SOUTH_AFRICA                0x0434
-#define TT_MS_LANGID_ZULU_SOUTH_AFRICA                 0x0435
-#define TT_MS_LANGID_AFRIKAANS_SOUTH_AFRICA            0x0436
-#define TT_MS_LANGID_GEORGIAN_GEORGIA                  0x0437
-#define TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS           0x0438
-#define TT_MS_LANGID_HINDI_INDIA                       0x0439
-#define TT_MS_LANGID_MALTESE_MALTA                     0x043a
-#define TT_MS_LANGID_SAAMI_LAPONIA                     0x043b
-
-#if 0 /* this seems to be a previous invertion */
-#define TT_MS_LANGID_IRISH_GAELIC_IRELAND              0x043c
-#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM    0x083c
-#else
-#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM    0x083c
-#define TT_MS_LANGID_IRISH_GAELIC_IRELAND              0x043c
-#endif
-
-#define TT_MS_LANGID_MALAY_MALAYSIA                    0x043e
-#define TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM           0x083e
-#define TT_MS_LANGID_KAZAK_KAZAKSTAN                   0x043f
-#define TT_MS_LANGID_SWAHILI_KENYA                     0x0441
-#define TT_MS_LANGID_UZBEK_UZBEKISTAN_LATIN            0x0443
-#define TT_MS_LANGID_UZBEK_UZBEKISTAN_CYRILLIC         0x0843
-#define TT_MS_LANGID_TATAR_TATARSTAN                   0x0444
-#define TT_MS_LANGID_BENGALI_INDIA                     0x0445
-#define TT_MS_LANGID_PUNJABI_INDIA                     0x0446
-#define TT_MS_LANGID_GUJARATI_INDIA                    0x0447
-#define TT_MS_LANGID_ORIYA_INDIA                       0x0448
-#define TT_MS_LANGID_TAMIL_INDIA                       0x0449
-#define TT_MS_LANGID_TELUGU_INDIA                      0x044a
-#define TT_MS_LANGID_KANNADA_INDIA                     0x044b
-#define TT_MS_LANGID_MALAYALAM_INDIA                   0x044c
-#define TT_MS_LANGID_ASSAMESE_INDIA                    0x044d
-#define TT_MS_LANGID_MARATHI_INDIA                     0x044e
-#define TT_MS_LANGID_SANSKRIT_INDIA                    0x044f
-#define TT_MS_LANGID_KONKANI_INDIA                     0x0457
-
-  /* new as of 2001-01-01 */
-#define TT_MS_LANGID_ARABIC_GENERAL                    0x0001
-#define TT_MS_LANGID_CHINESE_GENERAL                   0x0004
-#define TT_MS_LANGID_ENGLISH_GENERAL                   0x0009
-#define TT_MS_LANGID_FRENCH_WEST_INDIES                0x1c0c
-#define TT_MS_LANGID_FRENCH_REUNION                    0x200c
-#define TT_MS_LANGID_FRENCH_CONGO                      0x240c
-  /* which was formerly: */
-#define TT_MS_LANGID_FRENCH_ZAIRE  TT_MS_LANGID_FRENCH_CONGO
-
-#define TT_MS_LANGID_FRENCH_SENEGAL                    0x280c
-#define TT_MS_LANGID_FRENCH_CAMEROON                   0x2c0c
-#define TT_MS_LANGID_FRENCH_COTE_D_IVOIRE              0x300c
-#define TT_MS_LANGID_FRENCH_MALI                       0x340c
-#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA        0x101a
-#define TT_MS_LANGID_URDU_INDIA                        0x0820
-#define TT_MS_LANGID_TAJIK_TAJIKISTAN                  0x0428
-#define TT_MS_LANGID_YIDDISH_GERMANY                   0x043d
-#define TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN               0x0440
-  /* alias declared in Windows 2000 */
-#define TT_MS_LANGID_KIRGHIZ_KIRGHIZ_REPUBLIC \
-          TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN
-
-#define TT_MS_LANGID_TURKMEN_TURKMENISTAN              0x0442
-#define TT_MS_LANGID_MONGOLIAN_MONGOLIA /* Cyrillic */ 0x0450
-
-  /* the following seems to be inconsistent;
-     here is the current "official" way: */
-#define TT_MS_LANGID_TIBETAN_BHUTAN                    0x0451
-  /* and here is what is used by Passport SDK */
-#define TT_MS_LANGID_TIBETAN_CHINA                     0x0451
-#define TT_MS_LANGID_DZONGHKA_BHUTAN                   0x0851
-  /* end of inconsistency */
-
-#define TT_MS_LANGID_WELSH_WALES                       0x0452
-#define TT_MS_LANGID_KHMER_CAMBODIA                    0x0453
-#define TT_MS_LANGID_LAO_LAOS                          0x0454
-#define TT_MS_LANGID_BURMESE_MYANMAR                   0x0455
-#define TT_MS_LANGID_GALICIAN_SPAIN                    0x0456
-#define TT_MS_LANGID_MANIPURI_INDIA                    0x0458
-#define TT_MS_LANGID_SINDHI_INDIA                      0x0459
-  /* the following one is only encountered in Microsoft RTF specification */
-#define TT_MS_LANGID_KASHMIRI_PAKISTAN                 0x0460
-  /* the following one is not in the Passport list, looks like an omission */
-#define TT_MS_LANGID_KASHMIRI_INDIA                    0x0860
-#define TT_MS_LANGID_NEPALI_NEPAL                      0x0461
-#define TT_MS_LANGID_NEPALI_INDIA                      0x0861
-#define TT_MS_LANGID_FRISIAN_NETHERLANDS               0x0462
-
-  /* new as of 2001-03-01 (from Office Xp) */
-#define TT_MS_LANGID_ENGLISH_HONG_KONG                 0x3c09
-#define TT_MS_LANGID_ENGLISH_INDIA                     0x4009
-#define TT_MS_LANGID_ENGLISH_MALAYSIA                  0x4409
-#define TT_MS_LANGID_ENGLISH_SINGAPORE                 0x4809
-#define TT_MS_LANGID_SYRIAC_SYRIA                      0x045a
-#define TT_MS_LANGID_SINHALESE_SRI_LANKA               0x045b
-#define TT_MS_LANGID_CHEROKEE_UNITED_STATES            0x045c
-#define TT_MS_LANGID_INUKTITUT_CANADA                  0x045d
-#define TT_MS_LANGID_AMHARIC_ETHIOPIA                  0x045e
-#define TT_MS_LANGID_TAMAZIGHT_MOROCCO                 0x045f
-#define TT_MS_LANGID_TAMAZIGHT_MOROCCO_LATIN           0x085f
-#define TT_MS_LANGID_PASHTO_AFGHANISTAN                0x0463
-#define TT_MS_LANGID_FILIPINO_PHILIPPINES              0x0464
-#define TT_MS_LANGID_DHIVEHI_MALDIVES                  0x0465
-  /* alias declared in Windows 2000 */
-#define TT_MS_LANGID_DIVEHI_MALDIVES  TT_MS_LANGID_DHIVEHI_MALDIVES
-  /* for language codes from 0x0466 to 0x0471 see below */
-#define TT_MS_LANGID_OROMO_ETHIOPIA                    0x0472
-#define TT_MS_LANGID_TIGRIGNA_ETHIOPIA                 0x0473
-#define TT_MS_LANGID_TIGRIGNA_ERYTHREA                 0x0873
-  /* also spelled in the `Passport SDK' list as: */
-#define TT_MS_LANGID_TIGRIGNA_ERYTREA  TT_MS_LANGID_TIGRIGNA_ERYTHREA
-
-  /* New additions from Windows Xp/Passport SDK 2001-11-10. */
-
-  /* don't ask what this one means... It is commented out currently. */
-#if 0
-#define TT_MS_LANGID_GREEK_GREECE2                     0x2008
-#endif
-
-#define TT_MS_LANGID_SPANISH_UNITED_STATES             0x540a
-  /* The following two IDs blatantly violate MS specs by using a */
-  /* sublanguage > 0x1F.                                         */
-#define TT_MS_LANGID_SPANISH_LATIN_AMERICA             0xE40aU
-#define TT_MS_LANGID_FRENCH_NORTH_AFRICA               0xE40cU
-
-#define TT_MS_LANGID_FRENCH_MOROCCO                    0x380c
-#define TT_MS_LANGID_FRENCH_HAITI                      0x3c0c
-#define TT_MS_LANGID_BENGALI_BANGLADESH                0x0845
-#define TT_MS_LANGID_PUNJABI_ARABIC_PAKISTAN           0x0846
-#define TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN      0x0850
-#define TT_MS_LANGID_EDO_NIGERIA                       0x0466
-#define TT_MS_LANGID_FULFULDE_NIGERIA                  0x0467
-#define TT_MS_LANGID_HAUSA_NIGERIA                     0x0468
-#define TT_MS_LANGID_IBIBIO_NIGERIA                    0x0469
-#define TT_MS_LANGID_YORUBA_NIGERIA                    0x046a
-  /* language codes from 0x046b to 0x046f are (still) unknown. */
-#define TT_MS_LANGID_IGBO_NIGERIA                      0x0470
-#define TT_MS_LANGID_KANURI_NIGERIA                    0x0471
-#define TT_MS_LANGID_GUARANI_PARAGUAY                  0x0474
-#define TT_MS_LANGID_HAWAIIAN_UNITED_STATES            0x0475
-#define TT_MS_LANGID_LATIN                             0x0476
-#define TT_MS_LANGID_SOMALI_SOMALIA                    0x0477
-  /* Note: Yi does not have a (proper) ISO 639-2 code, since it is mostly */
-  /*       not written (but OTOH the peculiar writing system is worth     */
-  /*       studying).                                                     */
-#define TT_MS_LANGID_YI_CHINA                          0x0478
-#define TT_MS_LANGID_PAPIAMENTU_NETHERLANDS_ANTILLES   0x0479
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Possible values of the `name' identifier field in the name records of */
-  /* the TTF `name' table.  These values are platform independent.         */
-  /*                                                                       */
-#define TT_NAME_ID_COPYRIGHT            0
-#define TT_NAME_ID_FONT_FAMILY          1
-#define TT_NAME_ID_FONT_SUBFAMILY       2
-#define TT_NAME_ID_UNIQUE_ID            3
-#define TT_NAME_ID_FULL_NAME            4
-#define TT_NAME_ID_VERSION_STRING       5
-#define TT_NAME_ID_PS_NAME              6
-#define TT_NAME_ID_TRADEMARK            7
-
-  /* the following values are from the OpenType spec */
-#define TT_NAME_ID_MANUFACTURER         8
-#define TT_NAME_ID_DESIGNER             9
-#define TT_NAME_ID_DESCRIPTION          10
-#define TT_NAME_ID_VENDOR_URL           11
-#define TT_NAME_ID_DESIGNER_URL         12
-#define TT_NAME_ID_LICENSE              13
-#define TT_NAME_ID_LICENSE_URL          14
-  /* number 15 is reserved */
-#define TT_NAME_ID_PREFERRED_FAMILY     16
-#define TT_NAME_ID_PREFERRED_SUBFAMILY  17
-#define TT_NAME_ID_MAC_FULL_NAME        18
-
-  /* The following code is new as of 2000-01-21 */
-#define TT_NAME_ID_SAMPLE_TEXT          19
-
-  /* This is new in OpenType 1.3 */
-#define TT_NAME_ID_CID_FINDFONT_NAME    20
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Bit mask values for the Unicode Ranges from the TTF `OS2 ' table.     */
-  /*                                                                       */
-  /* Updated 02-Jul-2000.                                                  */
-  /*                                                                       */
-
-  /* General Scripts Area */
-
-  /* Bit  0   Basic Latin */
-#define TT_UCR_BASIC_LATIN                     (1L <<  0) /* U+0020-U+007E */
-  /* Bit  1   C1 Controls and Latin-1 Supplement */
-#define TT_UCR_LATIN1_SUPPLEMENT               (1L <<  1) /* U+0080-U+00FF */
-  /* Bit  2   Latin Extended-A */
-#define TT_UCR_LATIN_EXTENDED_A                (1L <<  2) /* U+0100-U+017F */
-  /* Bit  3   Latin Extended-B */
-#define TT_UCR_LATIN_EXTENDED_B                (1L <<  3) /* U+0180-U+024F */
-  /* Bit  4   IPA Extensions */
-#define TT_UCR_IPA_EXTENSIONS                  (1L <<  4) /* U+0250-U+02AF */
-  /* Bit  5   Spacing Modifier Letters */
-#define TT_UCR_SPACING_MODIFIER                (1L <<  5) /* U+02B0-U+02FF */
-  /* Bit  6   Combining Diacritical Marks */
-#define TT_UCR_COMBINING_DIACRITICS            (1L <<  6) /* U+0300-U+036F */
-  /* Bit  7   Greek and Coptic */
-#define TT_UCR_GREEK                           (1L <<  7) /* U+0370-U+03FF */
-  /* Bit  8 is reserved (was: Greek Symbols and Coptic) */
-  /* Bit  9   Cyrillic               + */
-  /*          Cyrillic Supplementary   */
-#define TT_UCR_CYRILLIC                        (1L <<  9) /* U+0400-U+04FF */
-                                                          /* U+0500-U+052F */
-  /* Bit 10   Armenian */
-#define TT_UCR_ARMENIAN                        (1L << 10) /* U+0530-U+058F */
-  /* Bit 11   Hebrew */
-#define TT_UCR_HEBREW                          (1L << 11) /* U+0590-U+05FF */
-  /* Bit 12 is reserved (was: Hebrew Extended) */
-  /* Bit 13   Arabic */
-#define TT_UCR_ARABIC                          (1L << 13) /* U+0600-U+06FF */
-  /* Bit 14 is reserved (was: Arabic Extended) */
-  /* Bit 15   Devanagari */
-#define TT_UCR_DEVANAGARI                      (1L << 15) /* U+0900-U+097F */
-  /* Bit 16   Bengali */
-#define TT_UCR_BENGALI                         (1L << 16) /* U+0980-U+09FF */
-  /* Bit 17   Gurmukhi */
-#define TT_UCR_GURMUKHI                        (1L << 17) /* U+0A00-U+0A7F */
-  /* Bit 18   Gujarati */
-#define TT_UCR_GUJARATI                        (1L << 18) /* U+0A80-U+0AFF */
-  /* Bit 19   Oriya */
-#define TT_UCR_ORIYA                           (1L << 19) /* U+0B00-U+0B7F */
-  /* Bit 20   Tamil */
-#define TT_UCR_TAMIL                           (1L << 20) /* U+0B80-U+0BFF */
-  /* Bit 21   Telugu */
-#define TT_UCR_TELUGU                          (1L << 21) /* U+0C00-U+0C7F */
-  /* Bit 22   Kannada */
-#define TT_UCR_KANNADA                         (1L << 22) /* U+0C80-U+0CFF */
-  /* Bit 23   Malayalam */
-#define TT_UCR_MALAYALAM                       (1L << 23) /* U+0D00-U+0D7F */
-  /* Bit 24   Thai */
-#define TT_UCR_THAI                            (1L << 24) /* U+0E00-U+0E7F */
-  /* Bit 25   Lao */
-#define TT_UCR_LAO                             (1L << 25) /* U+0E80-U+0EFF */
-  /* Bit 26   Georgian */
-#define TT_UCR_GEORGIAN                        (1L << 26) /* U+10A0-U+10FF */
-  /* Bit 27 is reserved (was Georgian Extended) */
-  /* Bit 28   Hangul Jamo */
-#define TT_UCR_HANGUL_JAMO                     (1L << 28) /* U+1100-U+11FF */
-  /* Bit 29   Latin Extended Additional */
-#define TT_UCR_LATIN_EXTENDED_ADDITIONAL       (1L << 29) /* U+1E00-U+1EFF */
-  /* Bit 30   Greek Extended */
-#define TT_UCR_GREEK_EXTENDED                  (1L << 30) /* U+1F00-U+1FFF */
-
-  /* Symbols Area */
-
-  /* Bit 31   General Punctuation */
-#define TT_UCR_GENERAL_PUNCTUATION             (1L << 31) /* U+2000-U+206F */
-  /* Bit 32   Superscripts And Subscripts */
-#define TT_UCR_SUPERSCRIPTS_SUBSCRIPTS         (1L <<  0) /* U+2070-U+209F */
-  /* Bit 33   Currency Symbols */
-#define TT_UCR_CURRENCY_SYMBOLS                (1L <<  1) /* U+20A0-U+20CF */
-  /* Bit 34   Combining Diacritical Marks For Symbols */
-#define TT_UCR_COMBINING_DIACRITICS_SYMB       (1L <<  2) /* U+20D0-U+20FF */
-  /* Bit 35   Letterlike Symbols */
-#define TT_UCR_LETTERLIKE_SYMBOLS              (1L <<  3) /* U+2100-U+214F */
-  /* Bit 36   Number Forms */
-#define TT_UCR_NUMBER_FORMS                    (1L <<  4) /* U+2150-U+218F */
-  /* Bit 37   Arrows                + */
-  /*          Supplemental Arrows-A + */
-  /*          Supplemental Arrows-B   */
-#define TT_UCR_ARROWS                          (1L <<  5) /* U+2190-U+21FF */
-                                                          /* U+27F0-U+27FF */
-                                                          /* U+2900-U+297F */
-  /* Bit 38   Mathematical Operators               + */
-  /*          Supplemental Mathematical Operators  + */
-  /*          Miscellaneous Mathematical Symbols-A + */
-  /*          Miscellaneous Mathematical Symbols-B   */
-#define TT_UCR_MATHEMATICAL_OPERATORS          (1L <<  6) /* U+2200-U+22FF */
-                                                          /* U+2A00-U+2AFF */
-                                                          /* U+27C0-U+27EF */
-                                                          /* U+2980-U+29FF */
-  /* Bit 39 Miscellaneous Technical */
-#define TT_UCR_MISCELLANEOUS_TECHNICAL         (1L <<  7) /* U+2300-U+23FF */
-  /* Bit 40   Control Pictures */
-#define TT_UCR_CONTROL_PICTURES                (1L <<  8) /* U+2400-U+243F */
-  /* Bit 41   Optical Character Recognition */
-#define TT_UCR_OCR                             (1L <<  9) /* U+2440-U+245F */
-  /* Bit 42   Enclosed Alphanumerics */
-#define TT_UCR_ENCLOSED_ALPHANUMERICS          (1L << 10) /* U+2460-U+24FF */
-  /* Bit 43   Box Drawing */
-#define TT_UCR_BOX_DRAWING                     (1L << 11) /* U+2500-U+257F */
-  /* Bit 44   Block Elements */
-#define TT_UCR_BLOCK_ELEMENTS                  (1L << 12) /* U+2580-U+259F */
-  /* Bit 45   Geometric Shapes */
-#define TT_UCR_GEOMETRIC_SHAPES                (1L << 13) /* U+25A0-U+25FF */
-  /* Bit 46   Miscellaneous Symbols */
-#define TT_UCR_MISCELLANEOUS_SYMBOLS           (1L << 14) /* U+2600-U+26FF */
-  /* Bit 47   Dingbats */
-#define TT_UCR_DINGBATS                        (1L << 15) /* U+2700-U+27BF */
-
-  /* CJK Phonetics and Symbols Area */
-
-  /* Bit 48   CJK Symbols and Punctuation */
-#define TT_UCR_CJK_SYMBOLS                     (1L << 16) /* U+3000-U+303F */
-  /* Bit 49   Hiragana */
-#define TT_UCR_HIRAGANA                        (1L << 17) /* U+3040-U+309F */
-  /* Bit 50   Katakana                     + */
-  /*          Katakana Phonetic Extensions   */
-#define TT_UCR_KATAKANA                        (1L << 18) /* U+30A0-U+30FF */
-                                                          /* U+31F0-U+31FF */
-  /* Bit 51   Bopomofo          + */
-  /*          Bopomofo Extended   */
-#define TT_UCR_BOPOMOFO                        (1L << 19) /* U+3100-U+312F */
-                                                          /* U+31A0-U+31BF */
-  /* Bit 52   Hangul Compatibility Jamo */
-#define TT_UCR_HANGUL_COMPATIBILITY_JAMO       (1L << 20) /* U+3130-U+318F */
-  /* Bit 53   Kanbun */
-#define TT_UCR_CJK_MISC                        (1L << 21) /* U+3190-U+319F */
-#define TT_UCR_KANBUN  TT_UCR_CJK_MISC
-  /* Bit 54   Enclosed CJK Letters and Months */
-#define TT_UCR_ENCLOSED_CJK_LETTERS_MONTHS     (1L << 22) /* U+3200-U+32FF */
-  /* Bit 55   CJK Compatibility */
-#define TT_UCR_CJK_COMPATIBILITY               (1L << 23) /* U+3300-U+33FF */
-
-  /* Hangul Syllables Area */
-
-  /* Bit 56   Hangul */
-#define TT_UCR_HANGUL                          (1L << 24) /* U+AC00-U+D7A3 */
-
-  /* Surrogates Area */
-
-  /* Bit 57   High Surrogates             + */
-  /*          High Private Use Surrogates + */
-  /*          Low Surrogates                */
-#define TT_UCR_SURROGATES                      (1L << 25) /* U+D800-U+DB7F */
-                                                          /* U+DB80-U+DBFF */
-                                                          /* U+DC00-U+DFFF */
-  /* According to OpenType specs v.1.3+, setting bit 57 implies that there */
-  /* is at least one codepoint beyond the Basic Multilingual Plane that is */
-  /* supported by this font.  So it really means:            >= U+10000    */
-
-  /* Bit 58 is reserved for Unicode SubRanges */
-
-  /* CJK Ideographs Area */
-
-  /* Bit 59   CJK Unified Ideographs             + */
-  /*          CJK Radicals Supplement            + */
-  /*          Kangxi Radicals                    + */
-  /*          Ideographic Description Characters + */
-  /*          CJK Unified Ideographs Extension A   */
-  /*          CJK Unified Ideographs Extension A + */
-  /*          CJK Unified Ideographs Extension B + */
-  /*          Kanbun                               */
-#define TT_UCR_CJK_UNIFIED_IDEOGRAPHS          (1L << 27) /* U+4E00-U+9FFF */
-                                                          /* U+2E80-U+2EFF */
-                                                          /* U+2F00-U+2FDF */
-                                                          /* U+2FF0-U+2FFF */
-                                                          /* U+3400-U+4DB5 */
-                                                          /*U+20000-U+2A6DF*/
-                                                          /* U+3190-U+319F */
-
-  /* Private Use Area */
-
-  /* Bit 60   Private Use */
-#define TT_UCR_PRIVATE_USE                     (1L << 28) /* U+E000-U+F8FF */
-
-  /* Compatibility Area and Specials */
-
-  /* Bit 61   CJK Compatibility Ideographs            + */
-  /*          CJK Compatibility Ideographs Supplement   */
-#define TT_UCR_CJK_COMPATIBILITY_IDEOGRAPHS    (1L << 29) /* U+F900-U+FAFF */
-                                                          /*U+2F800-U+2FA1F*/
-  /* Bit 62   Alphabetic Presentation Forms */
-#define TT_UCR_ALPHABETIC_PRESENTATION_FORMS   (1L << 30) /* U+FB00-U+FB4F */
-  /* Bit 63   Arabic Presentation Forms-A */
-#define TT_UCR_ARABIC_PRESENTATIONS_A          (1L << 31) /* U+FB50-U+FDFF */
-  /* Bit 64   Combining Half Marks */
-#define TT_UCR_COMBINING_HALF_MARKS            (1L <<  0) /* U+FE20-U+FE2F */
-  /* Bit 65   CJK Compatibility Forms */
-#define TT_UCR_CJK_COMPATIBILITY_FORMS         (1L <<  1) /* U+FE30-U+FE4F */
-  /* Bit 66   Small Form Variants */
-#define TT_UCR_SMALL_FORM_VARIANTS             (1L <<  2) /* U+FE50-U+FE6F */
-  /* Bit 67   Arabic Presentation Forms-B */
-#define TT_UCR_ARABIC_PRESENTATIONS_B          (1L <<  3) /* U+FE70-U+FEFE */
-  /* Bit 68   Halfwidth and Fullwidth Forms */
-#define TT_UCR_HALFWIDTH_FULLWIDTH_FORMS       (1L <<  4) /* U+FF00-U+FFEF */
-  /* Bit 69   Specials */
-#define TT_UCR_SPECIALS                        (1L <<  5) /* U+FFF0-U+FFFD */
-  /* Bit 70   Tibetan */
-#define TT_UCR_TIBETAN                         (1L <<  6) /* U+0F00-U+0FFF */
-  /* Bit 71   Syriac */
-#define TT_UCR_SYRIAC                          (1L <<  7) /* U+0700-U+074F */
-  /* Bit 72   Thaana */
-#define TT_UCR_THAANA                          (1L <<  8) /* U+0780-U+07BF */
-  /* Bit 73   Sinhala */
-#define TT_UCR_SINHALA                         (1L <<  9) /* U+0D80-U+0DFF */
-  /* Bit 74   Myanmar */
-#define TT_UCR_MYANMAR                         (1L << 10) /* U+1000-U+109F */
-  /* Bit 75   Ethiopic */
-#define TT_UCR_ETHIOPIC                        (1L << 11) /* U+1200-U+137F */
-  /* Bit 76   Cherokee */
-#define TT_UCR_CHEROKEE                        (1L << 12) /* U+13A0-U+13FF */
-  /* Bit 77   Unified Canadian Aboriginal Syllabics */
-#define TT_UCR_CANADIAN_ABORIGINAL_SYLLABICS   (1L << 13) /* U+1400-U+167F */
-  /* Bit 78   Ogham */
-#define TT_UCR_OGHAM                           (1L << 14) /* U+1680-U+169F */
-  /* Bit 79   Runic */
-#define TT_UCR_RUNIC                           (1L << 15) /* U+16A0-U+16FF */
-  /* Bit 80   Khmer */
-#define TT_UCR_KHMER                           (1L << 16) /* U+1780-U+17FF */
-  /* Bit 81   Mongolian */
-#define TT_UCR_MONGOLIAN                       (1L << 17) /* U+1800-U+18AF */
-  /* Bit 82   Braille Patterns */
-#define TT_UCR_BRAILLE                         (1L << 18) /* U+2800-U+28FF */
-  /* Bit 83   Yi Syllables + */
-  /*          Yi Radicals    */
-#define TT_UCR_YI                              (1L << 19) /* U+A000-U+A48F */
-                                                          /* U+A490-U+A4CF */
-  /* Bit 84   Tagalog  + */
-  /*          Hanunoo  + */
-  /*          Buhid    + */
-  /*          Tagbanwa   */
-#define TT_UCR_PHILIPPINE                      (1L << 20) /* U+1700-U+171F */
-                                                          /* U+1720-U+173F */
-                                                          /* U+1740-U+175F */
-                                                          /* U+1760-U+177F */
-  /* Bit 85   Old Italic */
-#define TT_UCR_OLD_ITALIC                      (1L << 21) /*U+10300-U+1032F*/
-  /* Bit 86   Gothic */
-#define TT_UCR_GOTHIC                          (1L << 22) /*U+10330-U+1034F*/
-  /* Bit 87   Deseret */
-#define TT_UCR_DESERET                         (1L << 23) /*U+10400-U+1044F*/
-  /* Bit 88   Byzantine Musical Symbols + */
-  /*          Musical Symbols             */
-#define TT_UCR_MUSICAL_SYMBOLS                 (1L << 24) /*U+1D000-U+1D0FF*/
-                                                          /*U+1D100-U+1D1FF*/
-  /* Bit 89   Mathematical Alphanumeric Symbols */
-#define TT_UCR_MATH_ALPHANUMERIC_SYMBOLS       (1L << 25) /*U+1D400-U+1D7FF*/
-  /* Bit 90   Private Use (plane 15) + */
-  /*          Private Use (plane 16)   */
-#define TT_UCR_PRIVATE_USE_SUPPLEMENTARY       (1L << 26) /*U+F0000-U+FFFFD*/
-                                                        /*U+100000-U+10FFFD*/
-  /* Bit 91   Variation Selectors */
-#define TT_UCR_VARIATION_SELECTORS             (1L << 27) /* U+FE00-U+FE0F */
-  /* Bit 92   Tags */
-#define TT_UCR_TAGS                            (1L << 28) /*U+E0000-U+E007F*/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Some compilers have a very limited length of identifiers.             */
-  /*                                                                       */
-#if defined( __TURBOC__ ) && __TURBOC__ < 0x0410 || defined( __PACIFIC__ )
-#define HAVE_LIMIT_ON_IDENTS
-#endif
-
-
-#ifndef HAVE_LIMIT_ON_IDENTS
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Here some alias #defines in order to be clearer.                      */
-  /*                                                                       */
-  /* These are not always #defined to stay within the 31 character limit   */
-  /* which some compilers have.                                            */
-  /*                                                                       */
-  /* Credits go to Dave Hoo <dhoo at flash.net> for pointing out that modern  */
-  /* Borland compilers (read: from BC++ 3.1 on) can increase this limit.   */
-  /* If you get a warning with such a compiler, use the -i40 switch.       */
-  /*                                                                       */
-#define TT_UCR_ARABIC_PRESENTATION_FORMS_A      \
-         TT_UCR_ARABIC_PRESENTATIONS_A
-#define TT_UCR_ARABIC_PRESENTATION_FORMS_B      \
-         TT_UCR_ARABIC_PRESENTATIONS_B
-
-#define TT_UCR_COMBINING_DIACRITICAL_MARKS      \
-         TT_UCR_COMBINING_DIACRITICS
-#define TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB \
-         TT_UCR_COMBINING_DIACRITICS_SYMB
-
-
-#endif /* !HAVE_LIMIT_ON_IDENTS */
-
-
-FT_END_HEADER
-
-#endif /* __TTNAMEID_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/tttables.h b/extra_lib/include/freetype/freetype/tttables.h
deleted file mode 100644
index 32f78be..0000000
--- a/extra_lib/include/freetype/freetype/tttables.h
+++ /dev/null
@@ -1,674 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  tttables.h                                                             */
-/*                                                                         */
-/*    Basic SFNT/TrueType tables definitions and interface                 */
-/*    (specification only).                                                */
-/*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003 by                                     */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __TTTABLES_H__
-#define __TTTABLES_H__
-
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-#ifdef FREETYPE_H
-#error "freetype.h of FreeType 1 has been loaded!"
-#error "Please fix the directory search order for header files"
-#error "so that freetype.h of FreeType 2 is found first."
-#endif
-
-
-FT_BEGIN_HEADER
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    truetype_tables                                                    */
-  /*                                                                       */
-  /* <Title>                                                               */
-  /*    TrueType Tables                                                    */
-  /*                                                                       */
-  /* <Abstract>                                                            */
-  /*    TrueType-specific table types and functions.                       */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This section contains the definition of TrueType-specific tables   */
-  /*    as well as some routines used to access and process them.          */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_Header                                                          */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure used to model a TrueType font header table.  All       */
-  /*    fields follow the TrueType specification.                          */
-  /*                                                                       */
-  typedef struct  TT_Header_
-  {
-    FT_Fixed   Table_Version;
-    FT_Fixed   Font_Revision;
-
-    FT_Long    CheckSum_Adjust;
-    FT_Long    Magic_Number;
-
-    FT_UShort  Flags;
-    FT_UShort  Units_Per_EM;
-
-    FT_Long    Created [2];
-    FT_Long    Modified[2];
-
-    FT_Short   xMin;
-    FT_Short   yMin;
-    FT_Short   xMax;
-    FT_Short   yMax;
-
-    FT_UShort  Mac_Style;
-    FT_UShort  Lowest_Rec_PPEM;
-
-    FT_Short   Font_Direction;
-    FT_Short   Index_To_Loc_Format;
-    FT_Short   Glyph_Data_Format;
-
-  } TT_Header;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_HoriHeader                                                      */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure used to model a TrueType horizontal header, the `hhea' */
-  /*    table, as well as the corresponding horizontal metrics table,      */
-  /*    i.e., the `hmtx' table.                                            */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    Version                :: The table version.                       */
-  /*                                                                       */
-  /*    Ascender               :: The font's ascender, i.e., the distance  */
-  /*                              from the baseline to the top-most of all */
-  /*                              glyph points found in the font.          */
-  /*                                                                       */
-  /*                              This value is invalid in many fonts, as  */
-  /*                              it is usually set by the font designer,  */
-  /*                              and often reflects only a portion of the */
-  /*                              glyphs found in the font (maybe ASCII).  */
-  /*                                                                       */
-  /*                              You should use the `sTypoAscender' field */
-  /*                              of the OS/2 table instead if you want    */
-  /*                              the correct one.                         */
-  /*                                                                       */
-  /*    Descender              :: The font's descender, i.e., the distance */
-  /*                              from the baseline to the bottom-most of  */
-  /*                              all glyph points found in the font.  It  */
-  /*                              is negative.                             */
-  /*                                                                       */
-  /*                              This value is invalid in many fonts, as  */
-  /*                              it is usually set by the font designer,  */
-  /*                              and often reflects only a portion of the */
-  /*                              glyphs found in the font (maybe ASCII).  */
-  /*                                                                       */
-  /*                              You should use the `sTypoDescender'      */
-  /*                              field of the OS/2 table instead if you   */
-  /*                              want the correct one.                    */
-  /*                                                                       */
-  /*    Line_Gap               :: The font's line gap, i.e., the distance  */
-  /*                              to add to the ascender and descender to  */
-  /*                              get the BTB, i.e., the                   */
-  /*                              baseline-to-baseline distance for the    */
-  /*                              font.                                    */
-  /*                                                                       */
-  /*    advance_Width_Max      :: This field is the maximum of all advance */
-  /*                              widths found in the font.  It can be     */
-  /*                              used to compute the maximum width of an  */
-  /*                              arbitrary string of text.                */
-  /*                                                                       */
-  /*    min_Left_Side_Bearing  :: The minimum left side bearing of all     */
-  /*                              glyphs within the font.                  */
-  /*                                                                       */
-  /*    min_Right_Side_Bearing :: The minimum right side bearing of all    */
-  /*                              glyphs within the font.                  */
-  /*                                                                       */
-  /*    xMax_Extent            :: The maximum horizontal extent (i.e., the */
-  /*                              `width' of a glyph's bounding box) for   */
-  /*                              all glyphs in the font.                  */
-  /*                                                                       */
-  /*    caret_Slope_Rise       :: The rise coefficient of the cursor's     */
-  /*                              slope of the cursor (slope=rise/run).    */
-  /*                                                                       */
-  /*    caret_Slope_Run        :: The run coefficient of the cursor's      */
-  /*                              slope.                                   */
-  /*                                                                       */
-  /*    Reserved               :: 10 reserved bytes.                       */
-  /*                                                                       */
-  /*    metric_Data_Format     :: Always 0.                                */
-  /*                                                                       */
-  /*    number_Of_HMetrics     :: Number of HMetrics entries in the `hmtx' */
-  /*                              table -- this value can be smaller than  */
-  /*                              the total number of glyphs in the font.  */
-  /*                                                                       */
-  /*    long_metrics           :: A pointer into the `hmtx' table.         */
-  /*                                                                       */
-  /*    short_metrics          :: A pointer into the `hmtx' table.         */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should   */
-  /*               be identical except for the names of their fields which */
-  /*               are different.                                          */
-  /*                                                                       */
-  /*               This ensures that a single function in the `ttload'     */
-  /*               module is able to read both the horizontal and vertical */
-  /*               headers.                                                */
-  /*                                                                       */
-  typedef struct  TT_HoriHeader_
-  {
-    FT_Fixed   Version;
-    FT_Short   Ascender;
-    FT_Short   Descender;
-    FT_Short   Line_Gap;
-
-    FT_UShort  advance_Width_Max;      /* advance width maximum */
-
-    FT_Short   min_Left_Side_Bearing;  /* minimum left-sb       */
-    FT_Short   min_Right_Side_Bearing; /* minimum right-sb      */
-    FT_Short   xMax_Extent;            /* xmax extents          */
-    FT_Short   caret_Slope_Rise;
-    FT_Short   caret_Slope_Run;
-    FT_Short   caret_Offset;
-
-    FT_Short   Reserved[4];
-
-    FT_Short   metric_Data_Format;
-    FT_UShort  number_Of_HMetrics;
-
-    /* The following fields are not defined by the TrueType specification */
-    /* but they are used to connect the metrics header to the relevant    */
-    /* `HMTX' table.                                                      */
-
-    void*      long_metrics;
-    void*      short_metrics;
-
-  } TT_HoriHeader;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_VertHeader                                                      */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure used to model a TrueType vertical header, the `vhea'   */
-  /*    table, as well as the corresponding vertical metrics table, i.e.,  */
-  /*    the `vmtx' table.                                                  */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    Version                 :: The table version.                      */
-  /*                                                                       */
-  /*    Ascender                :: The font's ascender, i.e., the distance */
-  /*                               from the baseline to the top-most of    */
-  /*                               all glyph points found in the font.     */
-  /*                                                                       */
-  /*                               This value is invalid in many fonts, as */
-  /*                               it is usually set by the font designer, */
-  /*                               and often reflects only a portion of    */
-  /*                               the glyphs found in the font (maybe     */
-  /*                               ASCII).                                 */
-  /*                                                                       */
-  /*                               You should use the `sTypoAscender'      */
-  /*                               field of the OS/2 table instead if you  */
-  /*                               want the correct one.                   */
-  /*                                                                       */
-  /*    Descender               :: The font's descender, i.e., the         */
-  /*                               distance from the baseline to the       */
-  /*                               bottom-most of all glyph points found   */
-  /*                               in the font.  It is negative.           */
-  /*                                                                       */
-  /*                               This value is invalid in many fonts, as */
-  /*                               it is usually set by the font designer, */
-  /*                               and often reflects only a portion of    */
-  /*                               the glyphs found in the font (maybe     */
-  /*                               ASCII).                                 */
-  /*                                                                       */
-  /*                               You should use the `sTypoDescender'     */
-  /*                               field of the OS/2 table instead if you  */
-  /*                               want the correct one.                   */
-  /*                                                                       */
-  /*    Line_Gap                :: The font's line gap, i.e., the distance */
-  /*                               to add to the ascender and descender to */
-  /*                               get the BTB, i.e., the                  */
-  /*                               baseline-to-baseline distance for the   */
-  /*                               font.                                   */
-  /*                                                                       */
-  /*    advance_Height_Max      :: This field is the maximum of all        */
-  /*                               advance heights found in the font.  It  */
-  /*                               can be used to compute the maximum      */
-  /*                               height of an arbitrary string of text.  */
-  /*                                                                       */
-  /*    min_Top_Side_Bearing    :: The minimum top side bearing of all     */
-  /*                               glyphs within the font.                 */
-  /*                                                                       */
-  /*    min_Bottom_Side_Bearing :: The minimum bottom side bearing of all  */
-  /*                               glyphs within the font.                 */
-  /*                                                                       */
-  /*    yMax_Extent             :: The maximum vertical extent (i.e., the  */
-  /*                               `height' of a glyph's bounding box) for */
-  /*                               all glyphs in the font.                 */
-  /*                                                                       */
-  /*    caret_Slope_Rise        :: The rise coefficient of the cursor's    */
-  /*                               slope of the cursor (slope=rise/run).   */
-  /*                                                                       */
-  /*    caret_Slope_Run         :: The run coefficient of the cursor's     */
-  /*                               slope.                                  */
-  /*                                                                       */
-  /*    caret_Offset            :: The cursor's offset for slanted fonts.  */
-  /*                               This value is `reserved' in vmtx        */
-  /*                               version 1.0.                            */
-  /*                                                                       */
-  /*    Reserved                :: 8 reserved bytes.                       */
-  /*                                                                       */
-  /*    metric_Data_Format      :: Always 0.                               */
-  /*                                                                       */
-  /*    number_Of_HMetrics      :: Number of VMetrics entries in the       */
-  /*                               `vmtx' table -- this value can be       */
-  /*                               smaller than the total number of glyphs */
-  /*                               in the font.                            */
-  /*                                                                       */
-  /*    long_metrics           :: A pointer into the `vmtx' table.         */
-  /*                                                                       */
-  /*    short_metrics          :: A pointer into the `vmtx' table.         */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should   */
-  /*               be identical except for the names of their fields which */
-  /*               are different.                                          */
-  /*                                                                       */
-  /*               This ensures that a single function in the `ttload'     */
-  /*               module is able to read both the horizontal and vertical */
-  /*               headers.                                                */
-  /*                                                                       */
-  typedef struct  TT_VertHeader_
-  {
-    FT_Fixed   Version;
-    FT_Short   Ascender;
-    FT_Short   Descender;
-    FT_Short   Line_Gap;
-
-    FT_UShort  advance_Height_Max;      /* advance height maximum */
-
-    FT_Short   min_Top_Side_Bearing;    /* minimum left-sb or top-sb       */
-    FT_Short   min_Bottom_Side_Bearing; /* minimum right-sb or bottom-sb   */
-    FT_Short   yMax_Extent;             /* xmax or ymax extents            */
-    FT_Short   caret_Slope_Rise;
-    FT_Short   caret_Slope_Run;
-    FT_Short   caret_Offset;
-
-    FT_Short   Reserved[4];
-
-    FT_Short   metric_Data_Format;
-    FT_UShort  number_Of_VMetrics;
-
-    /* The following fields are not defined by the TrueType specification */
-    /* but they're used to connect the metrics header to the relevant     */
-    /* `HMTX' or `VMTX' table.                                            */
-
-    void*      long_metrics;
-    void*      short_metrics;
-
-  } TT_VertHeader;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_OS2                                                             */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure used to model a TrueType OS/2 table. This is the long  */
-  /*    table version.  All fields comply to the TrueType specification.   */
-  /*                                                                       */
-  /*    Note that we now support old Mac fonts which do not include an     */
-  /*    OS/2 table.  In this case, the `version' field is always set to    */
-  /*    0xFFFF.                                                            */
-  /*                                                                       */
-  typedef struct  TT_OS2_
-  {
-    FT_UShort  version;                /* 0x0001 - more or 0xFFFF */
-    FT_Short   xAvgCharWidth;
-    FT_UShort  usWeightClass;
-    FT_UShort  usWidthClass;
-    FT_Short   fsType;
-    FT_Short   ySubscriptXSize;
-    FT_Short   ySubscriptYSize;
-    FT_Short   ySubscriptXOffset;
-    FT_Short   ySubscriptYOffset;
-    FT_Short   ySuperscriptXSize;
-    FT_Short   ySuperscriptYSize;
-    FT_Short   ySuperscriptXOffset;
-    FT_Short   ySuperscriptYOffset;
-    FT_Short   yStrikeoutSize;
-    FT_Short   yStrikeoutPosition;
-    FT_Short   sFamilyClass;
-
-    FT_Byte    panose[10];
-
-    FT_ULong   ulUnicodeRange1;        /* Bits 0-31   */
-    FT_ULong   ulUnicodeRange2;        /* Bits 32-63  */
-    FT_ULong   ulUnicodeRange3;        /* Bits 64-95  */
-    FT_ULong   ulUnicodeRange4;        /* Bits 96-127 */
-
-    FT_Char    achVendID[4];
-
-    FT_UShort  fsSelection;
-    FT_UShort  usFirstCharIndex;
-    FT_UShort  usLastCharIndex;
-    FT_Short   sTypoAscender;
-    FT_Short   sTypoDescender;
-    FT_Short   sTypoLineGap;
-    FT_UShort  usWinAscent;
-    FT_UShort  usWinDescent;
-
-    /* only version 1 tables: */
-
-    FT_ULong   ulCodePageRange1;       /* Bits 0-31   */
-    FT_ULong   ulCodePageRange2;       /* Bits 32-63  */
-
-    /* only version 2 tables: */
-
-    FT_Short   sxHeight;
-    FT_Short   sCapHeight;
-    FT_UShort  usDefaultChar;
-    FT_UShort  usBreakChar;
-    FT_UShort  usMaxContext;
-
-  } TT_OS2;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_Postscript                                                      */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure used to model a TrueType Postscript table.  All fields */
-  /*    comply to the TrueType table.  This structure does not reference   */
-  /*    the Postscript glyph names, which can be nevertheless accessed     */
-  /*    with the `ttpost' module.                                          */
-  /*                                                                       */
-  typedef struct  TT_Postscript_
-  {
-    FT_Fixed  FormatType;
-    FT_Fixed  italicAngle;
-    FT_Short  underlinePosition;
-    FT_Short  underlineThickness;
-    FT_ULong  isFixedPitch;
-    FT_ULong  minMemType42;
-    FT_ULong  maxMemType42;
-    FT_ULong  minMemType1;
-    FT_ULong  maxMemType1;
-
-    /* Glyph names follow in the file, but we don't   */
-    /* load them by default.  See the ttpost.c file.  */
-
-  } TT_Postscript;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_PCLT                                                            */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure used to model a TrueType PCLT table.  All fields       */
-  /*    comply to the TrueType table.                                      */
-  /*                                                                       */
-  typedef struct  TT_PCLT_
-  {
-    FT_Fixed   Version;
-    FT_ULong   FontNumber;
-    FT_UShort  Pitch;
-    FT_UShort  xHeight;
-    FT_UShort  Style;
-    FT_UShort  TypeFamily;
-    FT_UShort  CapHeight;
-    FT_UShort  SymbolSet;
-    FT_Char    TypeFace[16];
-    FT_Char    CharacterComplement[8];
-    FT_Char    FileName[6];
-    FT_Char    StrokeWeight;
-    FT_Char    WidthType;
-    FT_Byte    SerifStyle;
-    FT_Byte    Reserved;
-
-  } TT_PCLT;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_MaxProfile                                                      */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    The maximum profile is a table containing many max values which    */
-  /*    can be used to pre-allocate arrays.  This ensures that no memory   */
-  /*    allocation occurs during a glyph load.                             */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    version               :: The version number.                       */
-  /*                                                                       */
-  /*    numGlyphs             :: The number of glyphs in this TrueType     */
-  /*                             font.                                     */
-  /*                                                                       */
-  /*    maxPoints             :: The maximum number of points in a         */
-  /*                             non-composite TrueType glyph.  See also   */
-  /*                             the structure element                     */
-  /*                             `maxCompositePoints'.                     */
-  /*                                                                       */
-  /*    maxContours           :: The maximum number of contours in a       */
-  /*                             non-composite TrueType glyph.  See also   */
-  /*                             the structure element                     */
-  /*                             `maxCompositeContours'.                   */
-  /*                                                                       */
-  /*    maxCompositePoints    :: The maximum number of points in a         */
-  /*                             composite TrueType glyph.  See also the   */
-  /*                             structure element `maxPoints'.            */
-  /*                                                                       */
-  /*    maxCompositeContours  :: The maximum number of contours in a       */
-  /*                             composite TrueType glyph.  See also the   */
-  /*                             structure element `maxContours'.          */
-  /*                                                                       */
-  /*    maxZones              :: The maximum number of zones used for      */
-  /*                             glyph hinting.                            */
-  /*                                                                       */
-  /*    maxTwilightPoints     :: The maximum number of points in the       */
-  /*                             twilight zone used for glyph hinting.     */
-  /*                                                                       */
-  /*    maxStorage            :: The maximum number of elements in the     */
-  /*                             storage area used for glyph hinting.      */
-  /*                                                                       */
-  /*    maxFunctionDefs       :: The maximum number of function            */
-  /*                             definitions in the TrueType bytecode for  */
-  /*                             this font.                                */
-  /*                                                                       */
-  /*    maxInstructionDefs    :: The maximum number of instruction         */
-  /*                             definitions in the TrueType bytecode for  */
-  /*                             this font.                                */
-  /*                                                                       */
-  /*    maxStackElements      :: The maximum number of stack elements used */
-  /*                             during bytecode interpretation.           */
-  /*                                                                       */
-  /*    maxSizeOfInstructions :: The maximum number of TrueType opcodes    */
-  /*                             used for glyph hinting.                   */
-  /*                                                                       */
-  /*    maxComponentElements  :: An obscure value related to composite     */
-  /*                             glyphs definitions.                       */
-  /*                                                                       */
-  /*    maxComponentDepth     :: An obscure value related to composite     */
-  /*                             glyphs definitions.  Probably the maximum */
-  /*                             number of simple glyphs in a composite.   */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    This structure is only used during font loading.                   */
-  /*                                                                       */
-  typedef struct  TT_MaxProfile_
-  {
-    FT_Fixed   version;
-    FT_UShort  numGlyphs;
-    FT_UShort  maxPoints;
-    FT_UShort  maxContours;
-    FT_UShort  maxCompositePoints;
-    FT_UShort  maxCompositeContours;
-    FT_UShort  maxZones;
-    FT_UShort  maxTwilightPoints;
-    FT_UShort  maxStorage;
-    FT_UShort  maxFunctionDefs;
-    FT_UShort  maxInstructionDefs;
-    FT_UShort  maxStackElements;
-    FT_UShort  maxSizeOfInstructions;
-    FT_UShort  maxComponentElements;
-    FT_UShort  maxComponentDepth;
-
-  } TT_MaxProfile;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Enum>                                                                */
-  /*    FT_Sfnt_Tag                                                        */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    An enumeration used to specify the index of an SFNT table.         */
-  /*    Used in the @FT_Get_Sfnt_Table API function.                       */
-  /*                                                                       */
-  typedef enum
-  {
-    ft_sfnt_head = 0,
-    ft_sfnt_maxp = 1,
-    ft_sfnt_os2  = 2,
-    ft_sfnt_hhea = 3,
-    ft_sfnt_vhea = 4,
-    ft_sfnt_post = 5,
-    ft_sfnt_pclt = 6,
-
-    sfnt_max   /* internal end mark */
-
-  } FT_Sfnt_Tag;
-
-  /* */
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    FT_Get_Sfnt_Table                                                  */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Returns a pointer to a given SFNT table within a face.             */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    face :: A handle to the source.                                    */
-  /*                                                                       */
-  /*    tag  :: The index of the SFNT table.                               */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    A type-less pointer to the table.  This will be 0 in case of       */
-  /*    error, or if the corresponding table was not found *OR* loaded     */
-  /*    from the file.                                                     */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    The table is owned by the face object and disappears with it.      */
-  /*                                                                       */
-  /*    This function is only useful to access SFNT tables that are loaded */
-  /*    by the sfnt/truetype/opentype drivers.  See @FT_Sfnt_Tag for a     */
-  /*    list.                                                              */
-  /*                                                                       */
-  FT_EXPORT( void* )
-  FT_Get_Sfnt_Table( FT_Face      face,
-                     FT_Sfnt_Tag  tag );
-
-
- /**************************************************************************
-  *
-  * <Function>
-  *    FT_Load_Sfnt_Table
-  *
-  * <Description>
-  *   Loads any font table into client memory.
-  *
-  * <Input>
-  *   face   :: A handle to the source face.
-  *
-  *   tag    :: The 4-byte tag of the table to load.  Use the value 0 if
-  *             you want to access the whole font file.  Otherwise, you can
-  *             use one of the definitions found in the @FT_TRUETYPE_TAGS_H
-  *             file, or forge a new one with @FT_MAKE_TAG.
-  *              
-  *   offset :: The starting offset in the table (or file if tag == 0).
-  *
-  * <Output>
-  *   buffer :: The target buffer address.  The client must ensure that
-  *             the memory array is big enough to hold the data.
-  *
-  * <InOut>
-  *   length :: If the `length' parameter is NULL, then try to load the whole
-  *             table.  Return an error code if it fails.
-  *
-  *             Else, if `*length' is 0, exit immediately while returning
-  *             the table's (or file) full size in it.
-  *
-  *             Else the number of bytes to read from the table or file,
-  *             from the starting offset.
-  *
-  * <Return>
-  *   FreeType error code.  0 means success.
-  *
-  * <Note>
-  *   If you need to determine the table's length you should first call this
-  *   function with `*length' set to 0, as in the following example:
-  *
-  *   {
-  *     FT_ULong  length = 0;
-  *
-  *
-  *     error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &length );
-  *     if ( error ) { ... table does not exist ... }
-  *
-  *     buffer = malloc( length );
-  *     if ( buffer == NULL ) { ... not enough memory ... }
-  *
-  *     error = FT_Load_Sfnt_Table( face,tag, 0, buffer, &length );
-  *     if ( error ) { ... could not load table ... }
-  *   }
-  */
-  FT_EXPORT( FT_Error )
-  FT_Load_Sfnt_Table( FT_Face    face,
-                      FT_ULong   tag,
-                      FT_Long    offset,
-                      FT_Byte*   buffer,
-                      FT_ULong*  length );
-
-  /* */
-
-
-FT_END_HEADER
-
-#endif /* __TTTABLES_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/freetype/tttags.h b/extra_lib/include/freetype/freetype/tttags.h
deleted file mode 100644
index ac64758..0000000
--- a/extra_lib/include/freetype/freetype/tttags.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  tttags.h                                                               */
-/*                                                                         */
-/*    Tags for TrueType tables (specification only).                       */
-/*                                                                         */
-/*  Copyright 1996-2001 by                                                 */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __TTAGS_H__
-#define __TTAGS_H__
-
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-#ifdef FREETYPE_H
-#error "freetype.h of FreeType 1 has been loaded!"
-#error "Please fix the directory search order for header files"
-#error "so that freetype.h of FreeType 2 is found first."
-#endif
-
-
-FT_BEGIN_HEADER
-
-
-#define TTAG_cmap  FT_MAKE_TAG( 'c', 'm', 'a', 'p' )
-#define TTAG_cvt   FT_MAKE_TAG( 'c', 'v', 't', ' ' )
-#define TTAG_CFF   FT_MAKE_TAG( 'C', 'F', 'F', ' ' )
-#define TTAG_DSIG  FT_MAKE_TAG( 'D', 'S', 'I', 'G' )
-#define TTAG_bhed  FT_MAKE_TAG( 'b', 'h', 'e', 'd' )
-#define TTAG_bdat  FT_MAKE_TAG( 'b', 'd', 'a', 't' )
-#define TTAG_bloc  FT_MAKE_TAG( 'b', 'l', 'o', 'c' )
-#define TTAG_EBDT  FT_MAKE_TAG( 'E', 'B', 'D', 'T' )
-#define TTAG_EBLC  FT_MAKE_TAG( 'E', 'B', 'L', 'C' )
-#define TTAG_EBSC  FT_MAKE_TAG( 'E', 'B', 'S', 'C' )
-#define TTAG_fpgm  FT_MAKE_TAG( 'f', 'p', 'g', 'm' )
-#define TTAG_fvar  FT_MAKE_TAG( 'f', 'v', 'a', 'r' )
-#define TTAG_gasp  FT_MAKE_TAG( 'g', 'a', 's', 'p' )
-#define TTAG_glyf  FT_MAKE_TAG( 'g', 'l', 'y', 'f' )
-#define TTAG_GSUB  FT_MAKE_TAG( 'G', 'S', 'U', 'B' )
-#define TTAG_hdmx  FT_MAKE_TAG( 'h', 'd', 'm', 'x' )
-#define TTAG_head  FT_MAKE_TAG( 'h', 'e', 'a', 'd' )
-#define TTAG_hhea  FT_MAKE_TAG( 'h', 'h', 'e', 'a' )
-#define TTAG_hmtx  FT_MAKE_TAG( 'h', 'm', 't', 'x' )
-#define TTAG_kern  FT_MAKE_TAG( 'k', 'e', 'r', 'n' )
-#define TTAG_loca  FT_MAKE_TAG( 'l', 'o', 'c', 'a' )
-#define TTAG_LTSH  FT_MAKE_TAG( 'L', 'T', 'S', 'H' )
-#define TTAG_maxp  FT_MAKE_TAG( 'm', 'a', 'x', 'p' )
-#define TTAG_MMSD  FT_MAKE_TAG( 'M', 'M', 'S', 'D' )
-#define TTAG_MMFX  FT_MAKE_TAG( 'M', 'M', 'F', 'X' )
-#define TTAG_name  FT_MAKE_TAG( 'n', 'a', 'm', 'e' )
-#define TTAG_OS2   FT_MAKE_TAG( 'O', 'S', '/', '2' )
-#define TTAG_OTTO  FT_MAKE_TAG( 'O', 'T', 'T', 'O' )
-#define TTAG_PCLT  FT_MAKE_TAG( 'P', 'C', 'L', 'T' )
-#define TTAG_post  FT_MAKE_TAG( 'p', 'o', 's', 't' )
-#define TTAG_prep  FT_MAKE_TAG( 'p', 'r', 'e', 'p' )
-#define TTAG_true  FT_MAKE_TAG( 't', 'r', 'u', 'e' )
-#define TTAG_ttc   FT_MAKE_TAG( 't', 't', 'c', ' ' )
-#define TTAG_ttcf  FT_MAKE_TAG( 't', 't', 'c', 'f' )
-#define TTAG_VDMX  FT_MAKE_TAG( 'V', 'D', 'M', 'X' )
-#define TTAG_vhea  FT_MAKE_TAG( 'v', 'h', 'e', 'a' )
-#define TTAG_vmtx  FT_MAKE_TAG( 'v', 'm', 't', 'x' )
-
-
-FT_END_HEADER
-
-#endif /* __TTAGS_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/freetype/ft2build.h b/extra_lib/include/freetype/ft2build.h
deleted file mode 100644
index 2ecfdea..0000000
--- a/extra_lib/include/freetype/ft2build.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ft2build.h                                                             */
-/*                                                                         */
-/*    FreeType 2 build and setup macros.                                   */
-/*    (Generic version)                                                    */
-/*                                                                         */
-/*  Copyright 1996-2001 by                                                 */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* This file corresponds to the default "ft2build.h" file for            */
-  /* FreeType 2.  It uses the "freetype" include root.                     */
-  /*                                                                       */
-  /* Note that specific platforms might use a different configuration.     */
-  /* See builds/unix/ft2unix.h for an example.                             */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-#ifndef __FT2_BUILD_GENERIC_H__
-#define __FT2_BUILD_GENERIC_H__
-
-#include <freetype/config/ftheader.h>
-
-#endif /* __FT2_BUILD_GENERIC_H__ */
-
-
-/* END */
diff --git a/extra_lib/include/jpeg/jconfig.h b/extra_lib/include/jpeg/jconfig.h
deleted file mode 100644
index 1ca60d8..0000000
--- a/extra_lib/include/jpeg/jconfig.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* jconfig.h.  Generated automatically by configure.  */
-/* jconfig.cfg --- source file edited by configure script */
-/* see jconfig.doc for explanations */
-
-#ifdef _WIN32_WCE
-#define HAVE_PROTOTYPES
-#define HAVE_UNSIGNED_CHAR
-#define HAVE_UNSIGNED_SHORT
-#define HAVE_STDDEF_H
-#define HAVE_STDLIB_H
-
-#ifndef __RPCNDR_H__
-typedef unsigned char boolean;
-#endif
-#define HAVE_BOOLEAN		/* prevent jmorecfg.h from redefining it */
-#else
-#undef HAVE_PROTOTYPES
-#undef HAVE_UNSIGNED_CHAR
-#undef HAVE_UNSIGNED_SHORT
-#undef HAVE_STDDEF_H
-#undef HAVE_STDLIB_H
-#endif
-
-#undef void
-#undef const
-#undef CHAR_IS_UNSIGNED
-#undef NEED_BSD_STRINGS
-#undef NEED_SYS_TYPES_H
-#undef NEED_FAR_POINTERS
-#undef NEED_SHORT_EXTERNAL_NAMES
-/* Define this if you get warnings about undefined structures. */
-#undef INCOMPLETE_TYPES_BROKEN
-
-
-#ifdef JPEG_INTERNALS
-
-#undef RIGHT_SHIFT_IS_UNSIGNED
-#undef INLINE
-/* These are for configuring the JPEG memory manager. */
-#undef DEFAULT_MAX_MEM
-#undef NO_MKTEMP
-
-#ifdef __MINGW32__ 	 
-#define INLINE __inline__
-#endif //__MINGW32__ 	 
-
-#endif /* JPEG_INTERNALS */
-
-#ifdef JPEG_CJPEG_DJPEG
-
-#define BMP_SUPPORTED		/* BMP image file format */
-#define GIF_SUPPORTED		/* GIF image file format */
-#define PPM_SUPPORTED		/* PBMPLUS PPM/PGM image file format */
-#undef RLE_SUPPORTED		/* Utah RLE image file format */
-#define TARGA_SUPPORTED		/* Targa image file format */
-
-#undef TWO_FILE_COMMANDLINE
-#undef NEED_SIGNAL_CATCHER
-#undef DONT_USE_B_MODE
-
-/* Define this if you want percent-done progress reports from cjpeg/djpeg. */
-#undef PROGRESS_REPORT
-
-#endif /* JPEG_CJPEG_DJPEG */
diff --git a/extra_lib/include/jpeg/jmorecfg.h b/extra_lib/include/jpeg/jmorecfg.h
deleted file mode 100644
index 96b501a..0000000
--- a/extra_lib/include/jpeg/jmorecfg.h
+++ /dev/null
@@ -1,368 +0,0 @@
-/*
- * jmorecfg.h
- *
- * Copyright (C) 1991-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains additional configuration options that customize the
- * JPEG software for special applications or support machine-dependent
- * optimizations.  Most users will not need to touch this file.
- */
-
-
-/*
- * Define BITS_IN_JSAMPLE as either
- *   8   for 8-bit sample values (the usual setting)
- *   12  for 12-bit sample values
- * Only 8 and 12 are legal data precisions for lossy JPEG according to the
- * JPEG standard, and the IJG code does not support anything else!
- * We do not support run-time selection of data precision, sorry.
- */
-
-#define BITS_IN_JSAMPLE  8	/* use 8 or 12 */
-
-
-/*
- * Maximum number of components (color channels) allowed in JPEG image.
- * To meet the letter of the JPEG spec, set this to 255.  However, darn
- * few applications need more than 4 channels (maybe 5 for CMYK + alpha
- * mask).  We recommend 10 as a reasonable compromise; use 4 if you are
- * really short on memory.  (Each allowed component costs a hundred or so
- * bytes of storage, whether actually used in an image or not.)
- */
-
-#define MAX_COMPONENTS  10	/* maximum number of image components */
-
-
-/*
- * Basic data types.
- * You may need to change these if you have a machine with unusual data
- * type sizes; for example, "char" not 8 bits, "short" not 16 bits,
- * or "long" not 32 bits.  We don't care whether "int" is 16 or 32 bits,
- * but it had better be at least 16.
- */
-
-/* Representation of a single sample (pixel element value).
- * We frequently allocate large arrays of these, so it's important to keep
- * them small.  But if you have memory to burn and access to char or short
- * arrays is very slow on your hardware, you might want to change these.
- */
-
-#if BITS_IN_JSAMPLE == 8
-/* JSAMPLE should be the smallest type that will hold the values 0..255.
- * You can use a signed char by having GETJSAMPLE mask it with 0xFF.
- */
-
-#ifdef HAVE_UNSIGNED_CHAR
-
-typedef unsigned char JSAMPLE;
-#define GETJSAMPLE(value)  ((int) (value))
-
-#else /* not HAVE_UNSIGNED_CHAR */
-
-typedef char JSAMPLE;
-#ifdef CHAR_IS_UNSIGNED
-#define GETJSAMPLE(value)  ((int) (value))
-#else
-#define GETJSAMPLE(value)  ((int) (value) & 0xFF)
-#endif /* CHAR_IS_UNSIGNED */
-
-#endif /* HAVE_UNSIGNED_CHAR */
-
-#define MAXJSAMPLE	255
-#define CENTERJSAMPLE	128
-
-#endif /* BITS_IN_JSAMPLE == 8 */
-
-
-#if BITS_IN_JSAMPLE == 12
-/* JSAMPLE should be the smallest type that will hold the values 0..4095.
- * On nearly all machines "short" will do nicely.
- */
-
-typedef short JSAMPLE;
-#define GETJSAMPLE(value)  ((int) (value))
-
-#define MAXJSAMPLE	4095
-#define CENTERJSAMPLE	2048
-
-#endif /* BITS_IN_JSAMPLE == 12 */
-
-
-/* Representation of a DCT frequency coefficient.
- * This should be a signed value of at least 16 bits; "short" is usually OK.
- * Again, we allocate large arrays of these, but you can change to int
- * if you have memory to burn and "short" is really slow.
- */
-
-typedef short JCOEF;
-
-
-/* Compressed datastreams are represented as arrays of JOCTET.
- * These must be EXACTLY 8 bits wide, at least once they are written to
- * external storage.  Note that when using the stdio data source/destination
- * managers, this is also the data type passed to fread/fwrite.
- */
-
-#ifdef HAVE_UNSIGNED_CHAR
-
-typedef unsigned char JOCTET;
-#define GETJOCTET(value)  (value)
-
-#else /* not HAVE_UNSIGNED_CHAR */
-
-typedef char JOCTET;
-#ifdef CHAR_IS_UNSIGNED
-#define GETJOCTET(value)  (value)
-#else
-#define GETJOCTET(value)  ((value) & 0xFF)
-#endif /* CHAR_IS_UNSIGNED */
-
-#endif /* HAVE_UNSIGNED_CHAR */
-
-
-/* These typedefs are used for various table entries and so forth.
- * They must be at least as wide as specified; but making them too big
- * won't cost a huge amount of memory, so we don't provide special
- * extraction code like we did for JSAMPLE.  (In other words, these
- * typedefs live at a different point on the speed/space tradeoff curve.)
- */
-
-/* UINT8 must hold at least the values 0..255. */
-
-#ifdef HAVE_UNSIGNED_CHAR
-typedef unsigned char UINT8;
-#else /* not HAVE_UNSIGNED_CHAR */
-#ifdef CHAR_IS_UNSIGNED
-typedef char UINT8;
-#else /* not CHAR_IS_UNSIGNED */
-typedef short UINT8;
-#endif /* CHAR_IS_UNSIGNED */
-#endif /* HAVE_UNSIGNED_CHAR */
-
-/* UINT16 must hold at least the values 0..65535. */
-
-#ifdef HAVE_UNSIGNED_SHORT
-typedef unsigned short UINT16;
-#else /* not HAVE_UNSIGNED_SHORT */
-typedef unsigned int UINT16;
-#endif /* HAVE_UNSIGNED_SHORT */
-
-/* INT16 must hold at least the values -32768..32767. */
-
-#ifndef XMD_H			/* X11/xmd.h correctly defines INT16 */
-typedef short INT16;
-#endif
-
-/* INT32 must hold at least signed 32-bit values. */
-
-#ifndef XMD_H			/* X11/xmd.h correctly defines INT32 */
-#ifndef INT32
-typedef long INT32;
-#endif
-#endif
-
-/* Datatype used for image dimensions.  The JPEG standard only supports
- * images up to 64K*64K due to 16-bit fields in SOF markers.  Therefore
- * "unsigned int" is sufficient on all machines.  However, if you need to
- * handle larger images and you don't mind deviating from the spec, you
- * can change this datatype.
- */
-
-typedef unsigned int JDIMENSION;
-
-#define JPEG_MAX_DIMENSION  65500L  /* a tad under 64K to prevent overflows */
-
-
-/* These macros are used in all function definitions and extern declarations.
- * You could modify them if you need to change function linkage conventions;
- * in particular, you'll need to do that to make the library a Windows DLL.
- * Another application is to make all functions global for use with debuggers
- * or code profilers that require it.
- */
-
-/* a function called through method pointers: */
-#define METHODDEF(type)		static type
-/* a function used only in its module: */
-#define LOCAL(type)		static type
-/* a function referenced thru EXTERNs: */
-#define GLOBAL(type)		type
-/* a reference to a GLOBAL function: */
-#define EXTERN(type)		extern type
-
-
-/* This macro is used to declare a "method", that is, a function pointer.
- * We want to supply prototype parameters if the compiler can cope.
- * Note that the arglist parameter must be parenthesized!
- * Again, you can customize this if you need special linkage keywords.
- */
-
-#ifdef HAVE_PROTOTYPES
-#define JMETHOD(type,methodname,arglist)  type (*methodname) arglist
-#else
-#define JMETHOD(type,methodname,arglist)  type (*methodname) ()
-#endif
-
-
-/* Here is the pseudo-keyword for declaring pointers that must be "far"
- * on 80x86 machines.  Most of the specialized coding for 80x86 is handled
- * by just saying "FAR *" where such a pointer is needed.  In a few places
- * explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol.
- */
-
-#ifdef NEED_FAR_POINTERS
-#define FAR  far
-#else
-#ifdef FAR
-#undef FAR
-#endif
-#define FAR
-#endif
-
-
-/*
- * On a few systems, type boolean and/or its values FALSE, TRUE may appear
- * in standard header files.  Or you may have conflicts with application-
- * specific header files that you want to include together with these files.
- * Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
- */
-
-#ifndef HAVE_BOOLEAN
-typedef int boolean;
-#endif
-#ifndef FALSE			/* in case these macros already exist */
-#define FALSE	0		/* values of boolean */
-#endif
-#ifndef TRUE
-#define TRUE	1
-#endif
-
-
-/*
- * The remaining options affect code selection within the JPEG library,
- * but they don't need to be visible to most applications using the library.
- * To minimize application namespace pollution, the symbols won't be
- * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined.
- */
-
-#ifdef JPEG_INTERNALS
-#define JPEG_INTERNAL_OPTIONS
-#endif
-
-#ifdef JPEG_INTERNAL_OPTIONS
-
-
-/*
- * These defines indicate whether to include various optional functions.
- * Undefining some of these symbols will produce a smaller but less capable
- * library.  Note that you can leave certain source files out of the
- * compilation/linking process if you've #undef'd the corresponding symbols.
- * (You may HAVE to do that if your compiler doesn't like null source files.)
- */
-
-/* Arithmetic coding is unsupported for legal reasons.  Complaints to IBM. */
-
-/* Capability options common to encoder and decoder: */
-
-#define DCT_ISLOW_SUPPORTED	/* slow but accurate integer algorithm */
-#define DCT_IFAST_SUPPORTED	/* faster, less accurate integer method */
-#define DCT_FLOAT_SUPPORTED	/* floating-point: accurate, fast on fast HW */
-
-/* Encoder capability options: */
-
-#undef  C_ARITH_CODING_SUPPORTED    /* Arithmetic coding back end? */
-#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
-#define C_PROGRESSIVE_SUPPORTED	    /* Progressive JPEG? (Requires MULTISCAN)*/
-#define ENTROPY_OPT_SUPPORTED	    /* Optimization of entropy coding parms? */
-/* Note: if you selected 12-bit data precision, it is dangerous to turn off
- * ENTROPY_OPT_SUPPORTED.  The standard Huffman tables are only good for 8-bit
- * precision, so jchuff.c normally uses entropy optimization to compute
- * usable tables for higher precision.  If you don't want to do optimization,
- * you'll have to supply different default Huffman tables.
- * The exact same statements apply for progressive JPEG: the default tables
- * don't work for progressive mode.  (This may get fixed, however.)
- */
-#define INPUT_SMOOTHING_SUPPORTED   /* Input image smoothing option? */
-
-/* Decoder capability options: */
-
-#undef  D_ARITH_CODING_SUPPORTED    /* Arithmetic coding back end? */
-#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
-#define D_PROGRESSIVE_SUPPORTED	    /* Progressive JPEG? (Requires MULTISCAN)*/
-#define SAVE_MARKERS_SUPPORTED	    /* jpeg_save_markers() needed? */
-#define BLOCK_SMOOTHING_SUPPORTED   /* Block smoothing? (Progressive only) */
-#define IDCT_SCALING_SUPPORTED	    /* Output rescaling via IDCT? */
-#undef  UPSAMPLE_SCALING_SUPPORTED  /* Output rescaling at upsample stage? */
-#define UPSAMPLE_MERGING_SUPPORTED  /* Fast path for sloppy upsampling? */
-#define QUANT_1PASS_SUPPORTED	    /* 1-pass color quantization? */
-#define QUANT_2PASS_SUPPORTED	    /* 2-pass color quantization? */
-
-/* more capability options later, no doubt */
-
-
-/*
- * Ordering of RGB data in scanlines passed to or from the application.
- * If your application wants to deal with data in the order B,G,R, just
- * change these macros.  You can also deal with formats such as R,G,B,X
- * (one extra byte per pixel) by changing RGB_PIXELSIZE.  Note that changing
- * the offsets will also change the order in which colormap data is organized.
- * RESTRICTIONS:
- * 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats.
- * 2. These macros only affect RGB<=>YCbCr color conversion, so they are not
- *    useful if you are using JPEG color spaces other than YCbCr or grayscale.
- * 3. The color quantizer modules will not behave desirably if RGB_PIXELSIZE
- *    is not 3 (they don't understand about dummy color components!).  So you
- *    can't use color quantization if you change that value.
- */
-
-#define RGB_RED		0	/* Offset of Red in an RGB scanline element */
-#define RGB_GREEN	1	/* Offset of Green */
-#define RGB_BLUE	2	/* Offset of Blue */
-#define RGB_PIXELSIZE	3	/* JSAMPLEs per RGB scanline element */
-
-
-/* Definitions for speed-related optimizations. */
-
-
-/* If your compiler supports inline functions, define INLINE
- * as the inline keyword; otherwise define it as empty.
- */
-
-#ifndef INLINE
-#ifdef __GNUC__			/* for instance, GNU C knows about inline */
-#define INLINE __inline__
-#endif
-#ifndef INLINE
-#define INLINE			/* default is to define it as empty */
-#endif
-#endif
-
-
-/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying
- * two 16-bit shorts is faster than multiplying two ints.  Define MULTIPLIER
- * as short on such a machine.  MULTIPLIER must be at least 16 bits wide.
- */
-
-#ifndef MULTIPLIER
-#define MULTIPLIER  int		/* type for fastest integer multiply */
-#endif
-
-
-/* FAST_FLOAT should be either float or double, whichever is done faster
- * by your compiler.  (Note that this type is only used in the floating point
- * DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.)
- * Typically, float is faster in ANSI C compilers, while double is faster in
- * pre-ANSI compilers (because they insist on converting to double anyway).
- * The code below therefore chooses float if we have ANSI-style prototypes.
- */
-
-#ifndef FAST_FLOAT
-#ifdef HAVE_PROTOTYPES
-#define FAST_FLOAT  float
-#else
-#define FAST_FLOAT  double
-#endif
-#endif
-
-#endif /* JPEG_INTERNAL_OPTIONS */
diff --git a/extra_lib/include/jpeg/jpeglib.h b/extra_lib/include/jpeg/jpeglib.h
deleted file mode 100644
index d1be8dd..0000000
--- a/extra_lib/include/jpeg/jpeglib.h
+++ /dev/null
@@ -1,1096 +0,0 @@
-/*
- * jpeglib.h
- *
- * Copyright (C) 1991-1998, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file defines the application interface for the JPEG library.
- * Most applications using the library need only include this file,
- * and perhaps jerror.h if they want to know the exact error codes.
- */
-
-#ifndef JPEGLIB_H
-#define JPEGLIB_H
-
-/*
- * First we include the configuration files that record how this
- * installation of the JPEG library is set up.  jconfig.h can be
- * generated automatically for many systems.  jmorecfg.h contains
- * manual configuration options that most people need not worry about.
- */
-
-#ifndef JCONFIG_INCLUDED	/* in case jinclude.h already did */
-#include "jconfig.h"		/* widely used configuration options */
-#endif
-#include "jmorecfg.h"		/* seldom changed options */
-
-
-/* Version ID for the JPEG library.
- * Might be useful for tests like "#if JPEG_LIB_VERSION >= 60".
- */
-
-#define JPEG_LIB_VERSION  62	/* Version 6b */
-
-
-/* Various constants determining the sizes of things.
- * All of these are specified by the JPEG standard, so don't change them
- * if you want to be compatible.
- */
-
-#define DCTSIZE		    8	/* The basic DCT block is 8x8 samples */
-#define DCTSIZE2	    64	/* DCTSIZE squared; # of elements in a block */
-#define NUM_QUANT_TBLS      4	/* Quantization tables are numbered 0..3 */
-#define NUM_HUFF_TBLS       4	/* Huffman tables are numbered 0..3 */
-#define NUM_ARITH_TBLS      16	/* Arith-coding tables are numbered 0..15 */
-#define MAX_COMPS_IN_SCAN   4	/* JPEG limit on # of components in one scan */
-#define MAX_SAMP_FACTOR     4	/* JPEG limit on sampling factors */
-/* Unfortunately, some bozo at Adobe saw no reason to be bound by the standard;
- * the PostScript DCT filter can emit files with many more than 10 blocks/MCU.
- * If you happen to run across such a file, you can up D_MAX_BLOCKS_IN_MCU
- * to handle it.  We even let you do this from the jconfig.h file.  However,
- * we strongly discourage changing C_MAX_BLOCKS_IN_MCU; just because Adobe
- * sometimes emits noncompliant files doesn't mean you should too.
- */
-#define C_MAX_BLOCKS_IN_MCU   10 /* compressor's limit on blocks per MCU */
-#ifndef D_MAX_BLOCKS_IN_MCU
-#define D_MAX_BLOCKS_IN_MCU   10 /* decompressor's limit on blocks per MCU */
-#endif
-
-
-/* Data structures for images (arrays of samples and of DCT coefficients).
- * On 80x86 machines, the image arrays are too big for near pointers,
- * but the pointer arrays can fit in near memory.
- */
-
-typedef JSAMPLE FAR *JSAMPROW;	/* ptr to one image row of pixel samples. */
-typedef JSAMPROW *JSAMPARRAY;	/* ptr to some rows (a 2-D sample array) */
-typedef JSAMPARRAY *JSAMPIMAGE;	/* a 3-D sample array: top index is color */
-
-typedef JCOEF JBLOCK[DCTSIZE2];	/* one block of coefficients */
-typedef JBLOCK FAR *JBLOCKROW;	/* pointer to one row of coefficient blocks */
-typedef JBLOCKROW *JBLOCKARRAY;		/* a 2-D array of coefficient blocks */
-typedef JBLOCKARRAY *JBLOCKIMAGE;	/* a 3-D array of coefficient blocks */
-
-typedef JCOEF FAR *JCOEFPTR;	/* useful in a couple of places */
-
-
-/* Types for JPEG compression parameters and working tables. */
-
-
-/* DCT coefficient quantization tables. */
-
-typedef struct {
-  /* This array gives the coefficient quantizers in natural array order
-   * (not the zigzag order in which they are stored in a JPEG DQT marker).
-   * CAUTION: IJG versions prior to v6a kept this array in zigzag order.
-   */
-  UINT16 quantval[DCTSIZE2];	/* quantization step for each coefficient */
-  /* This field is used only during compression.  It's initialized FALSE when
-   * the table is created, and set TRUE when it's been output to the file.
-   * You could suppress output of a table by setting this to TRUE.
-   * (See jpeg_suppress_tables for an example.)
-   */
-  boolean sent_table;		/* TRUE when table has been output */
-} JQUANT_TBL;
-
-
-/* Huffman coding tables. */
-
-typedef struct {
-  /* These two fields directly represent the contents of a JPEG DHT marker */
-  UINT8 bits[17];		/* bits[k] = # of symbols with codes of */
-				/* length k bits; bits[0] is unused */
-  UINT8 huffval[256];		/* The symbols, in order of incr code length */
-  /* This field is used only during compression.  It's initialized FALSE when
-   * the table is created, and set TRUE when it's been output to the file.
-   * You could suppress output of a table by setting this to TRUE.
-   * (See jpeg_suppress_tables for an example.)
-   */
-  boolean sent_table;		/* TRUE when table has been output */
-} JHUFF_TBL;
-
-
-/* Basic info about one component (color channel). */
-
-typedef struct {
-  /* These values are fixed over the whole image. */
-  /* For compression, they must be supplied by parameter setup; */
-  /* for decompression, they are read from the SOF marker. */
-  int component_id;		/* identifier for this component (0..255) */
-  int component_index;		/* its index in SOF or cinfo->comp_info[] */
-  int h_samp_factor;		/* horizontal sampling factor (1..4) */
-  int v_samp_factor;		/* vertical sampling factor (1..4) */
-  int quant_tbl_no;		/* quantization table selector (0..3) */
-  /* These values may vary between scans. */
-  /* For compression, they must be supplied by parameter setup; */
-  /* for decompression, they are read from the SOS marker. */
-  /* The decompressor output side may not use these variables. */
-  int dc_tbl_no;		/* DC entropy table selector (0..3) */
-  int ac_tbl_no;		/* AC entropy table selector (0..3) */
-  
-  /* Remaining fields should be treated as private by applications. */
-  
-  /* These values are computed during compression or decompression startup: */
-  /* Component's size in DCT blocks.
-   * Any dummy blocks added to complete an MCU are not counted; therefore
-   * these values do not depend on whether a scan is interleaved or not.
-   */
-  JDIMENSION width_in_blocks;
-  JDIMENSION height_in_blocks;
-  /* Size of a DCT block in samples.  Always DCTSIZE for compression.
-   * For decompression this is the size of the output from one DCT block,
-   * reflecting any scaling we choose to apply during the IDCT step.
-   * Values of 1,2,4,8 are likely to be supported.  Note that different
-   * components may receive different IDCT scalings.
-   */
-  int DCT_scaled_size;
-  /* The downsampled dimensions are the component's actual, unpadded number
-   * of samples at the main buffer (preprocessing/compression interface), thus
-   * downsampled_width = ceil(image_width * Hi/Hmax)
-   * and similarly for height.  For decompression, IDCT scaling is included, so
-   * downsampled_width = ceil(image_width * Hi/Hmax * DCT_scaled_size/DCTSIZE)
-   */
-  JDIMENSION downsampled_width;	 /* actual width in samples */
-  JDIMENSION downsampled_height; /* actual height in samples */
-  /* This flag is used only for decompression.  In cases where some of the
-   * components will be ignored (eg grayscale output from YCbCr image),
-   * we can skip most computations for the unused components.
-   */
-  boolean component_needed;	/* do we need the value of this component? */
-
-  /* These values are computed before starting a scan of the component. */
-  /* The decompressor output side may not use these variables. */
-  int MCU_width;		/* number of blocks per MCU, horizontally */
-  int MCU_height;		/* number of blocks per MCU, vertically */
-  int MCU_blocks;		/* MCU_width * MCU_height */
-  int MCU_sample_width;		/* MCU width in samples, MCU_width*DCT_scaled_size */
-  int last_col_width;		/* # of non-dummy blocks across in last MCU */
-  int last_row_height;		/* # of non-dummy blocks down in last MCU */
-
-  /* Saved quantization table for component; NULL if none yet saved.
-   * See jdinput.c comments about the need for this information.
-   * This field is currently used only for decompression.
-   */
-  JQUANT_TBL * quant_table;
-
-  /* Private per-component storage for DCT or IDCT subsystem. */
-  void * dct_table;
-} jpeg_component_info;
-
-
-/* The script for encoding a multiple-scan file is an array of these: */
-
-typedef struct {
-  int comps_in_scan;		/* number of components encoded in this scan */
-  int component_index[MAX_COMPS_IN_SCAN]; /* their SOF/comp_info[] indexes */
-  int Ss, Se;			/* progressive JPEG spectral selection parms */
-  int Ah, Al;			/* progressive JPEG successive approx. parms */
-} jpeg_scan_info;
-
-/* The decompressor can save APPn and COM markers in a list of these: */
-
-typedef struct jpeg_marker_struct FAR * jpeg_saved_marker_ptr;
-
-struct jpeg_marker_struct {
-  jpeg_saved_marker_ptr next;	/* next in list, or NULL */
-  UINT8 marker;			/* marker code: JPEG_COM, or JPEG_APP0+n */
-  unsigned int original_length;	/* # bytes of data in the file */
-  unsigned int data_length;	/* # bytes of data saved at data[] */
-  JOCTET FAR * data;		/* the data contained in the marker */
-  /* the marker length word is not counted in data_length or original_length */
-};
-
-/* Known color spaces. */
-
-typedef enum {
-	JCS_UNKNOWN,		/* error/unspecified */
-	JCS_GRAYSCALE,		/* monochrome */
-	JCS_RGB,		/* red/green/blue */
-	JCS_YCbCr,		/* Y/Cb/Cr (also known as YUV) */
-	JCS_CMYK,		/* C/M/Y/K */
-	JCS_YCCK		/* Y/Cb/Cr/K */
-} J_COLOR_SPACE;
-
-/* DCT/IDCT algorithm options. */
-
-typedef enum {
-	JDCT_ISLOW,		/* slow but accurate integer algorithm */
-	JDCT_IFAST,		/* faster, less accurate integer method */
-	JDCT_FLOAT		/* floating-point: accurate, fast on fast HW */
-} J_DCT_METHOD;
-
-#ifndef JDCT_DEFAULT		/* may be overridden in jconfig.h */
-#define JDCT_DEFAULT  JDCT_ISLOW
-#endif
-#ifndef JDCT_FASTEST		/* may be overridden in jconfig.h */
-#define JDCT_FASTEST  JDCT_IFAST
-#endif
-
-/* Dithering options for decompression. */
-
-typedef enum {
-	JDITHER_NONE,		/* no dithering */
-	JDITHER_ORDERED,	/* simple ordered dither */
-	JDITHER_FS		/* Floyd-Steinberg error diffusion dither */
-} J_DITHER_MODE;
-
-
-/* Common fields between JPEG compression and decompression master structs. */
-
-#define jpeg_common_fields \
-  struct jpeg_error_mgr * err;	/* Error handler module */\
-  struct jpeg_memory_mgr * mem;	/* Memory manager module */\
-  struct jpeg_progress_mgr * progress; /* Progress monitor, or NULL if none */\
-  void * client_data;		/* Available for use by application */\
-  boolean is_decompressor;	/* So common code can tell which is which */\
-  int global_state		/* For checking call sequence validity */
-
-/* Routines that are to be used by both halves of the library are declared
- * to receive a pointer to this structure.  There are no actual instances of
- * jpeg_common_struct, only of jpeg_compress_struct and jpeg_decompress_struct.
- */
-struct jpeg_common_struct {
-  jpeg_common_fields;		/* Fields common to both master struct types */
-  /* Additional fields follow in an actual jpeg_compress_struct or
-   * jpeg_decompress_struct.  All three structs must agree on these
-   * initial fields!  (This would be a lot cleaner in C++.)
-   */
-};
-
-typedef struct jpeg_common_struct * j_common_ptr;
-typedef struct jpeg_compress_struct * j_compress_ptr;
-typedef struct jpeg_decompress_struct * j_decompress_ptr;
-
-
-/* Master record for a compression instance */
-
-struct jpeg_compress_struct {
-  jpeg_common_fields;		/* Fields shared with jpeg_decompress_struct */
-
-  /* Destination for compressed data */
-  struct jpeg_destination_mgr * dest;
-
-  /* Description of source image --- these fields must be filled in by
-   * outer application before starting compression.  in_color_space must
-   * be correct before you can even call jpeg_set_defaults().
-   */
-
-  JDIMENSION image_width;	/* input image width */
-  JDIMENSION image_height;	/* input image height */
-  int input_components;		/* # of color components in input image */
-  J_COLOR_SPACE in_color_space;	/* colorspace of input image */
-
-  double input_gamma;		/* image gamma of input image */
-
-  /* Compression parameters --- these fields must be set before calling
-   * jpeg_start_compress().  We recommend calling jpeg_set_defaults() to
-   * initialize everything to reasonable defaults, then changing anything
-   * the application specifically wants to change.  That way you won't get
-   * burnt when new parameters are added.  Also note that there are several
-   * helper routines to simplify changing parameters.
-   */
-
-  int data_precision;		/* bits of precision in image data */
-
-  int num_components;		/* # of color components in JPEG image */
-  J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */
-
-  jpeg_component_info * comp_info;
-  /* comp_info[i] describes component that appears i'th in SOF */
-  
-  JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS];
-  /* ptrs to coefficient quantization tables, or NULL if not defined */
-  
-  JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS];
-  JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS];
-  /* ptrs to Huffman coding tables, or NULL if not defined */
-  
-  UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */
-  UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */
-  UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */
-
-  int num_scans;		/* # of entries in scan_info array */
-  const jpeg_scan_info * scan_info; /* script for multi-scan file, or NULL */
-  /* The default value of scan_info is NULL, which causes a single-scan
-   * sequential JPEG file to be emitted.  To create a multi-scan file,
-   * set num_scans and scan_info to point to an array of scan definitions.
-   */
-
-  boolean raw_data_in;		/* TRUE=caller supplies downsampled data */
-  boolean arith_code;		/* TRUE=arithmetic coding, FALSE=Huffman */
-  boolean optimize_coding;	/* TRUE=optimize entropy encoding parms */
-  boolean CCIR601_sampling;	/* TRUE=first samples are cosited */
-  int smoothing_factor;		/* 1..100, or 0 for no input smoothing */
-  J_DCT_METHOD dct_method;	/* DCT algorithm selector */
-
-  /* The restart interval can be specified in absolute MCUs by setting
-   * restart_interval, or in MCU rows by setting restart_in_rows
-   * (in which case the correct restart_interval will be figured
-   * for each scan).
-   */
-  unsigned int restart_interval; /* MCUs per restart, or 0 for no restart */
-  int restart_in_rows;		/* if > 0, MCU rows per restart interval */
-
-  /* Parameters controlling emission of special markers. */
-
-  boolean write_JFIF_header;	/* should a JFIF marker be written? */
-  UINT8 JFIF_major_version;	/* What to write for the JFIF version number */
-  UINT8 JFIF_minor_version;
-  /* These three values are not used by the JPEG code, merely copied */
-  /* into the JFIF APP0 marker.  density_unit can be 0 for unknown, */
-  /* 1 for dots/inch, or 2 for dots/cm.  Note that the pixel aspect */
-  /* ratio is defined by X_density/Y_density even when density_unit=0. */
-  UINT8 density_unit;		/* JFIF code for pixel size units */
-  UINT16 X_density;		/* Horizontal pixel density */
-  UINT16 Y_density;		/* Vertical pixel density */
-  boolean write_Adobe_marker;	/* should an Adobe marker be written? */
-  
-  /* State variable: index of next scanline to be written to
-   * jpeg_write_scanlines().  Application may use this to control its
-   * processing loop, e.g., "while (next_scanline < image_height)".
-   */
-
-  JDIMENSION next_scanline;	/* 0 .. image_height-1  */
-
-  /* Remaining fields are known throughout compressor, but generally
-   * should not be touched by a surrounding application.
-   */
-
-  /*
-   * These fields are computed during compression startup
-   */
-  boolean progressive_mode;	/* TRUE if scan script uses progressive mode */
-  int max_h_samp_factor;	/* largest h_samp_factor */
-  int max_v_samp_factor;	/* largest v_samp_factor */
-
-  JDIMENSION total_iMCU_rows;	/* # of iMCU rows to be input to coef ctlr */
-  /* The coefficient controller receives data in units of MCU rows as defined
-   * for fully interleaved scans (whether the JPEG file is interleaved or not).
-   * There are v_samp_factor * DCTSIZE sample rows of each component in an
-   * "iMCU" (interleaved MCU) row.
-   */
-  
-  /*
-   * These fields are valid during any one scan.
-   * They describe the components and MCUs actually appearing in the scan.
-   */
-  int comps_in_scan;		/* # of JPEG components in this scan */
-  jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN];
-  /* *cur_comp_info[i] describes component that appears i'th in SOS */
-  
-  JDIMENSION MCUs_per_row;	/* # of MCUs across the image */
-  JDIMENSION MCU_rows_in_scan;	/* # of MCU rows in the image */
-  
-  int blocks_in_MCU;		/* # of DCT blocks per MCU */
-  int MCU_membership[C_MAX_BLOCKS_IN_MCU];
-  /* MCU_membership[i] is index in cur_comp_info of component owning */
-  /* i'th block in an MCU */
-
-  int Ss, Se, Ah, Al;		/* progressive JPEG parameters for scan */
-
-  /*
-   * Links to compression subobjects (methods and private variables of modules)
-   */
-  struct jpeg_comp_master * master;
-  struct jpeg_c_main_controller * main;
-  struct jpeg_c_prep_controller * prep;
-  struct jpeg_c_coef_controller * coef;
-  struct jpeg_marker_writer * marker;
-  struct jpeg_color_converter * cconvert;
-  struct jpeg_downsampler * downsample;
-  struct jpeg_forward_dct * fdct;
-  struct jpeg_entropy_encoder * entropy;
-  jpeg_scan_info * script_space; /* workspace for jpeg_simple_progression */
-  int script_space_size;
-};
-
-
-/* Master record for a decompression instance */
-
-struct jpeg_decompress_struct {
-  jpeg_common_fields;		/* Fields shared with jpeg_compress_struct */
-
-  /* Source of compressed data */
-  struct jpeg_source_mgr * src;
-
-  /* Basic description of image --- filled in by jpeg_read_header(). */
-  /* Application may inspect these values to decide how to process image. */
-
-  JDIMENSION image_width;	/* nominal image width (from SOF marker) */
-  JDIMENSION image_height;	/* nominal image height */
-  int num_components;		/* # of color components in JPEG image */
-  J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */
-
-  /* Decompression processing parameters --- these fields must be set before
-   * calling jpeg_start_decompress().  Note that jpeg_read_header() initializes
-   * them to default values.
-   */
-
-  J_COLOR_SPACE out_color_space; /* colorspace for output */
-
-  unsigned int scale_num, scale_denom; /* fraction by which to scale image */
-
-  double output_gamma;		/* image gamma wanted in output */
-
-  boolean buffered_image;	/* TRUE=multiple output passes */
-  boolean raw_data_out;		/* TRUE=downsampled data wanted */
-
-  J_DCT_METHOD dct_method;	/* IDCT algorithm selector */
-  boolean do_fancy_upsampling;	/* TRUE=apply fancy upsampling */
-  boolean do_block_smoothing;	/* TRUE=apply interblock smoothing */
-
-  boolean quantize_colors;	/* TRUE=colormapped output wanted */
-  /* the following are ignored if not quantize_colors: */
-  J_DITHER_MODE dither_mode;	/* type of color dithering to use */
-  boolean two_pass_quantize;	/* TRUE=use two-pass color quantization */
-  int desired_number_of_colors;	/* max # colors to use in created colormap */
-  /* these are significant only in buffered-image mode: */
-  boolean enable_1pass_quant;	/* enable future use of 1-pass quantizer */
-  boolean enable_external_quant;/* enable future use of external colormap */
-  boolean enable_2pass_quant;	/* enable future use of 2-pass quantizer */
-
-  /* Description of actual output image that will be returned to application.
-   * These fields are computed by jpeg_start_decompress().
-   * You can also use jpeg_calc_output_dimensions() to determine these values
-   * in advance of calling jpeg_start_decompress().
-   */
-
-  JDIMENSION output_width;	/* scaled image width */
-  JDIMENSION output_height;	/* scaled image height */
-  int out_color_components;	/* # of color components in out_color_space */
-  int output_components;	/* # of color components returned */
-  /* output_components is 1 (a colormap index) when quantizing colors;
-   * otherwise it equals out_color_components.
-   */
-  int rec_outbuf_height;	/* min recommended height of scanline buffer */
-  /* If the buffer passed to jpeg_read_scanlines() is less than this many rows
-   * high, space and time will be wasted due to unnecessary data copying.
-   * Usually rec_outbuf_height will be 1 or 2, at most 4.
-   */
-
-  /* When quantizing colors, the output colormap is described by these fields.
-   * The application can supply a colormap by setting colormap non-NULL before
-   * calling jpeg_start_decompress; otherwise a colormap is created during
-   * jpeg_start_decompress or jpeg_start_output.
-   * The map has out_color_components rows and actual_number_of_colors columns.
-   */
-  int actual_number_of_colors;	/* number of entries in use */
-  JSAMPARRAY colormap;		/* The color map as a 2-D pixel array */
-
-  /* State variables: these variables indicate the progress of decompression.
-   * The application may examine these but must not modify them.
-   */
-
-  /* Row index of next scanline to be read from jpeg_read_scanlines().
-   * Application may use this to control its processing loop, e.g.,
-   * "while (output_scanline < output_height)".
-   */
-  JDIMENSION output_scanline;	/* 0 .. output_height-1  */
-
-  /* Current input scan number and number of iMCU rows completed in scan.
-   * These indicate the progress of the decompressor input side.
-   */
-  int input_scan_number;	/* Number of SOS markers seen so far */
-  JDIMENSION input_iMCU_row;	/* Number of iMCU rows completed */
-
-  /* The "output scan number" is the notional scan being displayed by the
-   * output side.  The decompressor will not allow output scan/row number
-   * to get ahead of input scan/row, but it can fall arbitrarily far behind.
-   */
-  int output_scan_number;	/* Nominal scan number being displayed */
-  JDIMENSION output_iMCU_row;	/* Number of iMCU rows read */
-
-  /* Current progression status.  coef_bits[c][i] indicates the precision
-   * with which component c's DCT coefficient i (in zigzag order) is known.
-   * It is -1 when no data has yet been received, otherwise it is the point
-   * transform (shift) value for the most recent scan of the coefficient
-   * (thus, 0 at completion of the progression).
-   * This pointer is NULL when reading a non-progressive file.
-   */
-  int (*coef_bits)[DCTSIZE2];	/* -1 or current Al value for each coef */
-
-  /* Internal JPEG parameters --- the application usually need not look at
-   * these fields.  Note that the decompressor output side may not use
-   * any parameters that can change between scans.
-   */
-
-  /* Quantization and Huffman tables are carried forward across input
-   * datastreams when processing abbreviated JPEG datastreams.
-   */
-
-  JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS];
-  /* ptrs to coefficient quantization tables, or NULL if not defined */
-
-  JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS];
-  JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS];
-  /* ptrs to Huffman coding tables, or NULL if not defined */
-
-  /* These parameters are never carried across datastreams, since they
-   * are given in SOF/SOS markers or defined to be reset by SOI.
-   */
-
-  int data_precision;		/* bits of precision in image data */
-
-  jpeg_component_info * comp_info;
-  /* comp_info[i] describes component that appears i'th in SOF */
-
-  boolean progressive_mode;	/* TRUE if SOFn specifies progressive mode */
-  boolean arith_code;		/* TRUE=arithmetic coding, FALSE=Huffman */
-
-  UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */
-  UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */
-  UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */
-
-  unsigned int restart_interval; /* MCUs per restart interval, or 0 for no restart */
-
-  /* These fields record data obtained from optional markers recognized by
-   * the JPEG library.
-   */
-  boolean saw_JFIF_marker;	/* TRUE iff a JFIF APP0 marker was found */
-  /* Data copied from JFIF marker; only valid if saw_JFIF_marker is TRUE: */
-  UINT8 JFIF_major_version;	/* JFIF version number */
-  UINT8 JFIF_minor_version;
-  UINT8 density_unit;		/* JFIF code for pixel size units */
-  UINT16 X_density;		/* Horizontal pixel density */
-  UINT16 Y_density;		/* Vertical pixel density */
-  boolean saw_Adobe_marker;	/* TRUE iff an Adobe APP14 marker was found */
-  UINT8 Adobe_transform;	/* Color transform code from Adobe marker */
-
-  boolean CCIR601_sampling;	/* TRUE=first samples are cosited */
-
-  /* Aside from the specific data retained from APPn markers known to the
-   * library, the uninterpreted contents of any or all APPn and COM markers
-   * can be saved in a list for examination by the application.
-   */
-  jpeg_saved_marker_ptr marker_list; /* Head of list of saved markers */
-
-  /* Remaining fields are known throughout decompressor, but generally
-   * should not be touched by a surrounding application.
-   */
-
-  /*
-   * These fields are computed during decompression startup
-   */
-  int max_h_samp_factor;	/* largest h_samp_factor */
-  int max_v_samp_factor;	/* largest v_samp_factor */
-
-  int min_DCT_scaled_size;	/* smallest DCT_scaled_size of any component */
-
-  JDIMENSION total_iMCU_rows;	/* # of iMCU rows in image */
-  /* The coefficient controller's input and output progress is measured in
-   * units of "iMCU" (interleaved MCU) rows.  These are the same as MCU rows
-   * in fully interleaved JPEG scans, but are used whether the scan is
-   * interleaved or not.  We define an iMCU row as v_samp_factor DCT block
-   * rows of each component.  Therefore, the IDCT output contains
-   * v_samp_factor*DCT_scaled_size sample rows of a component per iMCU row.
-   */
-
-  JSAMPLE * sample_range_limit; /* table for fast range-limiting */
-
-  /*
-   * These fields are valid during any one scan.
-   * They describe the components and MCUs actually appearing in the scan.
-   * Note that the decompressor output side must not use these fields.
-   */
-  int comps_in_scan;		/* # of JPEG components in this scan */
-  jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN];
-  /* *cur_comp_info[i] describes component that appears i'th in SOS */
-
-  JDIMENSION MCUs_per_row;	/* # of MCUs across the image */
-  JDIMENSION MCU_rows_in_scan;	/* # of MCU rows in the image */
-
-  int blocks_in_MCU;		/* # of DCT blocks per MCU */
-  int MCU_membership[D_MAX_BLOCKS_IN_MCU];
-  /* MCU_membership[i] is index in cur_comp_info of component owning */
-  /* i'th block in an MCU */
-
-  int Ss, Se, Ah, Al;		/* progressive JPEG parameters for scan */
-
-  /* This field is shared between entropy decoder and marker parser.
-   * It is either zero or the code of a JPEG marker that has been
-   * read from the data source, but has not yet been processed.
-   */
-  int unread_marker;
-
-  /*
-   * Links to decompression subobjects (methods, private variables of modules)
-   */
-  struct jpeg_decomp_master * master;
-  struct jpeg_d_main_controller * main;
-  struct jpeg_d_coef_controller * coef;
-  struct jpeg_d_post_controller * post;
-  struct jpeg_input_controller * inputctl;
-  struct jpeg_marker_reader * marker;
-  struct jpeg_entropy_decoder * entropy;
-  struct jpeg_inverse_dct * idct;
-  struct jpeg_upsampler * upsample;
-  struct jpeg_color_deconverter * cconvert;
-  struct jpeg_color_quantizer * cquantize;
-};
-
-
-/* "Object" declarations for JPEG modules that may be supplied or called
- * directly by the surrounding application.
- * As with all objects in the JPEG library, these structs only define the
- * publicly visible methods and state variables of a module.  Additional
- * private fields may exist after the public ones.
- */
-
-
-/* Error handler object */
-
-struct jpeg_error_mgr {
-  /* Error exit handler: does not return to caller */
-  JMETHOD(void, error_exit, (j_common_ptr cinfo));
-  /* Conditionally emit a trace or warning message */
-  JMETHOD(void, emit_message, (j_common_ptr cinfo, int msg_level));
-  /* Routine that actually outputs a trace or error message */
-  JMETHOD(void, output_message, (j_common_ptr cinfo));
-  /* Format a message string for the most recent JPEG error or message */
-  JMETHOD(void, format_message, (j_common_ptr cinfo, char * buffer));
-#define JMSG_LENGTH_MAX  200	/* recommended size of format_message buffer */
-  /* Reset error state variables at start of a new image */
-  JMETHOD(void, reset_error_mgr, (j_common_ptr cinfo));
-  
-  /* The message ID code and any parameters are saved here.
-   * A message can have one string parameter or up to 8 int parameters.
-   */
-  int msg_code;
-#define JMSG_STR_PARM_MAX  80
-  union {
-    int i[8];
-    char s[JMSG_STR_PARM_MAX];
-  } msg_parm;
-  
-  /* Standard state variables for error facility */
-  
-  int trace_level;		/* max msg_level that will be displayed */
-  
-  /* For recoverable corrupt-data errors, we emit a warning message,
-   * but keep going unless emit_message chooses to abort.  emit_message
-   * should count warnings in num_warnings.  The surrounding application
-   * can check for bad data by seeing if num_warnings is nonzero at the
-   * end of processing.
-   */
-  long num_warnings;		/* number of corrupt-data warnings */
-
-  /* These fields point to the table(s) of error message strings.
-   * An application can change the table pointer to switch to a different
-   * message list (typically, to change the language in which errors are
-   * reported).  Some applications may wish to add additional error codes
-   * that will be handled by the JPEG library error mechanism; the second
-   * table pointer is used for this purpose.
-   *
-   * First table includes all errors generated by JPEG library itself.
-   * Error code 0 is reserved for a "no such error string" message.
-   */
-  const char * const * jpeg_message_table; /* Library errors */
-  int last_jpeg_message;    /* Table contains strings 0..last_jpeg_message */
-  /* Second table can be added by application (see cjpeg/djpeg for example).
-   * It contains strings numbered first_addon_message..last_addon_message.
-   */
-  const char * const * addon_message_table; /* Non-library errors */
-  int first_addon_message;	/* code for first string in addon table */
-  int last_addon_message;	/* code for last string in addon table */
-};
-
-
-/* Progress monitor object */
-
-struct jpeg_progress_mgr {
-  JMETHOD(void, progress_monitor, (j_common_ptr cinfo));
-
-  long pass_counter;		/* work units completed in this pass */
-  long pass_limit;		/* total number of work units in this pass */
-  int completed_passes;		/* passes completed so far */
-  int total_passes;		/* total number of passes expected */
-};
-
-
-/* Data destination object for compression */
-
-struct jpeg_destination_mgr {
-  JOCTET * next_output_byte;	/* => next byte to write in buffer */
-  size_t free_in_buffer;	/* # of byte spaces remaining in buffer */
-
-  JMETHOD(void, init_destination, (j_compress_ptr cinfo));
-  JMETHOD(boolean, empty_output_buffer, (j_compress_ptr cinfo));
-  JMETHOD(void, term_destination, (j_compress_ptr cinfo));
-};
-
-
-/* Data source object for decompression */
-
-struct jpeg_source_mgr {
-  const JOCTET * next_input_byte; /* => next byte to read from buffer */
-  size_t bytes_in_buffer;	/* # of bytes remaining in buffer */
-
-  JMETHOD(void, init_source, (j_decompress_ptr cinfo));
-  JMETHOD(boolean, fill_input_buffer, (j_decompress_ptr cinfo));
-  JMETHOD(void, skip_input_data, (j_decompress_ptr cinfo, long num_bytes));
-  JMETHOD(boolean, resync_to_restart, (j_decompress_ptr cinfo, int desired));
-  JMETHOD(void, term_source, (j_decompress_ptr cinfo));
-};
-
-
-/* Memory manager object.
- * Allocates "small" objects (a few K total), "large" objects (tens of K),
- * and "really big" objects (virtual arrays with backing store if needed).
- * The memory manager does not allow individual objects to be freed; rather,
- * each created object is assigned to a pool, and whole pools can be freed
- * at once.  This is faster and more convenient than remembering exactly what
- * to free, especially where malloc()/free() are not too speedy.
- * NB: alloc routines never return NULL.  They exit to error_exit if not
- * successful.
- */
-
-#define JPOOL_PERMANENT	0	/* lasts until master record is destroyed */
-#define JPOOL_IMAGE	1	/* lasts until done with image/datastream */
-#define JPOOL_NUMPOOLS	2
-
-typedef struct jvirt_sarray_control * jvirt_sarray_ptr;
-typedef struct jvirt_barray_control * jvirt_barray_ptr;
-
-
-struct jpeg_memory_mgr {
-  /* Method pointers */
-  JMETHOD(void *, alloc_small, (j_common_ptr cinfo, int pool_id,
-				size_t sizeofobject));
-  JMETHOD(void FAR *, alloc_large, (j_common_ptr cinfo, int pool_id,
-				     size_t sizeofobject));
-  JMETHOD(JSAMPARRAY, alloc_sarray, (j_common_ptr cinfo, int pool_id,
-				     JDIMENSION samplesperrow,
-				     JDIMENSION numrows));
-  JMETHOD(JBLOCKARRAY, alloc_barray, (j_common_ptr cinfo, int pool_id,
-				      JDIMENSION blocksperrow,
-				      JDIMENSION numrows));
-  JMETHOD(jvirt_sarray_ptr, request_virt_sarray, (j_common_ptr cinfo,
-						  int pool_id,
-						  boolean pre_zero,
-						  JDIMENSION samplesperrow,
-						  JDIMENSION numrows,
-						  JDIMENSION maxaccess));
-  JMETHOD(jvirt_barray_ptr, request_virt_barray, (j_common_ptr cinfo,
-						  int pool_id,
-						  boolean pre_zero,
-						  JDIMENSION blocksperrow,
-						  JDIMENSION numrows,
-						  JDIMENSION maxaccess));
-  JMETHOD(void, realize_virt_arrays, (j_common_ptr cinfo));
-  JMETHOD(JSAMPARRAY, access_virt_sarray, (j_common_ptr cinfo,
-					   jvirt_sarray_ptr ptr,
-					   JDIMENSION start_row,
-					   JDIMENSION num_rows,
-					   boolean writable));
-  JMETHOD(JBLOCKARRAY, access_virt_barray, (j_common_ptr cinfo,
-					    jvirt_barray_ptr ptr,
-					    JDIMENSION start_row,
-					    JDIMENSION num_rows,
-					    boolean writable));
-  JMETHOD(void, free_pool, (j_common_ptr cinfo, int pool_id));
-  JMETHOD(void, self_destruct, (j_common_ptr cinfo));
-
-  /* Limit on memory allocation for this JPEG object.  (Note that this is
-   * merely advisory, not a guaranteed maximum; it only affects the space
-   * used for virtual-array buffers.)  May be changed by outer application
-   * after creating the JPEG object.
-   */
-  long max_memory_to_use;
-
-  /* Maximum allocation request accepted by alloc_large. */
-  long max_alloc_chunk;
-};
-
-
-/* Routine signature for application-supplied marker processing methods.
- * Need not pass marker code since it is stored in cinfo->unread_marker.
- */
-typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo));
-
-
-/* Declarations for routines called by application.
- * The JPP macro hides prototype parameters from compilers that can't cope.
- * Note JPP requires double parentheses.
- */
-
-#ifdef HAVE_PROTOTYPES
-#define JPP(arglist)	arglist
-#else
-#define JPP(arglist)	()
-#endif
-
-
-/* Short forms of external names for systems with brain-damaged linkers.
- * We shorten external names to be unique in the first six letters, which
- * is good enough for all known systems.
- * (If your compiler itself needs names to be unique in less than 15 
- * characters, you are out of luck.  Get a better compiler.)
- */
-
-#ifdef NEED_SHORT_EXTERNAL_NAMES
-#define jpeg_std_error		jStdError
-#define jpeg_CreateCompress	jCreaCompress
-#define jpeg_CreateDecompress	jCreaDecompress
-#define jpeg_destroy_compress	jDestCompress
-#define jpeg_destroy_decompress	jDestDecompress
-#define jpeg_stdio_dest		jStdDest
-#define jpeg_stdio_src		jStdSrc
-#define jpeg_set_defaults	jSetDefaults
-#define jpeg_set_colorspace	jSetColorspace
-#define jpeg_default_colorspace	jDefColorspace
-#define jpeg_set_quality	jSetQuality
-#define jpeg_set_linear_quality	jSetLQuality
-#define jpeg_add_quant_table	jAddQuantTable
-#define jpeg_quality_scaling	jQualityScaling
-#define jpeg_simple_progression	jSimProgress
-#define jpeg_suppress_tables	jSuppressTables
-#define jpeg_alloc_quant_table	jAlcQTable
-#define jpeg_alloc_huff_table	jAlcHTable
-#define jpeg_start_compress	jStrtCompress
-#define jpeg_write_scanlines	jWrtScanlines
-#define jpeg_finish_compress	jFinCompress
-#define jpeg_write_raw_data	jWrtRawData
-#define jpeg_write_marker	jWrtMarker
-#define jpeg_write_m_header	jWrtMHeader
-#define jpeg_write_m_byte	jWrtMByte
-#define jpeg_write_tables	jWrtTables
-#define jpeg_read_header	jReadHeader
-#define jpeg_start_decompress	jStrtDecompress
-#define jpeg_read_scanlines	jReadScanlines
-#define jpeg_finish_decompress	jFinDecompress
-#define jpeg_read_raw_data	jReadRawData
-#define jpeg_has_multiple_scans	jHasMultScn
-#define jpeg_start_output	jStrtOutput
-#define jpeg_finish_output	jFinOutput
-#define jpeg_input_complete	jInComplete
-#define jpeg_new_colormap	jNewCMap
-#define jpeg_consume_input	jConsumeInput
-#define jpeg_calc_output_dimensions	jCalcDimensions
-#define jpeg_save_markers	jSaveMarkers
-#define jpeg_set_marker_processor	jSetMarker
-#define jpeg_read_coefficients	jReadCoefs
-#define jpeg_write_coefficients	jWrtCoefs
-#define jpeg_copy_critical_parameters	jCopyCrit
-#define jpeg_abort_compress	jAbrtCompress
-#define jpeg_abort_decompress	jAbrtDecompress
-#define jpeg_abort		jAbort
-#define jpeg_destroy		jDestroy
-#define jpeg_resync_to_restart	jResyncRestart
-#endif /* NEED_SHORT_EXTERNAL_NAMES */
-
-
-/* Default error-management setup */
-EXTERN(struct jpeg_error_mgr *) jpeg_std_error
-	JPP((struct jpeg_error_mgr * err));
-
-/* Initialization of JPEG compression objects.
- * jpeg_create_compress() and jpeg_create_decompress() are the exported
- * names that applications should call.  These expand to calls on
- * jpeg_CreateCompress and jpeg_CreateDecompress with additional information
- * passed for version mismatch checking.
- * NB: you must set up the error-manager BEFORE calling jpeg_create_xxx.
- */
-#define jpeg_create_compress(cinfo) \
-    jpeg_CreateCompress((cinfo), JPEG_LIB_VERSION, \
-			(size_t) sizeof(struct jpeg_compress_struct))
-#define jpeg_create_decompress(cinfo) \
-    jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \
-			  (size_t) sizeof(struct jpeg_decompress_struct))
-EXTERN(void) jpeg_CreateCompress JPP((j_compress_ptr cinfo,
-				      int version, size_t structsize));
-EXTERN(void) jpeg_CreateDecompress JPP((j_decompress_ptr cinfo,
-					int version, size_t structsize));
-/* Destruction of JPEG compression objects */
-EXTERN(void) jpeg_destroy_compress JPP((j_compress_ptr cinfo));
-EXTERN(void) jpeg_destroy_decompress JPP((j_decompress_ptr cinfo));
-
-/* Standard data source and destination managers: stdio streams. */
-/* Caller is responsible for opening the file before and closing after. */
-EXTERN(void) jpeg_stdio_dest JPP((j_compress_ptr cinfo, FILE * outfile));
-EXTERN(void) jpeg_stdio_src JPP((j_decompress_ptr cinfo, FILE * infile));
-
-/* Default parameter setup for compression */
-EXTERN(void) jpeg_set_defaults JPP((j_compress_ptr cinfo));
-/* Compression parameter setup aids */
-EXTERN(void) jpeg_set_colorspace JPP((j_compress_ptr cinfo,
-				      J_COLOR_SPACE colorspace));
-EXTERN(void) jpeg_default_colorspace JPP((j_compress_ptr cinfo));
-EXTERN(void) jpeg_set_quality JPP((j_compress_ptr cinfo, int quality,
-				   boolean force_baseline));
-EXTERN(void) jpeg_set_linear_quality JPP((j_compress_ptr cinfo,
-					  int scale_factor,
-					  boolean force_baseline));
-EXTERN(void) jpeg_add_quant_table JPP((j_compress_ptr cinfo, int which_tbl,
-				       const unsigned int *basic_table,
-				       int scale_factor,
-				       boolean force_baseline));
-EXTERN(int) jpeg_quality_scaling JPP((int quality));
-EXTERN(void) jpeg_simple_progression JPP((j_compress_ptr cinfo));
-EXTERN(void) jpeg_suppress_tables JPP((j_compress_ptr cinfo,
-				       boolean suppress));
-EXTERN(JQUANT_TBL *) jpeg_alloc_quant_table JPP((j_common_ptr cinfo));
-EXTERN(JHUFF_TBL *) jpeg_alloc_huff_table JPP((j_common_ptr cinfo));
-
-/* Main entry points for compression */
-EXTERN(void) jpeg_start_compress JPP((j_compress_ptr cinfo,
-				      boolean write_all_tables));
-EXTERN(JDIMENSION) jpeg_write_scanlines JPP((j_compress_ptr cinfo,
-					     JSAMPARRAY scanlines,
-					     JDIMENSION num_lines));
-EXTERN(void) jpeg_finish_compress JPP((j_compress_ptr cinfo));
-
-/* Replaces jpeg_write_scanlines when writing raw downsampled data. */
-EXTERN(JDIMENSION) jpeg_write_raw_data JPP((j_compress_ptr cinfo,
-					    JSAMPIMAGE data,
-					    JDIMENSION num_lines));
-
-/* Write a special marker.  See libjpeg.doc concerning safe usage. */
-EXTERN(void) jpeg_write_marker
-	JPP((j_compress_ptr cinfo, int marker,
-	     const JOCTET * dataptr, unsigned int datalen));
-/* Same, but piecemeal. */
-EXTERN(void) jpeg_write_m_header
-	JPP((j_compress_ptr cinfo, int marker, unsigned int datalen));
-EXTERN(void) jpeg_write_m_byte
-	JPP((j_compress_ptr cinfo, int val));
-
-/* Alternate compression function: just write an abbreviated table file */
-EXTERN(void) jpeg_write_tables JPP((j_compress_ptr cinfo));
-
-/* Decompression startup: read start of JPEG datastream to see what's there */
-EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo,
-				  boolean require_image));
-/* Return value is one of: */
-#define JPEG_SUSPENDED		0 /* Suspended due to lack of input data */
-#define JPEG_HEADER_OK		1 /* Found valid image datastream */
-#define JPEG_HEADER_TABLES_ONLY	2 /* Found valid table-specs-only datastream */
-/* If you pass require_image = TRUE (normal case), you need not check for
- * a TABLES_ONLY return code; an abbreviated file will cause an error exit.
- * JPEG_SUSPENDED is only possible if you use a data source module that can
- * give a suspension return (the stdio source module doesn't).
- */
-
-/* Main entry points for decompression */
-EXTERN(boolean) jpeg_start_decompress JPP((j_decompress_ptr cinfo));
-EXTERN(JDIMENSION) jpeg_read_scanlines JPP((j_decompress_ptr cinfo,
-					    JSAMPARRAY scanlines,
-					    JDIMENSION max_lines));
-EXTERN(boolean) jpeg_finish_decompress JPP((j_decompress_ptr cinfo));
-
-/* Replaces jpeg_read_scanlines when reading raw downsampled data. */
-EXTERN(JDIMENSION) jpeg_read_raw_data JPP((j_decompress_ptr cinfo,
-					   JSAMPIMAGE data,
-					   JDIMENSION max_lines));
-
-/* Additional entry points for buffered-image mode. */
-EXTERN(boolean) jpeg_has_multiple_scans JPP((j_decompress_ptr cinfo));
-EXTERN(boolean) jpeg_start_output JPP((j_decompress_ptr cinfo,
-				       int scan_number));
-EXTERN(boolean) jpeg_finish_output JPP((j_decompress_ptr cinfo));
-EXTERN(boolean) jpeg_input_complete JPP((j_decompress_ptr cinfo));
-EXTERN(void) jpeg_new_colormap JPP((j_decompress_ptr cinfo));
-EXTERN(int) jpeg_consume_input JPP((j_decompress_ptr cinfo));
-/* Return value is one of: */
-/* #define JPEG_SUSPENDED	0    Suspended due to lack of input data */
-#define JPEG_REACHED_SOS	1 /* Reached start of new scan */
-#define JPEG_REACHED_EOI	2 /* Reached end of image */
-#define JPEG_ROW_COMPLETED	3 /* Completed one iMCU row */
-#define JPEG_SCAN_COMPLETED	4 /* Completed last iMCU row of a scan */
-
-/* Precalculate output dimensions for current decompression parameters. */
-EXTERN(void) jpeg_calc_output_dimensions JPP((j_decompress_ptr cinfo));
-
-/* Control saving of COM and APPn markers into marker_list. */
-EXTERN(void) jpeg_save_markers
-	JPP((j_decompress_ptr cinfo, int marker_code,
-	     unsigned int length_limit));
-
-/* Install a special processing method for COM or APPn markers. */
-EXTERN(void) jpeg_set_marker_processor
-	JPP((j_decompress_ptr cinfo, int marker_code,
-	     jpeg_marker_parser_method routine));
-
-/* Read or write raw DCT coefficients --- useful for lossless transcoding. */
-EXTERN(jvirt_barray_ptr *) jpeg_read_coefficients JPP((j_decompress_ptr cinfo));
-EXTERN(void) jpeg_write_coefficients JPP((j_compress_ptr cinfo,
-					  jvirt_barray_ptr * coef_arrays));
-EXTERN(void) jpeg_copy_critical_parameters JPP((j_decompress_ptr srcinfo,
-						j_compress_ptr dstinfo));
-
-/* If you choose to abort compression or decompression before completing
- * jpeg_finish_(de)compress, then you need to clean up to release memory,
- * temporary files, etc.  You can just call jpeg_destroy_(de)compress
- * if you're done with the JPEG object, but if you want to clean it up and
- * reuse it, call this:
- */
-EXTERN(void) jpeg_abort_compress JPP((j_compress_ptr cinfo));
-EXTERN(void) jpeg_abort_decompress JPP((j_decompress_ptr cinfo));
-
-/* Generic versions of jpeg_abort and jpeg_destroy that work on either
- * flavor of JPEG object.  These may be more convenient in some places.
- */
-EXTERN(void) jpeg_abort JPP((j_common_ptr cinfo));
-EXTERN(void) jpeg_destroy JPP((j_common_ptr cinfo));
-
-/* Default restart-marker-resync procedure for use by data source modules */
-EXTERN(boolean) jpeg_resync_to_restart JPP((j_decompress_ptr cinfo,
-					    int desired));
-
-
-/* These marker codes are exported since applications and data source modules
- * are likely to want to use them.
- */
-
-#define JPEG_RST0	0xD0	/* RST0 marker code */
-#define JPEG_EOI	0xD9	/* EOI marker code */
-#define JPEG_APP0	0xE0	/* APP0 marker code */
-#define JPEG_COM	0xFE	/* COM marker code */
-
-
-/* If we have a brain-damaged compiler that emits warnings (or worse, errors)
- * for structure definitions that are never filled in, keep it quiet by
- * supplying dummy definitions for the various substructures.
- */
-
-#ifdef INCOMPLETE_TYPES_BROKEN
-#ifndef JPEG_INTERNALS		/* will be defined in jpegint.h */
-struct jvirt_sarray_control { long dummy; };
-struct jvirt_barray_control { long dummy; };
-struct jpeg_comp_master { long dummy; };
-struct jpeg_c_main_controller { long dummy; };
-struct jpeg_c_prep_controller { long dummy; };
-struct jpeg_c_coef_controller { long dummy; };
-struct jpeg_marker_writer { long dummy; };
-struct jpeg_color_converter { long dummy; };
-struct jpeg_downsampler { long dummy; };
-struct jpeg_forward_dct { long dummy; };
-struct jpeg_entropy_encoder { long dummy; };
-struct jpeg_decomp_master { long dummy; };
-struct jpeg_d_main_controller { long dummy; };
-struct jpeg_d_coef_controller { long dummy; };
-struct jpeg_d_post_controller { long dummy; };
-struct jpeg_input_controller { long dummy; };
-struct jpeg_marker_reader { long dummy; };
-struct jpeg_entropy_decoder { long dummy; };
-struct jpeg_inverse_dct { long dummy; };
-struct jpeg_upsampler { long dummy; };
-struct jpeg_color_deconverter { long dummy; };
-struct jpeg_color_quantizer { long dummy; };
-#endif /* JPEG_INTERNALS */
-#endif /* INCOMPLETE_TYPES_BROKEN */
-
-
-/*
- * The JPEG library modules define JPEG_INTERNALS before including this file.
- * The internal structure declarations are read only when that is true.
- * Applications using the library should not include jpegint.h, but may wish
- * to include jerror.h.
- */
-
-#ifdef JPEG_INTERNALS
-#include "jpegint.h"		/* fetch private declarations */
-#include "jerror.h"		/* fetch error codes too */
-#endif
-
-#endif /* JPEGLIB_H */
diff --git a/extra_lib/include/js/jsapi.h b/extra_lib/include/js/jsapi.h
deleted file mode 100644
index 464f19f..0000000
--- a/extra_lib/include/js/jsapi.h
+++ /dev/null
@@ -1,2220 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * 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.
- *
- * The Original Code is Mozilla Communicator client code, released
- * March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef jsapi_h___
-#define jsapi_h___
-/*
- * JavaScript API.
- */
-#include <stddef.h>
-#include <stdio.h>
-#include "jspubtd.h"
-
-JS_BEGIN_EXTERN_C
-
-/*
- * Type tags stored in the low bits of a jsval.
- */
-#define JSVAL_OBJECT            0x0     /* untagged reference to object */
-#define JSVAL_INT               0x1     /* tagged 31-bit integer value */
-#define JSVAL_DOUBLE            0x2     /* tagged reference to double */
-#define JSVAL_STRING            0x4     /* tagged reference to string */
-#define JSVAL_BOOLEAN           0x6     /* tagged boolean value */
-
-/* Type tag bitfield length and derived macros. */
-#define JSVAL_TAGBITS           3
-#define JSVAL_TAGMASK           JS_BITMASK(JSVAL_TAGBITS)
-#define JSVAL_TAG(v)            ((v) & JSVAL_TAGMASK)
-#define JSVAL_SETTAG(v,t)       ((v) | (t))
-#define JSVAL_CLRTAG(v)         ((v) & ~(jsval)JSVAL_TAGMASK)
-#define JSVAL_ALIGN             JS_BIT(JSVAL_TAGBITS)
-
-/* Predicates for type testing. */
-#define JSVAL_IS_OBJECT(v)      (JSVAL_TAG(v) == JSVAL_OBJECT)
-#define JSVAL_IS_NUMBER(v)      (JSVAL_IS_INT(v) || JSVAL_IS_DOUBLE(v))
-#define JSVAL_IS_INT(v)         (((v) & JSVAL_INT) && (v) != JSVAL_VOID)
-#define JSVAL_IS_DOUBLE(v)      (JSVAL_TAG(v) == JSVAL_DOUBLE)
-#define JSVAL_IS_STRING(v)      (JSVAL_TAG(v) == JSVAL_STRING)
-#define JSVAL_IS_BOOLEAN(v)     (JSVAL_TAG(v) == JSVAL_BOOLEAN)
-#define JSVAL_IS_NULL(v)        ((v) == JSVAL_NULL)
-#define JSVAL_IS_VOID(v)        ((v) == JSVAL_VOID)
-#define JSVAL_IS_PRIMITIVE(v)   (!JSVAL_IS_OBJECT(v) || JSVAL_IS_NULL(v))
-
-/* Objects, strings, and doubles are GC'ed. */
-#define JSVAL_IS_GCTHING(v)     (!((v) & JSVAL_INT) && !JSVAL_IS_BOOLEAN(v))
-#define JSVAL_TO_GCTHING(v)     ((void *)JSVAL_CLRTAG(v))
-#define JSVAL_TO_OBJECT(v)      ((JSObject *)JSVAL_TO_GCTHING(v))
-#define JSVAL_TO_DOUBLE(v)      ((jsdouble *)JSVAL_TO_GCTHING(v))
-#define JSVAL_TO_STRING(v)      ((JSString *)JSVAL_TO_GCTHING(v))
-#define OBJECT_TO_JSVAL(obj)    ((jsval)(obj))
-#define DOUBLE_TO_JSVAL(dp)     JSVAL_SETTAG((jsval)(dp), JSVAL_DOUBLE)
-#define STRING_TO_JSVAL(str)    JSVAL_SETTAG((jsval)(str), JSVAL_STRING)
-
-/* Lock and unlock the GC thing held by a jsval. */
-#define JSVAL_LOCK(cx,v)        (JSVAL_IS_GCTHING(v)                          \
-                                 ? JS_LockGCThing(cx, JSVAL_TO_GCTHING(v))    \
-                                 : JS_TRUE)
-#define JSVAL_UNLOCK(cx,v)      (JSVAL_IS_GCTHING(v)                          \
-                                 ? JS_UnlockGCThing(cx, JSVAL_TO_GCTHING(v))  \
-                                 : JS_TRUE)
-
-/* Domain limits for the jsval int type. */
-#define JSVAL_INT_BITS          31
-#define JSVAL_INT_POW2(n)       ((jsval)1 << (n))
-#define JSVAL_INT_MIN           ((jsval)1 - JSVAL_INT_POW2(30))
-#define JSVAL_INT_MAX           (JSVAL_INT_POW2(30) - 1)
-#define INT_FITS_IN_JSVAL(i)    ((jsuint)((i)+JSVAL_INT_MAX) <= 2*JSVAL_INT_MAX)
-#define JSVAL_TO_INT(v)         ((jsint)(v) >> 1)
-#define INT_TO_JSVAL(i)         (((jsval)(i) << 1) | JSVAL_INT)
-
-/* Convert between boolean and jsval. */
-#define JSVAL_TO_BOOLEAN(v)     ((JSBool)((v) >> JSVAL_TAGBITS))
-#define BOOLEAN_TO_JSVAL(b)     JSVAL_SETTAG((jsval)(b) << JSVAL_TAGBITS,     \
-                                             JSVAL_BOOLEAN)
-
-/* A private data pointer (2-byte-aligned) can be stored as an int jsval. */
-#define JSVAL_TO_PRIVATE(v)     ((void *)((v) & ~JSVAL_INT))
-#define PRIVATE_TO_JSVAL(p)     ((jsval)(p) | JSVAL_INT)
-
-/* Property attributes, set in JSPropertySpec and passed to API functions. */
-#define JSPROP_ENUMERATE        0x01    /* property is visible to for/in loop */
-#define JSPROP_READONLY         0x02    /* not settable: assignment is no-op */
-#define JSPROP_PERMANENT        0x04    /* property cannot be deleted */
-#define JSPROP_EXPORTED         0x08    /* property is exported from object */
-#define JSPROP_GETTER           0x10    /* property holds getter function */
-#define JSPROP_SETTER           0x20    /* property holds setter function */
-#define JSPROP_SHARED           0x40    /* don't allocate a value slot for this
-                                           property; don't copy the property on
-                                           set of the same-named property in an
-                                           object that delegates to a prototype
-                                           containing this property */
-#define JSPROP_INDEX            0x80    /* name is actually (jsint) index */
-
-/* Function flags, set in JSFunctionSpec and passed to JS_NewFunction etc. */
-#define JSFUN_LAMBDA            0x08    /* expressed, not declared, function */
-#define JSFUN_GETTER            JSPROP_GETTER
-#define JSFUN_SETTER            JSPROP_SETTER
-#define JSFUN_BOUND_METHOD      0x40    /* bind this to fun->object's parent */
-#define JSFUN_HEAVYWEIGHT       0x80    /* activation requires a Call object */
-
-#define JSFUN_DISJOINT_FLAGS(f) ((f) & 0x0f)
-#define JSFUN_GSFLAGS(f)        ((f) & (JSFUN_GETTER | JSFUN_SETTER))
-
-#ifdef MOZILLA_1_8_BRANCH
-
-/*
- * Squeeze three more bits into existing 8-bit flags by taking advantage of
- * the invalid combination (JSFUN_GETTER | JSFUN_SETTER).
- */
-#define JSFUN_GETTER_TEST(f)       (JSFUN_GSFLAGS(f) == JSFUN_GETTER)
-#define JSFUN_SETTER_TEST(f)       (JSFUN_GSFLAGS(f) == JSFUN_SETTER)
-#define JSFUN_FLAGS_TEST(f,t)      (JSFUN_GSFLAGS(~(f)) ? (f) & (t) : 0)
-#define JSFUN_BOUND_METHOD_TEST(f) JSFUN_FLAGS_TEST(f, JSFUN_BOUND_METHOD)
-#define JSFUN_HEAVYWEIGHT_TEST(f)  JSFUN_FLAGS_TEST(f, JSFUN_HEAVYWEIGHT)
-
-#define JSFUN_GSFLAG2ATTR(f)       (JSFUN_GETTER_TEST(f) ? JSPROP_GETTER :    \
-                                    JSFUN_SETTER_TEST(f) ? JSPROP_SETTER : 0)
-
-#define JSFUN_THISP_FLAGS(f)    (JSFUN_GSFLAGS(~(f)) ? 0 :                    \
-                                 (f) & JSFUN_THISP_PRIMITIVE)
-#define JSFUN_THISP_TEST(f,t)   ((f) == (t) || (f) == JSFUN_THISP_PRIMITIVE)
-
-#define JSFUN_THISP_STRING      0x30    /* |this| may be a primitive string */
-#define JSFUN_THISP_NUMBER      0x70    /* |this| may be a primitive number */
-#define JSFUN_THISP_BOOLEAN     0xb0    /* |this| may be a primitive boolean */
-#define JSFUN_THISP_PRIMITIVE   0xf0    /* |this| may be any primitive value */
-
-#define JSFUN_FLAGS_MASK        0xf8    /* overlay JSFUN_* attributes */
-
-#else
-
-#define JSFUN_GETTER_TEST(f)       ((f) & JSFUN_GETTER)
-#define JSFUN_SETTER_TEST(f)       ((f) & JSFUN_SETTER)
-#define JSFUN_BOUND_METHOD_TEST(f) ((f) & JSFUN_BOUND_METHOD)
-#define JSFUN_HEAVYWEIGHT_TEST(f)  ((f) & JSFUN_HEAVYWEIGHT)
-
-#define JSFUN_GSFLAG2ATTR(f)       JSFUN_GSFLAGS(f)
-
-#define JSFUN_THISP_FLAGS(f)  (f)
-#define JSFUN_THISP_TEST(f,t) ((f) & t)
-
-#define JSFUN_THISP_STRING    0x0100    /* |this| may be a primitive string */
-#define JSFUN_THISP_NUMBER    0x0200    /* |this| may be a primitive number */
-#define JSFUN_THISP_BOOLEAN   0x0400    /* |this| may be a primitive boolean */
-#define JSFUN_THISP_PRIMITIVE 0x0700    /* |this| may be any primitive value */
-
-#define JSFUN_FLAGS_MASK      0x07f8    /* overlay JSFUN_* attributes --
-                                           note that bit #15 is used internally
-                                           to flag interpreted functions */
-
-#endif
-
-/*
- * Re-use JSFUN_LAMBDA, which applies only to scripted functions, for use in
- * JSFunctionSpec arrays that specify generic native prototype methods, i.e.,
- * methods of a class prototype that are exposed as static methods taking an
- * extra leading argument: the generic |this| parameter.
- *
- * If you set this flag in a JSFunctionSpec struct's flags initializer, then
- * that struct must live at least as long as the native static method object
- * created due to this flag by JS_DefineFunctions or JS_InitClass.  Typically
- * JSFunctionSpec structs are allocated in static arrays.
- */
-#define JSFUN_GENERIC_NATIVE    JSFUN_LAMBDA
-
-/*
- * Well-known JS values.  The extern'd variables are initialized when the
- * first JSContext is created by JS_NewContext (see below).
- */
-#define JSVAL_VOID              INT_TO_JSVAL(0 - JSVAL_INT_POW2(30))
-#define JSVAL_NULL              OBJECT_TO_JSVAL(0)
-#define JSVAL_ZERO              INT_TO_JSVAL(0)
-#define JSVAL_ONE               INT_TO_JSVAL(1)
-#define JSVAL_FALSE             BOOLEAN_TO_JSVAL(JS_FALSE)
-#define JSVAL_TRUE              BOOLEAN_TO_JSVAL(JS_TRUE)
-
-/*
- * Microseconds since the epoch, midnight, January 1, 1970 UTC.  See the
- * comment in jstypes.h regarding safe int64 usage.
- */
-extern JS_PUBLIC_API(int64)
-JS_Now();
-
-/* Don't want to export data, so provide accessors for non-inline jsvals. */
-extern JS_PUBLIC_API(jsval)
-JS_GetNaNValue(JSContext *cx);
-
-extern JS_PUBLIC_API(jsval)
-JS_GetNegativeInfinityValue(JSContext *cx);
-
-extern JS_PUBLIC_API(jsval)
-JS_GetPositiveInfinityValue(JSContext *cx);
-
-extern JS_PUBLIC_API(jsval)
-JS_GetEmptyStringValue(JSContext *cx);
-
-/*
- * Format is a string of the following characters (spaces are insignificant),
- * specifying the tabulated type conversions:
- *
- *   b      JSBool          Boolean
- *   c      uint16/jschar   ECMA uint16, Unicode char
- *   i      int32           ECMA int32
- *   u      uint32          ECMA uint32
- *   j      int32           Rounded int32 (coordinate)
- *   d      jsdouble        IEEE double
- *   I      jsdouble        Integral IEEE double
- *   s      char *          C string
- *   S      JSString *      Unicode string, accessed by a JSString pointer
- *   W      jschar *        Unicode character vector, 0-terminated (W for wide)
- *   o      JSObject *      Object reference
- *   f      JSFunction *    Function private
- *   v      jsval           Argument value (no conversion)
- *   *      N/A             Skip this argument (no vararg)
- *   /      N/A             End of required arguments
- *
- * The variable argument list after format must consist of &b, &c, &s, e.g.,
- * where those variables have the types given above.  For the pointer types
- * char *, JSString *, and JSObject *, the pointed-at memory returned belongs
- * to the JS runtime, not to the calling native code.  The runtime promises
- * to keep this memory valid so long as argv refers to allocated stack space
- * (so long as the native function is active).
- *
- * Fewer arguments than format specifies may be passed only if there is a /
- * in format after the last required argument specifier and argc is at least
- * the number of required arguments.  More arguments than format specifies
- * may be passed without error; it is up to the caller to deal with trailing
- * unconverted arguments.
- */
-extern JS_PUBLIC_API(JSBool)
-JS_ConvertArguments(JSContext *cx, uintN argc, jsval *argv, const char *format,
-                    ...);
-
-#ifdef va_start
-extern JS_PUBLIC_API(JSBool)
-JS_ConvertArgumentsVA(JSContext *cx, uintN argc, jsval *argv,
-                      const char *format, va_list ap);
-#endif
-
-/*
- * Inverse of JS_ConvertArguments: scan format and convert trailing arguments
- * into jsvals, GC-rooted if necessary by the JS stack.  Return null on error,
- * and a pointer to the new argument vector on success.  Also return a stack
- * mark on success via *markp, in which case the caller must eventually clean
- * up by calling JS_PopArguments.
- *
- * Note that the number of actual arguments supplied is specified exclusively
- * by format, so there is no argc parameter.
- */
-extern JS_PUBLIC_API(jsval *)
-JS_PushArguments(JSContext *cx, void **markp, const char *format, ...);
-
-#ifdef va_start
-extern JS_PUBLIC_API(jsval *)
-JS_PushArgumentsVA(JSContext *cx, void **markp, const char *format, va_list ap);
-#endif
-
-extern JS_PUBLIC_API(void)
-JS_PopArguments(JSContext *cx, void *mark);
-
-#ifdef JS_ARGUMENT_FORMATTER_DEFINED
-
-/*
- * Add and remove a format string handler for JS_{Convert,Push}Arguments{,VA}.
- * The handler function has this signature (see jspubtd.h):
- *
- *   JSBool MyArgumentFormatter(JSContext *cx, const char *format,
- *                              JSBool fromJS, jsval **vpp, va_list *app);
- *
- * It should return true on success, and return false after reporting an error
- * or detecting an already-reported error.
- *
- * For a given format string, for example "AA", the formatter is called from
- * JS_ConvertArgumentsVA like so:
- *
- *   formatter(cx, "AA...", JS_TRUE, &sp, &ap);
- *
- * sp points into the arguments array on the JS stack, while ap points into
- * the stdarg.h va_list on the C stack.  The JS_TRUE passed for fromJS tells
- * the formatter to convert zero or more jsvals at sp to zero or more C values
- * accessed via pointers-to-values at ap, updating both sp (via *vpp) and ap
- * (via *app) to point past the converted arguments and their result pointers
- * on the C stack.
- *
- * When called from JS_PushArgumentsVA, the formatter is invoked thus:
- *
- *   formatter(cx, "AA...", JS_FALSE, &sp, &ap);
- *
- * where JS_FALSE for fromJS means to wrap the C values at ap according to the
- * format specifier and store them at sp, updating ap and sp appropriately.
- *
- * The "..." after "AA" is the rest of the format string that was passed into
- * JS_{Convert,Push}Arguments{,VA}.  The actual format trailing substring used
- * in each Convert or PushArguments call is passed to the formatter, so that
- * one such function may implement several formats, in order to share code.
- *
- * Remove just forgets about any handler associated with format.  Add does not
- * copy format, it points at the string storage allocated by the caller, which
- * is typically a string constant.  If format is in dynamic storage, it is up
- * to the caller to keep the string alive until Remove is called.
- */
-extern JS_PUBLIC_API(JSBool)
-JS_AddArgumentFormatter(JSContext *cx, const char *format,
-                        JSArgumentFormatter formatter);
-
-extern JS_PUBLIC_API(void)
-JS_RemoveArgumentFormatter(JSContext *cx, const char *format);
-
-#endif /* JS_ARGUMENT_FORMATTER_DEFINED */
-
-extern JS_PUBLIC_API(JSBool)
-JS_ConvertValue(JSContext *cx, jsval v, JSType type, jsval *vp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_ValueToObject(JSContext *cx, jsval v, JSObject **objp);
-
-extern JS_PUBLIC_API(JSFunction *)
-JS_ValueToFunction(JSContext *cx, jsval v);
-
-extern JS_PUBLIC_API(JSFunction *)
-JS_ValueToConstructor(JSContext *cx, jsval v);
-
-extern JS_PUBLIC_API(JSString *)
-JS_ValueToString(JSContext *cx, jsval v);
-
-extern JS_PUBLIC_API(JSBool)
-JS_ValueToNumber(JSContext *cx, jsval v, jsdouble *dp);
-
-/*
- * Convert a value to a number, then to an int32, according to the ECMA rules
- * for ToInt32.
- */
-extern JS_PUBLIC_API(JSBool)
-JS_ValueToECMAInt32(JSContext *cx, jsval v, int32 *ip);
-
-/*
- * Convert a value to a number, then to a uint32, according to the ECMA rules
- * for ToUint32.
- */
-extern JS_PUBLIC_API(JSBool)
-JS_ValueToECMAUint32(JSContext *cx, jsval v, uint32 *ip);
-
-/*
- * Convert a value to a number, then to an int32 if it fits by rounding to
- * nearest; but failing with an error report if the double is out of range
- * or unordered.
- */
-extern JS_PUBLIC_API(JSBool)
-JS_ValueToInt32(JSContext *cx, jsval v, int32 *ip);
-
-/*
- * ECMA ToUint16, for mapping a jsval to a Unicode point.
- */
-extern JS_PUBLIC_API(JSBool)
-JS_ValueToUint16(JSContext *cx, jsval v, uint16 *ip);
-
-extern JS_PUBLIC_API(JSBool)
-JS_ValueToBoolean(JSContext *cx, jsval v, JSBool *bp);
-
-extern JS_PUBLIC_API(JSType)
-JS_TypeOfValue(JSContext *cx, jsval v);
-
-extern JS_PUBLIC_API(const char *)
-JS_GetTypeName(JSContext *cx, JSType type);
-
-/************************************************************************/
-
-/*
- * Initialization, locking, contexts, and memory allocation.
- */
-#define JS_NewRuntime       JS_Init
-#define JS_DestroyRuntime   JS_Finish
-#define JS_LockRuntime      JS_Lock
-#define JS_UnlockRuntime    JS_Unlock
-
-extern JS_PUBLIC_API(JSRuntime *)
-JS_NewRuntime(uint32 maxbytes);
-
-extern JS_PUBLIC_API(void)
-JS_DestroyRuntime(JSRuntime *rt);
-
-extern JS_PUBLIC_API(void)
-JS_ShutDown(void);
-
-JS_PUBLIC_API(void *)
-JS_GetRuntimePrivate(JSRuntime *rt);
-
-JS_PUBLIC_API(void)
-JS_SetRuntimePrivate(JSRuntime *rt, void *data);
-
-#ifdef JS_THREADSAFE
-
-extern JS_PUBLIC_API(void)
-JS_BeginRequest(JSContext *cx);
-
-extern JS_PUBLIC_API(void)
-JS_EndRequest(JSContext *cx);
-
-/* Yield to pending GC operations, regardless of request depth */
-extern JS_PUBLIC_API(void)
-JS_YieldRequest(JSContext *cx);
-
-extern JS_PUBLIC_API(jsrefcount)
-JS_SuspendRequest(JSContext *cx);
-
-extern JS_PUBLIC_API(void)
-JS_ResumeRequest(JSContext *cx, jsrefcount saveDepth);
-
-#ifdef __cplusplus
-JS_END_EXTERN_C
-
-class JSAutoRequest {
-  public:
-    JSAutoRequest(JSContext *cx) : mContext(cx), mSaveDepth(0) {
-        JS_BeginRequest(mContext);
-    }
-    ~JSAutoRequest() {
-        JS_EndRequest(mContext);
-    }
-
-    void suspend() {
-        mSaveDepth = JS_SuspendRequest(mContext);
-    }
-    void resume() {
-        JS_ResumeRequest(mContext, mSaveDepth);
-    }
-
-  protected:
-    JSContext *mContext;
-    jsrefcount mSaveDepth;
-
-#if 0
-  private:
-    static void *operator new(size_t) CPP_THROW_NEW { return 0; };
-    static void operator delete(void *, size_t) { };
-#endif
-};
-
-JS_BEGIN_EXTERN_C
-#endif
-
-#endif /* JS_THREADSAFE */
-
-extern JS_PUBLIC_API(void)
-JS_Lock(JSRuntime *rt);
-
-extern JS_PUBLIC_API(void)
-JS_Unlock(JSRuntime *rt);
-
-extern JS_PUBLIC_API(JSContextCallback)
-JS_SetContextCallback(JSRuntime *rt, JSContextCallback cxCallback);
-
-extern JS_PUBLIC_API(JSContext *)
-JS_NewContext(JSRuntime *rt, size_t stackChunkSize);
-
-extern JS_PUBLIC_API(void)
-JS_DestroyContext(JSContext *cx);
-
-extern JS_PUBLIC_API(void)
-JS_DestroyContextNoGC(JSContext *cx);
-
-extern JS_PUBLIC_API(void)
-JS_DestroyContextMaybeGC(JSContext *cx);
-
-extern JS_PUBLIC_API(void *)
-JS_GetContextPrivate(JSContext *cx);
-
-extern JS_PUBLIC_API(void)
-JS_SetContextPrivate(JSContext *cx, void *data);
-
-extern JS_PUBLIC_API(JSRuntime *)
-JS_GetRuntime(JSContext *cx);
-
-extern JS_PUBLIC_API(JSContext *)
-JS_ContextIterator(JSRuntime *rt, JSContext **iterp);
-
-extern JS_PUBLIC_API(JSVersion)
-JS_GetVersion(JSContext *cx);
-
-extern JS_PUBLIC_API(JSVersion)
-JS_SetVersion(JSContext *cx, JSVersion version);
-
-extern JS_PUBLIC_API(const char *)
-JS_VersionToString(JSVersion version);
-
-extern JS_PUBLIC_API(JSVersion)
-JS_StringToVersion(const char *string);
-
-/*
- * JS options are orthogonal to version, and may be freely composed with one
- * another as well as with version.
- *
- * JSOPTION_VAROBJFIX is recommended -- see the comments associated with the
- * prototypes for JS_ExecuteScript, JS_EvaluateScript, etc.
- */
-#define JSOPTION_STRICT         JS_BIT(0)       /* warn on dubious practice */
-#define JSOPTION_WERROR         JS_BIT(1)       /* convert warning to error */
-#define JSOPTION_VAROBJFIX      JS_BIT(2)       /* make JS_EvaluateScript use
-                                                   the last object on its 'obj'
-                                                   param's scope chain as the
-                                                   ECMA 'variables object' */
-#define JSOPTION_PRIVATE_IS_NSISUPPORTS \
-                                JS_BIT(3)       /* context private data points
-                                                   to an nsISupports subclass */
-#define JSOPTION_COMPILE_N_GO   JS_BIT(4)       /* caller of JS_Compile*Script
-                                                   promises to execute compiled
-                                                   script once only; enables
-                                                   compile-time scope chain
-                                                   resolution of consts. */
-#define JSOPTION_ATLINE         JS_BIT(5)       /* //@line number ["filename"]
-                                                   option supported for the
-                                                   XUL preprocessor and kindred
-                                                   beasts. */
-#define JSOPTION_XML            JS_BIT(6)       /* EMCAScript for XML support:
-                                                   parse <!-- --> as a token,
-                                                   not backward compatible with
-                                                   the comment-hiding hack used
-                                                   in HTML script tags. */
-#define JSOPTION_NATIVE_BRANCH_CALLBACK \
-                                JS_BIT(7)       /* the branch callback set by
-                                                   JS_SetBranchCallback may be
-                                                   called with a null script
-                                                   parameter, by native code
-                                                   that loops intensively */
-#define JSOPTION_DONT_REPORT_UNCAUGHT \
-                                JS_BIT(8)       /* When returning from the
-                                                   outermost API call, prevent
-                                                   uncaught exceptions from
-                                                   being converted to error
-                                                   reports */
-
-extern JS_PUBLIC_API(uint32)
-JS_GetOptions(JSContext *cx);
-
-extern JS_PUBLIC_API(uint32)
-JS_SetOptions(JSContext *cx, uint32 options);
-
-extern JS_PUBLIC_API(uint32)
-JS_ToggleOptions(JSContext *cx, uint32 options);
-
-extern JS_PUBLIC_API(const char *)
-JS_GetImplementationVersion(void);
-
-extern JS_PUBLIC_API(JSObject *)
-JS_GetGlobalObject(JSContext *cx);
-
-extern JS_PUBLIC_API(void)
-JS_SetGlobalObject(JSContext *cx, JSObject *obj);
-
-/*
- * Initialize standard JS class constructors, prototypes, and any top-level
- * functions and constants associated with the standard classes (e.g. isNaN
- * for Number).
- *
- * NB: This sets cx's global object to obj if it was null.
- */
-extern JS_PUBLIC_API(JSBool)
-JS_InitStandardClasses(JSContext *cx, JSObject *obj);
-
-/*
- * Resolve id, which must contain either a string or an int, to a standard
- * class name in obj if possible, defining the class's constructor and/or
- * prototype and storing true in *resolved.  If id does not name a standard
- * class or a top-level property induced by initializing a standard class,
- * store false in *resolved and just return true.  Return false on error,
- * as usual for JSBool result-typed API entry points.
- *
- * This API can be called directly from a global object class's resolve op,
- * to define standard classes lazily.  The class's enumerate op should call
- * JS_EnumerateStandardClasses(cx, obj), to define eagerly during for..in
- * loops any classes not yet resolved lazily.
- */
-extern JS_PUBLIC_API(JSBool)
-JS_ResolveStandardClass(JSContext *cx, JSObject *obj, jsval id,
-                        JSBool *resolved);
-
-extern JS_PUBLIC_API(JSBool)
-JS_EnumerateStandardClasses(JSContext *cx, JSObject *obj);
-
-/*
- * Enumerate any already-resolved standard class ids into ida, or into a new
- * JSIdArray if ida is null.  Return the augmented array on success, null on
- * failure with ida (if it was non-null on entry) destroyed.
- */
-extern JS_PUBLIC_API(JSIdArray *)
-JS_EnumerateResolvedStandardClasses(JSContext *cx, JSObject *obj,
-                                    JSIdArray *ida);
-
-extern JS_PUBLIC_API(JSBool)
-JS_GetClassObject(JSContext *cx, JSObject *obj, JSProtoKey key,
-                  JSObject **objp);
-
-extern JS_PUBLIC_API(JSObject *)
-JS_GetScopeChain(JSContext *cx);
-
-extern JS_PUBLIC_API(void *)
-JS_malloc(JSContext *cx, size_t nbytes);
-
-extern JS_PUBLIC_API(void *)
-JS_realloc(JSContext *cx, void *p, size_t nbytes);
-
-extern JS_PUBLIC_API(void)
-JS_free(JSContext *cx, void *p);
-
-extern JS_PUBLIC_API(char *)
-JS_strdup(JSContext *cx, const char *s);
-
-extern JS_PUBLIC_API(jsdouble *)
-JS_NewDouble(JSContext *cx, jsdouble d);
-
-extern JS_PUBLIC_API(JSBool)
-JS_NewDoubleValue(JSContext *cx, jsdouble d, jsval *rval);
-
-extern JS_PUBLIC_API(JSBool)
-JS_NewNumberValue(JSContext *cx, jsdouble d, jsval *rval);
-
-/*
- * A JS GC root is a pointer to a JSObject *, JSString *, or jsdouble * that
- * itself points into the GC heap (more recently, we support this extension:
- * a root may be a pointer to a jsval v for which JSVAL_IS_GCTHING(v) is true).
- *
- * Therefore, you never pass JSObject *obj to JS_AddRoot(cx, obj).  You always
- * call JS_AddRoot(cx, &obj), passing obj by reference.  And later, before obj
- * or the structure it is embedded within goes out of scope or is freed, you
- * must call JS_RemoveRoot(cx, &obj).
- *
- * Also, use JS_AddNamedRoot(cx, &structPtr->memberObj, "structPtr->memberObj")
- * in preference to JS_AddRoot(cx, &structPtr->memberObj), in order to identify
- * roots by their source callsites.  This way, you can find the callsite while
- * debugging if you should fail to do JS_RemoveRoot(cx, &structPtr->memberObj)
- * before freeing structPtr's memory.
- */
-extern JS_PUBLIC_API(JSBool)
-JS_AddRoot(JSContext *cx, void *rp);
-
-#ifdef NAME_ALL_GC_ROOTS
-#define JS_DEFINE_TO_TOKEN(def) #def
-#define JS_DEFINE_TO_STRING(def) JS_DEFINE_TO_TOKEN(def)
-#define JS_AddRoot(cx,rp) JS_AddNamedRoot((cx), (rp), (__FILE__ ":" JS_TOKEN_TO_STRING(__LINE__))
-#endif
-
-extern JS_PUBLIC_API(JSBool)
-JS_AddNamedRoot(JSContext *cx, void *rp, const char *name);
-
-extern JS_PUBLIC_API(JSBool)
-JS_AddNamedRootRT(JSRuntime *rt, void *rp, const char *name);
-
-extern JS_PUBLIC_API(JSBool)
-JS_RemoveRoot(JSContext *cx, void *rp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_RemoveRootRT(JSRuntime *rt, void *rp);
-
-/*
- * The last GC thing of each type (object, string, double, external string
- * types) created on a given context is kept alive until another thing of the
- * same type is created, using a newborn root in the context.  These newborn
- * roots help native code protect newly-created GC-things from GC invocations
- * activated before those things can be rooted using local or global roots.
- *
- * However, the newborn roots can also entrain great gobs of garbage, so the
- * JS_GC entry point clears them for the context on which GC is being forced.
- * Embeddings may need to do likewise for all contexts.
- *
- * See the scoped local root API immediately below for a better way to manage
- * newborns in cases where native hooks (functions, getters, setters, etc.)
- * create many GC-things, potentially without connecting them to predefined
- * local roots such as *rval or argv[i] in an active native function.  Using
- * JS_EnterLocalRootScope disables updating of the context's per-gc-thing-type
- * newborn roots, until control flow unwinds and leaves the outermost nesting
- * local root scope.
- */
-extern JS_PUBLIC_API(void)
-JS_ClearNewbornRoots(JSContext *cx);
-
-/*
- * Scoped local root management allows native functions, getter/setters, etc.
- * to avoid worrying about the newborn root pigeon-holes, overloading local
- * roots allocated in argv and *rval, or ending up having to call JS_Add*Root
- * and JS_RemoveRoot to manage global roots temporarily.
- *
- * Instead, calling JS_EnterLocalRootScope and JS_LeaveLocalRootScope around
- * the body of the native hook causes the engine to allocate a local root for
- * each newborn created in between the two API calls, using a local root stack
- * associated with cx.  For example:
- *
- *    JSBool
- *    my_GetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
- *    {
- *        JSBool ok;
- *
- *        if (!JS_EnterLocalRootScope(cx))
- *            return JS_FALSE;
- *        ok = my_GetPropertyBody(cx, obj, id, vp);
- *        JS_LeaveLocalRootScope(cx);
- *        return ok;
- *    }
- *
- * NB: JS_LeaveLocalRootScope must be called once for every prior successful
- * call to JS_EnterLocalRootScope.  If JS_EnterLocalRootScope fails, you must
- * not make the matching JS_LeaveLocalRootScope call.
- *
- * JS_LeaveLocalRootScopeWithResult(cx, rval) is an alternative way to leave
- * a local root scope that protects a result or return value, by effectively
- * pushing it in the caller's local root scope.
- *
- * In case a native hook allocates many objects or other GC-things, but the
- * native protects some of those GC-things by storing them as property values
- * in an object that is itself protected, the hook can call JS_ForgetLocalRoot
- * to free the local root automatically pushed for the now-protected GC-thing.
- *
- * JS_ForgetLocalRoot works on any GC-thing allocated in the current local
- * root scope, but it's more time-efficient when called on references to more
- * recently created GC-things.  Calling it successively on other than the most
- * recently allocated GC-thing will tend to average the time inefficiency, and
- * may risk O(n^2) growth rate, but in any event, you shouldn't allocate too
- * many local roots if you can root as you go (build a tree of objects from
- * the top down, forgetting each latest-allocated GC-thing immediately upon
- * linking it to its parent).
- */
-extern JS_PUBLIC_API(JSBool)
-JS_EnterLocalRootScope(JSContext *cx);
-
-extern JS_PUBLIC_API(void)
-JS_LeaveLocalRootScope(JSContext *cx);
-
-extern JS_PUBLIC_API(void)
-JS_LeaveLocalRootScopeWithResult(JSContext *cx, jsval rval);
-
-extern JS_PUBLIC_API(void)
-JS_ForgetLocalRoot(JSContext *cx, void *thing);
-
-#ifdef __cplusplus
-JS_END_EXTERN_C
-
-class JSAutoLocalRootScope {
-  public:
-    JSAutoLocalRootScope(JSContext *cx) : mContext(cx) {
-        JS_EnterLocalRootScope(mContext);
-    }
-    ~JSAutoLocalRootScope() {
-        JS_LeaveLocalRootScope(mContext);
-    }
-
-    void forget(void *thing) {
-        JS_ForgetLocalRoot(mContext, thing);
-    }
-
-  protected:
-    JSContext *mContext;
-
-#if 0
-  private:
-    static void *operator new(size_t) CPP_THROW_NEW { return 0; };
-    static void operator delete(void *, size_t) { };
-#endif
-};
-
-JS_BEGIN_EXTERN_C
-#endif
-
-#ifdef DEBUG
-extern JS_PUBLIC_API(void)
-JS_DumpNamedRoots(JSRuntime *rt,
-                  void (*dump)(const char *name, void *rp, void *data),
-                  void *data);
-#endif
-
-/*
- * Call JS_MapGCRoots to map the GC's roots table using map(rp, name, data).
- * The root is pointed at by rp; if the root is unnamed, name is null; data is
- * supplied from the third parameter to JS_MapGCRoots.
- *
- * The map function should return JS_MAP_GCROOT_REMOVE to cause the currently
- * enumerated root to be removed.  To stop enumeration, set JS_MAP_GCROOT_STOP
- * in the return value.  To keep on mapping, return JS_MAP_GCROOT_NEXT.  These
- * constants are flags; you can OR them together.
- *
- * This function acquires and releases rt's GC lock around the mapping of the
- * roots table, so the map function should run to completion in as few cycles
- * as possible.  Of course, map cannot call JS_GC, JS_MaybeGC, JS_BeginRequest,
- * or any JS API entry point that acquires locks, without double-tripping or
- * deadlocking on the GC lock.
- *
- * JS_MapGCRoots returns the count of roots that were successfully mapped.
- */
-#define JS_MAP_GCROOT_NEXT      0       /* continue mapping entries */
-#define JS_MAP_GCROOT_STOP      1       /* stop mapping entries */
-#define JS_MAP_GCROOT_REMOVE    2       /* remove and free the current entry */
-
-typedef intN
-(* JS_DLL_CALLBACK JSGCRootMapFun)(void *rp, const char *name, void *data);
-
-extern JS_PUBLIC_API(uint32)
-JS_MapGCRoots(JSRuntime *rt, JSGCRootMapFun map, void *data);
-
-extern JS_PUBLIC_API(JSBool)
-JS_LockGCThing(JSContext *cx, void *thing);
-
-extern JS_PUBLIC_API(JSBool)
-JS_LockGCThingRT(JSRuntime *rt, void *thing);
-
-extern JS_PUBLIC_API(JSBool)
-JS_UnlockGCThing(JSContext *cx, void *thing);
-
-extern JS_PUBLIC_API(JSBool)
-JS_UnlockGCThingRT(JSRuntime *rt, void *thing);
-
-/*
- * For implementors of JSObjectOps.mark, to mark a GC-thing reachable via a
- * property or other strong ref identified for debugging purposes by name.
- * The name argument's storage needs to live only as long as the call to
- * this routine.
- *
- * The final arg is used by GC_MARK_DEBUG code to build a ref path through
- * the GC's live thing graph.  Implementors of JSObjectOps.mark should pass
- * its final arg through to this function when marking all GC-things that are
- * directly reachable from the object being marked.
- *
- * See the JSMarkOp typedef in jspubtd.h, and the JSObjectOps struct below.
- */
-extern JS_PUBLIC_API(void)
-JS_MarkGCThing(JSContext *cx, void *thing, const char *name, void *arg);
-
-extern JS_PUBLIC_API(void)
-JS_GC(JSContext *cx);
-
-extern JS_PUBLIC_API(void)
-JS_MaybeGC(JSContext *cx);
-
-extern JS_PUBLIC_API(JSGCCallback)
-JS_SetGCCallback(JSContext *cx, JSGCCallback cb);
-
-extern JS_PUBLIC_API(JSGCCallback)
-JS_SetGCCallbackRT(JSRuntime *rt, JSGCCallback cb);
-
-extern JS_PUBLIC_API(JSBool)
-JS_IsAboutToBeFinalized(JSContext *cx, void *thing);
-
-typedef enum JSGCParamKey {
-    JSGC_MAX_BYTES        = 0,  /* maximum nominal heap before last ditch GC */
-    JSGC_MAX_MALLOC_BYTES = 1   /* # of JS_malloc bytes before last ditch GC */
-} JSGCParamKey;
-
-extern JS_PUBLIC_API(void)
-JS_SetGCParameter(JSRuntime *rt, JSGCParamKey key, uint32 value);
-
-/*
- * Add a finalizer for external strings created by JS_NewExternalString (see
- * below) using a type-code returned from this function, and that understands
- * how to free or release the memory pointed at by JS_GetStringChars(str).
- *
- * Return a nonnegative type index if there is room for finalizer in the
- * global GC finalizers table, else return -1.  If the engine is compiled
- * JS_THREADSAFE and used in a multi-threaded environment, this function must
- * be invoked on the primordial thread only, at startup -- or else the entire
- * program must single-thread itself while loading a module that calls this
- * function.
- */
-extern JS_PUBLIC_API(intN)
-JS_AddExternalStringFinalizer(JSStringFinalizeOp finalizer);
-
-/*
- * Remove finalizer from the global GC finalizers table, returning its type
- * code if found, -1 if not found.
- *
- * As with JS_AddExternalStringFinalizer, there is a threading restriction
- * if you compile the engine JS_THREADSAFE: this function may be called for a
- * given finalizer pointer on only one thread; different threads may call to
- * remove distinct finalizers safely.
- *
- * You must ensure that all strings with finalizer's type have been collected
- * before calling this function.  Otherwise, string data will be leaked by the
- * GC, for want of a finalizer to call.
- */
-extern JS_PUBLIC_API(intN)
-JS_RemoveExternalStringFinalizer(JSStringFinalizeOp finalizer);
-
-/*
- * Create a new JSString whose chars member refers to external memory, i.e.,
- * memory requiring special, type-specific finalization.  The type code must
- * be a nonnegative return value from JS_AddExternalStringFinalizer.
- */
-extern JS_PUBLIC_API(JSString *)
-JS_NewExternalString(JSContext *cx, jschar *chars, size_t length, intN type);
-
-/*
- * Returns the external-string finalizer index for this string, or -1 if it is
- * an "internal" (native to JS engine) string.
- */
-extern JS_PUBLIC_API(intN)
-JS_GetExternalStringGCType(JSRuntime *rt, JSString *str);
-
-/*
- * Sets maximum (if stack grows upward) or minimum (downward) legal stack byte
- * address in limitAddr for the thread or process stack used by cx.  To disable
- * stack size checking, pass 0 for limitAddr.
- */
-extern JS_PUBLIC_API(void)
-JS_SetThreadStackLimit(JSContext *cx, jsuword limitAddr);
-
-/************************************************************************/
-
-/*
- * Classes, objects, and properties.
- */
-
-/* For detailed comments on the function pointer types, see jspubtd.h. */
-struct JSClass {
-    const char          *name;
-    uint32              flags;
-
-    /* Mandatory non-null function pointer members. */
-    JSPropertyOp        addProperty;
-    JSPropertyOp        delProperty;
-    JSPropertyOp        getProperty;
-    JSPropertyOp        setProperty;
-    JSEnumerateOp       enumerate;
-    JSResolveOp         resolve;
-    JSConvertOp         convert;
-    JSFinalizeOp        finalize;
-
-    /* Optionally non-null members start here. */
-    JSGetObjectOps      getObjectOps;
-    JSCheckAccessOp     checkAccess;
-    JSNative            call;
-    JSNative            construct;
-    JSXDRObjectOp       xdrObject;
-    JSHasInstanceOp     hasInstance;
-    JSMarkOp            mark;
-    JSReserveSlotsOp    reserveSlots;
-};
-
-struct JSExtendedClass {
-    JSClass             base;
-    JSEqualityOp        equality;
-    JSObjectOp          outerObject;
-    JSObjectOp          innerObject;
-    void                (*reserved0)();
-    void                (*reserved1)();
-    void                (*reserved2)();
-    void                (*reserved3)();
-    void                (*reserved4)();
-};
-
-#define JSCLASS_HAS_PRIVATE             (1<<0)  /* objects have private slot */
-#define JSCLASS_NEW_ENUMERATE           (1<<1)  /* has JSNewEnumerateOp hook */
-#define JSCLASS_NEW_RESOLVE             (1<<2)  /* has JSNewResolveOp hook */
-#define JSCLASS_PRIVATE_IS_NSISUPPORTS  (1<<3)  /* private is (nsISupports *) */
-#define JSCLASS_SHARE_ALL_PROPERTIES    (1<<4)  /* all properties are SHARED */
-#define JSCLASS_NEW_RESOLVE_GETS_START  (1<<5)  /* JSNewResolveOp gets starting
-                                                   object in prototype chain
-                                                   passed in via *objp in/out
-                                                   parameter */
-#define JSCLASS_CONSTRUCT_PROTOTYPE     (1<<6)  /* call constructor on class
-                                                   prototype */
-#define JSCLASS_DOCUMENT_OBSERVER       (1<<7)  /* DOM document observer */
-
-/*
- * To reserve slots fetched and stored via JS_Get/SetReservedSlot, bitwise-or
- * JSCLASS_HAS_RESERVED_SLOTS(n) into the initializer for JSClass.flags, where
- * n is a constant in [1, 255].  Reserved slots are indexed from 0 to n-1.
- */
-#define JSCLASS_RESERVED_SLOTS_SHIFT    8       /* room for 8 flags below */
-#define JSCLASS_RESERVED_SLOTS_WIDTH    8       /* and 16 above this field */
-#define JSCLASS_RESERVED_SLOTS_MASK     JS_BITMASK(JSCLASS_RESERVED_SLOTS_WIDTH)
-#define JSCLASS_HAS_RESERVED_SLOTS(n)   (((n) & JSCLASS_RESERVED_SLOTS_MASK)  \
-                                         << JSCLASS_RESERVED_SLOTS_SHIFT)
-#define JSCLASS_RESERVED_SLOTS(clasp)   (((clasp)->flags                      \
-                                          >> JSCLASS_RESERVED_SLOTS_SHIFT)    \
-                                         & JSCLASS_RESERVED_SLOTS_MASK)
-
-#define JSCLASS_HIGH_FLAGS_SHIFT        (JSCLASS_RESERVED_SLOTS_SHIFT +       \
-                                         JSCLASS_RESERVED_SLOTS_WIDTH)
-
-/* True if JSClass is really a JSExtendedClass. */
-#define JSCLASS_IS_EXTENDED             (1<<(JSCLASS_HIGH_FLAGS_SHIFT+0))
-#define JSCLASS_IS_ANONYMOUS            (1<<(JSCLASS_HIGH_FLAGS_SHIFT+1))
-#define JSCLASS_IS_GLOBAL               (1<<(JSCLASS_HIGH_FLAGS_SHIFT+2))
-
-/*
- * ECMA-262 requires that most constructors used internally create objects
- * with "the original Foo.prototype value" as their [[Prototype]] (__proto__)
- * member initial value.  The "original ... value" verbiage is there because
- * in ECMA-262, global properties naming class objects are read/write and
- * deleteable, for the most part.
- *
- * Implementing this efficiently requires that global objects have classes
- * with the following flags.  Failure to use JSCLASS_GLOBAL_FLAGS won't break
- * anything except the ECMA-262 "original prototype value" behavior, which was
- * broken for years in SpiderMonkey.  In other words, without these flags you
- * get backward compatibility.
- */
-#define JSCLASS_GLOBAL_FLAGS \
-    (JSCLASS_IS_GLOBAL | JSCLASS_HAS_RESERVED_SLOTS(JSProto_LIMIT))
-
-/* Fast access to the original value of each standard class's prototype. */
-#define JSCLASS_CACHED_PROTO_SHIFT      (JSCLASS_HIGH_FLAGS_SHIFT + 8)
-#define JSCLASS_CACHED_PROTO_WIDTH      8
-#define JSCLASS_CACHED_PROTO_MASK       JS_BITMASK(JSCLASS_CACHED_PROTO_WIDTH)
-#define JSCLASS_HAS_CACHED_PROTO(key)   ((key) << JSCLASS_CACHED_PROTO_SHIFT)
-#define JSCLASS_CACHED_PROTO_KEY(clasp) (((clasp)->flags                      \
-                                          >> JSCLASS_CACHED_PROTO_SHIFT)      \
-                                         & JSCLASS_CACHED_PROTO_MASK)
-
-/* Initializer for unused members of statically initialized JSClass structs. */
-#define JSCLASS_NO_OPTIONAL_MEMBERS     0,0,0,0,0,0,0,0
-#define JSCLASS_NO_RESERVED_MEMBERS     0,0,0,0,0
-
-/* For detailed comments on these function pointer types, see jspubtd.h. */
-struct JSObjectOps {
-    /* Mandatory non-null function pointer members. */
-    JSNewObjectMapOp    newObjectMap;
-    JSObjectMapOp       destroyObjectMap;
-    JSLookupPropOp      lookupProperty;
-    JSDefinePropOp      defineProperty;
-    JSPropertyIdOp      getProperty;
-    JSPropertyIdOp      setProperty;
-    JSAttributesOp      getAttributes;
-    JSAttributesOp      setAttributes;
-    JSPropertyIdOp      deleteProperty;
-    JSConvertOp         defaultValue;
-    JSNewEnumerateOp    enumerate;
-    JSCheckAccessIdOp   checkAccess;
-
-    /* Optionally non-null members start here. */
-    JSObjectOp          thisObject;
-    JSPropertyRefOp     dropProperty;
-    JSNative            call;
-    JSNative            construct;
-    JSXDRObjectOp       xdrObject;
-    JSHasInstanceOp     hasInstance;
-    JSSetObjectSlotOp   setProto;
-    JSSetObjectSlotOp   setParent;
-    JSMarkOp            mark;
-    JSFinalizeOp        clear;
-    JSGetRequiredSlotOp getRequiredSlot;
-    JSSetRequiredSlotOp setRequiredSlot;
-};
-
-struct JSXMLObjectOps {
-    JSObjectOps         base;
-    JSGetMethodOp       getMethod;
-    JSSetMethodOp       setMethod;
-    JSEnumerateValuesOp enumerateValues;
-    JSEqualityOp        equality;
-    JSConcatenateOp     concatenate;
-};
-
-/*
- * Classes that expose JSObjectOps via a non-null getObjectOps class hook may
- * derive a property structure from this struct, return a pointer to it from
- * lookupProperty and defineProperty, and use the pointer to avoid rehashing
- * in getAttributes and setAttributes.
- *
- * The jsid type contains either an int jsval (see JSVAL_IS_INT above), or an
- * internal pointer that is opaque to users of this API, but which users may
- * convert from and to a jsval using JS_ValueToId and JS_IdToValue.
- */
-struct JSProperty {
-    jsid id;
-};
-
-struct JSIdArray {
-    jsint length;
-    jsid  vector[1];    /* actually, length jsid words */
-};
-
-extern JS_PUBLIC_API(void)
-JS_DestroyIdArray(JSContext *cx, JSIdArray *ida);
-
-extern JS_PUBLIC_API(JSBool)
-JS_ValueToId(JSContext *cx, jsval v, jsid *idp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_IdToValue(JSContext *cx, jsid id, jsval *vp);
-
-/*
- * The magic XML namespace id is int-tagged, but not a valid integer jsval.
- * Global object classes in embeddings that enable JS_HAS_XML_SUPPORT (E4X)
- * should handle this id specially before converting id via JSVAL_TO_INT.
- */
-#define JS_DEFAULT_XML_NAMESPACE_ID ((jsid) JSVAL_VOID)
-
-/*
- * JSNewResolveOp flag bits.
- */
-#define JSRESOLVE_QUALIFIED     0x01    /* resolve a qualified property id */
-#define JSRESOLVE_ASSIGNING     0x02    /* resolve on the left of assignment */
-#define JSRESOLVE_DETECTING     0x04    /* 'if (o.p)...' or '(o.p) ?...:...' */
-#define JSRESOLVE_DECLARING     0x08    /* var, const, or function prolog op */
-#define JSRESOLVE_CLASSNAME     0x10    /* class name used when constructing */
-
-extern JS_PUBLIC_API(JSBool)
-JS_PropertyStub(JSContext *cx, JSObject *obj, jsval id, jsval *vp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_EnumerateStub(JSContext *cx, JSObject *obj);
-
-extern JS_PUBLIC_API(JSBool)
-JS_ResolveStub(JSContext *cx, JSObject *obj, jsval id);
-
-extern JS_PUBLIC_API(JSBool)
-JS_ConvertStub(JSContext *cx, JSObject *obj, JSType type, jsval *vp);
-
-extern JS_PUBLIC_API(void)
-JS_FinalizeStub(JSContext *cx, JSObject *obj);
-
-struct JSConstDoubleSpec {
-    jsdouble        dval;
-    const char      *name;
-    uint8           flags;
-    uint8           spare[3];
-};
-
-/*
- * To define an array element rather than a named property member, cast the
- * element's index to (const char *) and initialize name with it, and set the
- * JSPROP_INDEX bit in flags.
- */
-struct JSPropertySpec {
-    const char      *name;
-    int8            tinyid;
-    uint8           flags;
-    JSPropertyOp    getter;
-    JSPropertyOp    setter;
-};
-
-struct JSFunctionSpec {
-    const char      *name;
-    JSNative        call;
-#ifdef MOZILLA_1_8_BRANCH
-    uint8           nargs;
-    uint8           flags;
-    uint16          extra;
-#else
-    uint16          nargs;
-    uint16          flags;
-    uint32          extra;      /* extra & 0xFFFF:
-                                   number of arg slots for local GC roots
-                                   extra >> 16:
-                                   reserved, must be zero */
-#endif
-};
-
-extern JS_PUBLIC_API(JSObject *)
-JS_InitClass(JSContext *cx, JSObject *obj, JSObject *parent_proto,
-             JSClass *clasp, JSNative constructor, uintN nargs,
-             JSPropertySpec *ps, JSFunctionSpec *fs,
-             JSPropertySpec *static_ps, JSFunctionSpec *static_fs);
-
-#ifdef JS_THREADSAFE
-extern JS_PUBLIC_API(JSClass *)
-JS_GetClass(JSContext *cx, JSObject *obj);
-
-#define JS_GET_CLASS(cx,obj) JS_GetClass(cx, obj)
-#else
-extern JS_PUBLIC_API(JSClass *)
-JS_GetClass(JSObject *obj);
-
-#define JS_GET_CLASS(cx,obj) JS_GetClass(obj)
-#endif
-
-extern JS_PUBLIC_API(JSBool)
-JS_InstanceOf(JSContext *cx, JSObject *obj, JSClass *clasp, jsval *argv);
-
-extern JS_PUBLIC_API(JSBool)
-JS_HasInstance(JSContext *cx, JSObject *obj, jsval v, JSBool *bp);
-
-extern JS_PUBLIC_API(void *)
-JS_GetPrivate(JSContext *cx, JSObject *obj);
-
-extern JS_PUBLIC_API(JSBool)
-JS_SetPrivate(JSContext *cx, JSObject *obj, void *data);
-
-extern JS_PUBLIC_API(void *)
-JS_GetInstancePrivate(JSContext *cx, JSObject *obj, JSClass *clasp,
-                      jsval *argv);
-
-extern JS_PUBLIC_API(JSObject *)
-JS_GetPrototype(JSContext *cx, JSObject *obj);
-
-extern JS_PUBLIC_API(JSBool)
-JS_SetPrototype(JSContext *cx, JSObject *obj, JSObject *proto);
-
-extern JS_PUBLIC_API(JSObject *)
-JS_GetParent(JSContext *cx, JSObject *obj);
-
-extern JS_PUBLIC_API(JSBool)
-JS_SetParent(JSContext *cx, JSObject *obj, JSObject *parent);
-
-extern JS_PUBLIC_API(JSObject *)
-JS_GetConstructor(JSContext *cx, JSObject *proto);
-
-/*
- * Get a unique identifier for obj, good for the lifetime of obj (even if it
- * is moved by a copying GC).  Return false on failure (likely out of memory),
- * and true with *idp containing the unique id on success.
- */
-extern JS_PUBLIC_API(JSBool)
-JS_GetObjectId(JSContext *cx, JSObject *obj, jsid *idp);
-
-extern JS_PUBLIC_API(JSObject *)
-JS_NewObject(JSContext *cx, JSClass *clasp, JSObject *proto, JSObject *parent);
-
-extern JS_PUBLIC_API(JSBool)
-JS_SealObject(JSContext *cx, JSObject *obj, JSBool deep);
-
-extern JS_PUBLIC_API(JSObject *)
-JS_ConstructObject(JSContext *cx, JSClass *clasp, JSObject *proto,
-                   JSObject *parent);
-
-extern JS_PUBLIC_API(JSObject *)
-JS_ConstructObjectWithArguments(JSContext *cx, JSClass *clasp, JSObject *proto,
-                                JSObject *parent, uintN argc, jsval *argv);
-
-extern JS_PUBLIC_API(JSObject *)
-JS_DefineObject(JSContext *cx, JSObject *obj, const char *name, JSClass *clasp,
-                JSObject *proto, uintN attrs);
-
-extern JS_PUBLIC_API(JSBool)
-JS_DefineConstDoubles(JSContext *cx, JSObject *obj, JSConstDoubleSpec *cds);
-
-extern JS_PUBLIC_API(JSBool)
-JS_DefineProperties(JSContext *cx, JSObject *obj, JSPropertySpec *ps);
-
-extern JS_PUBLIC_API(JSBool)
-JS_DefineProperty(JSContext *cx, JSObject *obj, const char *name, jsval value,
-                  JSPropertyOp getter, JSPropertyOp setter, uintN attrs);
-
-/*
- * Determine the attributes (JSPROP_* flags) of a property on a given object.
- *
- * If the object does not have a property by that name, *foundp will be
- * JS_FALSE and the value of *attrsp is undefined.
- */
-extern JS_PUBLIC_API(JSBool)
-JS_GetPropertyAttributes(JSContext *cx, JSObject *obj, const char *name,
-                         uintN *attrsp, JSBool *foundp);
-
-/*
- * The same, but if the property is native, return its getter and setter via
- * *getterp and *setterp, respectively (and only if the out parameter pointer
- * is not null).
- */
-extern JS_PUBLIC_API(JSBool)
-JS_GetPropertyAttrsGetterAndSetter(JSContext *cx, JSObject *obj,
-                                   const char *name,
-                                   uintN *attrsp, JSBool *foundp,
-                                   JSPropertyOp *getterp,
-                                   JSPropertyOp *setterp);
-
-/*
- * Set the attributes of a property on a given object.
- *
- * If the object does not have a property by that name, *foundp will be
- * JS_FALSE and nothing will be altered.
- */
-extern JS_PUBLIC_API(JSBool)
-JS_SetPropertyAttributes(JSContext *cx, JSObject *obj, const char *name,
-                         uintN attrs, JSBool *foundp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_DefinePropertyWithTinyId(JSContext *cx, JSObject *obj, const char *name,
-                            int8 tinyid, jsval value,
-                            JSPropertyOp getter, JSPropertyOp setter,
-                            uintN attrs);
-
-extern JS_PUBLIC_API(JSBool)
-JS_AliasProperty(JSContext *cx, JSObject *obj, const char *name,
-                 const char *alias);
-
-extern JS_PUBLIC_API(JSBool)
-JS_HasProperty(JSContext *cx, JSObject *obj, const char *name, JSBool *foundp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_LookupProperty(JSContext *cx, JSObject *obj, const char *name, jsval *vp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_LookupPropertyWithFlags(JSContext *cx, JSObject *obj, const char *name,
-                           uintN flags, jsval *vp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_GetProperty(JSContext *cx, JSObject *obj, const char *name, jsval *vp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_GetMethodById(JSContext *cx, JSObject *obj, jsid id, JSObject **objp,
-                 jsval *vp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_GetMethod(JSContext *cx, JSObject *obj, const char *name, JSObject **objp,
-             jsval *vp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_SetProperty(JSContext *cx, JSObject *obj, const char *name, jsval *vp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_DeleteProperty(JSContext *cx, JSObject *obj, const char *name);
-
-extern JS_PUBLIC_API(JSBool)
-JS_DeleteProperty2(JSContext *cx, JSObject *obj, const char *name,
-                   jsval *rval);
-
-extern JS_PUBLIC_API(JSBool)
-JS_DefineUCProperty(JSContext *cx, JSObject *obj,
-                    const jschar *name, size_t namelen, jsval value,
-                    JSPropertyOp getter, JSPropertyOp setter,
-                    uintN attrs);
-
-/*
- * Determine the attributes (JSPROP_* flags) of a property on a given object.
- *
- * If the object does not have a property by that name, *foundp will be
- * JS_FALSE and the value of *attrsp is undefined.
- */
-extern JS_PUBLIC_API(JSBool)
-JS_GetUCPropertyAttributes(JSContext *cx, JSObject *obj,
-                           const jschar *name, size_t namelen,
-                           uintN *attrsp, JSBool *foundp);
-
-/*
- * The same, but if the property is native, return its getter and setter via
- * *getterp and *setterp, respectively (and only if the out parameter pointer
- * is not null).
- */
-extern JS_PUBLIC_API(JSBool)
-JS_GetUCPropertyAttrsGetterAndSetter(JSContext *cx, JSObject *obj,
-                                     const jschar *name, size_t namelen,
-                                     uintN *attrsp, JSBool *foundp,
-                                     JSPropertyOp *getterp,
-                                     JSPropertyOp *setterp);
-
-/*
- * Set the attributes of a property on a given object.
- *
- * If the object does not have a property by that name, *foundp will be
- * JS_FALSE and nothing will be altered.
- */
-extern JS_PUBLIC_API(JSBool)
-JS_SetUCPropertyAttributes(JSContext *cx, JSObject *obj,
-                           const jschar *name, size_t namelen,
-                           uintN attrs, JSBool *foundp);
-
-
-extern JS_PUBLIC_API(JSBool)
-JS_DefineUCPropertyWithTinyId(JSContext *cx, JSObject *obj,
-                              const jschar *name, size_t namelen,
-                              int8 tinyid, jsval value,
-                              JSPropertyOp getter, JSPropertyOp setter,
-                              uintN attrs);
-
-extern JS_PUBLIC_API(JSBool)
-JS_HasUCProperty(JSContext *cx, JSObject *obj,
-                 const jschar *name, size_t namelen,
-                 JSBool *vp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_LookupUCProperty(JSContext *cx, JSObject *obj,
-                    const jschar *name, size_t namelen,
-                    jsval *vp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_GetUCProperty(JSContext *cx, JSObject *obj,
-                 const jschar *name, size_t namelen,
-                 jsval *vp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_SetUCProperty(JSContext *cx, JSObject *obj,
-                 const jschar *name, size_t namelen,
-                 jsval *vp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_DeleteUCProperty2(JSContext *cx, JSObject *obj,
-                     const jschar *name, size_t namelen,
-                     jsval *rval);
-
-extern JS_PUBLIC_API(JSObject *)
-JS_NewArrayObject(JSContext *cx, jsint length, jsval *vector);
-
-extern JS_PUBLIC_API(JSBool)
-JS_IsArrayObject(JSContext *cx, JSObject *obj);
-
-extern JS_PUBLIC_API(JSBool)
-JS_GetArrayLength(JSContext *cx, JSObject *obj, jsuint *lengthp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_SetArrayLength(JSContext *cx, JSObject *obj, jsuint length);
-
-extern JS_PUBLIC_API(JSBool)
-JS_HasArrayLength(JSContext *cx, JSObject *obj, jsuint *lengthp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_DefineElement(JSContext *cx, JSObject *obj, jsint index, jsval value,
-                 JSPropertyOp getter, JSPropertyOp setter, uintN attrs);
-
-extern JS_PUBLIC_API(JSBool)
-JS_AliasElement(JSContext *cx, JSObject *obj, const char *name, jsint alias);
-
-extern JS_PUBLIC_API(JSBool)
-JS_HasElement(JSContext *cx, JSObject *obj, jsint index, JSBool *foundp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_LookupElement(JSContext *cx, JSObject *obj, jsint index, jsval *vp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_GetElement(JSContext *cx, JSObject *obj, jsint index, jsval *vp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_SetElement(JSContext *cx, JSObject *obj, jsint index, jsval *vp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_DeleteElement(JSContext *cx, JSObject *obj, jsint index);
-
-extern JS_PUBLIC_API(JSBool)
-JS_DeleteElement2(JSContext *cx, JSObject *obj, jsint index, jsval *rval);
-
-extern JS_PUBLIC_API(void)
-JS_ClearScope(JSContext *cx, JSObject *obj);
-
-extern JS_PUBLIC_API(JSIdArray *)
-JS_Enumerate(JSContext *cx, JSObject *obj);
-
-/*
- * Create an object to iterate over enumerable properties of obj, in arbitrary
- * property definition order.  NB: This differs from longstanding for..in loop
- * order, which uses order of property definition in obj.
- */
-extern JS_PUBLIC_API(JSObject *)
-JS_NewPropertyIterator(JSContext *cx, JSObject *obj);
-
-/*
- * Return true on success with *idp containing the id of the next enumerable
- * property to visit using iterobj, or JSVAL_VOID if there is no such property
- * left to visit.  Return false on error.
- */
-extern JS_PUBLIC_API(JSBool)
-JS_NextProperty(JSContext *cx, JSObject *iterobj, jsid *idp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_CheckAccess(JSContext *cx, JSObject *obj, jsid id, JSAccessMode mode,
-               jsval *vp, uintN *attrsp);
-
-extern JS_PUBLIC_API(JSCheckAccessOp)
-JS_SetCheckObjectAccessCallback(JSRuntime *rt, JSCheckAccessOp acb);
-
-extern JS_PUBLIC_API(JSBool)
-JS_GetReservedSlot(JSContext *cx, JSObject *obj, uint32 index, jsval *vp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_SetReservedSlot(JSContext *cx, JSObject *obj, uint32 index, jsval v);
-
-/************************************************************************/
-
-/*
- * Security protocol.
- */
-struct JSPrincipals {
-    char *codebase;
-
-    /* XXX unspecified and unused by Mozilla code -- can we remove these? */
-    void * (* JS_DLL_CALLBACK getPrincipalArray)(JSContext *cx, JSPrincipals *);
-    JSBool (* JS_DLL_CALLBACK globalPrivilegesEnabled)(JSContext *cx, JSPrincipals *);
-
-    /* Don't call "destroy"; use reference counting macros below. */
-    jsrefcount refcount;
-
-    void   (* JS_DLL_CALLBACK destroy)(JSContext *cx, JSPrincipals *);
-    JSBool (* JS_DLL_CALLBACK subsume)(JSPrincipals *, JSPrincipals *);
-};
-
-#ifdef JS_THREADSAFE
-#define JSPRINCIPALS_HOLD(cx, principals)   JS_HoldPrincipals(cx,principals)
-#define JSPRINCIPALS_DROP(cx, principals)   JS_DropPrincipals(cx,principals)
-
-extern JS_PUBLIC_API(jsrefcount)
-JS_HoldPrincipals(JSContext *cx, JSPrincipals *principals);
-
-extern JS_PUBLIC_API(jsrefcount)
-JS_DropPrincipals(JSContext *cx, JSPrincipals *principals);
-
-#else
-#define JSPRINCIPALS_HOLD(cx, principals)   (++(principals)->refcount)
-#define JSPRINCIPALS_DROP(cx, principals)                                     \
-    ((--(principals)->refcount == 0)                                          \
-     ? ((*(principals)->destroy)((cx), (principals)), 0)                      \
-     : (principals)->refcount)
-#endif
-
-extern JS_PUBLIC_API(JSPrincipalsTranscoder)
-JS_SetPrincipalsTranscoder(JSRuntime *rt, JSPrincipalsTranscoder px);
-
-extern JS_PUBLIC_API(JSObjectPrincipalsFinder)
-JS_SetObjectPrincipalsFinder(JSRuntime *rt, JSObjectPrincipalsFinder fop);
-
-/************************************************************************/
-
-/*
- * Functions and scripts.
- */
-extern JS_PUBLIC_API(JSFunction *)
-JS_NewFunction(JSContext *cx, JSNative call, uintN nargs, uintN flags,
-               JSObject *parent, const char *name);
-
-extern JS_PUBLIC_API(JSObject *)
-JS_GetFunctionObject(JSFunction *fun);
-
-/*
- * Deprecated, useful only for diagnostics.  Use JS_GetFunctionId instead for
- * anonymous vs. "anonymous" disambiguation and Unicode fidelity.
- */
-extern JS_PUBLIC_API(const char *)
-JS_GetFunctionName(JSFunction *fun);
-
-/*
- * Return the function's identifier as a JSString, or null if fun is unnamed.
- * The returned string lives as long as fun, so you don't need to root a saved
- * reference to it if fun is well-connected or rooted, and provided you bound
- * the use of the saved reference by fun's lifetime.
- *
- * Prefer JS_GetFunctionId over JS_GetFunctionName because it returns null for
- * truly anonymous functions, and because it doesn't chop to ISO-Latin-1 chars
- * from UTF-16-ish jschars.
- */
-extern JS_PUBLIC_API(JSString *)
-JS_GetFunctionId(JSFunction *fun);
-
-/*
- * Return JSFUN_* flags for fun.
- */
-extern JS_PUBLIC_API(uintN)
-JS_GetFunctionFlags(JSFunction *fun);
-
-/*
- * Return the arity (length) of fun.
- */
-extern JS_PUBLIC_API(uint16)
-JS_GetFunctionArity(JSFunction *fun);
-
-/*
- * Infallible predicate to test whether obj is a function object (faster than
- * comparing obj's class name to "Function", but equivalent unless someone has
- * overwritten the "Function" identifier with a different constructor and then
- * created instances using that constructor that might be passed in as obj).
- */
-extern JS_PUBLIC_API(JSBool)
-JS_ObjectIsFunction(JSContext *cx, JSObject *obj);
-
-extern JS_PUBLIC_API(JSBool)
-JS_DefineFunctions(JSContext *cx, JSObject *obj, JSFunctionSpec *fs);
-
-extern JS_PUBLIC_API(JSFunction *)
-JS_DefineFunction(JSContext *cx, JSObject *obj, const char *name, JSNative call,
-                  uintN nargs, uintN attrs);
-
-extern JS_PUBLIC_API(JSFunction *)
-JS_DefineUCFunction(JSContext *cx, JSObject *obj,
-                    const jschar *name, size_t namelen, JSNative call,
-                    uintN nargs, uintN attrs);
-
-extern JS_PUBLIC_API(JSObject *)
-JS_CloneFunctionObject(JSContext *cx, JSObject *funobj, JSObject *parent);
-
-/*
- * Given a buffer, return JS_FALSE if the buffer might become a valid
- * javascript statement with the addition of more lines.  Otherwise return
- * JS_TRUE.  The intent is to support interactive compilation - accumulate
- * lines in a buffer until JS_BufferIsCompilableUnit is true, then pass it to
- * the compiler.
- */
-extern JS_PUBLIC_API(JSBool)
-JS_BufferIsCompilableUnit(JSContext *cx, JSObject *obj,
-                          const char *bytes, size_t length);
-
-/*
- * The JSScript objects returned by the following functions refer to string and
- * other kinds of literals, including doubles and RegExp objects.  These
- * literals are vulnerable to garbage collection; to root script objects and
- * prevent literals from being collected, create a rootable object using
- * JS_NewScriptObject, and root the resulting object using JS_Add[Named]Root.
- */
-extern JS_PUBLIC_API(JSScript *)
-JS_CompileScript(JSContext *cx, JSObject *obj,
-                 const char *bytes, size_t length,
-                 const char *filename, uintN lineno);
-
-extern JS_PUBLIC_API(JSScript *)
-JS_CompileScriptForPrincipals(JSContext *cx, JSObject *obj,
-                              JSPrincipals *principals,
-                              const char *bytes, size_t length,
-                              const char *filename, uintN lineno);
-
-extern JS_PUBLIC_API(JSScript *)
-JS_CompileUCScript(JSContext *cx, JSObject *obj,
-                   const jschar *chars, size_t length,
-                   const char *filename, uintN lineno);
-
-extern JS_PUBLIC_API(JSScript *)
-JS_CompileUCScriptForPrincipals(JSContext *cx, JSObject *obj,
-                                JSPrincipals *principals,
-                                const jschar *chars, size_t length,
-                                const char *filename, uintN lineno);
-
-extern JS_PUBLIC_API(JSScript *)
-JS_CompileFile(JSContext *cx, JSObject *obj, const char *filename);
-
-extern JS_PUBLIC_API(JSScript *)
-JS_CompileFileHandle(JSContext *cx, JSObject *obj, const char *filename,
-                     FILE *fh);
-
-extern JS_PUBLIC_API(JSScript *)
-JS_CompileFileHandleForPrincipals(JSContext *cx, JSObject *obj,
-                                  const char *filename, FILE *fh,
-                                  JSPrincipals *principals);
-
-/*
- * NB: you must use JS_NewScriptObject and root a pointer to its return value
- * in order to keep a JSScript and its atoms safe from garbage collection after
- * creating the script via JS_Compile* and before a JS_ExecuteScript* call.
- * E.g., and without error checks:
- *
- *    JSScript *script = JS_CompileFile(cx, global, filename);
- *    JSObject *scrobj = JS_NewScriptObject(cx, script);
- *    JS_AddNamedRoot(cx, &scrobj, "scrobj");
- *    do {
- *        jsval result;
- *        JS_ExecuteScript(cx, global, script, &result);
- *        JS_GC();
- *    } while (!JSVAL_IS_BOOLEAN(result) || JSVAL_TO_BOOLEAN(result));
- *    JS_RemoveRoot(cx, &scrobj);
- */
-extern JS_PUBLIC_API(JSObject *)
-JS_NewScriptObject(JSContext *cx, JSScript *script);
-
-/*
- * Infallible getter for a script's object.  If JS_NewScriptObject has not been
- * called on script yet, the return value will be null.
- */
-extern JS_PUBLIC_API(JSObject *)
-JS_GetScriptObject(JSScript *script);
-
-extern JS_PUBLIC_API(void)
-JS_DestroyScript(JSContext *cx, JSScript *script);
-
-extern JS_PUBLIC_API(JSFunction *)
-JS_CompileFunction(JSContext *cx, JSObject *obj, const char *name,
-                   uintN nargs, const char **argnames,
-                   const char *bytes, size_t length,
-                   const char *filename, uintN lineno);
-
-extern JS_PUBLIC_API(JSFunction *)
-JS_CompileFunctionForPrincipals(JSContext *cx, JSObject *obj,
-                                JSPrincipals *principals, const char *name,
-                                uintN nargs, const char **argnames,
-                                const char *bytes, size_t length,
-                                const char *filename, uintN lineno);
-
-extern JS_PUBLIC_API(JSFunction *)
-JS_CompileUCFunction(JSContext *cx, JSObject *obj, const char *name,
-                     uintN nargs, const char **argnames,
-                     const jschar *chars, size_t length,
-                     const char *filename, uintN lineno);
-
-extern JS_PUBLIC_API(JSFunction *)
-JS_CompileUCFunctionForPrincipals(JSContext *cx, JSObject *obj,
-                                  JSPrincipals *principals, const char *name,
-                                  uintN nargs, const char **argnames,
-                                  const jschar *chars, size_t length,
-                                  const char *filename, uintN lineno);
-
-extern JS_PUBLIC_API(JSString *)
-JS_DecompileScript(JSContext *cx, JSScript *script, const char *name,
-                   uintN indent);
-
-/*
- * API extension: OR this into indent to avoid pretty-printing the decompiled
- * source resulting from JS_DecompileFunction{,Body}.
- */
-#define JS_DONT_PRETTY_PRINT    ((uintN)0x8000)
-
-extern JS_PUBLIC_API(JSString *)
-JS_DecompileFunction(JSContext *cx, JSFunction *fun, uintN indent);
-
-extern JS_PUBLIC_API(JSString *)
-JS_DecompileFunctionBody(JSContext *cx, JSFunction *fun, uintN indent);
-
-/*
- * NB: JS_ExecuteScript, JS_ExecuteScriptPart, and the JS_Evaluate*Script*
- * quadruplets all use the obj parameter as the initial scope chain header,
- * the 'this' keyword value, and the variables object (ECMA parlance for where
- * 'var' and 'function' bind names) of the execution context for script.
- *
- * Using obj as the variables object is problematic if obj's parent (which is
- * the scope chain link; see JS_SetParent and JS_NewObject) is not null: in
- * this case, variables created by 'var x = 0', e.g., go in obj, but variables
- * created by assignment to an unbound id, 'x = 0', go in the last object on
- * the scope chain linked by parent.
- *
- * ECMA calls that last scoping object the "global object", but note that many
- * embeddings have several such objects.  ECMA requires that "global code" be
- * executed with the variables object equal to this global object.  But these
- * JS API entry points provide freedom to execute code against a "sub-global",
- * i.e., a parented or scoped object, in which case the variables object will
- * differ from the last object on the scope chain, resulting in confusing and
- * non-ECMA explicit vs. implicit variable creation.
- *
- * Caveat embedders: unless you already depend on this buggy variables object
- * binding behavior, you should call JS_SetOptions(cx, JSOPTION_VAROBJFIX) or
- * JS_SetOptions(cx, JS_GetOptions(cx) | JSOPTION_VAROBJFIX) -- the latter if
- * someone may have set other options on cx already -- for each context in the
- * application, if you pass parented objects as the obj parameter, or may ever
- * pass such objects in the future.
- *
- * Why a runtime option?  The alternative is to add six or so new API entry
- * points with signatures matching the following six, and that doesn't seem
- * worth the code bloat cost.  Such new entry points would probably have less
- * obvious names, too, so would not tend to be used.  The JS_SetOption call,
- * OTOH, can be more easily hacked into existing code that does not depend on
- * the bug; such code can continue to use the familiar JS_EvaluateScript,
- * etc., entry points.
- */
-extern JS_PUBLIC_API(JSBool)
-JS_ExecuteScript(JSContext *cx, JSObject *obj, JSScript *script, jsval *rval);
-
-/*
- * Execute either the function-defining prolog of a script, or the script's
- * main body, but not both.
- */
-typedef enum JSExecPart { JSEXEC_PROLOG, JSEXEC_MAIN } JSExecPart;
-
-extern JS_PUBLIC_API(JSBool)
-JS_ExecuteScriptPart(JSContext *cx, JSObject *obj, JSScript *script,
-                     JSExecPart part, jsval *rval);
-
-extern JS_PUBLIC_API(JSBool)
-JS_EvaluateScript(JSContext *cx, JSObject *obj,
-                  const char *bytes, uintN length,
-                  const char *filename, uintN lineno,
-                  jsval *rval);
-
-extern JS_PUBLIC_API(JSBool)
-JS_EvaluateScriptForPrincipals(JSContext *cx, JSObject *obj,
-                               JSPrincipals *principals,
-                               const char *bytes, uintN length,
-                               const char *filename, uintN lineno,
-                               jsval *rval);
-
-extern JS_PUBLIC_API(JSBool)
-JS_EvaluateUCScript(JSContext *cx, JSObject *obj,
-                    const jschar *chars, uintN length,
-                    const char *filename, uintN lineno,
-                    jsval *rval);
-
-extern JS_PUBLIC_API(JSBool)
-JS_EvaluateUCScriptForPrincipals(JSContext *cx, JSObject *obj,
-                                 JSPrincipals *principals,
-                                 const jschar *chars, uintN length,
-                                 const char *filename, uintN lineno,
-                                 jsval *rval);
-
-extern JS_PUBLIC_API(JSBool)
-JS_CallFunction(JSContext *cx, JSObject *obj, JSFunction *fun, uintN argc,
-                jsval *argv, jsval *rval);
-
-extern JS_PUBLIC_API(JSBool)
-JS_CallFunctionName(JSContext *cx, JSObject *obj, const char *name, uintN argc,
-                    jsval *argv, jsval *rval);
-
-extern JS_PUBLIC_API(JSBool)
-JS_CallFunctionValue(JSContext *cx, JSObject *obj, jsval fval, uintN argc,
-                     jsval *argv, jsval *rval);
-
-extern JS_PUBLIC_API(JSBranchCallback)
-JS_SetBranchCallback(JSContext *cx, JSBranchCallback cb);
-
-extern JS_PUBLIC_API(JSBool)
-JS_IsRunning(JSContext *cx);
-
-extern JS_PUBLIC_API(JSBool)
-JS_IsConstructing(JSContext *cx);
-
-/*
- * Returns true if a script is executing and its current bytecode is a set
- * (assignment) operation, even if there are native (no script) stack frames
- * between the script and the caller to JS_IsAssigning.
- */
-extern JS_FRIEND_API(JSBool)
-JS_IsAssigning(JSContext *cx);
-
-/*
- * Set the second return value, which should be a string or int jsval that
- * identifies a property in the returned object, to form an ECMA reference
- * type value (obj, id).  Only native methods can return reference types,
- * and if the returned value is used on the left-hand side of an assignment
- * op, the identified property will be set.  If the return value is in an
- * r-value, the interpreter just gets obj[id]'s value.
- */
-extern JS_PUBLIC_API(void)
-JS_SetCallReturnValue2(JSContext *cx, jsval v);
-
-/*
- * Saving and restoring frame chains.
- *
- * These two functions are used to set aside cx->fp while that frame is
- * inactive. After a call to JS_SaveFrameChain, it looks as if there is no
- * code running on cx. Before calling JS_RestoreFrameChain, cx's call stack
- * must be balanced and all nested calls to JS_SaveFrameChain must have had
- * matching JS_RestoreFrameChain calls.
- *
- * JS_SaveFrameChain deals with cx not having any code running on it. A null
- * return does not signify an error and JS_RestoreFrameChain handles null
- * frames.
- */
-extern JS_PUBLIC_API(JSStackFrame *)
-JS_SaveFrameChain(JSContext *cx);
-
-extern JS_PUBLIC_API(void)
-JS_RestoreFrameChain(JSContext *cx, JSStackFrame *fp);
-
-/************************************************************************/
-
-/*
- * Strings.
- *
- * NB: JS_NewString takes ownership of bytes on success, avoiding a copy; but
- * on error (signified by null return), it leaves bytes owned by the caller.
- * So the caller must free bytes in the error case, if it has no use for them.
- * In contrast, all the JS_New*StringCopy* functions do not take ownership of
- * the character memory passed to them -- they copy it.
- */
-extern JS_PUBLIC_API(JSString *)
-JS_NewString(JSContext *cx, char *bytes, size_t length);
-
-extern JS_PUBLIC_API(JSString *)
-JS_NewStringCopyN(JSContext *cx, const char *s, size_t n);
-
-extern JS_PUBLIC_API(JSString *)
-JS_NewStringCopyZ(JSContext *cx, const char *s);
-
-extern JS_PUBLIC_API(JSString *)
-JS_InternString(JSContext *cx, const char *s);
-
-extern JS_PUBLIC_API(JSString *)
-JS_NewUCString(JSContext *cx, jschar *chars, size_t length);
-
-extern JS_PUBLIC_API(JSString *)
-JS_NewUCStringCopyN(JSContext *cx, const jschar *s, size_t n);
-
-extern JS_PUBLIC_API(JSString *)
-JS_NewUCStringCopyZ(JSContext *cx, const jschar *s);
-
-extern JS_PUBLIC_API(JSString *)
-JS_InternUCStringN(JSContext *cx, const jschar *s, size_t length);
-
-extern JS_PUBLIC_API(JSString *)
-JS_InternUCString(JSContext *cx, const jschar *s);
-
-extern JS_PUBLIC_API(char *)
-JS_GetStringBytes(JSString *str);
-
-extern JS_PUBLIC_API(jschar *)
-JS_GetStringChars(JSString *str);
-
-extern JS_PUBLIC_API(size_t)
-JS_GetStringLength(JSString *str);
-
-extern JS_PUBLIC_API(intN)
-JS_CompareStrings(JSString *str1, JSString *str2);
-
-/*
- * Mutable string support.  A string's characters are never mutable in this JS
- * implementation, but a growable string has a buffer that can be reallocated,
- * and a dependent string is a substring of another (growable, dependent, or
- * immutable) string.  The direct data members of the (opaque to API clients)
- * JSString struct may be changed in a single-threaded way for growable and
- * dependent strings.
- *
- * Therefore mutable strings cannot be used by more than one thread at a time.
- * You may call JS_MakeStringImmutable to convert the string from a mutable
- * (growable or dependent) string to an immutable (and therefore thread-safe)
- * string.  The engine takes care of converting growable and dependent strings
- * to immutable for you if you store strings in multi-threaded objects using
- * JS_SetProperty or kindred API entry points.
- *
- * If you store a JSString pointer in a native data structure that is (safely)
- * accessible to multiple threads, you must call JS_MakeStringImmutable before
- * retiring the store.
- */
-extern JS_PUBLIC_API(JSString *)
-JS_NewGrowableString(JSContext *cx, jschar *chars, size_t length);
-
-/*
- * Create a dependent string, i.e., a string that owns no character storage,
- * but that refers to a slice of another string's chars.  Dependent strings
- * are mutable by definition, so the thread safety comments above apply.
- */
-extern JS_PUBLIC_API(JSString *)
-JS_NewDependentString(JSContext *cx, JSString *str, size_t start,
-                      size_t length);
-
-/*
- * Concatenate two strings, resulting in a new growable string.  If you create
- * the left string and pass it to JS_ConcatStrings on a single thread, try to
- * use JS_NewGrowableString to create the left string -- doing so helps Concat
- * avoid allocating a new buffer for the result and copying left's chars into
- * the new buffer.  See above for thread safety comments.
- */
-extern JS_PUBLIC_API(JSString *)
-JS_ConcatStrings(JSContext *cx, JSString *left, JSString *right);
-
-/*
- * Convert a dependent string into an independent one.  This function does not
- * change the string's mutability, so the thread safety comments above apply.
- */
-extern JS_PUBLIC_API(const jschar *)
-JS_UndependString(JSContext *cx, JSString *str);
-
-/*
- * Convert a mutable string (either growable or dependent) into an immutable,
- * thread-safe one.
- */
-extern JS_PUBLIC_API(JSBool)
-JS_MakeStringImmutable(JSContext *cx, JSString *str);
-
-/*
- * Return JS_TRUE if C (char []) strings passed via the API and internally
- * are UTF-8. The source must be compiled with JS_C_STRINGS_ARE_UTF8 defined
- * to get UTF-8 support.
- */
-JS_PUBLIC_API(JSBool)
-JS_CStringsAreUTF8();
-
-/*
- * Character encoding support.
- *
- * For both JS_EncodeCharacters and JS_DecodeBytes, set *dstlenp to the size
- * of the destination buffer before the call; on return, *dstlenp contains the
- * number of bytes (JS_EncodeCharacters) or jschars (JS_DecodeBytes) actually
- * stored.  To determine the necessary destination buffer size, make a sizing
- * call that passes NULL for dst.
- *
- * On errors, the functions report the error. In that case, *dstlenp contains
- * the number of characters or bytes transferred so far.  If cx is NULL, no
- * error is reported on failure, and the functions simply return JS_FALSE.
- *
- * NB: Neither function stores an additional zero byte or jschar after the
- * transcoded string.
- *
- * If the source has been compiled with the #define JS_C_STRINGS_ARE_UTF8 to
- * enable UTF-8 interpretation of C char[] strings, then JS_EncodeCharacters
- * encodes to UTF-8, and JS_DecodeBytes decodes from UTF-8, which may create
- * addititional errors if the character sequence is malformed.  If UTF-8
- * support is disabled, the functions deflate and inflate, respectively.
- */
-JS_PUBLIC_API(JSBool)
-JS_EncodeCharacters(JSContext *cx, const jschar *src, size_t srclen, char *dst,
-                    size_t *dstlenp);
-
-JS_PUBLIC_API(JSBool)
-JS_DecodeBytes(JSContext *cx, const char *src, size_t srclen, jschar *dst,
-               size_t *dstlenp);
-
-/************************************************************************/
-
-/*
- * Locale specific string conversion and error message callbacks.
- */
-struct JSLocaleCallbacks {
-    JSLocaleToUpperCase     localeToUpperCase;
-    JSLocaleToLowerCase     localeToLowerCase;
-    JSLocaleCompare         localeCompare;
-    JSLocaleToUnicode       localeToUnicode;
-    JSErrorCallback         localeGetErrorMessage;
-};
-
-/*
- * Establish locale callbacks. The pointer must persist as long as the
- * JSContext.  Passing NULL restores the default behaviour.
- */
-extern JS_PUBLIC_API(void)
-JS_SetLocaleCallbacks(JSContext *cx, JSLocaleCallbacks *callbacks);
-
-/*
- * Return the address of the current locale callbacks struct, which may
- * be NULL.
- */
-extern JS_PUBLIC_API(JSLocaleCallbacks *)
-JS_GetLocaleCallbacks(JSContext *cx);
-
-/************************************************************************/
-
-/*
- * Error reporting.
- */
-
-/*
- * Report an exception represented by the sprintf-like conversion of format
- * and its arguments.  This exception message string is passed to a pre-set
- * JSErrorReporter function (set by JS_SetErrorReporter; see jspubtd.h for
- * the JSErrorReporter typedef).
- */
-extern JS_PUBLIC_API(void)
-JS_ReportError(JSContext *cx, const char *format, ...);
-
-/*
- * Use an errorNumber to retrieve the format string, args are char *
- */
-extern JS_PUBLIC_API(void)
-JS_ReportErrorNumber(JSContext *cx, JSErrorCallback errorCallback,
-                     void *userRef, const uintN errorNumber, ...);
-
-/*
- * Use an errorNumber to retrieve the format string, args are jschar *
- */
-extern JS_PUBLIC_API(void)
-JS_ReportErrorNumberUC(JSContext *cx, JSErrorCallback errorCallback,
-                     void *userRef, const uintN errorNumber, ...);
-
-/*
- * As above, but report a warning instead (JSREPORT_IS_WARNING(report.flags)).
- * Return true if there was no error trying to issue the warning, and if the
- * warning was not converted into an error due to the JSOPTION_WERROR option
- * being set, false otherwise.
- */
-extern JS_PUBLIC_API(JSBool)
-JS_ReportWarning(JSContext *cx, const char *format, ...);
-
-extern JS_PUBLIC_API(JSBool)
-JS_ReportErrorFlagsAndNumber(JSContext *cx, uintN flags,
-                             JSErrorCallback errorCallback, void *userRef,
-                             const uintN errorNumber, ...);
-
-extern JS_PUBLIC_API(JSBool)
-JS_ReportErrorFlagsAndNumberUC(JSContext *cx, uintN flags,
-                               JSErrorCallback errorCallback, void *userRef,
-                               const uintN errorNumber, ...);
-
-/*
- * Complain when out of memory.
- */
-extern JS_PUBLIC_API(void)
-JS_ReportOutOfMemory(JSContext *cx);
-
-struct JSErrorReport {
-    const char      *filename;      /* source file name, URL, etc., or null */
-    uintN           lineno;         /* source line number */
-    const char      *linebuf;       /* offending source line without final \n */
-    const char      *tokenptr;      /* pointer to error token in linebuf */
-    const jschar    *uclinebuf;     /* unicode (original) line buffer */
-    const jschar    *uctokenptr;    /* unicode (original) token pointer */
-    uintN           flags;          /* error/warning, etc. */
-    uintN           errorNumber;    /* the error number, e.g. see js.msg */
-    const jschar    *ucmessage;     /* the (default) error message */
-    const jschar    **messageArgs;  /* arguments for the error message */
-};
-
-/*
- * JSErrorReport flag values.  These may be freely composed.
- */
-#define JSREPORT_ERROR      0x0     /* pseudo-flag for default case */
-#define JSREPORT_WARNING    0x1     /* reported via JS_ReportWarning */
-#define JSREPORT_EXCEPTION  0x2     /* exception was thrown */
-#define JSREPORT_STRICT     0x4     /* error or warning due to strict option */
-
-/*
- * If JSREPORT_EXCEPTION is set, then a JavaScript-catchable exception
- * has been thrown for this runtime error, and the host should ignore it.
- * Exception-aware hosts should also check for JS_IsExceptionPending if
- * JS_ExecuteScript returns failure, and signal or propagate the exception, as
- * appropriate.
- */
-#define JSREPORT_IS_WARNING(flags)      (((flags) & JSREPORT_WARNING) != 0)
-#define JSREPORT_IS_EXCEPTION(flags)    (((flags) & JSREPORT_EXCEPTION) != 0)
-#define JSREPORT_IS_STRICT(flags)       (((flags) & JSREPORT_STRICT) != 0)
-
-extern JS_PUBLIC_API(JSErrorReporter)
-JS_SetErrorReporter(JSContext *cx, JSErrorReporter er);
-
-/************************************************************************/
-
-/*
- * Regular Expressions.
- */
-#define JSREG_FOLD      0x01    /* fold uppercase to lowercase */
-#define JSREG_GLOB      0x02    /* global exec, creates array of matches */
-#define JSREG_MULTILINE 0x04    /* treat ^ and $ as begin and end of line */
-
-extern JS_PUBLIC_API(JSObject *)
-JS_NewRegExpObject(JSContext *cx, char *bytes, size_t length, uintN flags);
-
-extern JS_PUBLIC_API(JSObject *)
-JS_NewUCRegExpObject(JSContext *cx, jschar *chars, size_t length, uintN flags);
-
-extern JS_PUBLIC_API(void)
-JS_SetRegExpInput(JSContext *cx, JSString *input, JSBool multiline);
-
-extern JS_PUBLIC_API(void)
-JS_ClearRegExpStatics(JSContext *cx);
-
-extern JS_PUBLIC_API(void)
-JS_ClearRegExpRoots(JSContext *cx);
-
-/* TODO: compile, exec, get/set other statics... */
-
-/************************************************************************/
-
-extern JS_PUBLIC_API(JSBool)
-JS_IsExceptionPending(JSContext *cx);
-
-extern JS_PUBLIC_API(JSBool)
-JS_GetPendingException(JSContext *cx, jsval *vp);
-
-extern JS_PUBLIC_API(void)
-JS_SetPendingException(JSContext *cx, jsval v);
-
-extern JS_PUBLIC_API(void)
-JS_ClearPendingException(JSContext *cx);
-
-extern JS_PUBLIC_API(JSBool)
-JS_ReportPendingException(JSContext *cx);
-
-/*
- * Save the current exception state.  This takes a snapshot of cx's current
- * exception state without making any change to that state.
- *
- * The returned state pointer MUST be passed later to JS_RestoreExceptionState
- * (to restore that saved state, overriding any more recent state) or else to
- * JS_DropExceptionState (to free the state struct in case it is not correct
- * or desirable to restore it).  Both Restore and Drop free the state struct,
- * so callers must stop using the pointer returned from Save after calling the
- * Release or Drop API.
- */
-extern JS_PUBLIC_API(JSExceptionState *)
-JS_SaveExceptionState(JSContext *cx);
-
-extern JS_PUBLIC_API(void)
-JS_RestoreExceptionState(JSContext *cx, JSExceptionState *state);
-
-extern JS_PUBLIC_API(void)
-JS_DropExceptionState(JSContext *cx, JSExceptionState *state);
-
-/*
- * If the given value is an exception object that originated from an error,
- * the exception will contain an error report struct, and this API will return
- * the address of that struct.  Otherwise, it returns NULL.  The lifetime of
- * the error report struct that might be returned is the same as the lifetime
- * of the exception object.
- */
-extern JS_PUBLIC_API(JSErrorReport *)
-JS_ErrorFromException(JSContext *cx, jsval v);
-
-/*
- * Given a reported error's message and JSErrorReport struct pointer, throw
- * the corresponding exception on cx.
- */
-extern JS_PUBLIC_API(JSBool)
-JS_ThrowReportedError(JSContext *cx, const char *message,
-                      JSErrorReport *reportp);
-
-#ifdef JS_THREADSAFE
-
-/*
- * Associate the current thread with the given context.  This is done
- * implicitly by JS_NewContext.
- *
- * Returns the old thread id for this context, which should be treated as
- * an opaque value.  This value is provided for comparison to 0, which
- * indicates that ClearContextThread has been called on this context
- * since the last SetContextThread, or non-0, which indicates the opposite.
- */
-extern JS_PUBLIC_API(jsword)
-JS_GetContextThread(JSContext *cx);
-
-extern JS_PUBLIC_API(jsword)
-JS_SetContextThread(JSContext *cx);
-
-extern JS_PUBLIC_API(jsword)
-JS_ClearContextThread(JSContext *cx);
-
-#endif /* JS_THREADSAFE */
-
-/************************************************************************/
-
-JS_END_EXTERN_C
-
-#endif /* jsapi_h___ */
diff --git a/extra_lib/include/js/jsautocfg.h b/extra_lib/include/js/jsautocfg.h
deleted file mode 100644
index 7dccf19..0000000
--- a/extra_lib/include/js/jsautocfg.h
+++ /dev/null
@@ -1,52 +0,0 @@
-#ifndef js_cpucfg___
-#define js_cpucfg___
-
-/* AUTOMATICALLY GENERATED - DO NOT EDIT */
-
-#define IS_LITTLE_ENDIAN 1
-#undef  IS_BIG_ENDIAN
-
-#define JS_BYTES_PER_BYTE   1L
-#define JS_BYTES_PER_SHORT  2L
-#define JS_BYTES_PER_INT    4L
-#define JS_BYTES_PER_INT64  8L
-#define JS_BYTES_PER_LONG   4L
-#define JS_BYTES_PER_FLOAT  4L
-#define JS_BYTES_PER_DOUBLE 8L
-#define JS_BYTES_PER_WORD   4L
-#define JS_BYTES_PER_DWORD  8L
-
-#define JS_BITS_PER_BYTE    8L
-#define JS_BITS_PER_SHORT   16L
-#define JS_BITS_PER_INT     32L
-#define JS_BITS_PER_INT64   64L
-#define JS_BITS_PER_LONG    32L
-#define JS_BITS_PER_FLOAT   32L
-#define JS_BITS_PER_DOUBLE  64L
-#define JS_BITS_PER_WORD    32L
-
-#define JS_BITS_PER_BYTE_LOG2   3L
-#define JS_BITS_PER_SHORT_LOG2  4L
-#define JS_BITS_PER_INT_LOG2    5L
-#define JS_BITS_PER_INT64_LOG2  6L
-#define JS_BITS_PER_LONG_LOG2   5L
-#define JS_BITS_PER_FLOAT_LOG2  5L
-#define JS_BITS_PER_DOUBLE_LOG2 6L
-#define JS_BITS_PER_WORD_LOG2   5L
-
-#define JS_ALIGN_OF_SHORT   2L
-#define JS_ALIGN_OF_INT     4L
-#define JS_ALIGN_OF_LONG    4L
-#define JS_ALIGN_OF_INT64   4L
-#define JS_ALIGN_OF_FLOAT   4L
-#define JS_ALIGN_OF_DOUBLE  4L
-#define JS_ALIGN_OF_POINTER 4L
-#define JS_ALIGN_OF_WORD    4L
-
-#define JS_BYTES_PER_WORD_LOG2   2L
-#define JS_BYTES_PER_DWORD_LOG2  3L
-#define JS_WORDS_PER_DWORD_LOG2  1L
-
-#define JS_STACK_GROWTH_DIRECTION (-1)
-
-#endif /* js_cpucfg___ */
diff --git a/extra_lib/include/js/jscompat.h b/extra_lib/include/js/jscompat.h
deleted file mode 100644
index 80d8605..0000000
--- a/extra_lib/include/js/jscompat.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * 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.
- *
- * The Original Code is Mozilla Communicator client code, released
- * March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998-1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* -*- Mode: C; tab-width: 8 -*-
- * Copyright (C) 1996-1999 Netscape Communications Corporation, All Rights Reserved.
- */
-#ifndef jscompat_h___
-#define jscompat_h___
-/*
- * Compatibility glue for various NSPR versions.  We must always define int8,
- * int16, jsword, and so on to minimize differences with js/ref, no matter what
- * the NSPR typedef names may be.
- */
-#include "jstypes.h"
-#include "jslong.h"
-
-typedef JSIntn intN;
-typedef JSUintn uintN;
-typedef JSUword jsuword;
-typedef JSWord jsword;
-typedef float float32;
-#define allocPriv allocPool
-#endif /* jscompat_h___ */
diff --git a/extra_lib/include/js/jscpucfg.h b/extra_lib/include/js/jscpucfg.h
deleted file mode 100644
index 8176abc..0000000
--- a/extra_lib/include/js/jscpucfg.h
+++ /dev/null
@@ -1,366 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * 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.
- *
- * The Original Code is Mozilla Communicator client code, released
- * March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef js_cpucfg___
-#define js_cpucfg___
-
-#include "jsosdep.h"
-
-#if defined(XP_WIN) || defined(XP_OS2) || defined(WINCE) || defined(IPHONE_OS)
-
-#if defined(_WIN64)
-
-#if defined(_M_X64) || defined(_M_AMD64) || defined(_AMD64_)
-
-#define IS_LITTLE_ENDIAN 1
-#undef  IS_BIG_ENDIAN
-
-#define JS_BYTES_PER_BYTE   1L
-#define JS_BYTES_PER_SHORT  2L
-#define JS_BYTES_PER_INT    4L
-#define JS_BYTES_PER_INT64  8L
-#define JS_BYTES_PER_LONG   4L
-#define JS_BYTES_PER_FLOAT  4L
-#define JS_BYTES_PER_DOUBLE 8L
-#define JS_BYTES_PER_WORD   8L
-#define JS_BYTES_PER_DWORD  8L
-
-#define JS_BITS_PER_BYTE    8L
-#define JS_BITS_PER_SHORT   16L
-#define JS_BITS_PER_INT     32L
-#define JS_BITS_PER_INT64   64L
-#define JS_BITS_PER_LONG    32L
-#define JS_BITS_PER_FLOAT   32L
-#define JS_BITS_PER_DOUBLE  64L
-#define JS_BITS_PER_WORD    64L
-
-#define JS_BITS_PER_BYTE_LOG2   3L
-#define JS_BITS_PER_SHORT_LOG2  4L
-#define JS_BITS_PER_INT_LOG2    5L
-#define JS_BITS_PER_INT64_LOG2  6L
-#define JS_BITS_PER_LONG_LOG2   5L
-#define JS_BITS_PER_FLOAT_LOG2  5L
-#define JS_BITS_PER_DOUBLE_LOG2 6L
-#define JS_BITS_PER_WORD_LOG2   6L
-
-#define JS_ALIGN_OF_SHORT   2L
-#define JS_ALIGN_OF_INT     4L
-#define JS_ALIGN_OF_LONG    4L
-#define JS_ALIGN_OF_INT64   8L
-#define JS_ALIGN_OF_FLOAT   4L
-#define JS_ALIGN_OF_DOUBLE  8L
-#define JS_ALIGN_OF_POINTER 8L
-#define JS_ALIGN_OF_WORD    8L
-
-#define JS_BYTES_PER_WORD_LOG2   3L
-#define JS_BYTES_PER_DWORD_LOG2  3L
-#define PR_WORDS_PER_DWORD_LOG2  0L
-#else  /* !(defined(_M_X64) || defined(_M_AMD64) || defined(_AMD64_)) */
-#error "CPU type is unknown"
-#endif /* !(defined(_M_X64) || defined(_M_AMD64) || defined(_AMD64_)) */
-
-#elif defined(_WIN32) || defined(XP_OS2) || defined(WINCE) 
-
-#ifdef __WATCOMC__
-#define HAVE_VA_LIST_AS_ARRAY
-#endif
-
-#define IS_LITTLE_ENDIAN 1
-#undef  IS_BIG_ENDIAN
-
-#define JS_BYTES_PER_BYTE   1L
-#define JS_BYTES_PER_SHORT  2L
-#define JS_BYTES_PER_INT    4L
-#define JS_BYTES_PER_INT64  8L
-#define JS_BYTES_PER_LONG   4L
-#define JS_BYTES_PER_FLOAT  4L
-#define JS_BYTES_PER_DOUBLE 8L
-#define JS_BYTES_PER_WORD   4L
-#define JS_BYTES_PER_DWORD  8L
-
-#define JS_BITS_PER_BYTE    8L
-#define JS_BITS_PER_SHORT   16L
-#define JS_BITS_PER_INT     32L
-#define JS_BITS_PER_INT64   64L
-#define JS_BITS_PER_LONG    32L
-#define JS_BITS_PER_FLOAT   32L
-#define JS_BITS_PER_DOUBLE  64L
-#define JS_BITS_PER_WORD    32L
-
-#define JS_BITS_PER_BYTE_LOG2   3L
-#define JS_BITS_PER_SHORT_LOG2  4L
-#define JS_BITS_PER_INT_LOG2    5L
-#define JS_BITS_PER_INT64_LOG2  6L
-#define JS_BITS_PER_LONG_LOG2   5L
-#define JS_BITS_PER_FLOAT_LOG2  5L
-#define JS_BITS_PER_DOUBLE_LOG2 6L
-#define JS_BITS_PER_WORD_LOG2   5L
-
-#define JS_ALIGN_OF_SHORT   2L
-#define JS_ALIGN_OF_INT     4L
-#define JS_ALIGN_OF_LONG    4L
-#define JS_ALIGN_OF_INT64   8L
-#define JS_ALIGN_OF_FLOAT   4L
-#define JS_ALIGN_OF_DOUBLE  4L
-#define JS_ALIGN_OF_POINTER 4L
-#define JS_ALIGN_OF_WORD    4L
-
-#define JS_BYTES_PER_WORD_LOG2   2L
-#define JS_BYTES_PER_DWORD_LOG2  3L
-#define PR_WORDS_PER_DWORD_LOG2  1L
-
-#endif /* _WIN32 || XP_OS2 || WINCE*/
-
-#if defined(IPHONE_OS)
-
-//ios64
-#if defined(__LP64__)
-#define IS_LITTLE_ENDIAN 1
-#undef  IS_BIG_ENDIAN
-
-#define JS_BYTES_PER_BYTE   1L
-#define JS_BYTES_PER_SHORT  2L
-#define JS_BYTES_PER_INT    4L
-#define JS_BYTES_PER_INT64  8L
-#define JS_BYTES_PER_LONG   4L
-#define JS_BYTES_PER_FLOAT  4L
-#define JS_BYTES_PER_DOUBLE 8L
-#define JS_BYTES_PER_WORD   8L
-#define JS_BYTES_PER_DWORD  8L
-
-#define JS_BITS_PER_BYTE    8L
-#define JS_BITS_PER_SHORT   16L
-#define JS_BITS_PER_INT     32L
-#define JS_BITS_PER_INT64   64L
-#define JS_BITS_PER_LONG    32L
-#define JS_BITS_PER_FLOAT   32L
-#define JS_BITS_PER_DOUBLE  64L
-#define JS_BITS_PER_WORD    64L
-
-#define JS_BITS_PER_BYTE_LOG2   3L
-#define JS_BITS_PER_SHORT_LOG2  4L
-#define JS_BITS_PER_INT_LOG2    5L
-#define JS_BITS_PER_INT64_LOG2  6L
-#define JS_BITS_PER_LONG_LOG2   5L
-#define JS_BITS_PER_FLOAT_LOG2  5L
-#define JS_BITS_PER_DOUBLE_LOG2 6L
-#define JS_BITS_PER_WORD_LOG2   6L
-
-#define JS_ALIGN_OF_SHORT   2L
-#define JS_ALIGN_OF_INT     4L
-#define JS_ALIGN_OF_LONG    4L
-#define JS_ALIGN_OF_INT64   8L
-#define JS_ALIGN_OF_FLOAT   4L
-#define JS_ALIGN_OF_DOUBLE  8L
-#define JS_ALIGN_OF_POINTER 8L
-#define JS_ALIGN_OF_WORD    8L
-
-#define JS_BYTES_PER_WORD_LOG2   3L
-#define JS_BYTES_PER_DWORD_LOG2  3L
-#define PR_WORDS_PER_DWORD_LOG2  0L
-
-#else //ios64
-
-#define IS_LITTLE_ENDIAN 1
-#undef  IS_BIG_ENDIAN
-
-#define JS_BYTES_PER_BYTE   1L
-#define JS_BYTES_PER_SHORT  2L
-#define JS_BYTES_PER_INT    4L
-#define JS_BYTES_PER_INT64  8L
-#define JS_BYTES_PER_LONG   4L
-#define JS_BYTES_PER_FLOAT  4L
-#define JS_BYTES_PER_DOUBLE 8L
-#define JS_BYTES_PER_WORD   4L
-#define JS_BYTES_PER_DWORD  8L
-
-#define JS_BITS_PER_BYTE    8L
-#define JS_BITS_PER_SHORT   16L
-#define JS_BITS_PER_INT     32L
-#define JS_BITS_PER_INT64   64L
-#define JS_BITS_PER_LONG    32L
-#define JS_BITS_PER_FLOAT   32L
-#define JS_BITS_PER_DOUBLE  64L
-#define JS_BITS_PER_WORD    32L
-
-#define JS_BITS_PER_BYTE_LOG2   3L
-#define JS_BITS_PER_SHORT_LOG2  4L
-#define JS_BITS_PER_INT_LOG2    5L
-#define JS_BITS_PER_INT64_LOG2  6L
-#define JS_BITS_PER_LONG_LOG2   5L
-#define JS_BITS_PER_FLOAT_LOG2  5L
-#define JS_BITS_PER_DOUBLE_LOG2 6L
-#define JS_BITS_PER_WORD_LOG2   5L
-
-#define JS_ALIGN_OF_SHORT   2L
-#define JS_ALIGN_OF_INT     4L
-#define JS_ALIGN_OF_LONG    4L
-#define JS_ALIGN_OF_INT64   4L
-#define JS_ALIGN_OF_FLOAT   4L
-#define JS_ALIGN_OF_DOUBLE  4L
-#define JS_ALIGN_OF_POINTER 4L
-#define JS_ALIGN_OF_WORD    4L
-
-#define JS_BYTES_PER_WORD_LOG2   2L
-#define JS_BYTES_PER_DWORD_LOG2  3L
-#define JS_WORDS_PER_DWORD_LOG2  1L
-
-#define JS_STACK_GROWTH_DIRECTION (-1)
-
-#endif //ios32
-
-
-#endif
-
-
-#if defined(_WINDOWS) && !defined(_WIN32) /* WIN16 */
-
-#define IS_LITTLE_ENDIAN 1
-#undef  IS_BIG_ENDIAN
-
-#define JS_BYTES_PER_BYTE   1L
-#define JS_BYTES_PER_SHORT  2L
-#define JS_BYTES_PER_INT    2L
-#define JS_BYTES_PER_INT64  8L
-#define JS_BYTES_PER_LONG   4L
-#define JS_BYTES_PER_FLOAT  4L
-#define JS_BYTES_PER_DOUBLE 8L
-#define JS_BYTES_PER_WORD   4L
-#define JS_BYTES_PER_DWORD  8L
-
-#define JS_BITS_PER_BYTE    8L
-#define JS_BITS_PER_SHORT   16L
-#define JS_BITS_PER_INT     16L
-#define JS_BITS_PER_INT64   64L
-#define JS_BITS_PER_LONG    32L
-#define JS_BITS_PER_FLOAT   32L
-#define JS_BITS_PER_DOUBLE  64L
-#define JS_BITS_PER_WORD    32L
-
-#define JS_BITS_PER_BYTE_LOG2   3L
-#define JS_BITS_PER_SHORT_LOG2  4L
-#define JS_BITS_PER_INT_LOG2    4L
-#define JS_BITS_PER_INT64_LOG2  6L
-#define JS_BITS_PER_LONG_LOG2   5L
-#define JS_BITS_PER_FLOAT_LOG2  5L
-#define JS_BITS_PER_DOUBLE_LOG2 6L
-#define JS_BITS_PER_WORD_LOG2   5L
-
-#define JS_ALIGN_OF_SHORT   2L
-#define JS_ALIGN_OF_INT     2L
-#define JS_ALIGN_OF_LONG    2L
-#define JS_ALIGN_OF_INT64   2L
-#define JS_ALIGN_OF_FLOAT   2L
-#define JS_ALIGN_OF_DOUBLE  2L
-#define JS_ALIGN_OF_POINTER 2L
-#define JS_ALIGN_OF_WORD    2L
-
-#define JS_BYTES_PER_WORD_LOG2   2L
-#define JS_BYTES_PER_DWORD_LOG2  3L
-#define PR_WORDS_PER_DWORD_LOG2  1L
-
-#endif /* defined(_WINDOWS) && !defined(_WIN32) */
-
-#if defined(__SYMBIAN32__)
-#define IS_LITTLE_ENDIAN 1
-#undef  IS_BIG_ENDIAN
-//no float support
-#define Bad_float_h
-
-#define JS_BYTES_PER_BYTE   1L
-#define JS_BYTES_PER_SHORT  2L
-#define JS_BYTES_PER_INT    4L
-#define JS_BYTES_PER_INT64  8L
-#define JS_BYTES_PER_LONG   4L
-#define JS_BYTES_PER_FLOAT  4L
-#define JS_BYTES_PER_DOUBLE 8L
-#define JS_BYTES_PER_WORD   4L
-#define JS_BYTES_PER_DWORD  8L
-
-#define JS_BITS_PER_BYTE    8L
-#define JS_BITS_PER_SHORT   16L
-#define JS_BITS_PER_INT     32L
-#define JS_BITS_PER_INT64   64L
-#define JS_BITS_PER_LONG    32L
-#define JS_BITS_PER_FLOAT   32L
-#define JS_BITS_PER_DOUBLE  64L
-#define JS_BITS_PER_WORD    32L
-
-#define JS_BITS_PER_BYTE_LOG2   3L
-#define JS_BITS_PER_SHORT_LOG2  4L
-#define JS_BITS_PER_INT_LOG2    5L
-#define JS_BITS_PER_INT64_LOG2  6L
-#define JS_BITS_PER_LONG_LOG2   5L
-#define JS_BITS_PER_FLOAT_LOG2  5L
-#define JS_BITS_PER_DOUBLE_LOG2 6L
-#define JS_BITS_PER_WORD_LOG2   5L
-
-#define JS_ALIGN_OF_SHORT   2L
-#define JS_ALIGN_OF_INT     4L
-#define JS_ALIGN_OF_LONG    4L
-#define JS_ALIGN_OF_INT64   8L
-#define JS_ALIGN_OF_FLOAT   4L
-#define JS_ALIGN_OF_DOUBLE  4L
-#define JS_ALIGN_OF_POINTER 4L
-#define JS_ALIGN_OF_WORD    4L
-
-#define JS_BYTES_PER_WORD_LOG2   2L
-#define JS_BYTES_PER_DWORD_LOG2  3L
-#define PR_WORDS_PER_DWORD_LOG2  1L
-
-#endif /* __SYMBIAN32__*/
-
-
-#elif defined(XP_UNIX) || defined(XP_BEOS)
-
-#error "This file is supposed to be auto-generated on UNIX platforms, but the"
-#error "static version for Mac and Windows platforms is being used."
-#error "Something's probably wrong with paths/headers/dependencies/Makefiles."
-
-#else
-
-#error "Must define one of XP_BEOS, XP_OS2, XP_WIN, or XP_UNIX"
-
-#endif
-
-#ifndef JS_STACK_GROWTH_DIRECTION
-#define JS_STACK_GROWTH_DIRECTION (-1)
-#endif
-
-#endif /* js_cpucfg___ */
diff --git a/extra_lib/include/js/jsdbgapi.h b/extra_lib/include/js/jsdbgapi.h
deleted file mode 100644
index d2e1f1c..0000000
--- a/extra_lib/include/js/jsdbgapi.h
+++ /dev/null
@@ -1,406 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * 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.
- *
- * The Original Code is Mozilla Communicator client code, released
- * March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef jsdbgapi_h___
-#define jsdbgapi_h___
-/*
- * JS debugger API.
- */
-#include "jsapi.h"
-#include "jsopcode.h"
-#include "jsprvtd.h"
-
-JS_BEGIN_EXTERN_C
-
-extern void
-js_PatchOpcode(JSContext *cx, JSScript *script, jsbytecode *pc, JSOp op);
-
-extern JS_PUBLIC_API(JSBool)
-JS_SetTrap(JSContext *cx, JSScript *script, jsbytecode *pc,
-           JSTrapHandler handler, void *closure);
-
-extern JS_PUBLIC_API(JSOp)
-JS_GetTrapOpcode(JSContext *cx, JSScript *script, jsbytecode *pc);
-
-extern JS_PUBLIC_API(void)
-JS_ClearTrap(JSContext *cx, JSScript *script, jsbytecode *pc,
-             JSTrapHandler *handlerp, void **closurep);
-
-extern JS_PUBLIC_API(void)
-JS_ClearScriptTraps(JSContext *cx, JSScript *script);
-
-extern JS_PUBLIC_API(void)
-JS_ClearAllTraps(JSContext *cx);
-
-extern JS_PUBLIC_API(JSTrapStatus)
-JS_HandleTrap(JSContext *cx, JSScript *script, jsbytecode *pc, jsval *rval);
-
-extern JS_PUBLIC_API(JSBool)
-JS_SetInterrupt(JSRuntime *rt, JSTrapHandler handler, void *closure);
-
-extern JS_PUBLIC_API(JSBool)
-JS_ClearInterrupt(JSRuntime *rt, JSTrapHandler *handlerp, void **closurep);
-
-/************************************************************************/
-
-extern JS_PUBLIC_API(JSBool)
-JS_SetWatchPoint(JSContext *cx, JSObject *obj, jsval id,
-                 JSWatchPointHandler handler, void *closure);
-
-extern JS_PUBLIC_API(JSBool)
-JS_ClearWatchPoint(JSContext *cx, JSObject *obj, jsval id,
-                   JSWatchPointHandler *handlerp, void **closurep);
-
-extern JS_PUBLIC_API(JSBool)
-JS_ClearWatchPointsForObject(JSContext *cx, JSObject *obj);
-
-extern JS_PUBLIC_API(JSBool)
-JS_ClearAllWatchPoints(JSContext *cx);
-
-#ifdef JS_HAS_OBJ_WATCHPOINT
-/*
- * Hide these non-API function prototypes by testing whether the internal
- * header file "jsconfig.h" has been included.
- */
-extern void
-js_MarkWatchPoints(JSContext *cx);
-
-extern JSScopeProperty *
-js_FindWatchPoint(JSRuntime *rt, JSScope *scope, jsid id);
-
-extern JSPropertyOp
-js_GetWatchedSetter(JSRuntime *rt, JSScope *scope,
-                    const JSScopeProperty *sprop);
-
-extern JSBool JS_DLL_CALLBACK
-js_watch_set(JSContext *cx, JSObject *obj, jsval id, jsval *vp);
-
-extern JSBool JS_DLL_CALLBACK
-js_watch_set_wrapper(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
-                     jsval *rval);
-
-extern JSPropertyOp
-js_WrapWatchedSetter(JSContext *cx, jsid id, uintN attrs, JSPropertyOp setter);
-
-#endif /* JS_HAS_OBJ_WATCHPOINT */
-
-/************************************************************************/
-
-extern JS_PUBLIC_API(uintN)
-JS_PCToLineNumber(JSContext *cx, JSScript *script, jsbytecode *pc);
-
-extern JS_PUBLIC_API(jsbytecode *)
-JS_LineNumberToPC(JSContext *cx, JSScript *script, uintN lineno);
-
-extern JS_PUBLIC_API(JSScript *)
-JS_GetFunctionScript(JSContext *cx, JSFunction *fun);
-
-extern JS_PUBLIC_API(JSNative)
-JS_GetFunctionNative(JSContext *cx, JSFunction *fun);
-
-extern JS_PUBLIC_API(JSPrincipals *)
-JS_GetScriptPrincipals(JSContext *cx, JSScript *script);
-
-/*
- * Stack Frame Iterator
- *
- * Used to iterate through the JS stack frames to extract
- * information from the frames.
- */
-
-extern JS_PUBLIC_API(JSStackFrame *)
-JS_FrameIterator(JSContext *cx, JSStackFrame **iteratorp);
-
-extern JS_PUBLIC_API(JSScript *)
-JS_GetFrameScript(JSContext *cx, JSStackFrame *fp);
-
-extern JS_PUBLIC_API(jsbytecode *)
-JS_GetFramePC(JSContext *cx, JSStackFrame *fp);
-
-/*
- * Get the closest scripted frame below fp.  If fp is null, start from cx->fp.
- */
-extern JS_PUBLIC_API(JSStackFrame *)
-JS_GetScriptedCaller(JSContext *cx, JSStackFrame *fp);
-
-/*
- * Return a weak reference to fp's principals.  A null return does not denote
- * an error, it means there are no principals.
- */
-extern JS_PUBLIC_API(JSPrincipals *)
-JS_StackFramePrincipals(JSContext *cx, JSStackFrame *fp);
-
-/*
- * This API is like JS_StackFramePrincipals(cx, caller), except that if
- * cx->runtime->findObjectPrincipals is non-null, it returns the weaker of
- * the caller's principals and the object principals of fp's callee function
- * object (fp->argv[-2]), which is eval, Function, or a similar eval-like
- * method.  The caller parameter should be JS_GetScriptedCaller(cx, fp).
- *
- * All eval-like methods must use JS_EvalFramePrincipals to acquire a weak
- * reference to the correct principals for the eval call to be secure, given
- * an embedding that calls JS_SetObjectPrincipalsFinder (see jsapi.h).
- */
-extern JS_PUBLIC_API(JSPrincipals *)
-JS_EvalFramePrincipals(JSContext *cx, JSStackFrame *fp, JSStackFrame *caller);
-
-extern JS_PUBLIC_API(void *)
-JS_GetFrameAnnotation(JSContext *cx, JSStackFrame *fp);
-
-extern JS_PUBLIC_API(void)
-JS_SetFrameAnnotation(JSContext *cx, JSStackFrame *fp, void *annotation);
-
-extern JS_PUBLIC_API(void *)
-JS_GetFramePrincipalArray(JSContext *cx, JSStackFrame *fp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_IsNativeFrame(JSContext *cx, JSStackFrame *fp);
-
-/* this is deprecated, use JS_GetFrameScopeChain instead */
-extern JS_PUBLIC_API(JSObject *)
-JS_GetFrameObject(JSContext *cx, JSStackFrame *fp);
-
-extern JS_PUBLIC_API(JSObject *)
-JS_GetFrameScopeChain(JSContext *cx, JSStackFrame *fp);
-
-extern JS_PUBLIC_API(JSObject *)
-JS_GetFrameCallObject(JSContext *cx, JSStackFrame *fp);
-
-extern JS_PUBLIC_API(JSObject *)
-JS_GetFrameThis(JSContext *cx, JSStackFrame *fp);
-
-extern JS_PUBLIC_API(JSFunction *)
-JS_GetFrameFunction(JSContext *cx, JSStackFrame *fp);
-
-extern JS_PUBLIC_API(JSObject *)
-JS_GetFrameFunctionObject(JSContext *cx, JSStackFrame *fp);
-
-/* XXXrginda Initially published with typo */
-#define JS_IsContructorFrame JS_IsConstructorFrame
-extern JS_PUBLIC_API(JSBool)
-JS_IsConstructorFrame(JSContext *cx, JSStackFrame *fp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_IsDebuggerFrame(JSContext *cx, JSStackFrame *fp);
-
-extern JS_PUBLIC_API(jsval)
-JS_GetFrameReturnValue(JSContext *cx, JSStackFrame *fp);
-
-extern JS_PUBLIC_API(void)
-JS_SetFrameReturnValue(JSContext *cx, JSStackFrame *fp, jsval rval);
-
-/**
- * Return fp's callee function object (fp->argv[-2]) if it has one.
- */
-extern JS_PUBLIC_API(JSObject *)
-JS_GetFrameCalleeObject(JSContext *cx, JSStackFrame *fp);
-
-/************************************************************************/
-
-extern JS_PUBLIC_API(const char *)
-JS_GetScriptFilename(JSContext *cx, JSScript *script);
-
-extern JS_PUBLIC_API(uintN)
-JS_GetScriptBaseLineNumber(JSContext *cx, JSScript *script);
-
-extern JS_PUBLIC_API(uintN)
-JS_GetScriptLineExtent(JSContext *cx, JSScript *script);
-
-extern JS_PUBLIC_API(JSVersion)
-JS_GetScriptVersion(JSContext *cx, JSScript *script);
-
-/************************************************************************/
-
-/*
- * Hook setters for script creation and destruction, see jsprvtd.h for the
- * typedefs.  These macros provide binary compatibility and newer, shorter
- * synonyms.
- */
-#define JS_SetNewScriptHook     JS_SetNewScriptHookProc
-#define JS_SetDestroyScriptHook JS_SetDestroyScriptHookProc
-
-extern JS_PUBLIC_API(void)
-JS_SetNewScriptHook(JSRuntime *rt, JSNewScriptHook hook, void *callerdata);
-
-extern JS_PUBLIC_API(void)
-JS_SetDestroyScriptHook(JSRuntime *rt, JSDestroyScriptHook hook,
-                        void *callerdata);
-
-/************************************************************************/
-
-extern JS_PUBLIC_API(JSBool)
-JS_EvaluateUCInStackFrame(JSContext *cx, JSStackFrame *fp,
-                          const jschar *chars, uintN length,
-                          const char *filename, uintN lineno,
-                          jsval *rval);
-
-extern JS_PUBLIC_API(JSBool)
-JS_EvaluateInStackFrame(JSContext *cx, JSStackFrame *fp,
-                        const char *bytes, uintN length,
-                        const char *filename, uintN lineno,
-                        jsval *rval);
-
-/************************************************************************/
-
-typedef struct JSPropertyDesc {
-    jsval           id;         /* primary id, a string or int */
-    jsval           value;      /* property value */
-    uint8           flags;      /* flags, see below */
-    uint8           spare;      /* unused */
-    uint16          slot;       /* argument/variable slot */
-    jsval           alias;      /* alias id if JSPD_ALIAS flag */
-} JSPropertyDesc;
-
-#define JSPD_ENUMERATE  0x01    /* visible to for/in loop */
-#define JSPD_READONLY   0x02    /* assignment is error */
-#define JSPD_PERMANENT  0x04    /* property cannot be deleted */
-#define JSPD_ALIAS      0x08    /* property has an alias id */
-#define JSPD_ARGUMENT   0x10    /* argument to function */
-#define JSPD_VARIABLE   0x20    /* local variable in function */
-#define JSPD_EXCEPTION  0x40    /* exception occurred fetching the property, */
-                                /* value is exception */
-#define JSPD_ERROR      0x80    /* native getter returned JS_FALSE without */
-                                /* throwing an exception */
-
-typedef struct JSPropertyDescArray {
-    uint32          length;     /* number of elements in array */
-    JSPropertyDesc  *array;     /* alloc'd by Get, freed by Put */
-} JSPropertyDescArray;
-
-extern JS_PUBLIC_API(JSScopeProperty *)
-JS_PropertyIterator(JSObject *obj, JSScopeProperty **iteratorp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_GetPropertyDesc(JSContext *cx, JSObject *obj, JSScopeProperty *sprop,
-                   JSPropertyDesc *pd);
-
-extern JS_PUBLIC_API(JSBool)
-JS_GetPropertyDescArray(JSContext *cx, JSObject *obj, JSPropertyDescArray *pda);
-
-extern JS_PUBLIC_API(void)
-JS_PutPropertyDescArray(JSContext *cx, JSPropertyDescArray *pda);
-
-/************************************************************************/
-
-extern JS_PUBLIC_API(JSBool)
-JS_SetDebuggerHandler(JSRuntime *rt, JSTrapHandler handler, void *closure);
-
-extern JS_PUBLIC_API(JSBool)
-JS_SetSourceHandler(JSRuntime *rt, JSSourceHandler handler, void *closure);
-
-extern JS_PUBLIC_API(JSBool)
-JS_SetExecuteHook(JSRuntime *rt, JSInterpreterHook hook, void *closure);
-
-extern JS_PUBLIC_API(JSBool)
-JS_SetCallHook(JSRuntime *rt, JSInterpreterHook hook, void *closure);
-
-extern JS_PUBLIC_API(JSBool)
-JS_SetObjectHook(JSRuntime *rt, JSObjectHook hook, void *closure);
-
-extern JS_PUBLIC_API(JSBool)
-JS_SetThrowHook(JSRuntime *rt, JSTrapHandler hook, void *closure);
-
-extern JS_PUBLIC_API(JSBool)
-JS_SetDebugErrorHook(JSRuntime *rt, JSDebugErrorHook hook, void *closure);
-
-/************************************************************************/
-
-extern JS_PUBLIC_API(size_t)
-JS_GetObjectTotalSize(JSContext *cx, JSObject *obj);
-
-extern JS_PUBLIC_API(size_t)
-JS_GetFunctionTotalSize(JSContext *cx, JSFunction *fun);
-
-extern JS_PUBLIC_API(size_t)
-JS_GetScriptTotalSize(JSContext *cx, JSScript *script);
-
-/*
- * Get the top-most running script on cx starting from fp, or from the top of
- * cx's frame stack if fp is null, and return its script filename flags.  If
- * the script has a null filename member, return JSFILENAME_NULL.
- */
-extern JS_PUBLIC_API(uint32)
-JS_GetTopScriptFilenameFlags(JSContext *cx, JSStackFrame *fp);
-
-/*
- * Get the script filename flags for the script.  If the script doesn't have a
- * filename, return JSFILENAME_NULL.
- */
-extern JS_PUBLIC_API(uint32)
-JS_GetScriptFilenameFlags(JSScript *script);
-
-/*
- * Associate flags with a script filename prefix in rt, so that any subsequent
- * script compilation will inherit those flags if the script's filename is the
- * same as prefix, or if prefix is a substring of the script's filename.
- *
- * The API defines only one flag bit, JSFILENAME_SYSTEM, leaving the remaining
- * 31 bits up to the API client to define.  The union of all 32 bits must not
- * be a legal combination, however, in order to preserve JSFILENAME_NULL as a
- * unique value.  API clients may depend on JSFILENAME_SYSTEM being a set bit
- * in JSFILENAME_NULL -- a script with a null filename member is presumed to
- * be a "system" script.
- */
-extern JS_PUBLIC_API(JSBool)
-JS_FlagScriptFilenamePrefix(JSRuntime *rt, const char *prefix, uint32 flags);
-
-#define JSFILENAME_NULL         0xffffffff      /* null script filename */
-#define JSFILENAME_SYSTEM       0x00000001      /* "system" script, see below */
-
-/*
- * Return true if obj is a "system" object, that is, one flagged by a prior
- * call to JS_FlagSystemObject(cx, obj).  What "system" means is up to the API
- * client, but it can be used to coordinate access control policies based on
- * script filenames and their prefixes, using JS_FlagScriptFilenamePrefix and
- * JS_GetTopScriptFilenameFlags.
- */
-extern JS_PUBLIC_API(JSBool)
-JS_IsSystemObject(JSContext *cx, JSObject *obj);
-
-/*
- * Flag obj as a "system" object.  The API client can flag system objects to
- * optimize access control checks.  The engine stores but does not interpret
- * the per-object flag set by this call.
- */
-extern JS_PUBLIC_API(void)
-JS_FlagSystemObject(JSContext *cx, JSObject *obj);
-
-JS_END_EXTERN_C
-
-#endif /* jsdbgapi_h___ */
diff --git a/extra_lib/include/js/jslong.h b/extra_lib/include/js/jslong.h
deleted file mode 100644
index 059cf00..0000000
--- a/extra_lib/include/js/jslong.h
+++ /dev/null
@@ -1,437 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * 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.
- *
- * The Original Code is Mozilla Communicator client code, released
- * March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/*
-** File:                jslong.h
-** Description: Portable access to 64 bit numerics
-**
-** Long-long (64-bit signed integer type) support. Some C compilers
-** don't support 64 bit integers yet, so we use these macros to
-** support both machines that do and don't.
-**/
-#ifndef jslong_h___
-#define jslong_h___
-
-#include "jstypes.h"
-
-JS_BEGIN_EXTERN_C
-
-/***********************************************************************
-** DEFINES:     JSLL_MaxInt
-**              JSLL_MinInt
-**              JSLL_Zero
-** DESCRIPTION:
-**      Various interesting constants and static variable
-**      initializer
-***********************************************************************/
-#ifdef HAVE_WATCOM_BUG_2
-JSInt64 __pascal __loadds __export
-    JSLL_MaxInt(void);
-JSInt64 __pascal __loadds __export
-    JSLL_MinInt(void);
-JSInt64 __pascal __loadds __export
-    JSLL_Zero(void);
-#else
-extern JS_PUBLIC_API(JSInt64) JSLL_MaxInt(void);
-extern JS_PUBLIC_API(JSInt64) JSLL_MinInt(void);
-extern JS_PUBLIC_API(JSInt64) JSLL_Zero(void);
-#endif
-
-#define JSLL_MAXINT   JSLL_MaxInt()
-#define JSLL_MININT   JSLL_MinInt()
-#define JSLL_ZERO     JSLL_Zero()
-
-#ifdef JS_HAVE_LONG_LONG
-
-#if JS_BYTES_PER_LONG == 8
-#define JSLL_INIT(hi, lo)  ((hi ## L << 32) + lo ## L)
-#elif (defined(WIN32) || defined(WIN16)) && !defined(__GNUC__)
-#define JSLL_INIT(hi, lo)  ((hi ## i64 << 32) + lo ## i64)
-#else
-#define JSLL_INIT(hi, lo)  ((hi ## LL << 32) + lo ## LL)
-#endif
-
-/***********************************************************************
-** MACROS:      JSLL_*
-** DESCRIPTION:
-**      The following macros define portable access to the 64 bit
-**      math facilities.
-**
-***********************************************************************/
-
-/***********************************************************************
-** MACROS:      JSLL_<relational operators>
-**
-**  JSLL_IS_ZERO        Test for zero
-**  JSLL_EQ             Test for equality
-**  JSLL_NE             Test for inequality
-**  JSLL_GE_ZERO        Test for zero or positive
-**  JSLL_CMP            Compare two values
-***********************************************************************/
-#define JSLL_IS_ZERO(a)       ((a) == 0)
-#define JSLL_EQ(a, b)         ((a) == (b))
-#define JSLL_NE(a, b)         ((a) != (b))
-#define JSLL_GE_ZERO(a)       ((a) >= 0)
-#define JSLL_CMP(a, op, b)    ((JSInt64)(a) op (JSInt64)(b))
-#define JSLL_UCMP(a, op, b)   ((JSUint64)(a) op (JSUint64)(b))
-
-/***********************************************************************
-** MACROS:      JSLL_<logical operators>
-**
-**  JSLL_AND            Logical and
-**  JSLL_OR             Logical or
-**  JSLL_XOR            Logical exclusion
-**  JSLL_OR2            A disgusting deviation
-**  JSLL_NOT            Negation (one's compliment)
-***********************************************************************/
-#define JSLL_AND(r, a, b)        ((r) = (a) & (b))
-#define JSLL_OR(r, a, b)        ((r) = (a) | (b))
-#define JSLL_XOR(r, a, b)        ((r) = (a) ^ (b))
-#define JSLL_OR2(r, a)        ((r) = (r) | (a))
-#define JSLL_NOT(r, a)        ((r) = ~(a))
-
-/***********************************************************************
-** MACROS:      JSLL_<mathematical operators>
-**
-**  JSLL_NEG            Negation (two's compliment)
-**  JSLL_ADD            Summation (two's compliment)
-**  JSLL_SUB            Difference (two's compliment)
-***********************************************************************/
-#define JSLL_NEG(r, a)        ((r) = -(a))
-#define JSLL_ADD(r, a, b)     ((r) = (a) + (b))
-#define JSLL_SUB(r, a, b)     ((r) = (a) - (b))
-
-/***********************************************************************
-** MACROS:      JSLL_<mathematical operators>
-**
-**  JSLL_MUL            Product (two's compliment)
-**  JSLL_DIV            Quotient (two's compliment)
-**  JSLL_MOD            Modulus (two's compliment)
-***********************************************************************/
-#define JSLL_MUL(r, a, b)        ((r) = (a) * (b))
-#define JSLL_DIV(r, a, b)        ((r) = (a) / (b))
-#define JSLL_MOD(r, a, b)        ((r) = (a) % (b))
-
-/***********************************************************************
-** MACROS:      JSLL_<shifting operators>
-**
-**  JSLL_SHL            Shift left [0..64] bits
-**  JSLL_SHR            Shift right [0..64] bits with sign extension
-**  JSLL_USHR           Unsigned shift right [0..64] bits
-**  JSLL_ISHL           Signed shift left [0..64] bits
-***********************************************************************/
-#define JSLL_SHL(r, a, b)     ((r) = (JSInt64)(a) << (b))
-#define JSLL_SHR(r, a, b)     ((r) = (JSInt64)(a) >> (b))
-#define JSLL_USHR(r, a, b)    ((r) = (JSUint64)(a) >> (b))
-#define JSLL_ISHL(r, a, b)    ((r) = (JSInt64)(a) << (b))
-
-/***********************************************************************
-** MACROS:      JSLL_<conversion operators>
-**
-**  JSLL_L2I            Convert to signed 32 bit
-**  JSLL_L2UI           Convert to unsigned 32 bit
-**  JSLL_L2F            Convert to floating point
-**  JSLL_L2D            Convert to floating point
-**  JSLL_I2L            Convert signed to 64 bit
-**  JSLL_UI2L           Convert unsigned to 64 bit
-**  JSLL_F2L            Convert float to 64 bit
-**  JSLL_D2L            Convert float to 64 bit
-***********************************************************************/
-#define JSLL_L2I(i, l)        ((i) = (JSInt32)(l))
-#define JSLL_L2UI(ui, l)        ((ui) = (JSUint32)(l))
-#define JSLL_L2F(f, l)        ((f) = (JSFloat64)(l))
-#define JSLL_L2D(d, l)        ((d) = (JSFloat64)(l))
-
-#define JSLL_I2L(l, i)        ((l) = (JSInt64)(i))
-#define JSLL_UI2L(l, ui)        ((l) = (JSInt64)(ui))
-#define JSLL_F2L(l, f)        ((l) = (JSInt64)(f))
-#define JSLL_D2L(l, d)        ((l) = (JSInt64)(d))
-
-/***********************************************************************
-** MACROS:      JSLL_UDIVMOD
-** DESCRIPTION:
-**  Produce both a quotient and a remainder given an unsigned
-** INPUTS:      JSUint64 a: The dividend of the operation
-**              JSUint64 b: The quotient of the operation
-** OUTPUTS:     JSUint64 *qp: pointer to quotient
-**              JSUint64 *rp: pointer to remainder
-***********************************************************************/
-#define JSLL_UDIVMOD(qp, rp, a, b) \
-    (*(qp) = ((JSUint64)(a) / (b)), \
-     *(rp) = ((JSUint64)(a) % (b)))
-
-#else  /* !JS_HAVE_LONG_LONG */
-
-#ifdef IS_LITTLE_ENDIAN
-#define JSLL_INIT(hi, lo) {JS_INT32(lo), JS_INT32(hi)}
-#else
-#define JSLL_INIT(hi, lo) {JS_INT32(hi), JS_INT32(lo)}
-#endif
-
-#define JSLL_IS_ZERO(a)         (((a).hi == 0) && ((a).lo == 0))
-#define JSLL_EQ(a, b)           (((a).hi == (b).hi) && ((a).lo == (b).lo))
-#define JSLL_NE(a, b)           (((a).hi != (b).hi) || ((a).lo != (b).lo))
-#define JSLL_GE_ZERO(a)         (((a).hi >> 31) == 0)
-
-#ifdef DEBUG
-#define JSLL_CMP(a, op, b)      (JS_ASSERT((#op)[1] != '='), JSLL_REAL_CMP(a, op, b))
-#define JSLL_UCMP(a, op, b)     (JS_ASSERT((#op)[1] != '='), JSLL_REAL_UCMP(a, op, b))
-#else
-#define JSLL_CMP(a, op, b)      JSLL_REAL_CMP(a, op, b)
-#define JSLL_UCMP(a, op, b)     JSLL_REAL_UCMP(a, op, b)
-#endif
-
-#define JSLL_REAL_CMP(a,op,b)   (((JSInt32)(a).hi op (JSInt32)(b).hi) || \
-                                 (((a).hi == (b).hi) && ((a).lo op (b).lo)))
-#define JSLL_REAL_UCMP(a,op,b)  (((a).hi op (b).hi) || \
-                                 (((a).hi == (b).hi) && ((a).lo op (b).lo)))
-
-#define JSLL_AND(r, a, b)       ((r).lo = (a).lo & (b).lo, \
-                                 (r).hi = (a).hi & (b).hi)
-#define JSLL_OR(r, a, b)        ((r).lo = (a).lo | (b).lo, \
-                                 (r).hi = (a).hi | (b).hi)
-#define JSLL_XOR(r, a, b)       ((r).lo = (a).lo ^ (b).lo, \
-                                 (r).hi = (a).hi ^ (b).hi)
-#define JSLL_OR2(r, a)          ((r).lo = (r).lo | (a).lo, \
-                                 (r).hi = (r).hi | (a).hi)
-#define JSLL_NOT(r, a)          ((r).lo = ~(a).lo, \
-                                 (r).hi = ~(a).hi)
-
-#define JSLL_NEG(r, a)          ((r).lo = -(JSInt32)(a).lo, \
-                                 (r).hi = -(JSInt32)(a).hi - ((r).lo != 0))
-#define JSLL_ADD(r, a, b) { \
-    JSInt64 _a, _b; \
-    _a = a; _b = b; \
-    (r).lo = _a.lo + _b.lo; \
-    (r).hi = _a.hi + _b.hi + ((r).lo < _b.lo); \
-}
-
-#define JSLL_SUB(r, a, b) { \
-    JSInt64 _a, _b; \
-    _a = a; _b = b; \
-    (r).lo = _a.lo - _b.lo; \
-    (r).hi = _a.hi - _b.hi - (_a.lo < _b.lo); \
-}
-
-#define JSLL_MUL(r, a, b) { \
-    JSInt64 _a, _b; \
-    _a = a; _b = b; \
-    JSLL_MUL32(r, _a.lo, _b.lo); \
-    (r).hi += _a.hi * _b.lo + _a.lo * _b.hi; \
-}
-
-#define jslo16(a)        ((a) & JS_BITMASK(16))
-#define jshi16(a)        ((a) >> 16)
-
-#define JSLL_MUL32(r, a, b) { \
-     JSUint32 _a1, _a0, _b1, _b0, _y0, _y1, _y2, _y3; \
-     _a1 = jshi16(a), _a0 = jslo16(a); \
-     _b1 = jshi16(b), _b0 = jslo16(b); \
-     _y0 = _a0 * _b0; \
-     _y1 = _a0 * _b1; \
-     _y2 = _a1 * _b0; \
-     _y3 = _a1 * _b1; \
-     _y1 += jshi16(_y0);                         /* can't carry */ \
-     _y1 += _y2;                                /* might carry */ \
-     if (_y1 < _y2)    \
-        _y3 += (JSUint32)(JS_BIT(16));  /* propagate */ \
-     (r).lo = (jslo16(_y1) << 16) + jslo16(_y0); \
-     (r).hi = _y3 + jshi16(_y1); \
-}
-
-#define JSLL_UDIVMOD(qp, rp, a, b)    jsll_udivmod(qp, rp, a, b)
-
-extern JS_PUBLIC_API(void) jsll_udivmod(JSUint64 *qp, JSUint64 *rp, JSUint64 a, JSUint64 b);
-
-#define JSLL_DIV(r, a, b) { \
-    JSInt64 _a, _b; \
-    JSUint32 _negative = (JSInt32)(a).hi < 0; \
-    if (_negative) { \
-    JSLL_NEG(_a, a); \
-    } else { \
-    _a = a; \
-    } \
-    if ((JSInt32)(b).hi < 0) { \
-    _negative ^= 1; \
-    JSLL_NEG(_b, b); \
-    } else { \
-    _b = b; \
-    } \
-    JSLL_UDIVMOD(&(r), 0, _a, _b); \
-    if (_negative) \
-    JSLL_NEG(r, r); \
-}
-
-#define JSLL_MOD(r, a, b) { \
-    JSInt64 _a, _b; \
-    JSUint32 _negative = (JSInt32)(a).hi < 0; \
-    if (_negative) { \
-    JSLL_NEG(_a, a); \
-    } else { \
-    _a = a; \
-    } \
-    if ((JSInt32)(b).hi < 0) { \
-    JSLL_NEG(_b, b); \
-    } else { \
-    _b = b; \
-    } \
-    JSLL_UDIVMOD(0, &(r), _a, _b); \
-    if (_negative) \
-    JSLL_NEG(r, r); \
-}
-
-#define JSLL_SHL(r, a, b) { \
-    if (b) { \
-    JSInt64 _a; \
-        _a = a; \
-        if ((b) < 32) { \
-        (r).lo = _a.lo << ((b) & 31); \
-        (r).hi = (_a.hi << ((b) & 31)) | (_a.lo >> (32 - (b))); \
-    } else { \
-        (r).lo = 0; \
-        (r).hi = _a.lo << ((b) & 31); \
-    } \
-    } else { \
-    (r) = (a); \
-    } \
-}
-
-/* a is an JSInt32, b is JSInt32, r is JSInt64 */
-#define JSLL_ISHL(r, a, b) { \
-    if (b) { \
-    JSInt64 _a; \
-    _a.lo = (a); \
-    _a.hi = 0; \
-        if ((b) < 32) { \
-        (r).lo = (a) << ((b) & 31); \
-        (r).hi = ((a) >> (32 - (b))); \
-    } else { \
-        (r).lo = 0; \
-        (r).hi = (a) << ((b) & 31); \
-    } \
-    } else { \
-    (r).lo = (a); \
-    (r).hi = 0; \
-    } \
-}
-
-#define JSLL_SHR(r, a, b) { \
-    if (b) { \
-    JSInt64 _a; \
-        _a = a; \
-    if ((b) < 32) { \
-        (r).lo = (_a.hi << (32 - (b))) | (_a.lo >> ((b) & 31)); \
-        (r).hi = (JSInt32)_a.hi >> ((b) & 31); \
-    } else { \
-        (r).lo = (JSInt32)_a.hi >> ((b) & 31); \
-        (r).hi = (JSInt32)_a.hi >> 31; \
-    } \
-    } else { \
-    (r) = (a); \
-    } \
-}
-
-#define JSLL_USHR(r, a, b) { \
-    if (b) { \
-    JSInt64 _a; \
-        _a = a; \
-    if ((b) < 32) { \
-        (r).lo = (_a.hi << (32 - (b))) | (_a.lo >> ((b) & 31)); \
-        (r).hi = _a.hi >> ((b) & 31); \
-    } else { \
-        (r).lo = _a.hi >> ((b) & 31); \
-        (r).hi = 0; \
-    } \
-    } else { \
-    (r) = (a); \
-    } \
-}
-
-#define JSLL_L2I(i, l)        ((i) = (l).lo)
-#define JSLL_L2UI(ui, l)        ((ui) = (l).lo)
-#define JSLL_L2F(f, l)        { double _d; JSLL_L2D(_d, l); (f) = (JSFloat64)_d; }
-
-#define JSLL_L2D(d, l) { \
-    int _negative; \
-    JSInt64 _absval; \
- \
-    _negative = (l).hi >> 31; \
-    if (_negative) { \
-    JSLL_NEG(_absval, l); \
-    } else { \
-    _absval = l; \
-    } \
-    (d) = (double)_absval.hi * 4.294967296e9 + _absval.lo; \
-    if (_negative) \
-    (d) = -(d); \
-}
-
-#define JSLL_I2L(l, i)        { JSInt32 _i = (i) >> 31; (l).lo = (i); (l).hi = _i; }
-#define JSLL_UI2L(l, ui)      ((l).lo = (ui), (l).hi = 0)
-#define JSLL_F2L(l, f)        { double _d = (double)f; JSLL_D2L(l, _d); }
-
-#define JSLL_D2L(l, d) { \
-    int _negative; \
-    double _absval, _d_hi; \
-    JSInt64 _lo_d; \
- \
-    _negative = ((d) < 0); \
-    _absval = _negative ? -(d) : (d); \
- \
-    (l).hi = _absval / 4.294967296e9; \
-    (l).lo = 0; \
-    JSLL_L2D(_d_hi, l); \
-    _absval -= _d_hi; \
-    _lo_d.hi = 0; \
-    if (_absval < 0) { \
-    _lo_d.lo = -_absval; \
-    JSLL_SUB(l, l, _lo_d); \
-    } else { \
-    _lo_d.lo = _absval; \
-    JSLL_ADD(l, l, _lo_d); \
-    } \
- \
-    if (_negative) \
-    JSLL_NEG(l, l); \
-}
-
-#endif /* !JS_HAVE_LONG_LONG */
-
-JS_END_EXTERN_C
-
-#endif /* jslong_h___ */
diff --git a/extra_lib/include/js/jsosdep.h b/extra_lib/include/js/jsosdep.h
deleted file mode 100644
index 96841c2..0000000
--- a/extra_lib/include/js/jsosdep.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * 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.
- *
- * The Original Code is Mozilla Communicator client code, released
- * March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef jsosdep_h___
-#define jsosdep_h___
-/*
- * OS (and machine, and compiler XXX) dependent information.
- */
-
-#if defined(XP_WIN) || defined(XP_OS2)
-
-#if defined(_WIN32) || defined (XP_OS2) || defined (__SYMBIAN32__)
-#define JS_HAVE_LONG_LONG
-#else
-#undef JS_HAVE_LONG_LONG
-#endif
-#endif /* XP_WIN || XP_OS2 */
-
-#ifdef XP_BEOS
-#define JS_HAVE_LONG_LONG
-#endif
-
-
-#ifdef XP_UNIX
-
-/*
- * Get OS specific header information.
- */
-#if defined(XP_MACOSX) || defined(DARWIN)
-#define JS_HAVE_LONG_LONG
-
-#elif defined(AIXV3) || defined(AIX)
-#define JS_HAVE_LONG_LONG
-
-#elif defined(BSDI)
-#define JS_HAVE_LONG_LONG
-
-#elif defined(HPUX)
-#define JS_HAVE_LONG_LONG
-
-#elif defined(IRIX)
-#define JS_HAVE_LONG_LONG
-
-#elif defined(linux)
-#define JS_HAVE_LONG_LONG
-
-#elif defined(OSF1)
-#define JS_HAVE_LONG_LONG
-
-#elif defined(_SCO_DS)
-#undef JS_HAVE_LONG_LONG
-
-#elif defined(SOLARIS)
-#define JS_HAVE_LONG_LONG
-
-#elif defined(FREEBSD)
-#define JS_HAVE_LONG_LONG
-
-#elif defined(SUNOS4)
-#undef JS_HAVE_LONG_LONG
-
-/*
-** Missing function prototypes
-*/
-
-extern void *sbrk(int);
-
-#elif defined(UNIXWARE)
-#undef JS_HAVE_LONG_LONG
-
-#elif defined(VMS) && defined(__ALPHA)
-#define JS_HAVE_LONG_LONG
-
-#endif
-
-#endif /* XP_UNIX */
-
-#endif /* jsosdep_h___ */
-
diff --git a/extra_lib/include/js/jsotypes.h b/extra_lib/include/js/jsotypes.h
deleted file mode 100644
index 38d7286..0000000
--- a/extra_lib/include/js/jsotypes.h
+++ /dev/null
@@ -1,202 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * 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.
- *
- * The Original Code is Mozilla Communicator client code, released
- * March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/*
- * This section typedefs the old 'native' types to the new PR<type>s.
- * These definitions are scheduled to be eliminated at the earliest
- * possible time. The NSPR API is implemented and documented using
- * the new definitions.
- */
-
-/*
- * Note that we test for PROTYPES_H, not JSOTYPES_H.  This is to avoid
- * double-definitions of scalar types such as uint32, if NSPR's
- * protypes.h is also included.
- */
-#ifndef PROTYPES_H
-#define PROTYPES_H
-
-#ifdef XP_BEOS
-/* BeOS defines most int types in SupportDefs.h (int8, uint8, int16,
- * uint16, int32, uint32, int64, uint64), so in the interest of
- * not conflicting with other definitions elsewhere we have to skip the
- * #ifdef jungle below, duplicate some definitions, and do our stuff.
- */
-#include <SupportDefs.h>
-
-typedef JSUintn uintn;
-#ifndef _XP_Core_
-typedef JSIntn intn;
-#endif
-
-#else
-
-/* SVR4 typedef of uint is commonly found on UNIX machines. */
-#if defined(XP_UNIX) && !defined(__QNXNTO__)
-#include <sys/types.h>
-#else
-typedef JSUintn uint;
-#endif
-
-typedef JSUintn uintn;
-typedef JSUint64 uint64;
-#if !defined(_WIN32) && !defined(XP_OS2)
-typedef JSUint32 uint32;
-#else
-typedef unsigned long uint32;
-#endif
-typedef JSUint16 uint16;
-typedef JSUint8 uint8;
-
-#ifndef _XP_Core_
-typedef JSIntn intn;
-#endif
-
-/*
- * On AIX 4.3, sys/inttypes.h (which is included by sys/types.h, a very
- * common header file) defines the types int8, int16, int32, and int64.
- * So we don't define these four types here to avoid conflicts in case
- * the code also includes sys/types.h.
- */
-#if defined(AIX) && defined(HAVE_SYS_INTTYPES_H)
-#include <sys/inttypes.h>
-#else
-typedef JSInt64 int64;
-
-/* /usr/include/model.h on HP-UX defines int8, int16, and int32 */
-#ifdef HPUX
-#include <model.h>
-#else
-#if !defined(_WIN32) && !defined(XP_OS2)
-typedef JSInt32 int32;
-#else
-typedef long int32;
-#endif
-typedef JSInt16 int16;
-typedef JSInt8 int8;
-#endif /* HPUX */
-#endif /* AIX && HAVE_SYS_INTTYPES_H */
-
-#endif  /* XP_BEOS */
-
-typedef JSFloat64 float64;
-
-/* Re: jsbit.h */
-#define TEST_BIT        JS_TEST_BIT
-#define SET_BIT         JS_SET_BIT
-#define CLEAR_BIT       JS_CLEAR_BIT
-
-/* Re: prarena.h->plarena.h */
-#define PRArena PLArena
-#define PRArenaPool PLArenaPool
-#define PRArenaStats PLArenaStats
-#define PR_ARENA_ALIGN PL_ARENA_ALIGN
-#define PR_INIT_ARENA_POOL PL_INIT_ARENA_POOL
-#define PR_ARENA_ALLOCATE PL_ARENA_ALLOCATE
-#define PR_ARENA_GROW PL_ARENA_GROW
-#define PR_ARENA_MARK PL_ARENA_MARK
-#define PR_CLEAR_UNUSED PL_CLEAR_UNUSED
-#define PR_CLEAR_ARENA PL_CLEAR_ARENA
-#define PR_ARENA_RELEASE PL_ARENA_RELEASE
-#define PR_COUNT_ARENA PL_COUNT_ARENA
-#define PR_ARENA_DESTROY PL_ARENA_DESTROY
-#define PR_InitArenaPool PL_InitArenaPool
-#define PR_FreeArenaPool PL_FreeArenaPool
-#define PR_FinishArenaPool PL_FinishArenaPool
-#define PR_CompactArenaPool PL_CompactArenaPool
-#define PR_ArenaFinish PL_ArenaFinish
-#define PR_ArenaAllocate PL_ArenaAllocate
-#define PR_ArenaGrow PL_ArenaGrow
-#define PR_ArenaRelease PL_ArenaRelease
-#define PR_ArenaCountAllocation PL_ArenaCountAllocation
-#define PR_ArenaCountInplaceGrowth PL_ArenaCountInplaceGrowth
-#define PR_ArenaCountGrowth PL_ArenaCountGrowth
-#define PR_ArenaCountRelease PL_ArenaCountRelease
-#define PR_ArenaCountRetract PL_ArenaCountRetract
-
-/* Re: prevent.h->plevent.h */
-#define PREvent PLEvent
-#define PREventQueue PLEventQueue
-#define PR_CreateEventQueue PL_CreateEventQueue
-#define PR_DestroyEventQueue PL_DestroyEventQueue
-#define PR_GetEventQueueMonitor PL_GetEventQueueMonitor
-#define PR_ENTER_EVENT_QUEUE_MONITOR PL_ENTER_EVENT_QUEUE_MONITOR
-#define PR_EXIT_EVENT_QUEUE_MONITOR PL_EXIT_EVENT_QUEUE_MONITOR
-#define PR_PostEvent PL_PostEvent
-#define PR_PostSynchronousEvent PL_PostSynchronousEvent
-#define PR_GetEvent PL_GetEvent
-#define PR_EventAvailable PL_EventAvailable
-#define PREventFunProc PLEventFunProc
-#define PR_MapEvents PL_MapEvents
-#define PR_RevokeEvents PL_RevokeEvents
-#define PR_ProcessPendingEvents PL_ProcessPendingEvents
-#define PR_WaitForEvent PL_WaitForEvent
-#define PR_EventLoop PL_EventLoop
-#define PR_GetEventQueueSelectFD PL_GetEventQueueSelectFD
-#define PRHandleEventProc PLHandleEventProc
-#define PRDestroyEventProc PLDestroyEventProc
-#define PR_InitEvent PL_InitEvent
-#define PR_GetEventOwner PL_GetEventOwner
-#define PR_HandleEvent PL_HandleEvent
-#define PR_DestroyEvent PL_DestroyEvent
-#define PR_DequeueEvent PL_DequeueEvent
-#define PR_GetMainEventQueue PL_GetMainEventQueue
-
-/* Re: prhash.h->plhash.h */
-#define PRHashEntry PLHashEntry
-#define PRHashTable PLHashTable
-#define PRHashNumber PLHashNumber
-#define PRHashFunction PLHashFunction
-#define PRHashComparator PLHashComparator
-#define PRHashEnumerator PLHashEnumerator
-#define PRHashAllocOps PLHashAllocOps
-#define PR_NewHashTable PL_NewHashTable
-#define PR_HashTableDestroy PL_HashTableDestroy
-#define PR_HashTableRawLookup PL_HashTableRawLookup
-#define PR_HashTableRawAdd PL_HashTableRawAdd
-#define PR_HashTableRawRemove PL_HashTableRawRemove
-#define PR_HashTableAdd PL_HashTableAdd
-#define PR_HashTableRemove PL_HashTableRemove
-#define PR_HashTableEnumerateEntries PL_HashTableEnumerateEntries
-#define PR_HashTableLookup PL_HashTableLookup
-#define PR_HashTableDump PL_HashTableDump
-#define PR_HashString PL_HashString
-#define PR_CompareStrings PL_CompareStrings
-#define PR_CompareValues PL_CompareValues
-
-#endif /* !defined(PROTYPES_H) */
diff --git a/extra_lib/include/js/jsproto.tbl b/extra_lib/include/js/jsproto.tbl
deleted file mode 100644
index 1b306c7..0000000
--- a/extra_lib/include/js/jsproto.tbl
+++ /dev/null
@@ -1,116 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * vim: set sw=4 ts=8 et tw=80 ft=c:
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * 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.
- *
- * The Original Code is SpiderMonkey 1.7 work in progress, released
- * February 14, 2006.
- *
- * The Initial Developer of the Original Code is
- * Brendan Eich <brendan at mozilla.org>
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-//#include "jsconfig.h"
-
-#if JS_HAS_SCRIPT_OBJECT
-# define SCRIPT_INIT                    js_InitScriptClass
-#else
-# define SCRIPT_INIT                    js_InitNullClass
-#endif
-
-#if JS_HAS_XML_SUPPORT
-# define XML_INIT                       js_InitXMLClass
-# define NAMESPACE_INIT                 js_InitNamespaceClass
-# define QNAME_INIT                     js_InitQNameClass
-# define ANYNAME_INIT                   js_InitAnyNameClass
-# define ATTRIBUTE_INIT                 js_InitAttributeNameClass
-#else
-# define XML_INIT                       js_InitNullClass
-# define NAMESPACE_INIT                 js_InitNullClass
-# define QNAME_INIT                     js_InitNullClass
-# define ANYNAME_INIT                   js_InitNullClass
-# define ATTRIBUTE_INIT                 js_InitNullClass
-#endif
-
-#if JS_HAS_GENERATORS
-# define GENERATOR_INIT                 js_InitIteratorClasses
-#else
-# define GENERATOR_INIT                 js_InitNullClass
-#endif
-
-#if JS_HAS_FILE_OBJECT
-# define FILE_INIT                      js_InitFileClass
-#else
-# define FILE_INIT                      js_InitNullClass
-#endif
-
-/*
- * Enumerator codes in the second column must not change -- they are part of
- * the JS XDR API.
- */
-JS_PROTO(Null,                   0,     js_InitNullClass)
-JS_PROTO(Object,                 1,     js_InitFunctionAndObjectClasses)
-JS_PROTO(Function,               2,     js_InitFunctionAndObjectClasses)
-JS_PROTO(Array,                  3,     js_InitArrayClass)
-JS_PROTO(Boolean,                4,     js_InitBooleanClass)
-JS_PROTO(Call,                   5,     js_InitCallClass)
-JS_PROTO(Date,                   6,     js_InitDateClass)
-JS_PROTO(Math,                   7,     js_InitMathClass)
-JS_PROTO(Number,                 8,     js_InitNumberClass)
-JS_PROTO(String,                 9,     js_InitStringClass)
-JS_PROTO(RegExp,                10,     js_InitRegExpClass)
-JS_PROTO(Script,                11,     SCRIPT_INIT)
-JS_PROTO(XML,                   12,     XML_INIT)
-JS_PROTO(Namespace,             13,     NAMESPACE_INIT)
-JS_PROTO(QName,                 14,     QNAME_INIT)
-JS_PROTO(AnyName,               15,     ANYNAME_INIT)
-JS_PROTO(AttributeName,         16,     ATTRIBUTE_INIT)
-JS_PROTO(Error,                 17,     js_InitExceptionClasses)
-JS_PROTO(InternalError,         18,     js_InitExceptionClasses)
-JS_PROTO(EvalError,             19,     js_InitExceptionClasses)
-JS_PROTO(RangeError,            20,     js_InitExceptionClasses)
-JS_PROTO(ReferenceError,        21,     js_InitExceptionClasses)
-JS_PROTO(SyntaxError,           22,     js_InitExceptionClasses)
-JS_PROTO(TypeError,             23,     js_InitExceptionClasses)
-JS_PROTO(URIError,              24,     js_InitExceptionClasses)
-JS_PROTO(Generator,             25,     GENERATOR_INIT)
-JS_PROTO(Iterator,              26,     js_InitIteratorClasses)
-JS_PROTO(StopIteration,         27,     js_InitIteratorClasses)
-JS_PROTO(UnusedProto28,         28,     js_InitNullClass)
-JS_PROTO(File,                  29,     FILE_INIT)
-JS_PROTO(Block,                 30,     js_InitBlockClass)
-
-#undef SCRIPT_INIT
-#undef XML_INIT
-#undef NAMESPACE_INIT
-#undef QNAME_INIT
-#undef ANYNAME_INIT
-#undef ATTRIBUTE_INIT
-#undef GENERATOR_INIT
-#undef FILE_INIT
diff --git a/extra_lib/include/js/jspubtd.h b/extra_lib/include/js/jspubtd.h
deleted file mode 100644
index 4e8c92a..0000000
--- a/extra_lib/include/js/jspubtd.h
+++ /dev/null
@@ -1,667 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * 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.
- *
- * The Original Code is Mozilla Communicator client code, released
- * March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef jspubtd_h___
-#define jspubtd_h___
-/*
- * JS public API typedefs.
- */
-#include "jstypes.h"
-#include "jscompat.h"
-
-JS_BEGIN_EXTERN_C
-
-/* Scalar typedefs. */
-typedef uint16    jschar;
-typedef int32     jsint;
-typedef uint32    jsuint;
-typedef float64   jsdouble;
-typedef jsword    jsval;
-typedef jsword    jsid;
-typedef int32     jsrefcount;   /* PRInt32 if JS_THREADSAFE, see jslock.h */
-
-/*
- * Run-time version enumeration.  See jsconfig.h for compile-time counterparts
- * to these values that may be selected by the JS_VERSION macro, and tested by
- * #if expressions.
- */
-typedef enum JSVersion {
-    JSVERSION_1_0     = 100,
-    JSVERSION_1_1     = 110,
-    JSVERSION_1_2     = 120,
-    JSVERSION_1_3     = 130,
-    JSVERSION_1_4     = 140,
-    JSVERSION_ECMA_3  = 148,
-    JSVERSION_1_5     = 150,
-    JSVERSION_1_6     = 160,
-    JSVERSION_1_7     = 170,
-    JSVERSION_DEFAULT = 0,
-    JSVERSION_UNKNOWN = -1
-} JSVersion;
-
-#define JSVERSION_IS_ECMA(version) \
-    ((version) == JSVERSION_DEFAULT || (version) >= JSVERSION_1_3)
-
-/* Result of typeof operator enumeration. */
-typedef enum JSType {
-    JSTYPE_VOID,                /* undefined */
-    JSTYPE_OBJECT,              /* object */
-    JSTYPE_FUNCTION,            /* function */
-    JSTYPE_STRING,              /* string */
-    JSTYPE_NUMBER,              /* number */
-    JSTYPE_BOOLEAN,             /* boolean */
-    JSTYPE_NULL,                /* null */
-    JSTYPE_XML,                 /* xml object */
-    JSTYPE_LIMIT
-} JSType;
-
-/* Dense index into cached prototypes and class atoms for standard objects. */
-typedef enum JSProtoKey {
-#define JS_PROTO(name,code,init) JSProto_##name = code,
-#include "jsproto.tbl"
-#undef JS_PROTO
-    JSProto_LIMIT
-} JSProtoKey;
-
-/* JSObjectOps.checkAccess mode enumeration. */
-typedef enum JSAccessMode {
-    JSACC_PROTO  = 0,           /* XXXbe redundant w.r.t. id */
-    JSACC_PARENT = 1,           /* XXXbe redundant w.r.t. id */
-    JSACC_IMPORT = 2,           /* import foo.bar */
-    JSACC_WATCH  = 3,           /* a watchpoint on object foo for id 'bar' */
-    JSACC_READ   = 4,           /* a "get" of foo.bar */
-    JSACC_WRITE  = 8,           /* a "set" of foo.bar = baz */
-    JSACC_LIMIT
-} JSAccessMode;
-
-#define JSACC_TYPEMASK          (JSACC_WRITE - 1)
-
-/*
- * This enum type is used to control the behavior of a JSObject property
- * iterator function that has type JSNewEnumerate.
- */
-typedef enum JSIterateOp {
-    JSENUMERATE_INIT,       /* Create new iterator state */
-    JSENUMERATE_NEXT,       /* Iterate once */
-    JSENUMERATE_DESTROY     /* Destroy iterator state */
-} JSIterateOp;
-
-/* Struct typedefs. */
-typedef struct JSClass           JSClass;
-typedef struct JSExtendedClass   JSExtendedClass;
-typedef struct JSConstDoubleSpec JSConstDoubleSpec;
-typedef struct JSContext         JSContext;
-typedef struct JSErrorReport     JSErrorReport;
-typedef struct JSFunction        JSFunction;
-typedef struct JSFunctionSpec    JSFunctionSpec;
-typedef struct JSIdArray         JSIdArray;
-typedef struct JSProperty        JSProperty;
-typedef struct JSPropertySpec    JSPropertySpec;
-typedef struct JSObject          JSObject;
-typedef struct JSObjectMap       JSObjectMap;
-typedef struct JSObjectOps       JSObjectOps;
-typedef struct JSXMLObjectOps    JSXMLObjectOps;
-typedef struct JSRuntime         JSRuntime;
-typedef struct JSRuntime         JSTaskState;   /* XXX deprecated name */
-typedef struct JSScript          JSScript;
-typedef struct JSStackFrame      JSStackFrame;
-typedef struct JSString          JSString;
-typedef struct JSXDRState        JSXDRState;
-typedef struct JSExceptionState  JSExceptionState;
-typedef struct JSLocaleCallbacks JSLocaleCallbacks;
-
-/* JSClass (and JSObjectOps where appropriate) function pointer typedefs. */
-
-/*
- * Add, delete, get or set a property named by id in obj.  Note the jsval id
- * type -- id may be a string (Unicode property identifier) or an int (element
- * index).  The *vp out parameter, on success, is the new property value after
- * an add, get, or set.  After a successful delete, *vp is JSVAL_FALSE iff
- * obj[id] can't be deleted (because it's permanent).
- */
-typedef JSBool
-(* JS_DLL_CALLBACK JSPropertyOp)(JSContext *cx, JSObject *obj, jsval id,
-                                 jsval *vp);
-
-/*
- * This function type is used for callbacks that enumerate the properties of
- * a JSObject.  The behavior depends on the value of enum_op:
- *
- *  JSENUMERATE_INIT
- *    A new, opaque iterator state should be allocated and stored in *statep.
- *    (You can use PRIVATE_TO_JSVAL() to tag the pointer to be stored).
- *
- *    The number of properties that will be enumerated should be returned as
- *    an integer jsval in *idp, if idp is non-null, and provided the number of
- *    enumerable properties is known.  If idp is non-null and the number of
- *    enumerable properties can't be computed in advance, *idp should be set
- *    to JSVAL_ZERO.
- *
- *  JSENUMERATE_NEXT
- *    A previously allocated opaque iterator state is passed in via statep.
- *    Return the next jsid in the iteration using *idp.  The opaque iterator
- *    state pointed at by statep is destroyed and *statep is set to JSVAL_NULL
- *    if there are no properties left to enumerate.
- *
- *  JSENUMERATE_DESTROY
- *    Destroy the opaque iterator state previously allocated in *statep by a
- *    call to this function when enum_op was JSENUMERATE_INIT.
- *
- * The return value is used to indicate success, with a value of JS_FALSE
- * indicating failure.
- */
-typedef JSBool
-(* JS_DLL_CALLBACK JSNewEnumerateOp)(JSContext *cx, JSObject *obj,
-                                     JSIterateOp enum_op,
-                                     jsval *statep, jsid *idp);
-
-/*
- * The old-style JSClass.enumerate op should define all lazy properties not
- * yet reflected in obj.
- */
-typedef JSBool
-(* JS_DLL_CALLBACK JSEnumerateOp)(JSContext *cx, JSObject *obj);
-
-/*
- * Resolve a lazy property named by id in obj by defining it directly in obj.
- * Lazy properties are those reflected from some peer native property space
- * (e.g., the DOM attributes for a given node reflected as obj) on demand.
- *
- * JS looks for a property in an object, and if not found, tries to resolve
- * the given id.  If resolve succeeds, the engine looks again in case resolve
- * defined obj[id].  If no such property exists directly in obj, the process
- * is repeated with obj's prototype, etc.
- *
- * NB: JSNewResolveOp provides a cheaper way to resolve lazy properties.
- */
-typedef JSBool
-(* JS_DLL_CALLBACK JSResolveOp)(JSContext *cx, JSObject *obj, jsval id);
-
-/*
- * Like JSResolveOp, but flags provide contextual information as follows:
- *
- *  JSRESOLVE_QUALIFIED   a qualified property id: obj.id or obj[id], not id
- *  JSRESOLVE_ASSIGNING   obj[id] is on the left-hand side of an assignment
- *  JSRESOLVE_DETECTING   'if (o.p)...' or similar detection opcode sequence
- *  JSRESOLVE_DECLARING   var, const, or function prolog declaration opcode
- *  JSRESOLVE_CLASSNAME   class name used when constructing
- *
- * The *objp out parameter, on success, should be null to indicate that id
- * was not resolved; and non-null, referring to obj or one of its prototypes,
- * if id was resolved.
- *
- * This hook instead of JSResolveOp is called via the JSClass.resolve member
- * if JSCLASS_NEW_RESOLVE is set in JSClass.flags.
- *
- * Setting JSCLASS_NEW_RESOLVE and JSCLASS_NEW_RESOLVE_GETS_START further
- * extends this hook by passing in the starting object on the prototype chain
- * via *objp.  Thus a resolve hook implementation may define the property id
- * being resolved in the object in which the id was first sought, rather than
- * in a prototype object whose class led to the resolve hook being called.
- *
- * When using JSCLASS_NEW_RESOLVE_GETS_START, the resolve hook must therefore
- * null *objp to signify "not resolved".  With only JSCLASS_NEW_RESOLVE and no
- * JSCLASS_NEW_RESOLVE_GETS_START, the hook can assume *objp is null on entry.
- * This is not good practice, but enough existing hook implementations count
- * on it that we can't break compatibility by passing the starting object in
- * *objp without a new JSClass flag.
- */
-typedef JSBool
-(* JS_DLL_CALLBACK JSNewResolveOp)(JSContext *cx, JSObject *obj, jsval id,
-                                   uintN flags, JSObject **objp);
-
-/*
- * Convert obj to the given type, returning true with the resulting value in
- * *vp on success, and returning false on error or exception.
- */
-typedef JSBool
-(* JS_DLL_CALLBACK JSConvertOp)(JSContext *cx, JSObject *obj, JSType type,
-                                jsval *vp);
-
-/*
- * Finalize obj, which the garbage collector has determined to be unreachable
- * from other live objects or from GC roots.  Obviously, finalizers must never
- * store a reference to obj.
- */
-typedef void
-(* JS_DLL_CALLBACK JSFinalizeOp)(JSContext *cx, JSObject *obj);
-
-/*
- * Used by JS_AddExternalStringFinalizer and JS_RemoveExternalStringFinalizer
- * to extend and reduce the set of string types finalized by the GC.
- */
-typedef void
-(* JS_DLL_CALLBACK JSStringFinalizeOp)(JSContext *cx, JSString *str);
-
-/*
- * The signature for JSClass.getObjectOps, used by JS_NewObject's internals
- * to discover the set of high-level object operations to use for new objects
- * of the given class.  All native objects have a JSClass, which is stored as
- * a private (int-tagged) pointer in obj->slots[JSSLOT_CLASS].  In contrast,
- * all native and host objects have a JSObjectMap at obj->map, which may be
- * shared among a number of objects, and which contains the JSObjectOps *ops
- * pointer used to dispatch object operations from API calls.
- *
- * Thus JSClass (which pre-dates JSObjectOps in the API) provides a low-level
- * interface to class-specific code and data, while JSObjectOps allows for a
- * higher level of operation, which does not use the object's class except to
- * find the class's JSObjectOps struct, by calling clasp->getObjectOps, and to
- * finalize the object.
- *
- * If this seems backwards, that's because it is!  API compatibility requires
- * a JSClass *clasp parameter to JS_NewObject, etc.  Most host objects do not
- * need to implement the larger JSObjectOps, and can share the common JSScope
- * code and data used by the native (js_ObjectOps, see jsobj.c) ops.
- *
- * Further extension to preserve API compatibility: if this function returns
- * a pointer to JSXMLObjectOps.base, not to JSObjectOps, then the engine calls
- * extended hooks needed for E4X.
- */
-typedef JSObjectOps *
-(* JS_DLL_CALLBACK JSGetObjectOps)(JSContext *cx, JSClass *clasp);
-
-/*
- * JSClass.checkAccess type: check whether obj[id] may be accessed per mode,
- * returning false on error/exception, true on success with obj[id]'s last-got
- * value in *vp, and its attributes in *attrsp.  As for JSPropertyOp above, id
- * is either a string or an int jsval.
- *
- * See JSCheckAccessIdOp, below, for the JSObjectOps counterpart, which takes
- * a jsid (a tagged int or aligned, unique identifier pointer) rather than a
- * jsval.  The native js_ObjectOps.checkAccess simply forwards to the object's
- * clasp->checkAccess, so that both JSClass and JSObjectOps implementors may
- * specialize access checks.
- */
-typedef JSBool
-(* JS_DLL_CALLBACK JSCheckAccessOp)(JSContext *cx, JSObject *obj, jsval id,
-                                    JSAccessMode mode, jsval *vp);
-
-/*
- * Encode or decode an object, given an XDR state record representing external
- * data.  See jsxdrapi.h.
- */
-typedef JSBool
-(* JS_DLL_CALLBACK JSXDRObjectOp)(JSXDRState *xdr, JSObject **objp);
-
-/*
- * Check whether v is an instance of obj.  Return false on error or exception,
- * true on success with JS_TRUE in *bp if v is an instance of obj, JS_FALSE in
- * *bp otherwise.
- */
-typedef JSBool
-(* JS_DLL_CALLBACK JSHasInstanceOp)(JSContext *cx, JSObject *obj, jsval v,
-                                    JSBool *bp);
-
-/*
- * Function type for JSClass.mark and JSObjectOps.mark, called from the GC to
- * scan live GC-things reachable from obj's private data structure.  For each
- * such thing, a mark implementation must call
- *
- *    JS_MarkGCThing(cx, thing, name, arg);
- *
- * The trailing name and arg parameters are used for GC_MARK_DEBUG-mode heap
- * dumping and ref-path tracing.  The mark function should pass a (typically
- * literal) string naming the private data member for name, and it must pass
- * the opaque arg parameter through from its caller.
- *
- * For the JSObjectOps.mark hook, the return value is the number of slots at
- * obj->slots to scan.  For JSClass.mark, the return value is ignored.
- *
- * NB: JSMarkOp implementations cannot allocate new GC-things (JS_NewObject
- * called from a mark function will fail silently, e.g.).
- */
-typedef uint32
-(* JS_DLL_CALLBACK JSMarkOp)(JSContext *cx, JSObject *obj, void *arg);
-
-/*
- * The optional JSClass.reserveSlots hook allows a class to make computed
- * per-instance object slots reservations, in addition to or instead of using
- * JSCLASS_HAS_RESERVED_SLOTS(n) in the JSClass.flags initializer to reserve
- * a constant-per-class number of slots.  Implementations of this hook should
- * return the number of slots to reserve, not including any reserved by using
- * JSCLASS_HAS_RESERVED_SLOTS(n) in JSClass.flags.
- *
- * NB: called with obj locked by the JSObjectOps-specific mutual exclusion
- * mechanism appropriate for obj, so don't nest other operations that might
- * also lock obj.
- */
-typedef uint32
-(* JS_DLL_CALLBACK JSReserveSlotsOp)(JSContext *cx, JSObject *obj);
-
-/* JSObjectOps function pointer typedefs. */
-
-/*
- * Create a new subclass of JSObjectMap (see jsobj.h), with the nrefs and ops
- * members initialized from the same-named parameters, and with the nslots and
- * freeslot members initialized according to ops and clasp.  Return null on
- * error, non-null on success.
- *
- * JSObjectMaps are reference-counted by generic code in the engine.  Usually,
- * the nrefs parameter to JSObjectOps.newObjectMap will be 1, to count the ref
- * returned to the caller on success.  After a successful construction, some
- * number of js_HoldObjectMap and js_DropObjectMap calls ensue.  When nrefs
- * reaches 0 due to a js_DropObjectMap call, JSObjectOps.destroyObjectMap will
- * be called to dispose of the map.
- */
-typedef JSObjectMap *
-(* JS_DLL_CALLBACK JSNewObjectMapOp)(JSContext *cx, jsrefcount nrefs,
-                                     JSObjectOps *ops, JSClass *clasp,
-                                     JSObject *obj);
-
-/*
- * Generic type for an infallible JSObjectMap operation, used currently by
- * JSObjectOps.destroyObjectMap.
- */
-typedef void
-(* JS_DLL_CALLBACK JSObjectMapOp)(JSContext *cx, JSObjectMap *map);
-
-/*
- * Look for id in obj and its prototype chain, returning false on error or
- * exception, true on success.  On success, return null in *propp if id was
- * not found.  If id was found, return the first object searching from obj
- * along its prototype chain in which id names a direct property in *objp, and
- * return a non-null, opaque property pointer in *propp.
- *
- * If JSLookupPropOp succeeds and returns with *propp non-null, that pointer
- * may be passed as the prop parameter to a JSAttributesOp, as a short-cut
- * that bypasses id re-lookup.  In any case, a non-null *propp result after a
- * successful lookup must be dropped via JSObjectOps.dropProperty.
- *
- * NB: successful return with non-null *propp means the implementation may
- * have locked *objp and added a reference count associated with *propp, so
- * callers should not risk deadlock by nesting or interleaving other lookups
- * or any obj-bearing ops before dropping *propp.
- */
-typedef JSBool
-(* JS_DLL_CALLBACK JSLookupPropOp)(JSContext *cx, JSObject *obj, jsid id,
-                                   JSObject **objp, JSProperty **propp);
-
-/*
- * Define obj[id], a direct property of obj named id, having the given initial
- * value, with the specified getter, setter, and attributes.  If the propp out
- * param is non-null, *propp on successful return contains an opaque property
- * pointer usable as a speedup hint with JSAttributesOp.  But note that propp
- * may be null, indicating that the caller is not interested in recovering an
- * opaque pointer to the newly-defined property.
- *
- * If propp is non-null and JSDefinePropOp succeeds, its caller must be sure
- * to drop *propp using JSObjectOps.dropProperty in short order, just as with
- * JSLookupPropOp.
- */
-typedef JSBool
-(* JS_DLL_CALLBACK JSDefinePropOp)(JSContext *cx, JSObject *obj,
-                                   jsid id, jsval value,
-                                   JSPropertyOp getter, JSPropertyOp setter,
-                                   uintN attrs, JSProperty **propp);
-
-/*
- * Get, set, or delete obj[id], returning false on error or exception, true
- * on success.  If getting or setting, the new value is returned in *vp on
- * success.  If deleting without error, *vp will be JSVAL_FALSE if obj[id] is
- * permanent, and JSVAL_TRUE if id named a direct property of obj that was in
- * fact deleted, or if id names no direct property of obj (id could name a
- * prototype property, or no property in obj or its prototype chain).
- */
-typedef JSBool
-(* JS_DLL_CALLBACK JSPropertyIdOp)(JSContext *cx, JSObject *obj, jsid id,
-                                   jsval *vp);
-
-/*
- * Get or set attributes of the property obj[id].  Return false on error or
- * exception, true with current attributes in *attrsp.  If prop is non-null,
- * it must come from the *propp out parameter of a prior JSDefinePropOp or
- * JSLookupPropOp call.
- */
-typedef JSBool
-(* JS_DLL_CALLBACK JSAttributesOp)(JSContext *cx, JSObject *obj, jsid id,
-                                   JSProperty *prop, uintN *attrsp);
-
-/*
- * JSObjectOps.checkAccess type: check whether obj[id] may be accessed per
- * mode, returning false on error/exception, true on success with obj[id]'s
- * last-got value in *vp, and its attributes in *attrsp.
- */
-typedef JSBool
-(* JS_DLL_CALLBACK JSCheckAccessIdOp)(JSContext *cx, JSObject *obj, jsid id,
-                                      JSAccessMode mode, jsval *vp,
-                                      uintN *attrsp);
-
-/*
- * A generic type for functions mapping an object to another object, or null
- * if an error or exception was thrown on cx.  Used by JSObjectOps.thisObject
- * at present.
- */
-typedef JSObject *
-(* JS_DLL_CALLBACK JSObjectOp)(JSContext *cx, JSObject *obj);
-
-/*
- * A generic type for functions taking a context, object, and property, with
- * no return value.  Used by JSObjectOps.dropProperty currently (see above,
- * JSDefinePropOp and JSLookupPropOp, for the object-locking protocol in which
- * dropProperty participates).
- */
-typedef void
-(* JS_DLL_CALLBACK JSPropertyRefOp)(JSContext *cx, JSObject *obj,
-                                    JSProperty *prop);
-
-/*
- * Function type for JSObjectOps.setProto and JSObjectOps.setParent.  These
- * hooks must check for cycles without deadlocking, and otherwise take special
- * steps.  See jsobj.c, js_SetProtoOrParent, for an example.
- */
-typedef JSBool
-(* JS_DLL_CALLBACK JSSetObjectSlotOp)(JSContext *cx, JSObject *obj,
-                                      uint32 slot, JSObject *pobj);
-
-/*
- * Get and set a required slot, one that should already have been allocated.
- * These operations are infallible, so required slots must be pre-allocated,
- * or implementations must suppress out-of-memory errors.  The native ops
- * (js_ObjectOps, see jsobj.c) access slots reserved by including a call to
- * the JSCLASS_HAS_RESERVED_SLOTS(n) macro in the JSClass.flags initializer.
- *
- * NB: the slot parameter is a zero-based index into obj->slots[], unlike the
- * index parameter to the JS_GetReservedSlot and JS_SetReservedSlot API entry
- * points, which is a zero-based index into the JSCLASS_RESERVED_SLOTS(clasp)
- * reserved slots that come after the initial well-known slots: proto, parent,
- * class, and optionally, the private data slot.
- */
-typedef jsval
-(* JS_DLL_CALLBACK JSGetRequiredSlotOp)(JSContext *cx, JSObject *obj,
-                                        uint32 slot);
-
-typedef JSBool
-(* JS_DLL_CALLBACK JSSetRequiredSlotOp)(JSContext *cx, JSObject *obj,
-                                        uint32 slot, jsval v);
-
-typedef JSObject *
-(* JS_DLL_CALLBACK JSGetMethodOp)(JSContext *cx, JSObject *obj, jsid id,
-                                  jsval *vp);
-
-typedef JSBool
-(* JS_DLL_CALLBACK JSSetMethodOp)(JSContext *cx, JSObject *obj, jsid id,
-                                  jsval *vp);
-
-typedef JSBool
-(* JS_DLL_CALLBACK JSEnumerateValuesOp)(JSContext *cx, JSObject *obj,
-                                        JSIterateOp enum_op,
-                                        jsval *statep, jsid *idp, jsval *vp);
-
-typedef JSBool
-(* JS_DLL_CALLBACK JSEqualityOp)(JSContext *cx, JSObject *obj, jsval v,
-                                 JSBool *bp);
-
-typedef JSBool
-(* JS_DLL_CALLBACK JSConcatenateOp)(JSContext *cx, JSObject *obj, jsval v,
-                                    jsval *vp);
-
-/* Typedef for native functions called by the JS VM. */
-
-typedef JSBool
-(* JS_DLL_CALLBACK JSNative)(JSContext *cx, JSObject *obj, uintN argc,
-                             jsval *argv, jsval *rval);
-
-/* Callbacks and their arguments. */
-
-typedef enum JSContextOp {
-    JSCONTEXT_NEW,
-    JSCONTEXT_DESTROY
-} JSContextOp;
-
-/*
- * The possible values for contextOp when the runtime calls the callback are:
- *   JSCONTEXT_NEW      JS_NewContext succesfully created a new JSContext
- *                      instance. The callback can initialize the instance as
- *                      required. If the callback returns false, the instance
- *                      will be destroyed and JS_NewContext returns null. In
- *                      this case the callback is not called again.
- *   JSCONTEXT_DESTROY  One of JS_DestroyContext* methods is called. The
- *                      callback may perform its own cleanup and must always
- *                      return true.
- *   Any other value    For future compatibility the callback must do nothing
- *                      and return true in this case.
- */
-typedef JSBool
-(* JS_DLL_CALLBACK JSContextCallback)(JSContext *cx, uintN contextOp);
-
-typedef enum JSGCStatus {
-    JSGC_BEGIN,
-    JSGC_END,
-    JSGC_MARK_END,
-    JSGC_FINALIZE_END
-} JSGCStatus;
-
-typedef JSBool
-(* JS_DLL_CALLBACK JSGCCallback)(JSContext *cx, JSGCStatus status);
-
-typedef JSBool
-(* JS_DLL_CALLBACK JSBranchCallback)(JSContext *cx, JSScript *script);
-
-typedef void
-(* JS_DLL_CALLBACK JSErrorReporter)(JSContext *cx, const char *message,
-                                    JSErrorReport *report);
-
-/*
- * Possible exception types. These types are part of a JSErrorFormatString
- * structure. They define which error to throw in case of a runtime error.
- * JSEXN_NONE marks an unthrowable error.
- */
-typedef enum JSExnType {
-    JSEXN_NONE = -1,
-      JSEXN_ERR,
-        JSEXN_INTERNALERR,
-        JSEXN_EVALERR,
-        JSEXN_RANGEERR,
-        JSEXN_REFERENCEERR,
-        JSEXN_SYNTAXERR,
-        JSEXN_TYPEERR,
-        JSEXN_URIERR,
-        JSEXN_LIMIT
-} JSExnType;
-
-typedef struct JSErrorFormatString {
-    /* The error format string (UTF-8 if JS_C_STRINGS_ARE_UTF8 is defined). */
-    const char *format;
-
-    /* The number of arguments to expand in the formatted error message. */
-    uint16 argCount;
-
-    /* One of the JSExnType constants above. */
-    int16 exnType;
-} JSErrorFormatString;
-
-typedef const JSErrorFormatString *
-(* JS_DLL_CALLBACK JSErrorCallback)(void *userRef, const char *locale,
-                                    const uintN errorNumber);
-
-#ifdef va_start
-#define JS_ARGUMENT_FORMATTER_DEFINED 1
-
-typedef JSBool
-(* JS_DLL_CALLBACK JSArgumentFormatter)(JSContext *cx, const char *format,
-                                        JSBool fromJS, jsval **vpp,
-                                        va_list *app);
-#endif
-
-typedef JSBool
-(* JS_DLL_CALLBACK JSLocaleToUpperCase)(JSContext *cx, JSString *src,
-                                        jsval *rval);
-
-typedef JSBool
-(* JS_DLL_CALLBACK JSLocaleToLowerCase)(JSContext *cx, JSString *src,
-                                        jsval *rval);
-
-typedef JSBool
-(* JS_DLL_CALLBACK JSLocaleCompare)(JSContext *cx,
-                                    JSString *src1, JSString *src2,
-                                    jsval *rval);
-
-typedef JSBool
-(* JS_DLL_CALLBACK JSLocaleToUnicode)(JSContext *cx, char *src, jsval *rval);
-
-/*
- * Security protocol types.
- */
-typedef struct JSPrincipals JSPrincipals;
-
-/*
- * XDR-encode or -decode a principals instance, based on whether xdr->mode is
- * JSXDR_ENCODE, in which case *principalsp should be encoded; or JSXDR_DECODE,
- * in which case implementations must return a held (via JSPRINCIPALS_HOLD),
- * non-null *principalsp out parameter.  Return true on success, false on any
- * error, which the implementation must have reported.
- */
-typedef JSBool
-(* JS_DLL_CALLBACK JSPrincipalsTranscoder)(JSXDRState *xdr,
-                                           JSPrincipals **principalsp);
-
-/*
- * Return a weak reference to the principals associated with obj, possibly via
- * the immutable parent chain leading from obj to a top-level container (e.g.,
- * a window object in the DOM level 0).  If there are no principals associated
- * with obj, return null.  Therefore null does not mean an error was reported;
- * in no event should an error be reported or an exception be thrown by this
- * callback's implementation.
- */
-typedef JSPrincipals *
-(* JS_DLL_CALLBACK JSObjectPrincipalsFinder)(JSContext *cx, JSObject *obj);
-
-JS_END_EXTERN_C
-
-#endif /* jspubtd_h___ */
diff --git a/extra_lib/include/js/jstypes.h b/extra_lib/include/js/jstypes.h
deleted file mode 100644
index b48f24b..0000000
--- a/extra_lib/include/js/jstypes.h
+++ /dev/null
@@ -1,464 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * 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.
- *
- * The Original Code is Mozilla Communicator client code, released
- * March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   IBM Corp.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/*
-** File:                jstypes.h
-** Description: Definitions of NSPR's basic types
-**
-** Prototypes and macros used to make up for deficiencies in ANSI environments
-** that we have found.
-**
-** Since we do not wrap <stdlib.h> and all the other standard headers, authors
-** of portable code will not know in general that they need these definitions.
-** Instead of requiring these authors to find the dependent uses in their code
-** and take the following steps only in those C files, we take steps once here
-** for all C files.
-**/
-
-#ifndef jstypes_h___
-#define jstypes_h___
-
-#include <stddef.h>
-
-/***********************************************************************
-** MACROS:      JS_EXTERN_API
-**              JS_EXPORT_API
-** DESCRIPTION:
-**      These are only for externally visible routines and globals.  For
-**      internal routines, just use "extern" for type checking and that
-**      will not export internal cross-file or forward-declared symbols.
-**      Define a macro for declaring procedures return types. We use this to
-**      deal with windoze specific type hackery for DLL definitions. Use
-**      JS_EXTERN_API when the prototype for the method is declared. Use
-**      JS_EXPORT_API for the implementation of the method.
-**
-** Example:
-**   in dowhim.h
-**     JS_EXTERN_API( void ) DoWhatIMean( void );
-**   in dowhim.c
-**     JS_EXPORT_API( void ) DoWhatIMean( void ) { return; }
-**
-**
-***********************************************************************/
-#ifdef WIN32
-/* These also work for __MWERKS__ */
-#define JS_EXTERN_API(__type) extern __declspec(dllexport) __type
-#define JS_EXPORT_API(__type) __declspec(dllexport) __type
-#define JS_EXTERN_DATA(__type) extern __declspec(dllexport) __type
-#define JS_EXPORT_DATA(__type) __declspec(dllexport) __type
-
-#define JS_DLL_CALLBACK
-#define JS_STATIC_DLL_CALLBACK(__x) static __x
-
-#elif defined(XP_OS2) && defined(__declspec)
-
-#define JS_EXTERN_API(__type) extern __declspec(dllexport) __type
-#define JS_EXPORT_API(__type) __declspec(dllexport) __type
-#define JS_EXTERN_DATA(__type) extern __declspec(dllexport) __type
-#define JS_EXPORT_DATA(__type) __declspec(dllexport) __type
-
-#define JS_DLL_CALLBACK
-#define JS_STATIC_DLL_CALLBACK(__x) static __x
-
-#elif defined(WIN16)
-
-#ifdef _WINDLL
-#define JS_EXTERN_API(__type) extern __type _cdecl _export _loadds
-#define JS_EXPORT_API(__type) __type _cdecl _export _loadds
-#define JS_EXTERN_DATA(__type) extern __type _export
-#define JS_EXPORT_DATA(__type) __type _export
-
-#define JS_DLL_CALLBACK             __cdecl __loadds
-#define JS_STATIC_DLL_CALLBACK(__x) static __x CALLBACK
-
-#else /* this must be .EXE */
-#define JS_EXTERN_API(__type) extern __type _cdecl _export
-#define JS_EXPORT_API(__type) __type _cdecl _export
-#define JS_EXTERN_DATA(__type) extern __type _export
-#define JS_EXPORT_DATA(__type) __type _export
-
-#define JS_DLL_CALLBACK             __cdecl __loadds
-#define JS_STATIC_DLL_CALLBACK(__x) __x JS_DLL_CALLBACK
-#endif /* _WINDLL */
-
-#else /* Unix */
-
-#ifdef HAVE_VISIBILITY_ATTRIBUTE
-#define JS_EXTERNAL_VIS __attribute__((visibility ("default")))
-#else
-#define JS_EXTERNAL_VIS
-#endif
-
-#define JS_EXTERN_API(__type) extern JS_EXTERNAL_VIS __type
-#define JS_EXPORT_API(__type) JS_EXTERNAL_VIS __type
-#define JS_EXTERN_DATA(__type) extern JS_EXTERNAL_VIS __type
-#define JS_EXPORT_DATA(__type) JS_EXTERNAL_VIS __type
-
-#define JS_DLL_CALLBACK
-#define JS_STATIC_DLL_CALLBACK(__x) static __x
-
-#endif
-
-#ifdef _WIN32
-#  if defined(__MWERKS__) || defined(__GNUC__)
-#    define JS_IMPORT_API(__x)      __x
-#  else
-#    define JS_IMPORT_API(__x)      __declspec(dllimport) __x
-#  endif
-#elif defined(XP_OS2) && defined(__declspec)
-#    define JS_IMPORT_API(__x)      __declspec(dllimport) __x
-#else
-#    define JS_IMPORT_API(__x)      JS_EXPORT_API (__x)
-#endif
-
-#if defined(_WIN32) && !defined(__MWERKS__)
-#    define JS_IMPORT_DATA(__x)      __declspec(dllimport) __x
-#elif defined(XP_OS2) && defined(__declspec)
-#    define JS_IMPORT_DATA(__x)      __declspec(dllimport) __x
-#else
-#    define JS_IMPORT_DATA(__x)     JS_EXPORT_DATA (__x)
-#endif
-
-/*
- * The linkage of JS API functions differs depending on whether the file is
- * used within the JS library or not.  Any source file within the JS
- * interpreter should define EXPORT_JS_API whereas any client of the library
- * should not.
- */
-#ifdef EXPORT_JS_API
-#define JS_PUBLIC_API(t)    JS_EXPORT_API(t)
-#define JS_PUBLIC_DATA(t)   JS_EXPORT_DATA(t)
-#else
-#define JS_PUBLIC_API(t)    JS_IMPORT_API(t)
-#define JS_PUBLIC_DATA(t)   JS_IMPORT_DATA(t)
-#endif
-
-#define JS_FRIEND_API(t)    JS_PUBLIC_API(t)
-#define JS_FRIEND_DATA(t)   JS_PUBLIC_DATA(t)
-
-#ifdef _WIN32
-#   define JS_INLINE __inline
-#elif defined(__GNUC__)
-#   define JS_INLINE
-#else
-#   define JS_INLINE
-#endif
-
-/***********************************************************************
-** MACROS:      JS_BEGIN_MACRO
-**              JS_END_MACRO
-** DESCRIPTION:
-**      Macro body brackets so that macros with compound statement definitions
-**      behave syntactically more like functions when called.
-***********************************************************************/
-#define JS_BEGIN_MACRO  do {
-#define JS_END_MACRO    } while (0)
-
-/***********************************************************************
-** MACROS:      JS_BEGIN_EXTERN_C
-**              JS_END_EXTERN_C
-** DESCRIPTION:
-**      Macro shorthands for conditional C++ extern block delimiters.
-***********************************************************************/
-#ifdef __cplusplus
-#define JS_BEGIN_EXTERN_C       extern "C" {
-#define JS_END_EXTERN_C         }
-#else
-#define JS_BEGIN_EXTERN_C
-#define JS_END_EXTERN_C
-#endif
-
-/***********************************************************************
-** MACROS:      JS_BIT
-**              JS_BITMASK
-** DESCRIPTION:
-** Bit masking macros.  XXX n must be <= 31 to be portable
-***********************************************************************/
-#define JS_BIT(n)       ((JSUint32)1 << (n))
-#define JS_BITMASK(n)   (JS_BIT(n) - 1)
-
-/***********************************************************************
-** MACROS:      JS_PTR_TO_INT32
-**              JS_PTR_TO_UINT32
-**              JS_INT32_TO_PTR
-**              JS_UINT32_TO_PTR
-** DESCRIPTION:
-** Integer to pointer and pointer to integer conversion macros.
-***********************************************************************/
-#define JS_PTR_TO_INT32(x)  ((jsint)((char *)(x) - (char *)0))
-#define JS_PTR_TO_UINT32(x) ((jsuint)((char *)(x) - (char *)0))
-#define JS_INT32_TO_PTR(x)  ((void *)((char *)0 + (jsint)(x)))
-#define JS_UINT32_TO_PTR(x) ((void *)((char *)0 + (jsuint)(x)))
-
-/***********************************************************************
-** MACROS:      JS_HOWMANY
-**              JS_ROUNDUP
-**              JS_MIN
-**              JS_MAX
-** DESCRIPTION:
-**      Commonly used macros for operations on compatible types.
-***********************************************************************/
-#define JS_HOWMANY(x,y) (((x)+(y)-1)/(y))
-#define JS_ROUNDUP(x,y) (JS_HOWMANY(x,y)*(y))
-#define JS_MIN(x,y)     ((x)<(y)?(x):(y))
-#define JS_MAX(x,y)     ((x)>(y)?(x):(y))
-
-#if (defined(XP_WIN) && !defined(CROSS_COMPILE)) || defined (WINCE) || defined (IPHONE_OS)
-#    include "jscpucfg.h"        /* Use standard Mac or Windows configuration */
-#elif defined(XP_UNIX) || defined(XP_BEOS) || defined(XP_OS2) || defined(CROSS_COMPILE)
-#    include "jsautocfg.h"       /* Use auto-detected configuration */
-#    include "jsosdep.h"         /* ...and platform-specific flags */
-#else
-#    error "Must define one of XP_BEOS, XP_OS2, XP_WIN or XP_UNIX"
-#endif
-
-JS_BEGIN_EXTERN_C
-
-/************************************************************************
-** TYPES:       JSUint8
-**              JSInt8
-** DESCRIPTION:
-**  The int8 types are known to be 8 bits each. There is no type that
-**      is equivalent to a plain "char".
-************************************************************************/
-#if JS_BYTES_PER_BYTE == 1
-typedef unsigned char JSUint8;
-typedef signed char JSInt8;
-#else
-#error No suitable type for JSInt8/JSUint8
-#endif
-
-/************************************************************************
-** TYPES:       JSUint16
-**              JSInt16
-** DESCRIPTION:
-**  The int16 types are known to be 16 bits each.
-************************************************************************/
-#if JS_BYTES_PER_SHORT == 2
-typedef unsigned short JSUint16;
-typedef short JSInt16;
-#else
-#error No suitable type for JSInt16/JSUint16
-#endif
-
-/************************************************************************
-** TYPES:       JSUint32
-**              JSInt32
-** DESCRIPTION:
-**  The int32 types are known to be 32 bits each.
-************************************************************************/
-#if JS_BYTES_PER_INT == 4
-typedef unsigned int JSUint32;
-typedef int JSInt32;
-#define JS_INT32(x)  x
-#define JS_UINT32(x) x ## U
-#elif JS_BYTES_PER_LONG == 4
-typedef unsigned long JSUint32;
-typedef long JSInt32;
-#define JS_INT32(x)  x ## L
-#define JS_UINT32(x) x ## UL
-#else
-#error No suitable type for JSInt32/JSUint32
-#endif
-
-/************************************************************************
-** TYPES:       JSUint64
-**              JSInt64
-** DESCRIPTION:
-**  The int64 types are known to be 64 bits each. Care must be used when
-**      declaring variables of type JSUint64 or JSInt64. Different hardware
-**      architectures and even different compilers have varying support for
-**      64 bit values. The only guaranteed portability requires the use of
-**      the JSLL_ macros (see jslong.h).
-************************************************************************/
-#ifdef JS_HAVE_LONG_LONG
-#if JS_BYTES_PER_LONG == 8
-typedef long JSInt64;
-typedef unsigned long JSUint64;
-#elif defined(WIN16)
-typedef __int64 JSInt64;
-typedef unsigned __int64 JSUint64;
-#elif defined(WIN32) && !defined(__GNUC__)
-typedef __int64  JSInt64;
-typedef unsigned __int64 JSUint64;
-#else
-typedef long long JSInt64;
-typedef unsigned long long JSUint64;
-#endif /* JS_BYTES_PER_LONG == 8 */
-#else  /* !JS_HAVE_LONG_LONG */
-typedef struct {
-#ifdef IS_LITTLE_ENDIAN
-    JSUint32 lo, hi;
-#else
-    JSUint32 hi, lo;
-#endif
-} JSInt64;
-typedef JSInt64 JSUint64;
-#endif /* !JS_HAVE_LONG_LONG */
-
-/************************************************************************
-** TYPES:       JSUintn
-**              JSIntn
-** DESCRIPTION:
-**  The JSIntn types are most appropriate for automatic variables. They are
-**      guaranteed to be at least 16 bits, though various architectures may
-**      define them to be wider (e.g., 32 or even 64 bits). These types are
-**      never valid for fields of a structure.
-************************************************************************/
-#if JS_BYTES_PER_INT >= 2
-typedef int JSIntn;
-typedef unsigned int JSUintn;
-#else
-#error 'sizeof(int)' not sufficient for platform use
-#endif
-
-/************************************************************************
-** TYPES:       JSFloat64
-** DESCRIPTION:
-**  NSPR's floating point type is always 64 bits.
-************************************************************************/
-typedef double          JSFloat64;
-
-/************************************************************************
-** TYPES:       JSSize
-** DESCRIPTION:
-**  A type for representing the size of objects.
-************************************************************************/
-typedef size_t JSSize;
-
-/************************************************************************
-** TYPES:       JSPtrDiff
-** DESCRIPTION:
-**  A type for pointer difference. Variables of this type are suitable
-**      for storing a pointer or pointer sutraction.
-************************************************************************/
-typedef ptrdiff_t JSPtrdiff;
-
-/************************************************************************
-** TYPES:       JSUptrdiff
-** DESCRIPTION:
-**  A type for pointer difference. Variables of this type are suitable
-**      for storing a pointer or pointer sutraction.
-************************************************************************/
-#if JS_BYTES_PER_WORD == 8 && JS_BYTES_PER_LONG != 8
-typedef JSUint64 JSUptrdiff;
-#else
-typedef unsigned long JSUptrdiff;
-#endif
-
-/************************************************************************
-** TYPES:       JSBool
-** DESCRIPTION:
-**  Use JSBool for variables and parameter types. Use JS_FALSE and JS_TRUE
-**      for clarity of target type in assignments and actual arguments. Use
-**      'if (bool)', 'while (!bool)', '(bool) ? x : y' etc., to test booleans
-**      just as you would C int-valued conditions.
-************************************************************************/
-typedef JSIntn JSBool;
-#define JS_TRUE (JSIntn)1
-#define JS_FALSE (JSIntn)0
-
-/************************************************************************
-** TYPES:       JSPackedBool
-** DESCRIPTION:
-**  Use JSPackedBool within structs where bitfields are not desireable
-**      but minimum and consistent overhead matters.
-************************************************************************/
-typedef JSUint8 JSPackedBool;
-
-/*
-** A JSWord is an integer that is the same size as a void*
-*/
-#if JS_BYTES_PER_WORD == 8 && JS_BYTES_PER_LONG != 8
-typedef JSInt64 JSWord;
-typedef JSUint64 JSUword;
-#else
-typedef long JSWord;
-typedef unsigned long JSUword;
-#endif
-
-#include "jsotypes.h"
-
-/***********************************************************************
-** MACROS:      JS_LIKELY
-**              JS_UNLIKELY
-** DESCRIPTION:
-**      These macros allow you to give a hint to the compiler about branch
-**      probability so that it can better optimize.  Use them like this:
-**
-**      if (JS_LIKELY(v == 1)) {
-**          ... expected code path ...
-**      }
-**
-**      if (JS_UNLIKELY(v == 0)) {
-**          ... non-expected code path ...
-**      }
-**
-***********************************************************************/
-#if defined(__GNUC__) && (__GNUC__ > 2)
-#define JS_LIKELY(x)    (__builtin_expect((x), 1))
-#define JS_UNLIKELY(x)  (__builtin_expect((x), 0))
-#else
-#define JS_LIKELY(x)    (x)
-#define JS_UNLIKELY(x)  (x)
-#endif
-
-/***********************************************************************
-** MACROS:      JS_ARRAY_LENGTH
-**              JS_ARRAY_END
-** DESCRIPTION:
-**      Macros to get the number of elements and the pointer to one past the
-**      last element of a C array. Use them like this:
-**
-**      jschar buf[10], *s;
-**      JSString *str;
-**      ...
-**      for (s = buf; s != JS_ARRAY_END(buf); ++s) *s = ...;
-**      ...
-**      str = JS_NewStringCopyN(cx, buf, JS_ARRAY_LENGTH(buf));
-**      ...
-**
-***********************************************************************/
-
-#define JS_ARRAY_LENGTH(array) (sizeof (array) / sizeof (array)[0])
-#define JS_ARRAY_END(array)    ((array) + JS_ARRAY_LENGTH(array))
-
-JS_END_EXTERN_C
-
-#endif /* jstypes_h___ */
diff --git a/extra_lib/include/js/jsxdrapi.h b/extra_lib/include/js/jsxdrapi.h
deleted file mode 100644
index 35d9918..0000000
--- a/extra_lib/include/js/jsxdrapi.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * vim: set ts=8 sw=4 et tw=78:
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * 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.
- *
- * The Original Code is Mozilla Communicator client code, released
- * March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef jsxdrapi_h___
-#define jsxdrapi_h___
-
-/*
- * JS external data representation interface API.
- *
- * The XDR system is comprised of three major parts:
- *
- * - the state serialization/deserialization APIs, which allow consumers
- *   of the API to serialize JS runtime state (script bytecodes, atom maps,
- *   object graphs, etc.) for later restoration.  These portions
- *   are implemented in various appropriate files, such as jsscript.c
- *   for the script portions and jsobj.c for object state.
- * - the callback APIs through which the runtime requests an opaque
- *   representation of a native object, and through which the runtime
- *   constructs a live native object from an opaque representation. These
- *   portions are the responsibility of the native object implementor.
- * - utility functions for en/decoding of primitive types, such as
- *   JSStrings.  This portion is implemented in jsxdrapi.c.
- *
- * Spiritually guided by Sun's XDR, where appropriate.
- */
-
-#include "jspubtd.h"
-#include "jsprvtd.h"
-
-JS_BEGIN_EXTERN_C
-
-/* We use little-endian byteorder for all encoded data */
-
-#if defined IS_LITTLE_ENDIAN
-#define JSXDR_SWAB32(x) x
-#define JSXDR_SWAB16(x) x
-#elif defined IS_BIG_ENDIAN
-#define JSXDR_SWAB32(x) (((uint32)(x) >> 24) |                                \
-                         (((uint32)(x) >> 8) & 0xff00) |                      \
-                         (((uint32)(x) << 8) & 0xff0000) |                    \
-                         ((uint32)(x) << 24))
-#define JSXDR_SWAB16(x) (((uint16)(x) >> 8) | ((uint16)(x) << 8))
-#else
-#error "unknown byte order"
-#endif
-
-#define JSXDR_ALIGN     4
-
-typedef enum JSXDRMode {
-    JSXDR_ENCODE,
-    JSXDR_DECODE,
-    JSXDR_FREE
-} JSXDRMode;
-
-typedef enum JSXDRWhence {
-    JSXDR_SEEK_SET,
-    JSXDR_SEEK_CUR,
-    JSXDR_SEEK_END
-} JSXDRWhence;
-
-typedef struct JSXDROps {
-    JSBool      (*get32)(JSXDRState *, uint32 *);
-    JSBool      (*set32)(JSXDRState *, uint32 *);
-    JSBool      (*getbytes)(JSXDRState *, char *, uint32);
-    JSBool      (*setbytes)(JSXDRState *, char *, uint32);
-    void *      (*raw)(JSXDRState *, uint32);
-    JSBool      (*seek)(JSXDRState *, int32, JSXDRWhence);
-    uint32      (*tell)(JSXDRState *);
-    void        (*finalize)(JSXDRState *);
-} JSXDROps;
-
-struct JSXDRState {
-    JSXDRMode   mode;
-    JSXDROps    *ops;
-    JSContext   *cx;
-    JSClass     **registry;
-    uintN       numclasses;
-    uintN       maxclasses;
-    void        *reghash;
-    void        *userdata;
-    JSScript    *script;
-};
-
-extern JS_PUBLIC_API(void)
-JS_XDRInitBase(JSXDRState *xdr, JSXDRMode mode, JSContext *cx);
-
-extern JS_PUBLIC_API(JSXDRState *)
-JS_XDRNewMem(JSContext *cx, JSXDRMode mode);
-
-extern JS_PUBLIC_API(void *)
-JS_XDRMemGetData(JSXDRState *xdr, uint32 *lp);
-
-extern JS_PUBLIC_API(void)
-JS_XDRMemSetData(JSXDRState *xdr, void *data, uint32 len);
-
-extern JS_PUBLIC_API(uint32)
-JS_XDRMemDataLeft(JSXDRState *xdr);
-
-extern JS_PUBLIC_API(void)
-JS_XDRMemResetData(JSXDRState *xdr);
-
-extern JS_PUBLIC_API(void)
-JS_XDRDestroy(JSXDRState *xdr);
-
-extern JS_PUBLIC_API(JSBool)
-JS_XDRUint8(JSXDRState *xdr, uint8 *b);
-
-extern JS_PUBLIC_API(JSBool)
-JS_XDRUint16(JSXDRState *xdr, uint16 *s);
-
-extern JS_PUBLIC_API(JSBool)
-JS_XDRUint32(JSXDRState *xdr, uint32 *lp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_XDRBytes(JSXDRState *xdr, char *bytes, uint32 len);
-
-extern JS_PUBLIC_API(JSBool)
-JS_XDRCString(JSXDRState *xdr, char **sp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_XDRCStringOrNull(JSXDRState *xdr, char **sp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_XDRString(JSXDRState *xdr, JSString **strp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_XDRStringOrNull(JSXDRState *xdr, JSString **strp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_XDRDouble(JSXDRState *xdr, jsdouble **dp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_XDRValue(JSXDRState *xdr, jsval *vp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_XDRScript(JSXDRState *xdr, JSScript **scriptp);
-
-extern JS_PUBLIC_API(JSBool)
-JS_XDRRegisterClass(JSXDRState *xdr, JSClass *clasp, uint32 *lp);
-
-extern JS_PUBLIC_API(uint32)
-JS_XDRFindClassIdByName(JSXDRState *xdr, const char *name);
-
-extern JS_PUBLIC_API(JSClass *)
-JS_XDRFindClassById(JSXDRState *xdr, uint32 id);
-
-/*
- * Magic numbers.
- */
-#define JSXDR_MAGIC_SCRIPT_1        0xdead0001
-#define JSXDR_MAGIC_SCRIPT_2        0xdead0002
-#define JSXDR_MAGIC_SCRIPT_3        0xdead0003
-#define JSXDR_MAGIC_SCRIPT_4        0xdead0004
-#define JSXDR_MAGIC_SCRIPT_5        0xdead0005
-#define JSXDR_MAGIC_SCRIPT_CURRENT  JSXDR_MAGIC_SCRIPT_5
-
-/*
- * Bytecode version number.  Decrement the second term whenever JS bytecode
- * changes incompatibly.
- *
- * This version number should be XDR'ed once near the front of any file or
- * larger storage unit containing XDR'ed bytecode and other data, and checked
- * before deserialization of bytecode.  If the saved version does not match
- * the current version, abort deserialization and invalidate the file.
- */
-#define JSXDR_BYTECODE_VERSION      (0xb973c0de - 16)
-
-/*
- * Library-private functions.
- */
-extern JSBool
-js_XDRAtom(JSXDRState *xdr, JSAtom **atomp);
-
-extern JSBool
-js_XDRStringAtom(JSXDRState *xdr, JSAtom **atomp);
-
-/*
- * FIXME: This is non-unicode version of js_XDRStringAtom that performs lossy
- * conversion. Do not use it in the new code! See bug 325202.
- */
-extern JSBool
-js_XDRCStringAtom(JSXDRState *xdr, JSAtom **atomp);
-
-JS_END_EXTERN_C
-
-#endif /* ! jsxdrapi_h___ */
diff --git a/extra_lib/include/libavdevice/avdevice.h b/extra_lib/include/libavdevice/avdevice.h
deleted file mode 100644
index 28344ca..0000000
--- a/extra_lib/include/libavdevice/avdevice.h
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef AVDEVICE_AVDEVICE_H
-#define AVDEVICE_AVDEVICE_H
-
-#include "version.h"
-
-/**
- * @file
- * @ingroup lavd
- * Main libavdevice API header
- */
-
-/**
- * @defgroup lavd Special devices muxing/demuxing library
- * @{
- * Libavdevice is a complementary library to @ref libavf "libavformat". It
- * provides various "special" platform-specific muxers and demuxers, e.g. for
- * grabbing devices, audio capture and playback etc. As a consequence, the
- * (de)muxers in libavdevice are of the AVFMT_NOFILE type (they use their own
- * I/O functions). The filename passed to avformat_open_input() often does not
- * refer to an actually existing file, but has some special device-specific
- * meaning - e.g. for x11grab it is the display name.
- *
- * To use libavdevice, simply call avdevice_register_all() to register all
- * compiled muxers and demuxers. They all use standard libavformat API.
- * @}
- */
-
-#include "libavformat/avformat.h"
-
-/**
- * Return the LIBAVDEVICE_VERSION_INT constant.
- */
-unsigned avdevice_version(void);
-
-/**
- * Return the libavdevice build-time configuration.
- */
-const char *avdevice_configuration(void);
-
-/**
- * Return the libavdevice license.
- */
-const char *avdevice_license(void);
-
-/**
- * Initialize libavdevice and register all the input and output devices.
- * @warning This function is not thread safe.
- */
-void avdevice_register_all(void);
-
-typedef struct AVDeviceRect {
-    int x;      /**< x coordinate of top left corner */
-    int y;      /**< y coordinate of top left corner */
-    int width;  /**< width */
-    int height; /**< height */
-} AVDeviceRect;
-
-/**
- * Message types used by avdevice_app_to_dev_control_message().
- */
-enum AVAppToDevMessageType {
-    /**
-     * Dummy message.
-     */
-    AV_APP_TO_DEV_NONE = MKBETAG('N','O','N','E'),
-
-    /**
-     * Window size change message.
-     *
-     * Message is sent to the device every time the application changes the size
-     * of the window device renders to.
-     * Message should also be sent right after window is created.
-     *
-     * data: AVDeviceRect: new window size.
-     */
-    AV_APP_TO_DEV_WINDOW_SIZE = MKBETAG('G','E','O','M'),
-
-    /**
-     * Repaint request message.
-     *
-     * Message is sent to the device when window have to be rapainted.
-     *
-     * data: AVDeviceRect: area required to be repainted.
-     *       NULL: whole area is required to be repainted.
-     */
-    AV_APP_TO_DEV_WINDOW_REPAINT = MKBETAG('R','E','P','A')
-};
-
-/**
- * Message types used by avdevice_dev_to_app_control_message().
- */
-enum AVDevToAppMessageType {
-    /**
-     * Dummy message.
-     */
-    AV_DEV_TO_APP_NONE = MKBETAG('N','O','N','E'),
-
-    /**
-     * Create window buffer message.
-     *
-     * Device requests to create a window buffer. Exact meaning is device-
-     * and application-dependent. Message is sent before rendering first
-     * frame and all one-shot initializations should be done here.
-     * Application is allowed to ignore preferred window buffer size.
-     *
-     * @note: Application is obligated to inform about window buffer size
-     *        with AV_APP_TO_DEV_WINDOW_SIZE message.
-     *
-     * data: AVDeviceRect: preferred size of the window buffer.
-     *       NULL: no preferred size of the window buffer.
-     */
-    AV_DEV_TO_APP_CREATE_WINDOW_BUFFER = MKBETAG('B','C','R','E'),
-
-    /**
-     * Prepare window buffer message.
-     *
-     * Device requests to prepare a window buffer for rendering.
-     * Exact meaning is device- and application-dependent.
-     * Message is sent before rendering of each frame.
-     *
-     * data: NULL.
-     */
-    AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER = MKBETAG('B','P','R','E'),
-
-    /**
-     * Display window buffer message.
-     *
-     * Device requests to display a window buffer.
-     * Message is sent when new frame is ready to be displyed.
-     * Usually buffers need to be swapped in handler of this message.
-     *
-     * data: NULL.
-     */
-    AV_DEV_TO_APP_DISPLAY_WINDOW_BUFFER = MKBETAG('B','D','I','S'),
-
-    /**
-     * Destroy window buffer message.
-     *
-     * Device requests to destroy a window buffer.
-     * Message is sent when device is about to be destroyed and window
-     * buffer is not required anymore.
-     *
-     * data: NULL.
-     */
-    AV_DEV_TO_APP_DESTROY_WINDOW_BUFFER = MKBETAG('B','D','E','S')
-};
-
-/**
- * Send control message from application to device.
- *
- * @param s         device context.
- * @param type      message type.
- * @param data      message data. Exact type depends on message type.
- * @param data_size size of message data.
- * @return >= 0 on success, negative on error.
- *         AVERROR(ENOSYS) when device doesn't implement handler of the message.
- */
-int avdevice_app_to_dev_control_message(struct AVFormatContext *s,
-                                        enum AVAppToDevMessageType type,
-                                        void *data, size_t data_size);
-
-/**
- * Send control message from device to application.
- *
- * @param s         device context.
- * @param type      message type.
- * @param data      message data. Can be NULL.
- * @param data_size size of message data.
- * @return >= 0 on success, negative on error.
- *         AVERROR(ENOSYS) when application doesn't implement handler of the message.
- */
-int avdevice_dev_to_app_control_message(struct AVFormatContext *s,
-                                        enum AVDevToAppMessageType type,
-                                        void *data, size_t data_size);
-
-/**
- * Structure describes basic parameters of the device.
- */
-typedef struct AVDeviceInfo {
-    char *device_name;                   /**< device name, format depends on device */
-    char *device_description;            /**< human friendly name */
-} AVDeviceInfo;
-
-/**
- * List of devices.
- */
-typedef struct AVDeviceInfoList {
-    AVDeviceInfo **devices;              /**< list of autodetected devices */
-    int nb_devices;                      /**< number of autodetected devices */
-    int default_device;                  /**< index of default device or -1 if no default */
-} AVDeviceInfoList;
-
-/**
- * List devices.
- *
- * Returns available device names and their parameters.
- *
- * @note: Some devices may accept system-dependent device names that cannot be
- *        autodetected. The list returned by this function cannot be assumed to
- *        be always completed.
- *
- * @param s                device context.
- * @param[out] device_list list of autodetected devices.
- * @return count of autodetected devices, negative on error.
- */
-int avdevice_list_devices(struct AVFormatContext *s, AVDeviceInfoList **device_list);
-
-/**
- * Convinient function to free result of avdevice_list_devices().
- *
- * @param devices device list to be freed.
- */
-void avdevice_free_list_devices(AVDeviceInfoList **device_list);
-
-#endif /* AVDEVICE_AVDEVICE_H */
diff --git a/extra_lib/include/libavdevice/version.h b/extra_lib/include/libavdevice/version.h
deleted file mode 100644
index 85b3b37..0000000
--- a/extra_lib/include/libavdevice/version.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef AVDEVICE_VERSION_H
-#define AVDEVICE_VERSION_H
-
-/**
- * @file
- * @ingroup lavd
- * Libavdevice version macros
- */
-
-#include "libavutil/version.h"
-
-#define LIBAVDEVICE_VERSION_MAJOR  55
-#define LIBAVDEVICE_VERSION_MINOR  10
-#define LIBAVDEVICE_VERSION_MICRO 100
-
-#define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \
-                                               LIBAVDEVICE_VERSION_MINOR, \
-                                               LIBAVDEVICE_VERSION_MICRO)
-#define LIBAVDEVICE_VERSION     AV_VERSION(LIBAVDEVICE_VERSION_MAJOR, \
-                                           LIBAVDEVICE_VERSION_MINOR, \
-                                           LIBAVDEVICE_VERSION_MICRO)
-#define LIBAVDEVICE_BUILD       LIBAVDEVICE_VERSION_INT
-
-#define LIBAVDEVICE_IDENT       "Lavd" AV_STRINGIFY(LIBAVDEVICE_VERSION)
-
-/**
- * FF_API_* defines may be placed below to indicate public API that will be
- * dropped at a future version bump. The defines themselves are not part of
- * the public API and may change, break or disappear at any time.
- */
-
-#endif /* AVDEVICE_VERSION_H */
diff --git a/extra_lib/include/libavfilter/asrc_abuffer.h b/extra_lib/include/libavfilter/asrc_abuffer.h
deleted file mode 100644
index aa34461..0000000
--- a/extra_lib/include/libavfilter/asrc_abuffer.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef AVFILTER_ASRC_ABUFFER_H
-#define AVFILTER_ASRC_ABUFFER_H
-
-#include "avfilter.h"
-
-/**
- * @file
- * memory buffer source for audio
- *
- * @deprecated use buffersrc.h instead.
- */
-
-/**
- * Queue an audio buffer to the audio buffer source.
- *
- * @param abuffersrc audio source buffer context
- * @param data pointers to the samples planes
- * @param linesize linesizes of each audio buffer plane
- * @param nb_samples number of samples per channel
- * @param sample_fmt sample format of the audio data
- * @param ch_layout channel layout of the audio data
- * @param planar flag to indicate if audio data is planar or packed
- * @param pts presentation timestamp of the audio buffer
- * @param flags unused
- *
- * @deprecated use av_buffersrc_add_ref() instead.
- */
-attribute_deprecated
-int av_asrc_buffer_add_samples(AVFilterContext *abuffersrc,
-                               uint8_t *data[8], int linesize[8],
-                               int nb_samples, int sample_rate,
-                               int sample_fmt, int64_t ch_layout, int planar,
-                               int64_t pts, int av_unused flags);
-
-/**
- * Queue an audio buffer to the audio buffer source.
- *
- * This is similar to av_asrc_buffer_add_samples(), but the samples
- * are stored in a buffer with known size.
- *
- * @param abuffersrc audio source buffer context
- * @param buf pointer to the samples data, packed is assumed
- * @param size the size in bytes of the buffer, it must contain an
- * integer number of samples
- * @param sample_fmt sample format of the audio data
- * @param ch_layout channel layout of the audio data
- * @param pts presentation timestamp of the audio buffer
- * @param flags unused
- *
- * @deprecated use av_buffersrc_add_ref() instead.
- */
-attribute_deprecated
-int av_asrc_buffer_add_buffer(AVFilterContext *abuffersrc,
-                              uint8_t *buf, int buf_size,
-                              int sample_rate,
-                              int sample_fmt, int64_t ch_layout, int planar,
-                              int64_t pts, int av_unused flags);
-
-/**
- * Queue an audio buffer to the audio buffer source.
- *
- * @param abuffersrc audio source buffer context
- * @param samplesref buffer ref to queue
- * @param flags unused
- *
- * @deprecated use av_buffersrc_add_ref() instead.
- */
-attribute_deprecated
-int av_asrc_buffer_add_audio_buffer_ref(AVFilterContext *abuffersrc,
-                                        AVFilterBufferRef *samplesref,
-                                        int av_unused flags);
-
-#endif /* AVFILTER_ASRC_ABUFFER_H */
diff --git a/extra_lib/include/libavfilter/avcodec.h b/extra_lib/include/libavfilter/avcodec.h
deleted file mode 100644
index 8bbdad2..0000000
--- a/extra_lib/include/libavfilter/avcodec.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef AVFILTER_AVCODEC_H
-#define AVFILTER_AVCODEC_H
-
-/**
- * @file
- * libavcodec/libavfilter gluing utilities
- *
- * This should be included in an application ONLY if the installed
- * libavfilter has been compiled with libavcodec support, otherwise
- * symbols defined below will not be available.
- */
-
-#include "avfilter.h"
-
-#if FF_API_AVFILTERBUFFER
-/**
- * Create and return a picref reference from the data and properties
- * contained in frame.
- *
- * @param perms permissions to assign to the new buffer reference
- * @deprecated avfilter APIs work natively with AVFrame instead.
- */
-attribute_deprecated
-AVFilterBufferRef *avfilter_get_video_buffer_ref_from_frame(const AVFrame *frame, int perms);
-
-
-/**
- * Create and return a picref reference from the data and properties
- * contained in frame.
- *
- * @param perms permissions to assign to the new buffer reference
- * @deprecated avfilter APIs work natively with AVFrame instead.
- */
-attribute_deprecated
-AVFilterBufferRef *avfilter_get_audio_buffer_ref_from_frame(const AVFrame *frame,
-                                                            int perms);
-
-/**
- * Create and return a buffer reference from the data and properties
- * contained in frame.
- *
- * @param perms permissions to assign to the new buffer reference
- * @deprecated avfilter APIs work natively with AVFrame instead.
- */
-attribute_deprecated
-AVFilterBufferRef *avfilter_get_buffer_ref_from_frame(enum AVMediaType type,
-                                                      const AVFrame *frame,
-                                                      int perms);
-#endif
-
-#if FF_API_FILL_FRAME
-/**
- * Fill an AVFrame with the information stored in samplesref.
- *
- * @param frame an already allocated AVFrame
- * @param samplesref an audio buffer reference
- * @return >= 0 in case of success, a negative AVERROR code in case of
- * failure
- * @deprecated Use avfilter_copy_buf_props() instead.
- */
-attribute_deprecated
-int avfilter_fill_frame_from_audio_buffer_ref(AVFrame *frame,
-                                              const AVFilterBufferRef *samplesref);
-
-/**
- * Fill an AVFrame with the information stored in picref.
- *
- * @param frame an already allocated AVFrame
- * @param picref a video buffer reference
- * @return >= 0 in case of success, a negative AVERROR code in case of
- * failure
- * @deprecated Use avfilter_copy_buf_props() instead.
- */
-attribute_deprecated
-int avfilter_fill_frame_from_video_buffer_ref(AVFrame *frame,
-                                              const AVFilterBufferRef *picref);
-
-/**
- * Fill an AVFrame with information stored in ref.
- *
- * @param frame an already allocated AVFrame
- * @param ref a video or audio buffer reference
- * @return >= 0 in case of success, a negative AVERROR code in case of
- * failure
- * @deprecated Use avfilter_copy_buf_props() instead.
- */
-attribute_deprecated
-int avfilter_fill_frame_from_buffer_ref(AVFrame *frame,
-                                        const AVFilterBufferRef *ref);
-#endif
-
-#endif /* AVFILTER_AVCODEC_H */
diff --git a/extra_lib/include/libavfilter/avfilter.h b/extra_lib/include/libavfilter/avfilter.h
deleted file mode 100644
index ef7e8ca..0000000
--- a/extra_lib/include/libavfilter/avfilter.h
+++ /dev/null
@@ -1,1529 +0,0 @@
-/*
- * filter layer
- * Copyright (c) 2007 Bobby Bingham
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef AVFILTER_AVFILTER_H
-#define AVFILTER_AVFILTER_H
-
-/**
- * @file
- * @ingroup lavfi
- * Main libavfilter public API header
- */
-
-/**
- * @defgroup lavfi Libavfilter - graph-based frame editing library
- * @{
- */
-
-#include <stddef.h>
-
-#include "libavutil/attributes.h"
-#include "libavutil/avutil.h"
-#include "libavutil/dict.h"
-#include "libavutil/frame.h"
-#include "libavutil/log.h"
-#include "libavutil/samplefmt.h"
-#include "libavutil/pixfmt.h"
-#include "libavutil/rational.h"
-
-#include "libavfilter/version.h"
-
-/**
- * Return the LIBAVFILTER_VERSION_INT constant.
- */
-unsigned avfilter_version(void);
-
-/**
- * Return the libavfilter build-time configuration.
- */
-const char *avfilter_configuration(void);
-
-/**
- * Return the libavfilter license.
- */
-const char *avfilter_license(void);
-
-typedef struct AVFilterContext AVFilterContext;
-typedef struct AVFilterLink    AVFilterLink;
-typedef struct AVFilterPad     AVFilterPad;
-typedef struct AVFilterFormats AVFilterFormats;
-
-#if FF_API_AVFILTERBUFFER
-/**
- * A reference-counted buffer data type used by the filter system. Filters
- * should not store pointers to this structure directly, but instead use the
- * AVFilterBufferRef structure below.
- */
-typedef struct AVFilterBuffer {
-    uint8_t *data[8];           ///< buffer data for each plane/channel
-
-    /**
-     * pointers to the data planes/channels.
-     *
-     * For video, this should simply point to data[].
-     *
-     * For planar audio, each channel has a separate data pointer, and
-     * linesize[0] contains the size of each channel buffer.
-     * For packed audio, there is just one data pointer, and linesize[0]
-     * contains the total size of the buffer for all channels.
-     *
-     * Note: Both data and extended_data will always be set, but for planar
-     * audio with more channels that can fit in data, extended_data must be used
-     * in order to access all channels.
-     */
-    uint8_t **extended_data;
-    int linesize[8];            ///< number of bytes per line
-
-    /** private data to be used by a custom free function */
-    void *priv;
-    /**
-     * A pointer to the function to deallocate this buffer if the default
-     * function is not sufficient. This could, for example, add the memory
-     * back into a memory pool to be reused later without the overhead of
-     * reallocating it from scratch.
-     */
-    void (*free)(struct AVFilterBuffer *buf);
-
-    int format;                 ///< media format
-    int w, h;                   ///< width and height of the allocated buffer
-    unsigned refcount;          ///< number of references to this buffer
-} AVFilterBuffer;
-
-#define AV_PERM_READ     0x01   ///< can read from the buffer
-#define AV_PERM_WRITE    0x02   ///< can write to the buffer
-#define AV_PERM_PRESERVE 0x04   ///< nobody else can overwrite the buffer
-#define AV_PERM_REUSE    0x08   ///< can output the buffer multiple times, with the same contents each time
-#define AV_PERM_REUSE2   0x10   ///< can output the buffer multiple times, modified each time
-#define AV_PERM_NEG_LINESIZES 0x20  ///< the buffer requested can have negative linesizes
-#define AV_PERM_ALIGN    0x40   ///< the buffer must be aligned
-
-#define AVFILTER_ALIGN 16 //not part of ABI
-
-/**
- * Audio specific properties in a reference to an AVFilterBuffer. Since
- * AVFilterBufferRef is common to different media formats, audio specific
- * per reference properties must be separated out.
- */
-typedef struct AVFilterBufferRefAudioProps {
-    uint64_t channel_layout;    ///< channel layout of audio buffer
-    int nb_samples;             ///< number of audio samples per channel
-    int sample_rate;            ///< audio buffer sample rate
-    int channels;               ///< number of channels (do not access directly)
-} AVFilterBufferRefAudioProps;
-
-/**
- * Video specific properties in a reference to an AVFilterBuffer. Since
- * AVFilterBufferRef is common to different media formats, video specific
- * per reference properties must be separated out.
- */
-typedef struct AVFilterBufferRefVideoProps {
-    int w;                      ///< image width
-    int h;                      ///< image height
-    AVRational sample_aspect_ratio; ///< sample aspect ratio
-    int interlaced;             ///< is frame interlaced
-    int top_field_first;        ///< field order
-    enum AVPictureType pict_type; ///< picture type of the frame
-    int key_frame;              ///< 1 -> keyframe, 0-> not
-    int qp_table_linesize;                ///< qp_table stride
-    int qp_table_size;            ///< qp_table size
-    int8_t *qp_table;             ///< array of Quantization Parameters
-} AVFilterBufferRefVideoProps;
-
-/**
- * A reference to an AVFilterBuffer. Since filters can manipulate the origin of
- * a buffer to, for example, crop image without any memcpy, the buffer origin
- * and dimensions are per-reference properties. Linesize is also useful for
- * image flipping, frame to field filters, etc, and so is also per-reference.
- *
- * TODO: add anything necessary for frame reordering
- */
-typedef struct AVFilterBufferRef {
-    AVFilterBuffer *buf;        ///< the buffer that this is a reference to
-    uint8_t *data[8];           ///< picture/audio data for each plane
-    /**
-     * pointers to the data planes/channels.
-     *
-     * For video, this should simply point to data[].
-     *
-     * For planar audio, each channel has a separate data pointer, and
-     * linesize[0] contains the size of each channel buffer.
-     * For packed audio, there is just one data pointer, and linesize[0]
-     * contains the total size of the buffer for all channels.
-     *
-     * Note: Both data and extended_data will always be set, but for planar
-     * audio with more channels that can fit in data, extended_data must be used
-     * in order to access all channels.
-     */
-    uint8_t **extended_data;
-    int linesize[8];            ///< number of bytes per line
-
-    AVFilterBufferRefVideoProps *video; ///< video buffer specific properties
-    AVFilterBufferRefAudioProps *audio; ///< audio buffer specific properties
-
-    /**
-     * presentation timestamp. The time unit may change during
-     * filtering, as it is specified in the link and the filter code
-     * may need to rescale the PTS accordingly.
-     */
-    int64_t pts;
-    int64_t pos;                ///< byte position in stream, -1 if unknown
-
-    int format;                 ///< media format
-
-    int perms;                  ///< permissions, see the AV_PERM_* flags
-
-    enum AVMediaType type;      ///< media type of buffer data
-
-    AVDictionary *metadata;     ///< dictionary containing metadata key=value tags
-} AVFilterBufferRef;
-
-/**
- * Copy properties of src to dst, without copying the actual data
- */
-attribute_deprecated
-void avfilter_copy_buffer_ref_props(AVFilterBufferRef *dst, AVFilterBufferRef *src);
-
-/**
- * Add a new reference to a buffer.
- *
- * @param ref   an existing reference to the buffer
- * @param pmask a bitmask containing the allowable permissions in the new
- *              reference
- * @return      a new reference to the buffer with the same properties as the
- *              old, excluding any permissions denied by pmask
- */
-attribute_deprecated
-AVFilterBufferRef *avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask);
-
-/**
- * Remove a reference to a buffer. If this is the last reference to the
- * buffer, the buffer itself is also automatically freed.
- *
- * @param ref reference to the buffer, may be NULL
- *
- * @note it is recommended to use avfilter_unref_bufferp() instead of this
- * function
- */
-attribute_deprecated
-void avfilter_unref_buffer(AVFilterBufferRef *ref);
-
-/**
- * Remove a reference to a buffer and set the pointer to NULL.
- * If this is the last reference to the buffer, the buffer itself
- * is also automatically freed.
- *
- * @param ref pointer to the buffer reference
- */
-attribute_deprecated
-void avfilter_unref_bufferp(AVFilterBufferRef **ref);
-#endif
-
-/**
- * Get the number of channels of a buffer reference.
- */
-attribute_deprecated
-int avfilter_ref_get_channels(AVFilterBufferRef *ref);
-
-#if FF_API_AVFILTERPAD_PUBLIC
-/**
- * A filter pad used for either input or output.
- *
- * See doc/filter_design.txt for details on how to implement the methods.
- *
- * @warning this struct might be removed from public API.
- * users should call avfilter_pad_get_name() and avfilter_pad_get_type()
- * to access the name and type fields; there should be no need to access
- * any other fields from outside of libavfilter.
- */
-struct AVFilterPad {
-    /**
-     * Pad name. The name is unique among inputs and among outputs, but an
-     * input may have the same name as an output. This may be NULL if this
-     * pad has no need to ever be referenced by name.
-     */
-    const char *name;
-
-    /**
-     * AVFilterPad type.
-     */
-    enum AVMediaType type;
-
-    /**
-     * Input pads:
-     * Minimum required permissions on incoming buffers. Any buffer with
-     * insufficient permissions will be automatically copied by the filter
-     * system to a new buffer which provides the needed access permissions.
-     *
-     * Output pads:
-     * Guaranteed permissions on outgoing buffers. Any buffer pushed on the
-     * link must have at least these permissions; this fact is checked by
-     * asserts. It can be used to optimize buffer allocation.
-     */
-    attribute_deprecated int min_perms;
-
-    /**
-     * Input pads:
-     * Permissions which are not accepted on incoming buffers. Any buffer
-     * which has any of these permissions set will be automatically copied
-     * by the filter system to a new buffer which does not have those
-     * permissions. This can be used to easily disallow buffers with
-     * AV_PERM_REUSE.
-     *
-     * Output pads:
-     * Permissions which are automatically removed on outgoing buffers. It
-     * can be used to optimize buffer allocation.
-     */
-    attribute_deprecated int rej_perms;
-
-    /**
-     * @deprecated unused
-     */
-    int (*start_frame)(AVFilterLink *link, AVFilterBufferRef *picref);
-
-    /**
-     * Callback function to get a video buffer. If NULL, the filter system will
-     * use ff_default_get_video_buffer().
-     *
-     * Input video pads only.
-     */
-    AVFrame *(*get_video_buffer)(AVFilterLink *link, int w, int h);
-
-    /**
-     * Callback function to get an audio buffer. If NULL, the filter system will
-     * use ff_default_get_audio_buffer().
-     *
-     * Input audio pads only.
-     */
-    AVFrame *(*get_audio_buffer)(AVFilterLink *link, int nb_samples);
-
-    /**
-     * @deprecated unused
-     */
-    int (*end_frame)(AVFilterLink *link);
-
-    /**
-     * @deprecated unused
-     */
-    int (*draw_slice)(AVFilterLink *link, int y, int height, int slice_dir);
-
-    /**
-     * Filtering callback. This is where a filter receives a frame with
-     * audio/video data and should do its processing.
-     *
-     * Input pads only.
-     *
-     * @return >= 0 on success, a negative AVERROR on error. This function
-     * must ensure that frame is properly unreferenced on error if it
-     * hasn't been passed on to another filter.
-     */
-    int (*filter_frame)(AVFilterLink *link, AVFrame *frame);
-
-    /**
-     * Frame poll callback. This returns the number of immediately available
-     * samples. It should return a positive value if the next request_frame()
-     * is guaranteed to return one frame (with no delay).
-     *
-     * Defaults to just calling the source poll_frame() method.
-     *
-     * Output pads only.
-     */
-    int (*poll_frame)(AVFilterLink *link);
-
-    /**
-     * Frame request callback. A call to this should result in at least one
-     * frame being output over the given link. This should return zero on
-     * success, and another value on error.
-     * See ff_request_frame() for the error codes with a specific
-     * meaning.
-     *
-     * Output pads only.
-     */
-    int (*request_frame)(AVFilterLink *link);
-
-    /**
-     * Link configuration callback.
-     *
-     * For output pads, this should set the following link properties:
-     * video: width, height, sample_aspect_ratio, time_base
-     * audio: sample_rate.
-     *
-     * This should NOT set properties such as format, channel_layout, etc which
-     * are negotiated between filters by the filter system using the
-     * query_formats() callback before this function is called.
-     *
-     * For input pads, this should check the properties of the link, and update
-     * the filter's internal state as necessary.
-     *
-     * For both input and output pads, this should return zero on success,
-     * and another value on error.
-     */
-    int (*config_props)(AVFilterLink *link);
-
-    /**
-     * The filter expects a fifo to be inserted on its input link,
-     * typically because it has a delay.
-     *
-     * input pads only.
-     */
-    int needs_fifo;
-
-    /**
-     * The filter expects writable frames from its input link,
-     * duplicating data buffers if needed.
-     *
-     * input pads only.
-     */
-    int needs_writable;
-};
-#endif
-
-/**
- * Get the number of elements in a NULL-terminated array of AVFilterPads (e.g.
- * AVFilter.inputs/outputs).
- */
-int avfilter_pad_count(const AVFilterPad *pads);
-
-/**
- * Get the name of an AVFilterPad.
- *
- * @param pads an array of AVFilterPads
- * @param pad_idx index of the pad in the array it; is the caller's
- *                responsibility to ensure the index is valid
- *
- * @return name of the pad_idx'th pad in pads
- */
-const char *avfilter_pad_get_name(const AVFilterPad *pads, int pad_idx);
-
-/**
- * Get the type of an AVFilterPad.
- *
- * @param pads an array of AVFilterPads
- * @param pad_idx index of the pad in the array; it is the caller's
- *                responsibility to ensure the index is valid
- *
- * @return type of the pad_idx'th pad in pads
- */
-enum AVMediaType avfilter_pad_get_type(const AVFilterPad *pads, int pad_idx);
-
-/**
- * The number of the filter inputs is not determined just by AVFilter.inputs.
- * The filter might add additional inputs during initialization depending on the
- * options supplied to it.
- */
-#define AVFILTER_FLAG_DYNAMIC_INPUTS        (1 << 0)
-/**
- * The number of the filter outputs is not determined just by AVFilter.outputs.
- * The filter might add additional outputs during initialization depending on
- * the options supplied to it.
- */
-#define AVFILTER_FLAG_DYNAMIC_OUTPUTS       (1 << 1)
-/**
- * The filter supports multithreading by splitting frames into multiple parts
- * and processing them concurrently.
- */
-#define AVFILTER_FLAG_SLICE_THREADS         (1 << 2)
-/**
- * Some filters support a generic "enable" expression option that can be used
- * to enable or disable a filter in the timeline. Filters supporting this
- * option have this flag set. When the enable expression is false, the default
- * no-op filter_frame() function is called in place of the filter_frame()
- * callback defined on each input pad, thus the frame is passed unchanged to
- * the next filters.
- */
-#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC  (1 << 16)
-/**
- * Same as AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, except that the filter will
- * have its filter_frame() callback(s) called as usual even when the enable
- * expression is false. The filter will disable filtering within the
- * filter_frame() callback(s) itself, for example executing code depending on
- * the AVFilterContext->is_disabled value.
- */
-#define AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL (1 << 17)
-/**
- * Handy mask to test whether the filter supports or no the timeline feature
- * (internally or generically).
- */
-#define AVFILTER_FLAG_SUPPORT_TIMELINE (AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL)
-
-/**
- * Filter definition. This defines the pads a filter contains, and all the
- * callback functions used to interact with the filter.
- */
-typedef struct AVFilter {
-    /**
-     * Filter name. Must be non-NULL and unique among filters.
-     */
-    const char *name;
-
-    /**
-     * A description of the filter. May be NULL.
-     *
-     * You should use the NULL_IF_CONFIG_SMALL() macro to define it.
-     */
-    const char *description;
-
-    /**
-     * List of inputs, terminated by a zeroed element.
-     *
-     * NULL if there are no (static) inputs. Instances of filters with
-     * AVFILTER_FLAG_DYNAMIC_INPUTS set may have more inputs than present in
-     * this list.
-     */
-    const AVFilterPad *inputs;
-    /**
-     * List of outputs, terminated by a zeroed element.
-     *
-     * NULL if there are no (static) outputs. Instances of filters with
-     * AVFILTER_FLAG_DYNAMIC_OUTPUTS set may have more outputs than present in
-     * this list.
-     */
-    const AVFilterPad *outputs;
-
-    /**
-     * A class for the private data, used to declare filter private AVOptions.
-     * This field is NULL for filters that do not declare any options.
-     *
-     * If this field is non-NULL, the first member of the filter private data
-     * must be a pointer to AVClass, which will be set by libavfilter generic
-     * code to this class.
-     */
-    const AVClass *priv_class;
-
-    /**
-     * A combination of AVFILTER_FLAG_*
-     */
-    int flags;
-
-    /*****************************************************************
-     * All fields below this line are not part of the public API. They
-     * may not be used outside of libavfilter and can be changed and
-     * removed at will.
-     * New public fields should be added right above.
-     *****************************************************************
-     */
-
-    /**
-     * Filter initialization function.
-     *
-     * This callback will be called only once during the filter lifetime, after
-     * all the options have been set, but before links between filters are
-     * established and format negotiation is done.
-     *
-     * Basic filter initialization should be done here. Filters with dynamic
-     * inputs and/or outputs should create those inputs/outputs here based on
-     * provided options. No more changes to this filter's inputs/outputs can be
-     * done after this callback.
-     *
-     * This callback must not assume that the filter links exist or frame
-     * parameters are known.
-     *
-     * @ref AVFilter.uninit "uninit" is guaranteed to be called even if
-     * initialization fails, so this callback does not have to clean up on
-     * failure.
-     *
-     * @return 0 on success, a negative AVERROR on failure
-     */
-    int (*init)(AVFilterContext *ctx);
-
-    /**
-     * Should be set instead of @ref AVFilter.init "init" by the filters that
-     * want to pass a dictionary of AVOptions to nested contexts that are
-     * allocated during init.
-     *
-     * On return, the options dict should be freed and replaced with one that
-     * contains all the options which could not be processed by this filter (or
-     * with NULL if all the options were processed).
-     *
-     * Otherwise the semantics is the same as for @ref AVFilter.init "init".
-     */
-    int (*init_dict)(AVFilterContext *ctx, AVDictionary **options);
-
-    /**
-     * Filter uninitialization function.
-     *
-     * Called only once right before the filter is freed. Should deallocate any
-     * memory held by the filter, release any buffer references, etc. It does
-     * not need to deallocate the AVFilterContext.priv memory itself.
-     *
-     * This callback may be called even if @ref AVFilter.init "init" was not
-     * called or failed, so it must be prepared to handle such a situation.
-     */
-    void (*uninit)(AVFilterContext *ctx);
-
-    /**
-     * Query formats supported by the filter on its inputs and outputs.
-     *
-     * This callback is called after the filter is initialized (so the inputs
-     * and outputs are fixed), shortly before the format negotiation. This
-     * callback may be called more than once.
-     *
-     * This callback must set AVFilterLink.out_formats on every input link and
-     * AVFilterLink.in_formats on every output link to a list of pixel/sample
-     * formats that the filter supports on that link. For audio links, this
-     * filter must also set @ref AVFilterLink.in_samplerates "in_samplerates" /
-     * @ref AVFilterLink.out_samplerates "out_samplerates" and
-     * @ref AVFilterLink.in_channel_layouts "in_channel_layouts" /
-     * @ref AVFilterLink.out_channel_layouts "out_channel_layouts" analogously.
-     *
-     * This callback may be NULL for filters with one input, in which case
-     * libavfilter assumes that it supports all input formats and preserves
-     * them on output.
-     *
-     * @return zero on success, a negative value corresponding to an
-     * AVERROR code otherwise
-     */
-    int (*query_formats)(AVFilterContext *);
-
-    int priv_size;      ///< size of private data to allocate for the filter
-
-    /**
-     * Used by the filter registration system. Must not be touched by any other
-     * code.
-     */
-    struct AVFilter *next;
-
-    /**
-     * Make the filter instance process a command.
-     *
-     * @param cmd    the command to process, for handling simplicity all commands must be alphanumeric only
-     * @param arg    the argument for the command
-     * @param res    a buffer with size res_size where the filter(s) can return a response. This must not change when the command is not supported.
-     * @param flags  if AVFILTER_CMD_FLAG_FAST is set and the command would be
-     *               time consuming then a filter should treat it like an unsupported command
-     *
-     * @returns >=0 on success otherwise an error code.
-     *          AVERROR(ENOSYS) on unsupported commands
-     */
-    int (*process_command)(AVFilterContext *, const char *cmd, const char *arg, char *res, int res_len, int flags);
-
-    /**
-     * Filter initialization function, alternative to the init()
-     * callback. Args contains the user-supplied parameters, opaque is
-     * used for providing binary data.
-     */
-    int (*init_opaque)(AVFilterContext *ctx, void *opaque);
-} AVFilter;
-
-/**
- * Process multiple parts of the frame concurrently.
- */
-#define AVFILTER_THREAD_SLICE (1 << 0)
-
-typedef struct AVFilterInternal AVFilterInternal;
-
-/** An instance of a filter */
-struct AVFilterContext {
-    const AVClass *av_class;        ///< needed for av_log() and filters common options
-
-    const AVFilter *filter;         ///< the AVFilter of which this is an instance
-
-    char *name;                     ///< name of this filter instance
-
-    AVFilterPad   *input_pads;      ///< array of input pads
-    AVFilterLink **inputs;          ///< array of pointers to input links
-#if FF_API_FOO_COUNT
-    attribute_deprecated unsigned input_count; ///< @deprecated use nb_inputs
-#endif
-    unsigned    nb_inputs;          ///< number of input pads
-
-    AVFilterPad   *output_pads;     ///< array of output pads
-    AVFilterLink **outputs;         ///< array of pointers to output links
-#if FF_API_FOO_COUNT
-    attribute_deprecated unsigned output_count; ///< @deprecated use nb_outputs
-#endif
-    unsigned    nb_outputs;         ///< number of output pads
-
-    void *priv;                     ///< private data for use by the filter
-
-    struct AVFilterGraph *graph;    ///< filtergraph this filter belongs to
-
-    /**
-     * Type of multithreading being allowed/used. A combination of
-     * AVFILTER_THREAD_* flags.
-     *
-     * May be set by the caller before initializing the filter to forbid some
-     * or all kinds of multithreading for this filter. The default is allowing
-     * everything.
-     *
-     * When the filter is initialized, this field is combined using bit AND with
-     * AVFilterGraph.thread_type to get the final mask used for determining
-     * allowed threading types. I.e. a threading type needs to be set in both
-     * to be allowed.
-     *
-     * After the filter is initialzed, libavfilter sets this field to the
-     * threading type that is actually used (0 for no multithreading).
-     */
-    int thread_type;
-
-    /**
-     * An opaque struct for libavfilter internal use.
-     */
-    AVFilterInternal *internal;
-
-    struct AVFilterCommand *command_queue;
-
-    char *enable_str;               ///< enable expression string
-    void *enable;                   ///< parsed expression (AVExpr*)
-    double *var_values;             ///< variable values for the enable expression
-    int is_disabled;                ///< the enabled state from the last expression evaluation
-};
-
-/**
- * A link between two filters. This contains pointers to the source and
- * destination filters between which this link exists, and the indexes of
- * the pads involved. In addition, this link also contains the parameters
- * which have been negotiated and agreed upon between the filter, such as
- * image dimensions, format, etc.
- */
-struct AVFilterLink {
-    AVFilterContext *src;       ///< source filter
-    AVFilterPad *srcpad;        ///< output pad on the source filter
-
-    AVFilterContext *dst;       ///< dest filter
-    AVFilterPad *dstpad;        ///< input pad on the dest filter
-
-    enum AVMediaType type;      ///< filter media type
-
-    /* These parameters apply only to video */
-    int w;                      ///< agreed upon image width
-    int h;                      ///< agreed upon image height
-    AVRational sample_aspect_ratio; ///< agreed upon sample aspect ratio
-    /* These parameters apply only to audio */
-    uint64_t channel_layout;    ///< channel layout of current buffer (see libavutil/channel_layout.h)
-    int sample_rate;            ///< samples per second
-
-    int format;                 ///< agreed upon media format
-
-    /**
-     * Define the time base used by the PTS of the frames/samples
-     * which will pass through this link.
-     * During the configuration stage, each filter is supposed to
-     * change only the output timebase, while the timebase of the
-     * input link is assumed to be an unchangeable property.
-     */
-    AVRational time_base;
-
-    /*****************************************************************
-     * All fields below this line are not part of the public API. They
-     * may not be used outside of libavfilter and can be changed and
-     * removed at will.
-     * New public fields should be added right above.
-     *****************************************************************
-     */
-    /**
-     * Lists of formats and channel layouts supported by the input and output
-     * filters respectively. These lists are used for negotiating the format
-     * to actually be used, which will be loaded into the format and
-     * channel_layout members, above, when chosen.
-     *
-     */
-    AVFilterFormats *in_formats;
-    AVFilterFormats *out_formats;
-
-    /**
-     * Lists of channel layouts and sample rates used for automatic
-     * negotiation.
-     */
-    AVFilterFormats  *in_samplerates;
-    AVFilterFormats *out_samplerates;
-    struct AVFilterChannelLayouts  *in_channel_layouts;
-    struct AVFilterChannelLayouts *out_channel_layouts;
-
-    /**
-     * Audio only, the destination filter sets this to a non-zero value to
-     * request that buffers with the given number of samples should be sent to
-     * it. AVFilterPad.needs_fifo must also be set on the corresponding input
-     * pad.
-     * Last buffer before EOF will be padded with silence.
-     */
-    int request_samples;
-
-    /** stage of the initialization of the link properties (dimensions, etc) */
-    enum {
-        AVLINK_UNINIT = 0,      ///< not started
-        AVLINK_STARTINIT,       ///< started, but incomplete
-        AVLINK_INIT             ///< complete
-    } init_state;
-
-    struct AVFilterPool *pool;
-
-    /**
-     * Graph the filter belongs to.
-     */
-    struct AVFilterGraph *graph;
-
-    /**
-     * Current timestamp of the link, as defined by the most recent
-     * frame(s), in AV_TIME_BASE units.
-     */
-    int64_t current_pts;
-
-    /**
-     * Index in the age array.
-     */
-    int age_index;
-
-    /**
-     * Frame rate of the stream on the link, or 1/0 if unknown;
-     * if left to 0/0, will be automatically be copied from the first input
-     * of the source filter if it exists.
-     *
-     * Sources should set it to the best estimation of the real frame rate.
-     * Filters should update it if necessary depending on their function.
-     * Sinks can use it to set a default output frame rate.
-     * It is similar to the r_frame_rate field in AVStream.
-     */
-    AVRational frame_rate;
-
-    /**
-     * Buffer partially filled with samples to achieve a fixed/minimum size.
-     */
-    AVFrame *partial_buf;
-
-    /**
-     * Size of the partial buffer to allocate.
-     * Must be between min_samples and max_samples.
-     */
-    int partial_buf_size;
-
-    /**
-     * Minimum number of samples to filter at once. If filter_frame() is
-     * called with fewer samples, it will accumulate them in partial_buf.
-     * This field and the related ones must not be changed after filtering
-     * has started.
-     * If 0, all related fields are ignored.
-     */
-    int min_samples;
-
-    /**
-     * Maximum number of samples to filter at once. If filter_frame() is
-     * called with more samples, it will split them.
-     */
-    int max_samples;
-
-    /**
-     * The buffer reference currently being received across the link by the
-     * destination filter. This is used internally by the filter system to
-     * allow automatic copying of buffers which do not have sufficient
-     * permissions for the destination. This should not be accessed directly
-     * by the filters.
-     */
-    AVFilterBufferRef *cur_buf_copy;
-
-    /**
-     * True if the link is closed.
-     * If set, all attemps of start_frame, filter_frame or request_frame
-     * will fail with AVERROR_EOF, and if necessary the reference will be
-     * destroyed.
-     * If request_frame returns AVERROR_EOF, this flag is set on the
-     * corresponding link.
-     * It can be set also be set by either the source or the destination
-     * filter.
-     */
-    int closed;
-
-    /**
-     * Number of channels.
-     */
-    int channels;
-
-    /**
-     * True if a frame is being requested on the link.
-     * Used internally by the framework.
-     */
-    unsigned frame_requested;
-
-    /**
-     * Link processing flags.
-     */
-    unsigned flags;
-
-    /**
-     * Number of past frames sent through the link.
-     */
-    int64_t frame_count;
-};
-
-/**
- * Link two filters together.
- *
- * @param src    the source filter
- * @param srcpad index of the output pad on the source filter
- * @param dst    the destination filter
- * @param dstpad index of the input pad on the destination filter
- * @return       zero on success
- */
-int avfilter_link(AVFilterContext *src, unsigned srcpad,
-                  AVFilterContext *dst, unsigned dstpad);
-
-/**
- * Free the link in *link, and set its pointer to NULL.
- */
-void avfilter_link_free(AVFilterLink **link);
-
-/**
- * Get the number of channels of a link.
- */
-int avfilter_link_get_channels(AVFilterLink *link);
-
-/**
- * Set the closed field of a link.
- */
-void avfilter_link_set_closed(AVFilterLink *link, int closed);
-
-/**
- * Negotiate the media format, dimensions, etc of all inputs to a filter.
- *
- * @param filter the filter to negotiate the properties for its inputs
- * @return       zero on successful negotiation
- */
-int avfilter_config_links(AVFilterContext *filter);
-
-#if FF_API_AVFILTERBUFFER
-/**
- * Create a buffer reference wrapped around an already allocated image
- * buffer.
- *
- * @param data pointers to the planes of the image to reference
- * @param linesize linesizes for the planes of the image to reference
- * @param perms the required access permissions
- * @param w the width of the image specified by the data and linesize arrays
- * @param h the height of the image specified by the data and linesize arrays
- * @param format the pixel format of the image specified by the data and linesize arrays
- */
-attribute_deprecated
-AVFilterBufferRef *
-avfilter_get_video_buffer_ref_from_arrays(uint8_t * const data[4], const int linesize[4], int perms,
-                                          int w, int h, enum AVPixelFormat format);
-
-/**
- * Create an audio buffer reference wrapped around an already
- * allocated samples buffer.
- *
- * See avfilter_get_audio_buffer_ref_from_arrays_channels() for a version
- * that can handle unknown channel layouts.
- *
- * @param data           pointers to the samples plane buffers
- * @param linesize       linesize for the samples plane buffers
- * @param perms          the required access permissions
- * @param nb_samples     number of samples per channel
- * @param sample_fmt     the format of each sample in the buffer to allocate
- * @param channel_layout the channel layout of the buffer
- */
-attribute_deprecated
-AVFilterBufferRef *avfilter_get_audio_buffer_ref_from_arrays(uint8_t **data,
-                                                             int linesize,
-                                                             int perms,
-                                                             int nb_samples,
-                                                             enum AVSampleFormat sample_fmt,
-                                                             uint64_t channel_layout);
-/**
- * Create an audio buffer reference wrapped around an already
- * allocated samples buffer.
- *
- * @param data           pointers to the samples plane buffers
- * @param linesize       linesize for the samples plane buffers
- * @param perms          the required access permissions
- * @param nb_samples     number of samples per channel
- * @param sample_fmt     the format of each sample in the buffer to allocate
- * @param channels       the number of channels of the buffer
- * @param channel_layout the channel layout of the buffer,
- *                       must be either 0 or consistent with channels
- */
-attribute_deprecated
-AVFilterBufferRef *avfilter_get_audio_buffer_ref_from_arrays_channels(uint8_t **data,
-                                                                      int linesize,
-                                                                      int perms,
-                                                                      int nb_samples,
-                                                                      enum AVSampleFormat sample_fmt,
-                                                                      int channels,
-                                                                      uint64_t channel_layout);
-
-#endif
-
-
-#define AVFILTER_CMD_FLAG_ONE   1 ///< Stop once a filter understood the command (for target=all for example), fast filters are favored automatically
-#define AVFILTER_CMD_FLAG_FAST  2 ///< Only execute command when its fast (like a video out that supports contrast adjustment in hw)
-
-/**
- * Make the filter instance process a command.
- * It is recommended to use avfilter_graph_send_command().
- */
-int avfilter_process_command(AVFilterContext *filter, const char *cmd, const char *arg, char *res, int res_len, int flags);
-
-/** Initialize the filter system. Register all builtin filters. */
-void avfilter_register_all(void);
-
-#if FF_API_OLD_FILTER_REGISTER
-/** Uninitialize the filter system. Unregister all filters. */
-attribute_deprecated
-void avfilter_uninit(void);
-#endif
-
-/**
- * Register a filter. This is only needed if you plan to use
- * avfilter_get_by_name later to lookup the AVFilter structure by name. A
- * filter can still by instantiated with avfilter_graph_alloc_filter even if it
- * is not registered.
- *
- * @param filter the filter to register
- * @return 0 if the registration was successful, a negative value
- * otherwise
- */
-int avfilter_register(AVFilter *filter);
-
-/**
- * Get a filter definition matching the given name.
- *
- * @param name the filter name to find
- * @return     the filter definition, if any matching one is registered.
- *             NULL if none found.
- */
-#if !FF_API_NOCONST_GET_NAME
-const
-#endif
-AVFilter *avfilter_get_by_name(const char *name);
-
-/**
- * Iterate over all registered filters.
- * @return If prev is non-NULL, next registered filter after prev or NULL if
- * prev is the last filter. If prev is NULL, return the first registered filter.
- */
-const AVFilter *avfilter_next(const AVFilter *prev);
-
-#if FF_API_OLD_FILTER_REGISTER
-/**
- * If filter is NULL, returns a pointer to the first registered filter pointer,
- * if filter is non-NULL, returns the next pointer after filter.
- * If the returned pointer points to NULL, the last registered filter
- * was already reached.
- * @deprecated use avfilter_next()
- */
-attribute_deprecated
-AVFilter **av_filter_next(AVFilter **filter);
-#endif
-
-#if FF_API_AVFILTER_OPEN
-/**
- * Create a filter instance.
- *
- * @param filter_ctx put here a pointer to the created filter context
- * on success, NULL on failure
- * @param filter    the filter to create an instance of
- * @param inst_name Name to give to the new instance. Can be NULL for none.
- * @return >= 0 in case of success, a negative error code otherwise
- * @deprecated use avfilter_graph_alloc_filter() instead
- */
-attribute_deprecated
-int avfilter_open(AVFilterContext **filter_ctx, AVFilter *filter, const char *inst_name);
-#endif
-
-
-#if FF_API_AVFILTER_INIT_FILTER
-/**
- * Initialize a filter.
- *
- * @param filter the filter to initialize
- * @param args   A string of parameters to use when initializing the filter.
- *               The format and meaning of this string varies by filter.
- * @param opaque Any extra non-string data needed by the filter. The meaning
- *               of this parameter varies by filter.
- * @return       zero on success
- */
-attribute_deprecated
-int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque);
-#endif
-
-/**
- * Initialize a filter with the supplied parameters.
- *
- * @param ctx  uninitialized filter context to initialize
- * @param args Options to initialize the filter with. This must be a
- *             ':'-separated list of options in the 'key=value' form.
- *             May be NULL if the options have been set directly using the
- *             AVOptions API or there are no options that need to be set.
- * @return 0 on success, a negative AVERROR on failure
- */
-int avfilter_init_str(AVFilterContext *ctx, const char *args);
-
-/**
- * Initialize a filter with the supplied dictionary of options.
- *
- * @param ctx     uninitialized filter context to initialize
- * @param options An AVDictionary filled with options for this filter. On
- *                return this parameter will be destroyed and replaced with
- *                a dict containing options that were not found. This dictionary
- *                must be freed by the caller.
- *                May be NULL, then this function is equivalent to
- *                avfilter_init_str() with the second parameter set to NULL.
- * @return 0 on success, a negative AVERROR on failure
- *
- * @note This function and avfilter_init_str() do essentially the same thing,
- * the difference is in manner in which the options are passed. It is up to the
- * calling code to choose whichever is more preferable. The two functions also
- * behave differently when some of the provided options are not declared as
- * supported by the filter. In such a case, avfilter_init_str() will fail, but
- * this function will leave those extra options in the options AVDictionary and
- * continue as usual.
- */
-int avfilter_init_dict(AVFilterContext *ctx, AVDictionary **options);
-
-/**
- * Free a filter context. This will also remove the filter from its
- * filtergraph's list of filters.
- *
- * @param filter the filter to free
- */
-void avfilter_free(AVFilterContext *filter);
-
-/**
- * Insert a filter in the middle of an existing link.
- *
- * @param link the link into which the filter should be inserted
- * @param filt the filter to be inserted
- * @param filt_srcpad_idx the input pad on the filter to connect
- * @param filt_dstpad_idx the output pad on the filter to connect
- * @return     zero on success
- */
-int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt,
-                           unsigned filt_srcpad_idx, unsigned filt_dstpad_idx);
-
-#if FF_API_AVFILTERBUFFER
-/**
- * Copy the frame properties of src to dst, without copying the actual
- * image data.
- *
- * @return 0 on success, a negative number on error.
- */
-attribute_deprecated
-int avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src);
-
-/**
- * Copy the frame properties and data pointers of src to dst, without copying
- * the actual data.
- *
- * @return 0 on success, a negative number on error.
- */
-attribute_deprecated
-int avfilter_copy_buf_props(AVFrame *dst, const AVFilterBufferRef *src);
-#endif
-
-/**
- * @return AVClass for AVFilterContext.
- *
- * @see av_opt_find().
- */
-const AVClass *avfilter_get_class(void);
-
-typedef struct AVFilterGraphInternal AVFilterGraphInternal;
-
-/**
- * A function pointer passed to the @ref AVFilterGraph.execute callback to be
- * executed multiple times, possibly in parallel.
- *
- * @param ctx the filter context the job belongs to
- * @param arg an opaque parameter passed through from @ref
- *            AVFilterGraph.execute
- * @param jobnr the index of the job being executed
- * @param nb_jobs the total number of jobs
- *
- * @return 0 on success, a negative AVERROR on error
- */
-typedef int (avfilter_action_func)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs);
-
-/**
- * A function executing multiple jobs, possibly in parallel.
- *
- * @param ctx the filter context to which the jobs belong
- * @param func the function to be called multiple times
- * @param arg the argument to be passed to func
- * @param ret a nb_jobs-sized array to be filled with return values from each
- *            invocation of func
- * @param nb_jobs the number of jobs to execute
- *
- * @return 0 on success, a negative AVERROR on error
- */
-typedef int (avfilter_execute_func)(AVFilterContext *ctx, avfilter_action_func *func,
-                                    void *arg, int *ret, int nb_jobs);
-
-typedef struct AVFilterGraph {
-    const AVClass *av_class;
-#if FF_API_FOO_COUNT
-    attribute_deprecated
-    unsigned filter_count_unused;
-#endif
-    AVFilterContext **filters;
-#if !FF_API_FOO_COUNT
-    unsigned nb_filters;
-#endif
-
-    char *scale_sws_opts; ///< sws options to use for the auto-inserted scale filters
-    char *resample_lavr_opts;   ///< libavresample options to use for the auto-inserted resample filters
-#if FF_API_FOO_COUNT
-    unsigned nb_filters;
-#endif
-
-    /**
-     * Type of multithreading allowed for filters in this graph. A combination
-     * of AVFILTER_THREAD_* flags.
-     *
-     * May be set by the caller at any point, the setting will apply to all
-     * filters initialized after that. The default is allowing everything.
-     *
-     * When a filter in this graph is initialized, this field is combined using
-     * bit AND with AVFilterContext.thread_type to get the final mask used for
-     * determining allowed threading types. I.e. a threading type needs to be
-     * set in both to be allowed.
-     */
-    int thread_type;
-
-    /**
-     * Maximum number of threads used by filters in this graph. May be set by
-     * the caller before adding any filters to the filtergraph. Zero (the
-     * default) means that the number of threads is determined automatically.
-     */
-    int nb_threads;
-
-    /**
-     * Opaque object for libavfilter internal use.
-     */
-    AVFilterGraphInternal *internal;
-
-    /**
-     * Opaque user data. May be set by the caller to an arbitrary value, e.g. to
-     * be used from callbacks like @ref AVFilterGraph.execute.
-     * Libavfilter will not touch this field in any way.
-     */
-    void *opaque;
-
-    /**
-     * This callback may be set by the caller immediately after allocating the
-     * graph and before adding any filters to it, to provide a custom
-     * multithreading implementation.
-     *
-     * If set, filters with slice threading capability will call this callback
-     * to execute multiple jobs in parallel.
-     *
-     * If this field is left unset, libavfilter will use its internal
-     * implementation, which may or may not be multithreaded depending on the
-     * platform and build options.
-     */
-    avfilter_execute_func *execute;
-
-    char *aresample_swr_opts; ///< swr options to use for the auto-inserted aresample filters, Access ONLY through AVOptions
-
-    /**
-     * Private fields
-     *
-     * The following fields are for internal use only.
-     * Their type, offset, number and semantic can change without notice.
-     */
-
-    AVFilterLink **sink_links;
-    int sink_links_count;
-
-    unsigned disable_auto_convert;
-} AVFilterGraph;
-
-/**
- * Allocate a filter graph.
- */
-AVFilterGraph *avfilter_graph_alloc(void);
-
-/**
- * Create a new filter instance in a filter graph.
- *
- * @param graph graph in which the new filter will be used
- * @param filter the filter to create an instance of
- * @param name Name to give to the new instance (will be copied to
- *             AVFilterContext.name). This may be used by the caller to identify
- *             different filters, libavfilter itself assigns no semantics to
- *             this parameter. May be NULL.
- *
- * @return the context of the newly created filter instance (note that it is
- *         also retrievable directly through AVFilterGraph.filters or with
- *         avfilter_graph_get_filter()) on success or NULL or failure.
- */
-AVFilterContext *avfilter_graph_alloc_filter(AVFilterGraph *graph,
-                                             const AVFilter *filter,
-                                             const char *name);
-
-/**
- * Get a filter instance with name name from graph.
- *
- * @return the pointer to the found filter instance or NULL if it
- * cannot be found.
- */
-AVFilterContext *avfilter_graph_get_filter(AVFilterGraph *graph, char *name);
-
-#if FF_API_AVFILTER_OPEN
-/**
- * Add an existing filter instance to a filter graph.
- *
- * @param graphctx  the filter graph
- * @param filter the filter to be added
- *
- * @deprecated use avfilter_graph_alloc_filter() to allocate a filter in a
- * filter graph
- */
-attribute_deprecated
-int avfilter_graph_add_filter(AVFilterGraph *graphctx, AVFilterContext *filter);
-#endif
-
-/**
- * Create and add a filter instance into an existing graph.
- * The filter instance is created from the filter filt and inited
- * with the parameters args and opaque.
- *
- * In case of success put in *filt_ctx the pointer to the created
- * filter instance, otherwise set *filt_ctx to NULL.
- *
- * @param name the instance name to give to the created filter instance
- * @param graph_ctx the filter graph
- * @return a negative AVERROR error code in case of failure, a non
- * negative value otherwise
- */
-int avfilter_graph_create_filter(AVFilterContext **filt_ctx, const AVFilter *filt,
-                                 const char *name, const char *args, void *opaque,
-                                 AVFilterGraph *graph_ctx);
-
-/**
- * Enable or disable automatic format conversion inside the graph.
- *
- * Note that format conversion can still happen inside explicitly inserted
- * scale and aresample filters.
- *
- * @param flags  any of the AVFILTER_AUTO_CONVERT_* constants
- */
-void avfilter_graph_set_auto_convert(AVFilterGraph *graph, unsigned flags);
-
-enum {
-    AVFILTER_AUTO_CONVERT_ALL  =  0, /**< all automatic conversions enabled */
-    AVFILTER_AUTO_CONVERT_NONE = -1, /**< all automatic conversions disabled */
-};
-
-/**
- * Check validity and configure all the links and formats in the graph.
- *
- * @param graphctx the filter graph
- * @param log_ctx context used for logging
- * @return >= 0 in case of success, a negative AVERROR code otherwise
- */
-int avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx);
-
-/**
- * Free a graph, destroy its links, and set *graph to NULL.
- * If *graph is NULL, do nothing.
- */
-void avfilter_graph_free(AVFilterGraph **graph);
-
-/**
- * A linked-list of the inputs/outputs of the filter chain.
- *
- * This is mainly useful for avfilter_graph_parse() / avfilter_graph_parse2(),
- * where it is used to communicate open (unlinked) inputs and outputs from and
- * to the caller.
- * This struct specifies, per each not connected pad contained in the graph, the
- * filter context and the pad index required for establishing a link.
- */
-typedef struct AVFilterInOut {
-    /** unique name for this input/output in the list */
-    char *name;
-
-    /** filter context associated to this input/output */
-    AVFilterContext *filter_ctx;
-
-    /** index of the filt_ctx pad to use for linking */
-    int pad_idx;
-
-    /** next input/input in the list, NULL if this is the last */
-    struct AVFilterInOut *next;
-} AVFilterInOut;
-
-/**
- * Allocate a single AVFilterInOut entry.
- * Must be freed with avfilter_inout_free().
- * @return allocated AVFilterInOut on success, NULL on failure.
- */
-AVFilterInOut *avfilter_inout_alloc(void);
-
-/**
- * Free the supplied list of AVFilterInOut and set *inout to NULL.
- * If *inout is NULL, do nothing.
- */
-void avfilter_inout_free(AVFilterInOut **inout);
-
-#if AV_HAVE_INCOMPATIBLE_LIBAV_ABI || !FF_API_OLD_GRAPH_PARSE
-/**
- * Add a graph described by a string to a graph.
- *
- * @note The caller must provide the lists of inputs and outputs,
- * which therefore must be known before calling the function.
- *
- * @note The inputs parameter describes inputs of the already existing
- * part of the graph; i.e. from the point of view of the newly created
- * part, they are outputs. Similarly the outputs parameter describes
- * outputs of the already existing filters, which are provided as
- * inputs to the parsed filters.
- *
- * @param graph   the filter graph where to link the parsed grap context
- * @param filters string to be parsed
- * @param inputs  linked list to the inputs of the graph
- * @param outputs linked list to the outputs of the graph
- * @return zero on success, a negative AVERROR code on error
- */
-int avfilter_graph_parse(AVFilterGraph *graph, const char *filters,
-                         AVFilterInOut *inputs, AVFilterInOut *outputs,
-                         void *log_ctx);
-#else
-/**
- * Add a graph described by a string to a graph.
- *
- * @param graph   the filter graph where to link the parsed graph context
- * @param filters string to be parsed
- * @param inputs  pointer to a linked list to the inputs of the graph, may be NULL.
- *                If non-NULL, *inputs is updated to contain the list of open inputs
- *                after the parsing, should be freed with avfilter_inout_free().
- * @param outputs pointer to a linked list to the outputs of the graph, may be NULL.
- *                If non-NULL, *outputs is updated to contain the list of open outputs
- *                after the parsing, should be freed with avfilter_inout_free().
- * @return non negative on success, a negative AVERROR code on error
- * @deprecated Use avfilter_graph_parse_ptr() instead.
- */
-attribute_deprecated
-int avfilter_graph_parse(AVFilterGraph *graph, const char *filters,
-                         AVFilterInOut **inputs, AVFilterInOut **outputs,
-                         void *log_ctx);
-#endif
-
-/**
- * Add a graph described by a string to a graph.
- *
- * @param graph   the filter graph where to link the parsed graph context
- * @param filters string to be parsed
- * @param inputs  pointer to a linked list to the inputs of the graph, may be NULL.
- *                If non-NULL, *inputs is updated to contain the list of open inputs
- *                after the parsing, should be freed with avfilter_inout_free().
- * @param outputs pointer to a linked list to the outputs of the graph, may be NULL.
- *                If non-NULL, *outputs is updated to contain the list of open outputs
- *                after the parsing, should be freed with avfilter_inout_free().
- * @return non negative on success, a negative AVERROR code on error
- */
-int avfilter_graph_parse_ptr(AVFilterGraph *graph, const char *filters,
-                             AVFilterInOut **inputs, AVFilterInOut **outputs,
-                             void *log_ctx);
-
-/**
- * Add a graph described by a string to a graph.
- *
- * @param[in]  graph   the filter graph where to link the parsed graph context
- * @param[in]  filters string to be parsed
- * @param[out] inputs  a linked list of all free (unlinked) inputs of the
- *                     parsed graph will be returned here. It is to be freed
- *                     by the caller using avfilter_inout_free().
- * @param[out] outputs a linked list of all free (unlinked) outputs of the
- *                     parsed graph will be returned here. It is to be freed by the
- *                     caller using avfilter_inout_free().
- * @return zero on success, a negative AVERROR code on error
- *
- * @note This function returns the inputs and outputs that are left
- * unlinked after parsing the graph and the caller then deals with
- * them.
- * @note This function makes no reference whatsoever to already
- * existing parts of the graph and the inputs parameter will on return
- * contain inputs of the newly parsed part of the graph.  Analogously
- * the outputs parameter will contain outputs of the newly created
- * filters.
- */
-int avfilter_graph_parse2(AVFilterGraph *graph, const char *filters,
-                          AVFilterInOut **inputs,
-                          AVFilterInOut **outputs);
-
-/**
- * Send a command to one or more filter instances.
- *
- * @param graph  the filter graph
- * @param target the filter(s) to which the command should be sent
- *               "all" sends to all filters
- *               otherwise it can be a filter or filter instance name
- *               which will send the command to all matching filters.
- * @param cmd    the command to send, for handling simplicity all commands must be alphanumeric only
- * @param arg    the argument for the command
- * @param res    a buffer with size res_size where the filter(s) can return a response.
- *
- * @returns >=0 on success otherwise an error code.
- *              AVERROR(ENOSYS) on unsupported commands
- */
-int avfilter_graph_send_command(AVFilterGraph *graph, const char *target, const char *cmd, const char *arg, char *res, int res_len, int flags);
-
-/**
- * Queue a command for one or more filter instances.
- *
- * @param graph  the filter graph
- * @param target the filter(s) to which the command should be sent
- *               "all" sends to all filters
- *               otherwise it can be a filter or filter instance name
- *               which will send the command to all matching filters.
- * @param cmd    the command to sent, for handling simplicity all commands must be alphanummeric only
- * @param arg    the argument for the command
- * @param ts     time at which the command should be sent to the filter
- *
- * @note As this executes commands after this function returns, no return code
- *       from the filter is provided, also AVFILTER_CMD_FLAG_ONE is not supported.
- */
-int avfilter_graph_queue_command(AVFilterGraph *graph, const char *target, const char *cmd, const char *arg, int flags, double ts);
-
-
-/**
- * Dump a graph into a human-readable string representation.
- *
- * @param graph    the graph to dump
- * @param options  formatting options; currently ignored
- * @return  a string, or NULL in case of memory allocation failure;
- *          the string must be freed using av_free
- */
-char *avfilter_graph_dump(AVFilterGraph *graph, const char *options);
-
-/**
- * Request a frame on the oldest sink link.
- *
- * If the request returns AVERROR_EOF, try the next.
- *
- * Note that this function is not meant to be the sole scheduling mechanism
- * of a filtergraph, only a convenience function to help drain a filtergraph
- * in a balanced way under normal circumstances.
- *
- * Also note that AVERROR_EOF does not mean that frames did not arrive on
- * some of the sinks during the process.
- * When there are multiple sink links, in case the requested link
- * returns an EOF, this may cause a filter to flush pending frames
- * which are sent to another sink link, although unrequested.
- *
- * @return  the return value of ff_request_frame(),
- *          or AVERROR_EOF if all links returned AVERROR_EOF
- */
-int avfilter_graph_request_oldest(AVFilterGraph *graph);
-
-/**
- * @}
- */
-
-#endif /* AVFILTER_AVFILTER_H */
diff --git a/extra_lib/include/libavfilter/avfiltergraph.h b/extra_lib/include/libavfilter/avfiltergraph.h
deleted file mode 100644
index b31d581..0000000
--- a/extra_lib/include/libavfilter/avfiltergraph.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Filter graphs
- * copyright (c) 2007 Bobby Bingham
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef AVFILTER_AVFILTERGRAPH_H
-#define AVFILTER_AVFILTERGRAPH_H
-
-#include "avfilter.h"
-#include "libavutil/log.h"
-
-#endif /* AVFILTER_AVFILTERGRAPH_H */
diff --git a/extra_lib/include/libavfilter/buffersink.h b/extra_lib/include/libavfilter/buffersink.h
deleted file mode 100644
index 24cd2fe..0000000
--- a/extra_lib/include/libavfilter/buffersink.h
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef AVFILTER_BUFFERSINK_H
-#define AVFILTER_BUFFERSINK_H
-
-/**
- * @file
- * @ingroup lavfi_buffersink
- * memory buffer sink API for audio and video
- */
-
-#include "avfilter.h"
-
-/**
- * @defgroup lavfi_buffersink Buffer sink API
- * @ingroup lavfi
- * @{
- */
-
-#if FF_API_AVFILTERBUFFER
-/**
- * Get an audio/video buffer data from buffer_sink and put it in bufref.
- *
- * This function works with both audio and video buffer sinks.
- *
- * @param buffer_sink pointer to a buffersink or abuffersink context
- * @param flags a combination of AV_BUFFERSINK_FLAG_* flags
- * @return >= 0 in case of success, a negative AVERROR code in case of
- * failure
- */
-attribute_deprecated
-int av_buffersink_get_buffer_ref(AVFilterContext *buffer_sink,
-                                 AVFilterBufferRef **bufref, int flags);
-
-/**
- * Get the number of immediately available frames.
- */
-attribute_deprecated
-int av_buffersink_poll_frame(AVFilterContext *ctx);
-
-/**
- * Get a buffer with filtered data from sink and put it in buf.
- *
- * @param ctx pointer to a context of a buffersink or abuffersink AVFilter.
- * @param buf pointer to the buffer will be written here if buf is non-NULL. buf
- *            must be freed by the caller using avfilter_unref_buffer().
- *            Buf may also be NULL to query whether a buffer is ready to be
- *            output.
- *
- * @return >= 0 in case of success, a negative AVERROR code in case of
- *         failure.
- */
-attribute_deprecated
-int av_buffersink_read(AVFilterContext *ctx, AVFilterBufferRef **buf);
-
-/**
- * Same as av_buffersink_read, but with the ability to specify the number of
- * samples read. This function is less efficient than av_buffersink_read(),
- * because it copies the data around.
- *
- * @param ctx pointer to a context of the abuffersink AVFilter.
- * @param buf pointer to the buffer will be written here if buf is non-NULL. buf
- *            must be freed by the caller using avfilter_unref_buffer(). buf
- *            will contain exactly nb_samples audio samples, except at the end
- *            of stream, when it can contain less than nb_samples.
- *            Buf may also be NULL to query whether a buffer is ready to be
- *            output.
- *
- * @warning do not mix this function with av_buffersink_read(). Use only one or
- * the other with a single sink, not both.
- */
-attribute_deprecated
-int av_buffersink_read_samples(AVFilterContext *ctx, AVFilterBufferRef **buf,
-                               int nb_samples);
-#endif
-
-/**
- * Get a frame with filtered data from sink and put it in frame.
- *
- * @param ctx    pointer to a buffersink or abuffersink filter context.
- * @param frame  pointer to an allocated frame that will be filled with data.
- *               The data must be freed using av_frame_unref() / av_frame_free()
- * @param flags  a combination of AV_BUFFERSINK_FLAG_* flags
- *
- * @return  >= 0 in for success, a negative AVERROR code for failure.
- */
-int av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flags);
-
-/**
- * Tell av_buffersink_get_buffer_ref() to read video/samples buffer
- * reference, but not remove it from the buffer. This is useful if you
- * need only to read a video/samples buffer, without to fetch it.
- */
-#define AV_BUFFERSINK_FLAG_PEEK 1
-
-/**
- * Tell av_buffersink_get_buffer_ref() not to request a frame from its input.
- * If a frame is already buffered, it is read (and removed from the buffer),
- * but if no frame is present, return AVERROR(EAGAIN).
- */
-#define AV_BUFFERSINK_FLAG_NO_REQUEST 2
-
-/**
- * Struct to use for initializing a buffersink context.
- */
-typedef struct {
-    const enum AVPixelFormat *pixel_fmts; ///< list of allowed pixel formats, terminated by AV_PIX_FMT_NONE
-} AVBufferSinkParams;
-
-/**
- * Create an AVBufferSinkParams structure.
- *
- * Must be freed with av_free().
- */
-AVBufferSinkParams *av_buffersink_params_alloc(void);
-
-/**
- * Struct to use for initializing an abuffersink context.
- */
-typedef struct {
-    const enum AVSampleFormat *sample_fmts; ///< list of allowed sample formats, terminated by AV_SAMPLE_FMT_NONE
-    const int64_t *channel_layouts;         ///< list of allowed channel layouts, terminated by -1
-    const int *channel_counts;              ///< list of allowed channel counts, terminated by -1
-    int all_channel_counts;                 ///< if not 0, accept any channel count or layout
-    int *sample_rates;                      ///< list of allowed sample rates, terminated by -1
-} AVABufferSinkParams;
-
-/**
- * Create an AVABufferSinkParams structure.
- *
- * Must be freed with av_free().
- */
-AVABufferSinkParams *av_abuffersink_params_alloc(void);
-
-/**
- * Set the frame size for an audio buffer sink.
- *
- * All calls to av_buffersink_get_buffer_ref will return a buffer with
- * exactly the specified number of samples, or AVERROR(EAGAIN) if there is
- * not enough. The last buffer at EOF will be padded with 0.
- */
-void av_buffersink_set_frame_size(AVFilterContext *ctx, unsigned frame_size);
-
-/**
- * Get the frame rate of the input.
- */
-AVRational av_buffersink_get_frame_rate(AVFilterContext *ctx);
-
-/**
- * Get a frame with filtered data from sink and put it in frame.
- *
- * @param ctx pointer to a context of a buffersink or abuffersink AVFilter.
- * @param frame pointer to an allocated frame that will be filled with data.
- *              The data must be freed using av_frame_unref() / av_frame_free()
- *
- * @return
- *         - >= 0 if a frame was successfully returned.
- *         - AVERROR(EAGAIN) if no frames are available at this point; more
- *           input frames must be added to the filtergraph to get more output.
- *         - AVERROR_EOF if there will be no more output frames on this sink.
- *         - A different negative AVERROR code in other failure cases.
- */
-int av_buffersink_get_frame(AVFilterContext *ctx, AVFrame *frame);
-
-/**
- * Same as av_buffersink_get_frame(), but with the ability to specify the number
- * of samples read. This function is less efficient than
- * av_buffersink_get_frame(), because it copies the data around.
- *
- * @param ctx pointer to a context of the abuffersink AVFilter.
- * @param frame pointer to an allocated frame that will be filled with data.
- *              The data must be freed using av_frame_unref() / av_frame_free()
- *              frame will contain exactly nb_samples audio samples, except at
- *              the end of stream, when it can contain less than nb_samples.
- *
- * @return The return codes have the same meaning as for
- *         av_buffersink_get_samples().
- *
- * @warning do not mix this function with av_buffersink_get_frame(). Use only one or
- * the other with a single sink, not both.
- */
-int av_buffersink_get_samples(AVFilterContext *ctx, AVFrame *frame, int nb_samples);
-
-/**
- * @}
- */
-
-#endif /* AVFILTER_BUFFERSINK_H */
diff --git a/extra_lib/include/libavfilter/buffersrc.h b/extra_lib/include/libavfilter/buffersrc.h
deleted file mode 100644
index 5d12433..0000000
--- a/extra_lib/include/libavfilter/buffersrc.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef AVFILTER_BUFFERSRC_H
-#define AVFILTER_BUFFERSRC_H
-
-/**
- * @file
- * @ingroup lavfi_buffersrc
- * Memory buffer source API.
- */
-
-#include "libavcodec/avcodec.h"
-#include "avfilter.h"
-
-/**
- * @defgroup lavfi_buffersrc Buffer source API
- * @ingroup lavfi
- * @{
- */
-
-enum {
-
-    /**
-     * Do not check for format changes.
-     */
-    AV_BUFFERSRC_FLAG_NO_CHECK_FORMAT = 1,
-
-#if FF_API_AVFILTERBUFFER
-    /**
-     * Ignored
-     */
-    AV_BUFFERSRC_FLAG_NO_COPY = 2,
-#endif
-
-    /**
-     * Immediately push the frame to the output.
-     */
-    AV_BUFFERSRC_FLAG_PUSH = 4,
-
-    /**
-     * Keep a reference to the frame.
-     * If the frame if reference-counted, create a new reference; otherwise
-     * copy the frame data.
-     */
-    AV_BUFFERSRC_FLAG_KEEP_REF = 8,
-
-};
-
-/**
- * Add buffer data in picref to buffer_src.
- *
- * @param buffer_src  pointer to a buffer source context
- * @param picref      a buffer reference, or NULL to mark EOF
- * @param flags       a combination of AV_BUFFERSRC_FLAG_*
- * @return            >= 0 in case of success, a negative AVERROR code
- *                    in case of failure
- */
-int av_buffersrc_add_ref(AVFilterContext *buffer_src,
-                         AVFilterBufferRef *picref, int flags);
-
-/**
- * Get the number of failed requests.
- *
- * A failed request is when the request_frame method is called while no
- * frame is present in the buffer.
- * The number is reset when a frame is added.
- */
-unsigned av_buffersrc_get_nb_failed_requests(AVFilterContext *buffer_src);
-
-#if FF_API_AVFILTERBUFFER
-/**
- * Add a buffer to a filtergraph.
- *
- * @param ctx an instance of the buffersrc filter
- * @param buf buffer containing frame data to be passed down the filtergraph.
- * This function will take ownership of buf, the user must not free it.
- * A NULL buf signals EOF -- i.e. no more frames will be sent to this filter.
- *
- * @deprecated use av_buffersrc_write_frame() or av_buffersrc_add_frame()
- */
-attribute_deprecated
-int av_buffersrc_buffer(AVFilterContext *ctx, AVFilterBufferRef *buf);
-#endif
-
-/**
- * Add a frame to the buffer source.
- *
- * @param ctx   an instance of the buffersrc filter
- * @param frame frame to be added. If the frame is reference counted, this
- * function will make a new reference to it. Otherwise the frame data will be
- * copied.
- *
- * @return 0 on success, a negative AVERROR on error
- *
- * This function is equivalent to av_buffersrc_add_frame_flags() with the
- * AV_BUFFERSRC_FLAG_KEEP_REF flag.
- */
-int av_buffersrc_write_frame(AVFilterContext *ctx, const AVFrame *frame);
-
-/**
- * Add a frame to the buffer source.
- *
- * @param ctx   an instance of the buffersrc filter
- * @param frame frame to be added. If the frame is reference counted, this
- * function will take ownership of the reference(s) and reset the frame.
- * Otherwise the frame data will be copied. If this function returns an error,
- * the input frame is not touched.
- *
- * @return 0 on success, a negative AVERROR on error.
- *
- * @note the difference between this function and av_buffersrc_write_frame() is
- * that av_buffersrc_write_frame() creates a new reference to the input frame,
- * while this function takes ownership of the reference passed to it.
- *
- * This function is equivalent to av_buffersrc_add_frame_flags() without the
- * AV_BUFFERSRC_FLAG_KEEP_REF flag.
- */
-int av_buffersrc_add_frame(AVFilterContext *ctx, AVFrame *frame);
-
-/**
- * Add a frame to the buffer source.
- *
- * By default, if the frame is reference-counted, this function will take
- * ownership of the reference(s) and reset the frame. This can be controled
- * using the flags.
- *
- * If this function returns an error, the input frame is not touched.
- *
- * @param buffer_src  pointer to a buffer source context
- * @param frame       a frame, or NULL to mark EOF
- * @param flags       a combination of AV_BUFFERSRC_FLAG_*
- * @return            >= 0 in case of success, a negative AVERROR code
- *                    in case of failure
- */
-int av_buffersrc_add_frame_flags(AVFilterContext *buffer_src,
-                                 AVFrame *frame, int flags);
-
-
-/**
- * @}
- */
-
-#endif /* AVFILTER_BUFFERSRC_H */
diff --git a/extra_lib/include/libavfilter/version.h b/extra_lib/include/libavfilter/version.h
deleted file mode 100644
index a33ab49..0000000
--- a/extra_lib/include/libavfilter/version.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Version macros.
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef AVFILTER_VERSION_H
-#define AVFILTER_VERSION_H
-
-/**
- * @file
- * @ingroup lavfi
- * Libavfilter version macros
- */
-
-#include "libavutil/version.h"
-
-#define LIBAVFILTER_VERSION_MAJOR   4
-#define LIBAVFILTER_VERSION_MINOR   2
-#define LIBAVFILTER_VERSION_MICRO 100
-
-#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
-                                               LIBAVFILTER_VERSION_MINOR, \
-                                               LIBAVFILTER_VERSION_MICRO)
-#define LIBAVFILTER_VERSION     AV_VERSION(LIBAVFILTER_VERSION_MAJOR,   \
-                                           LIBAVFILTER_VERSION_MINOR,   \
-                                           LIBAVFILTER_VERSION_MICRO)
-#define LIBAVFILTER_BUILD       LIBAVFILTER_VERSION_INT
-
-#define LIBAVFILTER_IDENT       "Lavfi" AV_STRINGIFY(LIBAVFILTER_VERSION)
-
-/**
- * FF_API_* defines may be placed below to indicate public API that will be
- * dropped at a future version bump. The defines themselves are not part of
- * the public API and may change, break or disappear at any time.
- */
-
-#ifndef FF_API_AVFILTERPAD_PUBLIC
-#define FF_API_AVFILTERPAD_PUBLIC           (LIBAVFILTER_VERSION_MAJOR < 5)
-#endif
-#ifndef FF_API_FOO_COUNT
-#define FF_API_FOO_COUNT                    (LIBAVFILTER_VERSION_MAJOR < 5)
-#endif
-#ifndef FF_API_FILL_FRAME
-#define FF_API_FILL_FRAME                   (LIBAVFILTER_VERSION_MAJOR < 5)
-#endif
-#ifndef FF_API_BUFFERSRC_BUFFER
-#define FF_API_BUFFERSRC_BUFFER             (LIBAVFILTER_VERSION_MAJOR < 5)
-#endif
-#ifndef FF_API_AVFILTERBUFFER
-#define FF_API_AVFILTERBUFFER               (LIBAVFILTER_VERSION_MAJOR < 5)
-#endif
-#ifndef FF_API_OLD_FILTER_OPTS
-#define FF_API_OLD_FILTER_OPTS              (LIBAVFILTER_VERSION_MAJOR < 5)
-#endif
-#ifndef FF_API_ACONVERT_FILTER
-#define FF_API_ACONVERT_FILTER              (LIBAVFILTER_VERSION_MAJOR < 5)
-#endif
-#ifndef FF_API_AVFILTER_OPEN
-#define FF_API_AVFILTER_OPEN                (LIBAVFILTER_VERSION_MAJOR < 5)
-#endif
-#ifndef FF_API_AVFILTER_INIT_FILTER
-#define FF_API_AVFILTER_INIT_FILTER         (LIBAVFILTER_VERSION_MAJOR < 5)
-#endif
-#ifndef FF_API_OLD_FILTER_REGISTER
-#define FF_API_OLD_FILTER_REGISTER          (LIBAVFILTER_VERSION_MAJOR < 5)
-#endif
-#ifndef FF_API_OLD_GRAPH_PARSE
-#define FF_API_OLD_GRAPH_PARSE              (LIBAVFILTER_VERSION_MAJOR < 5)
-#endif
-#ifndef FF_API_DRAWTEXT_OLD_TIMELINE
-#define FF_API_DRAWTEXT_OLD_TIMELINE        (LIBAVFILTER_VERSION_MAJOR < 5)
-#endif
-#ifndef FF_API_NOCONST_GET_NAME
-#define FF_API_NOCONST_GET_NAME             (LIBAVFILTER_VERSION_MAJOR < 5)
-#endif
-#ifndef FF_API_INTERLACE_LOWPASS_SET
-#define FF_API_INTERLACE_LOWPASS_SET        (LIBAVFILTER_VERSION_MAJOR < 5)
-#endif
-
-#endif /* AVFILTER_VERSION_H */
diff --git a/extra_lib/include/libavresample/avresample.h b/extra_lib/include/libavresample/avresample.h
deleted file mode 100644
index dc392ad..0000000
--- a/extra_lib/include/libavresample/avresample.h
+++ /dev/null
@@ -1,417 +0,0 @@
-/*
- * Copyright (c) 2012 Justin Ruggles <justin.ruggles at gmail.com>
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef AVRESAMPLE_AVRESAMPLE_H
-#define AVRESAMPLE_AVRESAMPLE_H
-
-/**
- * @file
- * @ingroup lavr
- * external API header
- */
-
-/**
- * @defgroup lavr Libavresample
- * @{
- *
- * Libavresample (lavr) is a library that handles audio resampling, sample
- * format conversion and mixing.
- *
- * Interaction with lavr is done through AVAudioResampleContext, which is
- * allocated with avresample_alloc_context(). It is opaque, so all parameters
- * must be set with the @ref avoptions API.
- *
- * For example the following code will setup conversion from planar float sample
- * format to interleaved signed 16-bit integer, downsampling from 48kHz to
- * 44.1kHz and downmixing from 5.1 channels to stereo (using the default mixing
- * matrix):
- * @code
- * AVAudioResampleContext *avr = avresample_alloc_context();
- * av_opt_set_int(avr, "in_channel_layout",  AV_CH_LAYOUT_5POINT1, 0);
- * av_opt_set_int(avr, "out_channel_layout", AV_CH_LAYOUT_STEREO,  0);
- * av_opt_set_int(avr, "in_sample_rate",     48000,                0);
- * av_opt_set_int(avr, "out_sample_rate",    44100,                0);
- * av_opt_set_int(avr, "in_sample_fmt",      AV_SAMPLE_FMT_FLTP,   0);
- * av_opt_set_int(avr, "out_sample_fmt",     AV_SAMPLE_FMT_S16,    0);
- * @endcode
- *
- * Once the context is initialized, it must be opened with avresample_open(). If
- * you need to change the conversion parameters, you must close the context with
- * avresample_close(), change the parameters as described above, then reopen it
- * again.
- *
- * The conversion itself is done by repeatedly calling avresample_convert().
- * Note that the samples may get buffered in two places in lavr. The first one
- * is the output FIFO, where the samples end up if the output buffer is not
- * large enough. The data stored in there may be retrieved at any time with
- * avresample_read(). The second place is the resampling delay buffer,
- * applicable only when resampling is done. The samples in it require more input
- * before they can be processed. Their current amount is returned by
- * avresample_get_delay(). At the end of conversion the resampling buffer can be
- * flushed by calling avresample_convert() with NULL input.
- *
- * The following code demonstrates the conversion loop assuming the parameters
- * from above and caller-defined functions get_input() and handle_output():
- * @code
- * uint8_t **input;
- * int in_linesize, in_samples;
- *
- * while (get_input(&input, &in_linesize, &in_samples)) {
- *     uint8_t *output
- *     int out_linesize;
- *     int out_samples = avresample_available(avr) +
- *                       av_rescale_rnd(avresample_get_delay(avr) +
- *                                      in_samples, 44100, 48000, AV_ROUND_UP);
- *     av_samples_alloc(&output, &out_linesize, 2, out_samples,
- *                      AV_SAMPLE_FMT_S16, 0);
- *     out_samples = avresample_convert(avr, &output, out_linesize, out_samples,
- *                                      input, in_linesize, in_samples);
- *     handle_output(output, out_linesize, out_samples);
- *     av_freep(&output);
- *  }
- *  @endcode
- *
- *  When the conversion is finished and the FIFOs are flushed if required, the
- *  conversion context and everything associated with it must be freed with
- *  avresample_free().
- */
-
-#include "libavutil/avutil.h"
-#include "libavutil/channel_layout.h"
-#include "libavutil/dict.h"
-#include "libavutil/log.h"
-
-#include "libavresample/version.h"
-
-#define AVRESAMPLE_MAX_CHANNELS 32
-
-typedef struct AVAudioResampleContext AVAudioResampleContext;
-
-/** Mixing Coefficient Types */
-enum AVMixCoeffType {
-    AV_MIX_COEFF_TYPE_Q8,   /** 16-bit 8.8 fixed-point                      */
-    AV_MIX_COEFF_TYPE_Q15,  /** 32-bit 17.15 fixed-point                    */
-    AV_MIX_COEFF_TYPE_FLT,  /** floating-point                              */
-    AV_MIX_COEFF_TYPE_NB,   /** Number of coeff types. Not part of ABI      */
-};
-
-/** Resampling Filter Types */
-enum AVResampleFilterType {
-    AV_RESAMPLE_FILTER_TYPE_CUBIC,              /**< Cubic */
-    AV_RESAMPLE_FILTER_TYPE_BLACKMAN_NUTTALL,   /**< Blackman Nuttall Windowed Sinc */
-    AV_RESAMPLE_FILTER_TYPE_KAISER,             /**< Kaiser Windowed Sinc */
-};
-
-enum AVResampleDitherMethod {
-    AV_RESAMPLE_DITHER_NONE,            /**< Do not use dithering */
-    AV_RESAMPLE_DITHER_RECTANGULAR,     /**< Rectangular Dither */
-    AV_RESAMPLE_DITHER_TRIANGULAR,      /**< Triangular Dither*/
-    AV_RESAMPLE_DITHER_TRIANGULAR_HP,   /**< Triangular Dither with High Pass */
-    AV_RESAMPLE_DITHER_TRIANGULAR_NS,   /**< Triangular Dither with Noise Shaping */
-    AV_RESAMPLE_DITHER_NB,              /**< Number of dither types. Not part of ABI. */
-};
-
-/**
- * Return the LIBAVRESAMPLE_VERSION_INT constant.
- */
-unsigned avresample_version(void);
-
-/**
- * Return the libavresample build-time configuration.
- * @return  configure string
- */
-const char *avresample_configuration(void);
-
-/**
- * Return the libavresample license.
- */
-const char *avresample_license(void);
-
-/**
- * Get the AVClass for AVAudioResampleContext.
- *
- * Can be used in combination with AV_OPT_SEARCH_FAKE_OBJ for examining options
- * without allocating a context.
- *
- * @see av_opt_find().
- *
- * @return AVClass for AVAudioResampleContext
- */
-const AVClass *avresample_get_class(void);
-
-/**
- * Allocate AVAudioResampleContext and set options.
- *
- * @return  allocated audio resample context, or NULL on failure
- */
-AVAudioResampleContext *avresample_alloc_context(void);
-
-/**
- * Initialize AVAudioResampleContext.
- *
- * @param avr  audio resample context
- * @return     0 on success, negative AVERROR code on failure
- */
-int avresample_open(AVAudioResampleContext *avr);
-
-/**
- * Check whether an AVAudioResampleContext is open or closed.
- *
- * @param avr AVAudioResampleContext to check
- * @return 1 if avr is open, 0 if avr is closed.
- */
-int avresample_is_open(AVAudioResampleContext *avr);
-
-/**
- * Close AVAudioResampleContext.
- *
- * This closes the context, but it does not change the parameters. The context
- * can be reopened with avresample_open(). It does, however, clear the output
- * FIFO and any remaining leftover samples in the resampling delay buffer. If
- * there was a custom matrix being used, that is also cleared.
- *
- * @see avresample_convert()
- * @see avresample_set_matrix()
- *
- * @param avr  audio resample context
- */
-void avresample_close(AVAudioResampleContext *avr);
-
-/**
- * Free AVAudioResampleContext and associated AVOption values.
- *
- * This also calls avresample_close() before freeing.
- *
- * @param avr  audio resample context
- */
-void avresample_free(AVAudioResampleContext **avr);
-
-/**
- * Generate a channel mixing matrix.
- *
- * This function is the one used internally by libavresample for building the
- * default mixing matrix. It is made public just as a utility function for
- * building custom matrices.
- *
- * @param in_layout           input channel layout
- * @param out_layout          output channel layout
- * @param center_mix_level    mix level for the center channel
- * @param surround_mix_level  mix level for the surround channel(s)
- * @param lfe_mix_level       mix level for the low-frequency effects channel
- * @param normalize           if 1, coefficients will be normalized to prevent
- *                            overflow. if 0, coefficients will not be
- *                            normalized.
- * @param[out] matrix         mixing coefficients; matrix[i + stride * o] is
- *                            the weight of input channel i in output channel o.
- * @param stride              distance between adjacent input channels in the
- *                            matrix array
- * @param matrix_encoding     matrixed stereo downmix mode (e.g. dplii)
- * @return                    0 on success, negative AVERROR code on failure
- */
-int avresample_build_matrix(uint64_t in_layout, uint64_t out_layout,
-                            double center_mix_level, double surround_mix_level,
-                            double lfe_mix_level, int normalize, double *matrix,
-                            int stride, enum AVMatrixEncoding matrix_encoding);
-
-/**
- * Get the current channel mixing matrix.
- *
- * If no custom matrix has been previously set or the AVAudioResampleContext is
- * not open, an error is returned.
- *
- * @param avr     audio resample context
- * @param matrix  mixing coefficients; matrix[i + stride * o] is the weight of
- *                input channel i in output channel o.
- * @param stride  distance between adjacent input channels in the matrix array
- * @return        0 on success, negative AVERROR code on failure
- */
-int avresample_get_matrix(AVAudioResampleContext *avr, double *matrix,
-                          int stride);
-
-/**
- * Set channel mixing matrix.
- *
- * Allows for setting a custom mixing matrix, overriding the default matrix
- * generated internally during avresample_open(). This function can be called
- * anytime on an allocated context, either before or after calling
- * avresample_open(), as long as the channel layouts have been set.
- * avresample_convert() always uses the current matrix.
- * Calling avresample_close() on the context will clear the current matrix.
- *
- * @see avresample_close()
- *
- * @param avr     audio resample context
- * @param matrix  mixing coefficients; matrix[i + stride * o] is the weight of
- *                input channel i in output channel o.
- * @param stride  distance between adjacent input channels in the matrix array
- * @return        0 on success, negative AVERROR code on failure
- */
-int avresample_set_matrix(AVAudioResampleContext *avr, const double *matrix,
-                          int stride);
-
-/**
- * Set a customized input channel mapping.
- *
- * This function can only be called when the allocated context is not open.
- * Also, the input channel layout must have already been set.
- *
- * Calling avresample_close() on the context will clear the channel mapping.
- *
- * The map for each input channel specifies the channel index in the source to
- * use for that particular channel, or -1 to mute the channel. Source channels
- * can be duplicated by using the same index for multiple input channels.
- *
- * Examples:
- *
- * Reordering 5.1 AAC order (C,L,R,Ls,Rs,LFE) to FFmpeg order (L,R,C,LFE,Ls,Rs):
- * { 1, 2, 0, 5, 3, 4 }
- *
- * Muting the 3rd channel in 4-channel input:
- * { 0, 1, -1, 3 }
- *
- * Duplicating the left channel of stereo input:
- * { 0, 0 }
- *
- * @param avr         audio resample context
- * @param channel_map customized input channel mapping
- * @return            0 on success, negative AVERROR code on failure
- */
-int avresample_set_channel_mapping(AVAudioResampleContext *avr,
-                                   const int *channel_map);
-
-/**
- * Set compensation for resampling.
- *
- * This can be called anytime after avresample_open(). If resampling is not
- * automatically enabled because of a sample rate conversion, the
- * "force_resampling" option must have been set to 1 when opening the context
- * in order to use resampling compensation.
- *
- * @param avr                    audio resample context
- * @param sample_delta           compensation delta, in samples
- * @param compensation_distance  compensation distance, in samples
- * @return                       0 on success, negative AVERROR code on failure
- */
-int avresample_set_compensation(AVAudioResampleContext *avr, int sample_delta,
-                                int compensation_distance);
-
-/**
- * Convert input samples and write them to the output FIFO.
- *
- * The upper bound on the number of output samples is given by
- * avresample_available() + (avresample_get_delay() + number of input samples) *
- * output sample rate / input sample rate.
- *
- * The output data can be NULL or have fewer allocated samples than required.
- * In this case, any remaining samples not written to the output will be added
- * to an internal FIFO buffer, to be returned at the next call to this function
- * or to avresample_read().
- *
- * If converting sample rate, there may be data remaining in the internal
- * resampling delay buffer. avresample_get_delay() tells the number of remaining
- * samples. To get this data as output, call avresample_convert() with NULL
- * input.
- *
- * At the end of the conversion process, there may be data remaining in the
- * internal FIFO buffer. avresample_available() tells the number of remaining
- * samples. To get this data as output, either call avresample_convert() with
- * NULL input or call avresample_read().
- *
- * @see avresample_available()
- * @see avresample_read()
- * @see avresample_get_delay()
- *
- * @param avr             audio resample context
- * @param output          output data pointers
- * @param out_plane_size  output plane size, in bytes.
- *                        This can be 0 if unknown, but that will lead to
- *                        optimized functions not being used directly on the
- *                        output, which could slow down some conversions.
- * @param out_samples     maximum number of samples that the output buffer can hold
- * @param input           input data pointers
- * @param in_plane_size   input plane size, in bytes
- *                        This can be 0 if unknown, but that will lead to
- *                        optimized functions not being used directly on the
- *                        input, which could slow down some conversions.
- * @param in_samples      number of input samples to convert
- * @return                number of samples written to the output buffer,
- *                        not including converted samples added to the internal
- *                        output FIFO
- */
-int avresample_convert(AVAudioResampleContext *avr, uint8_t **output,
-                       int out_plane_size, int out_samples, uint8_t **input,
-                       int in_plane_size, int in_samples);
-
-/**
- * Return the number of samples currently in the resampling delay buffer.
- *
- * When resampling, there may be a delay between the input and output. Any
- * unconverted samples in each call are stored internally in a delay buffer.
- * This function allows the user to determine the current number of samples in
- * the delay buffer, which can be useful for synchronization.
- *
- * @see avresample_convert()
- *
- * @param avr  audio resample context
- * @return     number of samples currently in the resampling delay buffer
- */
-int avresample_get_delay(AVAudioResampleContext *avr);
-
-/**
- * Return the number of available samples in the output FIFO.
- *
- * During conversion, if the user does not specify an output buffer or
- * specifies an output buffer that is smaller than what is needed, remaining
- * samples that are not written to the output are stored to an internal FIFO
- * buffer. The samples in the FIFO can be read with avresample_read() or
- * avresample_convert().
- *
- * @see avresample_read()
- * @see avresample_convert()
- *
- * @param avr  audio resample context
- * @return     number of samples available for reading
- */
-int avresample_available(AVAudioResampleContext *avr);
-
-/**
- * Read samples from the output FIFO.
- *
- * During conversion, if the user does not specify an output buffer or
- * specifies an output buffer that is smaller than what is needed, remaining
- * samples that are not written to the output are stored to an internal FIFO
- * buffer. This function can be used to read samples from that internal FIFO.
- *
- * @see avresample_available()
- * @see avresample_convert()
- *
- * @param avr         audio resample context
- * @param output      output data pointers. May be NULL, in which case
- *                    nb_samples of data is discarded from output FIFO.
- * @param nb_samples  number of samples to read from the FIFO
- * @return            the number of samples written to output
- */
-int avresample_read(AVAudioResampleContext *avr, uint8_t **output, int nb_samples);
-
-/**
- * @}
- */
-
-#endif /* AVRESAMPLE_AVRESAMPLE_H */
diff --git a/extra_lib/include/libavresample/version.h b/extra_lib/include/libavresample/version.h
deleted file mode 100644
index d865ad2..0000000
--- a/extra_lib/include/libavresample/version.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef AVRESAMPLE_VERSION_H
-#define AVRESAMPLE_VERSION_H
-
-/**
- * @file
- * @ingroup lavr
- * Libavresample version macros.
- */
-
-#include "libavutil/version.h"
-
-#define LIBAVRESAMPLE_VERSION_MAJOR  1
-#define LIBAVRESAMPLE_VERSION_MINOR  2
-#define LIBAVRESAMPLE_VERSION_MICRO  0
-
-#define LIBAVRESAMPLE_VERSION_INT  AV_VERSION_INT(LIBAVRESAMPLE_VERSION_MAJOR, \
-                                                  LIBAVRESAMPLE_VERSION_MINOR, \
-                                                  LIBAVRESAMPLE_VERSION_MICRO)
-#define LIBAVRESAMPLE_VERSION          AV_VERSION(LIBAVRESAMPLE_VERSION_MAJOR, \
-                                                  LIBAVRESAMPLE_VERSION_MINOR, \
-                                                  LIBAVRESAMPLE_VERSION_MICRO)
-#define LIBAVRESAMPLE_BUILD        LIBAVRESAMPLE_VERSION_INT
-
-#define LIBAVRESAMPLE_IDENT        "Lavr" AV_STRINGIFY(LIBAVRESAMPLE_VERSION)
-
-/**
- * FF_API_* defines may be placed below to indicate public API that will be
- * dropped at a future version bump. The defines themselves are not part of
- * the public API and may change, break or disappear at any time.
- */
-
-#ifndef FF_API_RESAMPLE_CLOSE_OPEN
-#define FF_API_RESAMPLE_CLOSE_OPEN (LIBAVRESAMPLE_VERSION_MAJOR < 2)
-#endif
-
-#endif /* AVRESAMPLE_VERSION_H */
diff --git a/extra_lib/include/libswresample/swresample.h b/extra_lib/include/libswresample/swresample.h
deleted file mode 100644
index 4ba008e..0000000
--- a/extra_lib/include/libswresample/swresample.h
+++ /dev/null
@@ -1,318 +0,0 @@
-/*
- * Copyright (C) 2011-2013 Michael Niedermayer (michaelni at gmx.at)
- *
- * This file is part of libswresample
- *
- * libswresample is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * libswresample 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with libswresample; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef SWRESAMPLE_SWRESAMPLE_H
-#define SWRESAMPLE_SWRESAMPLE_H
-
-/**
- * @file
- * @ingroup lswr
- * libswresample public header
- */
-
-/**
- * @defgroup lswr Libswresample
- * @{
- *
- * Libswresample (lswr) is a library that handles audio resampling, sample
- * format conversion and mixing.
- *
- * Interaction with lswr is done through SwrContext, which is
- * allocated with swr_alloc() or swr_alloc_set_opts(). It is opaque, so all parameters
- * must be set with the @ref avoptions API.
- *
- * For example the following code will setup conversion from planar float sample
- * format to interleaved signed 16-bit integer, downsampling from 48kHz to
- * 44.1kHz and downmixing from 5.1 channels to stereo (using the default mixing
- * matrix):
- * @code
- * SwrContext *swr = swr_alloc();
- * av_opt_set_channel_layout(swr, "in_channel_layout",  AV_CH_LAYOUT_5POINT1, 0);
- * av_opt_set_channel_layout(swr, "out_channel_layout", AV_CH_LAYOUT_STEREO,  0);
- * av_opt_set_int(swr, "in_sample_rate",     48000,                0);
- * av_opt_set_int(swr, "out_sample_rate",    44100,                0);
- * av_opt_set_sample_fmt(swr, "in_sample_fmt",  AV_SAMPLE_FMT_FLTP, 0);
- * av_opt_set_sample_fmt(swr, "out_sample_fmt", AV_SAMPLE_FMT_S16,  0);
- * @endcode
- *
- * Once all values have been set, it must be initialized with swr_init(). If
- * you need to change the conversion parameters, you can change the parameters
- * as described above, or by using swr_alloc_set_opts(), then call swr_init()
- * again.
- *
- * The conversion itself is done by repeatedly calling swr_convert().
- * Note that the samples may get buffered in swr if you provide insufficient
- * output space or if sample rate conversion is done, which requires "future"
- * samples. Samples that do not require future input can be retrieved at any
- * time by using swr_convert() (in_count can be set to 0).
- * At the end of conversion the resampling buffer can be flushed by calling
- * swr_convert() with NULL in and 0 in_count.
- *
- * The delay between input and output, can at any time be found by using
- * swr_get_delay().
- *
- * The following code demonstrates the conversion loop assuming the parameters
- * from above and caller-defined functions get_input() and handle_output():
- * @code
- * uint8_t **input;
- * int in_samples;
- *
- * while (get_input(&input, &in_samples)) {
- *     uint8_t *output;
- *     int out_samples = av_rescale_rnd(swr_get_delay(swr, 48000) +
- *                                      in_samples, 44100, 48000, AV_ROUND_UP);
- *     av_samples_alloc(&output, NULL, 2, out_samples,
- *                      AV_SAMPLE_FMT_S16, 0);
- *     out_samples = swr_convert(swr, &output, out_samples,
- *                                      input, in_samples);
- *     handle_output(output, out_samples);
- *     av_freep(&output);
- * }
- * @endcode
- *
- * When the conversion is finished, the conversion
- * context and everything associated with it must be freed with swr_free().
- * There will be no memory leak if the data is not completely flushed before
- * swr_free().
- */
-
-#include <stdint.h>
-#include "libavutil/samplefmt.h"
-
-#include "libswresample/version.h"
-
-#if LIBSWRESAMPLE_VERSION_MAJOR < 1
-#define SWR_CH_MAX 32   ///< Maximum number of channels
-#endif
-
-#define SWR_FLAG_RESAMPLE 1 ///< Force resampling even if equal sample rate
-//TODO use int resample ?
-//long term TODO can we enable this dynamically?
-
-enum SwrDitherType {
-    SWR_DITHER_NONE = 0,
-    SWR_DITHER_RECTANGULAR,
-    SWR_DITHER_TRIANGULAR,
-    SWR_DITHER_TRIANGULAR_HIGHPASS,
-
-    SWR_DITHER_NS = 64,         ///< not part of API/ABI
-    SWR_DITHER_NS_LIPSHITZ,
-    SWR_DITHER_NS_F_WEIGHTED,
-    SWR_DITHER_NS_MODIFIED_E_WEIGHTED,
-    SWR_DITHER_NS_IMPROVED_E_WEIGHTED,
-    SWR_DITHER_NS_SHIBATA,
-    SWR_DITHER_NS_LOW_SHIBATA,
-    SWR_DITHER_NS_HIGH_SHIBATA,
-    SWR_DITHER_NB,              ///< not part of API/ABI
-};
-
-/** Resampling Engines */
-enum SwrEngine {
-    SWR_ENGINE_SWR,             /**< SW Resampler */
-    SWR_ENGINE_SOXR,            /**< SoX Resampler */
-    SWR_ENGINE_NB,              ///< not part of API/ABI
-};
-
-/** Resampling Filter Types */
-enum SwrFilterType {
-    SWR_FILTER_TYPE_CUBIC,              /**< Cubic */
-    SWR_FILTER_TYPE_BLACKMAN_NUTTALL,   /**< Blackman Nuttall Windowed Sinc */
-    SWR_FILTER_TYPE_KAISER,             /**< Kaiser Windowed Sinc */
-};
-
-typedef struct SwrContext SwrContext;
-
-/**
- * Get the AVClass for swrContext. It can be used in combination with
- * AV_OPT_SEARCH_FAKE_OBJ for examining options.
- *
- * @see av_opt_find().
- */
-const AVClass *swr_get_class(void);
-
-/**
- * Allocate SwrContext.
- *
- * If you use this function you will need to set the parameters (manually or
- * with swr_alloc_set_opts()) before calling swr_init().
- *
- * @see swr_alloc_set_opts(), swr_init(), swr_free()
- * @return NULL on error, allocated context otherwise
- */
-struct SwrContext *swr_alloc(void);
-
-/**
- * Initialize context after user parameters have been set.
- *
- * @return AVERROR error code in case of failure.
- */
-int swr_init(struct SwrContext *s);
-
-/**
- * Check whether an swr context has been initialized or not.
- *
- * @return positive if it has been initialized, 0 if not initialized
- */
-int swr_is_initialized(struct SwrContext *s);
-
-/**
- * Allocate SwrContext if needed and set/reset common parameters.
- *
- * This function does not require s to be allocated with swr_alloc(). On the
- * other hand, swr_alloc() can use swr_alloc_set_opts() to set the parameters
- * on the allocated context.
- *
- * @param s               Swr context, can be NULL
- * @param out_ch_layout   output channel layout (AV_CH_LAYOUT_*)
- * @param out_sample_fmt  output sample format (AV_SAMPLE_FMT_*).
- * @param out_sample_rate output sample rate (frequency in Hz)
- * @param in_ch_layout    input channel layout (AV_CH_LAYOUT_*)
- * @param in_sample_fmt   input sample format (AV_SAMPLE_FMT_*).
- * @param in_sample_rate  input sample rate (frequency in Hz)
- * @param log_offset      logging level offset
- * @param log_ctx         parent logging context, can be NULL
- *
- * @see swr_init(), swr_free()
- * @return NULL on error, allocated context otherwise
- */
-struct SwrContext *swr_alloc_set_opts(struct SwrContext *s,
-                                      int64_t out_ch_layout, enum AVSampleFormat out_sample_fmt, int out_sample_rate,
-                                      int64_t  in_ch_layout, enum AVSampleFormat  in_sample_fmt, int  in_sample_rate,
-                                      int log_offset, void *log_ctx);
-
-/**
- * Free the given SwrContext and set the pointer to NULL.
- */
-void swr_free(struct SwrContext **s);
-
-/**
- * Convert audio.
- *
- * in and in_count can be set to 0 to flush the last few samples out at the
- * end.
- *
- * If more input is provided than output space then the input will be buffered.
- * You can avoid this buffering by providing more output space than input.
- * Convertion will run directly without copying whenever possible.
- *
- * @param s         allocated Swr context, with parameters set
- * @param out       output buffers, only the first one need be set in case of packed audio
- * @param out_count amount of space available for output in samples per channel
- * @param in        input buffers, only the first one need to be set in case of packed audio
- * @param in_count  number of input samples available in one channel
- *
- * @return number of samples output per channel, negative value on error
- */
-int swr_convert(struct SwrContext *s, uint8_t **out, int out_count,
-                                const uint8_t **in , int in_count);
-
-/**
- * Convert the next timestamp from input to output
- * timestamps are in 1/(in_sample_rate * out_sample_rate) units.
- *
- * @note There are 2 slightly differently behaving modes.
- *       First is when automatic timestamp compensation is not used, (min_compensation >= FLT_MAX)
- *              in this case timestamps will be passed through with delays compensated
- *       Second is when automatic timestamp compensation is used, (min_compensation < FLT_MAX)
- *              in this case the output timestamps will match output sample numbers
- *
- * @param pts   timestamp for the next input sample, INT64_MIN if unknown
- * @return the output timestamp for the next output sample
- */
-int64_t swr_next_pts(struct SwrContext *s, int64_t pts);
-
-/**
- * Activate resampling compensation.
- */
-int swr_set_compensation(struct SwrContext *s, int sample_delta, int compensation_distance);
-
-/**
- * Set a customized input channel mapping.
- *
- * @param s           allocated Swr context, not yet initialized
- * @param channel_map customized input channel mapping (array of channel
- *                    indexes, -1 for a muted channel)
- * @return AVERROR error code in case of failure.
- */
-int swr_set_channel_mapping(struct SwrContext *s, const int *channel_map);
-
-/**
- * Set a customized remix matrix.
- *
- * @param s       allocated Swr context, not yet initialized
- * @param matrix  remix coefficients; matrix[i + stride * o] is
- *                the weight of input channel i in output channel o
- * @param stride  offset between lines of the matrix
- * @return  AVERROR error code in case of failure.
- */
-int swr_set_matrix(struct SwrContext *s, const double *matrix, int stride);
-
-/**
- * Drops the specified number of output samples.
- */
-int swr_drop_output(struct SwrContext *s, int count);
-
-/**
- * Injects the specified number of silence samples.
- */
-int swr_inject_silence(struct SwrContext *s, int count);
-
-/**
- * Gets the delay the next input sample will experience relative to the next output sample.
- *
- * Swresample can buffer data if more input has been provided than available
- * output space, also converting between sample rates needs a delay.
- * This function returns the sum of all such delays.
- * The exact delay is not necessarily an integer value in either input or
- * output sample rate. Especially when downsampling by a large value, the
- * output sample rate may be a poor choice to represent the delay, similarly
- * for upsampling and the input sample rate.
- *
- * @param s     swr context
- * @param base  timebase in which the returned delay will be
- *              if its set to 1 the returned delay is in seconds
- *              if its set to 1000 the returned delay is in milli seconds
- *              if its set to the input sample rate then the returned delay is in input samples
- *              if its set to the output sample rate then the returned delay is in output samples
- *              an exact rounding free delay can be found by using LCM(in_sample_rate, out_sample_rate)
- * @returns     the delay in 1/base units.
- */
-int64_t swr_get_delay(struct SwrContext *s, int64_t base);
-
-/**
- * Return the LIBSWRESAMPLE_VERSION_INT constant.
- */
-unsigned swresample_version(void);
-
-/**
- * Return the swr build-time configuration.
- */
-const char *swresample_configuration(void);
-
-/**
- * Return the swr license.
- */
-const char *swresample_license(void);
-
-/**
- * @}
- */
-
-#endif /* SWRESAMPLE_SWRESAMPLE_H */
diff --git a/extra_lib/include/libswresample/version.h b/extra_lib/include/libswresample/version.h
deleted file mode 100644
index 3a92875..0000000
--- a/extra_lib/include/libswresample/version.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Version macros.
- *
- * This file is part of libswresample
- *
- * libswresample is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * libswresample 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with libswresample; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef SWR_VERSION_H
-#define SWR_VERSION_H
-
-/**
- * @file
- * Libswresample version macros
- */
-
-#include "libavutil/avutil.h"
-
-#define LIBSWRESAMPLE_VERSION_MAJOR 0
-#define LIBSWRESAMPLE_VERSION_MINOR 18
-#define LIBSWRESAMPLE_VERSION_MICRO 100
-
-#define LIBSWRESAMPLE_VERSION_INT  AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \
-                                                  LIBSWRESAMPLE_VERSION_MINOR, \
-                                                  LIBSWRESAMPLE_VERSION_MICRO)
-#define LIBSWRESAMPLE_VERSION      AV_VERSION(LIBSWRESAMPLE_VERSION_MAJOR, \
-                                              LIBSWRESAMPLE_VERSION_MINOR, \
-                                              LIBSWRESAMPLE_VERSION_MICRO)
-#define LIBSWRESAMPLE_BUILD        LIBSWRESAMPLE_VERSION_INT
-
-#define LIBSWRESAMPLE_IDENT        "SwR" AV_STRINGIFY(LIBSWRESAMPLE_VERSION)
-
-#endif /* SWR_VERSION_H */
diff --git a/extra_lib/include/mad.h b/extra_lib/include/mad.h
deleted file mode 100644
index 955827d..0000000
--- a/extra_lib/include/mad.h
+++ /dev/null
@@ -1,952 +0,0 @@
-/*
- * libmad - MPEG audio decoder library
- * Copyright (C) 2000-2004 Underbit Technologies, Inc.
- *
- * 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.
- *
- * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * If you would like to negotiate alternate licensing terms, you may do
- * so by contacting: Underbit Technologies, Inc. <info at underbit.com>
- */
-
-# ifdef __cplusplus
-extern "C" {
-# endif
-
-#ifndef _WIN32_WCE
-# define FPM_INTEL
-#else
-# define FPM_DEFAULT
-#endif
-
-
-
-# define SIZEOF_INT 4
-# define SIZEOF_LONG 4
-# define SIZEOF_LONG_LONG 8
-
-
-/* Id: version.h,v 1.24 2003/05/27 22:40:37 rob Exp */
-
-# ifndef LIBMAD_VERSION_H
-# define LIBMAD_VERSION_H
-
-# define MAD_VERSION_MAJOR	0
-# define MAD_VERSION_MINOR	15
-# define MAD_VERSION_PATCH	1
-# define MAD_VERSION_EXTRA	" (beta)"
-
-# define MAD_VERSION_STRINGIZE(str)	#str
-# define MAD_VERSION_STRING(num)	MAD_VERSION_STRINGIZE(num)
-
-# define MAD_VERSION		MAD_VERSION_STRING(MAD_VERSION_MAJOR) "."  \
-				MAD_VERSION_STRING(MAD_VERSION_MINOR) "."  \
-				MAD_VERSION_STRING(MAD_VERSION_PATCH)  \
-				MAD_VERSION_EXTRA
-
-# define MAD_PUBLISHYEAR	"2000-2003"
-# define MAD_AUTHOR		"Underbit Technologies, Inc."
-# define MAD_EMAIL		"info at underbit.com"
-
-extern char const mad_version[];
-extern char const mad_copyright[];
-extern char const mad_author[];
-extern char const mad_build[];
-
-# endif
-
-/* Id: fixed.h,v 1.36 2003/05/28 04:36:00 rob Exp */
-
-# ifndef LIBMAD_FIXED_H
-# define LIBMAD_FIXED_H
-
-# if SIZEOF_INT >= 4
-typedef   signed int mad_fixed_t;
-
-typedef   signed int mad_fixed64hi_t;
-typedef unsigned int mad_fixed64lo_t;
-# else
-typedef   signed long mad_fixed_t;
-
-typedef   signed long mad_fixed64hi_t;
-typedef unsigned long mad_fixed64lo_t;
-# endif
-
-# if defined(_MSC_VER)
-#  define mad_fixed64_t  signed __int64
-# elif 1 || defined(__GNUC__)
-#  define mad_fixed64_t  signed long long
-# endif
-
-# if defined(FPM_FLOAT)
-typedef double mad_sample_t;
-# else
-typedef mad_fixed_t mad_sample_t;
-# endif
-
-/*
- * Fixed-point format: 0xABBBBBBB
- * A == whole part      (sign + 3 bits)
- * B == fractional part (28 bits)
- *
- * Values are signed two's complement, so the effective range is:
- * 0x80000000 to 0x7fffffff
- *       -8.0 to +7.9999999962747097015380859375
- *
- * The smallest representable value is:
- * 0x00000001 == 0.0000000037252902984619140625 (i.e. about 3.725e-9)
- *
- * 28 bits of fractional accuracy represent about
- * 8.6 digits of decimal accuracy.
- *
- * Fixed-point numbers can be added or subtracted as normal
- * integers, but multiplication requires shifting the 64-bit result
- * from 56 fractional bits back to 28 (and rounding.)
- *
- * Changing the definition of MAD_F_FRACBITS is only partially
- * supported, and must be done with care.
- */
-
-# define MAD_F_FRACBITS		28
-
-# if MAD_F_FRACBITS == 28
-#  define MAD_F(x)		((mad_fixed_t) (x##L))
-# else
-#  if MAD_F_FRACBITS < 28
-#   warning "MAD_F_FRACBITS < 28"
-#   define MAD_F(x)		((mad_fixed_t)  \
-				 (((x##L) +  \
-				   (1L << (28 - MAD_F_FRACBITS - 1))) >>  \
-				  (28 - MAD_F_FRACBITS)))
-#  elif MAD_F_FRACBITS > 28
-#   error "MAD_F_FRACBITS > 28 not currently supported"
-#   define MAD_F(x)		((mad_fixed_t)  \
-				 ((x##L) << (MAD_F_FRACBITS - 28)))
-#  endif
-# endif
-
-# define MAD_F_MIN		((mad_fixed_t) -0x80000000L)
-# define MAD_F_MAX		((mad_fixed_t) +0x7fffffffL)
-
-# define MAD_F_ONE		MAD_F(0x10000000)
-
-# define mad_f_tofixed(x)	((mad_fixed_t)  \
-				 ((x) * (double) (1L << MAD_F_FRACBITS) + 0.5))
-# define mad_f_todouble(x)	((double)  \
-				 ((x) / (double) (1L << MAD_F_FRACBITS)))
-
-# define mad_f_intpart(x)	((x) >> MAD_F_FRACBITS)
-# define mad_f_fracpart(x)	((x) & ((1L << MAD_F_FRACBITS) - 1))
-				/* (x should be positive) */
-
-# define mad_f_fromint(x)	((x) << MAD_F_FRACBITS)
-
-# define mad_f_add(x, y)	((x) + (y))
-# define mad_f_sub(x, y)	((x) - (y))
-
-# if defined(FPM_FLOAT)
-#  error "FPM_FLOAT not yet supported"
-
-#  undef MAD_F
-#  define MAD_F(x)		mad_f_todouble(x)
-
-#  define mad_f_mul(x, y)	((x) * (y))
-#  define mad_f_scale64
-
-#  undef ASO_ZEROCHECK
-
-# elif defined(FPM_64BIT)
-
-/*
- * This version should be the most accurate if 64-bit types are supported by
- * the compiler, although it may not be the most efficient.
- */
-#  if defined(OPT_ACCURACY)
-#   define mad_f_mul(x, y)  \
-    ((mad_fixed_t)  \
-     ((((mad_fixed64_t) (x) * (y)) +  \
-       (1L << (MAD_F_SCALEBITS - 1))) >> MAD_F_SCALEBITS))
-#  else
-#   define mad_f_mul(x, y)  \
-    ((mad_fixed_t) (((mad_fixed64_t) (x) * (y)) >> MAD_F_SCALEBITS))
-#  endif
-
-#  define MAD_F_SCALEBITS  MAD_F_FRACBITS
-
-/* --- Intel --------------------------------------------------------------- */
-
-# elif defined(FPM_INTEL)
-
-#  if defined(_MSC_VER)
-#   pragma warning(push)
-#   pragma warning(disable: 4035)  /* no return value */
-static __forceinline
-mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y)
-{
-  enum {
-    fracbits = MAD_F_FRACBITS
-  };
-
-  __asm {
-    mov eax, x
-    imul y
-    shrd eax, edx, fracbits
-  }
-
-  /* implicit return of eax */
-}
-#   pragma warning(pop)
-
-#   define mad_f_mul		mad_f_mul_inline
-#   define mad_f_scale64
-#  else
-/*
- * This Intel version is fast and accurate; the disposition of the least
- * significant bit depends on OPT_ACCURACY via mad_f_scale64().
- */
-#   define MAD_F_MLX(hi, lo, x, y)  \
-    asm ("imull %3"  \
-	 : "=a" (lo), "=d" (hi)  \
-	 : "%a" (x), "rm" (y)  \
-	 : "cc")
-
-#   if defined(OPT_ACCURACY)
-/*
- * This gives best accuracy but is not very fast.
- */
-#    define MAD_F_MLA(hi, lo, x, y)  \
-    ({ mad_fixed64hi_t __hi;  \
-       mad_fixed64lo_t __lo;  \
-       MAD_F_MLX(__hi, __lo, (x), (y));  \
-       asm ("addl %2,%0\n\t"  \
-	    "adcl %3,%1"  \
-	    : "=rm" (lo), "=rm" (hi)  \
-	    : "r" (__lo), "r" (__hi), "0" (lo), "1" (hi)  \
-	    : "cc");  \
-    })
-#   endif  /* OPT_ACCURACY */
-
-#   if defined(OPT_ACCURACY)
-/*
- * Surprisingly, this is faster than SHRD followed by ADC.
- */
-#    define mad_f_scale64(hi, lo)  \
-    ({ mad_fixed64hi_t __hi_;  \
-       mad_fixed64lo_t __lo_;  \
-       mad_fixed_t __result;  \
-       asm ("addl %4,%2\n\t"  \
-	    "adcl %5,%3"  \
-	    : "=rm" (__lo_), "=rm" (__hi_)  \
-	    : "0" (lo), "1" (hi),  \
-	      "ir" (1L << (MAD_F_SCALEBITS - 1)), "ir" (0)  \
-	    : "cc");  \
-       asm ("shrdl %3,%2,%1"  \
-	    : "=rm" (__result)  \
-	    : "0" (__lo_), "r" (__hi_), "I" (MAD_F_SCALEBITS)  \
-	    : "cc");  \
-       __result;  \
-    })
-#    else
-#    define mad_f_scale64(hi, lo)  \
-    ({ mad_fixed_t __result;  \
-       asm ("shrdl %3,%2,%1"  \
-	    : "=rm" (__result)  \
-	    : "0" (lo), "r" (hi), "I" (MAD_F_SCALEBITS)  \
-	    : "cc");  \
-       __result;  \
-    })
-#   endif  /* OPT_ACCURACY */
-
-#   define MAD_F_SCALEBITS  MAD_F_FRACBITS
-#  endif
-
-/* --- ARM ----------------------------------------------------------------- */
-
-# elif defined(FPM_ARM)
-
-/* 
- * This ARM V4 version is as accurate as FPM_64BIT but much faster. The
- * least significant bit is properly rounded at no CPU cycle cost!
- */
-# if 1
-/*
- * This is faster than the default implementation via MAD_F_MLX() and
- * mad_f_scale64().
- */
-#  define mad_f_mul(x, y)  \
-    ({ mad_fixed64hi_t __hi;  \
-       mad_fixed64lo_t __lo;  \
-       mad_fixed_t __result;  \
-       asm ("smull	%0, %1, %3, %4\n\t"  \
-	    "movs	%0, %0, lsr %5\n\t"  \
-	    "adc	%2, %0, %1, lsl %6"  \
-	    : "=&r" (__lo), "=&r" (__hi), "=r" (__result)  \
-	    : "%r" (x), "r" (y),  \
-	      "M" (MAD_F_SCALEBITS), "M" (32 - MAD_F_SCALEBITS)  \
-	    : "cc");  \
-       __result;  \
-    })
-# endif
-
-#  define MAD_F_MLX(hi, lo, x, y)  \
-    asm ("smull	%0, %1, %2, %3"  \
-	 : "=&r" (lo), "=&r" (hi)  \
-	 : "%r" (x), "r" (y))
-
-#  define MAD_F_MLA(hi, lo, x, y)  \
-    asm ("smlal	%0, %1, %2, %3"  \
-	 : "+r" (lo), "+r" (hi)  \
-	 : "%r" (x), "r" (y))
-
-#  define MAD_F_MLN(hi, lo)  \
-    asm ("rsbs	%0, %2, #0\n\t"  \
-	 "rsc	%1, %3, #0"  \
-	 : "=r" (lo), "=r" (hi)  \
-	 : "0" (lo), "1" (hi)  \
-	 : "cc")
-
-#  define mad_f_scale64(hi, lo)  \
-    ({ mad_fixed_t __result;  \
-       asm ("movs	%0, %1, lsr %3\n\t"  \
-	    "adc	%0, %0, %2, lsl %4"  \
-	    : "=&r" (__result)  \
-	    : "r" (lo), "r" (hi),  \
-	      "M" (MAD_F_SCALEBITS), "M" (32 - MAD_F_SCALEBITS)  \
-	    : "cc");  \
-       __result;  \
-    })
-
-#  define MAD_F_SCALEBITS  MAD_F_FRACBITS
-
-/* --- MIPS ---------------------------------------------------------------- */
-
-# elif defined(FPM_MIPS)
-
-/*
- * This MIPS version is fast and accurate; the disposition of the least
- * significant bit depends on OPT_ACCURACY via mad_f_scale64().
- */
-#  define MAD_F_MLX(hi, lo, x, y)  \
-    asm ("mult	%2,%3"  \
-	 : "=l" (lo), "=h" (hi)  \
-	 : "%r" (x), "r" (y))
-
-# if defined(HAVE_MADD_ASM)
-#  define MAD_F_MLA(hi, lo, x, y)  \
-    asm ("madd	%2,%3"  \
-	 : "+l" (lo), "+h" (hi)  \
-	 : "%r" (x), "r" (y))
-# elif defined(HAVE_MADD16_ASM)
-/*
- * This loses significant accuracy due to the 16-bit integer limit in the
- * multiply/accumulate instruction.
- */
-#  define MAD_F_ML0(hi, lo, x, y)  \
-    asm ("mult	%2,%3"  \
-	 : "=l" (lo), "=h" (hi)  \
-	 : "%r" ((x) >> 12), "r" ((y) >> 16))
-#  define MAD_F_MLA(hi, lo, x, y)  \
-    asm ("madd16	%2,%3"  \
-	 : "+l" (lo), "+h" (hi)  \
-	 : "%r" ((x) >> 12), "r" ((y) >> 16))
-#  define MAD_F_MLZ(hi, lo)  ((mad_fixed_t) (lo))
-# endif
-
-# if defined(OPT_SPEED)
-#  define mad_f_scale64(hi, lo)  \
-    ((mad_fixed_t) ((hi) << (32 - MAD_F_SCALEBITS)))
-#  define MAD_F_SCALEBITS  MAD_F_FRACBITS
-# endif
-
-/* --- SPARC --------------------------------------------------------------- */
-
-# elif defined(FPM_SPARC)
-
-/*
- * This SPARC V8 version is fast and accurate; the disposition of the least
- * significant bit depends on OPT_ACCURACY via mad_f_scale64().
- */
-#  define MAD_F_MLX(hi, lo, x, y)  \
-    asm ("smul %2, %3, %0\n\t"  \
-	 "rd %%y, %1"  \
-	 : "=r" (lo), "=r" (hi)  \
-	 : "%r" (x), "rI" (y))
-
-/* --- PowerPC ------------------------------------------------------------- */
-
-# elif defined(FPM_PPC)
-
-/*
- * This PowerPC version is fast and accurate; the disposition of the least
- * significant bit depends on OPT_ACCURACY via mad_f_scale64().
- */
-#  define MAD_F_MLX(hi, lo, x, y)  \
-    do {  \
-      asm ("mullw %0,%1,%2"  \
-	   : "=r" (lo)  \
-	   : "%r" (x), "r" (y));  \
-      asm ("mulhw %0,%1,%2"  \
-	   : "=r" (hi)  \
-	   : "%r" (x), "r" (y));  \
-    }  \
-    while (0)
-
-#  if defined(OPT_ACCURACY)
-/*
- * This gives best accuracy but is not very fast.
- */
-#   define MAD_F_MLA(hi, lo, x, y)  \
-    ({ mad_fixed64hi_t __hi;  \
-       mad_fixed64lo_t __lo;  \
-       MAD_F_MLX(__hi, __lo, (x), (y));  \
-       asm ("addc %0,%2,%3\n\t"  \
-	    "adde %1,%4,%5"  \
-	    : "=r" (lo), "=r" (hi)  \
-	    : "%r" (lo), "r" (__lo),  \
-	      "%r" (hi), "r" (__hi)  \
-	    : "xer");  \
-    })
-#  endif
-
-#  if defined(OPT_ACCURACY)
-/*
- * This is slower than the truncating version below it.
- */
-#   define mad_f_scale64(hi, lo)  \
-    ({ mad_fixed_t __result, __round;  \
-       asm ("rotrwi %0,%1,%2"  \
-	    : "=r" (__result)  \
-	    : "r" (lo), "i" (MAD_F_SCALEBITS));  \
-       asm ("extrwi %0,%1,1,0"  \
-	    : "=r" (__round)  \
-	    : "r" (__result));  \
-       asm ("insrwi %0,%1,%2,0"  \
-	    : "+r" (__result)  \
-	    : "r" (hi), "i" (MAD_F_SCALEBITS));  \
-       asm ("add %0,%1,%2"  \
-	    : "=r" (__result)  \
-	    : "%r" (__result), "r" (__round));  \
-       __result;  \
-    })
-#  else
-#   define mad_f_scale64(hi, lo)  \
-    ({ mad_fixed_t __result;  \
-       asm ("rotrwi %0,%1,%2"  \
-	    : "=r" (__result)  \
-	    : "r" (lo), "i" (MAD_F_SCALEBITS));  \
-       asm ("insrwi %0,%1,%2,0"  \
-	    : "+r" (__result)  \
-	    : "r" (hi), "i" (MAD_F_SCALEBITS));  \
-       __result;  \
-    })
-#  endif
-
-#  define MAD_F_SCALEBITS  MAD_F_FRACBITS
-
-/* --- Default ------------------------------------------------------------- */
-
-# elif defined(FPM_DEFAULT)
-
-/*
- * This version is the most portable but it loses significant accuracy.
- * Furthermore, accuracy is biased against the second argument, so care
- * should be taken when ordering operands.
- *
- * The scale factors are constant as this is not used with SSO.
- *
- * Pre-rounding is required to stay within the limits of compliance.
- */
-#  if defined(OPT_SPEED)
-#   define mad_f_mul(x, y)	(((x) >> 12) * ((y) >> 16))
-#  else
-#   define mad_f_mul(x, y)	((((x) + (1L << 11)) >> 12) *  \
-				 (((y) + (1L << 15)) >> 16))
-#  endif
-
-/* ------------------------------------------------------------------------- */
-
-# else
-#  error "no FPM selected"
-# endif
-
-/* default implementations */
-
-# if !defined(mad_f_mul)
-#  define mad_f_mul(x, y)  \
-    ({ register mad_fixed64hi_t __hi;  \
-       register mad_fixed64lo_t __lo;  \
-       MAD_F_MLX(__hi, __lo, (x), (y));  \
-       mad_f_scale64(__hi, __lo);  \
-    })
-# endif
-
-# if !defined(MAD_F_MLA)
-#  define MAD_F_ML0(hi, lo, x, y)	((lo)  = mad_f_mul((x), (y)))
-#  define MAD_F_MLA(hi, lo, x, y)	((lo) += mad_f_mul((x), (y)))
-#  define MAD_F_MLN(hi, lo)		((lo)  = -(lo))
-#  define MAD_F_MLZ(hi, lo)		((void) (hi), (mad_fixed_t) (lo))
-# endif
-
-# if !defined(MAD_F_ML0)
-#  define MAD_F_ML0(hi, lo, x, y)	MAD_F_MLX((hi), (lo), (x), (y))
-# endif
-
-# if !defined(MAD_F_MLN)
-#  define MAD_F_MLN(hi, lo)		((hi) = ((lo) = -(lo)) ? ~(hi) : -(hi))
-# endif
-
-# if !defined(MAD_F_MLZ)
-#  define MAD_F_MLZ(hi, lo)		mad_f_scale64((hi), (lo))
-# endif
-
-# if !defined(mad_f_scale64)
-#  if defined(OPT_ACCURACY)
-#   define mad_f_scale64(hi, lo)  \
-    ((((mad_fixed_t)  \
-       (((hi) << (32 - (MAD_F_SCALEBITS - 1))) |  \
-	((lo) >> (MAD_F_SCALEBITS - 1)))) + 1) >> 1)
-#  else
-#   define mad_f_scale64(hi, lo)  \
-    ((mad_fixed_t)  \
-     (((hi) << (32 - MAD_F_SCALEBITS)) |  \
-      ((lo) >> MAD_F_SCALEBITS)))
-#  endif
-#  define MAD_F_SCALEBITS  MAD_F_FRACBITS
-# endif
-
-/* C routines */
-
-mad_fixed_t mad_f_abs(mad_fixed_t);
-mad_fixed_t mad_f_div(mad_fixed_t, mad_fixed_t);
-
-# endif
-
-/* Id: bit.h,v 1.11 2003/05/27 22:40:36 rob Exp */
-
-# ifndef LIBMAD_BIT_H
-# define LIBMAD_BIT_H
-
-struct mad_bitptr {
-  unsigned char const *byte;
-  unsigned short cache;
-  unsigned short left;
-};
-
-void mad_bit_init(struct mad_bitptr *, unsigned char const *);
-
-# define mad_bit_finish(bitptr)		/* nothing */
-
-unsigned int mad_bit_length(struct mad_bitptr const *,
-			    struct mad_bitptr const *);
-
-# define mad_bit_bitsleft(bitptr)  ((bitptr)->left)
-unsigned char const *mad_bit_nextbyte(struct mad_bitptr const *);
-
-void mad_bit_skip(struct mad_bitptr *, unsigned int);
-unsigned long mad_bit_read(struct mad_bitptr *, unsigned int);
-void mad_bit_write(struct mad_bitptr *, unsigned int, unsigned long);
-
-unsigned short mad_bit_crc(struct mad_bitptr, unsigned int, unsigned short);
-
-# endif
-
-/* Id: timer.h,v 1.15 2003/05/27 22:40:37 rob Exp */
-
-# ifndef LIBMAD_TIMER_H
-# define LIBMAD_TIMER_H
-
-typedef struct {
-  signed long seconds;		/* whole seconds */
-  unsigned long fraction;	/* 1/MAD_TIMER_RESOLUTION seconds */
-} mad_timer_t;
-
-extern mad_timer_t const mad_timer_zero;
-
-# define MAD_TIMER_RESOLUTION	352800000UL
-
-enum mad_units {
-  MAD_UNITS_HOURS	 =    -2,
-  MAD_UNITS_MINUTES	 =    -1,
-  MAD_UNITS_SECONDS	 =     0,
-
-  /* metric units */
-
-  MAD_UNITS_DECISECONDS	 =    10,
-  MAD_UNITS_CENTISECONDS =   100,
-  MAD_UNITS_MILLISECONDS =  1000,
-
-  /* audio sample units */
-
-  MAD_UNITS_8000_HZ	 =  8000,
-  MAD_UNITS_11025_HZ	 = 11025,
-  MAD_UNITS_12000_HZ	 = 12000,
-
-  MAD_UNITS_16000_HZ	 = 16000,
-  MAD_UNITS_22050_HZ	 = 22050,
-  MAD_UNITS_24000_HZ	 = 24000,
-
-  MAD_UNITS_32000_HZ	 = 32000,
-  MAD_UNITS_44100_HZ	 = 44100,
-  MAD_UNITS_48000_HZ	 = 48000,
-
-  /* video frame/field units */
-
-  MAD_UNITS_24_FPS	 =    24,
-  MAD_UNITS_25_FPS	 =    25,
-  MAD_UNITS_30_FPS	 =    30,
-  MAD_UNITS_48_FPS	 =    48,
-  MAD_UNITS_50_FPS	 =    50,
-  MAD_UNITS_60_FPS	 =    60,
-
-  /* CD audio frames */
-
-  MAD_UNITS_75_FPS	 =    75,
-
-  /* video drop-frame units */
-
-  MAD_UNITS_23_976_FPS	 =   -24,
-  MAD_UNITS_24_975_FPS	 =   -25,
-  MAD_UNITS_29_97_FPS	 =   -30,
-  MAD_UNITS_47_952_FPS	 =   -48,
-  MAD_UNITS_49_95_FPS	 =   -50,
-  MAD_UNITS_59_94_FPS	 =   -60
-};
-
-# define mad_timer_reset(timer)	((void) (*(timer) = mad_timer_zero))
-
-int mad_timer_compare(mad_timer_t, mad_timer_t);
-
-# define mad_timer_sign(timer)	mad_timer_compare((timer), mad_timer_zero)
-
-void mad_timer_negate(mad_timer_t *);
-mad_timer_t mad_timer_abs(mad_timer_t);
-
-void mad_timer_set(mad_timer_t *, unsigned long, unsigned long, unsigned long);
-void mad_timer_add(mad_timer_t *, mad_timer_t);
-void mad_timer_multiply(mad_timer_t *, signed long);
-
-signed long mad_timer_count(mad_timer_t, enum mad_units);
-unsigned long mad_timer_fraction(mad_timer_t, unsigned long);
-void mad_timer_string(mad_timer_t, char *, char const *,
-		      enum mad_units, enum mad_units, unsigned long);
-
-# endif
-
-/* Id: stream.h,v 1.18 2003/05/27 22:40:37 rob Exp */
-
-# ifndef LIBMAD_STREAM_H
-# define LIBMAD_STREAM_H
-
-
-# define MAD_BUFFER_GUARD	8
-# define MAD_BUFFER_MDLEN	(511 + 2048 + MAD_BUFFER_GUARD)
-
-enum mad_error {
-  MAD_ERROR_NONE	   = 0x0000,	/* no error */
-
-  MAD_ERROR_BUFLEN	   = 0x0001,	/* input buffer too small (or EOF) */
-  MAD_ERROR_BUFPTR	   = 0x0002,	/* invalid (null) buffer pointer */
-
-  MAD_ERROR_NOMEM	   = 0x0031,	/* not enough memory */
-
-  MAD_ERROR_LOSTSYNC	   = 0x0101,	/* lost synchronization */
-  MAD_ERROR_BADLAYER	   = 0x0102,	/* reserved header layer value */
-  MAD_ERROR_BADBITRATE	   = 0x0103,	/* forbidden bitrate value */
-  MAD_ERROR_BADSAMPLERATE  = 0x0104,	/* reserved sample frequency value */
-  MAD_ERROR_BADEMPHASIS	   = 0x0105,	/* reserved emphasis value */
-
-  MAD_ERROR_BADCRC	   = 0x0201,	/* CRC check failed */
-  MAD_ERROR_BADBITALLOC	   = 0x0211,	/* forbidden bit allocation value */
-  MAD_ERROR_BADSCALEFACTOR = 0x0221,	/* bad scalefactor index */
-  MAD_ERROR_BADFRAMELEN	   = 0x0231,	/* bad frame length */
-  MAD_ERROR_BADBIGVALUES   = 0x0232,	/* bad big_values count */
-  MAD_ERROR_BADBLOCKTYPE   = 0x0233,	/* reserved block_type */
-  MAD_ERROR_BADSCFSI	   = 0x0234,	/* bad scalefactor selection info */
-  MAD_ERROR_BADDATAPTR	   = 0x0235,	/* bad main_data_begin pointer */
-  MAD_ERROR_BADPART3LEN	   = 0x0236,	/* bad audio data length */
-  MAD_ERROR_BADHUFFTABLE   = 0x0237,	/* bad Huffman table select */
-  MAD_ERROR_BADHUFFDATA	   = 0x0238,	/* Huffman data overrun */
-  MAD_ERROR_BADSTEREO	   = 0x0239	/* incompatible block_type for JS */
-};
-
-# define MAD_RECOVERABLE(error)	((error) & 0xff00)
-
-struct mad_stream {
-  unsigned char const *buffer;		/* input bitstream buffer */
-  unsigned char const *bufend;		/* end of buffer */
-  unsigned long skiplen;		/* bytes to skip before next frame */
-
-  int sync;				/* stream sync found */
-  unsigned long freerate;		/* free bitrate (fixed) */
-
-  unsigned char const *this_frame;	/* start of current frame */
-  unsigned char const *next_frame;	/* start of next frame */
-  struct mad_bitptr ptr;		/* current processing bit pointer */
-
-  struct mad_bitptr anc_ptr;		/* ancillary bits pointer */
-  unsigned int anc_bitlen;		/* number of ancillary bits */
-
-  unsigned char (*main_data)[MAD_BUFFER_MDLEN];
-					/* Layer III main_data() */
-  unsigned int md_len;			/* bytes in main_data */
-
-  int options;				/* decoding options (see below) */
-  enum mad_error error;			/* error code (see above) */
-};
-
-enum {
-  MAD_OPTION_IGNORECRC      = 0x0001,	/* ignore CRC errors */
-  MAD_OPTION_HALFSAMPLERATE = 0x0002	/* generate PCM at 1/2 sample rate */
-# if 0  /* not yet implemented */
-  MAD_OPTION_LEFTCHANNEL    = 0x0010,	/* decode left channel only */
-  MAD_OPTION_RIGHTCHANNEL   = 0x0020,	/* decode right channel only */
-  MAD_OPTION_SINGLECHANNEL  = 0x0030	/* combine channels */
-# endif
-};
-
-void mad_stream_init(struct mad_stream *);
-void mad_stream_finish(struct mad_stream *);
-
-# define mad_stream_options(stream, opts)  \
-    ((void) ((stream)->options = (opts)))
-
-void mad_stream_buffer(struct mad_stream *,
-		       unsigned char const *, unsigned long);
-void mad_stream_skip(struct mad_stream *, unsigned long);
-
-int mad_stream_sync(struct mad_stream *);
-
-char const *mad_stream_errorstr(struct mad_stream const *);
-
-# endif
-
-/* Id: frame.h,v 1.19 2003/05/27 22:40:36 rob Exp */
-
-# ifndef LIBMAD_FRAME_H
-# define LIBMAD_FRAME_H
-
-
-enum mad_layer {
-  MAD_LAYER_I   = 1,			/* Layer I */
-  MAD_LAYER_II  = 2,			/* Layer II */
-  MAD_LAYER_III = 3			/* Layer III */
-};
-
-enum mad_mode {
-  MAD_MODE_SINGLE_CHANNEL = 0,		/* single channel */
-  MAD_MODE_DUAL_CHANNEL	  = 1,		/* dual channel */
-  MAD_MODE_JOINT_STEREO	  = 2,		/* joint (MS/intensity) stereo */
-  MAD_MODE_STEREO	  = 3		/* normal LR stereo */
-};
-
-enum mad_emphasis {
-  MAD_EMPHASIS_NONE	  = 0,		/* no emphasis */
-  MAD_EMPHASIS_50_15_US	  = 1,		/* 50/15 microseconds emphasis */
-  MAD_EMPHASIS_CCITT_J_17 = 3,		/* CCITT J.17 emphasis */
-  MAD_EMPHASIS_RESERVED   = 2		/* unknown emphasis */
-};
-
-struct mad_header {
-  enum mad_layer layer;			/* audio layer (1, 2, or 3) */
-  enum mad_mode mode;			/* channel mode (see above) */
-  int mode_extension;			/* additional mode info */
-  enum mad_emphasis emphasis;		/* de-emphasis to use (see above) */
-
-  unsigned long bitrate;		/* stream bitrate (bps) */
-  unsigned int samplerate;		/* sampling frequency (Hz) */
-
-  unsigned short crc_check;		/* frame CRC accumulator */
-  unsigned short crc_target;		/* final target CRC checksum */
-
-  int flags;				/* flags (see below) */
-  int private_bits;			/* private bits (see below) */
-
-  mad_timer_t duration;			/* audio playing time of frame */
-};
-
-struct mad_frame {
-  struct mad_header header;		/* MPEG audio header */
-
-  int options;				/* decoding options (from stream) */
-
-  mad_fixed_t sbsample[2][36][32];	/* synthesis subband filter samples */
-  mad_fixed_t (*overlap)[2][32][18];	/* Layer III block overlap data */
-};
-
-# define MAD_NCHANNELS(header)		((header)->mode ? 2 : 1)
-# define MAD_NSBSAMPLES(header)  \
-  ((header)->layer == MAD_LAYER_I ? 12 :  \
-   (((header)->layer == MAD_LAYER_III &&  \
-     ((header)->flags & MAD_FLAG_LSF_EXT)) ? 18 : 36))
-
-enum {
-  MAD_FLAG_NPRIVATE_III	= 0x0007,	/* number of Layer III private bits */
-  MAD_FLAG_INCOMPLETE	= 0x0008,	/* header but not data is decoded */
-
-  MAD_FLAG_PROTECTION	= 0x0010,	/* frame has CRC protection */
-  MAD_FLAG_COPYRIGHT	= 0x0020,	/* frame is copyright */
-  MAD_FLAG_ORIGINAL	= 0x0040,	/* frame is original (else copy) */
-  MAD_FLAG_PADDING	= 0x0080,	/* frame has additional slot */
-
-  MAD_FLAG_I_STEREO	= 0x0100,	/* uses intensity joint stereo */
-  MAD_FLAG_MS_STEREO	= 0x0200,	/* uses middle/side joint stereo */
-  MAD_FLAG_FREEFORMAT	= 0x0400,	/* uses free format bitrate */
-
-  MAD_FLAG_LSF_EXT	= 0x1000,	/* lower sampling freq. extension */
-  MAD_FLAG_MC_EXT	= 0x2000,	/* multichannel audio extension */
-  MAD_FLAG_MPEG_2_5_EXT	= 0x4000	/* MPEG 2.5 (unofficial) extension */
-};
-
-enum {
-  MAD_PRIVATE_HEADER	= 0x0100,	/* header private bit */
-  MAD_PRIVATE_III	= 0x001f	/* Layer III private bits (up to 5) */
-};
-
-void mad_header_init(struct mad_header *);
-
-# define mad_header_finish(header)  /* nothing */
-
-int mad_header_decode(struct mad_header *, struct mad_stream *);
-
-void mad_frame_init(struct mad_frame *);
-void mad_frame_finish(struct mad_frame *);
-
-int mad_frame_decode(struct mad_frame *, struct mad_stream *);
-
-void mad_frame_mute(struct mad_frame *);
-
-# endif
-
-/* Id: synth.h,v 1.14 2003/05/27 22:40:37 rob Exp */
-
-# ifndef LIBMAD_SYNTH_H
-# define LIBMAD_SYNTH_H
-
-
-struct mad_pcm {
-  unsigned int samplerate;		/* sampling frequency (Hz) */
-  unsigned short channels;		/* number of channels */
-  unsigned short length;		/* number of samples per channel */
-  mad_fixed_t samples[2][1152];		/* PCM output samples [ch][sample] */
-};
-
-struct mad_synth {
-  mad_fixed_t filter[2][2][2][16][8];	/* polyphase filterbank outputs */
-  					/* [ch][eo][peo][s][v] */
-
-  unsigned int phase;			/* current processing phase */
-
-  struct mad_pcm pcm;			/* PCM output */
-};
-
-/* single channel PCM selector */
-enum {
-  MAD_PCM_CHANNEL_SINGLE = 0
-};
-
-/* dual channel PCM selector */
-enum {
-  MAD_PCM_CHANNEL_DUAL_1 = 0,
-  MAD_PCM_CHANNEL_DUAL_2 = 1
-};
-
-/* stereo PCM selector */
-enum {
-  MAD_PCM_CHANNEL_STEREO_LEFT  = 0,
-  MAD_PCM_CHANNEL_STEREO_RIGHT = 1
-};
-
-void mad_synth_init(struct mad_synth *);
-
-# define mad_synth_finish(synth)  /* nothing */
-
-void mad_synth_mute(struct mad_synth *);
-
-void mad_synth_frame(struct mad_synth *, struct mad_frame const *);
-
-# endif
-
-/* Id: decoder.h,v 1.16 2003/05/27 22:40:36 rob Exp */
-
-# ifndef LIBMAD_DECODER_H
-# define LIBMAD_DECODER_H
-
-
-enum mad_decoder_mode {
-  MAD_DECODER_MODE_SYNC  = 0,
-  MAD_DECODER_MODE_ASYNC
-};
-
-enum mad_flow {
-  MAD_FLOW_CONTINUE = 0x0000,	/* continue normally */
-  MAD_FLOW_STOP     = 0x0010,	/* stop decoding normally */
-  MAD_FLOW_BREAK    = 0x0011,	/* stop decoding and signal an error */
-  MAD_FLOW_IGNORE   = 0x0020	/* ignore the current frame */
-};
-
-struct mad_decoder {
-  enum mad_decoder_mode mode;
-
-  int options;
-
-  struct {
-    long pid;
-    int in;
-    int out;
-  } async;
-
-  struct {
-    struct mad_stream stream;
-    struct mad_frame frame;
-    struct mad_synth synth;
-  } *sync;
-
-  void *cb_data;
-
-  enum mad_flow (*input_func)(void *, struct mad_stream *);
-  enum mad_flow (*header_func)(void *, struct mad_header const *);
-  enum mad_flow (*filter_func)(void *,
-			       struct mad_stream const *, struct mad_frame *);
-  enum mad_flow (*output_func)(void *,
-			       struct mad_header const *, struct mad_pcm *);
-  enum mad_flow (*error_func)(void *, struct mad_stream *, struct mad_frame *);
-  enum mad_flow (*message_func)(void *, void *, unsigned int *);
-};
-
-void mad_decoder_init(struct mad_decoder *, void *,
-		      enum mad_flow (*)(void *, struct mad_stream *),
-		      enum mad_flow (*)(void *, struct mad_header const *),
-		      enum mad_flow (*)(void *,
-					struct mad_stream const *,
-					struct mad_frame *),
-		      enum mad_flow (*)(void *,
-					struct mad_header const *,
-					struct mad_pcm *),
-		      enum mad_flow (*)(void *,
-					struct mad_stream *,
-					struct mad_frame *),
-		      enum mad_flow (*)(void *, void *, unsigned int *));
-int mad_decoder_finish(struct mad_decoder *);
-
-# define mad_decoder_options(decoder, opts)  \
-    ((void) ((decoder)->options = (opts)))
-
-int mad_decoder_run(struct mad_decoder *, enum mad_decoder_mode);
-int mad_decoder_message(struct mad_decoder *, void *, unsigned int *);
-
-# endif
-
-# ifdef __cplusplus
-}
-# endif
diff --git a/extra_lib/include/neaacdec.h b/extra_lib/include/neaacdec.h
deleted file mode 100644
index 6aaf7d6..0000000
--- a/extra_lib/include/neaacdec.h
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
-** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
-** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
-**  
-** 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.
-** 
-** 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, write to the Free Software 
-** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-**
-** Any non-GPL usage of this software or parts of this software is strictly
-** forbidden.
-**
-** The "appropriate copyright message" mentioned in section 2c of the GPLv2
-** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-**
-** Commercial non-GPL licensing of this software is possible.
-** For more info contact Nero AG through Mpeg4AAClicense at nero.com.
-**
-** $Id: neaacdec.h,v 1.2 2008-12-02 18:04:42 jeanlf Exp $
-**/
-
-#ifndef __NEAACDEC_H__
-#define __NEAACDEC_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#if 1
-/* MACROS FOR BACKWARDS COMPATIBILITY */
-/* structs */
-#define faacDecHandle                  NeAACDecHandle
-#define faacDecConfiguration           NeAACDecConfiguration
-#define faacDecConfigurationPtr        NeAACDecConfigurationPtr
-#define faacDecFrameInfo               NeAACDecFrameInfo
-/* functions */
-#define faacDecGetErrorMessage         NeAACDecGetErrorMessage
-#define faacDecSetConfiguration        NeAACDecSetConfiguration
-#define faacDecGetCurrentConfiguration NeAACDecGetCurrentConfiguration
-#define faacDecInit                    NeAACDecInit
-#define faacDecInit2                   NeAACDecInit2
-#define faacDecInitDRM                 NeAACDecInitDRM
-#define faacDecPostSeekReset           NeAACDecPostSeekReset
-#define faacDecOpen                    NeAACDecOpen
-#define faacDecClose                   NeAACDecClose
-#define faacDecDecode                  NeAACDecDecode
-#define AudioSpecificConfig            NeAACDecAudioSpecificConfig
-#endif
-
-
-#ifdef _WIN32
-  #pragma pack(push, 8)
-  #ifndef NEAACDECAPI
-    #define NEAACDECAPI __cdecl
-  #endif
-#else
-  #ifndef NEAACDECAPI
-    #define NEAACDECAPI
-  #endif
-#endif
-
-#define FAAD2_VERSION "2.6"
-
-/* object types for AAC */
-#define MAIN       1
-#define LC         2
-#define SSR        3
-#define LTP        4
-#define HE_AAC     5
-#define ER_LC     17
-#define ER_LTP    19
-#define LD        23
-#define DRM_ER_LC 27 /* special object type for DRM */
-
-/* header types */
-#define RAW        0
-#define ADIF       1
-#define ADTS       2
-
-/* SBR signalling */
-#define NO_SBR           0
-#define SBR_UPSAMPLED    1
-#define SBR_DOWNSAMPLED  2
-#define NO_SBR_UPSAMPLED 3
-
-/* library output formats */
-#define FAAD_FMT_16BIT  1
-#define FAAD_FMT_24BIT  2
-#define FAAD_FMT_32BIT  3
-#define FAAD_FMT_FLOAT  4
-#define FAAD_FMT_FIXED  FAAD_FMT_FLOAT
-#define FAAD_FMT_DOUBLE 5
-
-/* Capabilities */
-#define LC_DEC_CAP           (1<<0) /* Can decode LC */
-#define MAIN_DEC_CAP         (1<<1) /* Can decode MAIN */
-#define LTP_DEC_CAP          (1<<2) /* Can decode LTP */
-#define LD_DEC_CAP           (1<<3) /* Can decode LD */
-#define ERROR_RESILIENCE_CAP (1<<4) /* Can decode ER */
-#define FIXED_POINT_CAP      (1<<5) /* Fixed point */
-
-/* Channel definitions */
-#define FRONT_CHANNEL_CENTER (1)
-#define FRONT_CHANNEL_LEFT   (2)
-#define FRONT_CHANNEL_RIGHT  (3)
-#define SIDE_CHANNEL_LEFT    (4)
-#define SIDE_CHANNEL_RIGHT   (5)
-#define BACK_CHANNEL_LEFT    (6)
-#define BACK_CHANNEL_RIGHT   (7)
-#define BACK_CHANNEL_CENTER  (8)
-#define LFE_CHANNEL          (9)
-#define UNKNOWN_CHANNEL      (0)
-
-/* DRM channel definitions */
-#define DRMCH_MONO          1
-#define DRMCH_STEREO        2
-#define DRMCH_SBR_MONO      3
-#define DRMCH_SBR_STEREO    4
-#define DRMCH_SBR_PS_STEREO 5
-
-
-/* A decode call can eat up to FAAD_MIN_STREAMSIZE bytes per decoded channel,
-   so at least so much bytes per channel should be available in this stream */
-#define FAAD_MIN_STREAMSIZE 768 /* 6144 bits/channel */
-
-
-typedef void *NeAACDecHandle;
-
-typedef struct mp4AudioSpecificConfig
-{
-    /* Audio Specific Info */
-    unsigned char objectTypeIndex;
-    unsigned char samplingFrequencyIndex;
-    unsigned long samplingFrequency;
-    unsigned char channelsConfiguration;
-
-    /* GA Specific Info */
-    unsigned char frameLengthFlag;
-    unsigned char dependsOnCoreCoder;
-    unsigned short coreCoderDelay;
-    unsigned char extensionFlag;
-    unsigned char aacSectionDataResilienceFlag;
-    unsigned char aacScalefactorDataResilienceFlag;
-    unsigned char aacSpectralDataResilienceFlag;
-    unsigned char epConfig;
-
-    char sbr_present_flag;
-    char forceUpSampling;
-    char downSampledSBR;
-} mp4AudioSpecificConfig;
-
-typedef struct NeAACDecConfiguration
-{
-    unsigned char defObjectType;
-    unsigned long defSampleRate;
-    unsigned char outputFormat;
-    unsigned char downMatrix;
-    unsigned char useOldADTSFormat;
-    unsigned char dontUpSampleImplicitSBR;
-} NeAACDecConfiguration, *NeAACDecConfigurationPtr;
-
-typedef struct NeAACDecFrameInfo
-{
-    unsigned long bytesconsumed;
-    unsigned long samples;
-    unsigned char channels;
-    unsigned char error;
-    unsigned long samplerate;
-
-    /* SBR: 0: off, 1: on; upsample, 2: on; downsampled, 3: off; upsampled */
-    unsigned char sbr;
-
-    /* MPEG-4 ObjectType */
-    unsigned char object_type;
-
-    /* AAC header type; MP4 will be signalled as RAW also */
-    unsigned char header_type;
-
-    /* multichannel configuration */
-    unsigned char num_front_channels;
-    unsigned char num_side_channels;
-    unsigned char num_back_channels;
-    unsigned char num_lfe_channels;
-    unsigned char channel_position[64];
-
-    /* PS: 0: off, 1: on */
-    unsigned char ps;
-} NeAACDecFrameInfo;
-
-char* NEAACDECAPI NeAACDecGetErrorMessage(unsigned char errcode);
-
-unsigned long NEAACDECAPI NeAACDecGetCapabilities(void);
-
-NeAACDecHandle NEAACDECAPI NeAACDecOpen(void);
-
-NeAACDecConfigurationPtr NEAACDECAPI NeAACDecGetCurrentConfiguration(NeAACDecHandle hDecoder);
-
-unsigned char NEAACDECAPI NeAACDecSetConfiguration(NeAACDecHandle hDecoder,
-                                                   NeAACDecConfigurationPtr config);
-
-/* Init the library based on info from the AAC file (ADTS/ADIF) */
-long NEAACDECAPI NeAACDecInit(NeAACDecHandle hDecoder,
-                              unsigned char *buffer,
-                              unsigned long buffer_size,
-                              unsigned long *samplerate,
-                              unsigned char *channels);
-
-/* Init the library using a DecoderSpecificInfo */
-char NEAACDECAPI NeAACDecInit2(NeAACDecHandle hDecoder, unsigned char *pBuffer,
-                               unsigned long SizeOfDecoderSpecificInfo,
-                               unsigned long *samplerate, unsigned char *channels);
-
-/* Init the library for DRM */
-char NEAACDECAPI NeAACDecInitDRM(NeAACDecHandle *hDecoder, unsigned long samplerate,
-                                 unsigned char channels);
-
-void NEAACDECAPI NeAACDecPostSeekReset(NeAACDecHandle hDecoder, long frame);
-
-void NEAACDECAPI NeAACDecClose(NeAACDecHandle hDecoder);
-
-void* NEAACDECAPI NeAACDecDecode(NeAACDecHandle hDecoder,
-                                 NeAACDecFrameInfo *hInfo,
-                                 unsigned char *buffer,
-                                 unsigned long buffer_size);
-
-void* NEAACDECAPI NeAACDecDecode2(NeAACDecHandle hDecoder,
-                                  NeAACDecFrameInfo *hInfo,
-                                  unsigned char *buffer,
-                                  unsigned long buffer_size,
-                                  void **sample_buffer,
-                                  unsigned long sample_buffer_size);
-
-char NEAACDECAPI NeAACDecAudioSpecificConfig(unsigned char *pBuffer,
-                                             unsigned long buffer_size,
-                                             mp4AudioSpecificConfig *mp4ASC);
-
-#ifdef _WIN32
-  #pragma pack(pop)
-#endif
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/extra_lib/include/ogg/ogg.h b/extra_lib/include/ogg/ogg.h
deleted file mode 100644
index 4a714e5..0000000
--- a/extra_lib/include/ogg/ogg.h
+++ /dev/null
@@ -1,202 +0,0 @@
-/********************************************************************
- *                                                                  *
- * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
- * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
- * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
- * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
- *                                                                  *
- * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
- * by the Xiph.Org Foundation http://www.xiph.org/                  *
- *                                                                  *
- ********************************************************************
-
- function: toplevel libogg include
- last mod: $Id: ogg.h,v 1.2 2008-12-02 18:04:43 jeanlf Exp $
-
- ********************************************************************/
-#ifndef _OGG_H
-#define _OGG_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <ogg/os_types.h>
-
-typedef struct {
-  long endbyte;
-  int  endbit;
-
-  unsigned char *buffer;
-  unsigned char *ptr;
-  long storage;
-} oggpack_buffer;
-
-/* ogg_page is used to encapsulate the data in one Ogg bitstream page *****/
-
-typedef struct {
-  unsigned char *header;
-  long header_len;
-  unsigned char *body;
-  long body_len;
-} ogg_page;
-
-/* ogg_stream_state contains the current encode/decode state of a logical
-   Ogg bitstream **********************************************************/
-
-typedef struct {
-  unsigned char   *body_data;    /* bytes from packet bodies */
-  long    body_storage;          /* storage elements allocated */
-  long    body_fill;             /* elements stored; fill mark */
-  long    body_returned;         /* elements of fill returned */
-
-
-  int     *lacing_vals;      /* The values that will go to the segment table */
-  ogg_int64_t *granule_vals; /* granulepos values for headers. Not compact
-				this way, but it is simple coupled to the
-				lacing fifo */
-  long    lacing_storage;
-  long    lacing_fill;
-  long    lacing_packet;
-  long    lacing_returned;
-
-  unsigned char    header[282];      /* working space for header encode */
-  int              header_fill;
-
-  int     e_o_s;          /* set when we have buffered the last packet in the
-                             logical bitstream */
-  int     b_o_s;          /* set after we've written the initial page
-                             of a logical bitstream */
-  long    serialno;
-  long    pageno;
-  ogg_int64_t  packetno;      /* sequence number for decode; the framing
-                             knows where there's a hole in the data,
-                             but we need coupling so that the codec
-                             (which is in a seperate abstraction
-                             layer) also knows about the gap */
-  ogg_int64_t   granulepos;
-
-} ogg_stream_state;
-
-/* ogg_packet is used to encapsulate the data and metadata belonging
-   to a single raw Ogg/Vorbis packet *************************************/
-
-typedef struct {
-  unsigned char *packet;
-  long  bytes;
-  long  b_o_s;
-  long  e_o_s;
-
-  ogg_int64_t  granulepos;
-  
-  ogg_int64_t  packetno;     /* sequence number for decode; the framing
-				knows where there's a hole in the data,
-				but we need coupling so that the codec
-				(which is in a seperate abstraction
-				layer) also knows about the gap */
-} ogg_packet;
-
-typedef struct {
-  unsigned char *data;
-  int storage;
-  int fill;
-  int returned;
-
-  int unsynced;
-  int headerbytes;
-  int bodybytes;
-} ogg_sync_state;
-
-/* Ogg BITSTREAM PRIMITIVES: bitstream ************************/
-
-extern void  oggpack_writeinit(oggpack_buffer *b);
-extern void  oggpack_writetrunc(oggpack_buffer *b,long bits);
-extern void  oggpack_writealign(oggpack_buffer *b);
-extern void  oggpack_writecopy(oggpack_buffer *b,void *source,long bits);
-extern void  oggpack_reset(oggpack_buffer *b);
-extern void  oggpack_writeclear(oggpack_buffer *b);
-extern void  oggpack_readinit(oggpack_buffer *b,unsigned char *buf,int bytes);
-extern void  oggpack_write(oggpack_buffer *b,unsigned long value,int bits);
-extern long  oggpack_look(oggpack_buffer *b,int bits);
-extern long  oggpack_look1(oggpack_buffer *b);
-extern void  oggpack_adv(oggpack_buffer *b,int bits);
-extern void  oggpack_adv1(oggpack_buffer *b);
-extern long  oggpack_read(oggpack_buffer *b,int bits);
-extern long  oggpack_read1(oggpack_buffer *b);
-extern long  oggpack_bytes(oggpack_buffer *b);
-extern long  oggpack_bits(oggpack_buffer *b);
-extern unsigned char *oggpack_get_buffer(oggpack_buffer *b);
-
-extern void  oggpackB_writeinit(oggpack_buffer *b);
-extern void  oggpackB_writetrunc(oggpack_buffer *b,long bits);
-extern void  oggpackB_writealign(oggpack_buffer *b);
-extern void  oggpackB_writecopy(oggpack_buffer *b,void *source,long bits);
-extern void  oggpackB_reset(oggpack_buffer *b);
-extern void  oggpackB_writeclear(oggpack_buffer *b);
-extern void  oggpackB_readinit(oggpack_buffer *b,unsigned char *buf,int bytes);
-extern void  oggpackB_write(oggpack_buffer *b,unsigned long value,int bits);
-extern long  oggpackB_look(oggpack_buffer *b,int bits);
-extern long  oggpackB_look1(oggpack_buffer *b);
-extern void  oggpackB_adv(oggpack_buffer *b,int bits);
-extern void  oggpackB_adv1(oggpack_buffer *b);
-extern long  oggpackB_read(oggpack_buffer *b,int bits);
-extern long  oggpackB_read1(oggpack_buffer *b);
-extern long  oggpackB_bytes(oggpack_buffer *b);
-extern long  oggpackB_bits(oggpack_buffer *b);
-extern unsigned char *oggpackB_get_buffer(oggpack_buffer *b);
-
-/* Ogg BITSTREAM PRIMITIVES: encoding **************************/
-
-extern int      ogg_stream_packetin(ogg_stream_state *os, ogg_packet *op);
-extern int      ogg_stream_pageout(ogg_stream_state *os, ogg_page *og);
-extern int      ogg_stream_flush(ogg_stream_state *os, ogg_page *og);
-
-/* Ogg BITSTREAM PRIMITIVES: decoding **************************/
-
-extern int      ogg_sync_init(ogg_sync_state *oy);
-extern int      ogg_sync_clear(ogg_sync_state *oy);
-extern int      ogg_sync_reset(ogg_sync_state *oy);
-extern int	ogg_sync_destroy(ogg_sync_state *oy);
-
-extern char    *ogg_sync_buffer(ogg_sync_state *oy, long size);
-extern int      ogg_sync_wrote(ogg_sync_state *oy, long bytes);
-extern long     ogg_sync_pageseek(ogg_sync_state *oy,ogg_page *og);
-extern int      ogg_sync_pageout(ogg_sync_state *oy, ogg_page *og);
-extern int      ogg_stream_pagein(ogg_stream_state *os, ogg_page *og);
-extern int      ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op);
-extern int      ogg_stream_packetpeek(ogg_stream_state *os,ogg_packet *op);
-
-/* Ogg BITSTREAM PRIMITIVES: general ***************************/
-
-extern int      ogg_stream_init(ogg_stream_state *os,int serialno);
-extern int      ogg_stream_clear(ogg_stream_state *os);
-extern int      ogg_stream_reset(ogg_stream_state *os);
-extern int      ogg_stream_reset_serialno(ogg_stream_state *os,int serialno);
-extern int      ogg_stream_destroy(ogg_stream_state *os);
-extern int      ogg_stream_eos(ogg_stream_state *os);
-
-extern void     ogg_page_checksum_set(ogg_page *og);
-
-extern int      ogg_page_version(ogg_page *og);
-extern int      ogg_page_continued(ogg_page *og);
-extern int      ogg_page_bos(ogg_page *og);
-extern int      ogg_page_eos(ogg_page *og);
-extern ogg_int64_t  ogg_page_granulepos(ogg_page *og);
-extern int      ogg_page_serialno(ogg_page *og);
-extern long     ogg_page_pageno(ogg_page *og);
-extern int      ogg_page_packets(ogg_page *og);
-
-extern void     ogg_packet_clear(ogg_packet *op);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif  /* _OGG_H */
-
-
-
-
-
-
diff --git a/extra_lib/include/ogg/os_types.h b/extra_lib/include/ogg/os_types.h
deleted file mode 100644
index ee30903..0000000
--- a/extra_lib/include/ogg/os_types.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/********************************************************************
- *                                                                  *
- * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
- * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
- * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
- * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
- *                                                                  *
- * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
- * by the Xiph.Org Foundation http://www.xiph.org/                  *
- *                                                                  *
- ********************************************************************
-
- function: #ifdef jail to whip a few platforms into the UNIX ideal.
- last mod: $Id: os_types.h,v 1.2 2008-12-02 18:04:43 jeanlf Exp $
-
- ********************************************************************/
-#ifndef _OS_TYPES_H
-#define _OS_TYPES_H
-
-/* make it easy on the folks that want to compile the libs with a
-   different malloc than stdlib */
-#define _ogg_malloc  malloc
-#define _ogg_calloc  calloc
-#define _ogg_realloc realloc
-#define _ogg_free    free
-
-#if defined(_WIN32) 
-
-#  if defined(__CYGWIN__)
-#    include <_G_config.h>
-     typedef _G_int64_t ogg_int64_t;
-     typedef _G_int32_t ogg_int32_t;
-     typedef _G_uint32_t ogg_uint32_t;
-     typedef _G_int16_t ogg_int16_t;
-     typedef _G_uint16_t ogg_uint16_t;
-#  elif defined(__MINGW32__)
-     typedef short ogg_int16_t;                                                                             
-     typedef unsigned short ogg_uint16_t;                                                                   
-     typedef int ogg_int32_t;                                                                               
-     typedef unsigned int ogg_uint32_t;                                                                     
-     typedef long long ogg_int64_t;                                                                         
-     typedef unsigned long long ogg_uint64_t;  
-#  elif defined(__MWERKS__)
-     typedef long long ogg_int64_t;
-     typedef int ogg_int32_t;
-     typedef unsigned int ogg_uint32_t;
-     typedef short ogg_int16_t;
-     typedef unsigned short ogg_uint16_t;
-#  else
-     /* MSVC/Borland */
-     typedef __int64 ogg_int64_t;
-     typedef __int32 ogg_int32_t;
-     typedef unsigned __int32 ogg_uint32_t;
-     typedef __int16 ogg_int16_t;
-     typedef unsigned __int16 ogg_uint16_t;
-#  endif
-
-#elif defined(__MACOS__)
-
-#  include <sys/types.h>
-   typedef SInt16 ogg_int16_t;
-   typedef UInt16 ogg_uint16_t;
-   typedef SInt32 ogg_int32_t;
-   typedef UInt32 ogg_uint32_t;
-   typedef SInt64 ogg_int64_t;
-
-#elif defined(__MACOSX__) /* MacOS X Framework build */
-
-#  include <sys/types.h>
-   typedef int16_t ogg_int16_t;
-   typedef u_int16_t ogg_uint16_t;
-   typedef int32_t ogg_int32_t;
-   typedef u_int32_t ogg_uint32_t;
-   typedef int64_t ogg_int64_t;
-
-#elif defined(__BEOS__)
-
-   /* Be */
-#  include <inttypes.h>
-   typedef int16_t ogg_int16_t;
-   typedef u_int16_t ogg_uint16_t;
-   typedef int32_t ogg_int32_t;
-   typedef u_int32_t ogg_uint32_t;
-   typedef int64_t ogg_int64_t;
-
-#elif defined (__EMX__)
-
-   /* OS/2 GCC */
-   typedef short ogg_int16_t;
-   typedef unsigned short ogg_uint16_t;
-   typedef int ogg_int32_t;
-   typedef unsigned int ogg_uint32_t;
-   typedef long long ogg_int64_t;
-
-#elif defined (DJGPP)
-
-   /* DJGPP */
-   typedef short ogg_int16_t;
-   typedef int ogg_int32_t;
-   typedef unsigned int ogg_uint32_t;
-   typedef long long ogg_int64_t;
-
-#elif defined(R5900)
-
-   /* PS2 EE */
-   typedef long ogg_int64_t;
-   typedef int ogg_int32_t;
-   typedef unsigned ogg_uint32_t;
-   typedef short ogg_int16_t;
-
-#elif defined(__SYMBIAN32__)
-
-   /* Symbian GCC */
-   typedef signed short ogg_int16_t;
-   typedef unsigned short ogg_uint16_t;
-   typedef signed int ogg_int32_t;
-   typedef unsigned int ogg_uint32_t;
-   typedef long long int ogg_int64_t;
-
-#else
-
-#  include <sys/types.h>
-#  include <ogg/config_types.h>
-
-#endif
-
-#endif  /* _OS_TYPES_H */
diff --git a/extra_lib/include/openHevcWrapper.h b/extra_lib/include/openHevcWrapper.h
deleted file mode 100644
index a598dc2..0000000
--- a/extra_lib/include/openHevcWrapper.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * openhevc.h wrapper to openhevc or ffmpeg
- * Copyright (c) 2012-2013 Micka�l Raulet, Wassim Hamidouche, Gildas Cocherel, Pierre Edouard Lepere
- *
- * This file is part of openhevc.
- *
- * openHevc is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * openhevc 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with openhevc; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef OPEN_HEVC_WRAPPER_H
-#define OPEN_HEVC_WRAPPER_H
-
-#define NV_VERSION  "2.0" ///< Current software version
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-
-typedef void* OpenHevc_Handle;
-
-typedef struct OpenHevc_Rational{
-    int num; ///< numerator
-    int den; ///< denominator
-} OpenHevc_Rational;
-
-
-enum ChromaFormat {
-    YUV420 = 0,
-    YUV422,
-    YUV444,
-};
-
-typedef struct OpenHevc_FrameInfo
-{
-   int         nYPitch;
-   int         nUPitch;
-   int         nVPitch;
-   int         nBitDepth;
-   int         nWidth;
-   int         nHeight;
-   int        chromat_format;
-   OpenHevc_Rational  sample_aspect_ratio;
-   OpenHevc_Rational  frameRate;
-   int         display_picture_number;
-   int         flag; //progressive, interlaced, interlaced top field first, interlaced bottom field first.
-   int64_t     nTimeStamp;
-} OpenHevc_FrameInfo;
-
-typedef struct OpenHevc_Frame
-{
-   void**      pvY;
-   void**      pvU;
-   void**      pvV;
-   OpenHevc_FrameInfo frameInfo;
-} OpenHevc_Frame;
-
-typedef struct OpenHevc_Frame_cpy
-{
-   void*        pvY;
-   void*        pvU;
-   void*        pvV;
-   OpenHevc_FrameInfo frameInfo;
-} OpenHevc_Frame_cpy;
-
-OpenHevc_Handle libOpenHevcInit(int nb_pthreads, int thread_type);
-int libOpenHevcStartDecoder(OpenHevc_Handle openHevcHandle);
-int  libOpenHevcDecode(OpenHevc_Handle openHevcHandle, const unsigned char *buff, int nal_len, int64_t pts);
-void libOpenHevcGetPictureInfo(OpenHevc_Handle openHevcHandle, OpenHevc_FrameInfo *openHevcFrameInfo);
-void libOpenHevcCopyExtraData(OpenHevc_Handle openHevcHandle, unsigned char *extra_data, int extra_size_alloc);
-
-void libOpenHevcGetPictureInfoCpy(OpenHevc_Handle openHevcHandle, OpenHevc_FrameInfo *openHevcFrameInfo);
-int  libOpenHevcGetOutput(OpenHevc_Handle openHevcHandle, int got_picture, OpenHevc_Frame *openHevcFrame);
-int  libOpenHevcGetOutputCpy(OpenHevc_Handle openHevcHandle, int got_picture, OpenHevc_Frame_cpy *openHevcFrame);
-void libOpenHevcSetCheckMD5(OpenHevc_Handle openHevcHandle, int val);
-void libOpenHevcSetDebugMode(OpenHevc_Handle openHevcHandle, int val);
-void libOpenHevcSetTemporalLayer_id(OpenHevc_Handle openHevcHandle, int val);
-void libOpenHevcSetNoCropping(OpenHevc_Handle openHevcHandle, int val);
-void libOpenHevcSetActiveDecoders(OpenHevc_Handle openHevcHandle, int val);
-void libOpenHevcSetViewLayers(OpenHevc_Handle openHevcHandle, int val);
-void libOpenHevcClose(OpenHevc_Handle openHevcHandle);
-void libOpenHevcFlush(OpenHevc_Handle openHevcHandle);
-void libOpenHevcFlushSVC(OpenHevc_Handle openHevcHandle, int decoderId);
-
-const char *libOpenHevcVersion(OpenHevc_Handle openHevcHandle);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // OPEN_HEVC_WRAPPER_H
diff --git a/extra_lib/include/openjpeg.h b/extra_lib/include/openjpeg.h
deleted file mode 100644
index ffcaaca..0000000
--- a/extra_lib/include/openjpeg.h
+++ /dev/null
@@ -1,911 +0,0 @@
- /*
- * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
- * Copyright (c) 2002-2007, Professor Benoit Macq
- * Copyright (c) 2001-2003, David Janssens
- * Copyright (c) 2002-2003, Yannick Verschueren
- * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe
- * Copyright (c) 2005, Herve Drolon, FreeImage Team
- * Copyright (c) 2006-2007, Parvatha Elangovan
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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 THE COPYRIGHT OWNER 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.
- */
-#ifndef OPENJPEG_H
-#define OPENJPEG_H
-
-#define OPENJPEG_VERSION "1.3.0"
-
-/* 
-==========================================================
-   Compiler directives
-==========================================================
-*/
-
-#if defined(OPJ_STATIC) || !(defined(WIN32) || defined(__WIN32__))
-#define OPJ_API
-#define OPJ_CALLCONV
-#else
-#define OPJ_CALLCONV __stdcall
-/*
-The following ifdef block is the standard way of creating macros which make exporting 
-from a DLL simpler. All files within this DLL are compiled with the OPJ_EXPORTS
-symbol defined on the command line. this symbol should not be defined on any project
-that uses this DLL. This way any other project whose source files include this file see 
-OPJ_API functions as being imported from a DLL, wheras this DLL sees symbols
-defined with this macro as being exported.
-*/
-#ifdef OPJ_EXPORTS
-#define OPJ_API __declspec(dllexport)
-#else
-#define OPJ_API __declspec(dllimport)
-#endif /* OPJ_EXPORTS */
-#endif /* !OPJ_STATIC || !WIN32 */
-
-#ifndef __cplusplus
-#if defined(HAVE_STDBOOL_H)
-/*
-The C language implementation does correctly provide the standard header
-file "stdbool.h".
- */
-#include <stdbool.h>
-#else
-/*
-The C language implementation does not provide the standard header file
-"stdbool.h" as required by ISO/IEC 9899:1999.  Try to compensate for this
-braindamage below.
-*/
-#if !defined(bool)
-#define	bool	int
-#endif
-#if !defined(true)
-#define true	1
-#endif
-#if !defined(false)
-#define	false	0
-#endif
-#endif
-#endif /* __cplusplus */
-
-/* 
-==========================================================
-   Useful constant definitions
-==========================================================
-*/
-
-#define OPJ_PATH_LEN 4096 /**< Maximum allowed size for filenames */
-
-#define J2K_MAXRLVLS 33					/**< Number of maximum resolution level authorized */
-#define J2K_MAXBANDS (3*J2K_MAXRLVLS-2)	/**< Number of maximum sub-band linked to number of resolution level */
-
-/* UniPG>> */
-#define JPWL_MAX_NO_TILESPECS	16 /**< Maximum number of tile parts expected by JPWL: increase at your will */
-#define JPWL_MAX_NO_PACKSPECS	16 /**< Maximum number of packet parts expected by JPWL: increase at your will */
-#define JPWL_MAX_NO_MARKERS	512 /**< Maximum number of JPWL markers: increase at your will */
-#define JPWL_PRIVATEINDEX_NAME "jpwl_index_privatefilename" /**< index file name used when JPWL is on */
-#define JPWL_EXPECTED_COMPONENTS 3 /**< Expect this number of components, so you'll find better the first EPB */
-#define JPWL_MAXIMUM_TILES 8192 /**< Expect this maximum number of tiles, to avoid some crashes */
-#define JPWL_MAXIMUM_HAMMING 2 /**< Expect this maximum number of bit errors in marker id's */
-#define JPWL_MAXIMUM_EPB_ROOM 65450 /**< Expect this maximum number of bytes for composition of EPBs */
-/* <<UniPG */
-
-/* 
-==========================================================
-   enum definitions
-==========================================================
-*/
-/** 
-Rsiz Capabilities
-*/
-typedef enum RSIZ_CAPABILITIES {
-	STD_RSIZ = 0,		/** Standard JPEG2000 profile*/
-	CINEMA2K = 3,		/** Profile name for a 2K image*/
-	CINEMA4K = 4		/** Profile name for a 4K image*/
-} OPJ_RSIZ_CAPABILITIES;
-
-/** 
-Digital cinema operation mode 
-*/
-typedef enum CINEMA_MODE {
-	OFF = 0,					/** Not Digital Cinema*/
-	CINEMA2K_24 = 1,	/** 2K Digital Cinema at 24 fps*/
-	CINEMA2K_48 = 2,	/** 2K Digital Cinema at 48 fps*/
-	CINEMA4K_24 = 3		/** 4K Digital Cinema at 24 fps*/
-}OPJ_CINEMA_MODE;
-
-/** 
-Progression order 
-*/
-typedef enum PROG_ORDER {
-	PROG_UNKNOWN = -1,	/**< place-holder */
-	LRCP = 0,		/**< layer-resolution-component-precinct order */
-	RLCP = 1,		/**< resolution-layer-component-precinct order */
-	RPCL = 2,		/**< resolution-precinct-component-layer order */
-	PCRL = 3,		/**< precinct-component-resolution-layer order */
-	CPRL = 4		/**< component-precinct-resolution-layer order */
-} OPJ_PROG_ORDER;
-
-/**
-Supported image color spaces
-*/
-typedef enum COLOR_SPACE {
-	CLRSPC_UNKNOWN = -1,	/**< place-holder */
-	CLRSPC_SRGB = 1,		/**< sRGB */
-	CLRSPC_GRAY = 2,		/**< grayscale */
-	CLRSPC_SYCC = 3			/**< YUV */
-} OPJ_COLOR_SPACE;
-
-/**
-Supported codec
-*/
-typedef enum CODEC_FORMAT {
-	CODEC_UNKNOWN = -1,	/**< place-holder */
-	CODEC_J2K = 0,		/**< JPEG-2000 codestream : read/write */
-	CODEC_JPT = 1,		/**< JPT-stream (JPEG 2000, JPIP) : read only */
-	CODEC_JP2 = 2		/**< JPEG-2000 file format : read/write */
-} OPJ_CODEC_FORMAT;
-
-/** 
-Limit decoding to certain portions of the codestream. 
-*/
-typedef enum LIMIT_DECODING {
-	NO_LIMITATION = 0,				  /**< No limitation for the decoding. The entire codestream will de decoded */
-	LIMIT_TO_MAIN_HEADER = 1,		/**< The decoding is limited to the Main Header */
-	DECODE_ALL_BUT_PACKETS = 2	/**< Decode everything except the JPEG 2000 packets */
-} OPJ_LIMIT_DECODING;
-
-/* 
-==========================================================
-   event manager typedef definitions
-==========================================================
-*/
-
-/**
-Callback function prototype for events
- at param msg Event message
- at param client_data 
-*/
-typedef void (*opj_msg_callback) (const char *msg, void *client_data);
-
-/**
-Message handler object
-used for 
-<ul>
-<li>Error messages
-<li>Warning messages
-<li>Debugging messages
-</ul>
-*/
-typedef struct opj_event_mgr {
-	/** Error message callback if available, NULL otherwise */
-	opj_msg_callback error_handler;
-	/** Warning message callback if available, NULL otherwise */
-	opj_msg_callback warning_handler;
-	/** Debug message callback if available, NULL otherwise */
-	opj_msg_callback info_handler;
-} opj_event_mgr_t;
-
-
-/* 
-==========================================================
-   codec typedef definitions
-==========================================================
-*/
-
-/**
-Progression order changes
-*/
-typedef struct opj_poc {
-	/** Resolution num start, Component num start, given by POC */
-	int resno0, compno0;
-	/** Layer num end,Resolution num end, Component num end, given by POC */
-	int layno1, resno1, compno1;
-	/** Layer num start,Precinct num start, Precinct num end */
-	int layno0, precno0, precno1;
-	/** Progression order enum*/
-	OPJ_PROG_ORDER prg1,prg;
-	/** Progression order string*/
-	char progorder[5];
-	/** Tile number */
-	int tile;
-	/** Start and end values for Tile width and height*/
-	int tx0,tx1,ty0,ty1;
-	/** Start value, initialised in pi_initialise_encode*/
-	int layS, resS, compS, prcS;
-	/** End value, initialised in pi_initialise_encode */
-	int layE, resE, compE, prcE;
-	/** Start and end values of Tile width and height, initialised in pi_initialise_encode*/
-	int txS,txE,tyS,tyE,dx,dy;
-	/** Temporary values for Tile parts, initialised in pi_create_encode */
-	int lay_t, res_t, comp_t, prc_t,tx0_t,ty0_t;
-} opj_poc_t;
-
-/**
-Compression parameters
-*/
-typedef struct opj_cparameters {
-	/** size of tile: tile_size_on = false (not in argument) or = true (in argument) */
-	bool tile_size_on;
-	/** XTOsiz */
-	int cp_tx0;
-	/** YTOsiz */
-	int cp_ty0;
-	/** XTsiz */
-	int cp_tdx;
-	/** YTsiz */
-	int cp_tdy;
-	/** allocation by rate/distortion */
-	int cp_disto_alloc;
-	/** allocation by fixed layer */
-	int cp_fixed_alloc;
-	/** add fixed_quality */
-	int cp_fixed_quality;
-	/** fixed layer */
-	int *cp_matrice;
-	/** comment for coding */
-	char *cp_comment;
-	/** csty : coding style */
-	int csty;
-	/** progression order (default LRCP) */
-	OPJ_PROG_ORDER prog_order;
-	/** progression order changes */
-	opj_poc_t POC[32];
-	/** number of progression order changes (POC), default to 0 */
-	int numpocs;
-	/** number of layers */
-	int tcp_numlayers;
-	/** rates of layers */
-	float tcp_rates[100];
-	/** different psnr for successive layers */
-	float tcp_distoratio[100];
-	/** number of resolutions */
-	int numresolution;
-	/** initial code block width, default to 64 */
- 	int cblockw_init;
-	/** initial code block height, default to 64 */
-	int cblockh_init;
-	/** mode switch (cblk_style) */
-	int mode;
-	/** 1 : use the irreversible DWT 9-7, 0 : use lossless compression (default) */
-	int irreversible;
-	/** region of interest: affected component in [0..3], -1 means no ROI */
-	int roi_compno;
-	/** region of interest: upshift value */
-	int roi_shift;
-	/* number of precinct size specifications */
-	int res_spec;
-	/** initial precinct width */
-	int prcw_init[J2K_MAXRLVLS];
-	/** initial precinct height */
-	int prch_init[J2K_MAXRLVLS];
-
-	/**@name command line encoder parameters (not used inside the library) */
-	/*@{*/
-	/** input file name */
-	char infile[OPJ_PATH_LEN];
-	/** output file name */
-	char outfile[OPJ_PATH_LEN];
-	/** DEPRECATED. Index generation is now handeld with the opj_encode_with_info() function. Set to NULL */
-	int index_on;
-	/** DEPRECATED. Index generation is now handeld with the opj_encode_with_info() function. Set to NULL */
-	char index[OPJ_PATH_LEN];
-	/** subimage encoding: origin image offset in x direction */
-	int image_offset_x0;
-	/** subimage encoding: origin image offset in y direction */
-	int image_offset_y0;
-	/** subsampling value for dx */
-	int subsampling_dx;
-	/** subsampling value for dy */
-	int subsampling_dy;
-	/** input file format 0: PGX, 1: PxM, 2: BMP 3:TIF*/
-	int decod_format;
-	/** output file format 0: J2K, 1: JP2, 2: JPT */
-	int cod_format;
-	/*@}*/
-
-/* UniPG>> */
-	/**@name JPWL encoding parameters */
-	/*@{*/
-	/** enables writing of EPC in MH, thus activating JPWL */
-	bool jpwl_epc_on;
-	/** error protection method for MH (0,1,16,32,37-128) */
-	int jpwl_hprot_MH;
-	/** tile number of header protection specification (>=0) */
-	int jpwl_hprot_TPH_tileno[JPWL_MAX_NO_TILESPECS];
-	/** error protection methods for TPHs (0,1,16,32,37-128) */
-	int jpwl_hprot_TPH[JPWL_MAX_NO_TILESPECS];
-	/** tile number of packet protection specification (>=0) */
-	int jpwl_pprot_tileno[JPWL_MAX_NO_PACKSPECS];
-	/** packet number of packet protection specification (>=0) */
-	int jpwl_pprot_packno[JPWL_MAX_NO_PACKSPECS];
-	/** error protection methods for packets (0,1,16,32,37-128) */
-	int jpwl_pprot[JPWL_MAX_NO_PACKSPECS];
-	/** enables writing of ESD, (0=no/1/2 bytes) */
-	int jpwl_sens_size;
-	/** sensitivity addressing size (0=auto/2/4 bytes) */
-	int jpwl_sens_addr;
-	/** sensitivity range (0-3) */
-	int jpwl_sens_range;
-	/** sensitivity method for MH (-1=no,0-7) */
-	int jpwl_sens_MH;
-	/** tile number of sensitivity specification (>=0) */
-	int jpwl_sens_TPH_tileno[JPWL_MAX_NO_TILESPECS];
-	/** sensitivity methods for TPHs (-1=no,0-7) */
-	int jpwl_sens_TPH[JPWL_MAX_NO_TILESPECS];
-	/*@}*/
-/* <<UniPG */
-
-	/** Digital Cinema compliance 0-not compliant, 1-compliant*/
-	OPJ_CINEMA_MODE cp_cinema;
-	/** Maximum rate for each component. If == 0, component size limitation is not considered */
-	int max_comp_size;
-	/** Profile name*/
-	OPJ_RSIZ_CAPABILITIES cp_rsiz;
-	/** Tile part generation*/
-	char tp_on;
-	/** Flag for Tile part generation*/
-	char tp_flag;
-	/** MCT (multiple component transform) */
-	char tcp_mct;
-} opj_cparameters_t;
-
-/**
-Decompression parameters
-*/
-typedef struct opj_dparameters {
-	/** 
-	Set the number of highest resolution levels to be discarded. 
-	The image resolution is effectively divided by 2 to the power of the number of discarded levels. 
-	The reduce factor is limited by the smallest total number of decomposition levels among tiles.
-	if != 0, then original dimension divided by 2^(reduce); 
-	if == 0 or not used, image is decoded to the full resolution 
-	*/
-	int cp_reduce;
-	/** 
-	Set the maximum number of quality layers to decode. 
-	If there are less quality layers than the specified number, all the quality layers are decoded.
-	if != 0, then only the first "layer" layers are decoded; 
-	if == 0 or not used, all the quality layers are decoded 
-	*/
-	int cp_layer;
-
-	/**@name command line encoder parameters (not used inside the library) */
-	/*@{*/
-	/** input file name */
-	char infile[OPJ_PATH_LEN];
-	/** output file name */
-	char outfile[OPJ_PATH_LEN];
-	/** input file format 0: J2K, 1: JP2, 2: JPT */
-	int decod_format;
-	/** output file format 0: PGX, 1: PxM, 2: BMP */
-	int cod_format;
-	/*@}*/
-
-/* UniPG>> */
-	/**@name JPWL decoding parameters */
-	/*@{*/
-	/** activates the JPWL correction capabilities */
-	bool jpwl_correct;
-	/** expected number of components */
-	int jpwl_exp_comps;
-	/** maximum number of tiles */
-	int jpwl_max_tiles;
-	/*@}*/
-/* <<UniPG */
-
-	/** 
-	Specify whether the decoding should be done on the entire codestream, or be limited to the main header
-	Limiting the decoding to the main header makes it possible to extract the characteristics of the codestream
-	if == NO_LIMITATION, the entire codestream is decoded; 
-	if == LIMIT_TO_MAIN_HEADER, only the main header is decoded; 
-	*/
-	OPJ_LIMIT_DECODING cp_limit_decoding;
-
-} opj_dparameters_t;
-
-/** Common fields between JPEG-2000 compression and decompression master structs. */
-
-#define opj_common_fields \
-	opj_event_mgr_t *event_mgr;	/**< pointer to the event manager */\
-	void * client_data;			/**< Available for use by application */\
-	bool is_decompressor;		/**< So common code can tell which is which */\
-	OPJ_CODEC_FORMAT codec_format;	/**< selected codec */\
-	void *j2k_handle;			/**< pointer to the J2K codec */\
-	void *jp2_handle;			/**< pointer to the JP2 codec */\
-	void *mj2_handle			/**< pointer to the MJ2 codec */
-	
-/* Routines that are to be used by both halves of the library are declared
- * to receive a pointer to this structure.  There are no actual instances of
- * opj_common_struct_t, only of opj_cinfo_t and opj_dinfo_t.
- */
-typedef struct opj_common_struct {
-  opj_common_fields;		/* Fields common to both master struct types */
-  /* Additional fields follow in an actual opj_cinfo_t or
-   * opj_dinfo_t.  All three structs must agree on these
-   * initial fields!  (This would be a lot cleaner in C++.)
-   */
-} opj_common_struct_t;
-
-typedef opj_common_struct_t * opj_common_ptr;
-
-/**
-Compression context info
-*/
-typedef struct opj_cinfo {
-	/** Fields shared with opj_dinfo_t */
-	opj_common_fields;	
-	/* other specific fields go here */
-} opj_cinfo_t;
-
-/**
-Decompression context info
-*/
-typedef struct opj_dinfo {
-	/** Fields shared with opj_cinfo_t */
-	opj_common_fields;	
-	/* other specific fields go here */
-} opj_dinfo_t;
-
-/* 
-==========================================================
-   I/O stream typedef definitions
-==========================================================
-*/
-
-/*
- * Stream open flags.
- */
-/** The stream was opened for reading. */
-#define OPJ_STREAM_READ	0x0001
-/** The stream was opened for writing. */
-#define OPJ_STREAM_WRITE 0x0002
-
-/**
-Byte input-output stream (CIO)
-*/
-typedef struct opj_cio {
-	/** codec context */
-	opj_common_ptr cinfo;
-
-	/** open mode (read/write) either OPJ_STREAM_READ or OPJ_STREAM_WRITE */
-	int openmode;
-	/** pointer to the start of the buffer */
-	unsigned char *buffer;
-	/** buffer size in bytes */
-	int length;
-
-	/** pointer to the start of the stream */
-	unsigned char *start;
-	/** pointer to the end of the stream */
-	unsigned char *end;
-	/** pointer to the current position */
-	unsigned char *bp;
-} opj_cio_t;
-
-/* 
-==========================================================
-   image typedef definitions
-==========================================================
-*/
-
-/**
-Defines a single image component
-*/
-typedef struct opj_image_comp {
-	/** XRsiz: horizontal separation of a sample of ith component with respect to the reference grid */
-	int dx;
-	/** YRsiz: vertical separation of a sample of ith component with respect to the reference grid */
-	int dy;
-	/** data width */
-	int w;
-	/** data height */
-	int h;
-	/** x component offset compared to the whole image */
-	int x0;
-	/** y component offset compared to the whole image */
-	int y0;
-	/** precision */
-	int prec;
-	/** image depth in bits */
-	int bpp;
-	/** signed (1) / unsigned (0) */
-	int sgnd;
-	/** number of decoded resolution */
-	int resno_decoded;
-	/** number of division by 2 of the out image compared to the original size of image */
-	int factor;
-	/** image component data */
-	int *data;
-} opj_image_comp_t;
-
-/** 
-Defines image data and characteristics
-*/
-typedef struct opj_image {
-	/** XOsiz: horizontal offset from the origin of the reference grid to the left side of the image area */
-	int x0;
-	/** YOsiz: vertical offset from the origin of the reference grid to the top side of the image area */
-	int y0;
-	/** Xsiz: width of the reference grid */
-	int x1;
-	/** Ysiz: height of the reference grid */
-	int y1;
-	/** number of components in the image */
-	int numcomps;
-	/** color space: sRGB, Greyscale or YUV */
-	OPJ_COLOR_SPACE color_space;
-	/** image components */
-	opj_image_comp_t *comps;
-} opj_image_t;
-
-/**
-Component parameters structure used by the opj_image_create function
-*/
-typedef struct opj_image_comptparm {
-	/** XRsiz: horizontal separation of a sample of ith component with respect to the reference grid */
-	int dx;
-	/** YRsiz: vertical separation of a sample of ith component with respect to the reference grid */
-	int dy;
-	/** data width */
-	int w;
-	/** data height */
-	int h;
-	/** x component offset compared to the whole image */
-	int x0;
-	/** y component offset compared to the whole image */
-	int y0;
-	/** precision */
-	int prec;
-	/** image depth in bits */
-	int bpp;
-	/** signed (1) / unsigned (0) */
-	int sgnd;
-} opj_image_cmptparm_t;
-
-/* 
-==========================================================
-   Information on the JPEG 2000 codestream
-==========================================================
-*/
-
-/**
-Index structure : Information concerning a packet inside tile
-*/
-typedef struct opj_packet_info {
-	/** packet start position (including SOP marker if it exists) */
-	int start_pos;
-	/** end of packet header position (including EPH marker if it exists)*/
-	int end_ph_pos;
-	/** packet end position */
-	int end_pos;
-	/** packet distorsion */
-	double disto;
-} opj_packet_info_t;
-
-/**
-Index structure : Information concerning tile-parts
-*/
-typedef struct opj_tp_info {
-	/** start position of tile part */
-	int tp_start_pos;
-	/** end position of tile part header */
-	int tp_end_header;
-	/** end position of tile part */
-	int tp_end_pos;
-	/** start packet of tile part */
-	int tp_start_pack;
-	/** number of packets of tile part */
-	int tp_numpacks;
-} opj_tp_info_t;
-
-/**
-Index structure : information regarding tiles 
-*/
-typedef struct opj_tile_info {
-	/** value of thresh for each layer by tile cfr. Marcela   */
-	double *thresh;
-	/** number of tile */
-	int tileno;
-	/** start position */
-	int start_pos;
-	/** end position of the header */
-	int end_header;
-	/** end position */
-	int end_pos;
-	/** precinct number for each resolution level (width) */
-	int pw[33];
-	/** precinct number for each resolution level (height) */
-	int ph[33];
-	/** precinct size (in power of 2), in X for each resolution level */
-	int pdx[33];
-	/** precinct size (in power of 2), in Y for each resolution level */
-	int pdy[33];
-	/** information concerning packets inside tile */
-	opj_packet_info_t *packet;
-	/** add fixed_quality */
-	int numpix;
-	/** add fixed_quality */
-	double distotile;
-	/** number of tile parts */
-	int num_tps;
-	/** information concerning tile parts */
-	opj_tp_info_t *tp;
-} opj_tile_info_t;
-
-/* UniPG>> */
-/**
-Marker structure
-*/
-typedef struct opj_marker_info_t {
-	/** marker type */
-	unsigned short int type;
-	/** position in codestream */
-	int pos;
-	/** length, marker val included */
-	int len;
-} opj_marker_info_t;
-/* <<UniPG */
-
-/**
-Index structure of the codestream
-*/
-typedef struct opj_codestream_info {
-	/** maximum distortion reduction on the whole image (add for Marcela) */
-	double D_max;
-	/** packet number */
-	int packno;
-	/** writing the packet in the index with t2_encode_packets */
-	int index_write;
-	/** image width */
-	int image_w;
-	/** image height */
-	int image_h;
-	/** progression order */
-	OPJ_PROG_ORDER prog;
-	/** tile size in x */
-	int tile_x;
-	/** tile size in y */
-	int tile_y;
-	/** */
-	int tile_Ox;
-	/** */
-	int tile_Oy;
-	/** number of tiles in X */
-	int tw;
-	/** number of tiles in Y */
-	int th;
-	/** component numbers */
-	int numcomps;
-	/** number of layer */
-	int numlayers;
-	/** number of decomposition for each component */
-	int *numdecompos;
-/* UniPG>> */
-	/** number of markers */
-	int marknum;
-	/** list of markers */
-	opj_marker_info_t *marker;
-	/** actual size of markers array */
-	int maxmarknum;
-/* <<UniPG */
-	/** main header position */
-	int main_head_start;
-	/** main header position */
-	int main_head_end;
-	/** codestream's size */
-	int codestream_size;
-	/** information regarding tiles inside image */
-	opj_tile_info_t *tile;
-} opj_codestream_info_t;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* 
-==========================================================
-   openjpeg version
-==========================================================
-*/
-
-OPJ_API const char * OPJ_CALLCONV opj_version(void);
-
-/* 
-==========================================================
-   image functions definitions
-==========================================================
-*/
-
-/**
-Create an image
- at param numcmpts number of components
- at param cmptparms components parameters
- at param clrspc image color space
- at return returns a new image structure if successful, returns NULL otherwise
-*/
-OPJ_API opj_image_t* OPJ_CALLCONV opj_image_create(int numcmpts, opj_image_cmptparm_t *cmptparms, OPJ_COLOR_SPACE clrspc);
-
-/**
-Deallocate any resources associated with an image
- at param image image to be destroyed
-*/
-OPJ_API void OPJ_CALLCONV opj_image_destroy(opj_image_t *image);
-
-/* 
-==========================================================
-   stream functions definitions
-==========================================================
-*/
-
-/**
-Open and allocate a memory stream for read / write. 
-On reading, the user must provide a buffer containing encoded data. The buffer will be 
-wrapped by the returned CIO handle. 
-On writing, buffer parameters must be set to 0: a buffer will be allocated by the library 
-to contain encoded data. 
- at param cinfo Codec context info
- at param buffer Reading: buffer address. Writing: NULL
- at param length Reading: buffer length. Writing: 0
- at return Returns a CIO handle if successful, returns NULL otherwise
-*/
-OPJ_API opj_cio_t* OPJ_CALLCONV opj_cio_open(opj_common_ptr cinfo, unsigned char *buffer, int length);
-
-/**
-Close and free a CIO handle
- at param cio CIO handle to free
-*/
-OPJ_API void OPJ_CALLCONV opj_cio_close(opj_cio_t *cio);
-
-/**
-Get position in byte stream
- at param cio CIO handle
- at return Returns the position in bytes
-*/
-OPJ_API int OPJ_CALLCONV cio_tell(opj_cio_t *cio);
-/**
-Set position in byte stream
- at param cio CIO handle
- at param pos Position, in number of bytes, from the beginning of the stream
-*/
-OPJ_API void OPJ_CALLCONV cio_seek(opj_cio_t *cio, int pos);
-
-/* 
-==========================================================
-   event manager functions definitions
-==========================================================
-*/
-
-OPJ_API opj_event_mgr_t* OPJ_CALLCONV opj_set_event_mgr(opj_common_ptr cinfo, opj_event_mgr_t *event_mgr, void *context);
-
-/* 
-==========================================================
-   codec functions definitions
-==========================================================
-*/
-/**
-Creates a J2K/JPT/JP2 decompression structure
- at param format Decoder to select
- at return Returns a handle to a decompressor if successful, returns NULL otherwise
-*/
-OPJ_API opj_dinfo_t* OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT format);
-/**
-Destroy a decompressor handle
- at param dinfo decompressor handle to destroy
-*/
-OPJ_API void OPJ_CALLCONV opj_destroy_decompress(opj_dinfo_t *dinfo);
-/**
-Set decoding parameters to default values
- at param parameters Decompression parameters
-*/
-OPJ_API void OPJ_CALLCONV opj_set_default_decoder_parameters(opj_dparameters_t *parameters);
-/**
-Setup the decoder decoding parameters using user parameters.
-Decoding parameters are returned in j2k->cp. 
- at param dinfo decompressor handle
- at param parameters decompression parameters
-*/
-OPJ_API void OPJ_CALLCONV opj_setup_decoder(opj_dinfo_t *dinfo, opj_dparameters_t *parameters);
-/**
-Decode an image from a JPEG-2000 codestream 
- at param dinfo decompressor handle
- at param cio Input buffer stream
- at return Returns a decoded image if successful, returns NULL otherwise
-*/
-OPJ_API opj_image_t* OPJ_CALLCONV opj_decode(opj_dinfo_t *dinfo, opj_cio_t *cio);
-
-/**
-Decode an image from a JPEG-2000 codestream and extract the codestream information
- at param dinfo decompressor handle
- at param cio Input buffer stream
- at param cstr_info Codestream information structure if needed afterwards, NULL otherwise
- at return Returns a decoded image if successful, returns NULL otherwise
-*/
-OPJ_API opj_image_t* OPJ_CALLCONV opj_decode_with_info(opj_dinfo_t *dinfo, opj_cio_t *cio, opj_codestream_info_t *cstr_info);
-/**
-Creates a J2K/JP2 compression structure
- at param format Coder to select
- at return Returns a handle to a compressor if successful, returns NULL otherwise
-*/
-OPJ_API opj_cinfo_t* OPJ_CALLCONV opj_create_compress(OPJ_CODEC_FORMAT format);
-/**
-Destroy a compressor handle
- at param cinfo compressor handle to destroy
-*/
-OPJ_API void OPJ_CALLCONV opj_destroy_compress(opj_cinfo_t *cinfo);
-/**
-Set encoding parameters to default values, that means : 
-<ul>
-<li>Lossless
-<li>1 tile
-<li>Size of precinct : 2^15 x 2^15 (means 1 precinct)
-<li>Size of code-block : 64 x 64
-<li>Number of resolutions: 6
-<li>No SOP marker in the codestream
-<li>No EPH marker in the codestream
-<li>No sub-sampling in x or y direction
-<li>No mode switch activated
-<li>Progression order: LRCP
-<li>No index file
-<li>No ROI upshifted
-<li>No offset of the origin of the image
-<li>No offset of the origin of the tiles
-<li>Reversible DWT 5-3
-</ul>
- at param parameters Compression parameters
-*/
-OPJ_API void OPJ_CALLCONV opj_set_default_encoder_parameters(opj_cparameters_t *parameters);
-/**
-Setup the encoder parameters using the current image and using user parameters. 
- at param cinfo Compressor handle
- at param parameters Compression parameters
- at param image Input filled image
-*/
-OPJ_API void OPJ_CALLCONV opj_setup_encoder(opj_cinfo_t *cinfo, opj_cparameters_t *parameters, opj_image_t *image);
-/**
-Encode an image into a JPEG-2000 codestream
- at param cinfo compressor handle
- at param cio Output buffer stream
- at param image Image to encode
- at param index Depreacted -> Set to NULL. To extract index, used opj_encode_wci()
- at return Returns true if successful, returns false otherwise
-*/
-OPJ_API bool OPJ_CALLCONV opj_encode(opj_cinfo_t *cinfo, opj_cio_t *cio, opj_image_t *image, char *index);
-/**
-Encode an image into a JPEG-2000 codestream and extract the codestream information
- at param cinfo compressor handle
- at param cio Output buffer stream
- at param image Image to encode
- at param cstr_info Codestream information structure if needed afterwards, NULL otherwise
- at return Returns true if successful, returns false otherwise
-*/
-OPJ_API bool OPJ_CALLCONV opj_encode_with_info(opj_cinfo_t *cinfo, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info);
-/**
-Destroy Codestream information after compression or decompression
- at param cstr_info Codestream information structure
-*/
-OPJ_API void OPJ_CALLCONV opj_destroy_cstr_info(opj_codestream_info_t *cstr_info);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* OPENJPEG_H */
diff --git a/extra_lib/include/openssl/asn1.h b/extra_lib/include/openssl/asn1.h
deleted file mode 100644
index 59540e4..0000000
--- a/extra_lib/include/openssl/asn1.h
+++ /dev/null
@@ -1,1402 +0,0 @@
-/* crypto/asn1/asn1.h */
-/* Copyright (C) 1995-1998 Eric Young (eay at cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay at cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh at cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay at cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh at cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef HEADER_ASN1_H
-#define HEADER_ASN1_H
-
-#include <time.h>
-#include <openssl/e_os2.h>
-#ifndef OPENSSL_NO_BIO
-#include <openssl/bio.h>
-#endif
-#include <openssl/stack.h>
-#include <openssl/safestack.h>
-
-#include <openssl/symhacks.h>
-
-#include <openssl/ossl_typ.h>
-#ifndef OPENSSL_NO_DEPRECATED
-#include <openssl/bn.h>
-#endif
-
-#ifdef OPENSSL_BUILD_SHLIBCRYPTO
-# undef OPENSSL_EXTERN
-# define OPENSSL_EXTERN OPENSSL_EXPORT
-#endif
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-#define V_ASN1_UNIVERSAL		0x00
-#define	V_ASN1_APPLICATION		0x40
-#define V_ASN1_CONTEXT_SPECIFIC		0x80
-#define V_ASN1_PRIVATE			0xc0
-
-#define V_ASN1_CONSTRUCTED		0x20
-#define V_ASN1_PRIMITIVE_TAG		0x1f
-#define V_ASN1_PRIMATIVE_TAG		0x1f
-
-#define V_ASN1_APP_CHOOSE		-2	/* let the recipient choose */
-#define V_ASN1_OTHER			-3	/* used in ASN1_TYPE */
-#define V_ASN1_ANY			-4	/* used in ASN1 template code */
-
-#define V_ASN1_NEG			0x100	/* negative flag */
-
-#define V_ASN1_UNDEF			-1
-#define V_ASN1_EOC			0
-#define V_ASN1_BOOLEAN			1	/**/
-#define V_ASN1_INTEGER			2
-#define V_ASN1_NEG_INTEGER		(2 | V_ASN1_NEG)
-#define V_ASN1_BIT_STRING		3
-#define V_ASN1_OCTET_STRING		4
-#define V_ASN1_NULL			5
-#define V_ASN1_OBJECT			6
-#define V_ASN1_OBJECT_DESCRIPTOR	7
-#define V_ASN1_EXTERNAL			8
-#define V_ASN1_REAL			9
-#define V_ASN1_ENUMERATED		10
-#define V_ASN1_NEG_ENUMERATED		(10 | V_ASN1_NEG)
-#define V_ASN1_UTF8STRING		12
-#define V_ASN1_SEQUENCE			16
-#define V_ASN1_SET			17
-#define V_ASN1_NUMERICSTRING		18	/**/
-#define V_ASN1_PRINTABLESTRING		19
-#define V_ASN1_T61STRING		20
-#define V_ASN1_TELETEXSTRING		20	/* alias */
-#define V_ASN1_VIDEOTEXSTRING		21	/**/
-#define V_ASN1_IA5STRING		22
-#define V_ASN1_UTCTIME			23
-#define V_ASN1_GENERALIZEDTIME		24	/**/
-#define V_ASN1_GRAPHICSTRING		25	/**/
-#define V_ASN1_ISO64STRING		26	/**/
-#define V_ASN1_VISIBLESTRING		26	/* alias */
-#define V_ASN1_GENERALSTRING		27	/**/
-#define V_ASN1_UNIVERSALSTRING		28	/**/
-#define V_ASN1_BMPSTRING		30
-
-/* For use with d2i_ASN1_type_bytes() */
-#define B_ASN1_NUMERICSTRING	0x0001
-#define B_ASN1_PRINTABLESTRING	0x0002
-#define B_ASN1_T61STRING	0x0004
-#define B_ASN1_TELETEXSTRING	0x0004
-#define B_ASN1_VIDEOTEXSTRING	0x0008
-#define B_ASN1_IA5STRING	0x0010
-#define B_ASN1_GRAPHICSTRING	0x0020
-#define B_ASN1_ISO64STRING	0x0040
-#define B_ASN1_VISIBLESTRING	0x0040
-#define B_ASN1_GENERALSTRING	0x0080
-#define B_ASN1_UNIVERSALSTRING	0x0100
-#define B_ASN1_OCTET_STRING	0x0200
-#define B_ASN1_BIT_STRING	0x0400
-#define B_ASN1_BMPSTRING	0x0800
-#define B_ASN1_UNKNOWN		0x1000
-#define B_ASN1_UTF8STRING	0x2000
-#define B_ASN1_UTCTIME		0x4000
-#define B_ASN1_GENERALIZEDTIME	0x8000
-#define B_ASN1_SEQUENCE		0x10000
-
-/* For use with ASN1_mbstring_copy() */
-#define MBSTRING_FLAG		0x1000
-#define MBSTRING_UTF8		(MBSTRING_FLAG)
-#define MBSTRING_ASC		(MBSTRING_FLAG|1)
-#define MBSTRING_BMP		(MBSTRING_FLAG|2)
-#define MBSTRING_UNIV		(MBSTRING_FLAG|4)
-
-#define SMIME_OLDMIME		0x400
-#define SMIME_CRLFEOL		0x800
-#define SMIME_STREAM		0x1000
-
-struct X509_algor_st;
-DECLARE_STACK_OF(X509_ALGOR)
-
-#define DECLARE_ASN1_SET_OF(type) /* filled in by mkstack.pl */
-#define IMPLEMENT_ASN1_SET_OF(type) /* nothing, no longer needed */
-
-/* We MUST make sure that, except for constness, asn1_ctx_st and
-   asn1_const_ctx are exactly the same.  Fortunately, as soon as
-   the old ASN1 parsing macros are gone, we can throw this away
-   as well... */
-typedef struct asn1_ctx_st
-	{
-	unsigned char *p;/* work char pointer */
-	int eos;	/* end of sequence read for indefinite encoding */
-	int error;	/* error code to use when returning an error */
-	int inf;	/* constructed if 0x20, indefinite is 0x21 */
-	int tag;	/* tag from last 'get object' */
-	int xclass;	/* class from last 'get object' */
-	long slen;	/* length of last 'get object' */
-	unsigned char *max; /* largest value of p allowed */
-	unsigned char *q;/* temporary variable */
-	unsigned char **pp;/* variable */
-	int line;	/* used in error processing */
-	} ASN1_CTX;
-
-typedef struct asn1_const_ctx_st
-	{
-	const unsigned char *p;/* work char pointer */
-	int eos;	/* end of sequence read for indefinite encoding */
-	int error;	/* error code to use when returning an error */
-	int inf;	/* constructed if 0x20, indefinite is 0x21 */
-	int tag;	/* tag from last 'get object' */
-	int xclass;	/* class from last 'get object' */
-	long slen;	/* length of last 'get object' */
-	const unsigned char *max; /* largest value of p allowed */
-	const unsigned char *q;/* temporary variable */
-	const unsigned char **pp;/* variable */
-	int line;	/* used in error processing */
-	} ASN1_const_CTX;
-
-/* These are used internally in the ASN1_OBJECT to keep track of
- * whether the names and data need to be free()ed */
-#define ASN1_OBJECT_FLAG_DYNAMIC	 0x01	/* internal use */
-#define ASN1_OBJECT_FLAG_CRITICAL	 0x02	/* critical x509v3 object id */
-#define ASN1_OBJECT_FLAG_DYNAMIC_STRINGS 0x04	/* internal use */
-#define ASN1_OBJECT_FLAG_DYNAMIC_DATA 	 0x08	/* internal use */
-typedef struct asn1_object_st
-	{
-	const char *sn,*ln;
-	int nid;
-	int length;
-	const unsigned char *data;	/* data remains const after init */
-	int flags;	/* Should we free this one */
-	} ASN1_OBJECT;
-
-#define ASN1_STRING_FLAG_BITS_LEFT 0x08 /* Set if 0x07 has bits left value */
-/* This indicates that the ASN1_STRING is not a real value but just a place
- * holder for the location where indefinite length constructed data should
- * be inserted in the memory buffer 
- */
-#define ASN1_STRING_FLAG_NDEF 0x010 
-
-/* This flag is used by the CMS code to indicate that a string is not
- * complete and is a place holder for content when it had all been 
- * accessed. The flag will be reset when content has been written to it.
- */
-
-#define ASN1_STRING_FLAG_CONT 0x020 
-/* This flag is used by ASN1 code to indicate an ASN1_STRING is an MSTRING
- * type.
- */
-#define ASN1_STRING_FLAG_MSTRING 0x040 
-/* This is the base type that holds just about everything :-) */
-typedef struct asn1_string_st
-	{
-	int length;
-	int type;
-	unsigned char *data;
-	/* The value of the following field depends on the type being
-	 * held.  It is mostly being used for BIT_STRING so if the
-	 * input data has a non-zero 'unused bits' value, it will be
-	 * handled correctly */
-	long flags;
-	} ASN1_STRING;
-
-/* ASN1_ENCODING structure: this is used to save the received
- * encoding of an ASN1 type. This is useful to get round
- * problems with invalid encodings which can break signatures.
- */
-
-typedef struct ASN1_ENCODING_st
-	{
-	unsigned char *enc;	/* DER encoding */
-	long len;		/* Length of encoding */
-	int modified;		 /* set to 1 if 'enc' is invalid */
-	} ASN1_ENCODING;
-
-/* Used with ASN1 LONG type: if a long is set to this it is omitted */
-#define ASN1_LONG_UNDEF	0x7fffffffL
-
-#define STABLE_FLAGS_MALLOC	0x01
-#define STABLE_NO_MASK		0x02
-#define DIRSTRING_TYPE	\
- (B_ASN1_PRINTABLESTRING|B_ASN1_T61STRING|B_ASN1_BMPSTRING|B_ASN1_UTF8STRING)
-#define PKCS9STRING_TYPE (DIRSTRING_TYPE|B_ASN1_IA5STRING)
-
-typedef struct asn1_string_table_st {
-	int nid;
-	long minsize;
-	long maxsize;
-	unsigned long mask;
-	unsigned long flags;
-} ASN1_STRING_TABLE;
-
-DECLARE_STACK_OF(ASN1_STRING_TABLE)
-
-/* size limits: this stuff is taken straight from RFC2459 */
-
-#define ub_name				32768
-#define ub_common_name			64
-#define ub_locality_name		128
-#define ub_state_name			128
-#define ub_organization_name		64
-#define ub_organization_unit_name	64
-#define ub_title			64
-#define ub_email_address		128
-
-/* Declarations for template structures: for full definitions
- * see asn1t.h
- */
-typedef struct ASN1_TEMPLATE_st ASN1_TEMPLATE;
-typedef struct ASN1_ITEM_st ASN1_ITEM;
-typedef struct ASN1_TLC_st ASN1_TLC;
-/* This is just an opaque pointer */
-typedef struct ASN1_VALUE_st ASN1_VALUE;
-
-/* Declare ASN1 functions: the implement macro in in asn1t.h */
-
-#define DECLARE_ASN1_FUNCTIONS(type) DECLARE_ASN1_FUNCTIONS_name(type, type)
-
-#define DECLARE_ASN1_ALLOC_FUNCTIONS(type) \
-	DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, type)
-
-#define DECLARE_ASN1_FUNCTIONS_name(type, name) \
-	DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \
-	DECLARE_ASN1_ENCODE_FUNCTIONS(type, name, name)
-
-#define DECLARE_ASN1_FUNCTIONS_fname(type, itname, name) \
-	DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \
-	DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name)
-
-#define	DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name) \
-	type *d2i_##name(type **a, const unsigned char **in, long len); \
-	int i2d_##name(type *a, unsigned char **out); \
-	DECLARE_ASN1_ITEM(itname)
-
-#define	DECLARE_ASN1_ENCODE_FUNCTIONS_const(type, name) \
-	type *d2i_##name(type **a, const unsigned char **in, long len); \
-	int i2d_##name(const type *a, unsigned char **out); \
-	DECLARE_ASN1_ITEM(name)
-
-#define	DECLARE_ASN1_NDEF_FUNCTION(name) \
-	int i2d_##name##_NDEF(name *a, unsigned char **out);
-
-#define DECLARE_ASN1_FUNCTIONS_const(name) \
-	DECLARE_ASN1_ALLOC_FUNCTIONS(name) \
-	DECLARE_ASN1_ENCODE_FUNCTIONS_const(name, name)
-
-#define DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \
-	type *name##_new(void); \
-	void name##_free(type *a);
-
-#define DECLARE_ASN1_PRINT_FUNCTION(stname) \
-	DECLARE_ASN1_PRINT_FUNCTION_fname(stname, stname)
-
-#define DECLARE_ASN1_PRINT_FUNCTION_fname(stname, fname) \
-	int fname##_print_ctx(BIO *out, stname *x, int indent, \
-					 const ASN1_PCTX *pctx);
-
-#define D2I_OF(type) type *(*)(type **,const unsigned char **,long)
-#define I2D_OF(type) int (*)(type *,unsigned char **)
-#define I2D_OF_const(type) int (*)(const type *,unsigned char **)
-
-#define CHECKED_D2I_OF(type, d2i) \
-    ((d2i_of_void*) (1 ? d2i : ((D2I_OF(type))0)))
-#define CHECKED_I2D_OF(type, i2d) \
-    ((i2d_of_void*) (1 ? i2d : ((I2D_OF(type))0)))
-#define CHECKED_NEW_OF(type, xnew) \
-    ((void *(*)(void)) (1 ? xnew : ((type *(*)(void))0)))
-#define CHECKED_PTR_OF(type, p) \
-    ((void*) (1 ? p : (type*)0))
-#define CHECKED_PPTR_OF(type, p) \
-    ((void**) (1 ? p : (type**)0))
-
-#define TYPEDEF_D2I_OF(type) typedef type *d2i_of_##type(type **,const unsigned char **,long)
-#define TYPEDEF_I2D_OF(type) typedef int i2d_of_##type(type *,unsigned char **)
-#define TYPEDEF_D2I2D_OF(type) TYPEDEF_D2I_OF(type); TYPEDEF_I2D_OF(type)
-
-TYPEDEF_D2I2D_OF(void);
-
-/* The following macros and typedefs allow an ASN1_ITEM
- * to be embedded in a structure and referenced. Since
- * the ASN1_ITEM pointers need to be globally accessible
- * (possibly from shared libraries) they may exist in
- * different forms. On platforms that support it the
- * ASN1_ITEM structure itself will be globally exported.
- * Other platforms will export a function that returns
- * an ASN1_ITEM pointer.
- *
- * To handle both cases transparently the macros below
- * should be used instead of hard coding an ASN1_ITEM
- * pointer in a structure.
- *
- * The structure will look like this:
- *
- * typedef struct SOMETHING_st {
- *      ...
- *      ASN1_ITEM_EXP *iptr;
- *      ...
- * } SOMETHING; 
- *
- * It would be initialised as e.g.:
- *
- * SOMETHING somevar = {...,ASN1_ITEM_ref(X509),...};
- *
- * and the actual pointer extracted with:
- *
- * const ASN1_ITEM *it = ASN1_ITEM_ptr(somevar.iptr);
- *
- * Finally an ASN1_ITEM pointer can be extracted from an
- * appropriate reference with: ASN1_ITEM_rptr(X509). This
- * would be used when a function takes an ASN1_ITEM * argument.
- *
- */
-
-#ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION
-
-/* ASN1_ITEM pointer exported type */
-typedef const ASN1_ITEM ASN1_ITEM_EXP;
-
-/* Macro to obtain ASN1_ITEM pointer from exported type */
-#define ASN1_ITEM_ptr(iptr) (iptr)
-
-/* Macro to include ASN1_ITEM pointer from base type */
-#define ASN1_ITEM_ref(iptr) (&(iptr##_it))
-
-#define ASN1_ITEM_rptr(ref) (&(ref##_it))
-
-#define DECLARE_ASN1_ITEM(name) \
-	OPENSSL_EXTERN const ASN1_ITEM name##_it;
-
-#else
-
-/* Platforms that can't easily handle shared global variables are declared
- * as functions returning ASN1_ITEM pointers.
- */
-
-/* ASN1_ITEM pointer exported type */
-typedef const ASN1_ITEM * ASN1_ITEM_EXP(void);
-
-/* Macro to obtain ASN1_ITEM pointer from exported type */
-#define ASN1_ITEM_ptr(iptr) (iptr())
-
-/* Macro to include ASN1_ITEM pointer from base type */
-#define ASN1_ITEM_ref(iptr) (iptr##_it)
-
-#define ASN1_ITEM_rptr(ref) (ref##_it())
-
-#define DECLARE_ASN1_ITEM(name) \
-	const ASN1_ITEM * name##_it(void);
-
-#endif
-
-/* Parameters used by ASN1_STRING_print_ex() */
-
-/* These determine which characters to escape:
- * RFC2253 special characters, control characters and
- * MSB set characters
- */
-
-#define ASN1_STRFLGS_ESC_2253		1
-#define ASN1_STRFLGS_ESC_CTRL		2
-#define ASN1_STRFLGS_ESC_MSB		4
-
-
-/* This flag determines how we do escaping: normally
- * RC2253 backslash only, set this to use backslash and
- * quote.
- */
-
-#define ASN1_STRFLGS_ESC_QUOTE		8
-
-
-/* These three flags are internal use only. */
-
-/* Character is a valid PrintableString character */
-#define CHARTYPE_PRINTABLESTRING	0x10
-/* Character needs escaping if it is the first character */
-#define CHARTYPE_FIRST_ESC_2253		0x20
-/* Character needs escaping if it is the last character */
-#define CHARTYPE_LAST_ESC_2253		0x40
-
-/* NB the internal flags are safely reused below by flags
- * handled at the top level.
- */
-
-/* If this is set we convert all character strings
- * to UTF8 first 
- */
-
-#define ASN1_STRFLGS_UTF8_CONVERT	0x10
-
-/* If this is set we don't attempt to interpret content:
- * just assume all strings are 1 byte per character. This
- * will produce some pretty odd looking output!
- */
-
-#define ASN1_STRFLGS_IGNORE_TYPE	0x20
-
-/* If this is set we include the string type in the output */
-#define ASN1_STRFLGS_SHOW_TYPE		0x40
-
-/* This determines which strings to display and which to
- * 'dump' (hex dump of content octets or DER encoding). We can
- * only dump non character strings or everything. If we
- * don't dump 'unknown' they are interpreted as character
- * strings with 1 octet per character and are subject to
- * the usual escaping options.
- */
-
-#define ASN1_STRFLGS_DUMP_ALL		0x80
-#define ASN1_STRFLGS_DUMP_UNKNOWN	0x100
-
-/* These determine what 'dumping' does, we can dump the
- * content octets or the DER encoding: both use the
- * RFC2253 #XXXXX notation.
- */
-
-#define ASN1_STRFLGS_DUMP_DER		0x200
-
-/* All the string flags consistent with RFC2253,
- * escaping control characters isn't essential in
- * RFC2253 but it is advisable anyway.
- */
-
-#define ASN1_STRFLGS_RFC2253	(ASN1_STRFLGS_ESC_2253 | \
-				ASN1_STRFLGS_ESC_CTRL | \
-				ASN1_STRFLGS_ESC_MSB | \
-				ASN1_STRFLGS_UTF8_CONVERT | \
-				ASN1_STRFLGS_DUMP_UNKNOWN | \
-				ASN1_STRFLGS_DUMP_DER)
-
-DECLARE_STACK_OF(ASN1_INTEGER)
-DECLARE_ASN1_SET_OF(ASN1_INTEGER)
-
-DECLARE_STACK_OF(ASN1_GENERALSTRING)
-
-typedef struct asn1_type_st
-	{
-	int type;
-	union	{
-		char *ptr;
-		ASN1_BOOLEAN		boolean;
-		ASN1_STRING *		asn1_string;
-		ASN1_OBJECT *		object;
-		ASN1_INTEGER *		integer;
-		ASN1_ENUMERATED *	enumerated;
-		ASN1_BIT_STRING *	bit_string;
-		ASN1_OCTET_STRING *	octet_string;
-		ASN1_PRINTABLESTRING *	printablestring;
-		ASN1_T61STRING *	t61string;
-		ASN1_IA5STRING *	ia5string;
-		ASN1_GENERALSTRING *	generalstring;
-		ASN1_BMPSTRING *	bmpstring;
-		ASN1_UNIVERSALSTRING *	universalstring;
-		ASN1_UTCTIME *		utctime;
-		ASN1_GENERALIZEDTIME *	generalizedtime;
-		ASN1_VISIBLESTRING *	visiblestring;
-		ASN1_UTF8STRING *	utf8string;
-		/* set and sequence are left complete and still
-		 * contain the set or sequence bytes */
-		ASN1_STRING *		set;
-		ASN1_STRING *		sequence;
-		ASN1_VALUE *		asn1_value;
-		} value;
-	} ASN1_TYPE;
-
-DECLARE_STACK_OF(ASN1_TYPE)
-DECLARE_ASN1_SET_OF(ASN1_TYPE)
-
-typedef STACK_OF(ASN1_TYPE) ASN1_SEQUENCE_ANY;
-
-DECLARE_ASN1_ENCODE_FUNCTIONS_const(ASN1_SEQUENCE_ANY, ASN1_SEQUENCE_ANY)
-DECLARE_ASN1_ENCODE_FUNCTIONS_const(ASN1_SEQUENCE_ANY, ASN1_SET_ANY)
-
-typedef struct NETSCAPE_X509_st
-	{
-	ASN1_OCTET_STRING *header;
-	X509 *cert;
-	} NETSCAPE_X509;
-
-/* This is used to contain a list of bit names */
-typedef struct BIT_STRING_BITNAME_st {
-	int bitnum;
-	const char *lname;
-	const char *sname;
-} BIT_STRING_BITNAME;
-
-
-#define M_ASN1_STRING_length(x)	((x)->length)
-#define M_ASN1_STRING_length_set(x, n)	((x)->length = (n))
-#define M_ASN1_STRING_type(x)	((x)->type)
-#define M_ASN1_STRING_data(x)	((x)->data)
-
-/* Macros for string operations */
-#define M_ASN1_BIT_STRING_new()	(ASN1_BIT_STRING *)\
-		ASN1_STRING_type_new(V_ASN1_BIT_STRING)
-#define M_ASN1_BIT_STRING_free(a)	ASN1_STRING_free((ASN1_STRING *)a)
-#define M_ASN1_BIT_STRING_dup(a) (ASN1_BIT_STRING *)\
-		ASN1_STRING_dup((const ASN1_STRING *)a)
-#define M_ASN1_BIT_STRING_cmp(a,b) ASN1_STRING_cmp(\
-		(const ASN1_STRING *)a,(const ASN1_STRING *)b)
-#define M_ASN1_BIT_STRING_set(a,b,c) ASN1_STRING_set((ASN1_STRING *)a,b,c)
-
-#define M_ASN1_INTEGER_new()	(ASN1_INTEGER *)\
-		ASN1_STRING_type_new(V_ASN1_INTEGER)
-#define M_ASN1_INTEGER_free(a)		ASN1_STRING_free((ASN1_STRING *)a)
-#define M_ASN1_INTEGER_dup(a) (ASN1_INTEGER *)\
-		ASN1_STRING_dup((const ASN1_STRING *)a)
-#define M_ASN1_INTEGER_cmp(a,b)	ASN1_STRING_cmp(\
-		(const ASN1_STRING *)a,(const ASN1_STRING *)b)
-
-#define M_ASN1_ENUMERATED_new()	(ASN1_ENUMERATED *)\
-		ASN1_STRING_type_new(V_ASN1_ENUMERATED)
-#define M_ASN1_ENUMERATED_free(a)	ASN1_STRING_free((ASN1_STRING *)a)
-#define M_ASN1_ENUMERATED_dup(a) (ASN1_ENUMERATED *)\
-		ASN1_STRING_dup((const ASN1_STRING *)a)
-#define M_ASN1_ENUMERATED_cmp(a,b)	ASN1_STRING_cmp(\
-		(const ASN1_STRING *)a,(const ASN1_STRING *)b)
-
-#define M_ASN1_OCTET_STRING_new()	(ASN1_OCTET_STRING *)\
-		ASN1_STRING_type_new(V_ASN1_OCTET_STRING)
-#define M_ASN1_OCTET_STRING_free(a)	ASN1_STRING_free((ASN1_STRING *)a)
-#define M_ASN1_OCTET_STRING_dup(a) (ASN1_OCTET_STRING *)\
-		ASN1_STRING_dup((const ASN1_STRING *)a)
-#define M_ASN1_OCTET_STRING_cmp(a,b) ASN1_STRING_cmp(\
-		(const ASN1_STRING *)a,(const ASN1_STRING *)b)
-#define M_ASN1_OCTET_STRING_set(a,b,c)	ASN1_STRING_set((ASN1_STRING *)a,b,c)
-#define M_ASN1_OCTET_STRING_print(a,b)	ASN1_STRING_print(a,(ASN1_STRING *)b)
-#define M_i2d_ASN1_OCTET_STRING(a,pp) \
-		i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_OCTET_STRING,\
-		V_ASN1_UNIVERSAL)
-
-#define B_ASN1_TIME \
-			B_ASN1_UTCTIME | \
-			B_ASN1_GENERALIZEDTIME
-
-#define B_ASN1_PRINTABLE \
-			B_ASN1_NUMERICSTRING| \
-			B_ASN1_PRINTABLESTRING| \
-			B_ASN1_T61STRING| \
-			B_ASN1_IA5STRING| \
-			B_ASN1_BIT_STRING| \
-			B_ASN1_UNIVERSALSTRING|\
-			B_ASN1_BMPSTRING|\
-			B_ASN1_UTF8STRING|\
-			B_ASN1_SEQUENCE|\
-			B_ASN1_UNKNOWN
-
-#define B_ASN1_DIRECTORYSTRING \
-			B_ASN1_PRINTABLESTRING| \
-			B_ASN1_TELETEXSTRING|\
-			B_ASN1_BMPSTRING|\
-			B_ASN1_UNIVERSALSTRING|\
-			B_ASN1_UTF8STRING
-
-#define B_ASN1_DISPLAYTEXT \
-			B_ASN1_IA5STRING| \
-			B_ASN1_VISIBLESTRING| \
-			B_ASN1_BMPSTRING|\
-			B_ASN1_UTF8STRING
-
-#define M_ASN1_PRINTABLE_new()	ASN1_STRING_type_new(V_ASN1_T61STRING)
-#define M_ASN1_PRINTABLE_free(a)	ASN1_STRING_free((ASN1_STRING *)a)
-#define M_i2d_ASN1_PRINTABLE(a,pp) i2d_ASN1_bytes((ASN1_STRING *)a,\
-		pp,a->type,V_ASN1_UNIVERSAL)
-#define M_d2i_ASN1_PRINTABLE(a,pp,l) \
-		d2i_ASN1_type_bytes((ASN1_STRING **)a,pp,l, \
-			B_ASN1_PRINTABLE)
-
-#define M_DIRECTORYSTRING_new() ASN1_STRING_type_new(V_ASN1_PRINTABLESTRING)
-#define M_DIRECTORYSTRING_free(a)	ASN1_STRING_free((ASN1_STRING *)a)
-#define M_i2d_DIRECTORYSTRING(a,pp) i2d_ASN1_bytes((ASN1_STRING *)a,\
-						pp,a->type,V_ASN1_UNIVERSAL)
-#define M_d2i_DIRECTORYSTRING(a,pp,l) \
-		d2i_ASN1_type_bytes((ASN1_STRING **)a,pp,l, \
-			B_ASN1_DIRECTORYSTRING)
-
-#define M_DISPLAYTEXT_new() ASN1_STRING_type_new(V_ASN1_VISIBLESTRING)
-#define M_DISPLAYTEXT_free(a) ASN1_STRING_free((ASN1_STRING *)a)
-#define M_i2d_DISPLAYTEXT(a,pp) i2d_ASN1_bytes((ASN1_STRING *)a,\
-						pp,a->type,V_ASN1_UNIVERSAL)
-#define M_d2i_DISPLAYTEXT(a,pp,l) \
-		d2i_ASN1_type_bytes((ASN1_STRING **)a,pp,l, \
-			B_ASN1_DISPLAYTEXT)
-
-#define M_ASN1_PRINTABLESTRING_new() (ASN1_PRINTABLESTRING *)\
-		ASN1_STRING_type_new(V_ASN1_PRINTABLESTRING)
-#define M_ASN1_PRINTABLESTRING_free(a)	ASN1_STRING_free((ASN1_STRING *)a)
-#define M_i2d_ASN1_PRINTABLESTRING(a,pp) \
-		i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_PRINTABLESTRING,\
-		V_ASN1_UNIVERSAL)
-#define M_d2i_ASN1_PRINTABLESTRING(a,pp,l) \
-		(ASN1_PRINTABLESTRING *)d2i_ASN1_type_bytes\
-		((ASN1_STRING **)a,pp,l,B_ASN1_PRINTABLESTRING)
-
-#define M_ASN1_T61STRING_new()	(ASN1_T61STRING *)\
-		ASN1_STRING_type_new(V_ASN1_T61STRING)
-#define M_ASN1_T61STRING_free(a)	ASN1_STRING_free((ASN1_STRING *)a)
-#define M_i2d_ASN1_T61STRING(a,pp) \
-		i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_T61STRING,\
-		V_ASN1_UNIVERSAL)
-#define M_d2i_ASN1_T61STRING(a,pp,l) \
-		(ASN1_T61STRING *)d2i_ASN1_type_bytes\
-		((ASN1_STRING **)a,pp,l,B_ASN1_T61STRING)
-
-#define M_ASN1_IA5STRING_new()	(ASN1_IA5STRING *)\
-		ASN1_STRING_type_new(V_ASN1_IA5STRING)
-#define M_ASN1_IA5STRING_free(a)	ASN1_STRING_free((ASN1_STRING *)a)
-#define M_ASN1_IA5STRING_dup(a)	\
-		(ASN1_IA5STRING *)ASN1_STRING_dup((const ASN1_STRING *)a)
-#define M_i2d_ASN1_IA5STRING(a,pp) \
-		i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_IA5STRING,\
-			V_ASN1_UNIVERSAL)
-#define M_d2i_ASN1_IA5STRING(a,pp,l) \
-		(ASN1_IA5STRING *)d2i_ASN1_type_bytes((ASN1_STRING **)a,pp,l,\
-			B_ASN1_IA5STRING)
-
-#define M_ASN1_UTCTIME_new()	(ASN1_UTCTIME *)\
-		ASN1_STRING_type_new(V_ASN1_UTCTIME)
-#define M_ASN1_UTCTIME_free(a)	ASN1_STRING_free((ASN1_STRING *)a)
-#define M_ASN1_UTCTIME_dup(a) (ASN1_UTCTIME *)\
-		ASN1_STRING_dup((const ASN1_STRING *)a)
-
-#define M_ASN1_GENERALIZEDTIME_new()	(ASN1_GENERALIZEDTIME *)\
-		ASN1_STRING_type_new(V_ASN1_GENERALIZEDTIME)
-#define M_ASN1_GENERALIZEDTIME_free(a)	ASN1_STRING_free((ASN1_STRING *)a)
-#define M_ASN1_GENERALIZEDTIME_dup(a) (ASN1_GENERALIZEDTIME *)ASN1_STRING_dup(\
-	(const ASN1_STRING *)a)
-
-#define M_ASN1_TIME_new()	(ASN1_TIME *)\
-		ASN1_STRING_type_new(V_ASN1_UTCTIME)
-#define M_ASN1_TIME_free(a)	ASN1_STRING_free((ASN1_STRING *)a)
-#define M_ASN1_TIME_dup(a) (ASN1_TIME *)\
-	ASN1_STRING_dup((const ASN1_STRING *)a)
-
-#define M_ASN1_GENERALSTRING_new()	(ASN1_GENERALSTRING *)\
-		ASN1_STRING_type_new(V_ASN1_GENERALSTRING)
-#define M_ASN1_GENERALSTRING_free(a)	ASN1_STRING_free((ASN1_STRING *)a)
-#define M_i2d_ASN1_GENERALSTRING(a,pp) \
-		i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_GENERALSTRING,\
-			V_ASN1_UNIVERSAL)
-#define M_d2i_ASN1_GENERALSTRING(a,pp,l) \
-		(ASN1_GENERALSTRING *)d2i_ASN1_type_bytes\
-		((ASN1_STRING **)a,pp,l,B_ASN1_GENERALSTRING)
-
-#define M_ASN1_UNIVERSALSTRING_new()	(ASN1_UNIVERSALSTRING *)\
-		ASN1_STRING_type_new(V_ASN1_UNIVERSALSTRING)
-#define M_ASN1_UNIVERSALSTRING_free(a)	ASN1_STRING_free((ASN1_STRING *)a)
-#define M_i2d_ASN1_UNIVERSALSTRING(a,pp) \
-		i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_UNIVERSALSTRING,\
-			V_ASN1_UNIVERSAL)
-#define M_d2i_ASN1_UNIVERSALSTRING(a,pp,l) \
-		(ASN1_UNIVERSALSTRING *)d2i_ASN1_type_bytes\
-		((ASN1_STRING **)a,pp,l,B_ASN1_UNIVERSALSTRING)
-
-#define M_ASN1_BMPSTRING_new()	(ASN1_BMPSTRING *)\
-		ASN1_STRING_type_new(V_ASN1_BMPSTRING)
-#define M_ASN1_BMPSTRING_free(a)	ASN1_STRING_free((ASN1_STRING *)a)
-#define M_i2d_ASN1_BMPSTRING(a,pp) \
-		i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_BMPSTRING,\
-			V_ASN1_UNIVERSAL)
-#define M_d2i_ASN1_BMPSTRING(a,pp,l) \
-		(ASN1_BMPSTRING *)d2i_ASN1_type_bytes\
-		((ASN1_STRING **)a,pp,l,B_ASN1_BMPSTRING)
-
-#define M_ASN1_VISIBLESTRING_new()	(ASN1_VISIBLESTRING *)\
-		ASN1_STRING_type_new(V_ASN1_VISIBLESTRING)
-#define M_ASN1_VISIBLESTRING_free(a)	ASN1_STRING_free((ASN1_STRING *)a)
-#define M_i2d_ASN1_VISIBLESTRING(a,pp) \
-		i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_VISIBLESTRING,\
-			V_ASN1_UNIVERSAL)
-#define M_d2i_ASN1_VISIBLESTRING(a,pp,l) \
-		(ASN1_VISIBLESTRING *)d2i_ASN1_type_bytes\
-		((ASN1_STRING **)a,pp,l,B_ASN1_VISIBLESTRING)
-
-#define M_ASN1_UTF8STRING_new()	(ASN1_UTF8STRING *)\
-		ASN1_STRING_type_new(V_ASN1_UTF8STRING)
-#define M_ASN1_UTF8STRING_free(a)	ASN1_STRING_free((ASN1_STRING *)a)
-#define M_i2d_ASN1_UTF8STRING(a,pp) \
-		i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_UTF8STRING,\
-			V_ASN1_UNIVERSAL)
-#define M_d2i_ASN1_UTF8STRING(a,pp,l) \
-		(ASN1_UTF8STRING *)d2i_ASN1_type_bytes\
-		((ASN1_STRING **)a,pp,l,B_ASN1_UTF8STRING)
-
-  /* for the is_set parameter to i2d_ASN1_SET */
-#define IS_SEQUENCE	0
-#define IS_SET		1
-
-DECLARE_ASN1_FUNCTIONS_fname(ASN1_TYPE, ASN1_ANY, ASN1_TYPE)
-
-int ASN1_TYPE_get(ASN1_TYPE *a);
-void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value);
-int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value);
-int            ASN1_TYPE_cmp(ASN1_TYPE *a, ASN1_TYPE *b);
-
-ASN1_OBJECT *	ASN1_OBJECT_new(void );
-void		ASN1_OBJECT_free(ASN1_OBJECT *a);
-int		i2d_ASN1_OBJECT(ASN1_OBJECT *a,unsigned char **pp);
-ASN1_OBJECT *	c2i_ASN1_OBJECT(ASN1_OBJECT **a,const unsigned char **pp,
-			long length);
-ASN1_OBJECT *	d2i_ASN1_OBJECT(ASN1_OBJECT **a,const unsigned char **pp,
-			long length);
-
-DECLARE_ASN1_ITEM(ASN1_OBJECT)
-
-DECLARE_STACK_OF(ASN1_OBJECT)
-DECLARE_ASN1_SET_OF(ASN1_OBJECT)
-
-ASN1_STRING *	ASN1_STRING_new(void);
-void		ASN1_STRING_free(ASN1_STRING *a);
-int		ASN1_STRING_copy(ASN1_STRING *dst, const ASN1_STRING *str);
-ASN1_STRING *	ASN1_STRING_dup(const ASN1_STRING *a);
-ASN1_STRING *	ASN1_STRING_type_new(int type );
-int 		ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b);
-  /* Since this is used to store all sorts of things, via macros, for now, make
-     its data void * */
-int 		ASN1_STRING_set(ASN1_STRING *str, const void *data, int len);
-void		ASN1_STRING_set0(ASN1_STRING *str, void *data, int len);
-int ASN1_STRING_length(const ASN1_STRING *x);
-void ASN1_STRING_length_set(ASN1_STRING *x, int n);
-int ASN1_STRING_type(ASN1_STRING *x);
-unsigned char * ASN1_STRING_data(ASN1_STRING *x);
-
-DECLARE_ASN1_FUNCTIONS(ASN1_BIT_STRING)
-int		i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a,unsigned char **pp);
-ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a,const unsigned char **pp,
-			long length);
-int		ASN1_BIT_STRING_set(ASN1_BIT_STRING *a, unsigned char *d,
-			int length );
-int		ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value);
-int		ASN1_BIT_STRING_get_bit(ASN1_BIT_STRING *a, int n);
-int            ASN1_BIT_STRING_check(ASN1_BIT_STRING *a,
-                                     unsigned char *flags, int flags_len);
-
-#ifndef OPENSSL_NO_BIO
-int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs,
-				BIT_STRING_BITNAME *tbl, int indent);
-#endif
-int ASN1_BIT_STRING_num_asc(char *name, BIT_STRING_BITNAME *tbl);
-int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, char *name, int value,
-				BIT_STRING_BITNAME *tbl);
-
-int		i2d_ASN1_BOOLEAN(int a,unsigned char **pp);
-int 		d2i_ASN1_BOOLEAN(int *a,const unsigned char **pp,long length);
-
-DECLARE_ASN1_FUNCTIONS(ASN1_INTEGER)
-int		i2c_ASN1_INTEGER(ASN1_INTEGER *a,unsigned char **pp);
-ASN1_INTEGER *c2i_ASN1_INTEGER(ASN1_INTEGER **a,const unsigned char **pp,
-			long length);
-ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a,const unsigned char **pp,
-			long length);
-ASN1_INTEGER *	ASN1_INTEGER_dup(const ASN1_INTEGER *x);
-int ASN1_INTEGER_cmp(const ASN1_INTEGER *x, const ASN1_INTEGER *y);
-
-DECLARE_ASN1_FUNCTIONS(ASN1_ENUMERATED)
-
-int ASN1_UTCTIME_check(ASN1_UTCTIME *a);
-ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s,time_t t);
-ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
-				int offset_day, long offset_sec);
-int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str);
-int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t);
-#if 0
-time_t ASN1_UTCTIME_get(const ASN1_UTCTIME *s);
-#endif
-
-int ASN1_GENERALIZEDTIME_check(ASN1_GENERALIZEDTIME *a);
-ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,time_t t);
-ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s,
-	     time_t t, int offset_day, long offset_sec);
-int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str);
-
-DECLARE_ASN1_FUNCTIONS(ASN1_OCTET_STRING)
-ASN1_OCTET_STRING *	ASN1_OCTET_STRING_dup(const ASN1_OCTET_STRING *a);
-int 	ASN1_OCTET_STRING_cmp(const ASN1_OCTET_STRING *a, const ASN1_OCTET_STRING *b);
-int 	ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *str, const unsigned char *data, int len);
-
-DECLARE_ASN1_FUNCTIONS(ASN1_VISIBLESTRING)
-DECLARE_ASN1_FUNCTIONS(ASN1_UNIVERSALSTRING)
-DECLARE_ASN1_FUNCTIONS(ASN1_UTF8STRING)
-DECLARE_ASN1_FUNCTIONS(ASN1_NULL)
-DECLARE_ASN1_FUNCTIONS(ASN1_BMPSTRING)
-
-int UTF8_getc(const unsigned char *str, int len, unsigned long *val);
-int UTF8_putc(unsigned char *str, int len, unsigned long value);
-
-DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, ASN1_PRINTABLE)
-
-DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, DIRECTORYSTRING)
-DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, DISPLAYTEXT)
-DECLARE_ASN1_FUNCTIONS(ASN1_PRINTABLESTRING)
-DECLARE_ASN1_FUNCTIONS(ASN1_T61STRING)
-DECLARE_ASN1_FUNCTIONS(ASN1_IA5STRING)
-DECLARE_ASN1_FUNCTIONS(ASN1_GENERALSTRING)
-DECLARE_ASN1_FUNCTIONS(ASN1_UTCTIME)
-DECLARE_ASN1_FUNCTIONS(ASN1_GENERALIZEDTIME)
-DECLARE_ASN1_FUNCTIONS(ASN1_TIME)
-
-DECLARE_ASN1_ITEM(ASN1_OCTET_STRING_NDEF)
-
-ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s,time_t t);
-ASN1_TIME *ASN1_TIME_adj(ASN1_TIME *s,time_t t,
-				int offset_day, long offset_sec);
-int ASN1_TIME_check(ASN1_TIME *t);
-ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZEDTIME **out);
-int ASN1_TIME_set_string(ASN1_TIME *s, const char *str);
-
-int i2d_ASN1_SET(STACK_OF(OPENSSL_BLOCK) *a, unsigned char **pp,
-		 i2d_of_void *i2d, int ex_tag, int ex_class,
-		 int is_set);
-STACK_OF(OPENSSL_BLOCK) *d2i_ASN1_SET(STACK_OF(OPENSSL_BLOCK) **a,
-			      const unsigned char **pp,
-			      long length, d2i_of_void *d2i,
-			      void (*free_func)(OPENSSL_BLOCK), int ex_tag,
-			      int ex_class);
-
-#ifndef OPENSSL_NO_BIO
-int i2a_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *a);
-int a2i_ASN1_INTEGER(BIO *bp,ASN1_INTEGER *bs,char *buf,int size);
-int i2a_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *a);
-int a2i_ASN1_ENUMERATED(BIO *bp,ASN1_ENUMERATED *bs,char *buf,int size);
-int i2a_ASN1_OBJECT(BIO *bp,ASN1_OBJECT *a);
-int a2i_ASN1_STRING(BIO *bp,ASN1_STRING *bs,char *buf,int size);
-int i2a_ASN1_STRING(BIO *bp, ASN1_STRING *a, int type);
-#endif
-int i2t_ASN1_OBJECT(char *buf,int buf_len,ASN1_OBJECT *a);
-
-int a2d_ASN1_OBJECT(unsigned char *out,int olen, const char *buf, int num);
-ASN1_OBJECT *ASN1_OBJECT_create(int nid, unsigned char *data,int len,
-	const char *sn, const char *ln);
-
-int ASN1_INTEGER_set(ASN1_INTEGER *a, long v);
-long ASN1_INTEGER_get(const ASN1_INTEGER *a);
-ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai);
-BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai,BIGNUM *bn);
-
-int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v);
-long ASN1_ENUMERATED_get(ASN1_ENUMERATED *a);
-ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(BIGNUM *bn, ASN1_ENUMERATED *ai);
-BIGNUM *ASN1_ENUMERATED_to_BN(ASN1_ENUMERATED *ai,BIGNUM *bn);
-
-/* General */
-/* given a string, return the correct type, max is the maximum length */
-int ASN1_PRINTABLE_type(const unsigned char *s, int max);
-
-int i2d_ASN1_bytes(ASN1_STRING *a, unsigned char **pp, int tag, int xclass);
-ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, const unsigned char **pp,
-	long length, int Ptag, int Pclass);
-unsigned long ASN1_tag2bit(int tag);
-/* type is one or more of the B_ASN1_ values. */
-ASN1_STRING *d2i_ASN1_type_bytes(ASN1_STRING **a,const unsigned char **pp,
-		long length,int type);
-
-/* PARSING */
-int asn1_Finish(ASN1_CTX *c);
-int asn1_const_Finish(ASN1_const_CTX *c);
-
-/* SPECIALS */
-int ASN1_get_object(const unsigned char **pp, long *plength, int *ptag,
-	int *pclass, long omax);
-int ASN1_check_infinite_end(unsigned char **p,long len);
-int ASN1_const_check_infinite_end(const unsigned char **p,long len);
-void ASN1_put_object(unsigned char **pp, int constructed, int length,
-	int tag, int xclass);
-int ASN1_put_eoc(unsigned char **pp);
-int ASN1_object_size(int constructed, int length, int tag);
-
-/* Used to implement other functions */
-void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, void *x);
-
-#define ASN1_dup_of(type,i2d,d2i,x) \
-    ((type*)ASN1_dup(CHECKED_I2D_OF(type, i2d), \
-		     CHECKED_D2I_OF(type, d2i), \
-		     CHECKED_PTR_OF(type, x)))
-
-#define ASN1_dup_of_const(type,i2d,d2i,x) \
-    ((type*)ASN1_dup(CHECKED_I2D_OF(const type, i2d), \
-		     CHECKED_D2I_OF(type, d2i), \
-		     CHECKED_PTR_OF(const type, x)))
-
-void *ASN1_item_dup(const ASN1_ITEM *it, void *x);
-
-/* ASN1 alloc/free macros for when a type is only used internally */
-
-#define M_ASN1_new_of(type) (type *)ASN1_item_new(ASN1_ITEM_rptr(type))
-#define M_ASN1_free_of(x, type) \
-		ASN1_item_free(CHECKED_PTR_OF(type, x), ASN1_ITEM_rptr(type))
-
-#ifndef OPENSSL_NO_FP_API
-void *ASN1_d2i_fp(void *(*xnew)(void), d2i_of_void *d2i, FILE *in, void **x);
-
-#define ASN1_d2i_fp_of(type,xnew,d2i,in,x) \
-    ((type*)ASN1_d2i_fp(CHECKED_NEW_OF(type, xnew), \
-			CHECKED_D2I_OF(type, d2i), \
-			in, \
-			CHECKED_PPTR_OF(type, x)))
-
-void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x);
-int ASN1_i2d_fp(i2d_of_void *i2d,FILE *out,void *x);
-
-#define ASN1_i2d_fp_of(type,i2d,out,x) \
-    (ASN1_i2d_fp(CHECKED_I2D_OF(type, i2d), \
-		 out, \
-		 CHECKED_PTR_OF(type, x)))
-
-#define ASN1_i2d_fp_of_const(type,i2d,out,x) \
-    (ASN1_i2d_fp(CHECKED_I2D_OF(const type, i2d), \
-		 out, \
-		 CHECKED_PTR_OF(const type, x)))
-
-int ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, void *x);
-int ASN1_STRING_print_ex_fp(FILE *fp, ASN1_STRING *str, unsigned long flags);
-#endif
-
-int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in);
-
-#ifndef OPENSSL_NO_BIO
-void *ASN1_d2i_bio(void *(*xnew)(void), d2i_of_void *d2i, BIO *in, void **x);
-
-#define ASN1_d2i_bio_of(type,xnew,d2i,in,x) \
-    ((type*)ASN1_d2i_bio( CHECKED_NEW_OF(type, xnew), \
-			  CHECKED_D2I_OF(type, d2i), \
-			  in, \
-			  CHECKED_PPTR_OF(type, x)))
-
-void *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *x);
-int ASN1_i2d_bio(i2d_of_void *i2d,BIO *out, unsigned char *x);
-
-#define ASN1_i2d_bio_of(type,i2d,out,x) \
-    (ASN1_i2d_bio(CHECKED_I2D_OF(type, i2d), \
-		  out, \
-		  CHECKED_PTR_OF(type, x)))
-
-#define ASN1_i2d_bio_of_const(type,i2d,out,x) \
-    (ASN1_i2d_bio(CHECKED_I2D_OF(const type, i2d), \
-		  out, \
-		  CHECKED_PTR_OF(const type, x)))
-
-int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, void *x);
-int ASN1_UTCTIME_print(BIO *fp, const ASN1_UTCTIME *a);
-int ASN1_GENERALIZEDTIME_print(BIO *fp, const ASN1_GENERALIZEDTIME *a);
-int ASN1_TIME_print(BIO *fp, const ASN1_TIME *a);
-int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v);
-int ASN1_STRING_print_ex(BIO *out, ASN1_STRING *str, unsigned long flags);
-int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num,
-				unsigned char *buf, int off);
-int ASN1_parse(BIO *bp,const unsigned char *pp,long len,int indent);
-int ASN1_parse_dump(BIO *bp,const unsigned char *pp,long len,int indent,int dump);
-#endif
-const char *ASN1_tag2str(int tag);
-
-/* Used to load and write netscape format cert */
-
-DECLARE_ASN1_FUNCTIONS(NETSCAPE_X509)
-
-int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s);
-
-int ASN1_TYPE_set_octetstring(ASN1_TYPE *a,
-	unsigned char *data, int len);
-int ASN1_TYPE_get_octetstring(ASN1_TYPE *a,
-	unsigned char *data, int max_len);
-int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num,
-	unsigned char *data, int len);
-int ASN1_TYPE_get_int_octetstring(ASN1_TYPE *a,long *num,
-	unsigned char *data, int max_len);
-
-STACK_OF(OPENSSL_BLOCK) *ASN1_seq_unpack(const unsigned char *buf, int len,
-				 d2i_of_void *d2i, void (*free_func)(OPENSSL_BLOCK));
-unsigned char *ASN1_seq_pack(STACK_OF(OPENSSL_BLOCK) *safes, i2d_of_void *i2d,
-			     unsigned char **buf, int *len );
-void *ASN1_unpack_string(ASN1_STRING *oct, d2i_of_void *d2i);
-void *ASN1_item_unpack(ASN1_STRING *oct, const ASN1_ITEM *it);
-ASN1_STRING *ASN1_pack_string(void *obj, i2d_of_void *i2d,
-			      ASN1_OCTET_STRING **oct);
-
-#define ASN1_pack_string_of(type,obj,i2d,oct) \
-    (ASN1_pack_string(CHECKED_PTR_OF(type, obj), \
-		      CHECKED_I2D_OF(type, i2d), \
-		      oct))
-
-ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it, ASN1_OCTET_STRING **oct);
-
-void ASN1_STRING_set_default_mask(unsigned long mask);
-int ASN1_STRING_set_default_mask_asc(const char *p);
-unsigned long ASN1_STRING_get_default_mask(void);
-int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len,
-					int inform, unsigned long mask);
-int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
-					int inform, unsigned long mask, 
-					long minsize, long maxsize);
-
-ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out, 
-		const unsigned char *in, int inlen, int inform, int nid);
-ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid);
-int ASN1_STRING_TABLE_add(int, long, long, unsigned long, unsigned long);
-void ASN1_STRING_TABLE_cleanup(void);
-
-/* ASN1 template functions */
-
-/* Old API compatible functions */
-ASN1_VALUE *ASN1_item_new(const ASN1_ITEM *it);
-void ASN1_item_free(ASN1_VALUE *val, const ASN1_ITEM *it);
-ASN1_VALUE * ASN1_item_d2i(ASN1_VALUE **val, const unsigned char **in, long len, const ASN1_ITEM *it);
-int ASN1_item_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);
-int ASN1_item_ndef_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);
-
-void ASN1_add_oid_module(void);
-
-ASN1_TYPE *ASN1_generate_nconf(char *str, CONF *nconf);
-ASN1_TYPE *ASN1_generate_v3(char *str, X509V3_CTX *cnf);
-
-/* ASN1 Print flags */
-
-/* Indicate missing OPTIONAL fields */
-#define ASN1_PCTX_FLAGS_SHOW_ABSENT		0x001	
-/* Mark start and end of SEQUENCE */
-#define ASN1_PCTX_FLAGS_SHOW_SEQUENCE		0x002
-/* Mark start and end of SEQUENCE/SET OF */
-#define ASN1_PCTX_FLAGS_SHOW_SSOF		0x004
-/* Show the ASN1 type of primitives */
-#define ASN1_PCTX_FLAGS_SHOW_TYPE		0x008
-/* Don't show ASN1 type of ANY */
-#define ASN1_PCTX_FLAGS_NO_ANY_TYPE		0x010
-/* Don't show ASN1 type of MSTRINGs */
-#define ASN1_PCTX_FLAGS_NO_MSTRING_TYPE		0x020
-/* Don't show field names in SEQUENCE */
-#define ASN1_PCTX_FLAGS_NO_FIELD_NAME		0x040
-/* Show structure names of each SEQUENCE field */
-#define ASN1_PCTX_FLAGS_SHOW_FIELD_STRUCT_NAME	0x080
-/* Don't show structure name even at top level */
-#define ASN1_PCTX_FLAGS_NO_STRUCT_NAME		0x100
-
-int ASN1_item_print(BIO *out, ASN1_VALUE *ifld, int indent,
-				const ASN1_ITEM *it, const ASN1_PCTX *pctx);
-ASN1_PCTX *ASN1_PCTX_new(void);
-void ASN1_PCTX_free(ASN1_PCTX *p);
-unsigned long ASN1_PCTX_get_flags(ASN1_PCTX *p);
-void ASN1_PCTX_set_flags(ASN1_PCTX *p, unsigned long flags);
-unsigned long ASN1_PCTX_get_nm_flags(ASN1_PCTX *p);
-void ASN1_PCTX_set_nm_flags(ASN1_PCTX *p, unsigned long flags);
-unsigned long ASN1_PCTX_get_cert_flags(ASN1_PCTX *p);
-void ASN1_PCTX_set_cert_flags(ASN1_PCTX *p, unsigned long flags);
-unsigned long ASN1_PCTX_get_oid_flags(ASN1_PCTX *p);
-void ASN1_PCTX_set_oid_flags(ASN1_PCTX *p, unsigned long flags);
-unsigned long ASN1_PCTX_get_str_flags(ASN1_PCTX *p);
-void ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags);
-
-BIO_METHOD *BIO_f_asn1(void);
-
-BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it);
-
-int i2d_ASN1_bio_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
-				const ASN1_ITEM *it);
-int PEM_write_bio_ASN1_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
-				const char *hdr,
-				const ASN1_ITEM *it);
-int SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags,
-				int ctype_nid, int econt_nid,
-				STACK_OF(X509_ALGOR) *mdalgs,
-				const ASN1_ITEM *it);
-ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it);
-int SMIME_crlf_copy(BIO *in, BIO *out, int flags);
-int SMIME_text(BIO *in, BIO *out);
-
-/* BEGIN ERROR CODES */
-/* The following lines are auto generated by the script mkerr.pl. Any changes
- * made after this point may be overwritten when the script is next run.
- */
-void ERR_load_ASN1_strings(void);
-
-/* Error codes for the ASN1 functions. */
-
-/* Function codes. */
-#define ASN1_F_A2D_ASN1_OBJECT				 100
-#define ASN1_F_A2I_ASN1_ENUMERATED			 101
-#define ASN1_F_A2I_ASN1_INTEGER				 102
-#define ASN1_F_A2I_ASN1_STRING				 103
-#define ASN1_F_APPEND_EXP				 176
-#define ASN1_F_ASN1_BIT_STRING_SET_BIT			 183
-#define ASN1_F_ASN1_CB					 177
-#define ASN1_F_ASN1_CHECK_TLEN				 104
-#define ASN1_F_ASN1_COLLATE_PRIMITIVE			 105
-#define ASN1_F_ASN1_COLLECT				 106
-#define ASN1_F_ASN1_D2I_EX_PRIMITIVE			 108
-#define ASN1_F_ASN1_D2I_FP				 109
-#define ASN1_F_ASN1_D2I_READ_BIO			 107
-#define ASN1_F_ASN1_DIGEST				 184
-#define ASN1_F_ASN1_DO_ADB				 110
-#define ASN1_F_ASN1_DUP					 111
-#define ASN1_F_ASN1_ENUMERATED_SET			 112
-#define ASN1_F_ASN1_ENUMERATED_TO_BN			 113
-#define ASN1_F_ASN1_EX_C2I				 204
-#define ASN1_F_ASN1_FIND_END				 190
-#define ASN1_F_ASN1_GENERALIZEDTIME_ADJ			 216
-#define ASN1_F_ASN1_GENERALIZEDTIME_SET			 185
-#define ASN1_F_ASN1_GENERATE_V3				 178
-#define ASN1_F_ASN1_GET_OBJECT				 114
-#define ASN1_F_ASN1_HEADER_NEW				 115
-#define ASN1_F_ASN1_I2D_BIO				 116
-#define ASN1_F_ASN1_I2D_FP				 117
-#define ASN1_F_ASN1_INTEGER_SET				 118
-#define ASN1_F_ASN1_INTEGER_TO_BN			 119
-#define ASN1_F_ASN1_ITEM_D2I_FP				 206
-#define ASN1_F_ASN1_ITEM_DUP				 191
-#define ASN1_F_ASN1_ITEM_EX_COMBINE_NEW			 121
-#define ASN1_F_ASN1_ITEM_EX_D2I				 120
-#define ASN1_F_ASN1_ITEM_I2D_BIO			 192
-#define ASN1_F_ASN1_ITEM_I2D_FP				 193
-#define ASN1_F_ASN1_ITEM_PACK				 198
-#define ASN1_F_ASN1_ITEM_SIGN				 195
-#define ASN1_F_ASN1_ITEM_UNPACK				 199
-#define ASN1_F_ASN1_ITEM_VERIFY				 197
-#define ASN1_F_ASN1_MBSTRING_NCOPY			 122
-#define ASN1_F_ASN1_OBJECT_NEW				 123
-#define ASN1_F_ASN1_OUTPUT_DATA				 214
-#define ASN1_F_ASN1_PACK_STRING				 124
-#define ASN1_F_ASN1_PCTX_NEW				 205
-#define ASN1_F_ASN1_PKCS5_PBE_SET			 125
-#define ASN1_F_ASN1_SEQ_PACK				 126
-#define ASN1_F_ASN1_SEQ_UNPACK				 127
-#define ASN1_F_ASN1_SIGN				 128
-#define ASN1_F_ASN1_STR2TYPE				 179
-#define ASN1_F_ASN1_STRING_SET				 186
-#define ASN1_F_ASN1_STRING_TABLE_ADD			 129
-#define ASN1_F_ASN1_STRING_TYPE_NEW			 130
-#define ASN1_F_ASN1_TEMPLATE_EX_D2I			 132
-#define ASN1_F_ASN1_TEMPLATE_NEW			 133
-#define ASN1_F_ASN1_TEMPLATE_NOEXP_D2I			 131
-#define ASN1_F_ASN1_TIME_ADJ				 217
-#define ASN1_F_ASN1_TIME_SET				 175
-#define ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING		 134
-#define ASN1_F_ASN1_TYPE_GET_OCTETSTRING		 135
-#define ASN1_F_ASN1_UNPACK_STRING			 136
-#define ASN1_F_ASN1_UTCTIME_ADJ				 218
-#define ASN1_F_ASN1_UTCTIME_SET				 187
-#define ASN1_F_ASN1_VERIFY				 137
-#define ASN1_F_B64_READ_ASN1				 209
-#define ASN1_F_B64_WRITE_ASN1				 210
-#define ASN1_F_BIO_NEW_NDEF				 208
-#define ASN1_F_BITSTR_CB				 180
-#define ASN1_F_BN_TO_ASN1_ENUMERATED			 138
-#define ASN1_F_BN_TO_ASN1_INTEGER			 139
-#define ASN1_F_C2I_ASN1_BIT_STRING			 189
-#define ASN1_F_C2I_ASN1_INTEGER				 194
-#define ASN1_F_C2I_ASN1_OBJECT				 196
-#define ASN1_F_COLLECT_DATA				 140
-#define ASN1_F_D2I_ASN1_BIT_STRING			 141
-#define ASN1_F_D2I_ASN1_BOOLEAN				 142
-#define ASN1_F_D2I_ASN1_BYTES				 143
-#define ASN1_F_D2I_ASN1_GENERALIZEDTIME			 144
-#define ASN1_F_D2I_ASN1_HEADER				 145
-#define ASN1_F_D2I_ASN1_INTEGER				 146
-#define ASN1_F_D2I_ASN1_OBJECT				 147
-#define ASN1_F_D2I_ASN1_SET				 148
-#define ASN1_F_D2I_ASN1_TYPE_BYTES			 149
-#define ASN1_F_D2I_ASN1_UINTEGER			 150
-#define ASN1_F_D2I_ASN1_UTCTIME				 151
-#define ASN1_F_D2I_AUTOPRIVATEKEY			 207
-#define ASN1_F_D2I_NETSCAPE_RSA				 152
-#define ASN1_F_D2I_NETSCAPE_RSA_2			 153
-#define ASN1_F_D2I_PRIVATEKEY				 154
-#define ASN1_F_D2I_PUBLICKEY				 155
-#define ASN1_F_D2I_RSA_NET				 200
-#define ASN1_F_D2I_RSA_NET_2				 201
-#define ASN1_F_D2I_X509					 156
-#define ASN1_F_D2I_X509_CINF				 157
-#define ASN1_F_D2I_X509_PKEY				 159
-#define ASN1_F_I2D_ASN1_BIO_STREAM			 211
-#define ASN1_F_I2D_ASN1_SET				 188
-#define ASN1_F_I2D_ASN1_TIME				 160
-#define ASN1_F_I2D_DSA_PUBKEY				 161
-#define ASN1_F_I2D_EC_PUBKEY				 181
-#define ASN1_F_I2D_PRIVATEKEY				 163
-#define ASN1_F_I2D_PUBLICKEY				 164
-#define ASN1_F_I2D_RSA_NET				 162
-#define ASN1_F_I2D_RSA_PUBKEY				 165
-#define ASN1_F_LONG_C2I					 166
-#define ASN1_F_OID_MODULE_INIT				 174
-#define ASN1_F_PARSE_TAGGING				 182
-#define ASN1_F_PKCS5_PBE2_SET_IV			 167
-#define ASN1_F_PKCS5_PBE_SET				 202
-#define ASN1_F_PKCS5_PBE_SET0_ALGOR			 215
-#define ASN1_F_SMIME_READ_ASN1				 212
-#define ASN1_F_SMIME_TEXT				 213
-#define ASN1_F_X509_CINF_NEW				 168
-#define ASN1_F_X509_CRL_ADD0_REVOKED			 169
-#define ASN1_F_X509_INFO_NEW				 170
-#define ASN1_F_X509_NAME_ENCODE				 203
-#define ASN1_F_X509_NAME_EX_D2I				 158
-#define ASN1_F_X509_NAME_EX_NEW				 171
-#define ASN1_F_X509_NEW					 172
-#define ASN1_F_X509_PKEY_NEW				 173
-
-/* Reason codes. */
-#define ASN1_R_ADDING_OBJECT				 171
-#define ASN1_R_ASN1_PARSE_ERROR				 203
-#define ASN1_R_ASN1_SIG_PARSE_ERROR			 204
-#define ASN1_R_AUX_ERROR				 100
-#define ASN1_R_BAD_CLASS				 101
-#define ASN1_R_BAD_OBJECT_HEADER			 102
-#define ASN1_R_BAD_PASSWORD_READ			 103
-#define ASN1_R_BAD_TAG					 104
-#define ASN1_R_BMPSTRING_IS_WRONG_LENGTH		 214
-#define ASN1_R_BN_LIB					 105
-#define ASN1_R_BOOLEAN_IS_WRONG_LENGTH			 106
-#define ASN1_R_BUFFER_TOO_SMALL				 107
-#define ASN1_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER		 108
-#define ASN1_R_DATA_IS_WRONG				 109
-#define ASN1_R_DECODE_ERROR				 110
-#define ASN1_R_DECODING_ERROR				 111
-#define ASN1_R_DEPTH_EXCEEDED				 174
-#define ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED	 198
-#define ASN1_R_ENCODE_ERROR				 112
-#define ASN1_R_ERROR_GETTING_TIME			 173
-#define ASN1_R_ERROR_LOADING_SECTION			 172
-#define ASN1_R_ERROR_PARSING_SET_ELEMENT		 113
-#define ASN1_R_ERROR_SETTING_CIPHER_PARAMS		 114
-#define ASN1_R_EXPECTING_AN_INTEGER			 115
-#define ASN1_R_EXPECTING_AN_OBJECT			 116
-#define ASN1_R_EXPECTING_A_BOOLEAN			 117
-#define ASN1_R_EXPECTING_A_TIME				 118
-#define ASN1_R_EXPLICIT_LENGTH_MISMATCH			 119
-#define ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED		 120
-#define ASN1_R_FIELD_MISSING				 121
-#define ASN1_R_FIRST_NUM_TOO_LARGE			 122
-#define ASN1_R_HEADER_TOO_LONG				 123
-#define ASN1_R_ILLEGAL_BITSTRING_FORMAT			 175
-#define ASN1_R_ILLEGAL_BOOLEAN				 176
-#define ASN1_R_ILLEGAL_CHARACTERS			 124
-#define ASN1_R_ILLEGAL_FORMAT				 177
-#define ASN1_R_ILLEGAL_HEX				 178
-#define ASN1_R_ILLEGAL_IMPLICIT_TAG			 179
-#define ASN1_R_ILLEGAL_INTEGER				 180
-#define ASN1_R_ILLEGAL_NESTED_TAGGING			 181
-#define ASN1_R_ILLEGAL_NULL				 125
-#define ASN1_R_ILLEGAL_NULL_VALUE			 182
-#define ASN1_R_ILLEGAL_OBJECT				 183
-#define ASN1_R_ILLEGAL_OPTIONAL_ANY			 126
-#define ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE		 170
-#define ASN1_R_ILLEGAL_TAGGED_ANY			 127
-#define ASN1_R_ILLEGAL_TIME_VALUE			 184
-#define ASN1_R_INTEGER_NOT_ASCII_FORMAT			 185
-#define ASN1_R_INTEGER_TOO_LARGE_FOR_LONG		 128
-#define ASN1_R_INVALID_BMPSTRING_LENGTH			 129
-#define ASN1_R_INVALID_DIGIT				 130
-#define ASN1_R_INVALID_MIME_TYPE			 205
-#define ASN1_R_INVALID_MODIFIER				 186
-#define ASN1_R_INVALID_NUMBER				 187
-#define ASN1_R_INVALID_OBJECT_ENCODING			 216
-#define ASN1_R_INVALID_SEPARATOR			 131
-#define ASN1_R_INVALID_TIME_FORMAT			 132
-#define ASN1_R_INVALID_UNIVERSALSTRING_LENGTH		 133
-#define ASN1_R_INVALID_UTF8STRING			 134
-#define ASN1_R_IV_TOO_LARGE				 135
-#define ASN1_R_LENGTH_ERROR				 136
-#define ASN1_R_LIST_ERROR				 188
-#define ASN1_R_MIME_NO_CONTENT_TYPE			 206
-#define ASN1_R_MIME_PARSE_ERROR				 207
-#define ASN1_R_MIME_SIG_PARSE_ERROR			 208
-#define ASN1_R_MISSING_EOC				 137
-#define ASN1_R_MISSING_SECOND_NUMBER			 138
-#define ASN1_R_MISSING_VALUE				 189
-#define ASN1_R_MSTRING_NOT_UNIVERSAL			 139
-#define ASN1_R_MSTRING_WRONG_TAG			 140
-#define ASN1_R_NESTED_ASN1_STRING			 197
-#define ASN1_R_NON_HEX_CHARACTERS			 141
-#define ASN1_R_NOT_ASCII_FORMAT				 190
-#define ASN1_R_NOT_ENOUGH_DATA				 142
-#define ASN1_R_NO_CONTENT_TYPE				 209
-#define ASN1_R_NO_DEFAULT_DIGEST			 201
-#define ASN1_R_NO_MATCHING_CHOICE_TYPE			 143
-#define ASN1_R_NO_MULTIPART_BODY_FAILURE		 210
-#define ASN1_R_NO_MULTIPART_BOUNDARY			 211
-#define ASN1_R_NO_SIG_CONTENT_TYPE			 212
-#define ASN1_R_NULL_IS_WRONG_LENGTH			 144
-#define ASN1_R_OBJECT_NOT_ASCII_FORMAT			 191
-#define ASN1_R_ODD_NUMBER_OF_CHARS			 145
-#define ASN1_R_PRIVATE_KEY_HEADER_MISSING		 146
-#define ASN1_R_SECOND_NUMBER_TOO_LARGE			 147
-#define ASN1_R_SEQUENCE_LENGTH_MISMATCH			 148
-#define ASN1_R_SEQUENCE_NOT_CONSTRUCTED			 149
-#define ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG		 192
-#define ASN1_R_SHORT_LINE				 150
-#define ASN1_R_SIG_INVALID_MIME_TYPE			 213
-#define ASN1_R_STREAMING_NOT_SUPPORTED			 202
-#define ASN1_R_STRING_TOO_LONG				 151
-#define ASN1_R_STRING_TOO_SHORT				 152
-#define ASN1_R_TAG_VALUE_TOO_HIGH			 153
-#define ASN1_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD 154
-#define ASN1_R_TIME_NOT_ASCII_FORMAT			 193
-#define ASN1_R_TOO_LONG					 155
-#define ASN1_R_TYPE_NOT_CONSTRUCTED			 156
-#define ASN1_R_UNABLE_TO_DECODE_RSA_KEY			 157
-#define ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY		 158
-#define ASN1_R_UNEXPECTED_EOC				 159
-#define ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH		 215
-#define ASN1_R_UNKNOWN_FORMAT				 160
-#define ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM		 161
-#define ASN1_R_UNKNOWN_OBJECT_TYPE			 162
-#define ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE			 163
-#define ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM		 199
-#define ASN1_R_UNKNOWN_TAG				 194
-#define ASN1_R_UNKOWN_FORMAT				 195
-#define ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE		 164
-#define ASN1_R_UNSUPPORTED_CIPHER			 165
-#define ASN1_R_UNSUPPORTED_ENCRYPTION_ALGORITHM		 166
-#define ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE		 167
-#define ASN1_R_UNSUPPORTED_TYPE				 196
-#define ASN1_R_WRONG_PUBLIC_KEY_TYPE			 200
-#define ASN1_R_WRONG_TAG				 168
-#define ASN1_R_WRONG_TYPE				 169
-
-#ifdef  __cplusplus
-}
-#endif
-#endif
diff --git a/extra_lib/include/openssl/bio.h b/extra_lib/include/openssl/bio.h
deleted file mode 100644
index 152802f..0000000
--- a/extra_lib/include/openssl/bio.h
+++ /dev/null
@@ -1,770 +0,0 @@
-/* crypto/bio/bio.h */
-/* Copyright (C) 1995-1998 Eric Young (eay at cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay at cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh at cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay at cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh at cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef HEADER_BIO_H
-#define HEADER_BIO_H
-
-#include <openssl/e_os2.h>
-
-#ifndef OPENSSL_NO_FP_API
-# include <stdio.h>
-#endif
-#include <stdarg.h>
-
-#include <openssl/crypto.h>
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-/* These are the 'types' of BIOs */
-#define BIO_TYPE_NONE		0
-#define BIO_TYPE_MEM		(1|0x0400)
-#define BIO_TYPE_FILE		(2|0x0400)
-
-#define BIO_TYPE_FD		(4|0x0400|0x0100)
-#define BIO_TYPE_SOCKET		(5|0x0400|0x0100)
-#define BIO_TYPE_NULL		(6|0x0400)
-#define BIO_TYPE_SSL		(7|0x0200)
-#define BIO_TYPE_MD		(8|0x0200)		/* passive filter */
-#define BIO_TYPE_BUFFER		(9|0x0200)		/* filter */
-#define BIO_TYPE_CIPHER		(10|0x0200)		/* filter */
-#define BIO_TYPE_BASE64		(11|0x0200)		/* filter */
-#define BIO_TYPE_CONNECT	(12|0x0400|0x0100)	/* socket - connect */
-#define BIO_TYPE_ACCEPT		(13|0x0400|0x0100)	/* socket for accept */
-#define BIO_TYPE_PROXY_CLIENT	(14|0x0200)		/* client proxy BIO */
-#define BIO_TYPE_PROXY_SERVER	(15|0x0200)		/* server proxy BIO */
-#define BIO_TYPE_NBIO_TEST	(16|0x0200)		/* server proxy BIO */
-#define BIO_TYPE_NULL_FILTER	(17|0x0200)
-#define BIO_TYPE_BER		(18|0x0200)		/* BER -> bin filter */
-#define BIO_TYPE_BIO		(19|0x0400)		/* (half a) BIO pair */
-#define BIO_TYPE_LINEBUFFER	(20|0x0200)		/* filter */
-#define BIO_TYPE_DGRAM		(21|0x0400|0x0100)
-#define BIO_TYPE_ASN1 		(22|0x0200)		/* filter */
-#define BIO_TYPE_COMP 		(23|0x0200)		/* filter */
-
-#define BIO_TYPE_DESCRIPTOR	0x0100	/* socket, fd, connect or accept */
-#define BIO_TYPE_FILTER		0x0200
-#define BIO_TYPE_SOURCE_SINK	0x0400
-
-/* BIO_FILENAME_READ|BIO_CLOSE to open or close on free.
- * BIO_set_fp(in,stdin,BIO_NOCLOSE); */
-#define BIO_NOCLOSE		0x00
-#define BIO_CLOSE		0x01
-
-/* These are used in the following macros and are passed to
- * BIO_ctrl() */
-#define BIO_CTRL_RESET		1  /* opt - rewind/zero etc */
-#define BIO_CTRL_EOF		2  /* opt - are we at the eof */
-#define BIO_CTRL_INFO		3  /* opt - extra tit-bits */
-#define BIO_CTRL_SET		4  /* man - set the 'IO' type */
-#define BIO_CTRL_GET		5  /* man - get the 'IO' type */
-#define BIO_CTRL_PUSH		6  /* opt - internal, used to signify change */
-#define BIO_CTRL_POP		7  /* opt - internal, used to signify change */
-#define BIO_CTRL_GET_CLOSE	8  /* man - set the 'close' on free */
-#define BIO_CTRL_SET_CLOSE	9  /* man - set the 'close' on free */
-#define BIO_CTRL_PENDING	10  /* opt - is their more data buffered */
-#define BIO_CTRL_FLUSH		11  /* opt - 'flush' buffered output */
-#define BIO_CTRL_DUP		12  /* man - extra stuff for 'duped' BIO */
-#define BIO_CTRL_WPENDING	13  /* opt - number of bytes still to write */
-/* callback is int cb(BIO *bio,state,ret); */
-#define BIO_CTRL_SET_CALLBACK	14  /* opt - set callback function */
-#define BIO_CTRL_GET_CALLBACK	15  /* opt - set callback function */
-
-#define BIO_CTRL_SET_FILENAME	30	/* BIO_s_file special */
-
-/* dgram BIO stuff */
-#define BIO_CTRL_DGRAM_CONNECT       31  /* BIO dgram special */
-#define BIO_CTRL_DGRAM_SET_CONNECTED 32  /* allow for an externally
-					  * connected socket to be
-					  * passed in */ 
-#define BIO_CTRL_DGRAM_SET_RECV_TIMEOUT 33 /* setsockopt, essentially */
-#define BIO_CTRL_DGRAM_GET_RECV_TIMEOUT 34 /* getsockopt, essentially */
-#define BIO_CTRL_DGRAM_SET_SEND_TIMEOUT 35 /* setsockopt, essentially */
-#define BIO_CTRL_DGRAM_GET_SEND_TIMEOUT 36 /* getsockopt, essentially */
-
-#define BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP 37 /* flag whether the last */
-#define BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP 38 /* I/O operation tiemd out */
-					
-/* #ifdef IP_MTU_DISCOVER */
-#define BIO_CTRL_DGRAM_MTU_DISCOVER       39 /* set DF bit on egress packets */
-/* #endif */
-
-#define BIO_CTRL_DGRAM_QUERY_MTU          40 /* as kernel for current MTU */
-#define BIO_CTRL_DGRAM_GET_MTU            41 /* get cached value for MTU */
-#define BIO_CTRL_DGRAM_SET_MTU            42 /* set cached value for
-					      * MTU. want to use this
-					      * if asking the kernel
-					      * fails */
-
-#define BIO_CTRL_DGRAM_MTU_EXCEEDED       43 /* check whether the MTU
-					      * was exceed in the
-					      * previous write
-					      * operation */
-
-#define BIO_CTRL_DGRAM_GET_PEER           46
-#define BIO_CTRL_DGRAM_SET_PEER           44 /* Destination for the data */
-
-#define BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT   45 /* Next DTLS handshake timeout to
-											  * adjust socket timeouts */
-
-/* modifiers */
-#define BIO_FP_READ		0x02
-#define BIO_FP_WRITE		0x04
-#define BIO_FP_APPEND		0x08
-#define BIO_FP_TEXT		0x10
-
-#define BIO_FLAGS_READ		0x01
-#define BIO_FLAGS_WRITE		0x02
-#define BIO_FLAGS_IO_SPECIAL	0x04
-#define BIO_FLAGS_RWS (BIO_FLAGS_READ|BIO_FLAGS_WRITE|BIO_FLAGS_IO_SPECIAL)
-#define BIO_FLAGS_SHOULD_RETRY	0x08
-#ifndef	BIO_FLAGS_UPLINK
-/* "UPLINK" flag denotes file descriptors provided by application.
-   It defaults to 0, as most platforms don't require UPLINK interface. */
-#define	BIO_FLAGS_UPLINK	0
-#endif
-
-/* Used in BIO_gethostbyname() */
-#define BIO_GHBN_CTRL_HITS		1
-#define BIO_GHBN_CTRL_MISSES		2
-#define BIO_GHBN_CTRL_CACHE_SIZE	3
-#define BIO_GHBN_CTRL_GET_ENTRY		4
-#define BIO_GHBN_CTRL_FLUSH		5
-
-/* Mostly used in the SSL BIO */
-/* Not used anymore
- * #define BIO_FLAGS_PROTOCOL_DELAYED_READ 0x10
- * #define BIO_FLAGS_PROTOCOL_DELAYED_WRITE 0x20
- * #define BIO_FLAGS_PROTOCOL_STARTUP	0x40
- */
-
-#define BIO_FLAGS_BASE64_NO_NL	0x100
-
-/* This is used with memory BIOs: it means we shouldn't free up or change the
- * data in any way.
- */
-#define BIO_FLAGS_MEM_RDONLY	0x200
-
-typedef struct bio_st BIO;
-
-void BIO_set_flags(BIO *b, int flags);
-int  BIO_test_flags(const BIO *b, int flags);
-void BIO_clear_flags(BIO *b, int flags);
-
-#define BIO_get_flags(b) BIO_test_flags(b, ~(0x0))
-#define BIO_set_retry_special(b) \
-		BIO_set_flags(b, (BIO_FLAGS_IO_SPECIAL|BIO_FLAGS_SHOULD_RETRY))
-#define BIO_set_retry_read(b) \
-		BIO_set_flags(b, (BIO_FLAGS_READ|BIO_FLAGS_SHOULD_RETRY))
-#define BIO_set_retry_write(b) \
-		BIO_set_flags(b, (BIO_FLAGS_WRITE|BIO_FLAGS_SHOULD_RETRY))
-
-/* These are normally used internally in BIOs */
-#define BIO_clear_retry_flags(b) \
-		BIO_clear_flags(b, (BIO_FLAGS_RWS|BIO_FLAGS_SHOULD_RETRY))
-#define BIO_get_retry_flags(b) \
-		BIO_test_flags(b, (BIO_FLAGS_RWS|BIO_FLAGS_SHOULD_RETRY))
-
-/* These should be used by the application to tell why we should retry */
-#define BIO_should_read(a)		BIO_test_flags(a, BIO_FLAGS_READ)
-#define BIO_should_write(a)		BIO_test_flags(a, BIO_FLAGS_WRITE)
-#define BIO_should_io_special(a)	BIO_test_flags(a, BIO_FLAGS_IO_SPECIAL)
-#define BIO_retry_type(a)		BIO_test_flags(a, BIO_FLAGS_RWS)
-#define BIO_should_retry(a)		BIO_test_flags(a, BIO_FLAGS_SHOULD_RETRY)
-
-/* The next three are used in conjunction with the
- * BIO_should_io_special() condition.  After this returns true,
- * BIO *BIO_get_retry_BIO(BIO *bio, int *reason); will walk the BIO 
- * stack and return the 'reason' for the special and the offending BIO.
- * Given a BIO, BIO_get_retry_reason(bio) will return the code. */
-/* Returned from the SSL bio when the certificate retrieval code had an error */
-#define BIO_RR_SSL_X509_LOOKUP		0x01
-/* Returned from the connect BIO when a connect would have blocked */
-#define BIO_RR_CONNECT			0x02
-/* Returned from the accept BIO when an accept would have blocked */
-#define BIO_RR_ACCEPT			0x03
-
-/* These are passed by the BIO callback */
-#define BIO_CB_FREE	0x01
-#define BIO_CB_READ	0x02
-#define BIO_CB_WRITE	0x03
-#define BIO_CB_PUTS	0x04
-#define BIO_CB_GETS	0x05
-#define BIO_CB_CTRL	0x06
-
-/* The callback is called before and after the underling operation,
- * The BIO_CB_RETURN flag indicates if it is after the call */
-#define BIO_CB_RETURN	0x80
-#define BIO_CB_return(a) ((a)|BIO_CB_RETURN))
-#define BIO_cb_pre(a)	(!((a)&BIO_CB_RETURN))
-#define BIO_cb_post(a)	((a)&BIO_CB_RETURN)
-
-long (*BIO_get_callback(const BIO *b)) (struct bio_st *,int,const char *,int, long,long);
-void BIO_set_callback(BIO *b, 
-	long (*callback)(struct bio_st *,int,const char *,int, long,long));
-char *BIO_get_callback_arg(const BIO *b);
-void BIO_set_callback_arg(BIO *b, char *arg);
-
-const char * BIO_method_name(const BIO *b);
-int BIO_method_type(const BIO *b);
-
-typedef void bio_info_cb(struct bio_st *, int, const char *, int, long, long);
-
-typedef struct bio_method_st
-	{
-	int type;
-	const char *name;
-	int (*bwrite)(BIO *, const char *, int);
-	int (*bread)(BIO *, char *, int);
-	int (*bputs)(BIO *, const char *);
-	int (*bgets)(BIO *, char *, int);
-	long (*ctrl)(BIO *, int, long, void *);
-	int (*create)(BIO *);
-	int (*destroy)(BIO *);
-        long (*callback_ctrl)(BIO *, int, bio_info_cb *);
-	} BIO_METHOD;
-
-struct bio_st
-	{
-	BIO_METHOD *method;
-	/* bio, mode, argp, argi, argl, ret */
-	long (*callback)(struct bio_st *,int,const char *,int, long,long);
-	char *cb_arg; /* first argument for the callback */
-
-	int init;
-	int shutdown;
-	int flags;	/* extra storage */
-	int retry_reason;
-	int num;
-	void *ptr;
-	struct bio_st *next_bio;	/* used by filter BIOs */
-	struct bio_st *prev_bio;	/* used by filter BIOs */
-	int references;
-	unsigned long num_read;
-	unsigned long num_write;
-
-	CRYPTO_EX_DATA ex_data;
-	};
-
-DECLARE_STACK_OF(BIO)
-
-typedef struct bio_f_buffer_ctx_struct
-	{
-	/* BIO *bio; */ /* this is now in the BIO struct */
-	int ibuf_size;	/* how big is the input buffer */
-	int obuf_size;	/* how big is the output buffer */
-
-	char *ibuf;		/* the char array */
-	int ibuf_len;		/* how many bytes are in it */
-	int ibuf_off;		/* write/read offset */
-
-	char *obuf;		/* the char array */
-	int obuf_len;		/* how many bytes are in it */
-	int obuf_off;		/* write/read offset */
-	} BIO_F_BUFFER_CTX;
-
-/* Prefix and suffix callback in ASN1 BIO */
-typedef int asn1_ps_func(BIO *b, unsigned char **pbuf, int *plen, void *parg);
-
-/* connect BIO stuff */
-#define BIO_CONN_S_BEFORE		1
-#define BIO_CONN_S_GET_IP		2
-#define BIO_CONN_S_GET_PORT		3
-#define BIO_CONN_S_CREATE_SOCKET	4
-#define BIO_CONN_S_CONNECT		5
-#define BIO_CONN_S_OK			6
-#define BIO_CONN_S_BLOCKED_CONNECT	7
-#define BIO_CONN_S_NBIO			8
-/*#define BIO_CONN_get_param_hostname	BIO_ctrl */
-
-#define BIO_C_SET_CONNECT			100
-#define BIO_C_DO_STATE_MACHINE			101
-#define BIO_C_SET_NBIO				102
-#define BIO_C_SET_PROXY_PARAM			103
-#define BIO_C_SET_FD				104
-#define BIO_C_GET_FD				105
-#define BIO_C_SET_FILE_PTR			106
-#define BIO_C_GET_FILE_PTR			107
-#define BIO_C_SET_FILENAME			108
-#define BIO_C_SET_SSL				109
-#define BIO_C_GET_SSL				110
-#define BIO_C_SET_MD				111
-#define BIO_C_GET_MD				112
-#define BIO_C_GET_CIPHER_STATUS			113
-#define BIO_C_SET_BUF_MEM			114
-#define BIO_C_GET_BUF_MEM_PTR			115
-#define BIO_C_GET_BUFF_NUM_LINES		116
-#define BIO_C_SET_BUFF_SIZE			117
-#define BIO_C_SET_ACCEPT			118
-#define BIO_C_SSL_MODE				119
-#define BIO_C_GET_MD_CTX			120
-#define BIO_C_GET_PROXY_PARAM			121
-#define BIO_C_SET_BUFF_READ_DATA		122 /* data to read first */
-#define BIO_C_GET_CONNECT			123
-#define BIO_C_GET_ACCEPT			124
-#define BIO_C_SET_SSL_RENEGOTIATE_BYTES		125
-#define BIO_C_GET_SSL_NUM_RENEGOTIATES		126
-#define BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT	127
-#define BIO_C_FILE_SEEK				128
-#define BIO_C_GET_CIPHER_CTX			129
-#define BIO_C_SET_BUF_MEM_EOF_RETURN		130/*return end of input value*/
-#define BIO_C_SET_BIND_MODE			131
-#define BIO_C_GET_BIND_MODE			132
-#define BIO_C_FILE_TELL				133
-#define BIO_C_GET_SOCKS				134
-#define BIO_C_SET_SOCKS				135
-
-#define BIO_C_SET_WRITE_BUF_SIZE		136/* for BIO_s_bio */
-#define BIO_C_GET_WRITE_BUF_SIZE		137
-#define BIO_C_MAKE_BIO_PAIR			138
-#define BIO_C_DESTROY_BIO_PAIR			139
-#define BIO_C_GET_WRITE_GUARANTEE		140
-#define BIO_C_GET_READ_REQUEST			141
-#define BIO_C_SHUTDOWN_WR			142
-#define BIO_C_NREAD0				143
-#define BIO_C_NREAD				144
-#define BIO_C_NWRITE0				145
-#define BIO_C_NWRITE				146
-#define BIO_C_RESET_READ_REQUEST		147
-#define BIO_C_SET_MD_CTX			148
-
-#define BIO_C_SET_PREFIX			149
-#define BIO_C_GET_PREFIX			150
-#define BIO_C_SET_SUFFIX			151
-#define BIO_C_GET_SUFFIX			152
-
-#define BIO_C_SET_EX_ARG			153
-#define BIO_C_GET_EX_ARG			154
-
-#define BIO_set_app_data(s,arg)		BIO_set_ex_data(s,0,arg)
-#define BIO_get_app_data(s)		BIO_get_ex_data(s,0)
-
-/* BIO_s_connect() and BIO_s_socks4a_connect() */
-#define BIO_set_conn_hostname(b,name) BIO_ctrl(b,BIO_C_SET_CONNECT,0,(char *)name)
-#define BIO_set_conn_port(b,port) BIO_ctrl(b,BIO_C_SET_CONNECT,1,(char *)port)
-#define BIO_set_conn_ip(b,ip)	  BIO_ctrl(b,BIO_C_SET_CONNECT,2,(char *)ip)
-#define BIO_set_conn_int_port(b,port) BIO_ctrl(b,BIO_C_SET_CONNECT,3,(char *)port)
-#define BIO_get_conn_hostname(b)  BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,0)
-#define BIO_get_conn_port(b)      BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,1)
-#define BIO_get_conn_ip(b) 		 BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,2)
-#define BIO_get_conn_int_port(b) BIO_int_ctrl(b,BIO_C_GET_CONNECT,3,0)
-
-
-#define BIO_set_nbio(b,n)	BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL)
-
-/* BIO_s_accept_socket() */
-#define BIO_set_accept_port(b,name) BIO_ctrl(b,BIO_C_SET_ACCEPT,0,(char *)name)
-#define BIO_get_accept_port(b)	BIO_ptr_ctrl(b,BIO_C_GET_ACCEPT,0)
-/* #define BIO_set_nbio(b,n)	BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) */
-#define BIO_set_nbio_accept(b,n) BIO_ctrl(b,BIO_C_SET_ACCEPT,1,(n)?(void *)"a":NULL)
-#define BIO_set_accept_bios(b,bio) BIO_ctrl(b,BIO_C_SET_ACCEPT,2,(char *)bio)
-
-#define BIO_BIND_NORMAL			0
-#define BIO_BIND_REUSEADDR_IF_UNUSED	1
-#define BIO_BIND_REUSEADDR		2
-#define BIO_set_bind_mode(b,mode) BIO_ctrl(b,BIO_C_SET_BIND_MODE,mode,NULL)
-#define BIO_get_bind_mode(b,mode) BIO_ctrl(b,BIO_C_GET_BIND_MODE,0,NULL)
-
-#define BIO_do_connect(b)	BIO_do_handshake(b)
-#define BIO_do_accept(b)	BIO_do_handshake(b)
-#define BIO_do_handshake(b)	BIO_ctrl(b,BIO_C_DO_STATE_MACHINE,0,NULL)
-
-/* BIO_s_proxy_client() */
-#define BIO_set_url(b,url)	BIO_ctrl(b,BIO_C_SET_PROXY_PARAM,0,(char *)(url))
-#define BIO_set_proxies(b,p)	BIO_ctrl(b,BIO_C_SET_PROXY_PARAM,1,(char *)(p))
-/* BIO_set_nbio(b,n) */
-#define BIO_set_filter_bio(b,s) BIO_ctrl(b,BIO_C_SET_PROXY_PARAM,2,(char *)(s))
-/* BIO *BIO_get_filter_bio(BIO *bio); */
-#define BIO_set_proxy_cb(b,cb) BIO_callback_ctrl(b,BIO_C_SET_PROXY_PARAM,3,(void *(*cb)()))
-#define BIO_set_proxy_header(b,sk) BIO_ctrl(b,BIO_C_SET_PROXY_PARAM,4,(char *)sk)
-#define BIO_set_no_connect_return(b,bool) BIO_int_ctrl(b,BIO_C_SET_PROXY_PARAM,5,bool)
-
-#define BIO_get_proxy_header(b,skp) BIO_ctrl(b,BIO_C_GET_PROXY_PARAM,0,(char *)skp)
-#define BIO_get_proxies(b,pxy_p) BIO_ctrl(b,BIO_C_GET_PROXY_PARAM,1,(char *)(pxy_p))
-#define BIO_get_url(b,url)	BIO_ctrl(b,BIO_C_GET_PROXY_PARAM,2,(char *)(url))
-#define BIO_get_no_connect_return(b)	BIO_ctrl(b,BIO_C_GET_PROXY_PARAM,5,NULL)
-
-#define BIO_set_fd(b,fd,c)	BIO_int_ctrl(b,BIO_C_SET_FD,c,fd)
-#define BIO_get_fd(b,c)		BIO_ctrl(b,BIO_C_GET_FD,0,(char *)c)
-
-#define BIO_set_fp(b,fp,c)	BIO_ctrl(b,BIO_C_SET_FILE_PTR,c,(char *)fp)
-#define BIO_get_fp(b,fpp)	BIO_ctrl(b,BIO_C_GET_FILE_PTR,0,(char *)fpp)
-
-#define BIO_seek(b,ofs)	(int)BIO_ctrl(b,BIO_C_FILE_SEEK,ofs,NULL)
-#define BIO_tell(b)	(int)BIO_ctrl(b,BIO_C_FILE_TELL,0,NULL)
-
-/* name is cast to lose const, but might be better to route through a function
-   so we can do it safely */
-#ifdef CONST_STRICT
-/* If you are wondering why this isn't defined, its because CONST_STRICT is
- * purely a compile-time kludge to allow const to be checked.
- */
-int BIO_read_filename(BIO *b,const char *name);
-#else
-#define BIO_read_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \
-		BIO_CLOSE|BIO_FP_READ,(char *)name)
-#endif
-#define BIO_write_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \
-		BIO_CLOSE|BIO_FP_WRITE,name)
-#define BIO_append_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \
-		BIO_CLOSE|BIO_FP_APPEND,name)
-#define BIO_rw_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \
-		BIO_CLOSE|BIO_FP_READ|BIO_FP_WRITE,name)
-
-/* WARNING WARNING, this ups the reference count on the read bio of the
- * SSL structure.  This is because the ssl read BIO is now pointed to by
- * the next_bio field in the bio.  So when you free the BIO, make sure
- * you are doing a BIO_free_all() to catch the underlying BIO. */
-#define BIO_set_ssl(b,ssl,c)	BIO_ctrl(b,BIO_C_SET_SSL,c,(char *)ssl)
-#define BIO_get_ssl(b,sslp)	BIO_ctrl(b,BIO_C_GET_SSL,0,(char *)sslp)
-#define BIO_set_ssl_mode(b,client)	BIO_ctrl(b,BIO_C_SSL_MODE,client,NULL)
-#define BIO_set_ssl_renegotiate_bytes(b,num) \
-	BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_BYTES,num,NULL);
-#define BIO_get_num_renegotiates(b) \
-	BIO_ctrl(b,BIO_C_GET_SSL_NUM_RENEGOTIATES,0,NULL);
-#define BIO_set_ssl_renegotiate_timeout(b,seconds) \
-	BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT,seconds,NULL);
-
-/* defined in evp.h */
-/* #define BIO_set_md(b,md)	BIO_ctrl(b,BIO_C_SET_MD,1,(char *)md) */
-
-#define BIO_get_mem_data(b,pp)	BIO_ctrl(b,BIO_CTRL_INFO,0,(char *)pp)
-#define BIO_set_mem_buf(b,bm,c)	BIO_ctrl(b,BIO_C_SET_BUF_MEM,c,(char *)bm)
-#define BIO_get_mem_ptr(b,pp)	BIO_ctrl(b,BIO_C_GET_BUF_MEM_PTR,0,(char *)pp)
-#define BIO_set_mem_eof_return(b,v) \
-				BIO_ctrl(b,BIO_C_SET_BUF_MEM_EOF_RETURN,v,NULL)
-
-/* For the BIO_f_buffer() type */
-#define BIO_get_buffer_num_lines(b)	BIO_ctrl(b,BIO_C_GET_BUFF_NUM_LINES,0,NULL)
-#define BIO_set_buffer_size(b,size)	BIO_ctrl(b,BIO_C_SET_BUFF_SIZE,size,NULL)
-#define BIO_set_read_buffer_size(b,size) BIO_int_ctrl(b,BIO_C_SET_BUFF_SIZE,size,0)
-#define BIO_set_write_buffer_size(b,size) BIO_int_ctrl(b,BIO_C_SET_BUFF_SIZE,size,1)
-#define BIO_set_buffer_read_data(b,buf,num) BIO_ctrl(b,BIO_C_SET_BUFF_READ_DATA,num,buf)
-
-/* Don't use the next one unless you know what you are doing :-) */
-#define BIO_dup_state(b,ret)	BIO_ctrl(b,BIO_CTRL_DUP,0,(char *)(ret))
-
-#define BIO_reset(b)		(int)BIO_ctrl(b,BIO_CTRL_RESET,0,NULL)
-#define BIO_eof(b)		(int)BIO_ctrl(b,BIO_CTRL_EOF,0,NULL)
-#define BIO_set_close(b,c)	(int)BIO_ctrl(b,BIO_CTRL_SET_CLOSE,(c),NULL)
-#define BIO_get_close(b)	(int)BIO_ctrl(b,BIO_CTRL_GET_CLOSE,0,NULL)
-#define BIO_pending(b)		(int)BIO_ctrl(b,BIO_CTRL_PENDING,0,NULL)
-#define BIO_wpending(b)		(int)BIO_ctrl(b,BIO_CTRL_WPENDING,0,NULL)
-/* ...pending macros have inappropriate return type */
-size_t BIO_ctrl_pending(BIO *b);
-size_t BIO_ctrl_wpending(BIO *b);
-#define BIO_flush(b)		(int)BIO_ctrl(b,BIO_CTRL_FLUSH,0,NULL)
-#define BIO_get_info_callback(b,cbp) (int)BIO_ctrl(b,BIO_CTRL_GET_CALLBACK,0, \
-						   cbp)
-#define BIO_set_info_callback(b,cb) (int)BIO_callback_ctrl(b,BIO_CTRL_SET_CALLBACK,cb)
-
-/* For the BIO_f_buffer() type */
-#define BIO_buffer_get_num_lines(b) BIO_ctrl(b,BIO_CTRL_GET,0,NULL)
-
-/* For BIO_s_bio() */
-#define BIO_set_write_buf_size(b,size) (int)BIO_ctrl(b,BIO_C_SET_WRITE_BUF_SIZE,size,NULL)
-#define BIO_get_write_buf_size(b,size) (size_t)BIO_ctrl(b,BIO_C_GET_WRITE_BUF_SIZE,size,NULL)
-#define BIO_make_bio_pair(b1,b2)   (int)BIO_ctrl(b1,BIO_C_MAKE_BIO_PAIR,0,b2)
-#define BIO_destroy_bio_pair(b)    (int)BIO_ctrl(b,BIO_C_DESTROY_BIO_PAIR,0,NULL)
-#define BIO_shutdown_wr(b) (int)BIO_ctrl(b, BIO_C_SHUTDOWN_WR, 0, NULL)
-/* macros with inappropriate type -- but ...pending macros use int too: */
-#define BIO_get_write_guarantee(b) (int)BIO_ctrl(b,BIO_C_GET_WRITE_GUARANTEE,0,NULL)
-#define BIO_get_read_request(b)    (int)BIO_ctrl(b,BIO_C_GET_READ_REQUEST,0,NULL)
-size_t BIO_ctrl_get_write_guarantee(BIO *b);
-size_t BIO_ctrl_get_read_request(BIO *b);
-int BIO_ctrl_reset_read_request(BIO *b);
-
-/* ctrl macros for dgram */
-#define BIO_ctrl_dgram_connect(b,peer)  \
-                     (int)BIO_ctrl(b,BIO_CTRL_DGRAM_CONNECT,0, (char *)peer)
-#define BIO_ctrl_set_connected(b, state, peer) \
-         (int)BIO_ctrl(b, BIO_CTRL_DGRAM_SET_CONNECTED, state, (char *)peer)
-#define BIO_dgram_recv_timedout(b) \
-         (int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP, 0, NULL)
-#define BIO_dgram_send_timedout(b) \
-         (int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP, 0, NULL)
-#define BIO_dgram_get_peer(b,peer) \
-         (int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_PEER, 0, (char *)peer)
-#define BIO_dgram_set_peer(b,peer) \
-         (int)BIO_ctrl(b, BIO_CTRL_DGRAM_SET_PEER, 0, (char *)peer)
-
-/* These two aren't currently implemented */
-/* int BIO_get_ex_num(BIO *bio); */
-/* void BIO_set_ex_free_func(BIO *bio,int idx,void (*cb)()); */
-int BIO_set_ex_data(BIO *bio,int idx,void *data);
-void *BIO_get_ex_data(BIO *bio,int idx);
-int BIO_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
-	CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
-unsigned long BIO_number_read(BIO *bio);
-unsigned long BIO_number_written(BIO *bio);
-
-/* For BIO_f_asn1() */
-int BIO_asn1_set_prefix(BIO *b, asn1_ps_func *prefix,
-					asn1_ps_func *prefix_free);
-int BIO_asn1_get_prefix(BIO *b, asn1_ps_func **pprefix,
-					asn1_ps_func **pprefix_free);
-int BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix,
-					asn1_ps_func *suffix_free);
-int BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix,
-					asn1_ps_func **psuffix_free);
-
-# ifndef OPENSSL_NO_FP_API
-BIO_METHOD *BIO_s_file(void );
-BIO *BIO_new_file(const char *filename, const char *mode);
-BIO *BIO_new_fp(FILE *stream, int close_flag);
-# define BIO_s_file_internal	BIO_s_file
-# endif
-BIO *	BIO_new(BIO_METHOD *type);
-int	BIO_set(BIO *a,BIO_METHOD *type);
-int	BIO_free(BIO *a);
-void	BIO_vfree(BIO *a);
-int	BIO_read(BIO *b, void *data, int len);
-int	BIO_gets(BIO *bp,char *buf, int size);
-int	BIO_write(BIO *b, const void *data, int len);
-int	BIO_puts(BIO *bp,const char *buf);
-int	BIO_indent(BIO *b,int indent,int max);
-long	BIO_ctrl(BIO *bp,int cmd,long larg,void *parg);
-long BIO_callback_ctrl(BIO *b, int cmd, void (*fp)(struct bio_st *, int, const char *, int, long, long));
-char *	BIO_ptr_ctrl(BIO *bp,int cmd,long larg);
-long	BIO_int_ctrl(BIO *bp,int cmd,long larg,int iarg);
-BIO *	BIO_push(BIO *b,BIO *append);
-BIO *	BIO_pop(BIO *b);
-void	BIO_free_all(BIO *a);
-BIO *	BIO_find_type(BIO *b,int bio_type);
-BIO *	BIO_next(BIO *b);
-BIO *	BIO_get_retry_BIO(BIO *bio, int *reason);
-int	BIO_get_retry_reason(BIO *bio);
-BIO *	BIO_dup_chain(BIO *in);
-
-int BIO_nread0(BIO *bio, char **buf);
-int BIO_nread(BIO *bio, char **buf, int num);
-int BIO_nwrite0(BIO *bio, char **buf);
-int BIO_nwrite(BIO *bio, char **buf, int num);
-
-long BIO_debug_callback(BIO *bio,int cmd,const char *argp,int argi,
-	long argl,long ret);
-
-BIO_METHOD *BIO_s_mem(void);
-BIO *BIO_new_mem_buf(void *buf, int len);
-BIO_METHOD *BIO_s_socket(void);
-BIO_METHOD *BIO_s_connect(void);
-BIO_METHOD *BIO_s_accept(void);
-BIO_METHOD *BIO_s_fd(void);
-#ifndef OPENSSL_SYS_OS2
-BIO_METHOD *BIO_s_log(void);
-#endif
-BIO_METHOD *BIO_s_bio(void);
-BIO_METHOD *BIO_s_null(void);
-BIO_METHOD *BIO_f_null(void);
-BIO_METHOD *BIO_f_buffer(void);
-#ifdef OPENSSL_SYS_VMS
-BIO_METHOD *BIO_f_linebuffer(void);
-#endif
-BIO_METHOD *BIO_f_nbio_test(void);
-#ifndef OPENSSL_NO_DGRAM
-BIO_METHOD *BIO_s_datagram(void);
-#endif
-
-/* BIO_METHOD *BIO_f_ber(void); */
-
-int BIO_sock_should_retry(int i);
-int BIO_sock_non_fatal_error(int error);
-int BIO_dgram_non_fatal_error(int error);
-
-int BIO_fd_should_retry(int i);
-int BIO_fd_non_fatal_error(int error);
-int BIO_dump_cb(int (*cb)(const void *data, size_t len, void *u),
-		void *u, const char *s, int len);
-int BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u),
-		       void *u, const char *s, int len, int indent);
-int BIO_dump(BIO *b,const char *bytes,int len);
-int BIO_dump_indent(BIO *b,const char *bytes,int len,int indent);
-#ifndef OPENSSL_NO_FP_API
-int BIO_dump_fp(FILE *fp, const char *s, int len);
-int BIO_dump_indent_fp(FILE *fp, const char *s, int len, int indent);
-#endif
-struct hostent *BIO_gethostbyname(const char *name);
-/* We might want a thread-safe interface too:
- * struct hostent *BIO_gethostbyname_r(const char *name,
- *     struct hostent *result, void *buffer, size_t buflen);
- * or something similar (caller allocates a struct hostent,
- * pointed to by "result", and additional buffer space for the various
- * substructures; if the buffer does not suffice, NULL is returned
- * and an appropriate error code is set).
- */
-int BIO_sock_error(int sock);
-int BIO_socket_ioctl(int fd, long type, void *arg);
-int BIO_socket_nbio(int fd,int mode);
-int BIO_get_port(const char *str, unsigned short *port_ptr);
-int BIO_get_host_ip(const char *str, unsigned char *ip);
-int BIO_get_accept_socket(char *host_port,int mode);
-int BIO_accept(int sock,char **ip_port);
-int BIO_sock_init(void );
-void BIO_sock_cleanup(void);
-int BIO_set_tcp_ndelay(int sock,int turn_on);
-
-BIO *BIO_new_socket(int sock, int close_flag);
-BIO *BIO_new_dgram(int fd, int close_flag);
-BIO *BIO_new_fd(int fd, int close_flag);
-BIO *BIO_new_connect(char *host_port);
-BIO *BIO_new_accept(char *host_port);
-
-int BIO_new_bio_pair(BIO **bio1, size_t writebuf1,
-	BIO **bio2, size_t writebuf2);
-/* If successful, returns 1 and in *bio1, *bio2 two BIO pair endpoints.
- * Otherwise returns 0 and sets *bio1 and *bio2 to NULL.
- * Size 0 uses default value.
- */
-
-void BIO_copy_next_retry(BIO *b);
-
-/*long BIO_ghbn_ctrl(int cmd,int iarg,char *parg);*/
-
-#ifdef __GNUC__
-#  define __bio_h__attr__ __attribute__
-#else
-#  define __bio_h__attr__(x)
-#endif
-int BIO_printf(BIO *bio, const char *format, ...)
-	__bio_h__attr__((__format__(__printf__,2,3)));
-int BIO_vprintf(BIO *bio, const char *format, va_list args)
-	__bio_h__attr__((__format__(__printf__,2,0)));
-int BIO_snprintf(char *buf, size_t n, const char *format, ...)
-	__bio_h__attr__((__format__(__printf__,3,4)));
-int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)
-	__bio_h__attr__((__format__(__printf__,3,0)));
-#undef __bio_h__attr__
-
-/* BEGIN ERROR CODES */
-/* The following lines are auto generated by the script mkerr.pl. Any changes
- * made after this point may be overwritten when the script is next run.
- */
-void ERR_load_BIO_strings(void);
-
-/* Error codes for the BIO functions. */
-
-/* Function codes. */
-#define BIO_F_ACPT_STATE				 100
-#define BIO_F_BIO_ACCEPT				 101
-#define BIO_F_BIO_BER_GET_HEADER			 102
-#define BIO_F_BIO_CALLBACK_CTRL				 131
-#define BIO_F_BIO_CTRL					 103
-#define BIO_F_BIO_GETHOSTBYNAME				 120
-#define BIO_F_BIO_GETS					 104
-#define BIO_F_BIO_GET_ACCEPT_SOCKET			 105
-#define BIO_F_BIO_GET_HOST_IP				 106
-#define BIO_F_BIO_GET_PORT				 107
-#define BIO_F_BIO_MAKE_PAIR				 121
-#define BIO_F_BIO_NEW					 108
-#define BIO_F_BIO_NEW_FILE				 109
-#define BIO_F_BIO_NEW_MEM_BUF				 126
-#define BIO_F_BIO_NREAD					 123
-#define BIO_F_BIO_NREAD0				 124
-#define BIO_F_BIO_NWRITE				 125
-#define BIO_F_BIO_NWRITE0				 122
-#define BIO_F_BIO_PUTS					 110
-#define BIO_F_BIO_READ					 111
-#define BIO_F_BIO_SOCK_INIT				 112
-#define BIO_F_BIO_WRITE					 113
-#define BIO_F_BUFFER_CTRL				 114
-#define BIO_F_CONN_CTRL					 127
-#define BIO_F_CONN_STATE				 115
-#define BIO_F_FILE_CTRL					 116
-#define BIO_F_FILE_READ					 130
-#define BIO_F_LINEBUFFER_CTRL				 129
-#define BIO_F_MEM_READ					 128
-#define BIO_F_MEM_WRITE					 117
-#define BIO_F_SSL_NEW					 118
-#define BIO_F_WSASTARTUP				 119
-
-/* Reason codes. */
-#define BIO_R_ACCEPT_ERROR				 100
-#define BIO_R_BAD_FOPEN_MODE				 101
-#define BIO_R_BAD_HOSTNAME_LOOKUP			 102
-#define BIO_R_BROKEN_PIPE				 124
-#define BIO_R_CONNECT_ERROR				 103
-#define BIO_R_EOF_ON_MEMORY_BIO				 127
-#define BIO_R_ERROR_SETTING_NBIO			 104
-#define BIO_R_ERROR_SETTING_NBIO_ON_ACCEPTED_SOCKET	 105
-#define BIO_R_ERROR_SETTING_NBIO_ON_ACCEPT_SOCKET	 106
-#define BIO_R_GETHOSTBYNAME_ADDR_IS_NOT_AF_INET		 107
-#define BIO_R_INVALID_ARGUMENT				 125
-#define BIO_R_INVALID_IP_ADDRESS			 108
-#define BIO_R_IN_USE					 123
-#define BIO_R_KEEPALIVE					 109
-#define BIO_R_NBIO_CONNECT_ERROR			 110
-#define BIO_R_NO_ACCEPT_PORT_SPECIFIED			 111
-#define BIO_R_NO_HOSTNAME_SPECIFIED			 112
-#define BIO_R_NO_PORT_DEFINED				 113
-#define BIO_R_NO_PORT_SPECIFIED				 114
-#define BIO_R_NO_SUCH_FILE				 128
-#define BIO_R_NULL_PARAMETER				 115
-#define BIO_R_TAG_MISMATCH				 116
-#define BIO_R_UNABLE_TO_BIND_SOCKET			 117
-#define BIO_R_UNABLE_TO_CREATE_SOCKET			 118
-#define BIO_R_UNABLE_TO_LISTEN_SOCKET			 119
-#define BIO_R_UNINITIALIZED				 120
-#define BIO_R_UNSUPPORTED_METHOD			 121
-#define BIO_R_WRITE_TO_READ_ONLY_BIO			 126
-#define BIO_R_WSASTARTUP				 122
-
-#ifdef  __cplusplus
-}
-#endif
-#endif
diff --git a/extra_lib/include/openssl/bn.h b/extra_lib/include/openssl/bn.h
deleted file mode 100644
index e484b7f..0000000
--- a/extra_lib/include/openssl/bn.h
+++ /dev/null
@@ -1,858 +0,0 @@
-/* crypto/bn/bn.h */
-/* Copyright (C) 1995-1997 Eric Young (eay at cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay at cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh at cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay at cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh at cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-/* ====================================================================
- * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. 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.
- *
- * 3. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
- *
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
- *    endorse or promote products derived from this software without
- *    prior written permission. For written permission, please contact
- *    openssl-core at openssl.org.
- *
- * 5. Products derived from this software may not be called "OpenSSL"
- *    nor may "OpenSSL" appear in their names without prior written
- *    permission of the OpenSSL Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- *    acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
- *
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
- * EXPRESSED 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 OpenSSL PROJECT OR
- * ITS 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.
- * ====================================================================
- *
- * This product includes cryptographic software written by Eric Young
- * (eay at cryptsoft.com).  This product includes software written by Tim
- * Hudson (tjh at cryptsoft.com).
- *
- */
-/* ====================================================================
- * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
- *
- * Portions of the attached software ("Contribution") are developed by 
- * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
- *
- * The Contribution is licensed pursuant to the Eric Young open source
- * license provided above.
- *
- * The binary polynomial arithmetic software is originally written by 
- * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
- *
- */
-
-#ifndef HEADER_BN_H
-#define HEADER_BN_H
-
-#include <openssl/e_os2.h>
-#ifndef OPENSSL_NO_FP_API
-#include <stdio.h> /* FILE */
-#endif
-#include <openssl/ossl_typ.h>
-#include <openssl/crypto.h>
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-/* These preprocessor symbols control various aspects of the bignum headers and
- * library code. They're not defined by any "normal" configuration, as they are
- * intended for development and testing purposes. NB: defining all three can be
- * useful for debugging application code as well as openssl itself.
- *
- * BN_DEBUG - turn on various debugging alterations to the bignum code
- * BN_DEBUG_RAND - uses random poisoning of unused words to trip up
- * mismanagement of bignum internals. You must also define BN_DEBUG.
- */
-/* #define BN_DEBUG */
-/* #define BN_DEBUG_RAND */
-
-#ifndef OPENSSL_SMALL_FOOTPRINT
-#define BN_MUL_COMBA
-#define BN_SQR_COMBA
-#define BN_RECURSION
-#endif
-
-/* This next option uses the C libraries (2 word)/(1 word) function.
- * If it is not defined, I use my C version (which is slower).
- * The reason for this flag is that when the particular C compiler
- * library routine is used, and the library is linked with a different
- * compiler, the library is missing.  This mostly happens when the
- * library is built with gcc and then linked using normal cc.  This would
- * be a common occurrence because gcc normally produces code that is
- * 2 times faster than system compilers for the big number stuff.
- * For machines with only one compiler (or shared libraries), this should
- * be on.  Again this in only really a problem on machines
- * using "long long's", are 32bit, and are not using my assembler code. */
-#if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WINDOWS) || \
-    defined(OPENSSL_SYS_WIN32) || defined(linux)
-# ifndef BN_DIV2W
-#  define BN_DIV2W
-# endif
-#endif
-
-/* assuming long is 64bit - this is the DEC Alpha
- * unsigned long long is only 64 bits :-(, don't define
- * BN_LLONG for the DEC Alpha */
-#ifdef SIXTY_FOUR_BIT_LONG
-#define BN_ULLONG	unsigned long long
-#define BN_ULONG	unsigned long
-#define BN_LONG		long
-#define BN_BITS		128
-#define BN_BYTES	8
-#define BN_BITS2	64
-#define BN_BITS4	32
-#define BN_MASK		(0xffffffffffffffffffffffffffffffffLL)
-#define BN_MASK2	(0xffffffffffffffffL)
-#define BN_MASK2l	(0xffffffffL)
-#define BN_MASK2h	(0xffffffff00000000L)
-#define BN_MASK2h1	(0xffffffff80000000L)
-#define BN_TBIT		(0x8000000000000000L)
-#define BN_DEC_CONV	(10000000000000000000UL)
-#define BN_DEC_FMT1	"%lu"
-#define BN_DEC_FMT2	"%019lu"
-#define BN_DEC_NUM	19
-#define BN_HEX_FMT1	"%lX"
-#define BN_HEX_FMT2	"%016lX"
-#endif
-
-/* This is where the long long data type is 64 bits, but long is 32.
- * For machines where there are 64bit registers, this is the mode to use.
- * IRIX, on R4000 and above should use this mode, along with the relevant
- * assembler code :-).  Do NOT define BN_LLONG.
- */
-#ifdef SIXTY_FOUR_BIT
-#undef BN_LLONG
-#undef BN_ULLONG
-#define BN_ULONG	unsigned long long
-#define BN_LONG		long long
-#define BN_BITS		128
-#define BN_BYTES	8
-#define BN_BITS2	64
-#define BN_BITS4	32
-#define BN_MASK2	(0xffffffffffffffffLL)
-#define BN_MASK2l	(0xffffffffL)
-#define BN_MASK2h	(0xffffffff00000000LL)
-#define BN_MASK2h1	(0xffffffff80000000LL)
-#define BN_TBIT		(0x8000000000000000LL)
-#define BN_DEC_CONV	(10000000000000000000ULL)
-#define BN_DEC_FMT1	"%llu"
-#define BN_DEC_FMT2	"%019llu"
-#define BN_DEC_NUM	19
-#define BN_HEX_FMT1	"%llX"
-#define BN_HEX_FMT2	"%016llX"
-#endif
-
-#ifdef THIRTY_TWO_BIT
-#ifdef BN_LLONG
-# if defined(_WIN32) && !defined(__GNUC__)
-#  define BN_ULLONG	unsigned __int64
-#  define BN_MASK	(0xffffffffffffffffI64)
-# else
-#  define BN_ULLONG	unsigned long long
-#  define BN_MASK	(0xffffffffffffffffLL)
-# endif
-#endif
-#define BN_ULONG	unsigned int
-#define BN_LONG		int
-#define BN_BITS		64
-#define BN_BYTES	4
-#define BN_BITS2	32
-#define BN_BITS4	16
-#define BN_MASK2	(0xffffffffL)
-#define BN_MASK2l	(0xffff)
-#define BN_MASK2h1	(0xffff8000L)
-#define BN_MASK2h	(0xffff0000L)
-#define BN_TBIT		(0x80000000L)
-#define BN_DEC_CONV	(1000000000L)
-#define BN_DEC_FMT1	"%u"
-#define BN_DEC_FMT2	"%09u"
-#define BN_DEC_NUM	9
-#define BN_HEX_FMT1	"%X"
-#define BN_HEX_FMT2	"%08X"
-#endif
-
-#define BN_DEFAULT_BITS	1280
-
-#define BN_FLG_MALLOCED		0x01
-#define BN_FLG_STATIC_DATA	0x02
-#define BN_FLG_CONSTTIME	0x04 /* avoid leaking exponent information through timing,
-                                      * BN_mod_exp_mont() will call BN_mod_exp_mont_consttime,
-                                      * BN_div() will call BN_div_no_branch,
-                                      * BN_mod_inverse() will call BN_mod_inverse_no_branch.
-                                      */
-
-#ifndef OPENSSL_NO_DEPRECATED
-#define BN_FLG_EXP_CONSTTIME BN_FLG_CONSTTIME /* deprecated name for the flag */
-                                      /* avoid leaking exponent information through timings
-                                      * (BN_mod_exp_mont() will call BN_mod_exp_mont_consttime) */
-#endif
-
-#ifndef OPENSSL_NO_DEPRECATED
-#define BN_FLG_FREE		0x8000	/* used for debuging */
-#endif
-#define BN_set_flags(b,n)	((b)->flags|=(n))
-#define BN_get_flags(b,n)	((b)->flags&(n))
-
-/* get a clone of a BIGNUM with changed flags, for *temporary* use only
- * (the two BIGNUMs cannot not be used in parallel!) */
-#define BN_with_flags(dest,b,n)  ((dest)->d=(b)->d, \
-                                  (dest)->top=(b)->top, \
-                                  (dest)->dmax=(b)->dmax, \
-                                  (dest)->neg=(b)->neg, \
-                                  (dest)->flags=(((dest)->flags & BN_FLG_MALLOCED) \
-                                                 |  ((b)->flags & ~BN_FLG_MALLOCED) \
-                                                 |  BN_FLG_STATIC_DATA \
-                                                 |  (n)))
-
-/* Already declared in ossl_typ.h */
-#if 0
-typedef struct bignum_st BIGNUM;
-/* Used for temp variables (declaration hidden in bn_lcl.h) */
-typedef struct bignum_ctx BN_CTX;
-typedef struct bn_blinding_st BN_BLINDING;
-typedef struct bn_mont_ctx_st BN_MONT_CTX;
-typedef struct bn_recp_ctx_st BN_RECP_CTX;
-typedef struct bn_gencb_st BN_GENCB;
-#endif
-
-struct bignum_st
-	{
-	BN_ULONG *d;	/* Pointer to an array of 'BN_BITS2' bit chunks. */
-	int top;	/* Index of last used d +1. */
-	/* The next are internal book keeping for bn_expand. */
-	int dmax;	/* Size of the d array. */
-	int neg;	/* one if the number is negative */
-	int flags;
-	};
-
-/* Used for montgomery multiplication */
-struct bn_mont_ctx_st
-	{
-	int ri;        /* number of bits in R */
-	BIGNUM RR;     /* used to convert to montgomery form */
-	BIGNUM N;      /* The modulus */
-	BIGNUM Ni;     /* R*(1/R mod N) - N*Ni = 1
-	                * (Ni is only stored for bignum algorithm) */
-	BN_ULONG n0[2];/* least significant word(s) of Ni;
-	                  (type changed with 0.9.9, was "BN_ULONG n0;" before) */
-	int flags;
-	};
-
-/* Used for reciprocal division/mod functions
- * It cannot be shared between threads
- */
-struct bn_recp_ctx_st
-	{
-	BIGNUM N;	/* the divisor */
-	BIGNUM Nr;	/* the reciprocal */
-	int num_bits;
-	int shift;
-	int flags;
-	};
-
-/* Used for slow "generation" functions. */
-struct bn_gencb_st
-	{
-	unsigned int ver;	/* To handle binary (in)compatibility */
-	void *arg;		/* callback-specific data */
-	union
-		{
-		/* if(ver==1) - handles old style callbacks */
-		void (*cb_1)(int, int, void *);
-		/* if(ver==2) - new callback style */
-		int (*cb_2)(int, int, BN_GENCB *);
-		} cb;
-	};
-/* Wrapper function to make using BN_GENCB easier,  */
-int BN_GENCB_call(BN_GENCB *cb, int a, int b);
-/* Macro to populate a BN_GENCB structure with an "old"-style callback */
-#define BN_GENCB_set_old(gencb, callback, cb_arg) { \
-		BN_GENCB *tmp_gencb = (gencb); \
-		tmp_gencb->ver = 1; \
-		tmp_gencb->arg = (cb_arg); \
-		tmp_gencb->cb.cb_1 = (callback); }
-/* Macro to populate a BN_GENCB structure with a "new"-style callback */
-#define BN_GENCB_set(gencb, callback, cb_arg) { \
-		BN_GENCB *tmp_gencb = (gencb); \
-		tmp_gencb->ver = 2; \
-		tmp_gencb->arg = (cb_arg); \
-		tmp_gencb->cb.cb_2 = (callback); }
-
-#define BN_prime_checks 0 /* default: select number of iterations
-			     based on the size of the number */
-
-/* number of Miller-Rabin iterations for an error rate  of less than 2^-80
- * for random 'b'-bit input, b >= 100 (taken from table 4.4 in the Handbook
- * of Applied Cryptography [Menezes, van Oorschot, Vanstone; CRC Press 1996];
- * original paper: Damgaard, Landrock, Pomerance: Average case error estimates
- * for the strong probable prime test. -- Math. Comp. 61 (1993) 177-194) */
-#define BN_prime_checks_for_size(b) ((b) >= 1300 ?  2 : \
-                                (b) >=  850 ?  3 : \
-                                (b) >=  650 ?  4 : \
-                                (b) >=  550 ?  5 : \
-                                (b) >=  450 ?  6 : \
-                                (b) >=  400 ?  7 : \
-                                (b) >=  350 ?  8 : \
-                                (b) >=  300 ?  9 : \
-                                (b) >=  250 ? 12 : \
-                                (b) >=  200 ? 15 : \
-                                (b) >=  150 ? 18 : \
-                                /* b >= 100 */ 27)
-
-#define BN_num_bytes(a)	((BN_num_bits(a)+7)/8)
-
-/* Note that BN_abs_is_word didn't work reliably for w == 0 until 0.9.8 */
-#define BN_abs_is_word(a,w) ((((a)->top == 1) && ((a)->d[0] == (BN_ULONG)(w))) || \
-				(((w) == 0) && ((a)->top == 0)))
-#define BN_is_zero(a)       ((a)->top == 0)
-#define BN_is_one(a)        (BN_abs_is_word((a),1) && !(a)->neg)
-#define BN_is_word(a,w)     (BN_abs_is_word((a),(w)) && (!(w) || !(a)->neg))
-#define BN_is_odd(a)	    (((a)->top > 0) && ((a)->d[0] & 1))
-
-#define BN_one(a)	(BN_set_word((a),1))
-#define BN_zero_ex(a) \
-	do { \
-		BIGNUM *_tmp_bn = (a); \
-		_tmp_bn->top = 0; \
-		_tmp_bn->neg = 0; \
-	} while(0)
-#ifdef OPENSSL_NO_DEPRECATED
-#define BN_zero(a)	BN_zero_ex(a)
-#else
-#define BN_zero(a)	(BN_set_word((a),0))
-#endif
-
-const BIGNUM *BN_value_one(void);
-char *	BN_options(void);
-BN_CTX *BN_CTX_new(void);
-#ifndef OPENSSL_NO_DEPRECATED
-void	BN_CTX_init(BN_CTX *c);
-#endif
-void	BN_CTX_free(BN_CTX *c);
-void	BN_CTX_start(BN_CTX *ctx);
-BIGNUM *BN_CTX_get(BN_CTX *ctx);
-void	BN_CTX_end(BN_CTX *ctx);
-int     BN_rand(BIGNUM *rnd, int bits, int top,int bottom);
-int     BN_pseudo_rand(BIGNUM *rnd, int bits, int top,int bottom);
-int	BN_rand_range(BIGNUM *rnd, const BIGNUM *range);
-int	BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range);
-int	BN_num_bits(const BIGNUM *a);
-int	BN_num_bits_word(BN_ULONG);
-BIGNUM *BN_new(void);
-void	BN_init(BIGNUM *);
-void	BN_clear_free(BIGNUM *a);
-BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b);
-void	BN_swap(BIGNUM *a, BIGNUM *b);
-BIGNUM *BN_bin2bn(const unsigned char *s,int len,BIGNUM *ret);
-int	BN_bn2bin(const BIGNUM *a, unsigned char *to);
-BIGNUM *BN_mpi2bn(const unsigned char *s,int len,BIGNUM *ret);
-int	BN_bn2mpi(const BIGNUM *a, unsigned char *to);
-int	BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
-int	BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
-int	BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
-int	BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
-int	BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
-int	BN_sqr(BIGNUM *r, const BIGNUM *a,BN_CTX *ctx);
-/** BN_set_negative sets sign of a BIGNUM
- * \param  b  pointer to the BIGNUM object
- * \param  n  0 if the BIGNUM b should be positive and a value != 0 otherwise 
- */
-void	BN_set_negative(BIGNUM *b, int n);
-/** BN_is_negative returns 1 if the BIGNUM is negative
- * \param  a  pointer to the BIGNUM object
- * \return 1 if a < 0 and 0 otherwise
- */
-#define BN_is_negative(a) ((a)->neg != 0)
-
-int	BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d,
-	BN_CTX *ctx);
-#define BN_mod(rem,m,d,ctx) BN_div(NULL,(rem),(m),(d),(ctx))
-int	BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx);
-int	BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx);
-int	BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m);
-int	BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx);
-int	BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m);
-int	BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
-	const BIGNUM *m, BN_CTX *ctx);
-int	BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
-int	BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
-int	BN_mod_lshift1_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *m);
-int	BN_mod_lshift(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m, BN_CTX *ctx);
-int	BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m);
-
-BN_ULONG BN_mod_word(const BIGNUM *a, BN_ULONG w);
-BN_ULONG BN_div_word(BIGNUM *a, BN_ULONG w);
-int	BN_mul_word(BIGNUM *a, BN_ULONG w);
-int	BN_add_word(BIGNUM *a, BN_ULONG w);
-int	BN_sub_word(BIGNUM *a, BN_ULONG w);
-int	BN_set_word(BIGNUM *a, BN_ULONG w);
-BN_ULONG BN_get_word(const BIGNUM *a);
-
-int	BN_cmp(const BIGNUM *a, const BIGNUM *b);
-void	BN_free(BIGNUM *a);
-int	BN_is_bit_set(const BIGNUM *a, int n);
-int	BN_lshift(BIGNUM *r, const BIGNUM *a, int n);
-int	BN_lshift1(BIGNUM *r, const BIGNUM *a);
-int	BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,BN_CTX *ctx);
-
-int	BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
-	const BIGNUM *m,BN_CTX *ctx);
-int	BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
-	const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
-int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
-	const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont);
-int	BN_mod_exp_mont_word(BIGNUM *r, BN_ULONG a, const BIGNUM *p,
-	const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
-int	BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1,
-	const BIGNUM *a2, const BIGNUM *p2,const BIGNUM *m,
-	BN_CTX *ctx,BN_MONT_CTX *m_ctx);
-int	BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
-	const BIGNUM *m,BN_CTX *ctx);
-
-int	BN_mask_bits(BIGNUM *a,int n);
-#ifndef OPENSSL_NO_FP_API
-int	BN_print_fp(FILE *fp, const BIGNUM *a);
-#endif
-#ifdef HEADER_BIO_H
-int	BN_print(BIO *fp, const BIGNUM *a);
-#else
-int	BN_print(void *fp, const BIGNUM *a);
-#endif
-int	BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx);
-int	BN_rshift(BIGNUM *r, const BIGNUM *a, int n);
-int	BN_rshift1(BIGNUM *r, const BIGNUM *a);
-void	BN_clear(BIGNUM *a);
-BIGNUM *BN_dup(const BIGNUM *a);
-int	BN_ucmp(const BIGNUM *a, const BIGNUM *b);
-int	BN_set_bit(BIGNUM *a, int n);
-int	BN_clear_bit(BIGNUM *a, int n);
-char *	BN_bn2hex(const BIGNUM *a);
-char *	BN_bn2dec(const BIGNUM *a);
-int 	BN_hex2bn(BIGNUM **a, const char *str);
-int 	BN_dec2bn(BIGNUM **a, const char *str);
-int	BN_asc2bn(BIGNUM **a, const char *str);
-int	BN_gcd(BIGNUM *r,const BIGNUM *a,const BIGNUM *b,BN_CTX *ctx);
-int	BN_kronecker(const BIGNUM *a,const BIGNUM *b,BN_CTX *ctx); /* returns -2 for error */
-BIGNUM *BN_mod_inverse(BIGNUM *ret,
-	const BIGNUM *a, const BIGNUM *n,BN_CTX *ctx);
-BIGNUM *BN_mod_sqrt(BIGNUM *ret,
-	const BIGNUM *a, const BIGNUM *n,BN_CTX *ctx);
-
-/* Deprecated versions */
-#ifndef OPENSSL_NO_DEPRECATED
-BIGNUM *BN_generate_prime(BIGNUM *ret,int bits,int safe,
-	const BIGNUM *add, const BIGNUM *rem,
-	void (*callback)(int,int,void *),void *cb_arg);
-int	BN_is_prime(const BIGNUM *p,int nchecks,
-	void (*callback)(int,int,void *),
-	BN_CTX *ctx,void *cb_arg);
-int	BN_is_prime_fasttest(const BIGNUM *p,int nchecks,
-	void (*callback)(int,int,void *),BN_CTX *ctx,void *cb_arg,
-	int do_trial_division);
-#endif /* !defined(OPENSSL_NO_DEPRECATED) */
-
-/* Newer versions */
-int	BN_generate_prime_ex(BIGNUM *ret,int bits,int safe, const BIGNUM *add,
-		const BIGNUM *rem, BN_GENCB *cb);
-int	BN_is_prime_ex(const BIGNUM *p,int nchecks, BN_CTX *ctx, BN_GENCB *cb);
-int	BN_is_prime_fasttest_ex(const BIGNUM *p,int nchecks, BN_CTX *ctx,
-		int do_trial_division, BN_GENCB *cb);
-
-BN_MONT_CTX *BN_MONT_CTX_new(void );
-void BN_MONT_CTX_init(BN_MONT_CTX *ctx);
-int BN_mod_mul_montgomery(BIGNUM *r,const BIGNUM *a,const BIGNUM *b,
-	BN_MONT_CTX *mont, BN_CTX *ctx);
-#define BN_to_montgomery(r,a,mont,ctx)	BN_mod_mul_montgomery(\
-	(r),(a),&((mont)->RR),(mont),(ctx))
-int BN_from_montgomery(BIGNUM *r,const BIGNUM *a,
-	BN_MONT_CTX *mont, BN_CTX *ctx);
-void BN_MONT_CTX_free(BN_MONT_CTX *mont);
-int BN_MONT_CTX_set(BN_MONT_CTX *mont,const BIGNUM *mod,BN_CTX *ctx);
-BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to,BN_MONT_CTX *from);
-BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, int lock,
-					const BIGNUM *mod, BN_CTX *ctx);
-
-/* BN_BLINDING flags */
-#define	BN_BLINDING_NO_UPDATE	0x00000001
-#define	BN_BLINDING_NO_RECREATE	0x00000002
-
-BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod);
-void BN_BLINDING_free(BN_BLINDING *b);
-int BN_BLINDING_update(BN_BLINDING *b,BN_CTX *ctx);
-int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
-int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
-int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *);
-int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b, BN_CTX *);
-#ifndef OPENSSL_NO_DEPRECATED
-unsigned long BN_BLINDING_get_thread_id(const BN_BLINDING *);
-void BN_BLINDING_set_thread_id(BN_BLINDING *, unsigned long);
-#endif
-CRYPTO_THREADID *BN_BLINDING_thread_id(BN_BLINDING *);
-unsigned long BN_BLINDING_get_flags(const BN_BLINDING *);
-void BN_BLINDING_set_flags(BN_BLINDING *, unsigned long);
-BN_BLINDING *BN_BLINDING_create_param(BN_BLINDING *b,
-	const BIGNUM *e, BIGNUM *m, BN_CTX *ctx,
-	int (*bn_mod_exp)(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
-			  const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx),
-	BN_MONT_CTX *m_ctx);
-
-#ifndef OPENSSL_NO_DEPRECATED
-void BN_set_params(int mul,int high,int low,int mont);
-int BN_get_params(int which); /* 0, mul, 1 high, 2 low, 3 mont */
-#endif
-
-void	BN_RECP_CTX_init(BN_RECP_CTX *recp);
-BN_RECP_CTX *BN_RECP_CTX_new(void);
-void	BN_RECP_CTX_free(BN_RECP_CTX *recp);
-int	BN_RECP_CTX_set(BN_RECP_CTX *recp,const BIGNUM *rdiv,BN_CTX *ctx);
-int	BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y,
-	BN_RECP_CTX *recp,BN_CTX *ctx);
-int	BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
-	const BIGNUM *m, BN_CTX *ctx);
-int	BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,
-	BN_RECP_CTX *recp, BN_CTX *ctx);
-
-/* Functions for arithmetic over binary polynomials represented by BIGNUMs. 
- *
- * The BIGNUM::neg property of BIGNUMs representing binary polynomials is
- * ignored.
- *
- * Note that input arguments are not const so that their bit arrays can
- * be expanded to the appropriate size if needed.
- */
-
-int	BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); /*r = a + b*/
-#define BN_GF2m_sub(r, a, b) BN_GF2m_add(r, a, b)
-int	BN_GF2m_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *p); /*r=a mod p*/
-int	BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
-	const BIGNUM *p, BN_CTX *ctx); /* r = (a * b) mod p */
-int	BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
-	BN_CTX *ctx); /* r = (a * a) mod p */
-int	BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *b, const BIGNUM *p,
-	BN_CTX *ctx); /* r = (1 / b) mod p */
-int	BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
-	const BIGNUM *p, BN_CTX *ctx); /* r = (a / b) mod p */
-int	BN_GF2m_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
-	const BIGNUM *p, BN_CTX *ctx); /* r = (a ^ b) mod p */
-int	BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
-	BN_CTX *ctx); /* r = sqrt(a) mod p */
-int	BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
-	BN_CTX *ctx); /* r^2 + r = a mod p */
-#define BN_GF2m_cmp(a, b) BN_ucmp((a), (b))
-/* Some functions allow for representation of the irreducible polynomials
- * as an unsigned int[], say p.  The irreducible f(t) is then of the form:
- *     t^p[0] + t^p[1] + ... + t^p[k]
- * where m = p[0] > p[1] > ... > p[k] = 0.
- */
-int	BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const int p[]);
-	/* r = a mod p */
-int	BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
-	const int p[], BN_CTX *ctx); /* r = (a * b) mod p */
-int	BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const int p[],
-	BN_CTX *ctx); /* r = (a * a) mod p */
-int	BN_GF2m_mod_inv_arr(BIGNUM *r, const BIGNUM *b, const int p[],
-	BN_CTX *ctx); /* r = (1 / b) mod p */
-int	BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
-	const int p[], BN_CTX *ctx); /* r = (a / b) mod p */
-int	BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
-	const int p[], BN_CTX *ctx); /* r = (a ^ b) mod p */
-int	BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a,
-	const int p[], BN_CTX *ctx); /* r = sqrt(a) mod p */
-int	BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a,
-	const int p[], BN_CTX *ctx); /* r^2 + r = a mod p */
-int	BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max);
-int	BN_GF2m_arr2poly(const int p[], BIGNUM *a);
-
-/* faster mod functions for the 'NIST primes' 
- * 0 <= a < p^2 */
-int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
-int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
-int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
-int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
-int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
-
-const BIGNUM *BN_get0_nist_prime_192(void);
-const BIGNUM *BN_get0_nist_prime_224(void);
-const BIGNUM *BN_get0_nist_prime_256(void);
-const BIGNUM *BN_get0_nist_prime_384(void);
-const BIGNUM *BN_get0_nist_prime_521(void);
-
-/* library internal functions */
-
-#define bn_expand(a,bits) ((((((bits+BN_BITS2-1))/BN_BITS2)) <= (a)->dmax)?\
-	(a):bn_expand2((a),(bits+BN_BITS2-1)/BN_BITS2))
-#define bn_wexpand(a,words) (((words) <= (a)->dmax)?(a):bn_expand2((a),(words)))
-BIGNUM *bn_expand2(BIGNUM *a, int words);
-#ifndef OPENSSL_NO_DEPRECATED
-BIGNUM *bn_dup_expand(const BIGNUM *a, int words); /* unused */
-#endif
-
-/* Bignum consistency macros
- * There is one "API" macro, bn_fix_top(), for stripping leading zeroes from
- * bignum data after direct manipulations on the data. There is also an
- * "internal" macro, bn_check_top(), for verifying that there are no leading
- * zeroes. Unfortunately, some auditing is required due to the fact that
- * bn_fix_top() has become an overabused duct-tape because bignum data is
- * occasionally passed around in an inconsistent state. So the following
- * changes have been made to sort this out;
- * - bn_fix_top()s implementation has been moved to bn_correct_top()
- * - if BN_DEBUG isn't defined, bn_fix_top() maps to bn_correct_top(), and
- *   bn_check_top() is as before.
- * - if BN_DEBUG *is* defined;
- *   - bn_check_top() tries to pollute unused words even if the bignum 'top' is
- *     consistent. (ed: only if BN_DEBUG_RAND is defined)
- *   - bn_fix_top() maps to bn_check_top() rather than "fixing" anything.
- * The idea is to have debug builds flag up inconsistent bignums when they
- * occur. If that occurs in a bn_fix_top(), we examine the code in question; if
- * the use of bn_fix_top() was appropriate (ie. it follows directly after code
- * that manipulates the bignum) it is converted to bn_correct_top(), and if it
- * was not appropriate, we convert it permanently to bn_check_top() and track
- * down the cause of the bug. Eventually, no internal code should be using the
- * bn_fix_top() macro. External applications and libraries should try this with
- * their own code too, both in terms of building against the openssl headers
- * with BN_DEBUG defined *and* linking with a version of OpenSSL built with it
- * defined. This not only improves external code, it provides more test
- * coverage for openssl's own code.
- */
-
-#ifdef BN_DEBUG
-
-/* We only need assert() when debugging */
-#include <assert.h>
-
-#ifdef BN_DEBUG_RAND
-/* To avoid "make update" cvs wars due to BN_DEBUG, use some tricks */
-#ifndef RAND_pseudo_bytes
-int RAND_pseudo_bytes(unsigned char *buf,int num);
-#define BN_DEBUG_TRIX
-#endif
-#define bn_pollute(a) \
-	do { \
-		const BIGNUM *_bnum1 = (a); \
-		if(_bnum1->top < _bnum1->dmax) { \
-			unsigned char _tmp_char; \
-			/* We cast away const without the compiler knowing, any \
-			 * *genuinely* constant variables that aren't mutable \
-			 * wouldn't be constructed with top!=dmax. */ \
-			BN_ULONG *_not_const; \
-			memcpy(&_not_const, &_bnum1->d, sizeof(BN_ULONG*)); \
-			RAND_pseudo_bytes(&_tmp_char, 1); \
-			memset((unsigned char *)(_not_const + _bnum1->top), _tmp_char, \
-				(_bnum1->dmax - _bnum1->top) * sizeof(BN_ULONG)); \
-		} \
-	} while(0)
-#ifdef BN_DEBUG_TRIX
-#undef RAND_pseudo_bytes
-#endif
-#else
-#define bn_pollute(a)
-#endif
-#define bn_check_top(a) \
-	do { \
-		const BIGNUM *_bnum2 = (a); \
-		if (_bnum2 != NULL) { \
-			assert((_bnum2->top == 0) || \
-				(_bnum2->d[_bnum2->top - 1] != 0)); \
-			bn_pollute(_bnum2); \
-		} \
-	} while(0)
-
-#define bn_fix_top(a)		bn_check_top(a)
-
-#else /* !BN_DEBUG */
-
-#define bn_pollute(a)
-#define bn_check_top(a)
-#define bn_fix_top(a)		bn_correct_top(a)
-
-#endif
-
-#define bn_correct_top(a) \
-        { \
-        BN_ULONG *ftl; \
-	int tmp_top = (a)->top; \
-	if (tmp_top > 0) \
-		{ \
-		for (ftl= &((a)->d[tmp_top-1]); tmp_top > 0; tmp_top--) \
-			if (*(ftl--)) break; \
-		(a)->top = tmp_top; \
-		} \
-	bn_pollute(a); \
-	}
-
-BN_ULONG bn_mul_add_words(BN_ULONG *rp, const BN_ULONG *ap, int num, BN_ULONG w);
-BN_ULONG bn_mul_words(BN_ULONG *rp, const BN_ULONG *ap, int num, BN_ULONG w);
-void     bn_sqr_words(BN_ULONG *rp, const BN_ULONG *ap, int num);
-BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d);
-BN_ULONG bn_add_words(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,int num);
-BN_ULONG bn_sub_words(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,int num);
-
-/* Primes from RFC 2409 */
-BIGNUM *get_rfc2409_prime_768(BIGNUM *bn);
-BIGNUM *get_rfc2409_prime_1024(BIGNUM *bn);
-
-/* Primes from RFC 3526 */
-BIGNUM *get_rfc3526_prime_1536(BIGNUM *bn);
-BIGNUM *get_rfc3526_prime_2048(BIGNUM *bn);
-BIGNUM *get_rfc3526_prime_3072(BIGNUM *bn);
-BIGNUM *get_rfc3526_prime_4096(BIGNUM *bn);
-BIGNUM *get_rfc3526_prime_6144(BIGNUM *bn);
-BIGNUM *get_rfc3526_prime_8192(BIGNUM *bn);
-
-int BN_bntest_rand(BIGNUM *rnd, int bits, int top,int bottom);
-
-/* BEGIN ERROR CODES */
-/* The following lines are auto generated by the script mkerr.pl. Any changes
- * made after this point may be overwritten when the script is next run.
- */
-void ERR_load_BN_strings(void);
-
-/* Error codes for the BN functions. */
-
-/* Function codes. */
-#define BN_F_BNRAND					 127
-#define BN_F_BN_BLINDING_CONVERT_EX			 100
-#define BN_F_BN_BLINDING_CREATE_PARAM			 128
-#define BN_F_BN_BLINDING_INVERT_EX			 101
-#define BN_F_BN_BLINDING_NEW				 102
-#define BN_F_BN_BLINDING_UPDATE				 103
-#define BN_F_BN_BN2DEC					 104
-#define BN_F_BN_BN2HEX					 105
-#define BN_F_BN_CTX_GET					 116
-#define BN_F_BN_CTX_NEW					 106
-#define BN_F_BN_CTX_START				 129
-#define BN_F_BN_DIV					 107
-#define BN_F_BN_DIV_NO_BRANCH				 138
-#define BN_F_BN_DIV_RECP				 130
-#define BN_F_BN_EXP					 123
-#define BN_F_BN_EXPAND2					 108
-#define BN_F_BN_EXPAND_INTERNAL				 120
-#define BN_F_BN_GF2M_MOD				 131
-#define BN_F_BN_GF2M_MOD_EXP				 132
-#define BN_F_BN_GF2M_MOD_MUL				 133
-#define BN_F_BN_GF2M_MOD_SOLVE_QUAD			 134
-#define BN_F_BN_GF2M_MOD_SOLVE_QUAD_ARR			 135
-#define BN_F_BN_GF2M_MOD_SQR				 136
-#define BN_F_BN_GF2M_MOD_SQRT				 137
-#define BN_F_BN_MOD_EXP2_MONT				 118
-#define BN_F_BN_MOD_EXP_MONT				 109
-#define BN_F_BN_MOD_EXP_MONT_CONSTTIME			 124
-#define BN_F_BN_MOD_EXP_MONT_WORD			 117
-#define BN_F_BN_MOD_EXP_RECP				 125
-#define BN_F_BN_MOD_EXP_SIMPLE				 126
-#define BN_F_BN_MOD_INVERSE				 110
-#define BN_F_BN_MOD_INVERSE_NO_BRANCH			 139
-#define BN_F_BN_MOD_LSHIFT_QUICK			 119
-#define BN_F_BN_MOD_MUL_RECIPROCAL			 111
-#define BN_F_BN_MOD_SQRT				 121
-#define BN_F_BN_MPI2BN					 112
-#define BN_F_BN_NEW					 113
-#define BN_F_BN_RAND					 114
-#define BN_F_BN_RAND_RANGE				 122
-#define BN_F_BN_USUB					 115
-
-/* Reason codes. */
-#define BN_R_ARG2_LT_ARG3				 100
-#define BN_R_BAD_RECIPROCAL				 101
-#define BN_R_BIGNUM_TOO_LONG				 114
-#define BN_R_CALLED_WITH_EVEN_MODULUS			 102
-#define BN_R_DIV_BY_ZERO				 103
-#define BN_R_ENCODING_ERROR				 104
-#define BN_R_EXPAND_ON_STATIC_BIGNUM_DATA		 105
-#define BN_R_INPUT_NOT_REDUCED				 110
-#define BN_R_INVALID_LENGTH				 106
-#define BN_R_INVALID_RANGE				 115
-#define BN_R_NOT_A_SQUARE				 111
-#define BN_R_NOT_INITIALIZED				 107
-#define BN_R_NO_INVERSE					 108
-#define BN_R_NO_SOLUTION				 116
-#define BN_R_P_IS_NOT_PRIME				 112
-#define BN_R_TOO_MANY_ITERATIONS			 113
-#define BN_R_TOO_MANY_TEMPORARY_VARIABLES		 109
-
-#ifdef  __cplusplus
-}
-#endif
-#endif
diff --git a/extra_lib/include/openssl/buffer.h b/extra_lib/include/openssl/buffer.h
deleted file mode 100644
index 178e418..0000000
--- a/extra_lib/include/openssl/buffer.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/* crypto/buffer/buffer.h */
-/* Copyright (C) 1995-1998 Eric Young (eay at cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay at cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh at cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay at cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh at cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef HEADER_BUFFER_H
-#define HEADER_BUFFER_H
-
-#include <openssl/ossl_typ.h>
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-#include <stddef.h>
-
-#if !defined(NO_SYS_TYPES_H)
-#include <sys/types.h>
-#endif
-
-/* Already declared in ossl_typ.h */
-/* typedef struct buf_mem_st BUF_MEM; */
-
-struct buf_mem_st
-	{
-	size_t length;	/* current number of bytes */
-	char *data;
-	size_t max;	/* size of buffer */
-	};
-
-BUF_MEM *BUF_MEM_new(void);
-void	BUF_MEM_free(BUF_MEM *a);
-int	BUF_MEM_grow(BUF_MEM *str, size_t len);
-int	BUF_MEM_grow_clean(BUF_MEM *str, size_t len);
-char *	BUF_strdup(const char *str);
-char *	BUF_strndup(const char *str, size_t siz);
-void *	BUF_memdup(const void *data, size_t siz);
-void	BUF_reverse(unsigned char *out, unsigned char *in, size_t siz);
-
-/* safe string functions */
-size_t BUF_strlcpy(char *dst,const char *src,size_t siz);
-size_t BUF_strlcat(char *dst,const char *src,size_t siz);
-
-
-/* BEGIN ERROR CODES */
-/* The following lines are auto generated by the script mkerr.pl. Any changes
- * made after this point may be overwritten when the script is next run.
- */
-void ERR_load_BUF_strings(void);
-
-/* Error codes for the BUF functions. */
-
-/* Function codes. */
-#define BUF_F_BUF_MEMDUP				 103
-#define BUF_F_BUF_MEM_GROW				 100
-#define BUF_F_BUF_MEM_GROW_CLEAN			 105
-#define BUF_F_BUF_MEM_NEW				 101
-#define BUF_F_BUF_STRDUP				 102
-#define BUF_F_BUF_STRNDUP				 104
-
-/* Reason codes. */
-
-#ifdef  __cplusplus
-}
-#endif
-#endif
diff --git a/extra_lib/include/openssl/comp.h b/extra_lib/include/openssl/comp.h
deleted file mode 100644
index 4b405c7..0000000
--- a/extra_lib/include/openssl/comp.h
+++ /dev/null
@@ -1,80 +0,0 @@
-
-#ifndef HEADER_COMP_H
-#define HEADER_COMP_H
-
-#include <openssl/crypto.h>
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-typedef struct comp_ctx_st COMP_CTX;
-
-typedef struct comp_method_st
-	{
-	int type;		/* NID for compression library */
-	const char *name;	/* A text string to identify the library */
-	int (*init)(COMP_CTX *ctx);
-	void (*finish)(COMP_CTX *ctx);
-	int (*compress)(COMP_CTX *ctx,
-			unsigned char *out, unsigned int olen,
-			unsigned char *in, unsigned int ilen);
-	int (*expand)(COMP_CTX *ctx,
-		      unsigned char *out, unsigned int olen,
-		      unsigned char *in, unsigned int ilen);
-	/* The following two do NOTHING, but are kept for backward compatibility */
-	long (*ctrl)(void);
-	long (*callback_ctrl)(void);
-	} COMP_METHOD;
-
-struct comp_ctx_st
-	{
-	COMP_METHOD *meth;
-	unsigned long compress_in;
-	unsigned long compress_out;
-	unsigned long expand_in;
-	unsigned long expand_out;
-
-	CRYPTO_EX_DATA	ex_data;
-	};
-
-
-COMP_CTX *COMP_CTX_new(COMP_METHOD *meth);
-void COMP_CTX_free(COMP_CTX *ctx);
-int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen,
-	unsigned char *in, int ilen);
-int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen,
-	unsigned char *in, int ilen);
-COMP_METHOD *COMP_rle(void );
-COMP_METHOD *COMP_zlib(void );
-void COMP_zlib_cleanup(void);
-
-#ifdef HEADER_BIO_H
-#ifdef ZLIB
-BIO_METHOD *BIO_f_zlib(void);
-#endif
-#endif
-
-/* BEGIN ERROR CODES */
-/* The following lines are auto generated by the script mkerr.pl. Any changes
- * made after this point may be overwritten when the script is next run.
- */
-void ERR_load_COMP_strings(void);
-
-/* Error codes for the COMP functions. */
-
-/* Function codes. */
-#define COMP_F_BIO_ZLIB_FLUSH				 99
-#define COMP_F_BIO_ZLIB_NEW				 100
-#define COMP_F_BIO_ZLIB_READ				 101
-#define COMP_F_BIO_ZLIB_WRITE				 102
-
-/* Reason codes. */
-#define COMP_R_ZLIB_DEFLATE_ERROR			 99
-#define COMP_R_ZLIB_INFLATE_ERROR			 100
-#define COMP_R_ZLIB_NOT_SUPPORTED			 101
-
-#ifdef  __cplusplus
-}
-#endif
-#endif
diff --git a/extra_lib/include/openssl/conf.h b/extra_lib/include/openssl/conf.h
deleted file mode 100644
index c219997..0000000
--- a/extra_lib/include/openssl/conf.h
+++ /dev/null
@@ -1,263 +0,0 @@
-/* crypto/conf/conf.h */
-/* Copyright (C) 1995-1998 Eric Young (eay at cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay at cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh at cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay at cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh at cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef  HEADER_CONF_H
-#define HEADER_CONF_H
-
-#include <openssl/bio.h>
-#include <openssl/lhash.h>
-#include <openssl/stack.h>
-#include <openssl/safestack.h>
-#include <openssl/e_os2.h>
-
-#include <openssl/ossl_typ.h>
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-typedef struct
-	{
-	char *section;
-	char *name;
-	char *value;
-	} CONF_VALUE;
-
-DECLARE_STACK_OF(CONF_VALUE)
-DECLARE_LHASH_OF(CONF_VALUE);
-
-struct conf_st;
-struct conf_method_st;
-typedef struct conf_method_st CONF_METHOD;
-
-struct conf_method_st
-	{
-	const char *name;
-	CONF *(*create)(CONF_METHOD *meth);
-	int (*init)(CONF *conf);
-	int (*destroy)(CONF *conf);
-	int (*destroy_data)(CONF *conf);
-	int (*load_bio)(CONF *conf, BIO *bp, long *eline);
-	int (*dump)(const CONF *conf, BIO *bp);
-	int (*is_number)(const CONF *conf, char c);
-	int (*to_int)(const CONF *conf, char c);
-	int (*load)(CONF *conf, const char *name, long *eline);
-	};
-
-/* Module definitions */
-
-typedef struct conf_imodule_st CONF_IMODULE;
-typedef struct conf_module_st CONF_MODULE;
-
-DECLARE_STACK_OF(CONF_MODULE)
-DECLARE_STACK_OF(CONF_IMODULE)
-
-/* DSO module function typedefs */
-typedef int conf_init_func(CONF_IMODULE *md, const CONF *cnf);
-typedef void conf_finish_func(CONF_IMODULE *md);
-
-#define	CONF_MFLAGS_IGNORE_ERRORS	0x1
-#define CONF_MFLAGS_IGNORE_RETURN_CODES	0x2
-#define CONF_MFLAGS_SILENT		0x4
-#define CONF_MFLAGS_NO_DSO		0x8
-#define CONF_MFLAGS_IGNORE_MISSING_FILE	0x10
-#define CONF_MFLAGS_DEFAULT_SECTION	0x20
-
-int CONF_set_default_method(CONF_METHOD *meth);
-void CONF_set_nconf(CONF *conf,LHASH_OF(CONF_VALUE) *hash);
-LHASH_OF(CONF_VALUE) *CONF_load(LHASH_OF(CONF_VALUE) *conf,const char *file,
-				long *eline);
-#ifndef OPENSSL_NO_FP_API
-LHASH_OF(CONF_VALUE) *CONF_load_fp(LHASH_OF(CONF_VALUE) *conf, FILE *fp,
-				   long *eline);
-#endif
-LHASH_OF(CONF_VALUE) *CONF_load_bio(LHASH_OF(CONF_VALUE) *conf, BIO *bp,long *eline);
-STACK_OF(CONF_VALUE) *CONF_get_section(LHASH_OF(CONF_VALUE) *conf,
-				       const char *section);
-char *CONF_get_string(LHASH_OF(CONF_VALUE) *conf,const char *group,
-		      const char *name);
-long CONF_get_number(LHASH_OF(CONF_VALUE) *conf,const char *group,
-		     const char *name);
-void CONF_free(LHASH_OF(CONF_VALUE) *conf);
-int CONF_dump_fp(LHASH_OF(CONF_VALUE) *conf, FILE *out);
-int CONF_dump_bio(LHASH_OF(CONF_VALUE) *conf, BIO *out);
-
-void OPENSSL_config(const char *config_name);
-void OPENSSL_no_config(void);
-
-/* New conf code.  The semantics are different from the functions above.
-   If that wasn't the case, the above functions would have been replaced */
-
-struct conf_st
-	{
-	CONF_METHOD *meth;
-	void *meth_data;
-	LHASH_OF(CONF_VALUE) *data;
-	};
-
-CONF *NCONF_new(CONF_METHOD *meth);
-CONF_METHOD *NCONF_default(void);
-CONF_METHOD *NCONF_WIN32(void);
-#if 0 /* Just to give you an idea of what I have in mind */
-CONF_METHOD *NCONF_XML(void);
-#endif
-void NCONF_free(CONF *conf);
-void NCONF_free_data(CONF *conf);
-
-int NCONF_load(CONF *conf,const char *file,long *eline);
-#ifndef OPENSSL_NO_FP_API
-int NCONF_load_fp(CONF *conf, FILE *fp,long *eline);
-#endif
-int NCONF_load_bio(CONF *conf, BIO *bp,long *eline);
-STACK_OF(CONF_VALUE) *NCONF_get_section(const CONF *conf,const char *section);
-char *NCONF_get_string(const CONF *conf,const char *group,const char *name);
-int NCONF_get_number_e(const CONF *conf,const char *group,const char *name,
-		       long *result);
-int NCONF_dump_fp(const CONF *conf, FILE *out);
-int NCONF_dump_bio(const CONF *conf, BIO *out);
-
-#if 0 /* The following function has no error checking,
-	 and should therefore be avoided */
-long NCONF_get_number(CONF *conf,char *group,char *name);
-#else
-#define NCONF_get_number(c,g,n,r) NCONF_get_number_e(c,g,n,r)
-#endif
-  
-/* Module functions */
-
-int CONF_modules_load(const CONF *cnf, const char *appname,
-		      unsigned long flags);
-int CONF_modules_load_file(const char *filename, const char *appname,
-			   unsigned long flags);
-void CONF_modules_unload(int all);
-void CONF_modules_finish(void);
-void CONF_modules_free(void);
-int CONF_module_add(const char *name, conf_init_func *ifunc,
-		    conf_finish_func *ffunc);
-
-const char *CONF_imodule_get_name(const CONF_IMODULE *md);
-const char *CONF_imodule_get_value(const CONF_IMODULE *md);
-void *CONF_imodule_get_usr_data(const CONF_IMODULE *md);
-void CONF_imodule_set_usr_data(CONF_IMODULE *md, void *usr_data);
-CONF_MODULE *CONF_imodule_get_module(const CONF_IMODULE *md);
-unsigned long CONF_imodule_get_flags(const CONF_IMODULE *md);
-void CONF_imodule_set_flags(CONF_IMODULE *md, unsigned long flags);
-void *CONF_module_get_usr_data(CONF_MODULE *pmod);
-void CONF_module_set_usr_data(CONF_MODULE *pmod, void *usr_data);
-
-char *CONF_get1_default_config_file(void);
-
-int CONF_parse_list(const char *list, int sep, int nospc,
-	int (*list_cb)(const char *elem, int len, void *usr), void *arg);
-
-void OPENSSL_load_builtin_modules(void);
-
-/* BEGIN ERROR CODES */
-/* The following lines are auto generated by the script mkerr.pl. Any changes
- * made after this point may be overwritten when the script is next run.
- */
-void ERR_load_CONF_strings(void);
-
-/* Error codes for the CONF functions. */
-
-/* Function codes. */
-#define CONF_F_CONF_DUMP_FP				 104
-#define CONF_F_CONF_LOAD				 100
-#define CONF_F_CONF_LOAD_BIO				 102
-#define CONF_F_CONF_LOAD_FP				 103
-#define CONF_F_CONF_MODULES_LOAD			 116
-#define CONF_F_CONF_PARSE_LIST				 119
-#define CONF_F_DEF_LOAD					 120
-#define CONF_F_DEF_LOAD_BIO				 121
-#define CONF_F_MODULE_INIT				 115
-#define CONF_F_MODULE_LOAD_DSO				 117
-#define CONF_F_MODULE_RUN				 118
-#define CONF_F_NCONF_DUMP_BIO				 105
-#define CONF_F_NCONF_DUMP_FP				 106
-#define CONF_F_NCONF_GET_NUMBER				 107
-#define CONF_F_NCONF_GET_NUMBER_E			 112
-#define CONF_F_NCONF_GET_SECTION			 108
-#define CONF_F_NCONF_GET_STRING				 109
-#define CONF_F_NCONF_LOAD				 113
-#define CONF_F_NCONF_LOAD_BIO				 110
-#define CONF_F_NCONF_LOAD_FP				 114
-#define CONF_F_NCONF_NEW				 111
-#define CONF_F_STR_COPY					 101
-
-/* Reason codes. */
-#define CONF_R_ERROR_LOADING_DSO			 110
-#define CONF_R_LIST_CANNOT_BE_NULL			 115
-#define CONF_R_MISSING_CLOSE_SQUARE_BRACKET		 100
-#define CONF_R_MISSING_EQUAL_SIGN			 101
-#define CONF_R_MISSING_FINISH_FUNCTION			 111
-#define CONF_R_MISSING_INIT_FUNCTION			 112
-#define CONF_R_MODULE_INITIALIZATION_ERROR		 109
-#define CONF_R_NO_CLOSE_BRACE				 102
-#define CONF_R_NO_CONF					 105
-#define CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE		 106
-#define CONF_R_NO_SECTION				 107
-#define CONF_R_NO_SUCH_FILE				 114
-#define CONF_R_NO_VALUE					 108
-#define CONF_R_UNABLE_TO_CREATE_NEW_SECTION		 103
-#define CONF_R_UNKNOWN_MODULE_NAME			 113
-#define CONF_R_VARIABLE_HAS_NO_VALUE			 104
-
-#ifdef  __cplusplus
-}
-#endif
-#endif
diff --git a/extra_lib/include/openssl/crypto.h b/extra_lib/include/openssl/crypto.h
deleted file mode 100644
index b0360ce..0000000
--- a/extra_lib/include/openssl/crypto.h
+++ /dev/null
@@ -1,575 +0,0 @@
-/* crypto/crypto.h */
-/* ====================================================================
- * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. 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.
- *
- * 3. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
- *
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
- *    endorse or promote products derived from this software without
- *    prior written permission. For written permission, please contact
- *    openssl-core at openssl.org.
- *
- * 5. Products derived from this software may not be called "OpenSSL"
- *    nor may "OpenSSL" appear in their names without prior written
- *    permission of the OpenSSL Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- *    acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
- *
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
- * EXPRESSED 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 OpenSSL PROJECT OR
- * ITS 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.
- * ====================================================================
- *
- * This product includes cryptographic software written by Eric Young
- * (eay at cryptsoft.com).  This product includes software written by Tim
- * Hudson (tjh at cryptsoft.com).
- *
- */
-/* Copyright (C) 1995-1998 Eric Young (eay at cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay at cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh at cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay at cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh at cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-/* ====================================================================
- * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
- * ECDH support in OpenSSL originally developed by 
- * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
- */
-
-#ifndef HEADER_CRYPTO_H
-#define HEADER_CRYPTO_H
-
-#include <stdlib.h>
-
-#include <openssl/e_os2.h>
-
-#ifndef OPENSSL_NO_FP_API
-#include <stdio.h>
-#endif
-
-#include <openssl/stack.h>
-#include <openssl/safestack.h>
-#include <openssl/opensslv.h>
-#include <openssl/ossl_typ.h>
-
-#ifdef CHARSET_EBCDIC
-#include <openssl/ebcdic.h>
-#endif
-
-/* Resolve problems on some operating systems with symbol names that clash
-   one way or another */
-#include <openssl/symhacks.h>
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-/* Backward compatibility to SSLeay */
-/* This is more to be used to check the correct DLL is being used
- * in the MS world. */
-#define SSLEAY_VERSION_NUMBER	OPENSSL_VERSION_NUMBER
-#define SSLEAY_VERSION		0
-/* #define SSLEAY_OPTIONS	1 no longer supported */
-#define SSLEAY_CFLAGS		2
-#define SSLEAY_BUILT_ON		3
-#define SSLEAY_PLATFORM		4
-#define SSLEAY_DIR		5
-
-/* Already declared in ossl_typ.h */
-#if 0
-typedef struct crypto_ex_data_st CRYPTO_EX_DATA;
-/* Called when a new object is created */
-typedef int CRYPTO_EX_new(void *parent, void *ptr, CRYPTO_EX_DATA *ad,
-					int idx, long argl, void *argp);
-/* Called when an object is free()ed */
-typedef void CRYPTO_EX_free(void *parent, void *ptr, CRYPTO_EX_DATA *ad,
-					int idx, long argl, void *argp);
-/* Called when we need to dup an object */
-typedef int CRYPTO_EX_dup(CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from, void *from_d, 
-					int idx, long argl, void *argp);
-#endif
-
-/* A generic structure to pass assorted data in a expandable way */
-typedef struct openssl_item_st
-	{
-	int code;
-	void *value;		/* Not used for flag attributes */
-	size_t value_size;	/* Max size of value for output, length for input */
-	size_t *value_length;	/* Returned length of value for output */
-	} OPENSSL_ITEM;
-
-
-/* When changing the CRYPTO_LOCK_* list, be sure to maintin the text lock
- * names in cryptlib.c
- */
-
-#define	CRYPTO_LOCK_ERR			1
-#define	CRYPTO_LOCK_EX_DATA		2
-#define	CRYPTO_LOCK_X509		3
-#define	CRYPTO_LOCK_X509_INFO		4
-#define	CRYPTO_LOCK_X509_PKEY		5
-#define CRYPTO_LOCK_X509_CRL		6
-#define CRYPTO_LOCK_X509_REQ		7
-#define CRYPTO_LOCK_DSA			8
-#define CRYPTO_LOCK_RSA			9
-#define CRYPTO_LOCK_EVP_PKEY		10
-#define CRYPTO_LOCK_X509_STORE		11
-#define CRYPTO_LOCK_SSL_CTX		12
-#define CRYPTO_LOCK_SSL_CERT		13
-#define CRYPTO_LOCK_SSL_SESSION		14
-#define CRYPTO_LOCK_SSL_SESS_CERT	15
-#define CRYPTO_LOCK_SSL			16
-#define CRYPTO_LOCK_SSL_METHOD		17
-#define CRYPTO_LOCK_RAND		18
-#define CRYPTO_LOCK_RAND2		19
-#define CRYPTO_LOCK_MALLOC		20
-#define CRYPTO_LOCK_BIO			21
-#define CRYPTO_LOCK_GETHOSTBYNAME	22
-#define CRYPTO_LOCK_GETSERVBYNAME	23
-#define CRYPTO_LOCK_READDIR		24
-#define CRYPTO_LOCK_RSA_BLINDING	25
-#define CRYPTO_LOCK_DH			26
-#define CRYPTO_LOCK_MALLOC2		27
-#define CRYPTO_LOCK_DSO			28
-#define CRYPTO_LOCK_DYNLOCK		29
-#define CRYPTO_LOCK_ENGINE		30
-#define CRYPTO_LOCK_UI			31
-#define CRYPTO_LOCK_ECDSA               32
-#define CRYPTO_LOCK_EC			33
-#define CRYPTO_LOCK_ECDH		34
-#define CRYPTO_LOCK_BN  		35
-#define CRYPTO_LOCK_EC_PRE_COMP		36
-#define CRYPTO_LOCK_STORE		37
-#define CRYPTO_LOCK_COMP		38
-#define CRYPTO_LOCK_FIPS		39
-#define CRYPTO_LOCK_FIPS2		40
-#define CRYPTO_NUM_LOCKS		41
-
-#define CRYPTO_LOCK		1
-#define CRYPTO_UNLOCK		2
-#define CRYPTO_READ		4
-#define CRYPTO_WRITE		8
-
-#ifndef OPENSSL_NO_LOCKING
-#ifndef CRYPTO_w_lock
-#define CRYPTO_w_lock(type)	\
-	CRYPTO_lock(CRYPTO_LOCK|CRYPTO_WRITE,type,__FILE__,__LINE__)
-#define CRYPTO_w_unlock(type)	\
-	CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_WRITE,type,__FILE__,__LINE__)
-#define CRYPTO_r_lock(type)	\
-	CRYPTO_lock(CRYPTO_LOCK|CRYPTO_READ,type,__FILE__,__LINE__)
-#define CRYPTO_r_unlock(type)	\
-	CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_READ,type,__FILE__,__LINE__)
-#define CRYPTO_add(addr,amount,type)	\
-	CRYPTO_add_lock(addr,amount,type,__FILE__,__LINE__)
-#endif
-#else
-#define CRYPTO_w_lock(a)
-#define CRYPTO_w_unlock(a)
-#define CRYPTO_r_lock(a)
-#define CRYPTO_r_unlock(a)
-#define CRYPTO_add(a,b,c)	((*(a))+=(b))
-#endif
-
-/* Some applications as well as some parts of OpenSSL need to allocate
-   and deallocate locks in a dynamic fashion.  The following typedef
-   makes this possible in a type-safe manner.  */
-/* struct CRYPTO_dynlock_value has to be defined by the application. */
-typedef struct
-	{
-	int references;
-	struct CRYPTO_dynlock_value *data;
-	} CRYPTO_dynlock;
-
-
-/* The following can be used to detect memory leaks in the SSLeay library.
- * It used, it turns on malloc checking */
-
-#define CRYPTO_MEM_CHECK_OFF	0x0	/* an enume */
-#define CRYPTO_MEM_CHECK_ON	0x1	/* a bit */
-#define CRYPTO_MEM_CHECK_ENABLE	0x2	/* a bit */
-#define CRYPTO_MEM_CHECK_DISABLE 0x3	/* an enume */
-
-/* The following are bit values to turn on or off options connected to the
- * malloc checking functionality */
-
-/* Adds time to the memory checking information */
-#define V_CRYPTO_MDEBUG_TIME	0x1 /* a bit */
-/* Adds thread number to the memory checking information */
-#define V_CRYPTO_MDEBUG_THREAD	0x2 /* a bit */
-
-#define V_CRYPTO_MDEBUG_ALL (V_CRYPTO_MDEBUG_TIME | V_CRYPTO_MDEBUG_THREAD)
-
-
-/* predec of the BIO type */
-typedef struct bio_st BIO_dummy;
-
-struct crypto_ex_data_st
-	{
-	STACK_OF(void) *sk;
-	int dummy; /* gcc is screwing up this data structure :-( */
-	};
-DECLARE_STACK_OF(void)
-
-/* This stuff is basically class callback functions
- * The current classes are SSL_CTX, SSL, SSL_SESSION, and a few more */
-
-typedef struct crypto_ex_data_func_st
-	{
-	long argl;	/* Arbitary long */
-	void *argp;	/* Arbitary void * */
-	CRYPTO_EX_new *new_func;
-	CRYPTO_EX_free *free_func;
-	CRYPTO_EX_dup *dup_func;
-	} CRYPTO_EX_DATA_FUNCS;
-
-DECLARE_STACK_OF(CRYPTO_EX_DATA_FUNCS)
-
-/* Per class, we have a STACK of CRYPTO_EX_DATA_FUNCS for each CRYPTO_EX_DATA
- * entry.
- */
-
-#define CRYPTO_EX_INDEX_BIO		0
-#define CRYPTO_EX_INDEX_SSL		1
-#define CRYPTO_EX_INDEX_SSL_CTX		2
-#define CRYPTO_EX_INDEX_SSL_SESSION	3
-#define CRYPTO_EX_INDEX_X509_STORE	4
-#define CRYPTO_EX_INDEX_X509_STORE_CTX	5
-#define CRYPTO_EX_INDEX_RSA		6
-#define CRYPTO_EX_INDEX_DSA		7
-#define CRYPTO_EX_INDEX_DH		8
-#define CRYPTO_EX_INDEX_ENGINE		9
-#define CRYPTO_EX_INDEX_X509		10
-#define CRYPTO_EX_INDEX_UI		11
-#define CRYPTO_EX_INDEX_ECDSA		12
-#define CRYPTO_EX_INDEX_ECDH		13
-#define CRYPTO_EX_INDEX_COMP		14
-#define CRYPTO_EX_INDEX_STORE		15
-
-/* Dynamically assigned indexes start from this value (don't use directly, use
- * via CRYPTO_ex_data_new_class). */
-#define CRYPTO_EX_INDEX_USER		100
-
-
-/* This is the default callbacks, but we can have others as well:
- * this is needed in Win32 where the application malloc and the
- * library malloc may not be the same.
- */
-#define CRYPTO_malloc_init()	CRYPTO_set_mem_functions(\
-	malloc, realloc, free)
-
-#if defined CRYPTO_MDEBUG_ALL || defined CRYPTO_MDEBUG_TIME || defined CRYPTO_MDEBUG_THREAD
-# ifndef CRYPTO_MDEBUG /* avoid duplicate #define */
-#  define CRYPTO_MDEBUG
-# endif
-#endif
-
-/* Set standard debugging functions (not done by default
- * unless CRYPTO_MDEBUG is defined) */
-#define CRYPTO_malloc_debug_init()	do {\
-	CRYPTO_set_mem_debug_functions(\
-		CRYPTO_dbg_malloc,\
-		CRYPTO_dbg_realloc,\
-		CRYPTO_dbg_free,\
-		CRYPTO_dbg_set_options,\
-		CRYPTO_dbg_get_options);\
-	} while(0)
-
-int CRYPTO_mem_ctrl(int mode);
-int CRYPTO_is_mem_check_on(void);
-
-/* for applications */
-#define MemCheck_start() CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON)
-#define MemCheck_stop()	CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_OFF)
-
-/* for library-internal use */
-#define MemCheck_on()	CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE)
-#define MemCheck_off()	CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE)
-#define is_MemCheck_on() CRYPTO_is_mem_check_on()
-
-#define OPENSSL_malloc(num)	CRYPTO_malloc((int)num,__FILE__,__LINE__)
-#define OPENSSL_strdup(str)	CRYPTO_strdup((str),__FILE__,__LINE__)
-#define OPENSSL_realloc(addr,num) \
-	CRYPTO_realloc((char *)addr,(int)num,__FILE__,__LINE__)
-#define OPENSSL_realloc_clean(addr,old_num,num) \
-	CRYPTO_realloc_clean(addr,old_num,num,__FILE__,__LINE__)
-#define OPENSSL_remalloc(addr,num) \
-	CRYPTO_remalloc((char **)addr,(int)num,__FILE__,__LINE__)
-#define OPENSSL_freeFunc	CRYPTO_free
-#define OPENSSL_free(addr)	CRYPTO_free(addr)
-
-#define OPENSSL_malloc_locked(num) \
-	CRYPTO_malloc_locked((int)num,__FILE__,__LINE__)
-#define OPENSSL_free_locked(addr) CRYPTO_free_locked(addr)
-
-
-const char *SSLeay_version(int type);
-unsigned long SSLeay(void);
-
-int OPENSSL_issetugid(void);
-
-/* An opaque type representing an implementation of "ex_data" support */
-typedef struct st_CRYPTO_EX_DATA_IMPL	CRYPTO_EX_DATA_IMPL;
-/* Return an opaque pointer to the current "ex_data" implementation */
-const CRYPTO_EX_DATA_IMPL *CRYPTO_get_ex_data_implementation(void);
-/* Sets the "ex_data" implementation to be used (if it's not too late) */
-int CRYPTO_set_ex_data_implementation(const CRYPTO_EX_DATA_IMPL *i);
-/* Get a new "ex_data" class, and return the corresponding "class_index" */
-int CRYPTO_ex_data_new_class(void);
-/* Within a given class, get/register a new index */
-int CRYPTO_get_ex_new_index(int class_index, long argl, void *argp,
-		CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func,
-		CRYPTO_EX_free *free_func);
-/* Initialise/duplicate/free CRYPTO_EX_DATA variables corresponding to a given
- * class (invokes whatever per-class callbacks are applicable) */
-int CRYPTO_new_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
-int CRYPTO_dup_ex_data(int class_index, CRYPTO_EX_DATA *to,
-		CRYPTO_EX_DATA *from);
-void CRYPTO_free_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
-/* Get/set data in a CRYPTO_EX_DATA variable corresponding to a particular index
- * (relative to the class type involved) */
-int CRYPTO_set_ex_data(CRYPTO_EX_DATA *ad, int idx, void *val);
-void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad,int idx);
-/* This function cleans up all "ex_data" state. It mustn't be called under
- * potential race-conditions. */
-void CRYPTO_cleanup_all_ex_data(void);
-
-int CRYPTO_get_new_lockid(char *name);
-
-int CRYPTO_num_locks(void); /* return CRYPTO_NUM_LOCKS (shared libs!) */
-void CRYPTO_lock(int mode, int type,const char *file,int line);
-void CRYPTO_set_locking_callback(void (*func)(int mode,int type,
-					      const char *file,int line));
-void (*CRYPTO_get_locking_callback(void))(int mode,int type,const char *file,
-		int line);
-void CRYPTO_set_add_lock_callback(int (*func)(int *num,int mount,int type,
-					      const char *file, int line));
-int (*CRYPTO_get_add_lock_callback(void))(int *num,int mount,int type,
-					  const char *file,int line);
-
-/* Don't use this structure directly. */
-typedef struct crypto_threadid_st
-	{
-	void *ptr;
-	unsigned long val;
-	} CRYPTO_THREADID;
-/* Only use CRYPTO_THREADID_set_[numeric|pointer]() within callbacks */
-void CRYPTO_THREADID_set_numeric(CRYPTO_THREADID *id, unsigned long val);
-void CRYPTO_THREADID_set_pointer(CRYPTO_THREADID *id, void *ptr);
-int CRYPTO_THREADID_set_callback(void (*threadid_func)(CRYPTO_THREADID *));
-void (*CRYPTO_THREADID_get_callback(void))(CRYPTO_THREADID *);
-void CRYPTO_THREADID_current(CRYPTO_THREADID *id);
-int CRYPTO_THREADID_cmp(const CRYPTO_THREADID *a, const CRYPTO_THREADID *b);
-void CRYPTO_THREADID_cpy(CRYPTO_THREADID *dest, const CRYPTO_THREADID *src);
-unsigned long CRYPTO_THREADID_hash(const CRYPTO_THREADID *id);
-#ifndef OPENSSL_NO_DEPRECATED
-void CRYPTO_set_id_callback(unsigned long (*func)(void));
-unsigned long (*CRYPTO_get_id_callback(void))(void);
-unsigned long CRYPTO_thread_id(void);
-#endif
-
-const char *CRYPTO_get_lock_name(int type);
-int CRYPTO_add_lock(int *pointer,int amount,int type, const char *file,
-		    int line);
-
-int CRYPTO_get_new_dynlockid(void);
-void CRYPTO_destroy_dynlockid(int i);
-struct CRYPTO_dynlock_value *CRYPTO_get_dynlock_value(int i);
-void CRYPTO_set_dynlock_create_callback(struct CRYPTO_dynlock_value *(*dyn_create_function)(const char *file, int line));
-void CRYPTO_set_dynlock_lock_callback(void (*dyn_lock_function)(int mode, struct CRYPTO_dynlock_value *l, const char *file, int line));
-void CRYPTO_set_dynlock_destroy_callback(void (*dyn_destroy_function)(struct CRYPTO_dynlock_value *l, const char *file, int line));
-struct CRYPTO_dynlock_value *(*CRYPTO_get_dynlock_create_callback(void))(const char *file,int line);
-void (*CRYPTO_get_dynlock_lock_callback(void))(int mode, struct CRYPTO_dynlock_value *l, const char *file,int line);
-void (*CRYPTO_get_dynlock_destroy_callback(void))(struct CRYPTO_dynlock_value *l, const char *file,int line);
-
-/* CRYPTO_set_mem_functions includes CRYPTO_set_locked_mem_functions --
- * call the latter last if you need different functions */
-int CRYPTO_set_mem_functions(void *(*m)(size_t),void *(*r)(void *,size_t), void (*f)(void *));
-int CRYPTO_set_locked_mem_functions(void *(*m)(size_t), void (*free_func)(void *));
-int CRYPTO_set_mem_ex_functions(void *(*m)(size_t,const char *,int),
-                                void *(*r)(void *,size_t,const char *,int),
-                                void (*f)(void *));
-int CRYPTO_set_locked_mem_ex_functions(void *(*m)(size_t,const char *,int),
-                                       void (*free_func)(void *));
-int CRYPTO_set_mem_debug_functions(void (*m)(void *,int,const char *,int,int),
-				   void (*r)(void *,void *,int,const char *,int,int),
-				   void (*f)(void *,int),
-				   void (*so)(long),
-				   long (*go)(void));
-void CRYPTO_get_mem_functions(void *(**m)(size_t),void *(**r)(void *, size_t), void (**f)(void *));
-void CRYPTO_get_locked_mem_functions(void *(**m)(size_t), void (**f)(void *));
-void CRYPTO_get_mem_ex_functions(void *(**m)(size_t,const char *,int),
-                                 void *(**r)(void *, size_t,const char *,int),
-                                 void (**f)(void *));
-void CRYPTO_get_locked_mem_ex_functions(void *(**m)(size_t,const char *,int),
-                                        void (**f)(void *));
-void CRYPTO_get_mem_debug_functions(void (**m)(void *,int,const char *,int,int),
-				    void (**r)(void *,void *,int,const char *,int,int),
-				    void (**f)(void *,int),
-				    void (**so)(long),
-				    long (**go)(void));
-
-void *CRYPTO_malloc_locked(int num, const char *file, int line);
-void CRYPTO_free_locked(void *);
-void *CRYPTO_malloc(int num, const char *file, int line);
-char *CRYPTO_strdup(const char *str, const char *file, int line);
-void CRYPTO_free(void *);
-void *CRYPTO_realloc(void *addr,int num, const char *file, int line);
-void *CRYPTO_realloc_clean(void *addr,int old_num,int num,const char *file,
-			   int line);
-void *CRYPTO_remalloc(void *addr,int num, const char *file, int line);
-
-void OPENSSL_cleanse(void *ptr, size_t len);
-
-void CRYPTO_set_mem_debug_options(long bits);
-long CRYPTO_get_mem_debug_options(void);
-
-#define CRYPTO_push_info(info) \
-        CRYPTO_push_info_(info, __FILE__, __LINE__);
-int CRYPTO_push_info_(const char *info, const char *file, int line);
-int CRYPTO_pop_info(void);
-int CRYPTO_remove_all_info(void);
-
-
-/* Default debugging functions (enabled by CRYPTO_malloc_debug_init() macro;
- * used as default in CRYPTO_MDEBUG compilations): */
-/* The last argument has the following significance:
- *
- * 0:	called before the actual memory allocation has taken place
- * 1:	called after the actual memory allocation has taken place
- */
-void CRYPTO_dbg_malloc(void *addr,int num,const char *file,int line,int before_p);
-void CRYPTO_dbg_realloc(void *addr1,void *addr2,int num,const char *file,int line,int before_p);
-void CRYPTO_dbg_free(void *addr,int before_p);
-/* Tell the debugging code about options.  By default, the following values
- * apply:
- *
- * 0:                           Clear all options.
- * V_CRYPTO_MDEBUG_TIME (1):    Set the "Show Time" option.
- * V_CRYPTO_MDEBUG_THREAD (2):  Set the "Show Thread Number" option.
- * V_CRYPTO_MDEBUG_ALL (3):     1 + 2
- */
-void CRYPTO_dbg_set_options(long bits);
-long CRYPTO_dbg_get_options(void);
-
-
-#ifndef OPENSSL_NO_FP_API
-void CRYPTO_mem_leaks_fp(FILE *);
-#endif
-void CRYPTO_mem_leaks(struct bio_st *bio);
-/* unsigned long order, char *file, int line, int num_bytes, char *addr */
-typedef void *CRYPTO_MEM_LEAK_CB(unsigned long, const char *, int, int, void *);
-void CRYPTO_mem_leaks_cb(CRYPTO_MEM_LEAK_CB *cb);
-
-/* die if we have to */
-void OpenSSLDie(const char *file,int line,const char *assertion);
-#define OPENSSL_assert(e)       (void)((e) ? 0 : (OpenSSLDie(__FILE__, __LINE__, #e),1))
-
-unsigned long *OPENSSL_ia32cap_loc(void);
-#define OPENSSL_ia32cap (*(OPENSSL_ia32cap_loc()))
-int OPENSSL_isservice(void);
-
-/* BEGIN ERROR CODES */
-/* The following lines are auto generated by the script mkerr.pl. Any changes
- * made after this point may be overwritten when the script is next run.
- */
-void ERR_load_CRYPTO_strings(void);
-
-/* Error codes for the CRYPTO functions. */
-
-/* Function codes. */
-#define CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX		 100
-#define CRYPTO_F_CRYPTO_GET_NEW_DYNLOCKID		 103
-#define CRYPTO_F_CRYPTO_GET_NEW_LOCKID			 101
-#define CRYPTO_F_CRYPTO_SET_EX_DATA			 102
-#define CRYPTO_F_DEF_ADD_INDEX				 104
-#define CRYPTO_F_DEF_GET_CLASS				 105
-#define CRYPTO_F_INT_DUP_EX_DATA			 106
-#define CRYPTO_F_INT_FREE_EX_DATA			 107
-#define CRYPTO_F_INT_NEW_EX_DATA			 108
-
-/* Reason codes. */
-#define CRYPTO_R_NO_DYNLOCK_CREATE_CALLBACK		 100
-
-#ifdef  __cplusplus
-}
-#endif
-#endif
diff --git a/extra_lib/include/openssl/dh.h b/extra_lib/include/openssl/dh.h
deleted file mode 100644
index 849309a..0000000
--- a/extra_lib/include/openssl/dh.h
+++ /dev/null
@@ -1,260 +0,0 @@
-/* crypto/dh/dh.h */
-/* Copyright (C) 1995-1998 Eric Young (eay at cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay at cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh at cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay at cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh at cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef HEADER_DH_H
-#define HEADER_DH_H
-
-#include <openssl/e_os2.h>
-
-#ifdef OPENSSL_NO_DH
-#error DH is disabled.
-#endif
-
-#ifndef OPENSSL_NO_BIO
-#include <openssl/bio.h>
-#endif
-#include <openssl/ossl_typ.h>
-#ifndef OPENSSL_NO_DEPRECATED
-#include <openssl/bn.h>
-#endif
-	
-#ifndef OPENSSL_DH_MAX_MODULUS_BITS
-# define OPENSSL_DH_MAX_MODULUS_BITS	10000
-#endif
-
-#define DH_FLAG_CACHE_MONT_P     0x01
-#define DH_FLAG_NO_EXP_CONSTTIME 0x02 /* new with 0.9.7h; the built-in DH
-                                       * implementation now uses constant time
-                                       * modular exponentiation for secret exponents
-                                       * by default. This flag causes the
-                                       * faster variable sliding window method to
-                                       * be used for all exponents.
-                                       */
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-/* Already defined in ossl_typ.h */
-/* typedef struct dh_st DH; */
-/* typedef struct dh_method DH_METHOD; */
-
-struct dh_method
-	{
-	const char *name;
-	/* Methods here */
-	int (*generate_key)(DH *dh);
-	int (*compute_key)(unsigned char *key,const BIGNUM *pub_key,DH *dh);
-	int (*bn_mod_exp)(const DH *dh, BIGNUM *r, const BIGNUM *a,
-				const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
-				BN_MONT_CTX *m_ctx); /* Can be null */
-
-	int (*init)(DH *dh);
-	int (*finish)(DH *dh);
-	int flags;
-	char *app_data;
-	/* If this is non-NULL, it will be used to generate parameters */
-	int (*generate_params)(DH *dh, int prime_len, int generator, BN_GENCB *cb);
-	};
-
-struct dh_st
-	{
-	/* This first argument is used to pick up errors when
-	 * a DH is passed instead of a EVP_PKEY */
-	int pad;
-	int version;
-	BIGNUM *p;
-	BIGNUM *g;
-	long length; /* optional */
-	BIGNUM *pub_key;	/* g^x */
-	BIGNUM *priv_key;	/* x */
-
-	int flags;
-	BN_MONT_CTX *method_mont_p;
-	/* Place holders if we want to do X9.42 DH */
-	BIGNUM *q;
-	BIGNUM *j;
-	unsigned char *seed;
-	int seedlen;
-	BIGNUM *counter;
-
-	int references;
-	CRYPTO_EX_DATA ex_data;
-	const DH_METHOD *meth;
-	ENGINE *engine;
-	};
-
-#define DH_GENERATOR_2		2
-/* #define DH_GENERATOR_3	3 */
-#define DH_GENERATOR_5		5
-
-/* DH_check error codes */
-#define DH_CHECK_P_NOT_PRIME		0x01
-#define DH_CHECK_P_NOT_SAFE_PRIME	0x02
-#define DH_UNABLE_TO_CHECK_GENERATOR	0x04
-#define DH_NOT_SUITABLE_GENERATOR	0x08
-
-/* DH_check_pub_key error codes */
-#define DH_CHECK_PUBKEY_TOO_SMALL	0x01
-#define DH_CHECK_PUBKEY_TOO_LARGE	0x02
-
-/* primes p where (p-1)/2 is prime too are called "safe"; we define
-   this for backward compatibility: */
-#define DH_CHECK_P_NOT_STRONG_PRIME	DH_CHECK_P_NOT_SAFE_PRIME
-
-#define d2i_DHparams_fp(fp,x) (DH *)ASN1_d2i_fp((char *(*)())DH_new, \
-		(char *(*)())d2i_DHparams,(fp),(unsigned char **)(x))
-#define i2d_DHparams_fp(fp,x) ASN1_i2d_fp(i2d_DHparams,(fp), \
-		(unsigned char *)(x))
-#define d2i_DHparams_bio(bp,x) ASN1_d2i_bio_of(DH,DH_new,d2i_DHparams,bp,x)
-#define i2d_DHparams_bio(bp,x) ASN1_i2d_bio_of_const(DH,i2d_DHparams,bp,x)
-
-DH *DHparams_dup(DH *);
-
-const DH_METHOD *DH_OpenSSL(void);
-
-void DH_set_default_method(const DH_METHOD *meth);
-const DH_METHOD *DH_get_default_method(void);
-int DH_set_method(DH *dh, const DH_METHOD *meth);
-DH *DH_new_method(ENGINE *engine);
-
-DH *	DH_new(void);
-void	DH_free(DH *dh);
-int	DH_up_ref(DH *dh);
-int	DH_size(const DH *dh);
-int DH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
-	     CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
-int DH_set_ex_data(DH *d, int idx, void *arg);
-void *DH_get_ex_data(DH *d, int idx);
-
-/* Deprecated version */
-#ifndef OPENSSL_NO_DEPRECATED
-DH *	DH_generate_parameters(int prime_len,int generator,
-		void (*callback)(int,int,void *),void *cb_arg);
-#endif /* !defined(OPENSSL_NO_DEPRECATED) */
-
-/* New version */
-int	DH_generate_parameters_ex(DH *dh, int prime_len,int generator, BN_GENCB *cb);
-
-int	DH_check(const DH *dh,int *codes);
-int	DH_check_pub_key(const DH *dh,const BIGNUM *pub_key, int *codes);
-int	DH_generate_key(DH *dh);
-int	DH_compute_key(unsigned char *key,const BIGNUM *pub_key,DH *dh);
-DH *	d2i_DHparams(DH **a,const unsigned char **pp, long length);
-int	i2d_DHparams(const DH *a,unsigned char **pp);
-#ifndef OPENSSL_NO_FP_API
-int	DHparams_print_fp(FILE *fp, const DH *x);
-#endif
-#ifndef OPENSSL_NO_BIO
-int	DHparams_print(BIO *bp, const DH *x);
-#else
-int	DHparams_print(char *bp, const DH *x);
-#endif
-
-#define EVP_PKEY_CTX_set_dh_paramgen_prime_len(ctx, len) \
-	EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \
-			EVP_PKEY_CTRL_DH_PARAMGEN_PRIME_LEN, len, NULL)
-
-#define EVP_PKEY_CTX_set_dh_paramgen_generator(ctx, gen) \
-	EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \
-			EVP_PKEY_CTRL_DH_PARAMGEN_GENERATOR, gen, NULL)
-
-#define	EVP_PKEY_CTRL_DH_PARAMGEN_PRIME_LEN	(EVP_PKEY_ALG_CTRL + 1)
-#define	EVP_PKEY_CTRL_DH_PARAMGEN_GENERATOR	(EVP_PKEY_ALG_CTRL + 2)
-		
-
-/* BEGIN ERROR CODES */
-/* The following lines are auto generated by the script mkerr.pl. Any changes
- * made after this point may be overwritten when the script is next run.
- */
-void ERR_load_DH_strings(void);
-
-/* Error codes for the DH functions. */
-
-/* Function codes. */
-#define DH_F_COMPUTE_KEY				 102
-#define DH_F_DHPARAMS_PRINT_FP				 101
-#define DH_F_DH_BUILTIN_GENPARAMS			 106
-#define DH_F_DH_NEW_METHOD				 105
-#define DH_F_DH_PARAM_DECODE				 107
-#define DH_F_DH_PRIV_DECODE				 110
-#define DH_F_DH_PRIV_ENCODE				 111
-#define DH_F_DH_PUB_DECODE				 108
-#define DH_F_DH_PUB_ENCODE				 109
-#define DH_F_DO_DH_PRINT				 100
-#define DH_F_GENERATE_KEY				 103
-#define DH_F_GENERATE_PARAMETERS			 104
-#define DH_F_PKEY_DH_DERIVE				 112
-#define DH_F_PKEY_DH_KEYGEN				 113
-
-/* Reason codes. */
-#define DH_R_BAD_GENERATOR				 101
-#define DH_R_BN_DECODE_ERROR				 109
-#define DH_R_BN_ERROR					 106
-#define DH_R_DECODE_ERROR				 104
-#define DH_R_INVALID_PUBKEY				 102
-#define DH_R_KEYS_NOT_SET				 108
-#define DH_R_MODULUS_TOO_LARGE				 103
-#define DH_R_NO_PARAMETERS_SET				 107
-#define DH_R_NO_PRIVATE_VALUE				 100
-#define DH_R_PARAMETER_ENCODING_ERROR			 105
-
-#ifdef  __cplusplus
-}
-#endif
-#endif
diff --git a/extra_lib/include/openssl/dsa.h b/extra_lib/include/openssl/dsa.h
deleted file mode 100644
index ac50a5c..0000000
--- a/extra_lib/include/openssl/dsa.h
+++ /dev/null
@@ -1,307 +0,0 @@
-/* crypto/dsa/dsa.h */
-/* Copyright (C) 1995-1998 Eric Young (eay at cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay at cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh at cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay at cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh at cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-/*
- * The DSS routines are based on patches supplied by
- * Steven Schoch <schoch at sheba.arc.nasa.gov>.  He basically did the
- * work and I have just tweaked them a little to fit into my
- * stylistic vision for SSLeay :-) */
-
-#ifndef HEADER_DSA_H
-#define HEADER_DSA_H
-
-#include <openssl/e_os2.h>
-
-#ifdef OPENSSL_NO_DSA
-#error DSA is disabled.
-#endif
-
-#ifndef OPENSSL_NO_BIO
-#include <openssl/bio.h>
-#endif
-#include <openssl/crypto.h>
-#include <openssl/ossl_typ.h>
-
-#ifndef OPENSSL_NO_DEPRECATED
-#include <openssl/bn.h>
-#ifndef OPENSSL_NO_DH
-# include <openssl/dh.h>
-#endif
-#endif
-
-#ifndef OPENSSL_DSA_MAX_MODULUS_BITS
-# define OPENSSL_DSA_MAX_MODULUS_BITS	10000
-#endif
-
-#define DSA_FLAG_CACHE_MONT_P	0x01
-#define DSA_FLAG_NO_EXP_CONSTTIME       0x02 /* new with 0.9.7h; the built-in DSA
-                                              * implementation now uses constant time
-                                              * modular exponentiation for secret exponents
-                                              * by default. This flag causes the
-                                              * faster variable sliding window method to
-                                              * be used for all exponents.
-                                              */
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-/* Already defined in ossl_typ.h */
-/* typedef struct dsa_st DSA; */
-/* typedef struct dsa_method DSA_METHOD; */
-
-typedef struct DSA_SIG_st
-	{
-	BIGNUM *r;
-	BIGNUM *s;
-	} DSA_SIG;
-
-struct dsa_method
-	{
-	const char *name;
-	DSA_SIG * (*dsa_do_sign)(const unsigned char *dgst, int dlen, DSA *dsa);
-	int (*dsa_sign_setup)(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp,
-								BIGNUM **rp);
-	int (*dsa_do_verify)(const unsigned char *dgst, int dgst_len,
-			     DSA_SIG *sig, DSA *dsa);
-	int (*dsa_mod_exp)(DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1,
-			BIGNUM *a2, BIGNUM *p2, BIGNUM *m, BN_CTX *ctx,
-			BN_MONT_CTX *in_mont);
-	int (*bn_mod_exp)(DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
-				const BIGNUM *m, BN_CTX *ctx,
-				BN_MONT_CTX *m_ctx); /* Can be null */
-	int (*init)(DSA *dsa);
-	int (*finish)(DSA *dsa);
-	int flags;
-	char *app_data;
-	/* If this is non-NULL, it is used to generate DSA parameters */
-	int (*dsa_paramgen)(DSA *dsa, int bits,
-			const unsigned char *seed, int seed_len,
-			int *counter_ret, unsigned long *h_ret,
-			BN_GENCB *cb);
-	/* If this is non-NULL, it is used to generate DSA keys */
-	int (*dsa_keygen)(DSA *dsa);
-	};
-
-struct dsa_st
-	{
-	/* This first variable is used to pick up errors where
-	 * a DSA is passed instead of of a EVP_PKEY */
-	int pad;
-	long version;
-	int write_params;
-	BIGNUM *p;
-	BIGNUM *q;	/* == 20 */
-	BIGNUM *g;
-
-	BIGNUM *pub_key;  /* y public key */
-	BIGNUM *priv_key; /* x private key */
-
-	BIGNUM *kinv;	/* Signing pre-calc */
-	BIGNUM *r;	/* Signing pre-calc */
-
-	int flags;
-	/* Normally used to cache montgomery values */
-	BN_MONT_CTX *method_mont_p;
-	int references;
-	CRYPTO_EX_DATA ex_data;
-	const DSA_METHOD *meth;
-	/* functional reference if 'meth' is ENGINE-provided */
-	ENGINE *engine;
-	};
-
-#define d2i_DSAparams_fp(fp,x) (DSA *)ASN1_d2i_fp((char *(*)())DSA_new, \
-		(char *(*)())d2i_DSAparams,(fp),(unsigned char **)(x))
-#define i2d_DSAparams_fp(fp,x) ASN1_i2d_fp(i2d_DSAparams,(fp), \
-		(unsigned char *)(x))
-#define d2i_DSAparams_bio(bp,x) ASN1_d2i_bio_of(DSA,DSA_new,d2i_DSAparams,bp,x)
-#define i2d_DSAparams_bio(bp,x) ASN1_i2d_bio_of_const(DSA,i2d_DSAparams,bp,x)
-
-
-DSA *DSAparams_dup(DSA *x);
-DSA_SIG * DSA_SIG_new(void);
-void	DSA_SIG_free(DSA_SIG *a);
-int	i2d_DSA_SIG(const DSA_SIG *a, unsigned char **pp);
-DSA_SIG * d2i_DSA_SIG(DSA_SIG **v, const unsigned char **pp, long length);
-
-DSA_SIG * DSA_do_sign(const unsigned char *dgst,int dlen,DSA *dsa);
-int	DSA_do_verify(const unsigned char *dgst,int dgst_len,
-		      DSA_SIG *sig,DSA *dsa);
-
-const DSA_METHOD *DSA_OpenSSL(void);
-
-void	DSA_set_default_method(const DSA_METHOD *);
-const DSA_METHOD *DSA_get_default_method(void);
-int	DSA_set_method(DSA *dsa, const DSA_METHOD *);
-
-DSA *	DSA_new(void);
-DSA *	DSA_new_method(ENGINE *engine);
-void	DSA_free (DSA *r);
-/* "up" the DSA object's reference count */
-int	DSA_up_ref(DSA *r);
-int	DSA_size(const DSA *);
-	/* next 4 return -1 on error */
-int	DSA_sign_setup( DSA *dsa,BN_CTX *ctx_in,BIGNUM **kinvp,BIGNUM **rp);
-int	DSA_sign(int type,const unsigned char *dgst,int dlen,
-		unsigned char *sig, unsigned int *siglen, DSA *dsa);
-int	DSA_verify(int type,const unsigned char *dgst,int dgst_len,
-		const unsigned char *sigbuf, int siglen, DSA *dsa);
-int DSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
-	     CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
-int DSA_set_ex_data(DSA *d, int idx, void *arg);
-void *DSA_get_ex_data(DSA *d, int idx);
-
-DSA *	d2i_DSAPublicKey(DSA **a, const unsigned char **pp, long length);
-DSA *	d2i_DSAPrivateKey(DSA **a, const unsigned char **pp, long length);
-DSA * 	d2i_DSAparams(DSA **a, const unsigned char **pp, long length);
-
-/* Deprecated version */
-#ifndef OPENSSL_NO_DEPRECATED
-DSA *	DSA_generate_parameters(int bits,
-		unsigned char *seed,int seed_len,
-		int *counter_ret, unsigned long *h_ret,void
-		(*callback)(int, int, void *),void *cb_arg);
-#endif /* !defined(OPENSSL_NO_DEPRECATED) */
-
-/* New version */
-int	DSA_generate_parameters_ex(DSA *dsa, int bits,
-		const unsigned char *seed,int seed_len,
-		int *counter_ret, unsigned long *h_ret, BN_GENCB *cb);
-
-int	DSA_generate_key(DSA *a);
-int	i2d_DSAPublicKey(const DSA *a, unsigned char **pp);
-int 	i2d_DSAPrivateKey(const DSA *a, unsigned char **pp);
-int	i2d_DSAparams(const DSA *a,unsigned char **pp);
-
-#ifndef OPENSSL_NO_BIO
-int	DSAparams_print(BIO *bp, const DSA *x);
-int	DSA_print(BIO *bp, const DSA *x, int off);
-#endif
-#ifndef OPENSSL_NO_FP_API
-int	DSAparams_print_fp(FILE *fp, const DSA *x);
-int	DSA_print_fp(FILE *bp, const DSA *x, int off);
-#endif
-
-#define DSS_prime_checks 50
-/* Primality test according to FIPS PUB 186[-1], Appendix 2.1:
- * 50 rounds of Rabin-Miller */
-#define DSA_is_prime(n, callback, cb_arg) \
-	BN_is_prime(n, DSS_prime_checks, callback, NULL, cb_arg)
-
-#ifndef OPENSSL_NO_DH
-/* Convert DSA structure (key or just parameters) into DH structure
- * (be careful to avoid small subgroup attacks when using this!) */
-DH *DSA_dup_DH(const DSA *r);
-#endif
-
-#define EVP_PKEY_CTX_set_dsa_paramgen_bits(ctx, nbits) \
-	EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA, EVP_PKEY_OP_PARAMGEN, \
-				EVP_PKEY_CTRL_DSA_PARAMGEN_BITS, nbits, NULL)
-
-#define	EVP_PKEY_CTRL_DSA_PARAMGEN_BITS		(EVP_PKEY_ALG_CTRL + 1)
-#define	EVP_PKEY_CTRL_DSA_PARAMGEN_Q_BITS	(EVP_PKEY_ALG_CTRL + 2)
-#define	EVP_PKEY_CTRL_DSA_PARAMGEN_MD		(EVP_PKEY_ALG_CTRL + 3)
-
-/* BEGIN ERROR CODES */
-/* The following lines are auto generated by the script mkerr.pl. Any changes
- * made after this point may be overwritten when the script is next run.
- */
-void ERR_load_DSA_strings(void);
-
-/* Error codes for the DSA functions. */
-
-/* Function codes. */
-#define DSA_F_D2I_DSA_SIG				 110
-#define DSA_F_DO_DSA_PRINT				 104
-#define DSA_F_DSAPARAMS_PRINT				 100
-#define DSA_F_DSAPARAMS_PRINT_FP			 101
-#define DSA_F_DSA_DO_SIGN				 112
-#define DSA_F_DSA_DO_VERIFY				 113
-#define DSA_F_DSA_NEW_METHOD				 103
-#define DSA_F_DSA_PARAM_DECODE				 119
-#define DSA_F_DSA_PRINT_FP				 105
-#define DSA_F_DSA_PRIV_DECODE				 115
-#define DSA_F_DSA_PRIV_ENCODE				 116
-#define DSA_F_DSA_PUB_DECODE				 117
-#define DSA_F_DSA_PUB_ENCODE				 118
-#define DSA_F_DSA_SIGN					 106
-#define DSA_F_DSA_SIGN_SETUP				 107
-#define DSA_F_DSA_SIG_NEW				 109
-#define DSA_F_DSA_VERIFY				 108
-#define DSA_F_I2D_DSA_SIG				 111
-#define DSA_F_OLD_DSA_PRIV_DECODE			 122
-#define DSA_F_PKEY_DSA_CTRL				 120
-#define DSA_F_PKEY_DSA_KEYGEN				 121
-#define DSA_F_SIG_CB					 114
-
-/* Reason codes. */
-#define DSA_R_BAD_Q_VALUE				 102
-#define DSA_R_BN_DECODE_ERROR				 108
-#define DSA_R_BN_ERROR					 109
-#define DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE		 100
-#define DSA_R_DECODE_ERROR				 104
-#define DSA_R_INVALID_DIGEST_TYPE			 106
-#define DSA_R_MISSING_PARAMETERS			 101
-#define DSA_R_MODULUS_TOO_LARGE				 103
-#define DSA_R_NO_PARAMETERS_SET				 107
-#define DSA_R_PARAMETER_ENCODING_ERROR			 105
-
-#ifdef  __cplusplus
-}
-#endif
-#endif
diff --git a/extra_lib/include/openssl/dtls1.h b/extra_lib/include/openssl/dtls1.h
deleted file mode 100644
index 2900d1d..0000000
--- a/extra_lib/include/openssl/dtls1.h
+++ /dev/null
@@ -1,267 +0,0 @@
-/* ssl/dtls1.h */
-/* 
- * DTLS implementation written by Nagendra Modadugu
- * (nagendra at cs.stanford.edu) for the OpenSSL project 2005.  
- */
-/* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. 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.
- *
- * 3. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
- *
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
- *    endorse or promote products derived from this software without
- *    prior written permission. For written permission, please contact
- *    openssl-core at OpenSSL.org.
- *
- * 5. Products derived from this software may not be called "OpenSSL"
- *    nor may "OpenSSL" appear in their names without prior written
- *    permission of the OpenSSL Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- *    acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
- *
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
- * EXPRESSED 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 OpenSSL PROJECT OR
- * ITS 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.
- * ====================================================================
- *
- * This product includes cryptographic software written by Eric Young
- * (eay at cryptsoft.com).  This product includes software written by Tim
- * Hudson (tjh at cryptsoft.com).
- *
- */
-
-#ifndef HEADER_DTLS1_H 
-#define HEADER_DTLS1_H 
-
-#include <openssl/buffer.h>
-#include <openssl/pqueue.h>
-#ifdef OPENSSL_SYS_VMS
-#include <resource.h>
-#include <sys/timeb.h>
-#endif
-#ifdef OPENSSL_SYS_WIN32
-/* Needed for struct timeval */
-#include <winsock.h>
-#elif defined(OPENSSL_SYS_NETWARE) && !defined(_WINSOCK2API_)
-#include <sys/timeval.h>
-#else
-#include <sys/time.h>
-#endif
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-#define DTLS1_VERSION			0xFEFF
-#define DTLS1_BAD_VER			0x0100
-
-#if 0
-/* this alert description is not specified anywhere... */
-#define DTLS1_AD_MISSING_HANDSHAKE_MESSAGE    110
-#endif
-
-/* lengths of messages */
-#define DTLS1_COOKIE_LENGTH                     256
-
-#define DTLS1_RT_HEADER_LENGTH                  13
-
-#define DTLS1_HM_HEADER_LENGTH                  12
-
-#define DTLS1_HM_BAD_FRAGMENT                   -2
-#define DTLS1_HM_FRAGMENT_RETRY                 -3
-
-#define DTLS1_CCS_HEADER_LENGTH                  1
-
-#ifdef DTLS1_AD_MISSING_HANDSHAKE_MESSAGE
-#define DTLS1_AL_HEADER_LENGTH                   7
-#else
-#define DTLS1_AL_HEADER_LENGTH                   2
-#endif
-
-
-typedef struct dtls1_bitmap_st
-	{
-	unsigned long map;		/* track 32 packets on 32-bit systems
-					   and 64 - on 64-bit systems */
-	unsigned char max_seq_num[8];	/* max record number seen so far,
-					   64-bit value in big-endian
-					   encoding */
-	} DTLS1_BITMAP;
-
-struct dtls1_retransmit_state
-	{
-	EVP_CIPHER_CTX *enc_write_ctx;	/* cryptographic state */
-	EVP_MD_CTX *write_hash;			/* used for mac generation */
-#ifndef OPENSSL_NO_COMP
-	COMP_CTX *compress;				/* compression */
-#else
-	char *compress;	
-#endif
-	SSL_SESSION *session;
-	unsigned short epoch;
-	};
-
-struct hm_header_st
-	{
-	unsigned char type;
-	unsigned long msg_len;
-	unsigned short seq;
-	unsigned long frag_off;
-	unsigned long frag_len;
-	unsigned int is_ccs;
-	struct dtls1_retransmit_state saved_retransmit_state;
-	};
-
-struct ccs_header_st
-	{
-	unsigned char type;
-	unsigned short seq;
-	};
-
-struct dtls1_timeout_st
-	{
-	/* Number of read timeouts so far */
-	unsigned int read_timeouts;
-	
-	/* Number of write timeouts so far */
-	unsigned int write_timeouts;
-	
-	/* Number of alerts received so far */
-	unsigned int num_alerts;
-	};
-
-typedef struct record_pqueue_st
-	{
-	unsigned short epoch;
-	pqueue q;
-	} record_pqueue;
-
-typedef struct hm_fragment_st
-	{
-	struct hm_header_st msg_header;
-	unsigned char *fragment;
-	unsigned char *reassembly;
-	} hm_fragment;
-
-typedef struct dtls1_state_st
-	{
-	unsigned int send_cookie;
-	unsigned char cookie[DTLS1_COOKIE_LENGTH];
-	unsigned char rcvd_cookie[DTLS1_COOKIE_LENGTH];
-	unsigned int cookie_len;
-
-	/* 
-	 * The current data and handshake epoch.  This is initially
-	 * undefined, and starts at zero once the initial handshake is
-	 * completed 
-	 */
-	unsigned short r_epoch;
-	unsigned short w_epoch;
-
-	/* records being received in the current epoch */
-	DTLS1_BITMAP bitmap;
-
-	/* renegotiation starts a new set of sequence numbers */
-	DTLS1_BITMAP next_bitmap;
-
-	/* handshake message numbers */
-	unsigned short handshake_write_seq;
-	unsigned short next_handshake_write_seq;
-
-	unsigned short handshake_read_seq;
-
-	/* save last sequence number for retransmissions */
-	unsigned char last_write_sequence[8];
-
-	/* Received handshake records (processed and unprocessed) */
-	record_pqueue unprocessed_rcds;
-	record_pqueue processed_rcds;
-
-	/* Buffered handshake messages */
-	pqueue buffered_messages;
-
-	/* Buffered (sent) handshake records */
-	pqueue sent_messages;
-
-	/* Buffered application records.
-	 * Only for records between CCS and Finished
-	 * to prevent either protocol violation or
-	 * unnecessary message loss.
-	 */
-	record_pqueue buffered_app_data;
-
-	/* Is set when listening for new connections with dtls1_listen() */
-	unsigned int listen;
-
-	unsigned int mtu; /* max DTLS packet size */
-
-	struct hm_header_st w_msg_hdr;
-	struct hm_header_st r_msg_hdr;
-
-	struct dtls1_timeout_st timeout;
-
-	/* Indicates when the last handshake msg sent will timeout */
-	struct timeval next_timeout;
-
-	/* Timeout duration */
-	unsigned short timeout_duration;
-
-	/* storage for Alert/Handshake protocol data received but not
-	 * yet processed by ssl3_read_bytes: */
-	unsigned char alert_fragment[DTLS1_AL_HEADER_LENGTH];
-	unsigned int alert_fragment_len;
-	unsigned char handshake_fragment[DTLS1_HM_HEADER_LENGTH];
-	unsigned int handshake_fragment_len;
-
-	unsigned int retransmitting;
-	unsigned int change_cipher_spec_ok;
-
-	} DTLS1_STATE;
-
-typedef struct dtls1_record_data_st
-	{
-	unsigned char *packet;
-	unsigned int   packet_length;
-	SSL3_BUFFER    rbuf;
-	SSL3_RECORD    rrec;
-	} DTLS1_RECORD_DATA;
-
-
-/* Timeout multipliers (timeout slice is defined in apps/timeouts.h */
-#define DTLS1_TMO_READ_COUNT                      2
-#define DTLS1_TMO_WRITE_COUNT                     2
-
-#define DTLS1_TMO_ALERT_COUNT                     12
-
-#ifdef  __cplusplus
-}
-#endif
-#endif
-
diff --git a/extra_lib/include/openssl/e_os2.h b/extra_lib/include/openssl/e_os2.h
deleted file mode 100644
index 4c785c6..0000000
--- a/extra_lib/include/openssl/e_os2.h
+++ /dev/null
@@ -1,289 +0,0 @@
-/* e_os2.h */
-/* ====================================================================
- * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. 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.
- *
- * 3. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
- *
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
- *    endorse or promote products derived from this software without
- *    prior written permission. For written permission, please contact
- *    openssl-core at openssl.org.
- *
- * 5. Products derived from this software may not be called "OpenSSL"
- *    nor may "OpenSSL" appear in their names without prior written
- *    permission of the OpenSSL Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- *    acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
- *
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
- * EXPRESSED 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 OpenSSL PROJECT OR
- * ITS 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.
- * ====================================================================
- *
- * This product includes cryptographic software written by Eric Young
- * (eay at cryptsoft.com).  This product includes software written by Tim
- * Hudson (tjh at cryptsoft.com).
- *
- */
-
-#include <openssl/opensslconf.h>
-
-#ifndef HEADER_E_OS2_H
-#define HEADER_E_OS2_H
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-/******************************************************************************
- * Detect operating systems.  This probably needs completing.
- * The result is that at least one OPENSSL_SYS_os macro should be defined.
- * However, if none is defined, Unix is assumed.
- **/
-
-#define OPENSSL_SYS_UNIX
-
-/* ----------------------- Macintosh, before MacOS X ----------------------- */
-#if defined(__MWERKS__) && defined(macintosh) || defined(OPENSSL_SYSNAME_MAC)
-# undef OPENSSL_SYS_UNIX
-# define OPENSSL_SYS_MACINTOSH_CLASSIC
-#endif
-
-/* ----------------------- NetWare ----------------------------------------- */
-#if defined(NETWARE) || defined(OPENSSL_SYSNAME_NETWARE)
-# undef OPENSSL_SYS_UNIX
-# define OPENSSL_SYS_NETWARE
-#endif
-
-/* ---------------------- Microsoft operating systems ---------------------- */
-
-/* Note that MSDOS actually denotes 32-bit environments running on top of
-   MS-DOS, such as DJGPP one. */
-#if defined(OPENSSL_SYSNAME_MSDOS)
-# undef OPENSSL_SYS_UNIX
-# define OPENSSL_SYS_MSDOS
-#endif
-
-/* For 32 bit environment, there seems to be the CygWin environment and then
-   all the others that try to do the same thing Microsoft does... */
-#if defined(OPENSSL_SYSNAME_UWIN)
-# undef OPENSSL_SYS_UNIX
-# define OPENSSL_SYS_WIN32_UWIN
-#else
-# if defined(__CYGWIN32__) || defined(OPENSSL_SYSNAME_CYGWIN32)
-#  undef OPENSSL_SYS_UNIX
-#  define OPENSSL_SYS_WIN32_CYGWIN
-# else
-#  if defined(_WIN32) || defined(OPENSSL_SYSNAME_WIN32)
-#   undef OPENSSL_SYS_UNIX
-#   define OPENSSL_SYS_WIN32
-#  endif
-#  if defined(OPENSSL_SYSNAME_WINNT)
-#   undef OPENSSL_SYS_UNIX
-#   define OPENSSL_SYS_WINNT
-#  endif
-#  if defined(OPENSSL_SYSNAME_WINCE)
-#   undef OPENSSL_SYS_UNIX
-#   define OPENSSL_SYS_WINCE
-#  endif
-# endif
-#endif
-
-/* Anything that tries to look like Microsoft is "Windows" */
-#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WINNT) || defined(OPENSSL_SYS_WINCE)
-# undef OPENSSL_SYS_UNIX
-# define OPENSSL_SYS_WINDOWS
-# ifndef OPENSSL_SYS_MSDOS
-#  define OPENSSL_SYS_MSDOS
-# endif
-#endif
-
-/* DLL settings.  This part is a bit tough, because it's up to the application
-   implementor how he or she will link the application, so it requires some
-   macro to be used. */
-#ifdef OPENSSL_SYS_WINDOWS
-# ifndef OPENSSL_OPT_WINDLL
-#  if defined(_WINDLL) /* This is used when building OpenSSL to indicate that
-                          DLL linkage should be used */
-#   define OPENSSL_OPT_WINDLL
-#  endif
-# endif
-#endif
-
-/* -------------------------------- OpenVMS -------------------------------- */
-#if defined(__VMS) || defined(VMS) || defined(OPENSSL_SYSNAME_VMS)
-# undef OPENSSL_SYS_UNIX
-# define OPENSSL_SYS_VMS
-# if defined(__DECC)
-#  define OPENSSL_SYS_VMS_DECC
-# elif defined(__DECCXX)
-#  define OPENSSL_SYS_VMS_DECC
-#  define OPENSSL_SYS_VMS_DECCXX
-# else
-#  define OPENSSL_SYS_VMS_NODECC
-# endif
-#endif
-
-/* --------------------------------- OS/2 ---------------------------------- */
-#if defined(__EMX__) || defined(__OS2__)
-# undef OPENSSL_SYS_UNIX
-# define OPENSSL_SYS_OS2
-#endif
-
-/* --------------------------------- Unix ---------------------------------- */
-#ifdef OPENSSL_SYS_UNIX
-# if defined(linux) || defined(__linux__) || defined(OPENSSL_SYSNAME_LINUX)
-#  define OPENSSL_SYS_LINUX
-# endif
-# ifdef OPENSSL_SYSNAME_MPE
-#  define OPENSSL_SYS_MPE
-# endif
-# ifdef OPENSSL_SYSNAME_SNI
-#  define OPENSSL_SYS_SNI
-# endif
-# ifdef OPENSSL_SYSNAME_ULTRASPARC
-#  define OPENSSL_SYS_ULTRASPARC
-# endif
-# ifdef OPENSSL_SYSNAME_NEWS4
-#  define OPENSSL_SYS_NEWS4
-# endif
-# ifdef OPENSSL_SYSNAME_MACOSX
-#  define OPENSSL_SYS_MACOSX
-# endif
-# ifdef OPENSSL_SYSNAME_MACOSX_RHAPSODY
-#  define OPENSSL_SYS_MACOSX_RHAPSODY
-#  define OPENSSL_SYS_MACOSX
-# endif
-# ifdef OPENSSL_SYSNAME_SUNOS
-#  define OPENSSL_SYS_SUNOS
-#endif
-# if defined(_CRAY) || defined(OPENSSL_SYSNAME_CRAY)
-#  define OPENSSL_SYS_CRAY
-# endif
-# if defined(_AIX) || defined(OPENSSL_SYSNAME_AIX)
-#  define OPENSSL_SYS_AIX
-# endif
-#endif
-
-/* --------------------------------- VOS ----------------------------------- */
-#ifdef OPENSSL_SYSNAME_VOS
-# define OPENSSL_SYS_VOS
-#endif
-
-/* ------------------------------- VxWorks --------------------------------- */
-#ifdef OPENSSL_SYSNAME_VXWORKS
-# define OPENSSL_SYS_VXWORKS
-#endif
-
-/* --------------------------------- BeOS ---------------------------------- */
-#if defined(__BEOS__)
-# define OPENSSL_SYS_BEOS
-# include <sys/socket.h>
-# if defined(BONE_VERSION)
-#  define OPENSSL_SYS_BEOS_BONE
-# else
-#  define OPENSSL_SYS_BEOS_R5
-# endif
-#endif
-
-/**
- * That's it for OS-specific stuff
- *****************************************************************************/
-
-
-/* Specials for I/O an exit */
-#ifdef OPENSSL_SYS_MSDOS
-# define OPENSSL_UNISTD_IO <io.h>
-# define OPENSSL_DECLARE_EXIT extern void exit(int);
-#else
-# define OPENSSL_UNISTD_IO OPENSSL_UNISTD
-# define OPENSSL_DECLARE_EXIT /* declared in unistd.h */
-#endif
-
-/* Definitions of OPENSSL_GLOBAL and OPENSSL_EXTERN, to define and declare
-   certain global symbols that, with some compilers under VMS, have to be
-   defined and declared explicitely with globaldef and globalref.
-   Definitions of OPENSSL_EXPORT and OPENSSL_IMPORT, to define and declare
-   DLL exports and imports for compilers under Win32.  These are a little
-   more complicated to use.  Basically, for any library that exports some
-   global variables, the following code must be present in the header file
-   that declares them, before OPENSSL_EXTERN is used:
-
-   #ifdef SOME_BUILD_FLAG_MACRO
-   # undef OPENSSL_EXTERN
-   # define OPENSSL_EXTERN OPENSSL_EXPORT
-   #endif
-
-   The default is to have OPENSSL_EXPORT, OPENSSL_IMPORT and OPENSSL_GLOBAL
-   have some generally sensible values, and for OPENSSL_EXTERN to have the
-   value OPENSSL_IMPORT.
-*/
-
-#if defined(OPENSSL_SYS_VMS_NODECC)
-# define OPENSSL_EXPORT globalref
-# define OPENSSL_IMPORT globalref
-# define OPENSSL_GLOBAL globaldef
-#elif defined(OPENSSL_SYS_WINDOWS) && defined(OPENSSL_OPT_WINDLL)
-# define OPENSSL_EXPORT extern __declspec(dllexport)
-# define OPENSSL_IMPORT extern __declspec(dllimport)
-# define OPENSSL_GLOBAL
-#else
-# define OPENSSL_EXPORT extern
-# define OPENSSL_IMPORT extern
-# define OPENSSL_GLOBAL
-#endif
-#define OPENSSL_EXTERN OPENSSL_IMPORT
-
-/* Macros to allow global variables to be reached through function calls when
-   required (if a shared library version requires it, for example.
-   The way it's done allows definitions like this:
-
-	// in foobar.c
-	OPENSSL_IMPLEMENT_GLOBAL(int,foobar,0)
-	// in foobar.h
-	OPENSSL_DECLARE_GLOBAL(int,foobar);
-	#define foobar OPENSSL_GLOBAL_REF(foobar)
-*/
-#ifdef OPENSSL_EXPORT_VAR_AS_FUNCTION
-# define OPENSSL_IMPLEMENT_GLOBAL(type,name,value)			\
-	type *_shadow_##name(void)					\
-	{ static type _hide_##name=value; return &_hide_##name; }
-# define OPENSSL_DECLARE_GLOBAL(type,name) type *_shadow_##name(void)
-# define OPENSSL_GLOBAL_REF(name) (*(_shadow_##name()))
-#else
-# define OPENSSL_IMPLEMENT_GLOBAL(type,name,value) OPENSSL_GLOBAL type _shadow_##name=value;
-# define OPENSSL_DECLARE_GLOBAL(type,name) OPENSSL_EXPORT type _shadow_##name
-# define OPENSSL_GLOBAL_REF(name) _shadow_##name
-#endif
-
-#ifdef  __cplusplus
-}
-#endif
-#endif
diff --git a/extra_lib/include/openssl/ec.h b/extra_lib/include/openssl/ec.h
deleted file mode 100644
index ee70781..0000000
--- a/extra_lib/include/openssl/ec.h
+++ /dev/null
@@ -1,1100 +0,0 @@
-/* crypto/ec/ec.h */
-/*
- * Originally written by Bodo Moeller for the OpenSSL project.
- */
-/**
- * \file crypto/ec/ec.h Include file for the OpenSSL EC functions
- * \author Originally written by Bodo Moeller for the OpenSSL project
- */
-/* ====================================================================
- * Copyright (c) 1998-2005 The OpenSSL Project.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. 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.
- *
- * 3. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
- *
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
- *    endorse or promote products derived from this software without
- *    prior written permission. For written permission, please contact
- *    openssl-core at openssl.org.
- *
- * 5. Products derived from this software may not be called "OpenSSL"
- *    nor may "OpenSSL" appear in their names without prior written
- *    permission of the OpenSSL Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- *    acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
- *
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
- * EXPRESSED 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 OpenSSL PROJECT OR
- * ITS 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.
- * ====================================================================
- *
- * This product includes cryptographic software written by Eric Young
- * (eay at cryptsoft.com).  This product includes software written by Tim
- * Hudson (tjh at cryptsoft.com).
- *
- */
-/* ====================================================================
- * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
- *
- * Portions of the attached software ("Contribution") are developed by 
- * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
- *
- * The Contribution is licensed pursuant to the OpenSSL open source
- * license provided above.
- *
- * The elliptic curve binary polynomial software is originally written by 
- * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
- *
- */
-
-#ifndef HEADER_EC_H
-#define HEADER_EC_H
-
-#include <openssl/opensslconf.h>
-
-#ifdef OPENSSL_NO_EC
-#error EC is disabled.
-#endif
-
-#include <openssl/asn1.h>
-#include <openssl/symhacks.h>
-#ifndef OPENSSL_NO_DEPRECATED
-#include <openssl/bn.h>
-#endif
-
-#ifdef  __cplusplus
-extern "C" {
-#elif defined(__SUNPRO_C)
-# if __SUNPRO_C >= 0x520
-# pragma error_messages (off,E_ARRAY_OF_INCOMPLETE_NONAME,E_ARRAY_OF_INCOMPLETE)
-# endif
-#endif
-
-  
-#ifndef OPENSSL_ECC_MAX_FIELD_BITS
-# define OPENSSL_ECC_MAX_FIELD_BITS 661
-#endif
-
-/** Enum for the point conversion form as defined in X9.62 (ECDSA)
- *  for the encoding of a elliptic curve point (x,y) */
-typedef enum {
-	/** the point is encoded as z||x, where the octet z specifies 
-	 *  which solution of the quadratic equation y is  */
-	POINT_CONVERSION_COMPRESSED = 2,
-	/** the point is encoded as z||x||y, where z is the octet 0x02  */
-	POINT_CONVERSION_UNCOMPRESSED = 4,
-	/** the point is encoded as z||x||y, where the octet z specifies
-         *  which solution of the quadratic equation y is  */
-	POINT_CONVERSION_HYBRID = 6
-} point_conversion_form_t;
-
-
-typedef struct ec_method_st EC_METHOD;
-
-typedef struct ec_group_st
-	/*
-	 EC_METHOD *meth;
-	 -- field definition
-	 -- curve coefficients
-	 -- optional generator with associated information (order, cofactor)
-	 -- optional extra data (precomputed table for fast computation of multiples of generator)
-	 -- ASN1 stuff
-	*/
-	EC_GROUP;
-
-typedef struct ec_point_st EC_POINT;
-
-
-/********************************************************************/
-/*               EC_METHODs for curves over GF(p)                   */       
-/********************************************************************/
-
-/** Returns the basic GFp ec methods which provides the basis for the
- *  optimized methods. 
- *  \return  EC_METHOD object
- */
-const EC_METHOD *EC_GFp_simple_method(void);
-
-/** Returns GFp methods using montgomery multiplication.
- *  \return  EC_METHOD object
- */
-const EC_METHOD *EC_GFp_mont_method(void);
-
-/** Returns GFp methods using optimized methods for NIST recommended curves
- *  \return  EC_METHOD object
- */
-const EC_METHOD *EC_GFp_nist_method(void);
-
-
-/********************************************************************/ 
-/*           EC_METHOD for curves over GF(2^m)                      */
-/********************************************************************/
-
-/** Returns the basic GF2m ec method 
- *  \return  EC_METHOD object
- */
-const EC_METHOD *EC_GF2m_simple_method(void);
-
-
-/********************************************************************/
-/*                   EC_GROUP functions                             */
-/********************************************************************/
-
-/** Creates a new EC_GROUP object
- *  \param   meth  EC_METHOD to use
- *  \return  newly created EC_GROUP object or NULL in case of an error.
- */
-EC_GROUP *EC_GROUP_new(const EC_METHOD *meth);
-
-/** Frees a EC_GROUP object
- *  \param  group  EC_GROUP object to be freed.
- */
-void EC_GROUP_free(EC_GROUP *group);
-
-/** Clears and frees a EC_GROUP object
- *  \param  group  EC_GROUP object to be cleared and freed.
- */
-void EC_GROUP_clear_free(EC_GROUP *group);
-
-/** Copies EC_GROUP objects. Note: both EC_GROUPs must use the same EC_METHOD.
- *  \param  dst  destination EC_GROUP object
- *  \param  src  source EC_GROUP object
- *  \return 1 on success and 0 if an error occurred.
- */
-int EC_GROUP_copy(EC_GROUP *dst, const EC_GROUP *src);
-
-/** Creates a new EC_GROUP object and copies the copies the content
- *  form src to the newly created EC_KEY object
- *  \param  src  source EC_GROUP object
- *  \return newly created EC_GROUP object or NULL in case of an error.
- */
-EC_GROUP *EC_GROUP_dup(const EC_GROUP *src);
-
-/** Returns the EC_METHOD of the EC_GROUP object.
- *  \param  group  EC_GROUP object 
- *  \return EC_METHOD used in this EC_GROUP object.
- */
-const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *group);
-
-/** Returns the field type of the EC_METHOD.
- *  \param  meth  EC_METHOD object
- *  \return NID of the underlying field type OID.
- */
-int EC_METHOD_get_field_type(const EC_METHOD *meth);
-
-/** Sets the generator and it's order/cofactor of a EC_GROUP object.
- *  \param  group      EC_GROUP object 
- *  \param  generator  EC_POINT object with the generator.
- *  \param  order      the order of the group generated by the generator.
- *  \param  cofactor   the index of the sub-group generated by the generator
- *                     in the group of all points on the elliptic curve.
- *  \return 1 on success and 0 if an error occured
- */
-int EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator, const BIGNUM *order, const BIGNUM *cofactor);
-
-/** Returns the generator of a EC_GROUP object.
- *  \param  group  EC_GROUP object
- *  \return the currently used generator (possibly NULL).
- */
-const EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *group);
-
-/** Gets the order of a EC_GROUP
- *  \param  group  EC_GROUP object
- *  \param  order  BIGNUM to which the order is copied
- *  \param  ctx    BN_CTX object (optional)
- *  \return 1 on success and 0 if an error occured
- */
-int EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx);
-
-/** Gets the cofactor of a EC_GROUP
- *  \param  group     EC_GROUP object
- *  \param  cofactor  BIGNUM to which the cofactor is copied
- *  \param  ctx       BN_CTX object (optional)
- *  \return 1 on success and 0 if an error occured
- */
-int EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor, BN_CTX *ctx);
-
-/** Sets the name of a EC_GROUP object
- *  \param  group  EC_GROUP object
- *  \param  nid    NID of the curve name OID
- */
-void EC_GROUP_set_curve_name(EC_GROUP *group, int nid);
-
-/** Returns the curve name of a EC_GROUP object
- *  \param  group  EC_GROUP object
- *  \return NID of the curve name OID or 0 if not set.
- */
-int EC_GROUP_get_curve_name(const EC_GROUP *group);
-
-void EC_GROUP_set_asn1_flag(EC_GROUP *group, int flag);
-int EC_GROUP_get_asn1_flag(const EC_GROUP *group);
-
-void EC_GROUP_set_point_conversion_form(EC_GROUP *, point_conversion_form_t);
-point_conversion_form_t EC_GROUP_get_point_conversion_form(const EC_GROUP *);
-
-unsigned char *EC_GROUP_get0_seed(const EC_GROUP *);
-size_t EC_GROUP_get_seed_len(const EC_GROUP *);
-size_t EC_GROUP_set_seed(EC_GROUP *, const unsigned char *, size_t len);
-
-/** Sets the parameter of a ec over GFp defined by y^2 = x^3 + a*x + b
- *  \param  group  EC_GROUP object
- *  \param  p      BIGNUM with the prime number
- *  \param  a      BIGNUM with parameter a of the equation
- *  \param  b      BIGNUM with parameter b of the equation
- *  \param  ctx    BN_CTX object (optional)
- *  \return 1 on success and 0 if an error occured
- */
-int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
-
-/** Gets the parameter of the ec over GFp defined by y^2 = x^3 + a*x + b
- *  \param  group  EC_GROUP object
- *  \param  p      BIGNUM for the prime number
- *  \param  a      BIGNUM for parameter a of the equation
- *  \param  b      BIGNUM for parameter b of the equation
- *  \param  ctx    BN_CTX object (optional)
- *  \return 1 on success and 0 if an error occured
- */
-int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *ctx);
-
-/** Sets the parameter of a ec over GF2m defined by y^2 + x*y = x^3 + a*x^2 + b
- *  \param  group  EC_GROUP object
- *  \param  p      BIGNUM with the polynomial defining the underlying field
- *  \param  a      BIGNUM with parameter a of the equation
- *  \param  b      BIGNUM with parameter b of the equation
- *  \param  ctx    BN_CTX object (optional)
- *  \return 1 on success and 0 if an error occured
- */
-int EC_GROUP_set_curve_GF2m(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
-
-/** Gets the parameter of the ec over GF2m defined by y^2 + x*y = x^3 + a*x^2 + b
- *  \param  group  EC_GROUP object
- *  \param  p      BIGNUM for the polynomial defining the underlying field
- *  \param  a      BIGNUM for parameter a of the equation
- *  \param  b      BIGNUM for parameter b of the equation
- *  \param  ctx    BN_CTX object (optional)
- *  \return 1 on success and 0 if an error occured
- */
-int EC_GROUP_get_curve_GF2m(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *ctx);
-
-/** Returns the number of bits needed to represent a field element 
- *  \param  group  EC_GROUP object
- *  \return number of bits needed to represent a field element
- */
-int EC_GROUP_get_degree(const EC_GROUP *group);
-
-/** Checks whether the parameter in the EC_GROUP define a valid ec group
- *  \param  group  EC_GROUP object
- *  \param  ctx    BN_CTX object (optional)
- *  \return 1 if group is a valid ec group and 0 otherwise
- */
-int EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx);
-
-/** Checks whether the discriminant of the elliptic curve is zero or not
- *  \param  group  EC_GROUP object
- *  \param  ctx    BN_CTX object (optional)
- *  \return 1 if the discriminant is not zero and 0 otherwise
- */
-int EC_GROUP_check_discriminant(const EC_GROUP *group, BN_CTX *ctx);
-
-/** Compares two EC_GROUP objects
- *  \param  a    first EC_GROUP object
- *  \param  b    second EC_GROUP object
- *  \param  ctx  BN_CTX object (optional)
- *  \return 0 if both groups are equal and 1 otherwise
- */
-int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b, BN_CTX *ctx);
-
-/* EC_GROUP_new_GF*() calls EC_GROUP_new() and EC_GROUP_set_GF*()
- * after choosing an appropriate EC_METHOD */
-
-/** Creates a new EC_GROUP object with the specified parameters defined
- *  over GFp (defined by the equation y^2 = x^3 + a*x + b)
- *  \param  p    BIGNUM with the prime number
- *  \param  a    BIGNUM with the parameter a of the equation
- *  \param  b    BIGNUM with the parameter b of the equation
- *  \param  ctx  BN_CTX object (optional)
- *  \return newly created EC_GROUP object with the specified parameters
- */
-EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
-
-/** Creates a new EC_GROUP object with the specified parameters defined
- *  over GF2m (defined by the equation y^2 + x*y = x^3 + a*x^2 + b)
- *  \param  p    BIGNUM with the polynomial defining the underlying field
- *  \param  a    BIGNUM with the parameter a of the equation
- *  \param  b    BIGNUM with the parameter b of the equation
- *  \param  ctx  BN_CTX object (optional)
- *  \return newly created EC_GROUP object with the specified parameters
- */
-EC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
-
-/** Creates a EC_GROUP object with a curve specified by a NID
- *  \param  nid  NID of the OID of the curve name
- *  \return newly created EC_GROUP object with specified curve or NULL
- *          if an error occurred
- */
-EC_GROUP *EC_GROUP_new_by_curve_name(int nid);
-
-
-/********************************************************************/
-/*               handling of internal curves                        */
-/********************************************************************/
-
-typedef struct { 
-	int nid;
-	const char *comment;
-	} EC_builtin_curve;
-
-/* EC_builtin_curves(EC_builtin_curve *r, size_t size) returns number 
- * of all available curves or zero if a error occurred. 
- * In case r ist not zero nitems EC_builtin_curve structures 
- * are filled with the data of the first nitems internal groups */
-size_t EC_get_builtin_curves(EC_builtin_curve *r, size_t nitems);
-
-
-/********************************************************************/
-/*                    EC_POINT functions                            */
-/********************************************************************/
-
-/** Creates a new EC_POINT object for the specified EC_GROUP
- *  \param  group  EC_GROUP the underlying EC_GROUP object
- *  \return newly created EC_POINT object or NULL if an error occurred
- */
-EC_POINT *EC_POINT_new(const EC_GROUP *group);
-
-/** Frees a EC_POINT object
- *  \param  point  EC_POINT object to be freed
- */
-void EC_POINT_free(EC_POINT *point);
-
-/** Clears and frees a EC_POINT object
- *  \param  point  EC_POINT object to be cleared and freed
- */
-void EC_POINT_clear_free(EC_POINT *point);
-
-/** Copies EC_POINT object
- *  \param  dst  destination EC_POINT object
- *  \param  src  source EC_POINT object
- *  \return 1 on success and 0 if an error occured
- */
-int EC_POINT_copy(EC_POINT *dst, const EC_POINT *src);
-
-/** Creates a new EC_POINT object and copies the content of the supplied
- *  EC_POINT
- *  \param  src    source EC_POINT object
- *  \param  group  underlying the EC_GROUP object
- *  \return newly created EC_POINT object or NULL if an error occurred 
- */
-EC_POINT *EC_POINT_dup(const EC_POINT *src, const EC_GROUP *group);
- 
-/** Returns the EC_METHOD used in EC_POINT object 
- *  \param  point  EC_POINT object
- *  \return the EC_METHOD used
- */
-const EC_METHOD *EC_POINT_method_of(const EC_POINT *point);
-
-/** Sets a point to infinity (neutral element)
- *  \param  group  underlying EC_GROUP object
- *  \param  point  EC_POINT to set to infinity
- *  \return 1 on success and 0 if an error occured
- */
-int EC_POINT_set_to_infinity(const EC_GROUP *group, EC_POINT *point);
-
-/** Sets the jacobian projective coordinates of a EC_POINT over GFp
- *  \param  group  underlying EC_GROUP object
- *  \param  p      EC_POINT object
- *  \param  x      BIGNUM with the x-coordinate
- *  \param  y      BIGNUM with the y-coordinate
- *  \param  z      BIGNUM with the z-coordinate
- *  \param  ctx    BN_CTX object (optional)
- *  \return 1 on success and 0 if an error occured
- */
-int EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group, EC_POINT *p,
-	const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *ctx);
-
-/** Gets the jacobian projective coordinates of a EC_POINT over GFp
- *  \param  group  underlying EC_GROUP object
- *  \param  p      EC_POINT object
- *  \param  x      BIGNUM for the x-coordinate
- *  \param  y      BIGNUM for the y-coordinate
- *  \param  z      BIGNUM for the z-coordinate
- *  \param  ctx    BN_CTX object (optional)
- *  \return 1 on success and 0 if an error occured
- */
-int EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group,
-	const EC_POINT *p, BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *ctx);
-
-/** Sets the affine coordinates of a EC_POINT over GFp
- *  \param  group  underlying EC_GROUP object
- *  \param  p      EC_POINT object
- *  \param  x      BIGNUM with the x-coordinate
- *  \param  y      BIGNUM with the y-coordinate
- *  \param  ctx    BN_CTX object (optional)
- *  \return 1 on success and 0 if an error occured
- */
-int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, EC_POINT *p,
-	const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx);
-
-/** Gets the affine coordinates of a EC_POINT over GFp
- *  \param  group  underlying EC_GROUP object
- *  \param  p      EC_POINT object
- *  \param  x      BIGNUM for the x-coordinate
- *  \param  y      BIGNUM for the y-coordinate
- *  \param  ctx    BN_CTX object (optional)
- *  \return 1 on success and 0 if an error occured
- */
-int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group,
-	const EC_POINT *p, BIGNUM *x, BIGNUM *y, BN_CTX *ctx);
-
-/** Sets the x9.62 compressed coordinates of a EC_POINT over GFp
- *  \param  group  underlying EC_GROUP object
- *  \param  p      EC_POINT object
- *  \param  x      BIGNUM with x-coordinate
- *  \param  y_bit  integer with the y-Bit (either 0 or 1)
- *  \param  ctx    BN_CTX object (optional)
- *  \return 1 on success and 0 if an error occured
- */
-int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group, EC_POINT *p,
-	const BIGNUM *x, int y_bit, BN_CTX *ctx);
-
-/** Sets the affine coordinates of a EC_POINT over GF2m
- *  \param  group  underlying EC_GROUP object
- *  \param  p      EC_POINT object
- *  \param  x      BIGNUM with the x-coordinate
- *  \param  y      BIGNUM with the y-coordinate
- *  \param  ctx    BN_CTX object (optional)
- *  \return 1 on success and 0 if an error occured
- */
-int EC_POINT_set_affine_coordinates_GF2m(const EC_GROUP *group, EC_POINT *p,
-	const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx);
-
-/** Gets the affine coordinates of a EC_POINT over GF2m
- *  \param  group  underlying EC_GROUP object
- *  \param  p      EC_POINT object
- *  \param  x      BIGNUM for the x-coordinate
- *  \param  y      BIGNUM for the y-coordinate
- *  \param  ctx    BN_CTX object (optional)
- *  \return 1 on success and 0 if an error occured
- */
-int EC_POINT_get_affine_coordinates_GF2m(const EC_GROUP *group,
-	const EC_POINT *p, BIGNUM *x, BIGNUM *y, BN_CTX *ctx);
-
-/** Sets the x9.62 compressed coordinates of a EC_POINT over GF2m
- *  \param  group  underlying EC_GROUP object
- *  \param  p      EC_POINT object
- *  \param  x      BIGNUM with x-coordinate
- *  \param  y_bit  integer with the y-Bit (either 0 or 1)
- *  \param  ctx    BN_CTX object (optional)
- *  \return 1 on success and 0 if an error occured
- */
-int EC_POINT_set_compressed_coordinates_GF2m(const EC_GROUP *group, EC_POINT *p,
-	const BIGNUM *x, int y_bit, BN_CTX *ctx);
-
-/** Encodes a EC_POINT object to a octet string
- *  \param  group  underlying EC_GROUP object
- *  \param  p      EC_POINT object
- *  \param  form   point conversion form
- *  \param  buf    memory buffer for the result. If NULL the function returns
- *                 required buffer size.
- *  \param  len    length of the memory buffer
- *  \param  ctx    BN_CTX object (optional)
- *  \return the length of the encoded octet string or 0 if an error occurred
- */
-size_t EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *p,
-	point_conversion_form_t form,
-        unsigned char *buf, size_t len, BN_CTX *ctx);
-
-/** Decodes a EC_POINT from a octet string
- *  \param  group  underlying EC_GROUP object
- *  \param  p      EC_POINT object
- *  \param  buf    memory buffer with the encoded ec point
- *  \param  len    length of the encoded ec point
- *  \param  ctx    BN_CTX object (optional)
- *  \return 1 on success and 0 if an error occured
- */
-int EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *p,
-        const unsigned char *buf, size_t len, BN_CTX *ctx);
-
-/* other interfaces to point2oct/oct2point: */
-BIGNUM *EC_POINT_point2bn(const EC_GROUP *, const EC_POINT *,
-	point_conversion_form_t form, BIGNUM *, BN_CTX *);
-EC_POINT *EC_POINT_bn2point(const EC_GROUP *, const BIGNUM *,
-	EC_POINT *, BN_CTX *);
-char *EC_POINT_point2hex(const EC_GROUP *, const EC_POINT *,
-	point_conversion_form_t form, BN_CTX *);
-EC_POINT *EC_POINT_hex2point(const EC_GROUP *, const char *,
-	EC_POINT *, BN_CTX *);
-
-
-/********************************************************************/
-/*         functions for doing EC_POINT arithmetic                  */
-/********************************************************************/
-
-/** Computes the sum of two EC_POINT 
- *  \param  group  underlying EC_GROUP object
- *  \param  r      EC_POINT object for the result (r = a + b)
- *  \param  a      EC_POINT object with the first summand
- *  \param  b      EC_POINT object with the second summand
- *  \param  ctx    BN_CTX object (optional)
- *  \return 1 on success and 0 if an error occured
- */
-int EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, const EC_POINT *b, BN_CTX *ctx);
-
-/** Computes the double of a EC_POINT
- *  \param  group  underlying EC_GROUP object
- *  \param  r      EC_POINT object for the result (r = 2 * a)
- *  \param  a      EC_POINT object 
- *  \param  ctx    BN_CTX object (optional)
- *  \return 1 on success and 0 if an error occured
- */
-int EC_POINT_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, BN_CTX *ctx);
-
-/** Computes the inverse of a EC_POINT
- *  \param  group  underlying EC_GROUP object
- *  \param  a      EC_POINT object to be inverted (it's used for the result as well)
- *  \param  ctx    BN_CTX object (optional)
- *  \return 1 on success and 0 if an error occured
- */
-int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx);
-
-/** Checks whether the point is the neutral element of the group
- *  \param  group  the underlying EC_GROUP object
- *  \param  p      EC_POINT object
- *  \return 1 if the point is the neutral element and 0 otherwise
- */
-int EC_POINT_is_at_infinity(const EC_GROUP *group, const EC_POINT *p);
-
-/** Checks whether the point is on the curve 
- *  \param  group  underlying EC_GROUP object
- *  \param  point  EC_POINT object to check
- *  \param  ctx    BN_CTX object (optional)
- *  \return 1 if point if on the curve and 0 otherwise
- */
-int EC_POINT_is_on_curve(const EC_GROUP *group, const EC_POINT *point, BN_CTX *ctx);
-
-/** Compares two EC_POINTs 
- *  \param  group  underlying EC_GROUP object
- *  \param  a      first EC_POINT object
- *  \param  b      second EC_POINT object
- *  \param  ctx    BN_CTX object (optional)
- *  \return 0 if both points are equal and a value != 0 otherwise
- */
-int EC_POINT_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b, BN_CTX *ctx);
-
-int EC_POINT_make_affine(const EC_GROUP *, EC_POINT *, BN_CTX *);
-int EC_POINTs_make_affine(const EC_GROUP *, size_t num, EC_POINT *[], BN_CTX *);
-
-/** Computes r = generator * n sum_{i=0}^num p[i] * m[i]
- *  \param  group  underlying EC_GROUP object
- *  \param  r      EC_POINT object for the result
- *  \param  n      BIGNUM with the multiplier for the group generator (optional)
- *  \param  num    number futher summands
- *  \param  p      array of size num of EC_POINT objects
- *  \param  m      array of size num of BIGNUM objects
- *  \param  ctx    BN_CTX object (optional)
- *  \return 1 on success and 0 if an error occured
- */
-int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n, size_t num, const EC_POINT *p[], const BIGNUM *m[], BN_CTX *ctx);
-
-/** Computes r = generator * n + q * m
- *  \param  group  underlying EC_GROUP object
- *  \param  r      EC_POINT object for the result
- *  \param  n      BIGNUM with the multiplier for the group generator (optional)
- *  \param  q      EC_POINT object with the first factor of the second summand
- *  \param  m      BIGNUM with the second factor of the second summand
- *  \param  ctx    BN_CTX object (optional)
- *  \return 1 on success and 0 if an error occured
- */
-int EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n, const EC_POINT *q, const BIGNUM *m, BN_CTX *ctx);
-
-/** Stores multiples of generator for faster point multiplication
- *  \param  group  EC_GROUP object
- *  \param  ctx    BN_CTX object (optional)
- *  \return 1 on success and 0 if an error occured
- */
-int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx);
-
-/** Reports whether a precomputation has been done
- *  \param  group  EC_GROUP object
- *  \return 1 if a pre-computation has been done and 0 otherwise
- */
-int EC_GROUP_have_precompute_mult(const EC_GROUP *group);
-
-
-/********************************************************************/
-/*                       ASN1 stuff                                 */
-/********************************************************************/
-
-/* EC_GROUP_get_basis_type() returns the NID of the basis type
- * used to represent the field elements */
-int EC_GROUP_get_basis_type(const EC_GROUP *);
-int EC_GROUP_get_trinomial_basis(const EC_GROUP *, unsigned int *k);
-int EC_GROUP_get_pentanomial_basis(const EC_GROUP *, unsigned int *k1, 
-	unsigned int *k2, unsigned int *k3);
-
-#define OPENSSL_EC_NAMED_CURVE	0x001
-
-typedef struct ecpk_parameters_st ECPKPARAMETERS;
-
-EC_GROUP *d2i_ECPKParameters(EC_GROUP **, const unsigned char **in, long len);
-int i2d_ECPKParameters(const EC_GROUP *, unsigned char **out);
-
-#define d2i_ECPKParameters_bio(bp,x) ASN1_d2i_bio_of(EC_GROUP,NULL,d2i_ECPKParameters,bp,x)
-#define i2d_ECPKParameters_bio(bp,x) ASN1_i2d_bio_of_const(EC_GROUP,i2d_ECPKParameters,bp,x)
-#define d2i_ECPKParameters_fp(fp,x) (EC_GROUP *)ASN1_d2i_fp(NULL, \
-                (char *(*)())d2i_ECPKParameters,(fp),(unsigned char **)(x))
-#define i2d_ECPKParameters_fp(fp,x) ASN1_i2d_fp(i2d_ECPKParameters,(fp), \
-		(unsigned char *)(x))
-
-#ifndef OPENSSL_NO_BIO
-int     ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off);
-#endif
-#ifndef OPENSSL_NO_FP_API
-int     ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off);
-#endif
-
-
-/********************************************************************/
-/*                      EC_KEY functions                            */
-/********************************************************************/
-
-typedef struct ec_key_st EC_KEY;
-
-/* some values for the encoding_flag */
-#define EC_PKEY_NO_PARAMETERS	0x001
-#define EC_PKEY_NO_PUBKEY	0x002
-
-/** Creates a new EC_KEY object.
- *  \return EC_KEY object or NULL if an error occurred.
- */
-EC_KEY *EC_KEY_new(void);
-
-/** Creates a new EC_KEY object using a named curve as underlying
- *  EC_GROUP object.
- *  \param  nid  NID of the named curve.
- *  \return EC_KEY object or NULL if an error occurred. 
- */
-EC_KEY *EC_KEY_new_by_curve_name(int nid);
-
-/** Frees a EC_KEY object.
- *  \param  key  EC_KEY object to be freed.
- */
-void EC_KEY_free(EC_KEY *key);
-
-/** Copies a EC_KEY object.
- *  \param  dst  destination EC_KEY object
- *  \param  src  src EC_KEY object
- *  \return dst or NULL if an error occurred.
- */
-EC_KEY *EC_KEY_copy(EC_KEY *dst, const EC_KEY *src);
-
-/** Creates a new EC_KEY object and copies the content from src to it.
- *  \param  src  the source EC_KEY object
- *  \return newly created EC_KEY object or NULL if an error occurred.
- */
-EC_KEY *EC_KEY_dup(const EC_KEY *src);
-
-/** Increases the internal reference count of a EC_KEY object.
- *  \param  key  EC_KEY object
- *  \return 1 on success and 0 if an error occurred.
- */
-int EC_KEY_up_ref(EC_KEY *key);
-
-/** Returns the EC_GROUP object of a EC_KEY object
- *  \param  key  EC_KEY object
- *  \return the EC_GROUP object (possibly NULL).
- */
-const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key);
-
-/** Sets the EC_GROUP of a EC_KEY object.
- *  \param  key    EC_KEY object
- *  \param  group  EC_GROUP to use in the EC_KEY object (note: the EC_KEY
- *                 object will use an own copy of the EC_GROUP).
- *  \return 1 on success and 0 if an error occurred.
- */
-int EC_KEY_set_group(EC_KEY *key, const EC_GROUP *group);
-
-/** Returns the private key of a EC_KEY object.
- *  \param  key  EC_KEY object
- *  \return a BIGNUM with the private key (possibly NULL).
- */
-const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key);
-
-/** Sets the private key of a EC_KEY object.
- *  \param  key  EC_KEY object
- *  \param  prv  BIGNUM with the private key (note: the EC_KEY object
- *               will use an own copy of the BIGNUM).
- *  \return 1 on success and 0 if an error occurred.
- */
-int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *prv);
-
-/** Returns the public key of a EC_KEY object.
- *  \param  key  the EC_KEY object
- *  \return a EC_POINT object with the public key (possibly NULL)
- */
-const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *key);
-
-/** Sets the public key of a EC_KEY object.
- *  \param  key  EC_KEY object
- *  \param  pub  EC_POINT object with the public key (note: the EC_KEY object
- *               will use an own copy of the EC_POINT object).
- *  \return 1 on success and 0 if an error occurred.
- */
-int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub);
-
-unsigned EC_KEY_get_enc_flags(const EC_KEY *key);
-void EC_KEY_set_enc_flags(EC_KEY *, unsigned int);
-point_conversion_form_t EC_KEY_get_conv_form(const EC_KEY *);
-void EC_KEY_set_conv_form(EC_KEY *, point_conversion_form_t);
-/* functions to set/get method specific data  */
-void *EC_KEY_get_key_method_data(EC_KEY *, 
-	void *(*dup_func)(void *), void (*free_func)(void *), void (*clear_free_func)(void *));
-void EC_KEY_insert_key_method_data(EC_KEY *, void *data,
-	void *(*dup_func)(void *), void (*free_func)(void *), void (*clear_free_func)(void *));
-/* wrapper functions for the underlying EC_GROUP object */
-void EC_KEY_set_asn1_flag(EC_KEY *, int);
-
-/** Creates a table of pre-computed multiples of the generator to 
- *  accelerate further EC_KEY operations.
- *  \param  key  EC_KEY object
- *  \param  ctx  BN_CTX object (optional)
- *  \return 1 on success and 0 if an error occurred.
- */
-int EC_KEY_precompute_mult(EC_KEY *key, BN_CTX *ctx);
-
-/** Creates a new ec private (and optional a new public) key.
- *  \param  key  EC_KEY object
- *  \return 1 on success and 0 if an error occurred.
- */
-int EC_KEY_generate_key(EC_KEY *key);
-
-/** Verifies that a private and/or public key is valid.
- *  \param  key  the EC_KEY object
- *  \return 1 on success and 0 otherwise.
- */
-int EC_KEY_check_key(const EC_KEY *key);
-
-
-/********************************************************************/
-/*        de- and encoding functions for SEC1 ECPrivateKey          */
-/********************************************************************/
-
-/** Decodes a private key from a memory buffer.
- *  \param  key  a pointer to a EC_KEY object which should be used (or NULL)
- *  \param  in   pointer to memory with the DER encoded private key
- *  \param  len  length of the DER encoded private key
- *  \return the decoded private key or NULL if an error occurred.
- */
-EC_KEY *d2i_ECPrivateKey(EC_KEY **key, const unsigned char **in, long len);
-
-/** Encodes a private key object and stores the result in a buffer.
- *  \param  key  the EC_KEY object to encode
- *  \param  out  the buffer for the result (if NULL the function returns number
- *               of bytes needed).
- *  \return 1 on success and 0 if an error occurred.
- */
-int i2d_ECPrivateKey(EC_KEY *key, unsigned char **out);
-
-
-/********************************************************************/
-/*        de- and encoding functions for EC parameters              */
-/********************************************************************/
-
-/** Decodes ec parameter from a memory buffer.
- *  \param  key  a pointer to a EC_KEY object which should be used (or NULL)
- *  \param  in   pointer to memory with the DER encoded ec parameters
- *  \param  len  length of the DER encoded ec parameters
- *  \return a EC_KEY object with the decoded parameters or NULL if an error
- *          occurred.
- */
-EC_KEY *d2i_ECParameters(EC_KEY **key, const unsigned char **in, long len);
-
-/** Encodes ec parameter and stores the result in a buffer.
- *  \param  key  the EC_KEY object with ec paramters to encode
- *  \param  out  the buffer for the result (if NULL the function returns number
- *               of bytes needed).
- *  \return 1 on success and 0 if an error occurred.
- */
-int i2d_ECParameters(EC_KEY *key, unsigned char **out);
-
-
-/********************************************************************/
-/*         de- and encoding functions for EC public key             */
-/*         (octet string, not DER -- hence 'o2i' and 'i2o')         */
-/********************************************************************/
-
-/** Decodes a ec public key from a octet string.
- *  \param  key  a pointer to a EC_KEY object which should be used
- *  \param  in   memory buffer with the encoded public key
- *  \param  len  length of the encoded public key
- *  \return EC_KEY object with decoded public key or NULL if an error
- *          occurred.
- */
-EC_KEY *o2i_ECPublicKey(EC_KEY **key, const unsigned char **in, long len);
-
-/** Encodes a ec public key in an octet string.
- *  \param  key  the EC_KEY object with the public key
- *  \param  out  the buffer for the result (if NULL the function returns number
- *               of bytes needed).
- *  \return 1 on success and 0 if an error occurred
- */
-int i2o_ECPublicKey(EC_KEY *key, unsigned char **out);
-
-#ifndef OPENSSL_NO_BIO
-/** Prints out the ec parameters on human readable form.
- *  \param  bp   BIO object to which the information is printed
- *  \param  key  EC_KEY object
- *  \return 1 on success and 0 if an error occurred
- */
-int	ECParameters_print(BIO *bp, const EC_KEY *key);
-
-/** Prints out the contents of a EC_KEY object
- *  \param  bp   BIO object to which the information is printed
- *  \param  key  EC_KEY object
- *  \param  off  line offset 
- *  \return 1 on success and 0 if an error occurred
- */
-int	EC_KEY_print(BIO *bp, const EC_KEY *key, int off);
-
-#endif
-#ifndef OPENSSL_NO_FP_API
-/** Prints out the ec parameters on human readable form.
- *  \param  fp   file descriptor to which the information is printed
- *  \param  key  EC_KEY object
- *  \return 1 on success and 0 if an error occurred
- */
-int	ECParameters_print_fp(FILE *fp, const EC_KEY *key);
-
-/** Prints out the contents of a EC_KEY object
- *  \param  fp   file descriptor to which the information is printed
- *  \param  key  EC_KEY object
- *  \param  off  line offset 
- *  \return 1 on success and 0 if an error occurred
- */
-int	EC_KEY_print_fp(FILE *fp, const EC_KEY *key, int off);
-
-#endif
-
-#define ECParameters_dup(x) ASN1_dup_of(EC_KEY,i2d_ECParameters,d2i_ECParameters,x)
-
-#ifndef __cplusplus
-#if defined(__SUNPRO_C)
-#  if __SUNPRO_C >= 0x520
-# pragma error_messages (default,E_ARRAY_OF_INCOMPLETE_NONAME,E_ARRAY_OF_INCOMPLETE)
-#  endif
-# endif
-#endif
-
-#define EVP_PKEY_CTX_set_ec_paramgen_curve_nid(ctx, nid) \
-	EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, EVP_PKEY_OP_PARAMGEN, \
-				EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID, nid, NULL)
-
-
-#define EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID		(EVP_PKEY_ALG_CTRL + 1)
-
-/* BEGIN ERROR CODES */
-/* The following lines are auto generated by the script mkerr.pl. Any changes
- * made after this point may be overwritten when the script is next run.
- */
-void ERR_load_EC_strings(void);
-
-/* Error codes for the EC functions. */
-
-/* Function codes. */
-#define EC_F_COMPUTE_WNAF				 143
-#define EC_F_D2I_ECPARAMETERS				 144
-#define EC_F_D2I_ECPKPARAMETERS				 145
-#define EC_F_D2I_ECPRIVATEKEY				 146
-#define EC_F_DO_EC_KEY_PRINT				 221
-#define EC_F_ECKEY_PARAM2TYPE				 223
-#define EC_F_ECKEY_PARAM_DECODE				 212
-#define EC_F_ECKEY_PRIV_DECODE				 213
-#define EC_F_ECKEY_PRIV_ENCODE				 214
-#define EC_F_ECKEY_PUB_DECODE				 215
-#define EC_F_ECKEY_PUB_ENCODE				 216
-#define EC_F_ECKEY_TYPE2PARAM				 220
-#define EC_F_ECPARAMETERS_PRINT				 147
-#define EC_F_ECPARAMETERS_PRINT_FP			 148
-#define EC_F_ECPKPARAMETERS_PRINT			 149
-#define EC_F_ECPKPARAMETERS_PRINT_FP			 150
-#define EC_F_ECP_NIST_MOD_192				 203
-#define EC_F_ECP_NIST_MOD_224				 204
-#define EC_F_ECP_NIST_MOD_256				 205
-#define EC_F_ECP_NIST_MOD_521				 206
-#define EC_F_EC_ASN1_GROUP2CURVE			 153
-#define EC_F_EC_ASN1_GROUP2FIELDID			 154
-#define EC_F_EC_ASN1_GROUP2PARAMETERS			 155
-#define EC_F_EC_ASN1_GROUP2PKPARAMETERS			 156
-#define EC_F_EC_ASN1_PARAMETERS2GROUP			 157
-#define EC_F_EC_ASN1_PKPARAMETERS2GROUP			 158
-#define EC_F_EC_EX_DATA_SET_DATA			 211
-#define EC_F_EC_GF2M_MONTGOMERY_POINT_MULTIPLY		 208
-#define EC_F_EC_GF2M_SIMPLE_GROUP_CHECK_DISCRIMINANT	 159
-#define EC_F_EC_GF2M_SIMPLE_GROUP_SET_CURVE		 195
-#define EC_F_EC_GF2M_SIMPLE_OCT2POINT			 160
-#define EC_F_EC_GF2M_SIMPLE_POINT2OCT			 161
-#define EC_F_EC_GF2M_SIMPLE_POINT_GET_AFFINE_COORDINATES 162
-#define EC_F_EC_GF2M_SIMPLE_POINT_SET_AFFINE_COORDINATES 163
-#define EC_F_EC_GF2M_SIMPLE_SET_COMPRESSED_COORDINATES	 164
-#define EC_F_EC_GFP_MONT_FIELD_DECODE			 133
-#define EC_F_EC_GFP_MONT_FIELD_ENCODE			 134
-#define EC_F_EC_GFP_MONT_FIELD_MUL			 131
-#define EC_F_EC_GFP_MONT_FIELD_SET_TO_ONE		 209
-#define EC_F_EC_GFP_MONT_FIELD_SQR			 132
-#define EC_F_EC_GFP_MONT_GROUP_SET_CURVE		 189
-#define EC_F_EC_GFP_MONT_GROUP_SET_CURVE_GFP		 135
-#define EC_F_EC_GFP_NIST_FIELD_MUL			 200
-#define EC_F_EC_GFP_NIST_FIELD_SQR			 201
-#define EC_F_EC_GFP_NIST_GROUP_SET_CURVE		 202
-#define EC_F_EC_GFP_SIMPLE_GROUP_CHECK_DISCRIMINANT	 165
-#define EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE		 166
-#define EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE_GFP		 100
-#define EC_F_EC_GFP_SIMPLE_GROUP_SET_GENERATOR		 101
-#define EC_F_EC_GFP_SIMPLE_MAKE_AFFINE			 102
-#define EC_F_EC_GFP_SIMPLE_OCT2POINT			 103
-#define EC_F_EC_GFP_SIMPLE_POINT2OCT			 104
-#define EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE		 137
-#define EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES	 167
-#define EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES_GFP 105
-#define EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES	 168
-#define EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES_GFP 128
-#define EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES	 169
-#define EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES_GFP 129
-#define EC_F_EC_GROUP_CHECK				 170
-#define EC_F_EC_GROUP_CHECK_DISCRIMINANT		 171
-#define EC_F_EC_GROUP_COPY				 106
-#define EC_F_EC_GROUP_GET0_GENERATOR			 139
-#define EC_F_EC_GROUP_GET_COFACTOR			 140
-#define EC_F_EC_GROUP_GET_CURVE_GF2M			 172
-#define EC_F_EC_GROUP_GET_CURVE_GFP			 130
-#define EC_F_EC_GROUP_GET_DEGREE			 173
-#define EC_F_EC_GROUP_GET_ORDER				 141
-#define EC_F_EC_GROUP_GET_PENTANOMIAL_BASIS		 193
-#define EC_F_EC_GROUP_GET_TRINOMIAL_BASIS		 194
-#define EC_F_EC_GROUP_NEW				 108
-#define EC_F_EC_GROUP_NEW_BY_CURVE_NAME			 174
-#define EC_F_EC_GROUP_NEW_FROM_DATA			 175
-#define EC_F_EC_GROUP_PRECOMPUTE_MULT			 142
-#define EC_F_EC_GROUP_SET_CURVE_GF2M			 176
-#define EC_F_EC_GROUP_SET_CURVE_GFP			 109
-#define EC_F_EC_GROUP_SET_EXTRA_DATA			 110
-#define EC_F_EC_GROUP_SET_GENERATOR			 111
-#define EC_F_EC_KEY_CHECK_KEY				 177
-#define EC_F_EC_KEY_COPY				 178
-#define EC_F_EC_KEY_GENERATE_KEY			 179
-#define EC_F_EC_KEY_NEW					 182
-#define EC_F_EC_KEY_PRINT				 180
-#define EC_F_EC_KEY_PRINT_FP				 181
-#define EC_F_EC_POINTS_MAKE_AFFINE			 136
-#define EC_F_EC_POINT_ADD				 112
-#define EC_F_EC_POINT_CMP				 113
-#define EC_F_EC_POINT_COPY				 114
-#define EC_F_EC_POINT_DBL				 115
-#define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GF2M	 183
-#define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GFP	 116
-#define EC_F_EC_POINT_GET_JPROJECTIVE_COORDINATES_GFP	 117
-#define EC_F_EC_POINT_INVERT				 210
-#define EC_F_EC_POINT_IS_AT_INFINITY			 118
-#define EC_F_EC_POINT_IS_ON_CURVE			 119
-#define EC_F_EC_POINT_MAKE_AFFINE			 120
-#define EC_F_EC_POINT_MUL				 184
-#define EC_F_EC_POINT_NEW				 121
-#define EC_F_EC_POINT_OCT2POINT				 122
-#define EC_F_EC_POINT_POINT2OCT				 123
-#define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M	 185
-#define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GFP	 124
-#define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GF2M	 186
-#define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GFP	 125
-#define EC_F_EC_POINT_SET_JPROJECTIVE_COORDINATES_GFP	 126
-#define EC_F_EC_POINT_SET_TO_INFINITY			 127
-#define EC_F_EC_PRE_COMP_DUP				 207
-#define EC_F_EC_PRE_COMP_NEW				 196
-#define EC_F_EC_WNAF_MUL				 187
-#define EC_F_EC_WNAF_PRECOMPUTE_MULT			 188
-#define EC_F_I2D_ECPARAMETERS				 190
-#define EC_F_I2D_ECPKPARAMETERS				 191
-#define EC_F_I2D_ECPRIVATEKEY				 192
-#define EC_F_I2O_ECPUBLICKEY				 151
-#define EC_F_O2I_ECPUBLICKEY				 152
-#define EC_F_OLD_EC_PRIV_DECODE				 222
-#define EC_F_PKEY_EC_CTRL				 197
-#define EC_F_PKEY_EC_CTRL_STR				 198
-#define EC_F_PKEY_EC_DERIVE				 217
-#define EC_F_PKEY_EC_KEYGEN				 199
-#define EC_F_PKEY_EC_PARAMGEN				 219
-#define EC_F_PKEY_EC_SIGN				 218
-
-/* Reason codes. */
-#define EC_R_ASN1_ERROR					 115
-#define EC_R_ASN1_UNKNOWN_FIELD				 116
-#define EC_R_BUFFER_TOO_SMALL				 100
-#define EC_R_D2I_ECPKPARAMETERS_FAILURE			 117
-#define EC_R_DECODE_ERROR				 142
-#define EC_R_DISCRIMINANT_IS_ZERO			 118
-#define EC_R_EC_GROUP_NEW_BY_NAME_FAILURE		 119
-#define EC_R_FIELD_TOO_LARGE				 143
-#define EC_R_GROUP2PKPARAMETERS_FAILURE			 120
-#define EC_R_I2D_ECPKPARAMETERS_FAILURE			 121
-#define EC_R_INCOMPATIBLE_OBJECTS			 101
-#define EC_R_INVALID_ARGUMENT				 112
-#define EC_R_INVALID_COMPRESSED_POINT			 110
-#define EC_R_INVALID_COMPRESSION_BIT			 109
-#define EC_R_INVALID_CURVE				 141
-#define EC_R_INVALID_DIGEST_TYPE			 138
-#define EC_R_INVALID_ENCODING				 102
-#define EC_R_INVALID_FIELD				 103
-#define EC_R_INVALID_FORM				 104
-#define EC_R_INVALID_GROUP_ORDER			 122
-#define EC_R_INVALID_PENTANOMIAL_BASIS			 132
-#define EC_R_INVALID_PRIVATE_KEY			 123
-#define EC_R_INVALID_TRINOMIAL_BASIS			 137
-#define EC_R_KEYS_NOT_SET				 140
-#define EC_R_MISSING_PARAMETERS				 124
-#define EC_R_MISSING_PRIVATE_KEY			 125
-#define EC_R_NOT_A_NIST_PRIME				 135
-#define EC_R_NOT_A_SUPPORTED_NIST_PRIME			 136
-#define EC_R_NOT_IMPLEMENTED				 126
-#define EC_R_NOT_INITIALIZED				 111
-#define EC_R_NO_FIELD_MOD				 133
-#define EC_R_NO_PARAMETERS_SET				 139
-#define EC_R_PASSED_NULL_PARAMETER			 134
-#define EC_R_PKPARAMETERS2GROUP_FAILURE			 127
-#define EC_R_POINT_AT_INFINITY				 106
-#define EC_R_POINT_IS_NOT_ON_CURVE			 107
-#define EC_R_SLOT_FULL					 108
-#define EC_R_UNDEFINED_GENERATOR			 113
-#define EC_R_UNDEFINED_ORDER				 128
-#define EC_R_UNKNOWN_GROUP				 129
-#define EC_R_UNKNOWN_ORDER				 114
-#define EC_R_UNSUPPORTED_FIELD				 131
-#define EC_R_WRONG_ORDER				 130
-
-#ifdef  __cplusplus
-}
-#endif
-#endif
diff --git a/extra_lib/include/openssl/ecdh.h b/extra_lib/include/openssl/ecdh.h
deleted file mode 100644
index b4b58ee..0000000
--- a/extra_lib/include/openssl/ecdh.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/* crypto/ecdh/ecdh.h */
-/* ====================================================================
- * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
- *
- * The Elliptic Curve Public-Key Crypto Library (ECC Code) included
- * herein is developed by SUN MICROSYSTEMS, INC., and is contributed
- * to the OpenSSL project.
- *
- * The ECC Code is licensed pursuant to the OpenSSL open source
- * license provided below.
- *
- * The ECDH software is originally written by Douglas Stebila of
- * Sun Microsystems Laboratories.
- *
- */
-/* ====================================================================
- * Copyright (c) 2000-2002 The OpenSSL Project.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. 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.
- *
- * 3. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
- *
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
- *    endorse or promote products derived from this software without
- *    prior written permission. For written permission, please contact
- *    licensing at OpenSSL.org.
- *
- * 5. Products derived from this software may not be called "OpenSSL"
- *    nor may "OpenSSL" appear in their names without prior written
- *    permission of the OpenSSL Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- *    acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
- *
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
- * EXPRESSED 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 OpenSSL PROJECT OR
- * ITS 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.
- * ====================================================================
- *
- * This product includes cryptographic software written by Eric Young
- * (eay at cryptsoft.com).  This product includes software written by Tim
- * Hudson (tjh at cryptsoft.com).
- *
- */
-#ifndef HEADER_ECDH_H
-#define HEADER_ECDH_H
-
-#include <openssl/opensslconf.h>
-
-#ifdef OPENSSL_NO_ECDH
-#error ECDH is disabled.
-#endif
-
-#include <openssl/ec.h>
-#include <openssl/ossl_typ.h>
-#ifndef OPENSSL_NO_DEPRECATED
-#include <openssl/bn.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-const ECDH_METHOD *ECDH_OpenSSL(void);
-
-void	  ECDH_set_default_method(const ECDH_METHOD *);
-const ECDH_METHOD *ECDH_get_default_method(void);
-int 	  ECDH_set_method(EC_KEY *, const ECDH_METHOD *);
-
-int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, EC_KEY *ecdh,
-                     void *(*KDF)(const void *in, size_t inlen, void *out, size_t *outlen));
-
-int 	  ECDH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new 
-		*new_func, CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
-int 	  ECDH_set_ex_data(EC_KEY *d, int idx, void *arg);
-void 	  *ECDH_get_ex_data(EC_KEY *d, int idx);
-
-
-/* BEGIN ERROR CODES */
-/* The following lines are auto generated by the script mkerr.pl. Any changes
- * made after this point may be overwritten when the script is next run.
- */
-void ERR_load_ECDH_strings(void);
-
-/* Error codes for the ECDH functions. */
-
-/* Function codes. */
-#define ECDH_F_ECDH_COMPUTE_KEY				 100
-#define ECDH_F_ECDH_DATA_NEW_METHOD			 101
-
-/* Reason codes. */
-#define ECDH_R_KDF_FAILED				 102
-#define ECDH_R_NO_PRIVATE_VALUE				 100
-#define ECDH_R_POINT_ARITHMETIC_FAILURE			 101
-
-#ifdef  __cplusplus
-}
-#endif
-#endif
diff --git a/extra_lib/include/openssl/ecdsa.h b/extra_lib/include/openssl/ecdsa.h
deleted file mode 100644
index e61c539..0000000
--- a/extra_lib/include/openssl/ecdsa.h
+++ /dev/null
@@ -1,258 +0,0 @@
-/* crypto/ecdsa/ecdsa.h */
-/**
- * \file   crypto/ecdsa/ecdsa.h Include file for the OpenSSL ECDSA functions
- * \author Written by Nils Larsch for the OpenSSL project
- */
-/* ====================================================================
- * Copyright (c) 2000-2005 The OpenSSL Project.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. 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.
- *
- * 3. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
- *
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
- *    endorse or promote products derived from this software without
- *    prior written permission. For written permission, please contact
- *    licensing at OpenSSL.org.
- *
- * 5. Products derived from this software may not be called "OpenSSL"
- *    nor may "OpenSSL" appear in their names without prior written
- *    permission of the OpenSSL Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- *    acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
- *
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
- * EXPRESSED 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 OpenSSL PROJECT OR
- * ITS 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.
- * ====================================================================
- *
- * This product includes cryptographic software written by Eric Young
- * (eay at cryptsoft.com).  This product includes software written by Tim
- * Hudson (tjh at cryptsoft.com).
- *
- */
-#ifndef HEADER_ECDSA_H
-#define HEADER_ECDSA_H
-
-#include <openssl/opensslconf.h>
-
-#ifdef OPENSSL_NO_ECDSA
-#error ECDSA is disabled.
-#endif
-
-#include <openssl/ec.h>
-#include <openssl/ossl_typ.h>
-#ifndef OPENSSL_NO_DEPRECATED
-#include <openssl/bn.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct ECDSA_SIG_st
-	{
-	BIGNUM *r;
-	BIGNUM *s;
-	} ECDSA_SIG;
-
-/** Allocates and initialize a ECDSA_SIG structure
- *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
- */
-ECDSA_SIG *ECDSA_SIG_new(void);
-
-/** frees a ECDSA_SIG structure
- *  \param  sig  pointer to the ECDSA_SIG structure
- */
-void	  ECDSA_SIG_free(ECDSA_SIG *sig);
-
-/** DER encode content of ECDSA_SIG object (note: this function modifies *pp
- *  (*pp += length of the DER encoded signature)).
- *  \param  sig  pointer to the ECDSA_SIG object
- *  \param  pp   pointer to a unsigned char pointer for the output or NULL
- *  \return the length of the DER encoded ECDSA_SIG object or 0 
- */
-int	  i2d_ECDSA_SIG(const ECDSA_SIG *sig, unsigned char **pp);
-
-/** Decodes a DER encoded ECDSA signature (note: this function changes *pp
- *  (*pp += len)). 
- *  \param  sig  pointer to ECDSA_SIG pointer (may be NULL)
- *  \param  pp   memory buffer with the DER encoded signature
- *  \param  len  length of the buffer
- *  \return pointer to the decoded ECDSA_SIG structure (or NULL)
- */
-ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **sig, const unsigned char **pp, long len);
-
-/** Computes the ECDSA signature of the given hash value using
- *  the supplied private key and returns the created signature.
- *  \param  dgst      pointer to the hash value
- *  \param  dgst_len  length of the hash value
- *  \param  eckey     EC_KEY object containing a private EC key
- *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
- */
-ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst,int dgst_len,EC_KEY *eckey);
-
-/** Computes ECDSA signature of a given hash value using the supplied
- *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
- *  \param  dgst     pointer to the hash value to sign
- *  \param  dgstlen  length of the hash value
- *  \param  kinv     BIGNUM with a pre-computed inverse k (optional)
- *  \param  rp       BIGNUM with a pre-computed rp value (optioanl), 
- *                   see ECDSA_sign_setup
- *  \param  eckey    EC_KEY object containing a private EC key
- *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
- */
-ECDSA_SIG *ECDSA_do_sign_ex(const unsigned char *dgst, int dgstlen, 
-		const BIGNUM *kinv, const BIGNUM *rp, EC_KEY *eckey);
-
-/** Verifies that the supplied signature is a valid ECDSA
- *  signature of the supplied hash value using the supplied public key.
- *  \param  dgst      pointer to the hash value
- *  \param  dgst_len  length of the hash value
- *  \param  sig       ECDSA_SIG structure
- *  \param  eckey     EC_KEY object containing a public EC key
- *  \return 1 if the signature is valid, 0 if the signature is invalid
- *          and -1 on error
- */
-int	  ECDSA_do_verify(const unsigned char *dgst, int dgst_len,
-		const ECDSA_SIG *sig, EC_KEY* eckey);
-
-const ECDSA_METHOD *ECDSA_OpenSSL(void);
-
-/** Sets the default ECDSA method
- *  \param  meth  new default ECDSA_METHOD
- */
-void	  ECDSA_set_default_method(const ECDSA_METHOD *meth);
-
-/** Returns the default ECDSA method
- *  \return pointer to ECDSA_METHOD structure containing the default method
- */
-const ECDSA_METHOD *ECDSA_get_default_method(void);
-
-/** Sets method to be used for the ECDSA operations
- *  \param  eckey  EC_KEY object
- *  \param  meth   new method
- *  \return 1 on success and 0 otherwise 
- */
-int 	  ECDSA_set_method(EC_KEY *eckey, const ECDSA_METHOD *meth);
-
-/** Returns the maximum length of the DER encoded signature
- *  \param  eckey  EC_KEY object
- *  \return numbers of bytes required for the DER encoded signature
- */
-int	  ECDSA_size(const EC_KEY *eckey);
-
-/** Precompute parts of the signing operation
- *  \param  eckey  EC_KEY object containing a private EC key
- *  \param  ctx    BN_CTX object (optional)
- *  \param  kinv   BIGNUM pointer for the inverse of k
- *  \param  rp     BIGNUM pointer for x coordinate of k * generator
- *  \return 1 on success and 0 otherwise
- */
-int 	  ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv, 
-		BIGNUM **rp);
-
-/** Computes ECDSA signature of a given hash value using the supplied
- *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
- *  \param  type     this parameter is ignored
- *  \param  dgst     pointer to the hash value to sign
- *  \param  dgstlen  length of the hash value
- *  \param  sig      memory for the DER encoded created signature
- *  \param  siglen   pointer to the length of the returned signature
- *  \param  eckey    EC_KEY object containing a private EC key
- *  \return 1 on success and 0 otherwise
- */
-int	  ECDSA_sign(int type, const unsigned char *dgst, int dgstlen, 
-		unsigned char *sig, unsigned int *siglen, EC_KEY *eckey);
-
-
-/** Computes ECDSA signature of a given hash value using the supplied
- *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
- *  \param  type     this parameter is ignored
- *  \param  dgst     pointer to the hash value to sign
- *  \param  dgstlen  length of the hash value
- *  \param  sig      buffer to hold the DER encoded signature
- *  \param  siglen   pointer to the length of the returned signature
- *  \param  kinv     BIGNUM with a pre-computed inverse k (optional)
- *  \param  rp       BIGNUM with a pre-computed rp value (optioanl), 
- *                   see ECDSA_sign_setup
- *  \param  eckey    EC_KEY object containing a private EC key
- *  \return 1 on success and 0 otherwise
- */
-int	  ECDSA_sign_ex(int type, const unsigned char *dgst, int dgstlen, 
-		unsigned char *sig, unsigned int *siglen, const BIGNUM *kinv,
-		const BIGNUM *rp, EC_KEY *eckey);
-
-/** Verifies that the given signature is valid ECDSA signature
- *  of the supplied hash value using the specified public key.
- *  \param  type     this parameter is ignored
- *  \param  dgst     pointer to the hash value 
- *  \param  dgstlen  length of the hash value
- *  \param  sig      pointer to the DER encoded signature
- *  \param  siglen   length of the DER encoded signature
- *  \param  eckey    EC_KEY object containing a public EC key
- *  \return 1 if the signature is valid, 0 if the signature is invalid
- *          and -1 on error
- */
-int 	  ECDSA_verify(int type, const unsigned char *dgst, int dgstlen, 
-		const unsigned char *sig, int siglen, EC_KEY *eckey);
-
-/* the standard ex_data functions */
-int 	  ECDSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new 
-		*new_func, CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
-int 	  ECDSA_set_ex_data(EC_KEY *d, int idx, void *arg);
-void 	  *ECDSA_get_ex_data(EC_KEY *d, int idx);
-
-
-/* BEGIN ERROR CODES */
-/* The following lines are auto generated by the script mkerr.pl. Any changes
- * made after this point may be overwritten when the script is next run.
- */
-void ERR_load_ECDSA_strings(void);
-
-/* Error codes for the ECDSA functions. */
-
-/* Function codes. */
-#define ECDSA_F_ECDSA_DATA_NEW_METHOD			 100
-#define ECDSA_F_ECDSA_DO_SIGN				 101
-#define ECDSA_F_ECDSA_DO_VERIFY				 102
-#define ECDSA_F_ECDSA_SIGN_SETUP			 103
-
-/* Reason codes. */
-#define ECDSA_R_BAD_SIGNATURE				 100
-#define ECDSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE		 101
-#define ECDSA_R_ERR_EC_LIB				 102
-#define ECDSA_R_MISSING_PARAMETERS			 103
-#define ECDSA_R_NEED_NEW_SETUP_VALUES			 106
-#define ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED		 104
-#define ECDSA_R_SIGNATURE_MALLOC_FAILED			 105
-
-#ifdef  __cplusplus
-}
-#endif
-#endif
diff --git a/extra_lib/include/openssl/err.h b/extra_lib/include/openssl/err.h
deleted file mode 100644
index b9f8c16..0000000
--- a/extra_lib/include/openssl/err.h
+++ /dev/null
@@ -1,385 +0,0 @@
-/* crypto/err/err.h */
-/* Copyright (C) 1995-1998 Eric Young (eay at cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay at cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh at cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay at cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh at cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-/* ====================================================================
- * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. 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.
- *
- * 3. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
- *
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
- *    endorse or promote products derived from this software without
- *    prior written permission. For written permission, please contact
- *    openssl-core at openssl.org.
- *
- * 5. Products derived from this software may not be called "OpenSSL"
- *    nor may "OpenSSL" appear in their names without prior written
- *    permission of the OpenSSL Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- *    acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
- *
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
- * EXPRESSED 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 OpenSSL PROJECT OR
- * ITS 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.
- * ====================================================================
- *
- * This product includes cryptographic software written by Eric Young
- * (eay at cryptsoft.com).  This product includes software written by Tim
- * Hudson (tjh at cryptsoft.com).
- *
- */
-
-#ifndef HEADER_ERR_H
-#define HEADER_ERR_H
-
-#include <openssl/e_os2.h>
-
-#ifndef OPENSSL_NO_FP_API
-#include <stdio.h>
-#include <stdlib.h>
-#endif
-
-#include <openssl/ossl_typ.h>
-#ifndef OPENSSL_NO_BIO
-#include <openssl/bio.h>
-#endif
-#ifndef OPENSSL_NO_LHASH
-#include <openssl/lhash.h>
-#endif
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-#ifndef OPENSSL_NO_ERR
-#define ERR_PUT_error(a,b,c,d,e)	ERR_put_error(a,b,c,d,e)
-#else
-#define ERR_PUT_error(a,b,c,d,e)	ERR_put_error(a,b,c,NULL,0)
-#endif
-
-#include <errno.h>
-
-#define ERR_TXT_MALLOCED	0x01
-#define ERR_TXT_STRING		0x02
-
-#define ERR_FLAG_MARK		0x01
-
-#define ERR_NUM_ERRORS	16
-typedef struct err_state_st
-	{
-	CRYPTO_THREADID tid;
-	int err_flags[ERR_NUM_ERRORS];
-	unsigned long err_buffer[ERR_NUM_ERRORS];
-	char *err_data[ERR_NUM_ERRORS];
-	int err_data_flags[ERR_NUM_ERRORS];
-	const char *err_file[ERR_NUM_ERRORS];
-	int err_line[ERR_NUM_ERRORS];
-	int top,bottom;
-	} ERR_STATE;
-
-/* library */
-#define ERR_LIB_NONE		1
-#define ERR_LIB_SYS		2
-#define ERR_LIB_BN		3
-#define ERR_LIB_RSA		4
-#define ERR_LIB_DH		5
-#define ERR_LIB_EVP		6
-#define ERR_LIB_BUF		7
-#define ERR_LIB_OBJ		8
-#define ERR_LIB_PEM		9
-#define ERR_LIB_DSA		10
-#define ERR_LIB_X509		11
-/* #define ERR_LIB_METH         12 */
-#define ERR_LIB_ASN1		13
-#define ERR_LIB_CONF		14
-#define ERR_LIB_CRYPTO		15
-#define ERR_LIB_EC		16
-#define ERR_LIB_SSL		20
-/* #define ERR_LIB_SSL23        21 */
-/* #define ERR_LIB_SSL2         22 */
-/* #define ERR_LIB_SSL3         23 */
-/* #define ERR_LIB_RSAREF       30 */
-/* #define ERR_LIB_PROXY        31 */
-#define ERR_LIB_BIO		32
-#define ERR_LIB_PKCS7		33
-#define ERR_LIB_X509V3		34
-#define ERR_LIB_PKCS12		35
-#define ERR_LIB_RAND		36
-#define ERR_LIB_DSO		37
-#define ERR_LIB_ENGINE		38
-#define ERR_LIB_OCSP            39
-#define ERR_LIB_UI              40
-#define ERR_LIB_COMP            41
-#define ERR_LIB_ECDSA		42
-#define ERR_LIB_ECDH		43
-#define ERR_LIB_STORE           44
-#define ERR_LIB_FIPS		45
-#define ERR_LIB_CMS		46
-#define ERR_LIB_TS		47
-#define ERR_LIB_HMAC		48
-#define ERR_LIB_JPAKE		49
-
-#define ERR_LIB_USER		128
-
-#define SYSerr(f,r)  ERR_PUT_error(ERR_LIB_SYS,(f),(r),__FILE__,__LINE__)
-#define BNerr(f,r)   ERR_PUT_error(ERR_LIB_BN,(f),(r),__FILE__,__LINE__)
-#define RSAerr(f,r)  ERR_PUT_error(ERR_LIB_RSA,(f),(r),__FILE__,__LINE__)
-#define DHerr(f,r)   ERR_PUT_error(ERR_LIB_DH,(f),(r),__FILE__,__LINE__)
-#define EVPerr(f,r)  ERR_PUT_error(ERR_LIB_EVP,(f),(r),__FILE__,__LINE__)
-#define BUFerr(f,r)  ERR_PUT_error(ERR_LIB_BUF,(f),(r),__FILE__,__LINE__)
-#define OBJerr(f,r)  ERR_PUT_error(ERR_LIB_OBJ,(f),(r),__FILE__,__LINE__)
-#define PEMerr(f,r)  ERR_PUT_error(ERR_LIB_PEM,(f),(r),__FILE__,__LINE__)
-#define DSAerr(f,r)  ERR_PUT_error(ERR_LIB_DSA,(f),(r),__FILE__,__LINE__)
-#define X509err(f,r) ERR_PUT_error(ERR_LIB_X509,(f),(r),__FILE__,__LINE__)
-#define ASN1err(f,r) ERR_PUT_error(ERR_LIB_ASN1,(f),(r),__FILE__,__LINE__)
-#define CONFerr(f,r) ERR_PUT_error(ERR_LIB_CONF,(f),(r),__FILE__,__LINE__)
-#define CRYPTOerr(f,r) ERR_PUT_error(ERR_LIB_CRYPTO,(f),(r),__FILE__,__LINE__)
-#define ECerr(f,r)   ERR_PUT_error(ERR_LIB_EC,(f),(r),__FILE__,__LINE__)
-#define SSLerr(f,r)  ERR_PUT_error(ERR_LIB_SSL,(f),(r),__FILE__,__LINE__)
-#define BIOerr(f,r)  ERR_PUT_error(ERR_LIB_BIO,(f),(r),__FILE__,__LINE__)
-#define PKCS7err(f,r) ERR_PUT_error(ERR_LIB_PKCS7,(f),(r),__FILE__,__LINE__)
-#define X509V3err(f,r) ERR_PUT_error(ERR_LIB_X509V3,(f),(r),__FILE__,__LINE__)
-#define PKCS12err(f,r) ERR_PUT_error(ERR_LIB_PKCS12,(f),(r),__FILE__,__LINE__)
-#define RANDerr(f,r) ERR_PUT_error(ERR_LIB_RAND,(f),(r),__FILE__,__LINE__)
-#define DSOerr(f,r) ERR_PUT_error(ERR_LIB_DSO,(f),(r),__FILE__,__LINE__)
-#define ENGINEerr(f,r) ERR_PUT_error(ERR_LIB_ENGINE,(f),(r),__FILE__,__LINE__)
-#define OCSPerr(f,r) ERR_PUT_error(ERR_LIB_OCSP,(f),(r),__FILE__,__LINE__)
-#define UIerr(f,r) ERR_PUT_error(ERR_LIB_UI,(f),(r),__FILE__,__LINE__)
-#define COMPerr(f,r) ERR_PUT_error(ERR_LIB_COMP,(f),(r),__FILE__,__LINE__)
-#define ECDSAerr(f,r)  ERR_PUT_error(ERR_LIB_ECDSA,(f),(r),__FILE__,__LINE__)
-#define ECDHerr(f,r)  ERR_PUT_error(ERR_LIB_ECDH,(f),(r),__FILE__,__LINE__)
-#define STOREerr(f,r) ERR_PUT_error(ERR_LIB_STORE,(f),(r),__FILE__,__LINE__)
-#define FIPSerr(f,r) ERR_PUT_error(ERR_LIB_FIPS,(f),(r),__FILE__,__LINE__)
-#define CMSerr(f,r) ERR_PUT_error(ERR_LIB_CMS,(f),(r),__FILE__,__LINE__)
-#define TSerr(f,r) ERR_PUT_error(ERR_LIB_TS,(f),(r),__FILE__,__LINE__)
-#define HMACerr(f,r) ERR_PUT_error(ERR_LIB_HMAC,(f),(r),__FILE__,__LINE__)
-#define JPAKEerr(f,r) ERR_PUT_error(ERR_LIB_JPAKE,(f),(r),__FILE__,__LINE__)
-
-/* Borland C seems too stupid to be able to shift and do longs in
- * the pre-processor :-( */
-#define ERR_PACK(l,f,r)		(((((unsigned long)l)&0xffL)*0x1000000)| \
-				((((unsigned long)f)&0xfffL)*0x1000)| \
-				((((unsigned long)r)&0xfffL)))
-#define ERR_GET_LIB(l)		(int)((((unsigned long)l)>>24L)&0xffL)
-#define ERR_GET_FUNC(l)		(int)((((unsigned long)l)>>12L)&0xfffL)
-#define ERR_GET_REASON(l)	(int)((l)&0xfffL)
-#define ERR_FATAL_ERROR(l)	(int)((l)&ERR_R_FATAL)
-
-
-/* OS functions */
-#define SYS_F_FOPEN		1
-#define SYS_F_CONNECT		2
-#define SYS_F_GETSERVBYNAME	3
-#define SYS_F_SOCKET		4
-#define SYS_F_IOCTLSOCKET	5
-#define SYS_F_BIND		6
-#define SYS_F_LISTEN		7
-#define SYS_F_ACCEPT		8
-#define SYS_F_WSASTARTUP	9 /* Winsock stuff */
-#define SYS_F_OPENDIR		10
-#define SYS_F_FREAD		11
-
-
-/* reasons */
-#define ERR_R_SYS_LIB	ERR_LIB_SYS       /* 2 */
-#define ERR_R_BN_LIB	ERR_LIB_BN        /* 3 */
-#define ERR_R_RSA_LIB	ERR_LIB_RSA       /* 4 */
-#define ERR_R_DH_LIB	ERR_LIB_DH        /* 5 */
-#define ERR_R_EVP_LIB	ERR_LIB_EVP       /* 6 */
-#define ERR_R_BUF_LIB	ERR_LIB_BUF       /* 7 */
-#define ERR_R_OBJ_LIB	ERR_LIB_OBJ       /* 8 */
-#define ERR_R_PEM_LIB	ERR_LIB_PEM       /* 9 */
-#define ERR_R_DSA_LIB	ERR_LIB_DSA      /* 10 */
-#define ERR_R_X509_LIB	ERR_LIB_X509     /* 11 */
-#define ERR_R_ASN1_LIB	ERR_LIB_ASN1     /* 13 */
-#define ERR_R_CONF_LIB	ERR_LIB_CONF     /* 14 */
-#define ERR_R_CRYPTO_LIB ERR_LIB_CRYPTO  /* 15 */
-#define ERR_R_EC_LIB	ERR_LIB_EC       /* 16 */
-#define ERR_R_SSL_LIB	ERR_LIB_SSL      /* 20 */
-#define ERR_R_BIO_LIB	ERR_LIB_BIO      /* 32 */
-#define ERR_R_PKCS7_LIB	ERR_LIB_PKCS7    /* 33 */
-#define ERR_R_X509V3_LIB ERR_LIB_X509V3  /* 34 */
-#define ERR_R_PKCS12_LIB ERR_LIB_PKCS12  /* 35 */
-#define ERR_R_RAND_LIB	ERR_LIB_RAND     /* 36 */
-#define ERR_R_DSO_LIB	ERR_LIB_DSO      /* 37 */
-#define ERR_R_ENGINE_LIB ERR_LIB_ENGINE  /* 38 */
-#define ERR_R_OCSP_LIB  ERR_LIB_OCSP     /* 39 */
-#define ERR_R_UI_LIB    ERR_LIB_UI       /* 40 */
-#define ERR_R_COMP_LIB	ERR_LIB_COMP     /* 41 */
-#define ERR_R_ECDSA_LIB ERR_LIB_ECDSA	 /* 42 */
-#define ERR_R_ECDH_LIB  ERR_LIB_ECDH	 /* 43 */
-#define ERR_R_STORE_LIB ERR_LIB_STORE    /* 44 */
-#define ERR_R_TS_LIB	ERR_LIB_TS       /* 45 */
-
-#define ERR_R_NESTED_ASN1_ERROR			58
-#define ERR_R_BAD_ASN1_OBJECT_HEADER		59
-#define ERR_R_BAD_GET_ASN1_OBJECT_CALL		60
-#define ERR_R_EXPECTING_AN_ASN1_SEQUENCE	61
-#define ERR_R_ASN1_LENGTH_MISMATCH		62
-#define ERR_R_MISSING_ASN1_EOS			63
-
-/* fatal error */
-#define ERR_R_FATAL				64
-#define	ERR_R_MALLOC_FAILURE			(1|ERR_R_FATAL)
-#define	ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED	(2|ERR_R_FATAL)
-#define	ERR_R_PASSED_NULL_PARAMETER		(3|ERR_R_FATAL)
-#define	ERR_R_INTERNAL_ERROR			(4|ERR_R_FATAL)
-#define	ERR_R_DISABLED				(5|ERR_R_FATAL)
-
-/* 99 is the maximum possible ERR_R_... code, higher values
- * are reserved for the individual libraries */
-
-
-typedef struct ERR_string_data_st
-	{
-	unsigned long error;
-	const char *string;
-	} ERR_STRING_DATA;
-
-void ERR_put_error(int lib, int func,int reason,const char *file,int line);
-void ERR_set_error_data(char *data,int flags);
-
-unsigned long ERR_get_error(void);
-unsigned long ERR_get_error_line(const char **file,int *line);
-unsigned long ERR_get_error_line_data(const char **file,int *line,
-				      const char **data, int *flags);
-unsigned long ERR_peek_error(void);
-unsigned long ERR_peek_error_line(const char **file,int *line);
-unsigned long ERR_peek_error_line_data(const char **file,int *line,
-				       const char **data,int *flags);
-unsigned long ERR_peek_last_error(void);
-unsigned long ERR_peek_last_error_line(const char **file,int *line);
-unsigned long ERR_peek_last_error_line_data(const char **file,int *line,
-				       const char **data,int *flags);
-void ERR_clear_error(void );
-char *ERR_error_string(unsigned long e,char *buf);
-void ERR_error_string_n(unsigned long e, char *buf, size_t len);
-const char *ERR_lib_error_string(unsigned long e);
-const char *ERR_func_error_string(unsigned long e);
-const char *ERR_reason_error_string(unsigned long e);
-void ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u),
-			 void *u);
-#ifndef OPENSSL_NO_FP_API
-void ERR_print_errors_fp(FILE *fp);
-#endif
-#ifndef OPENSSL_NO_BIO
-void ERR_print_errors(BIO *bp);
-void ERR_add_error_data(int num, ...);
-#endif
-void ERR_load_strings(int lib,ERR_STRING_DATA str[]);
-void ERR_unload_strings(int lib,ERR_STRING_DATA str[]);
-void ERR_load_ERR_strings(void);
-void ERR_load_crypto_strings(void);
-void ERR_free_strings(void);
-
-void ERR_remove_thread_state(const CRYPTO_THREADID *tid);
-#ifndef OPENSSL_NO_DEPRECATED
-void ERR_remove_state(unsigned long pid); /* if zero we look it up */
-#endif
-ERR_STATE *ERR_get_state(void);
-
-#ifndef OPENSSL_NO_LHASH
-LHASH_OF(ERR_STRING_DATA) *ERR_get_string_table(void);
-LHASH_OF(ERR_STATE) *ERR_get_err_state_table(void);
-void ERR_release_err_state_table(LHASH_OF(ERR_STATE) **hash);
-#endif
-
-int ERR_get_next_error_library(void);
-
-int ERR_set_mark(void);
-int ERR_pop_to_mark(void);
-
-/* Already defined in ossl_typ.h */
-/* typedef struct st_ERR_FNS ERR_FNS; */
-/* An application can use this function and provide the return value to loaded
- * modules that should use the application's ERR state/functionality */
-const ERR_FNS *ERR_get_implementation(void);
-/* A loaded module should call this function prior to any ERR operations using
- * the application's "ERR_FNS". */
-int ERR_set_implementation(const ERR_FNS *fns);
-
-#ifdef	__cplusplus
-}
-#endif
-
-#endif
diff --git a/extra_lib/include/openssl/evp.h b/extra_lib/include/openssl/evp.h
deleted file mode 100644
index 9f9795e..0000000
--- a/extra_lib/include/openssl/evp.h
+++ /dev/null
@@ -1,1324 +0,0 @@
-/* crypto/evp/evp.h */
-/* Copyright (C) 1995-1998 Eric Young (eay at cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay at cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh at cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay at cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh at cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef HEADER_ENVELOPE_H
-#define HEADER_ENVELOPE_H
-
-#ifdef OPENSSL_ALGORITHM_DEFINES
-# include <openssl/opensslconf.h>
-#else
-# define OPENSSL_ALGORITHM_DEFINES
-# include <openssl/opensslconf.h>
-# undef OPENSSL_ALGORITHM_DEFINES
-#endif
-
-#include <openssl/ossl_typ.h>
-
-#include <openssl/symhacks.h>
-
-#ifndef OPENSSL_NO_BIO
-#include <openssl/bio.h>
-#endif
-
-/*
-#define EVP_RC2_KEY_SIZE		16
-#define EVP_RC4_KEY_SIZE		16
-#define EVP_BLOWFISH_KEY_SIZE		16
-#define EVP_CAST5_KEY_SIZE		16
-#define EVP_RC5_32_12_16_KEY_SIZE	16
-*/
-#define EVP_MAX_MD_SIZE			64	/* longest known is SHA512 */
-#define EVP_MAX_KEY_LENGTH		32
-#define EVP_MAX_IV_LENGTH		16
-#define EVP_MAX_BLOCK_LENGTH		32
-
-#define PKCS5_SALT_LEN			8
-/* Default PKCS#5 iteration count */
-#define PKCS5_DEFAULT_ITER		2048
-
-#include <openssl/objects.h>
-
-#define EVP_PK_RSA	0x0001
-#define EVP_PK_DSA	0x0002
-#define EVP_PK_DH	0x0004
-#define EVP_PK_EC	0x0008
-#define EVP_PKT_SIGN	0x0010
-#define EVP_PKT_ENC	0x0020
-#define EVP_PKT_EXCH	0x0040
-#define EVP_PKS_RSA	0x0100
-#define EVP_PKS_DSA	0x0200
-#define EVP_PKS_EC	0x0400
-#define EVP_PKT_EXP	0x1000 /* <= 512 bit key */
-
-#define EVP_PKEY_NONE	NID_undef
-#define EVP_PKEY_RSA	NID_rsaEncryption
-#define EVP_PKEY_RSA2	NID_rsa
-#define EVP_PKEY_DSA	NID_dsa
-#define EVP_PKEY_DSA1	NID_dsa_2
-#define EVP_PKEY_DSA2	NID_dsaWithSHA
-#define EVP_PKEY_DSA3	NID_dsaWithSHA1
-#define EVP_PKEY_DSA4	NID_dsaWithSHA1_2
-#define EVP_PKEY_DH	NID_dhKeyAgreement
-#define EVP_PKEY_EC	NID_X9_62_id_ecPublicKey
-#define EVP_PKEY_HMAC	NID_hmac
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-/* Type needs to be a bit field
- * Sub-type needs to be for variations on the method, as in, can it do
- * arbitrary encryption.... */
-struct evp_pkey_st
-	{
-	int type;
-	int save_type;
-	int references;
-	const EVP_PKEY_ASN1_METHOD *ameth;
-	ENGINE *engine;
-	union	{
-		char *ptr;
-#ifndef OPENSSL_NO_RSA
-		struct rsa_st *rsa;	/* RSA */
-#endif
-#ifndef OPENSSL_NO_DSA
-		struct dsa_st *dsa;	/* DSA */
-#endif
-#ifndef OPENSSL_NO_DH
-		struct dh_st *dh;	/* DH */
-#endif
-#ifndef OPENSSL_NO_EC
-		struct ec_key_st *ec;	/* ECC */
-#endif
-		} pkey;
-	int save_parameters;
-	STACK_OF(X509_ATTRIBUTE) *attributes; /* [ 0 ] */
-	} /* EVP_PKEY */;
-
-#define EVP_PKEY_MO_SIGN	0x0001
-#define EVP_PKEY_MO_VERIFY	0x0002
-#define EVP_PKEY_MO_ENCRYPT	0x0004
-#define EVP_PKEY_MO_DECRYPT	0x0008
-
-#ifndef EVP_MD
-struct env_md_st
-	{
-	int type;
-	int pkey_type;
-	int md_size;
-	unsigned long flags;
-	int (*init)(EVP_MD_CTX *ctx);
-	int (*update)(EVP_MD_CTX *ctx,const void *data,size_t count);
-	int (*final)(EVP_MD_CTX *ctx,unsigned char *md);
-	int (*copy)(EVP_MD_CTX *to,const EVP_MD_CTX *from);
-	int (*cleanup)(EVP_MD_CTX *ctx);
-
-	/* FIXME: prototype these some day */
-	int (*sign)(int type, const unsigned char *m, unsigned int m_length,
-		    unsigned char *sigret, unsigned int *siglen, void *key);
-	int (*verify)(int type, const unsigned char *m, unsigned int m_length,
-		      const unsigned char *sigbuf, unsigned int siglen,
-		      void *key);
-	int required_pkey_type[5]; /*EVP_PKEY_xxx */
-	int block_size;
-	int ctx_size; /* how big does the ctx->md_data need to be */
-	/* control function */
-	int (*md_ctrl)(EVP_MD_CTX *ctx, int cmd, int p1, void *p2);
-	} /* EVP_MD */;
-
-typedef int evp_sign_method(int type,const unsigned char *m,
-			    unsigned int m_length,unsigned char *sigret,
-			    unsigned int *siglen, void *key);
-typedef int evp_verify_method(int type,const unsigned char *m,
-			    unsigned int m_length,const unsigned char *sigbuf,
-			    unsigned int siglen, void *key);
-
-#define EVP_MD_FLAG_ONESHOT	0x0001 /* digest can only handle a single
-					* block */
-
-#define EVP_MD_FLAG_PKEY_DIGEST	0x0002 /* digest is a "clone" digest used
-					* which is a copy of an existing
-					* one for a specific public key type.
-					* EVP_dss1() etc */
-
-/* Digest uses EVP_PKEY_METHOD for signing instead of MD specific signing */
-
-#define EVP_MD_FLAG_PKEY_METHOD_SIGNATURE	0x0004
-
-/* DigestAlgorithmIdentifier flags... */
-
-#define EVP_MD_FLAG_DIGALGID_MASK		0x0018
-
-/* NULL or absent parameter accepted. Use NULL */
-
-#define EVP_MD_FLAG_DIGALGID_NULL		0x0000
-
-/* NULL or absent parameter accepted. Use NULL for PKCS#1 otherwise absent */
-
-#define EVP_MD_FLAG_DIGALGID_ABSENT		0x0008
-
-/* Custom handling via ctrl */
-
-#define EVP_MD_FLAG_DIGALGID_CUSTOM		0x0018
-
-/* Digest ctrls */
-
-#define	EVP_MD_CTRL_DIGALGID			0x1
-#define	EVP_MD_CTRL_MICALG			0x2
-
-/* Minimum Algorithm specific ctrl value */
-
-#define	EVP_MD_CTRL_ALG_CTRL			0x1000
-
-#define EVP_PKEY_NULL_method	NULL,NULL,{0,0,0,0}
-
-#ifndef OPENSSL_NO_DSA
-#define EVP_PKEY_DSA_method	(evp_sign_method *)DSA_sign, \
-				(evp_verify_method *)DSA_verify, \
-				{EVP_PKEY_DSA,EVP_PKEY_DSA2,EVP_PKEY_DSA3, \
-					EVP_PKEY_DSA4,0}
-#else
-#define EVP_PKEY_DSA_method	EVP_PKEY_NULL_method
-#endif
-
-#ifndef OPENSSL_NO_ECDSA
-#define EVP_PKEY_ECDSA_method   (evp_sign_method *)ECDSA_sign, \
-				(evp_verify_method *)ECDSA_verify, \
-                                 {EVP_PKEY_EC,0,0,0}
-#else   
-#define EVP_PKEY_ECDSA_method   EVP_PKEY_NULL_method
-#endif
-
-#ifndef OPENSSL_NO_RSA
-#define EVP_PKEY_RSA_method	(evp_sign_method *)RSA_sign, \
-				(evp_verify_method *)RSA_verify, \
-				{EVP_PKEY_RSA,EVP_PKEY_RSA2,0,0}
-#define EVP_PKEY_RSA_ASN1_OCTET_STRING_method \
-				(evp_sign_method *)RSA_sign_ASN1_OCTET_STRING, \
-				(evp_verify_method *)RSA_verify_ASN1_OCTET_STRING, \
-				{EVP_PKEY_RSA,EVP_PKEY_RSA2,0,0}
-#else
-#define EVP_PKEY_RSA_method	EVP_PKEY_NULL_method
-#define EVP_PKEY_RSA_ASN1_OCTET_STRING_method EVP_PKEY_NULL_method
-#endif
-
-#endif /* !EVP_MD */
-
-struct env_md_ctx_st
-	{
-	const EVP_MD *digest;
-	ENGINE *engine; /* functional reference if 'digest' is ENGINE-provided */
-	unsigned long flags;
-	void *md_data;
-	/* Public key context for sign/verify */
-	EVP_PKEY_CTX *pctx;
-	/* Update function: usually copied from EVP_MD */
-	int (*update)(EVP_MD_CTX *ctx,const void *data,size_t count);
-	} /* EVP_MD_CTX */;
-
-/* values for EVP_MD_CTX flags */
-
-#define EVP_MD_CTX_FLAG_ONESHOT		0x0001 /* digest update will be called
-						* once only */
-#define EVP_MD_CTX_FLAG_CLEANED		0x0002 /* context has already been
-						* cleaned */
-#define EVP_MD_CTX_FLAG_REUSE		0x0004 /* Don't free up ctx->md_data
-						* in EVP_MD_CTX_cleanup */
-/* FIPS and pad options are ignored in 1.0.0, definitions are here
- * so we don't accidentally reuse the values for other purposes.
- */
-
-#define EVP_MD_CTX_FLAG_NON_FIPS_ALLOW	0x0008	/* Allow use of non FIPS digest
-						 * in FIPS mode */
-
-/* The following PAD options are also currently ignored in 1.0.0, digest
- * parameters are handled through EVP_DigestSign*() and EVP_DigestVerify*()
- * instead.
- */
-#define EVP_MD_CTX_FLAG_PAD_MASK	0xF0	/* RSA mode to use */
-#define EVP_MD_CTX_FLAG_PAD_PKCS1	0x00	/* PKCS#1 v1.5 mode */
-#define EVP_MD_CTX_FLAG_PAD_X931	0x10	/* X9.31 mode */
-#define EVP_MD_CTX_FLAG_PAD_PSS		0x20	/* PSS mode */
-
-#define EVP_MD_CTX_FLAG_NO_INIT		0x0100 /* Don't initialize md_data */
-
-struct evp_cipher_st
-	{
-	int nid;
-	int block_size;
-	int key_len;		/* Default value for variable length ciphers */
-	int iv_len;
-	unsigned long flags;	/* Various flags */
-	int (*init)(EVP_CIPHER_CTX *ctx, const unsigned char *key,
-		    const unsigned char *iv, int enc);	/* init key */
-	int (*do_cipher)(EVP_CIPHER_CTX *ctx, unsigned char *out,
-			 const unsigned char *in, size_t inl);/* encrypt/decrypt data */
-	int (*cleanup)(EVP_CIPHER_CTX *); /* cleanup ctx */
-	int ctx_size;		/* how big ctx->cipher_data needs to be */
-	int (*set_asn1_parameters)(EVP_CIPHER_CTX *, ASN1_TYPE *); /* Populate a ASN1_TYPE with parameters */
-	int (*get_asn1_parameters)(EVP_CIPHER_CTX *, ASN1_TYPE *); /* Get parameters from a ASN1_TYPE */
-	int (*ctrl)(EVP_CIPHER_CTX *, int type, int arg, void *ptr); /* Miscellaneous operations */
-	void *app_data;		/* Application data */
-	} /* EVP_CIPHER */;
-
-/* Values for cipher flags */
-
-/* Modes for ciphers */
-
-#define		EVP_CIPH_STREAM_CIPHER		0x0
-#define		EVP_CIPH_ECB_MODE		0x1
-#define		EVP_CIPH_CBC_MODE		0x2
-#define		EVP_CIPH_CFB_MODE		0x3
-#define		EVP_CIPH_OFB_MODE		0x4
-#define 	EVP_CIPH_MODE			0xF0007
-/* Set if variable length cipher */
-#define 	EVP_CIPH_VARIABLE_LENGTH	0x8
-/* Set if the iv handling should be done by the cipher itself */
-#define 	EVP_CIPH_CUSTOM_IV		0x10
-/* Set if the cipher's init() function should be called if key is NULL */
-#define 	EVP_CIPH_ALWAYS_CALL_INIT	0x20
-/* Call ctrl() to init cipher parameters */
-#define 	EVP_CIPH_CTRL_INIT		0x40
-/* Don't use standard key length function */
-#define 	EVP_CIPH_CUSTOM_KEY_LENGTH	0x80
-/* Don't use standard block padding */
-#define 	EVP_CIPH_NO_PADDING		0x100
-/* cipher handles random key generation */
-#define 	EVP_CIPH_RAND_KEY		0x200
-/* cipher has its own additional copying logic */
-#define 	EVP_CIPH_CUSTOM_COPY		0x400
-/* Allow use default ASN1 get/set iv */
-#define		EVP_CIPH_FLAG_DEFAULT_ASN1	0x1000
-/* Buffer length in bits not bytes: CFB1 mode only */
-#define		EVP_CIPH_FLAG_LENGTH_BITS	0x2000
-
-/* ctrl() values */
-
-#define		EVP_CTRL_INIT			0x0
-#define 	EVP_CTRL_SET_KEY_LENGTH		0x1
-#define 	EVP_CTRL_GET_RC2_KEY_BITS	0x2
-#define 	EVP_CTRL_SET_RC2_KEY_BITS	0x3
-#define 	EVP_CTRL_GET_RC5_ROUNDS		0x4
-#define 	EVP_CTRL_SET_RC5_ROUNDS		0x5
-#define 	EVP_CTRL_RAND_KEY		0x6
-#define 	EVP_CTRL_PBE_PRF_NID		0x7
-#define 	EVP_CTRL_COPY			0x8
-
-typedef struct evp_cipher_info_st
-	{
-	const EVP_CIPHER *cipher;
-	unsigned char iv[EVP_MAX_IV_LENGTH];
-	} EVP_CIPHER_INFO;
-
-struct evp_cipher_ctx_st
-	{
-	const EVP_CIPHER *cipher;
-	ENGINE *engine;	/* functional reference if 'cipher' is ENGINE-provided */
-	int encrypt;		/* encrypt or decrypt */
-	int buf_len;		/* number we have left */
-
-	unsigned char  oiv[EVP_MAX_IV_LENGTH];	/* original iv */
-	unsigned char  iv[EVP_MAX_IV_LENGTH];	/* working iv */
-	unsigned char buf[EVP_MAX_BLOCK_LENGTH];/* saved partial block */
-	int num;				/* used by cfb/ofb mode */
-
-	void *app_data;		/* application stuff */
-	int key_len;		/* May change for variable length cipher */
-	unsigned long flags;	/* Various flags */
-	void *cipher_data; /* per EVP data */
-	int final_used;
-	int block_mask;
-	unsigned char final[EVP_MAX_BLOCK_LENGTH];/* possible final block */
-	} /* EVP_CIPHER_CTX */;
-
-typedef struct evp_Encode_Ctx_st
-	{
-	int num;	/* number saved in a partial encode/decode */
-	int length;	/* The length is either the output line length
-			 * (in input bytes) or the shortest input line
-			 * length that is ok.  Once decoding begins,
-			 * the length is adjusted up each time a longer
-			 * line is decoded */
-	unsigned char enc_data[80];	/* data to encode */
-	int line_num;	/* number read on current line */
-	int expect_nl;
-	} EVP_ENCODE_CTX;
-
-/* Password based encryption function */
-typedef int (EVP_PBE_KEYGEN)(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
-		ASN1_TYPE *param, const EVP_CIPHER *cipher,
-                const EVP_MD *md, int en_de);
-
-#ifndef OPENSSL_NO_RSA
-#define EVP_PKEY_assign_RSA(pkey,rsa) EVP_PKEY_assign((pkey),EVP_PKEY_RSA,\
-					(char *)(rsa))
-#endif
-
-#ifndef OPENSSL_NO_DSA
-#define EVP_PKEY_assign_DSA(pkey,dsa) EVP_PKEY_assign((pkey),EVP_PKEY_DSA,\
-					(char *)(dsa))
-#endif
-
-#ifndef OPENSSL_NO_DH
-#define EVP_PKEY_assign_DH(pkey,dh) EVP_PKEY_assign((pkey),EVP_PKEY_DH,\
-					(char *)(dh))
-#endif
-
-#ifndef OPENSSL_NO_EC
-#define EVP_PKEY_assign_EC_KEY(pkey,eckey) EVP_PKEY_assign((pkey),EVP_PKEY_EC,\
-                                        (char *)(eckey))
-#endif
-
-/* Add some extra combinations */
-#define EVP_get_digestbynid(a) EVP_get_digestbyname(OBJ_nid2sn(a))
-#define EVP_get_digestbyobj(a) EVP_get_digestbynid(OBJ_obj2nid(a))
-#define EVP_get_cipherbynid(a) EVP_get_cipherbyname(OBJ_nid2sn(a))
-#define EVP_get_cipherbyobj(a) EVP_get_cipherbynid(OBJ_obj2nid(a))
-
-int EVP_MD_type(const EVP_MD *md);
-#define EVP_MD_nid(e)			EVP_MD_type(e)
-#define EVP_MD_name(e)			OBJ_nid2sn(EVP_MD_nid(e))
-int EVP_MD_pkey_type(const EVP_MD *md);	
-int EVP_MD_size(const EVP_MD *md);
-int EVP_MD_block_size(const EVP_MD *md);
-unsigned long EVP_MD_flags(const EVP_MD *md);
-
-const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx);
-#define EVP_MD_CTX_size(e)		EVP_MD_size(EVP_MD_CTX_md(e))
-#define EVP_MD_CTX_block_size(e)	EVP_MD_block_size(EVP_MD_CTX_md(e))
-#define EVP_MD_CTX_type(e)		EVP_MD_type(EVP_MD_CTX_md(e))
-
-int EVP_CIPHER_nid(const EVP_CIPHER *cipher);
-#define EVP_CIPHER_name(e)		OBJ_nid2sn(EVP_CIPHER_nid(e))
-int EVP_CIPHER_block_size(const EVP_CIPHER *cipher);
-int EVP_CIPHER_key_length(const EVP_CIPHER *cipher);
-int EVP_CIPHER_iv_length(const EVP_CIPHER *cipher);
-unsigned long EVP_CIPHER_flags(const EVP_CIPHER *cipher);
-#define EVP_CIPHER_mode(e)		(EVP_CIPHER_flags(e) & EVP_CIPH_MODE)
-
-const EVP_CIPHER * EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx);
-int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx);
-int EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *ctx);
-int EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx);
-int EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx);
-int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in);
-void * EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx);
-void EVP_CIPHER_CTX_set_app_data(EVP_CIPHER_CTX *ctx, void *data);
-#define EVP_CIPHER_CTX_type(c)         EVP_CIPHER_type(EVP_CIPHER_CTX_cipher(c))
-unsigned long EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx);
-#define EVP_CIPHER_CTX_mode(e)		(EVP_CIPHER_CTX_flags(e) & EVP_CIPH_MODE)
-
-#define EVP_ENCODE_LENGTH(l)	(((l+2)/3*4)+(l/48+1)*2+80)
-#define EVP_DECODE_LENGTH(l)	((l+3)/4*3+80)
-
-#define EVP_SignInit_ex(a,b,c)		EVP_DigestInit_ex(a,b,c)
-#define EVP_SignInit(a,b)		EVP_DigestInit(a,b)
-#define EVP_SignUpdate(a,b,c)		EVP_DigestUpdate(a,b,c)
-#define	EVP_VerifyInit_ex(a,b,c)	EVP_DigestInit_ex(a,b,c)
-#define	EVP_VerifyInit(a,b)		EVP_DigestInit(a,b)
-#define	EVP_VerifyUpdate(a,b,c)		EVP_DigestUpdate(a,b,c)
-#define EVP_OpenUpdate(a,b,c,d,e)	EVP_DecryptUpdate(a,b,c,d,e)
-#define EVP_SealUpdate(a,b,c,d,e)	EVP_EncryptUpdate(a,b,c,d,e)	
-#define EVP_DigestSignUpdate(a,b,c)	EVP_DigestUpdate(a,b,c)
-#define EVP_DigestVerifyUpdate(a,b,c)	EVP_DigestUpdate(a,b,c)
-
-#ifdef CONST_STRICT
-void BIO_set_md(BIO *,const EVP_MD *md);
-#else
-# define BIO_set_md(b,md)		BIO_ctrl(b,BIO_C_SET_MD,0,(char *)md)
-#endif
-#define BIO_get_md(b,mdp)		BIO_ctrl(b,BIO_C_GET_MD,0,(char *)mdp)
-#define BIO_get_md_ctx(b,mdcp)     BIO_ctrl(b,BIO_C_GET_MD_CTX,0,(char *)mdcp)
-#define BIO_set_md_ctx(b,mdcp)     BIO_ctrl(b,BIO_C_SET_MD_CTX,0,(char *)mdcp)
-#define BIO_get_cipher_status(b)	BIO_ctrl(b,BIO_C_GET_CIPHER_STATUS,0,NULL)
-#define BIO_get_cipher_ctx(b,c_pp)	BIO_ctrl(b,BIO_C_GET_CIPHER_CTX,0,(char *)c_pp)
-
-int EVP_Cipher(EVP_CIPHER_CTX *c,
-		unsigned char *out,
-		const unsigned char *in,
-		unsigned int inl);
-
-#define EVP_add_cipher_alias(n,alias) \
-	OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))
-#define EVP_add_digest_alias(n,alias) \
-	OBJ_NAME_add((alias),OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS,(n))
-#define EVP_delete_cipher_alias(alias) \
-	OBJ_NAME_remove(alias,OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS);
-#define EVP_delete_digest_alias(alias) \
-	OBJ_NAME_remove(alias,OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS);
-
-void	EVP_MD_CTX_init(EVP_MD_CTX *ctx);
-int	EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx);
-EVP_MD_CTX *EVP_MD_CTX_create(void);
-void	EVP_MD_CTX_destroy(EVP_MD_CTX *ctx);
-int     EVP_MD_CTX_copy_ex(EVP_MD_CTX *out,const EVP_MD_CTX *in);  
-void	EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags);
-void	EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags);
-int 	EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx,int flags);
-int	EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl);
-int	EVP_DigestUpdate(EVP_MD_CTX *ctx,const void *d,
-			 size_t cnt);
-int	EVP_DigestFinal_ex(EVP_MD_CTX *ctx,unsigned char *md,unsigned int *s);
-int	EVP_Digest(const void *data, size_t count,
-		unsigned char *md, unsigned int *size, const EVP_MD *type, ENGINE *impl);
-
-int     EVP_MD_CTX_copy(EVP_MD_CTX *out,const EVP_MD_CTX *in);  
-int	EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type);
-int	EVP_DigestFinal(EVP_MD_CTX *ctx,unsigned char *md,unsigned int *s);
-
-int	EVP_read_pw_string(char *buf,int length,const char *prompt,int verify);
-int	EVP_read_pw_string_min(char *buf,int minlen,int maxlen,const char *prompt,int verify);
-void	EVP_set_pw_prompt(const char *prompt);
-char *	EVP_get_pw_prompt(void);
-
-int	EVP_BytesToKey(const EVP_CIPHER *type,const EVP_MD *md,
-		const unsigned char *salt, const unsigned char *data,
-		int datal, int count, unsigned char *key,unsigned char *iv);
-
-void	EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags);
-void	EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags);
-int 	EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx,int flags);
-
-int	EVP_EncryptInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher,
-		const unsigned char *key, const unsigned char *iv);
-int	EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher, ENGINE *impl,
-		const unsigned char *key, const unsigned char *iv);
-int	EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
-		int *outl, const unsigned char *in, int inl);
-int	EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
-int	EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
-
-int	EVP_DecryptInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher,
-		const unsigned char *key, const unsigned char *iv);
-int	EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher, ENGINE *impl,
-		const unsigned char *key, const unsigned char *iv);
-int	EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
-		int *outl, const unsigned char *in, int inl);
-int	EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
-int	EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
-
-int	EVP_CipherInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher,
-		       const unsigned char *key,const unsigned char *iv,
-		       int enc);
-int	EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher, ENGINE *impl,
-		       const unsigned char *key,const unsigned char *iv,
-		       int enc);
-int	EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
-		int *outl, const unsigned char *in, int inl);
-int	EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
-int	EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
-
-int	EVP_SignFinal(EVP_MD_CTX *ctx,unsigned char *md,unsigned int *s,
-		EVP_PKEY *pkey);
-
-int	EVP_VerifyFinal(EVP_MD_CTX *ctx,const unsigned char *sigbuf,
-		unsigned int siglen,EVP_PKEY *pkey);
-
-int	EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
-			const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey);
-int	EVP_DigestSignFinal(EVP_MD_CTX *ctx,
-			unsigned char *sigret, size_t *siglen);
-
-int	EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
-			const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey);
-int	EVP_DigestVerifyFinal(EVP_MD_CTX *ctx,
-			unsigned char *sig, size_t siglen);
-
-int	EVP_OpenInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *type,
-		const unsigned char *ek, int ekl, const unsigned char *iv,
-		EVP_PKEY *priv);
-int	EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
-
-int	EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
-		 unsigned char **ek, int *ekl, unsigned char *iv,
-		EVP_PKEY **pubk, int npubk);
-int	EVP_SealFinal(EVP_CIPHER_CTX *ctx,unsigned char *out,int *outl);
-
-void	EVP_EncodeInit(EVP_ENCODE_CTX *ctx);
-void	EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx,unsigned char *out,int *outl,
-		const unsigned char *in,int inl);
-void	EVP_EncodeFinal(EVP_ENCODE_CTX *ctx,unsigned char *out,int *outl);
-int	EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int n);
-
-void	EVP_DecodeInit(EVP_ENCODE_CTX *ctx);
-int	EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx,unsigned char *out,int *outl,
-		const unsigned char *in, int inl);
-int	EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned
-		char *out, int *outl);
-int	EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n);
-
-void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a);
-int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a);
-EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void);
-void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *a);
-int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen);
-int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *c, int pad);
-int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr);
-int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key);
-
-#ifndef OPENSSL_NO_BIO
-BIO_METHOD *BIO_f_md(void);
-BIO_METHOD *BIO_f_base64(void);
-BIO_METHOD *BIO_f_cipher(void);
-BIO_METHOD *BIO_f_reliable(void);
-void BIO_set_cipher(BIO *b,const EVP_CIPHER *c,const unsigned char *k,
-		const unsigned char *i, int enc);
-#endif
-
-const EVP_MD *EVP_md_null(void);
-#ifndef OPENSSL_NO_MD2
-const EVP_MD *EVP_md2(void);
-#endif
-#ifndef OPENSSL_NO_MD4
-const EVP_MD *EVP_md4(void);
-#endif
-#ifndef OPENSSL_NO_MD5
-const EVP_MD *EVP_md5(void);
-#endif
-#ifndef OPENSSL_NO_SHA
-const EVP_MD *EVP_sha(void);
-const EVP_MD *EVP_sha1(void);
-const EVP_MD *EVP_dss(void);
-const EVP_MD *EVP_dss1(void);
-const EVP_MD *EVP_ecdsa(void);
-#endif
-#ifndef OPENSSL_NO_SHA256
-const EVP_MD *EVP_sha224(void);
-const EVP_MD *EVP_sha256(void);
-#endif
-#ifndef OPENSSL_NO_SHA512
-const EVP_MD *EVP_sha384(void);
-const EVP_MD *EVP_sha512(void);
-#endif
-#ifndef OPENSSL_NO_MDC2
-const EVP_MD *EVP_mdc2(void);
-#endif
-#ifndef OPENSSL_NO_RIPEMD
-const EVP_MD *EVP_ripemd160(void);
-#endif
-#ifndef OPENSSL_NO_WHIRLPOOL
-const EVP_MD *EVP_whirlpool(void);
-#endif
-const EVP_CIPHER *EVP_enc_null(void);		/* does nothing :-) */
-#ifndef OPENSSL_NO_DES
-const EVP_CIPHER *EVP_des_ecb(void);
-const EVP_CIPHER *EVP_des_ede(void);
-const EVP_CIPHER *EVP_des_ede3(void);
-const EVP_CIPHER *EVP_des_ede_ecb(void);
-const EVP_CIPHER *EVP_des_ede3_ecb(void);
-const EVP_CIPHER *EVP_des_cfb64(void);
-# define EVP_des_cfb EVP_des_cfb64
-const EVP_CIPHER *EVP_des_cfb1(void);
-const EVP_CIPHER *EVP_des_cfb8(void);
-const EVP_CIPHER *EVP_des_ede_cfb64(void);
-# define EVP_des_ede_cfb EVP_des_ede_cfb64
-#if 0
-const EVP_CIPHER *EVP_des_ede_cfb1(void);
-const EVP_CIPHER *EVP_des_ede_cfb8(void);
-#endif
-const EVP_CIPHER *EVP_des_ede3_cfb64(void);
-# define EVP_des_ede3_cfb EVP_des_ede3_cfb64
-const EVP_CIPHER *EVP_des_ede3_cfb1(void);
-const EVP_CIPHER *EVP_des_ede3_cfb8(void);
-const EVP_CIPHER *EVP_des_ofb(void);
-const EVP_CIPHER *EVP_des_ede_ofb(void);
-const EVP_CIPHER *EVP_des_ede3_ofb(void);
-const EVP_CIPHER *EVP_des_cbc(void);
-const EVP_CIPHER *EVP_des_ede_cbc(void);
-const EVP_CIPHER *EVP_des_ede3_cbc(void);
-const EVP_CIPHER *EVP_desx_cbc(void);
-/* This should now be supported through the dev_crypto ENGINE. But also, why are
- * rc4 and md5 declarations made here inside a "NO_DES" precompiler branch? */
-#if 0
-# ifdef OPENSSL_OPENBSD_DEV_CRYPTO
-const EVP_CIPHER *EVP_dev_crypto_des_ede3_cbc(void);
-const EVP_CIPHER *EVP_dev_crypto_rc4(void);
-const EVP_MD *EVP_dev_crypto_md5(void);
-# endif
-#endif
-#endif
-#ifndef OPENSSL_NO_RC4
-const EVP_CIPHER *EVP_rc4(void);
-const EVP_CIPHER *EVP_rc4_40(void);
-#endif
-#ifndef OPENSSL_NO_IDEA
-const EVP_CIPHER *EVP_idea_ecb(void);
-const EVP_CIPHER *EVP_idea_cfb64(void);
-# define EVP_idea_cfb EVP_idea_cfb64
-const EVP_CIPHER *EVP_idea_ofb(void);
-const EVP_CIPHER *EVP_idea_cbc(void);
-#endif
-#ifndef OPENSSL_NO_RC2
-const EVP_CIPHER *EVP_rc2_ecb(void);
-const EVP_CIPHER *EVP_rc2_cbc(void);
-const EVP_CIPHER *EVP_rc2_40_cbc(void);
-const EVP_CIPHER *EVP_rc2_64_cbc(void);
-const EVP_CIPHER *EVP_rc2_cfb64(void);
-# define EVP_rc2_cfb EVP_rc2_cfb64
-const EVP_CIPHER *EVP_rc2_ofb(void);
-#endif
-#ifndef OPENSSL_NO_BF
-const EVP_CIPHER *EVP_bf_ecb(void);
-const EVP_CIPHER *EVP_bf_cbc(void);
-const EVP_CIPHER *EVP_bf_cfb64(void);
-# define EVP_bf_cfb EVP_bf_cfb64
-const EVP_CIPHER *EVP_bf_ofb(void);
-#endif
-#ifndef OPENSSL_NO_CAST
-const EVP_CIPHER *EVP_cast5_ecb(void);
-const EVP_CIPHER *EVP_cast5_cbc(void);
-const EVP_CIPHER *EVP_cast5_cfb64(void);
-# define EVP_cast5_cfb EVP_cast5_cfb64
-const EVP_CIPHER *EVP_cast5_ofb(void);
-#endif
-#ifndef OPENSSL_NO_RC5
-const EVP_CIPHER *EVP_rc5_32_12_16_cbc(void);
-const EVP_CIPHER *EVP_rc5_32_12_16_ecb(void);
-const EVP_CIPHER *EVP_rc5_32_12_16_cfb64(void);
-# define EVP_rc5_32_12_16_cfb EVP_rc5_32_12_16_cfb64
-const EVP_CIPHER *EVP_rc5_32_12_16_ofb(void);
-#endif
-#ifndef OPENSSL_NO_AES
-const EVP_CIPHER *EVP_aes_128_ecb(void);
-const EVP_CIPHER *EVP_aes_128_cbc(void);
-const EVP_CIPHER *EVP_aes_128_cfb1(void);
-const EVP_CIPHER *EVP_aes_128_cfb8(void);
-const EVP_CIPHER *EVP_aes_128_cfb128(void);
-# define EVP_aes_128_cfb EVP_aes_128_cfb128
-const EVP_CIPHER *EVP_aes_128_ofb(void);
-#if 0
-const EVP_CIPHER *EVP_aes_128_ctr(void);
-#endif
-const EVP_CIPHER *EVP_aes_192_ecb(void);
-const EVP_CIPHER *EVP_aes_192_cbc(void);
-const EVP_CIPHER *EVP_aes_192_cfb1(void);
-const EVP_CIPHER *EVP_aes_192_cfb8(void);
-const EVP_CIPHER *EVP_aes_192_cfb128(void);
-# define EVP_aes_192_cfb EVP_aes_192_cfb128
-const EVP_CIPHER *EVP_aes_192_ofb(void);
-#if 0
-const EVP_CIPHER *EVP_aes_192_ctr(void);
-#endif
-const EVP_CIPHER *EVP_aes_256_ecb(void);
-const EVP_CIPHER *EVP_aes_256_cbc(void);
-const EVP_CIPHER *EVP_aes_256_cfb1(void);
-const EVP_CIPHER *EVP_aes_256_cfb8(void);
-const EVP_CIPHER *EVP_aes_256_cfb128(void);
-# define EVP_aes_256_cfb EVP_aes_256_cfb128
-const EVP_CIPHER *EVP_aes_256_ofb(void);
-#if 0
-const EVP_CIPHER *EVP_aes_256_ctr(void);
-#endif
-#endif
-#ifndef OPENSSL_NO_CAMELLIA
-const EVP_CIPHER *EVP_camellia_128_ecb(void);
-const EVP_CIPHER *EVP_camellia_128_cbc(void);
-const EVP_CIPHER *EVP_camellia_128_cfb1(void);
-const EVP_CIPHER *EVP_camellia_128_cfb8(void);
-const EVP_CIPHER *EVP_camellia_128_cfb128(void);
-# define EVP_camellia_128_cfb EVP_camellia_128_cfb128
-const EVP_CIPHER *EVP_camellia_128_ofb(void);
-const EVP_CIPHER *EVP_camellia_192_ecb(void);
-const EVP_CIPHER *EVP_camellia_192_cbc(void);
-const EVP_CIPHER *EVP_camellia_192_cfb1(void);
-const EVP_CIPHER *EVP_camellia_192_cfb8(void);
-const EVP_CIPHER *EVP_camellia_192_cfb128(void);
-# define EVP_camellia_192_cfb EVP_camellia_192_cfb128
-const EVP_CIPHER *EVP_camellia_192_ofb(void);
-const EVP_CIPHER *EVP_camellia_256_ecb(void);
-const EVP_CIPHER *EVP_camellia_256_cbc(void);
-const EVP_CIPHER *EVP_camellia_256_cfb1(void);
-const EVP_CIPHER *EVP_camellia_256_cfb8(void);
-const EVP_CIPHER *EVP_camellia_256_cfb128(void);
-# define EVP_camellia_256_cfb EVP_camellia_256_cfb128
-const EVP_CIPHER *EVP_camellia_256_ofb(void);
-#endif
-
-#ifndef OPENSSL_NO_SEED
-const EVP_CIPHER *EVP_seed_ecb(void);
-const EVP_CIPHER *EVP_seed_cbc(void);
-const EVP_CIPHER *EVP_seed_cfb128(void);
-# define EVP_seed_cfb EVP_seed_cfb128
-const EVP_CIPHER *EVP_seed_ofb(void);
-#endif
-
-void OPENSSL_add_all_algorithms_noconf(void);
-void OPENSSL_add_all_algorithms_conf(void);
-
-#ifdef OPENSSL_LOAD_CONF
-#define OpenSSL_add_all_algorithms() \
-		OPENSSL_add_all_algorithms_conf()
-#else
-#define OpenSSL_add_all_algorithms() \
-		OPENSSL_add_all_algorithms_noconf()
-#endif
-
-void OpenSSL_add_all_ciphers(void);
-void OpenSSL_add_all_digests(void);
-#define SSLeay_add_all_algorithms() OpenSSL_add_all_algorithms()
-#define SSLeay_add_all_ciphers() OpenSSL_add_all_ciphers()
-#define SSLeay_add_all_digests() OpenSSL_add_all_digests()
-
-int EVP_add_cipher(const EVP_CIPHER *cipher);
-int EVP_add_digest(const EVP_MD *digest);
-
-const EVP_CIPHER *EVP_get_cipherbyname(const char *name);
-const EVP_MD *EVP_get_digestbyname(const char *name);
-void EVP_cleanup(void);
-
-void EVP_CIPHER_do_all(void (*fn)(const EVP_CIPHER *ciph,
-		const char *from, const char *to, void *x), void *arg);
-void EVP_CIPHER_do_all_sorted(void (*fn)(const EVP_CIPHER *ciph,
-		const char *from, const char *to, void *x), void *arg);
-
-void EVP_MD_do_all(void (*fn)(const EVP_MD *ciph,
-		const char *from, const char *to, void *x), void *arg);
-void EVP_MD_do_all_sorted(void (*fn)(const EVP_MD *ciph,
-		const char *from, const char *to, void *x), void *arg);
-
-int		EVP_PKEY_decrypt_old(unsigned char *dec_key,
-			const unsigned char *enc_key,int enc_key_len,
-			EVP_PKEY *private_key);
-int		EVP_PKEY_encrypt_old(unsigned char *enc_key,
-			const unsigned char *key,int key_len,
-			EVP_PKEY *pub_key);
-int		EVP_PKEY_type(int type);
-int		EVP_PKEY_id(const EVP_PKEY *pkey);
-int		EVP_PKEY_base_id(const EVP_PKEY *pkey);
-int		EVP_PKEY_bits(EVP_PKEY *pkey);
-int		EVP_PKEY_size(EVP_PKEY *pkey);
-int 		EVP_PKEY_set_type(EVP_PKEY *pkey,int type);
-int		EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len);
-int 		EVP_PKEY_assign(EVP_PKEY *pkey,int type,void *key);
-void *		EVP_PKEY_get0(EVP_PKEY *pkey);
-
-#ifndef OPENSSL_NO_RSA
-struct rsa_st;
-int EVP_PKEY_set1_RSA(EVP_PKEY *pkey,struct rsa_st *key);
-struct rsa_st *EVP_PKEY_get1_RSA(EVP_PKEY *pkey);
-#endif
-#ifndef OPENSSL_NO_DSA
-struct dsa_st;
-int EVP_PKEY_set1_DSA(EVP_PKEY *pkey,struct dsa_st *key);
-struct dsa_st *EVP_PKEY_get1_DSA(EVP_PKEY *pkey);
-#endif
-#ifndef OPENSSL_NO_DH
-struct dh_st;
-int EVP_PKEY_set1_DH(EVP_PKEY *pkey,struct dh_st *key);
-struct dh_st *EVP_PKEY_get1_DH(EVP_PKEY *pkey);
-#endif
-#ifndef OPENSSL_NO_EC
-struct ec_key_st;
-int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey,struct ec_key_st *key);
-struct ec_key_st *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey);
-#endif
-
-EVP_PKEY *	EVP_PKEY_new(void);
-void		EVP_PKEY_free(EVP_PKEY *pkey);
-
-EVP_PKEY *	d2i_PublicKey(int type,EVP_PKEY **a, const unsigned char **pp,
-			long length);
-int		i2d_PublicKey(EVP_PKEY *a, unsigned char **pp);
-
-EVP_PKEY *	d2i_PrivateKey(int type,EVP_PKEY **a, const unsigned char **pp,
-			long length);
-EVP_PKEY *	d2i_AutoPrivateKey(EVP_PKEY **a, const unsigned char **pp,
-			long length);
-int		i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp);
-
-int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from);
-int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey);
-int EVP_PKEY_save_parameters(EVP_PKEY *pkey,int mode);
-int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b);
-
-int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b);
-
-int EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey,
-				int indent, ASN1_PCTX *pctx);
-int EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey,
-				int indent, ASN1_PCTX *pctx);
-int EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey,
-				int indent, ASN1_PCTX *pctx);
-
-int EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid);
-
-int EVP_CIPHER_type(const EVP_CIPHER *ctx);
-
-/* calls methods */
-int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
-int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
-
-/* These are used by EVP_CIPHER methods */
-int EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *c,ASN1_TYPE *type);
-int EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *c,ASN1_TYPE *type);
-
-/* PKCS5 password based encryption */
-int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
-			 ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md,
-			 int en_de);
-int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen,
-			   const unsigned char *salt, int saltlen, int iter,
-			   int keylen, unsigned char *out);
-int PKCS5_PBKDF2_HMAC(const char *pass, int passlen,
-			   const unsigned char *salt, int saltlen, int iter,
-			   const EVP_MD *digest,
-		      int keylen, unsigned char *out);
-int PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
-			 ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md,
-			 int en_de);
-
-void PKCS5_PBE_add(void);
-
-int EVP_PBE_CipherInit (ASN1_OBJECT *pbe_obj, const char *pass, int passlen,
-	     ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de);
-
-/* PBE type */
-
-/* Can appear as the outermost AlgorithmIdentifier */
-#define EVP_PBE_TYPE_OUTER	0x0
-/* Is an PRF type OID */
-#define EVP_PBE_TYPE_PRF	0x1
-
-int EVP_PBE_alg_add_type(int pbe_type, int pbe_nid, int cipher_nid, int md_nid,
-	     EVP_PBE_KEYGEN *keygen);
-int EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md,
-		    EVP_PBE_KEYGEN *keygen);
-int EVP_PBE_find(int type, int pbe_nid,
-			int *pcnid, int *pmnid, EVP_PBE_KEYGEN **pkeygen);
-void EVP_PBE_cleanup(void);
-
-#define ASN1_PKEY_ALIAS		0x1
-#define ASN1_PKEY_DYNAMIC	0x2
-#define ASN1_PKEY_SIGPARAM_NULL	0x4
-
-#define ASN1_PKEY_CTRL_PKCS7_SIGN	0x1
-#define ASN1_PKEY_CTRL_PKCS7_ENCRYPT	0x2
-#define ASN1_PKEY_CTRL_DEFAULT_MD_NID	0x3
-#define ASN1_PKEY_CTRL_CMS_SIGN		0x5
-#define ASN1_PKEY_CTRL_CMS_ENVELOPE	0x7
-
-int EVP_PKEY_asn1_get_count(void);
-const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_get0(int idx);
-const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find(ENGINE **pe, int type);
-const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find_str(ENGINE **pe,
-					const char *str, int len);
-int EVP_PKEY_asn1_add0(const EVP_PKEY_ASN1_METHOD *ameth);
-int EVP_PKEY_asn1_add_alias(int to, int from);
-int EVP_PKEY_asn1_get0_info(int *ppkey_id, int *pkey_base_id, int *ppkey_flags,
-				const char **pinfo, const char **ppem_str,
-					const EVP_PKEY_ASN1_METHOD *ameth);
-
-const EVP_PKEY_ASN1_METHOD* EVP_PKEY_get0_asn1(EVP_PKEY *pkey);
-EVP_PKEY_ASN1_METHOD* EVP_PKEY_asn1_new(int id, int flags,
-					const char *pem_str, const char *info);
-void EVP_PKEY_asn1_copy(EVP_PKEY_ASN1_METHOD *dst, 
-			const EVP_PKEY_ASN1_METHOD *src);
-void EVP_PKEY_asn1_free(EVP_PKEY_ASN1_METHOD *ameth);
-void EVP_PKEY_asn1_set_public(EVP_PKEY_ASN1_METHOD *ameth,
-		int (*pub_decode)(EVP_PKEY *pk, X509_PUBKEY *pub),
-		int (*pub_encode)(X509_PUBKEY *pub, const EVP_PKEY *pk),
-		int (*pub_cmp)(const EVP_PKEY *a, const EVP_PKEY *b),
-		int (*pub_print)(BIO *out, const EVP_PKEY *pkey, int indent,
-							ASN1_PCTX *pctx),
-		int (*pkey_size)(const EVP_PKEY *pk),
-		int (*pkey_bits)(const EVP_PKEY *pk));
-void EVP_PKEY_asn1_set_private(EVP_PKEY_ASN1_METHOD *ameth,
-		int (*priv_decode)(EVP_PKEY *pk, PKCS8_PRIV_KEY_INFO *p8inf),
-		int (*priv_encode)(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pk),
-		int (*priv_print)(BIO *out, const EVP_PKEY *pkey, int indent,
-							ASN1_PCTX *pctx));
-void EVP_PKEY_asn1_set_param(EVP_PKEY_ASN1_METHOD *ameth,
-		int (*param_decode)(EVP_PKEY *pkey,
-				const unsigned char **pder, int derlen),
-		int (*param_encode)(const EVP_PKEY *pkey, unsigned char **pder),
-		int (*param_missing)(const EVP_PKEY *pk),
-		int (*param_copy)(EVP_PKEY *to, const EVP_PKEY *from),
-		int (*param_cmp)(const EVP_PKEY *a, const EVP_PKEY *b),
-		int (*param_print)(BIO *out, const EVP_PKEY *pkey, int indent,
-							ASN1_PCTX *pctx));
-
-void EVP_PKEY_asn1_set_free(EVP_PKEY_ASN1_METHOD *ameth,
-		void (*pkey_free)(EVP_PKEY *pkey));
-void EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth,
-		int (*pkey_ctrl)(EVP_PKEY *pkey, int op,
-							long arg1, void *arg2));
-
-
-#define EVP_PKEY_OP_UNDEFINED		0
-#define EVP_PKEY_OP_PARAMGEN		(1<<1)
-#define EVP_PKEY_OP_KEYGEN		(1<<2)
-#define EVP_PKEY_OP_SIGN		(1<<3)
-#define EVP_PKEY_OP_VERIFY		(1<<4)
-#define EVP_PKEY_OP_VERIFYRECOVER	(1<<5)
-#define EVP_PKEY_OP_SIGNCTX		(1<<6)
-#define EVP_PKEY_OP_VERIFYCTX		(1<<7)
-#define EVP_PKEY_OP_ENCRYPT		(1<<8)
-#define EVP_PKEY_OP_DECRYPT		(1<<9)
-#define EVP_PKEY_OP_DERIVE		(1<<10)
-
-#define EVP_PKEY_OP_TYPE_SIG	\
-	(EVP_PKEY_OP_SIGN | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYRECOVER \
-		| EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
-
-#define EVP_PKEY_OP_TYPE_CRYPT \
-	(EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
-
-#define EVP_PKEY_OP_TYPE_NOGEN \
-	(EVP_PKEY_OP_SIG | EVP_PKEY_OP_CRYPT | EVP_PKEY_OP_DERIVE)
-
-#define EVP_PKEY_OP_TYPE_GEN \
-		(EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
-
-#define	 EVP_PKEY_CTX_set_signature_md(ctx, md)	\
-		EVP_PKEY_CTX_ctrl(ctx, -1, EVP_PKEY_OP_TYPE_SIG,  \
-					EVP_PKEY_CTRL_MD, 0, (void *)md)
-
-#define EVP_PKEY_CTRL_MD		1
-#define EVP_PKEY_CTRL_PEER_KEY		2
-
-#define EVP_PKEY_CTRL_PKCS7_ENCRYPT	3
-#define EVP_PKEY_CTRL_PKCS7_DECRYPT	4
-
-#define EVP_PKEY_CTRL_PKCS7_SIGN	5
-
-#define EVP_PKEY_CTRL_SET_MAC_KEY	6
-
-#define EVP_PKEY_CTRL_DIGESTINIT	7
-
-/* Used by GOST key encryption in TLS */
-#define EVP_PKEY_CTRL_SET_IV 		8
-
-#define EVP_PKEY_CTRL_CMS_ENCRYPT	9
-#define EVP_PKEY_CTRL_CMS_DECRYPT	10
-#define EVP_PKEY_CTRL_CMS_SIGN		11
-
-#define EVP_PKEY_ALG_CTRL		0x1000
-
-
-#define EVP_PKEY_FLAG_AUTOARGLEN	2
-
-const EVP_PKEY_METHOD *EVP_PKEY_meth_find(int type);
-EVP_PKEY_METHOD* EVP_PKEY_meth_new(int id, int flags);
-void EVP_PKEY_meth_free(EVP_PKEY_METHOD *pmeth);
-int EVP_PKEY_meth_add0(const EVP_PKEY_METHOD *pmeth);
-
-EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e);
-EVP_PKEY_CTX *EVP_PKEY_CTX_new_id(int id, ENGINE *e);
-EVP_PKEY_CTX *EVP_PKEY_CTX_dup(EVP_PKEY_CTX *ctx);
-void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx);
-
-int EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype,
-				int cmd, int p1, void *p2);
-int EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx, const char *type,
-						const char *value);
-
-int EVP_PKEY_CTX_get_operation(EVP_PKEY_CTX *ctx);
-void EVP_PKEY_CTX_set0_keygen_info(EVP_PKEY_CTX *ctx, int *dat, int datlen);
-
-EVP_PKEY *EVP_PKEY_new_mac_key(int type, ENGINE *e,
-				unsigned char *key, int keylen);
-
-void EVP_PKEY_CTX_set_data(EVP_PKEY_CTX *ctx, void *data);
-void *EVP_PKEY_CTX_get_data(EVP_PKEY_CTX *ctx);
-EVP_PKEY *EVP_PKEY_CTX_get0_pkey(EVP_PKEY_CTX *ctx);
-
-EVP_PKEY *EVP_PKEY_CTX_get0_peerkey(EVP_PKEY_CTX *ctx);
-
-void EVP_PKEY_CTX_set_app_data(EVP_PKEY_CTX *ctx, void *data);
-void *EVP_PKEY_CTX_get_app_data(EVP_PKEY_CTX *ctx);
-
-int EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx);
-int EVP_PKEY_sign(EVP_PKEY_CTX *ctx,
-			unsigned char *sig, size_t *siglen,
-			const unsigned char *tbs, size_t tbslen);
-int EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx);
-int EVP_PKEY_verify(EVP_PKEY_CTX *ctx,
-			const unsigned char *sig, size_t siglen,
-			const unsigned char *tbs, size_t tbslen);
-int EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx);
-int EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx,
-			unsigned char *rout, size_t *routlen,
-			const unsigned char *sig, size_t siglen);
-int EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx);
-int EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx,
-			unsigned char *out, size_t *outlen,
-			const unsigned char *in, size_t inlen);
-int EVP_PKEY_decrypt_init(EVP_PKEY_CTX *ctx);
-int EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx,
-			unsigned char *out, size_t *outlen,
-			const unsigned char *in, size_t inlen);
-
-int EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx);
-int EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer);
-int EVP_PKEY_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen);
-
-typedef int EVP_PKEY_gen_cb(EVP_PKEY_CTX *ctx);
-
-int EVP_PKEY_paramgen_init(EVP_PKEY_CTX *ctx);
-int EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
-int EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx);
-int EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
-
-void EVP_PKEY_CTX_set_cb(EVP_PKEY_CTX *ctx, EVP_PKEY_gen_cb *cb);
-EVP_PKEY_gen_cb *EVP_PKEY_CTX_get_cb(EVP_PKEY_CTX *ctx);
-
-int EVP_PKEY_CTX_get_keygen_info(EVP_PKEY_CTX *ctx, int idx);
-
-void EVP_PKEY_meth_set_init(EVP_PKEY_METHOD *pmeth,
-	int (*init)(EVP_PKEY_CTX *ctx));
-
-void EVP_PKEY_meth_set_copy(EVP_PKEY_METHOD *pmeth,
-	int (*copy)(EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src));
-
-void EVP_PKEY_meth_set_cleanup(EVP_PKEY_METHOD *pmeth,
-	void (*cleanup)(EVP_PKEY_CTX *ctx));
-
-void EVP_PKEY_meth_set_paramgen(EVP_PKEY_METHOD *pmeth,
-	int (*paramgen_init)(EVP_PKEY_CTX *ctx),
-	int (*paramgen)(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey));
-
-void EVP_PKEY_meth_set_keygen(EVP_PKEY_METHOD *pmeth,
-	int (*keygen_init)(EVP_PKEY_CTX *ctx),
-	int (*keygen)(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey));
-
-void EVP_PKEY_meth_set_sign(EVP_PKEY_METHOD *pmeth,
-	int (*sign_init)(EVP_PKEY_CTX *ctx),
-	int (*sign)(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen,
-					const unsigned char *tbs, size_t tbslen));
-
-void EVP_PKEY_meth_set_verify(EVP_PKEY_METHOD *pmeth,
-	int (*verify_init)(EVP_PKEY_CTX *ctx),
-	int (*verify)(EVP_PKEY_CTX *ctx, const unsigned char *sig, size_t siglen,
-					const unsigned char *tbs, size_t tbslen));
-
-void EVP_PKEY_meth_set_verify_recover(EVP_PKEY_METHOD *pmeth,
-	int (*verify_recover_init)(EVP_PKEY_CTX *ctx),
-	int (*verify_recover)(EVP_PKEY_CTX *ctx,
-					unsigned char *sig, size_t *siglen,
-					const unsigned char *tbs, size_t tbslen));
-
-void EVP_PKEY_meth_set_signctx(EVP_PKEY_METHOD *pmeth,
-	int (*signctx_init)(EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx),
-	int (*signctx)(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen,
-					EVP_MD_CTX *mctx));
-
-void EVP_PKEY_meth_set_verifyctx(EVP_PKEY_METHOD *pmeth,
-	int (*verifyctx_init)(EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx),
-	int (*verifyctx)(EVP_PKEY_CTX *ctx, const unsigned char *sig,int siglen,
-					EVP_MD_CTX *mctx));
-
-void EVP_PKEY_meth_set_encrypt(EVP_PKEY_METHOD *pmeth,
-	int (*encrypt_init)(EVP_PKEY_CTX *ctx),
-	int (*encryptfn)(EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen,
-					const unsigned char *in, size_t inlen));
-
-void EVP_PKEY_meth_set_decrypt(EVP_PKEY_METHOD *pmeth,
-	int (*decrypt_init)(EVP_PKEY_CTX *ctx),
-	int (*decrypt)(EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen,
-					const unsigned char *in, size_t inlen));
-
-void EVP_PKEY_meth_set_derive(EVP_PKEY_METHOD *pmeth,
-	int (*derive_init)(EVP_PKEY_CTX *ctx),
-	int (*derive)(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen));
-
-void EVP_PKEY_meth_set_ctrl(EVP_PKEY_METHOD *pmeth,
-	int (*ctrl)(EVP_PKEY_CTX *ctx, int type, int p1, void *p2),
-	int (*ctrl_str)(EVP_PKEY_CTX *ctx,
-					const char *type, const char *value));
-
-/* BEGIN ERROR CODES */
-/* The following lines are auto generated by the script mkerr.pl. Any changes
- * made after this point may be overwritten when the script is next run.
- */
-void ERR_load_EVP_strings(void);
-
-/* Error codes for the EVP functions. */
-
-/* Function codes. */
-#define EVP_F_AES_INIT_KEY				 133
-#define EVP_F_CAMELLIA_INIT_KEY				 159
-#define EVP_F_D2I_PKEY					 100
-#define EVP_F_DO_SIGVER_INIT				 161
-#define EVP_F_DSAPKEY2PKCS8				 134
-#define EVP_F_DSA_PKEY2PKCS8				 135
-#define EVP_F_ECDSA_PKEY2PKCS8				 129
-#define EVP_F_ECKEY_PKEY2PKCS8				 132
-#define EVP_F_EVP_CIPHERINIT_EX				 123
-#define EVP_F_EVP_CIPHER_CTX_COPY			 163
-#define EVP_F_EVP_CIPHER_CTX_CTRL			 124
-#define EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH		 122
-#define EVP_F_EVP_DECRYPTFINAL_EX			 101
-#define EVP_F_EVP_DIGESTINIT_EX				 128
-#define EVP_F_EVP_ENCRYPTFINAL_EX			 127
-#define EVP_F_EVP_MD_CTX_COPY_EX			 110
-#define EVP_F_EVP_MD_SIZE				 162
-#define EVP_F_EVP_OPENINIT				 102
-#define EVP_F_EVP_PBE_ALG_ADD				 115
-#define EVP_F_EVP_PBE_ALG_ADD_TYPE			 160
-#define EVP_F_EVP_PBE_CIPHERINIT			 116
-#define EVP_F_EVP_PKCS82PKEY				 111
-#define EVP_F_EVP_PKCS82PKEY_BROKEN			 136
-#define EVP_F_EVP_PKEY2PKCS8_BROKEN			 113
-#define EVP_F_EVP_PKEY_COPY_PARAMETERS			 103
-#define EVP_F_EVP_PKEY_CTX_CTRL				 137
-#define EVP_F_EVP_PKEY_CTX_CTRL_STR			 150
-#define EVP_F_EVP_PKEY_CTX_DUP				 156
-#define EVP_F_EVP_PKEY_DECRYPT				 104
-#define EVP_F_EVP_PKEY_DECRYPT_INIT			 138
-#define EVP_F_EVP_PKEY_DECRYPT_OLD			 151
-#define EVP_F_EVP_PKEY_DERIVE				 153
-#define EVP_F_EVP_PKEY_DERIVE_INIT			 154
-#define EVP_F_EVP_PKEY_DERIVE_SET_PEER			 155
-#define EVP_F_EVP_PKEY_ENCRYPT				 105
-#define EVP_F_EVP_PKEY_ENCRYPT_INIT			 139
-#define EVP_F_EVP_PKEY_ENCRYPT_OLD			 152
-#define EVP_F_EVP_PKEY_GET1_DH				 119
-#define EVP_F_EVP_PKEY_GET1_DSA				 120
-#define EVP_F_EVP_PKEY_GET1_ECDSA			 130
-#define EVP_F_EVP_PKEY_GET1_EC_KEY			 131
-#define EVP_F_EVP_PKEY_GET1_RSA				 121
-#define EVP_F_EVP_PKEY_KEYGEN				 146
-#define EVP_F_EVP_PKEY_KEYGEN_INIT			 147
-#define EVP_F_EVP_PKEY_NEW				 106
-#define EVP_F_EVP_PKEY_PARAMGEN				 148
-#define EVP_F_EVP_PKEY_PARAMGEN_INIT			 149
-#define EVP_F_EVP_PKEY_SIGN				 140
-#define EVP_F_EVP_PKEY_SIGN_INIT			 141
-#define EVP_F_EVP_PKEY_VERIFY				 142
-#define EVP_F_EVP_PKEY_VERIFY_INIT			 143
-#define EVP_F_EVP_PKEY_VERIFY_RECOVER			 144
-#define EVP_F_EVP_PKEY_VERIFY_RECOVER_INIT		 145
-#define EVP_F_EVP_RIJNDAEL				 126
-#define EVP_F_EVP_SIGNFINAL				 107
-#define EVP_F_EVP_VERIFYFINAL				 108
-#define EVP_F_INT_CTX_NEW				 157
-#define EVP_F_PKCS5_PBE_KEYIVGEN			 117
-#define EVP_F_PKCS5_V2_PBE_KEYIVGEN			 118
-#define EVP_F_PKCS8_SET_BROKEN				 112
-#define EVP_F_PKEY_SET_TYPE				 158
-#define EVP_F_RC2_MAGIC_TO_METH				 109
-#define EVP_F_RC5_CTRL					 125
-
-/* Reason codes. */
-#define EVP_R_AES_KEY_SETUP_FAILED			 143
-#define EVP_R_ASN1_LIB					 140
-#define EVP_R_BAD_BLOCK_LENGTH				 136
-#define EVP_R_BAD_DECRYPT				 100
-#define EVP_R_BAD_KEY_LENGTH				 137
-#define EVP_R_BN_DECODE_ERROR				 112
-#define EVP_R_BN_PUBKEY_ERROR				 113
-#define EVP_R_BUFFER_TOO_SMALL				 155
-#define EVP_R_CAMELLIA_KEY_SETUP_FAILED			 157
-#define EVP_R_CIPHER_PARAMETER_ERROR			 122
-#define EVP_R_COMMAND_NOT_SUPPORTED			 147
-#define EVP_R_CTRL_NOT_IMPLEMENTED			 132
-#define EVP_R_CTRL_OPERATION_NOT_IMPLEMENTED		 133
-#define EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH		 138
-#define EVP_R_DECODE_ERROR				 114
-#define EVP_R_DIFFERENT_KEY_TYPES			 101
-#define EVP_R_DIFFERENT_PARAMETERS			 153
-#define EVP_R_ENCODE_ERROR				 115
-#define EVP_R_EVP_PBE_CIPHERINIT_ERROR			 119
-#define EVP_R_EXPECTING_AN_RSA_KEY			 127
-#define EVP_R_EXPECTING_A_DH_KEY			 128
-#define EVP_R_EXPECTING_A_DSA_KEY			 129
-#define EVP_R_EXPECTING_A_ECDSA_KEY			 141
-#define EVP_R_EXPECTING_A_EC_KEY			 142
-#define EVP_R_INITIALIZATION_ERROR			 134
-#define EVP_R_INPUT_NOT_INITIALIZED			 111
-#define EVP_R_INVALID_DIGEST				 152
-#define EVP_R_INVALID_KEY_LENGTH			 130
-#define EVP_R_INVALID_OPERATION				 148
-#define EVP_R_IV_TOO_LARGE				 102
-#define EVP_R_KEYGEN_FAILURE				 120
-#define EVP_R_MESSAGE_DIGEST_IS_NULL			 159
-#define EVP_R_METHOD_NOT_SUPPORTED			 144
-#define EVP_R_MISSING_PARAMETERS			 103
-#define EVP_R_NO_CIPHER_SET				 131
-#define EVP_R_NO_DEFAULT_DIGEST				 158
-#define EVP_R_NO_DIGEST_SET				 139
-#define EVP_R_NO_DSA_PARAMETERS				 116
-#define EVP_R_NO_KEY_SET				 154
-#define EVP_R_NO_OPERATION_SET				 149
-#define EVP_R_NO_SIGN_FUNCTION_CONFIGURED		 104
-#define EVP_R_NO_VERIFY_FUNCTION_CONFIGURED		 105
-#define EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE	 150
-#define EVP_R_OPERATON_NOT_INITIALIZED			 151
-#define EVP_R_PKCS8_UNKNOWN_BROKEN_TYPE			 117
-#define EVP_R_PRIVATE_KEY_DECODE_ERROR			 145
-#define EVP_R_PRIVATE_KEY_ENCODE_ERROR			 146
-#define EVP_R_PUBLIC_KEY_NOT_RSA			 106
-#define EVP_R_UNKNOWN_CIPHER				 160
-#define EVP_R_UNKNOWN_DIGEST				 161
-#define EVP_R_UNKNOWN_PBE_ALGORITHM			 121
-#define EVP_R_UNSUPORTED_NUMBER_OF_ROUNDS		 135
-#define EVP_R_UNSUPPORTED_ALGORITHM			 156
-#define EVP_R_UNSUPPORTED_CIPHER			 107
-#define EVP_R_UNSUPPORTED_KEYLENGTH			 123
-#define EVP_R_UNSUPPORTED_KEY_DERIVATION_FUNCTION	 124
-#define EVP_R_UNSUPPORTED_KEY_SIZE			 108
-#define EVP_R_UNSUPPORTED_PRF				 125
-#define EVP_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM		 118
-#define EVP_R_UNSUPPORTED_SALT_TYPE			 126
-#define EVP_R_WRONG_FINAL_BLOCK_LENGTH			 109
-#define EVP_R_WRONG_PUBLIC_KEY_TYPE			 110
-
-#ifdef  __cplusplus
-}
-#endif
-#endif
diff --git a/extra_lib/include/openssl/hmac.h b/extra_lib/include/openssl/hmac.h
deleted file mode 100644
index 1be0022..0000000
--- a/extra_lib/include/openssl/hmac.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/* crypto/hmac/hmac.h */
-/* Copyright (C) 1995-1998 Eric Young (eay at cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay at cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh at cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay at cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh at cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-#ifndef HEADER_HMAC_H
-#define HEADER_HMAC_H
-
-#include <openssl/opensslconf.h>
-
-#ifdef OPENSSL_NO_HMAC
-#error HMAC is disabled.
-#endif
-
-#include <openssl/evp.h>
-
-#define HMAC_MAX_MD_CBLOCK	128	/* largest known is SHA512 */
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-typedef struct hmac_ctx_st
-	{
-	const EVP_MD *md;
-	EVP_MD_CTX md_ctx;
-	EVP_MD_CTX i_ctx;
-	EVP_MD_CTX o_ctx;
-	unsigned int key_length;
-	unsigned char key[HMAC_MAX_MD_CBLOCK];
-	} HMAC_CTX;
-
-#define HMAC_size(e)	(EVP_MD_size((e)->md))
-
-
-void HMAC_CTX_init(HMAC_CTX *ctx);
-void HMAC_CTX_cleanup(HMAC_CTX *ctx);
-
-#define HMAC_cleanup(ctx) HMAC_CTX_cleanup(ctx) /* deprecated */
-
-int HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
-	       const EVP_MD *md); /* deprecated */
-int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
-		  const EVP_MD *md, ENGINE *impl);
-int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len);
-int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len);
-unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len,
-		    const unsigned char *d, size_t n, unsigned char *md,
-		    unsigned int *md_len);
-int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx);
-
-void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags);
-
-#ifdef  __cplusplus
-}
-#endif
-
-#endif
diff --git a/extra_lib/include/openssl/kssl.h b/extra_lib/include/openssl/kssl.h
deleted file mode 100644
index a3d20e1..0000000
--- a/extra_lib/include/openssl/kssl.h
+++ /dev/null
@@ -1,179 +0,0 @@
-/* ssl/kssl.h -*- mode: C; c-file-style: "eay" -*- */
-/* Written by Vern Staats <staatsvr at asc.hpc.mil> for the OpenSSL project 2000.
- * project 2000.
- */
-/* ====================================================================
- * Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. 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.
- *
- * 3. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
- *
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
- *    endorse or promote products derived from this software without
- *    prior written permission. For written permission, please contact
- *    licensing at OpenSSL.org.
- *
- * 5. Products derived from this software may not be called "OpenSSL"
- *    nor may "OpenSSL" appear in their names without prior written
- *    permission of the OpenSSL Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- *    acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
- *
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
- * EXPRESSED 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 OpenSSL PROJECT OR
- * ITS 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.
- * ====================================================================
- *
- * This product includes cryptographic software written by Eric Young
- * (eay at cryptsoft.com).  This product includes software written by Tim
- * Hudson (tjh at cryptsoft.com).
- *
- */
-
-/*
-**	19990701	VRS 	Started.
-*/
-
-#ifndef	KSSL_H
-#define	KSSL_H
-
-#include <openssl/opensslconf.h>
-
-#ifndef OPENSSL_NO_KRB5
-
-#include <stdio.h>
-#include <ctype.h>
-#include <krb5.h>
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-/*
-**	Depending on which KRB5 implementation used, some types from
-**	the other may be missing.  Resolve that here and now
-*/
-#ifdef KRB5_HEIMDAL
-typedef unsigned char krb5_octet;
-#define FAR
-#else
-
-#ifndef FAR
-#define FAR
-#endif
-
-#endif
-
-/*	Uncomment this to debug kssl problems or
-**	to trace usage of the Kerberos session key
-**
-**	#define		KSSL_DEBUG
-*/
-
-#ifndef	KRB5SVC
-#define KRB5SVC	"host"
-#endif
-
-#ifndef	KRB5KEYTAB
-#define KRB5KEYTAB	"/etc/krb5.keytab"
-#endif
-
-#ifndef KRB5SENDAUTH
-#define KRB5SENDAUTH	1
-#endif
-
-#ifndef KRB5CHECKAUTH
-#define KRB5CHECKAUTH	1
-#endif
-
-#ifndef KSSL_CLOCKSKEW
-#define	KSSL_CLOCKSKEW	300;
-#endif
-
-#define	KSSL_ERR_MAX	255
-typedef struct kssl_err_st  {
-	int  reason;
-	char text[KSSL_ERR_MAX+1];
-	} KSSL_ERR;
-
-
-/*	Context for passing
-**		(1) Kerberos session key to SSL, and
-**		(2)	Config data between application and SSL lib
-*/
-typedef struct kssl_ctx_st
-        {
-                                /*	used by:    disposition:            */
-	char *service_name;	/*	C,S	    default ok (kssl)       */
-	char *service_host;	/*	C	    input, REQUIRED         */
-	char *client_princ;	/*	S	    output from krb5 ticket */
-	char *keytab_file;	/*      S	    NULL (/etc/krb5.keytab) */
-	char *cred_cache;	/*	C	    NULL (default)          */
-	krb5_enctype enctype;
-	int length;
-	krb5_octet FAR *key;
-	} KSSL_CTX;
-
-#define	KSSL_CLIENT 	1
-#define KSSL_SERVER 	2
-#define	KSSL_SERVICE	3
-#define	KSSL_KEYTAB 	4
-
-#define KSSL_CTX_OK 	0
-#define KSSL_CTX_ERR	1
-#define KSSL_NOMEM	2
-
-/* Public (for use by applications that use OpenSSL with Kerberos 5 support */
-krb5_error_code kssl_ctx_setstring(KSSL_CTX *kssl_ctx, int which, char *text);
-KSSL_CTX *kssl_ctx_new(void);
-KSSL_CTX *kssl_ctx_free(KSSL_CTX *kssl_ctx);
-void kssl_ctx_show(KSSL_CTX *kssl_ctx);
-krb5_error_code kssl_ctx_setprinc(KSSL_CTX *kssl_ctx, int which,
-        krb5_data *realm, krb5_data *entity, int nentities);
-krb5_error_code	kssl_cget_tkt(KSSL_CTX *kssl_ctx,  krb5_data **enc_tktp,
-        krb5_data *authenp, KSSL_ERR *kssl_err);
-krb5_error_code	kssl_sget_tkt(KSSL_CTX *kssl_ctx,  krb5_data *indata,
-        krb5_ticket_times *ttimes, KSSL_ERR *kssl_err);
-krb5_error_code kssl_ctx_setkey(KSSL_CTX *kssl_ctx, krb5_keyblock *session);
-void	kssl_err_set(KSSL_ERR *kssl_err, int reason, char *text);
-void kssl_krb5_free_data_contents(krb5_context context, krb5_data *data);
-krb5_error_code  kssl_build_principal_2(krb5_context context,
-			krb5_principal *princ, int rlen, const char *realm,
-			int slen, const char *svc, int hlen, const char *host);
-krb5_error_code  kssl_validate_times(krb5_timestamp atime,
-					krb5_ticket_times *ttimes);
-krb5_error_code  kssl_check_authent(KSSL_CTX *kssl_ctx, krb5_data *authentp,
-			            krb5_timestamp *atimep, KSSL_ERR *kssl_err);
-unsigned char	*kssl_skip_confound(krb5_enctype enctype, unsigned char *authn);
-
-#ifdef  __cplusplus
-}
-#endif
-#endif	/* OPENSSL_NO_KRB5	*/
-#endif	/* KSSL_H 	*/
diff --git a/extra_lib/include/openssl/lhash.h b/extra_lib/include/openssl/lhash.h
deleted file mode 100644
index e7d8763..0000000
--- a/extra_lib/include/openssl/lhash.h
+++ /dev/null
@@ -1,241 +0,0 @@
-/* crypto/lhash/lhash.h */
-/* Copyright (C) 1995-1998 Eric Young (eay at cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay at cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh at cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay at cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh at cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-/* Header for dynamic hash table routines
- * Author - Eric Young
- */
-
-#ifndef HEADER_LHASH_H
-#define HEADER_LHASH_H
-
-#include <openssl/e_os2.h>
-#ifndef OPENSSL_NO_FP_API
-#include <stdio.h>
-#endif
-
-#ifndef OPENSSL_NO_BIO
-#include <openssl/bio.h>
-#endif
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-typedef struct lhash_node_st
-	{
-	void *data;
-	struct lhash_node_st *next;
-#ifndef OPENSSL_NO_HASH_COMP
-	unsigned long hash;
-#endif
-	} LHASH_NODE;
-
-typedef int (*LHASH_COMP_FN_TYPE)(const void *, const void *);
-typedef unsigned long (*LHASH_HASH_FN_TYPE)(const void *);
-typedef void (*LHASH_DOALL_FN_TYPE)(void *);
-typedef void (*LHASH_DOALL_ARG_FN_TYPE)(void *, void *);
-
-/* Macros for declaring and implementing type-safe wrappers for LHASH callbacks.
- * This way, callbacks can be provided to LHASH structures without function
- * pointer casting and the macro-defined callbacks provide per-variable casting
- * before deferring to the underlying type-specific callbacks. NB: It is
- * possible to place a "static" in front of both the DECLARE and IMPLEMENT
- * macros if the functions are strictly internal. */
-
-/* First: "hash" functions */
-#define DECLARE_LHASH_HASH_FN(name, o_type) \
-	unsigned long name##_LHASH_HASH(const void *);
-#define IMPLEMENT_LHASH_HASH_FN(name, o_type) \
-	unsigned long name##_LHASH_HASH(const void *arg) { \
-		const o_type *a = arg; \
-		return name##_hash(a); }
-#define LHASH_HASH_FN(name) name##_LHASH_HASH
-
-/* Second: "compare" functions */
-#define DECLARE_LHASH_COMP_FN(name, o_type) \
-	int name##_LHASH_COMP(const void *, const void *);
-#define IMPLEMENT_LHASH_COMP_FN(name, o_type) \
-	int name##_LHASH_COMP(const void *arg1, const void *arg2) { \
-		const o_type *a = arg1;		    \
-		const o_type *b = arg2; \
-		return name##_cmp(a,b); }
-#define LHASH_COMP_FN(name) name##_LHASH_COMP
-
-/* Third: "doall" functions */
-#define DECLARE_LHASH_DOALL_FN(name, o_type) \
-	void name##_LHASH_DOALL(void *);
-#define IMPLEMENT_LHASH_DOALL_FN(name, o_type) \
-	void name##_LHASH_DOALL(void *arg) { \
-		o_type *a = arg; \
-		name##_doall(a); }
-#define LHASH_DOALL_FN(name) name##_LHASH_DOALL
-
-/* Fourth: "doall_arg" functions */
-#define DECLARE_LHASH_DOALL_ARG_FN(name, o_type, a_type) \
-	void name##_LHASH_DOALL_ARG(void *, void *);
-#define IMPLEMENT_LHASH_DOALL_ARG_FN(name, o_type, a_type) \
-	void name##_LHASH_DOALL_ARG(void *arg1, void *arg2) { \
-		o_type *a = arg1; \
-		a_type *b = arg2; \
-		name##_doall_arg(a, b); }
-#define LHASH_DOALL_ARG_FN(name) name##_LHASH_DOALL_ARG
-
-typedef struct lhash_st
-	{
-	LHASH_NODE **b;
-	LHASH_COMP_FN_TYPE comp;
-	LHASH_HASH_FN_TYPE hash;
-	unsigned int num_nodes;
-	unsigned int num_alloc_nodes;
-	unsigned int p;
-	unsigned int pmax;
-	unsigned long up_load; /* load times 256 */
-	unsigned long down_load; /* load times 256 */
-	unsigned long num_items;
-
-	unsigned long num_expands;
-	unsigned long num_expand_reallocs;
-	unsigned long num_contracts;
-	unsigned long num_contract_reallocs;
-	unsigned long num_hash_calls;
-	unsigned long num_comp_calls;
-	unsigned long num_insert;
-	unsigned long num_replace;
-	unsigned long num_delete;
-	unsigned long num_no_delete;
-	unsigned long num_retrieve;
-	unsigned long num_retrieve_miss;
-	unsigned long num_hash_comps;
-
-	int error;
-	} _LHASH;	/* Do not use _LHASH directly, use LHASH_OF
-			 * and friends */
-
-#define LH_LOAD_MULT	256
-
-/* Indicates a malloc() error in the last call, this is only bad
- * in lh_insert(). */
-#define lh_error(lh)	((lh)->error)
-
-_LHASH *lh_new(LHASH_HASH_FN_TYPE h, LHASH_COMP_FN_TYPE c);
-void lh_free(_LHASH *lh);
-void *lh_insert(_LHASH *lh, void *data);
-void *lh_delete(_LHASH *lh, const void *data);
-void *lh_retrieve(_LHASH *lh, const void *data);
-void lh_doall(_LHASH *lh, LHASH_DOALL_FN_TYPE func);
-void lh_doall_arg(_LHASH *lh, LHASH_DOALL_ARG_FN_TYPE func, void *arg);
-unsigned long lh_strhash(const char *c);
-unsigned long lh_num_items(const _LHASH *lh);
-
-#ifndef OPENSSL_NO_FP_API
-void lh_stats(const _LHASH *lh, FILE *out);
-void lh_node_stats(const _LHASH *lh, FILE *out);
-void lh_node_usage_stats(const _LHASH *lh, FILE *out);
-#endif
-
-#ifndef OPENSSL_NO_BIO
-void lh_stats_bio(const _LHASH *lh, BIO *out);
-void lh_node_stats_bio(const _LHASH *lh, BIO *out);
-void lh_node_usage_stats_bio(const _LHASH *lh, BIO *out);
-#endif
-
-/* Type checking... */
-
-#define LHASH_OF(type) struct lhash_st_##type
-
-#define DECLARE_LHASH_OF(type) LHASH_OF(type) { int dummy; }
-
-#define CHECKED_LHASH_OF(type,lh) \
-  ((_LHASH *)CHECKED_PTR_OF(LHASH_OF(type),lh))
-
-/* Define wrapper functions. */
-#define LHM_lh_new(type, name) \
-  ((LHASH_OF(type) *)lh_new(LHASH_HASH_FN(name), LHASH_COMP_FN(name)))
-#define LHM_lh_error(type, lh) \
-  lh_error(CHECKED_LHASH_OF(type,lh))
-#define LHM_lh_insert(type, lh, inst) \
-  ((type *)lh_insert(CHECKED_LHASH_OF(type, lh), \
-		     CHECKED_PTR_OF(type, inst)))
-#define LHM_lh_retrieve(type, lh, inst) \
-  ((type *)lh_retrieve(CHECKED_LHASH_OF(type, lh), \
-		       CHECKED_PTR_OF(type, inst)))
-#define LHM_lh_delete(type, lh, inst) \
-  ((type *)lh_delete(CHECKED_LHASH_OF(type, lh),			\
-		     CHECKED_PTR_OF(type, inst)))
-#define LHM_lh_doall(type, lh,fn) lh_doall(CHECKED_LHASH_OF(type, lh), fn)
-#define LHM_lh_doall_arg(type, lh, fn, arg_type, arg) \
-  lh_doall_arg(CHECKED_LHASH_OF(type, lh), fn, CHECKED_PTR_OF(arg_type, arg))
-#define LHM_lh_num_items(type, lh) lh_num_items(CHECKED_LHASH_OF(type, lh))
-#define LHM_lh_down_load(type, lh) (CHECKED_LHASH_OF(type, lh)->down_load)
-#define LHM_lh_node_stats_bio(type, lh, out) \
-  lh_node_stats_bio(CHECKED_LHASH_OF(type, lh), out)
-#define LHM_lh_node_usage_stats_bio(type, lh, out) \
-  lh_node_usage_stats_bio(CHECKED_LHASH_OF(type, lh), out)
-#define LHM_lh_stats_bio(type, lh, out) \
-  lh_stats_bio(CHECKED_LHASH_OF(type, lh), out)
-#define LHM_lh_free(type, lh) lh_free(CHECKED_LHASH_OF(type, lh))
-
-DECLARE_LHASH_OF(OPENSSL_STRING);
-DECLARE_LHASH_OF(OPENSSL_CSTRING);
-
-#ifdef  __cplusplus
-}
-#endif
-
-#endif
-
diff --git a/extra_lib/include/openssl/obj_mac.h b/extra_lib/include/openssl/obj_mac.h
deleted file mode 100644
index 282f11a..0000000
--- a/extra_lib/include/openssl/obj_mac.h
+++ /dev/null
@@ -1,3914 +0,0 @@
-/* crypto/objects/obj_mac.h */
-
-/* THIS FILE IS GENERATED FROM objects.txt by objects.pl via the
- * following command:
- * perl objects.pl objects.txt obj_mac.num obj_mac.h
- */
-
-/* Copyright (C) 1995-1997 Eric Young (eay at cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay at cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh at cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay at cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh at cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#define SN_undef			"UNDEF"
-#define LN_undef			"undefined"
-#define NID_undef			0
-#define OBJ_undef			0L
-
-#define SN_itu_t		"ITU-T"
-#define LN_itu_t		"itu-t"
-#define NID_itu_t		645
-#define OBJ_itu_t		0L
-
-#define NID_ccitt		404
-#define OBJ_ccitt		OBJ_itu_t
-
-#define SN_iso		"ISO"
-#define LN_iso		"iso"
-#define NID_iso		181
-#define OBJ_iso		1L
-
-#define SN_joint_iso_itu_t		"JOINT-ISO-ITU-T"
-#define LN_joint_iso_itu_t		"joint-iso-itu-t"
-#define NID_joint_iso_itu_t		646
-#define OBJ_joint_iso_itu_t		2L
-
-#define NID_joint_iso_ccitt		393
-#define OBJ_joint_iso_ccitt		OBJ_joint_iso_itu_t
-
-#define SN_member_body		"member-body"
-#define LN_member_body		"ISO Member Body"
-#define NID_member_body		182
-#define OBJ_member_body		OBJ_iso,2L
-
-#define SN_identified_organization		"identified-organization"
-#define NID_identified_organization		676
-#define OBJ_identified_organization		OBJ_iso,3L
-
-#define SN_hmac_md5		"HMAC-MD5"
-#define LN_hmac_md5		"hmac-md5"
-#define NID_hmac_md5		780
-#define OBJ_hmac_md5		OBJ_identified_organization,6L,1L,5L,5L,8L,1L,1L
-
-#define SN_hmac_sha1		"HMAC-SHA1"
-#define LN_hmac_sha1		"hmac-sha1"
-#define NID_hmac_sha1		781
-#define OBJ_hmac_sha1		OBJ_identified_organization,6L,1L,5L,5L,8L,1L,2L
-
-#define SN_certicom_arc		"certicom-arc"
-#define NID_certicom_arc		677
-#define OBJ_certicom_arc		OBJ_identified_organization,132L
-
-#define SN_international_organizations		"international-organizations"
-#define LN_international_organizations		"International Organizations"
-#define NID_international_organizations		647
-#define OBJ_international_organizations		OBJ_joint_iso_itu_t,23L
-
-#define SN_wap		"wap"
-#define NID_wap		678
-#define OBJ_wap		OBJ_international_organizations,43L
-
-#define SN_wap_wsg		"wap-wsg"
-#define NID_wap_wsg		679
-#define OBJ_wap_wsg		OBJ_wap,1L
-
-#define SN_selected_attribute_types		"selected-attribute-types"
-#define LN_selected_attribute_types		"Selected Attribute Types"
-#define NID_selected_attribute_types		394
-#define OBJ_selected_attribute_types		OBJ_joint_iso_itu_t,5L,1L,5L
-
-#define SN_clearance		"clearance"
-#define NID_clearance		395
-#define OBJ_clearance		OBJ_selected_attribute_types,55L
-
-#define SN_ISO_US		"ISO-US"
-#define LN_ISO_US		"ISO US Member Body"
-#define NID_ISO_US		183
-#define OBJ_ISO_US		OBJ_member_body,840L
-
-#define SN_X9_57		"X9-57"
-#define LN_X9_57		"X9.57"
-#define NID_X9_57		184
-#define OBJ_X9_57		OBJ_ISO_US,10040L
-
-#define SN_X9cm		"X9cm"
-#define LN_X9cm		"X9.57 CM ?"
-#define NID_X9cm		185
-#define OBJ_X9cm		OBJ_X9_57,4L
-
-#define SN_dsa		"DSA"
-#define LN_dsa		"dsaEncryption"
-#define NID_dsa		116
-#define OBJ_dsa		OBJ_X9cm,1L
-
-#define SN_dsaWithSHA1		"DSA-SHA1"
-#define LN_dsaWithSHA1		"dsaWithSHA1"
-#define NID_dsaWithSHA1		113
-#define OBJ_dsaWithSHA1		OBJ_X9cm,3L
-
-#define SN_ansi_X9_62		"ansi-X9-62"
-#define LN_ansi_X9_62		"ANSI X9.62"
-#define NID_ansi_X9_62		405
-#define OBJ_ansi_X9_62		OBJ_ISO_US,10045L
-
-#define OBJ_X9_62_id_fieldType		OBJ_ansi_X9_62,1L
-
-#define SN_X9_62_prime_field		"prime-field"
-#define NID_X9_62_prime_field		406
-#define OBJ_X9_62_prime_field		OBJ_X9_62_id_fieldType,1L
-
-#define SN_X9_62_characteristic_two_field		"characteristic-two-field"
-#define NID_X9_62_characteristic_two_field		407
-#define OBJ_X9_62_characteristic_two_field		OBJ_X9_62_id_fieldType,2L
-
-#define SN_X9_62_id_characteristic_two_basis		"id-characteristic-two-basis"
-#define NID_X9_62_id_characteristic_two_basis		680
-#define OBJ_X9_62_id_characteristic_two_basis		OBJ_X9_62_characteristic_two_field,3L
-
-#define SN_X9_62_onBasis		"onBasis"
-#define NID_X9_62_onBasis		681
-#define OBJ_X9_62_onBasis		OBJ_X9_62_id_characteristic_two_basis,1L
-
-#define SN_X9_62_tpBasis		"tpBasis"
-#define NID_X9_62_tpBasis		682
-#define OBJ_X9_62_tpBasis		OBJ_X9_62_id_characteristic_two_basis,2L
-
-#define SN_X9_62_ppBasis		"ppBasis"
-#define NID_X9_62_ppBasis		683
-#define OBJ_X9_62_ppBasis		OBJ_X9_62_id_characteristic_two_basis,3L
-
-#define OBJ_X9_62_id_publicKeyType		OBJ_ansi_X9_62,2L
-
-#define SN_X9_62_id_ecPublicKey		"id-ecPublicKey"
-#define NID_X9_62_id_ecPublicKey		408
-#define OBJ_X9_62_id_ecPublicKey		OBJ_X9_62_id_publicKeyType,1L
-
-#define OBJ_X9_62_ellipticCurve		OBJ_ansi_X9_62,3L
-
-#define OBJ_X9_62_c_TwoCurve		OBJ_X9_62_ellipticCurve,0L
-
-#define SN_X9_62_c2pnb163v1		"c2pnb163v1"
-#define NID_X9_62_c2pnb163v1		684
-#define OBJ_X9_62_c2pnb163v1		OBJ_X9_62_c_TwoCurve,1L
-
-#define SN_X9_62_c2pnb163v2		"c2pnb163v2"
-#define NID_X9_62_c2pnb163v2		685
-#define OBJ_X9_62_c2pnb163v2		OBJ_X9_62_c_TwoCurve,2L
-
-#define SN_X9_62_c2pnb163v3		"c2pnb163v3"
-#define NID_X9_62_c2pnb163v3		686
-#define OBJ_X9_62_c2pnb163v3		OBJ_X9_62_c_TwoCurve,3L
-
-#define SN_X9_62_c2pnb176v1		"c2pnb176v1"
-#define NID_X9_62_c2pnb176v1		687
-#define OBJ_X9_62_c2pnb176v1		OBJ_X9_62_c_TwoCurve,4L
-
-#define SN_X9_62_c2tnb191v1		"c2tnb191v1"
-#define NID_X9_62_c2tnb191v1		688
-#define OBJ_X9_62_c2tnb191v1		OBJ_X9_62_c_TwoCurve,5L
-
-#define SN_X9_62_c2tnb191v2		"c2tnb191v2"
-#define NID_X9_62_c2tnb191v2		689
-#define OBJ_X9_62_c2tnb191v2		OBJ_X9_62_c_TwoCurve,6L
-
-#define SN_X9_62_c2tnb191v3		"c2tnb191v3"
-#define NID_X9_62_c2tnb191v3		690
-#define OBJ_X9_62_c2tnb191v3		OBJ_X9_62_c_TwoCurve,7L
-
-#define SN_X9_62_c2onb191v4		"c2onb191v4"
-#define NID_X9_62_c2onb191v4		691
-#define OBJ_X9_62_c2onb191v4		OBJ_X9_62_c_TwoCurve,8L
-
-#define SN_X9_62_c2onb191v5		"c2onb191v5"
-#define NID_X9_62_c2onb191v5		692
-#define OBJ_X9_62_c2onb191v5		OBJ_X9_62_c_TwoCurve,9L
-
-#define SN_X9_62_c2pnb208w1		"c2pnb208w1"
-#define NID_X9_62_c2pnb208w1		693
-#define OBJ_X9_62_c2pnb208w1		OBJ_X9_62_c_TwoCurve,10L
-
-#define SN_X9_62_c2tnb239v1		"c2tnb239v1"
-#define NID_X9_62_c2tnb239v1		694
-#define OBJ_X9_62_c2tnb239v1		OBJ_X9_62_c_TwoCurve,11L
-
-#define SN_X9_62_c2tnb239v2		"c2tnb239v2"
-#define NID_X9_62_c2tnb239v2		695
-#define OBJ_X9_62_c2tnb239v2		OBJ_X9_62_c_TwoCurve,12L
-
-#define SN_X9_62_c2tnb239v3		"c2tnb239v3"
-#define NID_X9_62_c2tnb239v3		696
-#define OBJ_X9_62_c2tnb239v3		OBJ_X9_62_c_TwoCurve,13L
-
-#define SN_X9_62_c2onb239v4		"c2onb239v4"
-#define NID_X9_62_c2onb239v4		697
-#define OBJ_X9_62_c2onb239v4		OBJ_X9_62_c_TwoCurve,14L
-
-#define SN_X9_62_c2onb239v5		"c2onb239v5"
-#define NID_X9_62_c2onb239v5		698
-#define OBJ_X9_62_c2onb239v5		OBJ_X9_62_c_TwoCurve,15L
-
-#define SN_X9_62_c2pnb272w1		"c2pnb272w1"
-#define NID_X9_62_c2pnb272w1		699
-#define OBJ_X9_62_c2pnb272w1		OBJ_X9_62_c_TwoCurve,16L
-
-#define SN_X9_62_c2pnb304w1		"c2pnb304w1"
-#define NID_X9_62_c2pnb304w1		700
-#define OBJ_X9_62_c2pnb304w1		OBJ_X9_62_c_TwoCurve,17L
-
-#define SN_X9_62_c2tnb359v1		"c2tnb359v1"
-#define NID_X9_62_c2tnb359v1		701
-#define OBJ_X9_62_c2tnb359v1		OBJ_X9_62_c_TwoCurve,18L
-
-#define SN_X9_62_c2pnb368w1		"c2pnb368w1"
-#define NID_X9_62_c2pnb368w1		702
-#define OBJ_X9_62_c2pnb368w1		OBJ_X9_62_c_TwoCurve,19L
-
-#define SN_X9_62_c2tnb431r1		"c2tnb431r1"
-#define NID_X9_62_c2tnb431r1		703
-#define OBJ_X9_62_c2tnb431r1		OBJ_X9_62_c_TwoCurve,20L
-
-#define OBJ_X9_62_primeCurve		OBJ_X9_62_ellipticCurve,1L
-
-#define SN_X9_62_prime192v1		"prime192v1"
-#define NID_X9_62_prime192v1		409
-#define OBJ_X9_62_prime192v1		OBJ_X9_62_primeCurve,1L
-
-#define SN_X9_62_prime192v2		"prime192v2"
-#define NID_X9_62_prime192v2		410
-#define OBJ_X9_62_prime192v2		OBJ_X9_62_primeCurve,2L
-
-#define SN_X9_62_prime192v3		"prime192v3"
-#define NID_X9_62_prime192v3		411
-#define OBJ_X9_62_prime192v3		OBJ_X9_62_primeCurve,3L
-
-#define SN_X9_62_prime239v1		"prime239v1"
-#define NID_X9_62_prime239v1		412
-#define OBJ_X9_62_prime239v1		OBJ_X9_62_primeCurve,4L
-
-#define SN_X9_62_prime239v2		"prime239v2"
-#define NID_X9_62_prime239v2		413
-#define OBJ_X9_62_prime239v2		OBJ_X9_62_primeCurve,5L
-
-#define SN_X9_62_prime239v3		"prime239v3"
-#define NID_X9_62_prime239v3		414
-#define OBJ_X9_62_prime239v3		OBJ_X9_62_primeCurve,6L
-
-#define SN_X9_62_prime256v1		"prime256v1"
-#define NID_X9_62_prime256v1		415
-#define OBJ_X9_62_prime256v1		OBJ_X9_62_primeCurve,7L
-
-#define OBJ_X9_62_id_ecSigType		OBJ_ansi_X9_62,4L
-
-#define SN_ecdsa_with_SHA1		"ecdsa-with-SHA1"
-#define NID_ecdsa_with_SHA1		416
-#define OBJ_ecdsa_with_SHA1		OBJ_X9_62_id_ecSigType,1L
-
-#define SN_ecdsa_with_Recommended		"ecdsa-with-Recommended"
-#define NID_ecdsa_with_Recommended		791
-#define OBJ_ecdsa_with_Recommended		OBJ_X9_62_id_ecSigType,2L
-
-#define SN_ecdsa_with_Specified		"ecdsa-with-Specified"
-#define NID_ecdsa_with_Specified		792
-#define OBJ_ecdsa_with_Specified		OBJ_X9_62_id_ecSigType,3L
-
-#define SN_ecdsa_with_SHA224		"ecdsa-with-SHA224"
-#define NID_ecdsa_with_SHA224		793
-#define OBJ_ecdsa_with_SHA224		OBJ_ecdsa_with_Specified,1L
-
-#define SN_ecdsa_with_SHA256		"ecdsa-with-SHA256"
-#define NID_ecdsa_with_SHA256		794
-#define OBJ_ecdsa_with_SHA256		OBJ_ecdsa_with_Specified,2L
-
-#define SN_ecdsa_with_SHA384		"ecdsa-with-SHA384"
-#define NID_ecdsa_with_SHA384		795
-#define OBJ_ecdsa_with_SHA384		OBJ_ecdsa_with_Specified,3L
-
-#define SN_ecdsa_with_SHA512		"ecdsa-with-SHA512"
-#define NID_ecdsa_with_SHA512		796
-#define OBJ_ecdsa_with_SHA512		OBJ_ecdsa_with_Specified,4L
-
-#define OBJ_secg_ellipticCurve		OBJ_certicom_arc,0L
-
-#define SN_secp112r1		"secp112r1"
-#define NID_secp112r1		704
-#define OBJ_secp112r1		OBJ_secg_ellipticCurve,6L
-
-#define SN_secp112r2		"secp112r2"
-#define NID_secp112r2		705
-#define OBJ_secp112r2		OBJ_secg_ellipticCurve,7L
-
-#define SN_secp128r1		"secp128r1"
-#define NID_secp128r1		706
-#define OBJ_secp128r1		OBJ_secg_ellipticCurve,28L
-
-#define SN_secp128r2		"secp128r2"
-#define NID_secp128r2		707
-#define OBJ_secp128r2		OBJ_secg_ellipticCurve,29L
-
-#define SN_secp160k1		"secp160k1"
-#define NID_secp160k1		708
-#define OBJ_secp160k1		OBJ_secg_ellipticCurve,9L
-
-#define SN_secp160r1		"secp160r1"
-#define NID_secp160r1		709
-#define OBJ_secp160r1		OBJ_secg_ellipticCurve,8L
-
-#define SN_secp160r2		"secp160r2"
-#define NID_secp160r2		710
-#define OBJ_secp160r2		OBJ_secg_ellipticCurve,30L
-
-#define SN_secp192k1		"secp192k1"
-#define NID_secp192k1		711
-#define OBJ_secp192k1		OBJ_secg_ellipticCurve,31L
-
-#define SN_secp224k1		"secp224k1"
-#define NID_secp224k1		712
-#define OBJ_secp224k1		OBJ_secg_ellipticCurve,32L
-
-#define SN_secp224r1		"secp224r1"
-#define NID_secp224r1		713
-#define OBJ_secp224r1		OBJ_secg_ellipticCurve,33L
-
-#define SN_secp256k1		"secp256k1"
-#define NID_secp256k1		714
-#define OBJ_secp256k1		OBJ_secg_ellipticCurve,10L
-
-#define SN_secp384r1		"secp384r1"
-#define NID_secp384r1		715
-#define OBJ_secp384r1		OBJ_secg_ellipticCurve,34L
-
-#define SN_secp521r1		"secp521r1"
-#define NID_secp521r1		716
-#define OBJ_secp521r1		OBJ_secg_ellipticCurve,35L
-
-#define SN_sect113r1		"sect113r1"
-#define NID_sect113r1		717
-#define OBJ_sect113r1		OBJ_secg_ellipticCurve,4L
-
-#define SN_sect113r2		"sect113r2"
-#define NID_sect113r2		718
-#define OBJ_sect113r2		OBJ_secg_ellipticCurve,5L
-
-#define SN_sect131r1		"sect131r1"
-#define NID_sect131r1		719
-#define OBJ_sect131r1		OBJ_secg_ellipticCurve,22L
-
-#define SN_sect131r2		"sect131r2"
-#define NID_sect131r2		720
-#define OBJ_sect131r2		OBJ_secg_ellipticCurve,23L
-
-#define SN_sect163k1		"sect163k1"
-#define NID_sect163k1		721
-#define OBJ_sect163k1		OBJ_secg_ellipticCurve,1L
-
-#define SN_sect163r1		"sect163r1"
-#define NID_sect163r1		722
-#define OBJ_sect163r1		OBJ_secg_ellipticCurve,2L
-
-#define SN_sect163r2		"sect163r2"
-#define NID_sect163r2		723
-#define OBJ_sect163r2		OBJ_secg_ellipticCurve,15L
-
-#define SN_sect193r1		"sect193r1"
-#define NID_sect193r1		724
-#define OBJ_sect193r1		OBJ_secg_ellipticCurve,24L
-
-#define SN_sect193r2		"sect193r2"
-#define NID_sect193r2		725
-#define OBJ_sect193r2		OBJ_secg_ellipticCurve,25L
-
-#define SN_sect233k1		"sect233k1"
-#define NID_sect233k1		726
-#define OBJ_sect233k1		OBJ_secg_ellipticCurve,26L
-
-#define SN_sect233r1		"sect233r1"
-#define NID_sect233r1		727
-#define OBJ_sect233r1		OBJ_secg_ellipticCurve,27L
-
-#define SN_sect239k1		"sect239k1"
-#define NID_sect239k1		728
-#define OBJ_sect239k1		OBJ_secg_ellipticCurve,3L
-
-#define SN_sect283k1		"sect283k1"
-#define NID_sect283k1		729
-#define OBJ_sect283k1		OBJ_secg_ellipticCurve,16L
-
-#define SN_sect283r1		"sect283r1"
-#define NID_sect283r1		730
-#define OBJ_sect283r1		OBJ_secg_ellipticCurve,17L
-
-#define SN_sect409k1		"sect409k1"
-#define NID_sect409k1		731
-#define OBJ_sect409k1		OBJ_secg_ellipticCurve,36L
-
-#define SN_sect409r1		"sect409r1"
-#define NID_sect409r1		732
-#define OBJ_sect409r1		OBJ_secg_ellipticCurve,37L
-
-#define SN_sect571k1		"sect571k1"
-#define NID_sect571k1		733
-#define OBJ_sect571k1		OBJ_secg_ellipticCurve,38L
-
-#define SN_sect571r1		"sect571r1"
-#define NID_sect571r1		734
-#define OBJ_sect571r1		OBJ_secg_ellipticCurve,39L
-
-#define OBJ_wap_wsg_idm_ecid		OBJ_wap_wsg,4L
-
-#define SN_wap_wsg_idm_ecid_wtls1		"wap-wsg-idm-ecid-wtls1"
-#define NID_wap_wsg_idm_ecid_wtls1		735
-#define OBJ_wap_wsg_idm_ecid_wtls1		OBJ_wap_wsg_idm_ecid,1L
-
-#define SN_wap_wsg_idm_ecid_wtls3		"wap-wsg-idm-ecid-wtls3"
-#define NID_wap_wsg_idm_ecid_wtls3		736
-#define OBJ_wap_wsg_idm_ecid_wtls3		OBJ_wap_wsg_idm_ecid,3L
-
-#define SN_wap_wsg_idm_ecid_wtls4		"wap-wsg-idm-ecid-wtls4"
-#define NID_wap_wsg_idm_ecid_wtls4		737
-#define OBJ_wap_wsg_idm_ecid_wtls4		OBJ_wap_wsg_idm_ecid,4L
-
-#define SN_wap_wsg_idm_ecid_wtls5		"wap-wsg-idm-ecid-wtls5"
-#define NID_wap_wsg_idm_ecid_wtls5		738
-#define OBJ_wap_wsg_idm_ecid_wtls5		OBJ_wap_wsg_idm_ecid,5L
-
-#define SN_wap_wsg_idm_ecid_wtls6		"wap-wsg-idm-ecid-wtls6"
-#define NID_wap_wsg_idm_ecid_wtls6		739
-#define OBJ_wap_wsg_idm_ecid_wtls6		OBJ_wap_wsg_idm_ecid,6L
-
-#define SN_wap_wsg_idm_ecid_wtls7		"wap-wsg-idm-ecid-wtls7"
-#define NID_wap_wsg_idm_ecid_wtls7		740
-#define OBJ_wap_wsg_idm_ecid_wtls7		OBJ_wap_wsg_idm_ecid,7L
-
-#define SN_wap_wsg_idm_ecid_wtls8		"wap-wsg-idm-ecid-wtls8"
-#define NID_wap_wsg_idm_ecid_wtls8		741
-#define OBJ_wap_wsg_idm_ecid_wtls8		OBJ_wap_wsg_idm_ecid,8L
-
-#define SN_wap_wsg_idm_ecid_wtls9		"wap-wsg-idm-ecid-wtls9"
-#define NID_wap_wsg_idm_ecid_wtls9		742
-#define OBJ_wap_wsg_idm_ecid_wtls9		OBJ_wap_wsg_idm_ecid,9L
-
-#define SN_wap_wsg_idm_ecid_wtls10		"wap-wsg-idm-ecid-wtls10"
-#define NID_wap_wsg_idm_ecid_wtls10		743
-#define OBJ_wap_wsg_idm_ecid_wtls10		OBJ_wap_wsg_idm_ecid,10L
-
-#define SN_wap_wsg_idm_ecid_wtls11		"wap-wsg-idm-ecid-wtls11"
-#define NID_wap_wsg_idm_ecid_wtls11		744
-#define OBJ_wap_wsg_idm_ecid_wtls11		OBJ_wap_wsg_idm_ecid,11L
-
-#define SN_wap_wsg_idm_ecid_wtls12		"wap-wsg-idm-ecid-wtls12"
-#define NID_wap_wsg_idm_ecid_wtls12		745
-#define OBJ_wap_wsg_idm_ecid_wtls12		OBJ_wap_wsg_idm_ecid,12L
-
-#define SN_cast5_cbc		"CAST5-CBC"
-#define LN_cast5_cbc		"cast5-cbc"
-#define NID_cast5_cbc		108
-#define OBJ_cast5_cbc		OBJ_ISO_US,113533L,7L,66L,10L
-
-#define SN_cast5_ecb		"CAST5-ECB"
-#define LN_cast5_ecb		"cast5-ecb"
-#define NID_cast5_ecb		109
-
-#define SN_cast5_cfb64		"CAST5-CFB"
-#define LN_cast5_cfb64		"cast5-cfb"
-#define NID_cast5_cfb64		110
-
-#define SN_cast5_ofb64		"CAST5-OFB"
-#define LN_cast5_ofb64		"cast5-ofb"
-#define NID_cast5_ofb64		111
-
-#define LN_pbeWithMD5AndCast5_CBC		"pbeWithMD5AndCast5CBC"
-#define NID_pbeWithMD5AndCast5_CBC		112
-#define OBJ_pbeWithMD5AndCast5_CBC		OBJ_ISO_US,113533L,7L,66L,12L
-
-#define SN_id_PasswordBasedMAC		"id-PasswordBasedMAC"
-#define LN_id_PasswordBasedMAC		"password based MAC"
-#define NID_id_PasswordBasedMAC		782
-#define OBJ_id_PasswordBasedMAC		OBJ_ISO_US,113533L,7L,66L,13L
-
-#define SN_id_DHBasedMac		"id-DHBasedMac"
-#define LN_id_DHBasedMac		"Diffie-Hellman based MAC"
-#define NID_id_DHBasedMac		783
-#define OBJ_id_DHBasedMac		OBJ_ISO_US,113533L,7L,66L,30L
-
-#define SN_rsadsi		"rsadsi"
-#define LN_rsadsi		"RSA Data Security, Inc."
-#define NID_rsadsi		1
-#define OBJ_rsadsi		OBJ_ISO_US,113549L
-
-#define SN_pkcs		"pkcs"
-#define LN_pkcs		"RSA Data Security, Inc. PKCS"
-#define NID_pkcs		2
-#define OBJ_pkcs		OBJ_rsadsi,1L
-
-#define SN_pkcs1		"pkcs1"
-#define NID_pkcs1		186
-#define OBJ_pkcs1		OBJ_pkcs,1L
-
-#define LN_rsaEncryption		"rsaEncryption"
-#define NID_rsaEncryption		6
-#define OBJ_rsaEncryption		OBJ_pkcs1,1L
-
-#define SN_md2WithRSAEncryption		"RSA-MD2"
-#define LN_md2WithRSAEncryption		"md2WithRSAEncryption"
-#define NID_md2WithRSAEncryption		7
-#define OBJ_md2WithRSAEncryption		OBJ_pkcs1,2L
-
-#define SN_md4WithRSAEncryption		"RSA-MD4"
-#define LN_md4WithRSAEncryption		"md4WithRSAEncryption"
-#define NID_md4WithRSAEncryption		396
-#define OBJ_md4WithRSAEncryption		OBJ_pkcs1,3L
-
-#define SN_md5WithRSAEncryption		"RSA-MD5"
-#define LN_md5WithRSAEncryption		"md5WithRSAEncryption"
-#define NID_md5WithRSAEncryption		8
-#define OBJ_md5WithRSAEncryption		OBJ_pkcs1,4L
-
-#define SN_sha1WithRSAEncryption		"RSA-SHA1"
-#define LN_sha1WithRSAEncryption		"sha1WithRSAEncryption"
-#define NID_sha1WithRSAEncryption		65
-#define OBJ_sha1WithRSAEncryption		OBJ_pkcs1,5L
-
-#define SN_sha256WithRSAEncryption		"RSA-SHA256"
-#define LN_sha256WithRSAEncryption		"sha256WithRSAEncryption"
-#define NID_sha256WithRSAEncryption		668
-#define OBJ_sha256WithRSAEncryption		OBJ_pkcs1,11L
-
-#define SN_sha384WithRSAEncryption		"RSA-SHA384"
-#define LN_sha384WithRSAEncryption		"sha384WithRSAEncryption"
-#define NID_sha384WithRSAEncryption		669
-#define OBJ_sha384WithRSAEncryption		OBJ_pkcs1,12L
-
-#define SN_sha512WithRSAEncryption		"RSA-SHA512"
-#define LN_sha512WithRSAEncryption		"sha512WithRSAEncryption"
-#define NID_sha512WithRSAEncryption		670
-#define OBJ_sha512WithRSAEncryption		OBJ_pkcs1,13L
-
-#define SN_sha224WithRSAEncryption		"RSA-SHA224"
-#define LN_sha224WithRSAEncryption		"sha224WithRSAEncryption"
-#define NID_sha224WithRSAEncryption		671
-#define OBJ_sha224WithRSAEncryption		OBJ_pkcs1,14L
-
-#define SN_pkcs3		"pkcs3"
-#define NID_pkcs3		27
-#define OBJ_pkcs3		OBJ_pkcs,3L
-
-#define LN_dhKeyAgreement		"dhKeyAgreement"
-#define NID_dhKeyAgreement		28
-#define OBJ_dhKeyAgreement		OBJ_pkcs3,1L
-
-#define SN_pkcs5		"pkcs5"
-#define NID_pkcs5		187
-#define OBJ_pkcs5		OBJ_pkcs,5L
-
-#define SN_pbeWithMD2AndDES_CBC		"PBE-MD2-DES"
-#define LN_pbeWithMD2AndDES_CBC		"pbeWithMD2AndDES-CBC"
-#define NID_pbeWithMD2AndDES_CBC		9
-#define OBJ_pbeWithMD2AndDES_CBC		OBJ_pkcs5,1L
-
-#define SN_pbeWithMD5AndDES_CBC		"PBE-MD5-DES"
-#define LN_pbeWithMD5AndDES_CBC		"pbeWithMD5AndDES-CBC"
-#define NID_pbeWithMD5AndDES_CBC		10
-#define OBJ_pbeWithMD5AndDES_CBC		OBJ_pkcs5,3L
-
-#define SN_pbeWithMD2AndRC2_CBC		"PBE-MD2-RC2-64"
-#define LN_pbeWithMD2AndRC2_CBC		"pbeWithMD2AndRC2-CBC"
-#define NID_pbeWithMD2AndRC2_CBC		168
-#define OBJ_pbeWithMD2AndRC2_CBC		OBJ_pkcs5,4L
-
-#define SN_pbeWithMD5AndRC2_CBC		"PBE-MD5-RC2-64"
-#define LN_pbeWithMD5AndRC2_CBC		"pbeWithMD5AndRC2-CBC"
-#define NID_pbeWithMD5AndRC2_CBC		169
-#define OBJ_pbeWithMD5AndRC2_CBC		OBJ_pkcs5,6L
-
-#define SN_pbeWithSHA1AndDES_CBC		"PBE-SHA1-DES"
-#define LN_pbeWithSHA1AndDES_CBC		"pbeWithSHA1AndDES-CBC"
-#define NID_pbeWithSHA1AndDES_CBC		170
-#define OBJ_pbeWithSHA1AndDES_CBC		OBJ_pkcs5,10L
-
-#define SN_pbeWithSHA1AndRC2_CBC		"PBE-SHA1-RC2-64"
-#define LN_pbeWithSHA1AndRC2_CBC		"pbeWithSHA1AndRC2-CBC"
-#define NID_pbeWithSHA1AndRC2_CBC		68
-#define OBJ_pbeWithSHA1AndRC2_CBC		OBJ_pkcs5,11L
-
-#define LN_id_pbkdf2		"PBKDF2"
-#define NID_id_pbkdf2		69
-#define OBJ_id_pbkdf2		OBJ_pkcs5,12L
-
-#define LN_pbes2		"PBES2"
-#define NID_pbes2		161
-#define OBJ_pbes2		OBJ_pkcs5,13L
-
-#define LN_pbmac1		"PBMAC1"
-#define NID_pbmac1		162
-#define OBJ_pbmac1		OBJ_pkcs5,14L
-
-#define SN_pkcs7		"pkcs7"
-#define NID_pkcs7		20
-#define OBJ_pkcs7		OBJ_pkcs,7L
-
-#define LN_pkcs7_data		"pkcs7-data"
-#define NID_pkcs7_data		21
-#define OBJ_pkcs7_data		OBJ_pkcs7,1L
-
-#define LN_pkcs7_signed		"pkcs7-signedData"
-#define NID_pkcs7_signed		22
-#define OBJ_pkcs7_signed		OBJ_pkcs7,2L
-
-#define LN_pkcs7_enveloped		"pkcs7-envelopedData"
-#define NID_pkcs7_enveloped		23
-#define OBJ_pkcs7_enveloped		OBJ_pkcs7,3L
-
-#define LN_pkcs7_signedAndEnveloped		"pkcs7-signedAndEnvelopedData"
-#define NID_pkcs7_signedAndEnveloped		24
-#define OBJ_pkcs7_signedAndEnveloped		OBJ_pkcs7,4L
-
-#define LN_pkcs7_digest		"pkcs7-digestData"
-#define NID_pkcs7_digest		25
-#define OBJ_pkcs7_digest		OBJ_pkcs7,5L
-
-#define LN_pkcs7_encrypted		"pkcs7-encryptedData"
-#define NID_pkcs7_encrypted		26
-#define OBJ_pkcs7_encrypted		OBJ_pkcs7,6L
-
-#define SN_pkcs9		"pkcs9"
-#define NID_pkcs9		47
-#define OBJ_pkcs9		OBJ_pkcs,9L
-
-#define LN_pkcs9_emailAddress		"emailAddress"
-#define NID_pkcs9_emailAddress		48
-#define OBJ_pkcs9_emailAddress		OBJ_pkcs9,1L
-
-#define LN_pkcs9_unstructuredName		"unstructuredName"
-#define NID_pkcs9_unstructuredName		49
-#define OBJ_pkcs9_unstructuredName		OBJ_pkcs9,2L
-
-#define LN_pkcs9_contentType		"contentType"
-#define NID_pkcs9_contentType		50
-#define OBJ_pkcs9_contentType		OBJ_pkcs9,3L
-
-#define LN_pkcs9_messageDigest		"messageDigest"
-#define NID_pkcs9_messageDigest		51
-#define OBJ_pkcs9_messageDigest		OBJ_pkcs9,4L
-
-#define LN_pkcs9_signingTime		"signingTime"
-#define NID_pkcs9_signingTime		52
-#define OBJ_pkcs9_signingTime		OBJ_pkcs9,5L
-
-#define LN_pkcs9_countersignature		"countersignature"
-#define NID_pkcs9_countersignature		53
-#define OBJ_pkcs9_countersignature		OBJ_pkcs9,6L
-
-#define LN_pkcs9_challengePassword		"challengePassword"
-#define NID_pkcs9_challengePassword		54
-#define OBJ_pkcs9_challengePassword		OBJ_pkcs9,7L
-
-#define LN_pkcs9_unstructuredAddress		"unstructuredAddress"
-#define NID_pkcs9_unstructuredAddress		55
-#define OBJ_pkcs9_unstructuredAddress		OBJ_pkcs9,8L
-
-#define LN_pkcs9_extCertAttributes		"extendedCertificateAttributes"
-#define NID_pkcs9_extCertAttributes		56
-#define OBJ_pkcs9_extCertAttributes		OBJ_pkcs9,9L
-
-#define SN_ext_req		"extReq"
-#define LN_ext_req		"Extension Request"
-#define NID_ext_req		172
-#define OBJ_ext_req		OBJ_pkcs9,14L
-
-#define SN_SMIMECapabilities		"SMIME-CAPS"
-#define LN_SMIMECapabilities		"S/MIME Capabilities"
-#define NID_SMIMECapabilities		167
-#define OBJ_SMIMECapabilities		OBJ_pkcs9,15L
-
-#define SN_SMIME		"SMIME"
-#define LN_SMIME		"S/MIME"
-#define NID_SMIME		188
-#define OBJ_SMIME		OBJ_pkcs9,16L
-
-#define SN_id_smime_mod		"id-smime-mod"
-#define NID_id_smime_mod		189
-#define OBJ_id_smime_mod		OBJ_SMIME,0L
-
-#define SN_id_smime_ct		"id-smime-ct"
-#define NID_id_smime_ct		190
-#define OBJ_id_smime_ct		OBJ_SMIME,1L
-
-#define SN_id_smime_aa		"id-smime-aa"
-#define NID_id_smime_aa		191
-#define OBJ_id_smime_aa		OBJ_SMIME,2L
-
-#define SN_id_smime_alg		"id-smime-alg"
-#define NID_id_smime_alg		192
-#define OBJ_id_smime_alg		OBJ_SMIME,3L
-
-#define SN_id_smime_cd		"id-smime-cd"
-#define NID_id_smime_cd		193
-#define OBJ_id_smime_cd		OBJ_SMIME,4L
-
-#define SN_id_smime_spq		"id-smime-spq"
-#define NID_id_smime_spq		194
-#define OBJ_id_smime_spq		OBJ_SMIME,5L
-
-#define SN_id_smime_cti		"id-smime-cti"
-#define NID_id_smime_cti		195
-#define OBJ_id_smime_cti		OBJ_SMIME,6L
-
-#define SN_id_smime_mod_cms		"id-smime-mod-cms"
-#define NID_id_smime_mod_cms		196
-#define OBJ_id_smime_mod_cms		OBJ_id_smime_mod,1L
-
-#define SN_id_smime_mod_ess		"id-smime-mod-ess"
-#define NID_id_smime_mod_ess		197
-#define OBJ_id_smime_mod_ess		OBJ_id_smime_mod,2L
-
-#define SN_id_smime_mod_oid		"id-smime-mod-oid"
-#define NID_id_smime_mod_oid		198
-#define OBJ_id_smime_mod_oid		OBJ_id_smime_mod,3L
-
-#define SN_id_smime_mod_msg_v3		"id-smime-mod-msg-v3"
-#define NID_id_smime_mod_msg_v3		199
-#define OBJ_id_smime_mod_msg_v3		OBJ_id_smime_mod,4L
-
-#define SN_id_smime_mod_ets_eSignature_88		"id-smime-mod-ets-eSignature-88"
-#define NID_id_smime_mod_ets_eSignature_88		200
-#define OBJ_id_smime_mod_ets_eSignature_88		OBJ_id_smime_mod,5L
-
-#define SN_id_smime_mod_ets_eSignature_97		"id-smime-mod-ets-eSignature-97"
-#define NID_id_smime_mod_ets_eSignature_97		201
-#define OBJ_id_smime_mod_ets_eSignature_97		OBJ_id_smime_mod,6L
-
-#define SN_id_smime_mod_ets_eSigPolicy_88		"id-smime-mod-ets-eSigPolicy-88"
-#define NID_id_smime_mod_ets_eSigPolicy_88		202
-#define OBJ_id_smime_mod_ets_eSigPolicy_88		OBJ_id_smime_mod,7L
-
-#define SN_id_smime_mod_ets_eSigPolicy_97		"id-smime-mod-ets-eSigPolicy-97"
-#define NID_id_smime_mod_ets_eSigPolicy_97		203
-#define OBJ_id_smime_mod_ets_eSigPolicy_97		OBJ_id_smime_mod,8L
-
-#define SN_id_smime_ct_receipt		"id-smime-ct-receipt"
-#define NID_id_smime_ct_receipt		204
-#define OBJ_id_smime_ct_receipt		OBJ_id_smime_ct,1L
-
-#define SN_id_smime_ct_authData		"id-smime-ct-authData"
-#define NID_id_smime_ct_authData		205
-#define OBJ_id_smime_ct_authData		OBJ_id_smime_ct,2L
-
-#define SN_id_smime_ct_publishCert		"id-smime-ct-publishCert"
-#define NID_id_smime_ct_publishCert		206
-#define OBJ_id_smime_ct_publishCert		OBJ_id_smime_ct,3L
-
-#define SN_id_smime_ct_TSTInfo		"id-smime-ct-TSTInfo"
-#define NID_id_smime_ct_TSTInfo		207
-#define OBJ_id_smime_ct_TSTInfo		OBJ_id_smime_ct,4L
-
-#define SN_id_smime_ct_TDTInfo		"id-smime-ct-TDTInfo"
-#define NID_id_smime_ct_TDTInfo		208
-#define OBJ_id_smime_ct_TDTInfo		OBJ_id_smime_ct,5L
-
-#define SN_id_smime_ct_contentInfo		"id-smime-ct-contentInfo"
-#define NID_id_smime_ct_contentInfo		209
-#define OBJ_id_smime_ct_contentInfo		OBJ_id_smime_ct,6L
-
-#define SN_id_smime_ct_DVCSRequestData		"id-smime-ct-DVCSRequestData"
-#define NID_id_smime_ct_DVCSRequestData		210
-#define OBJ_id_smime_ct_DVCSRequestData		OBJ_id_smime_ct,7L
-
-#define SN_id_smime_ct_DVCSResponseData		"id-smime-ct-DVCSResponseData"
-#define NID_id_smime_ct_DVCSResponseData		211
-#define OBJ_id_smime_ct_DVCSResponseData		OBJ_id_smime_ct,8L
-
-#define SN_id_smime_ct_compressedData		"id-smime-ct-compressedData"
-#define NID_id_smime_ct_compressedData		786
-#define OBJ_id_smime_ct_compressedData		OBJ_id_smime_ct,9L
-
-#define SN_id_ct_asciiTextWithCRLF		"id-ct-asciiTextWithCRLF"
-#define NID_id_ct_asciiTextWithCRLF		787
-#define OBJ_id_ct_asciiTextWithCRLF		OBJ_id_smime_ct,27L
-
-#define SN_id_smime_aa_receiptRequest		"id-smime-aa-receiptRequest"
-#define NID_id_smime_aa_receiptRequest		212
-#define OBJ_id_smime_aa_receiptRequest		OBJ_id_smime_aa,1L
-
-#define SN_id_smime_aa_securityLabel		"id-smime-aa-securityLabel"
-#define NID_id_smime_aa_securityLabel		213
-#define OBJ_id_smime_aa_securityLabel		OBJ_id_smime_aa,2L
-
-#define SN_id_smime_aa_mlExpandHistory		"id-smime-aa-mlExpandHistory"
-#define NID_id_smime_aa_mlExpandHistory		214
-#define OBJ_id_smime_aa_mlExpandHistory		OBJ_id_smime_aa,3L
-
-#define SN_id_smime_aa_contentHint		"id-smime-aa-contentHint"
-#define NID_id_smime_aa_contentHint		215
-#define OBJ_id_smime_aa_contentHint		OBJ_id_smime_aa,4L
-
-#define SN_id_smime_aa_msgSigDigest		"id-smime-aa-msgSigDigest"
-#define NID_id_smime_aa_msgSigDigest		216
-#define OBJ_id_smime_aa_msgSigDigest		OBJ_id_smime_aa,5L
-
-#define SN_id_smime_aa_encapContentType		"id-smime-aa-encapContentType"
-#define NID_id_smime_aa_encapContentType		217
-#define OBJ_id_smime_aa_encapContentType		OBJ_id_smime_aa,6L
-
-#define SN_id_smime_aa_contentIdentifier		"id-smime-aa-contentIdentifier"
-#define NID_id_smime_aa_contentIdentifier		218
-#define OBJ_id_smime_aa_contentIdentifier		OBJ_id_smime_aa,7L
-
-#define SN_id_smime_aa_macValue		"id-smime-aa-macValue"
-#define NID_id_smime_aa_macValue		219
-#define OBJ_id_smime_aa_macValue		OBJ_id_smime_aa,8L
-
-#define SN_id_smime_aa_equivalentLabels		"id-smime-aa-equivalentLabels"
-#define NID_id_smime_aa_equivalentLabels		220
-#define OBJ_id_smime_aa_equivalentLabels		OBJ_id_smime_aa,9L
-
-#define SN_id_smime_aa_contentReference		"id-smime-aa-contentReference"
-#define NID_id_smime_aa_contentReference		221
-#define OBJ_id_smime_aa_contentReference		OBJ_id_smime_aa,10L
-
-#define SN_id_smime_aa_encrypKeyPref		"id-smime-aa-encrypKeyPref"
-#define NID_id_smime_aa_encrypKeyPref		222
-#define OBJ_id_smime_aa_encrypKeyPref		OBJ_id_smime_aa,11L
-
-#define SN_id_smime_aa_signingCertificate		"id-smime-aa-signingCertificate"
-#define NID_id_smime_aa_signingCertificate		223
-#define OBJ_id_smime_aa_signingCertificate		OBJ_id_smime_aa,12L
-
-#define SN_id_smime_aa_smimeEncryptCerts		"id-smime-aa-smimeEncryptCerts"
-#define NID_id_smime_aa_smimeEncryptCerts		224
-#define OBJ_id_smime_aa_smimeEncryptCerts		OBJ_id_smime_aa,13L
-
-#define SN_id_smime_aa_timeStampToken		"id-smime-aa-timeStampToken"
-#define NID_id_smime_aa_timeStampToken		225
-#define OBJ_id_smime_aa_timeStampToken		OBJ_id_smime_aa,14L
-
-#define SN_id_smime_aa_ets_sigPolicyId		"id-smime-aa-ets-sigPolicyId"
-#define NID_id_smime_aa_ets_sigPolicyId		226
-#define OBJ_id_smime_aa_ets_sigPolicyId		OBJ_id_smime_aa,15L
-
-#define SN_id_smime_aa_ets_commitmentType		"id-smime-aa-ets-commitmentType"
-#define NID_id_smime_aa_ets_commitmentType		227
-#define OBJ_id_smime_aa_ets_commitmentType		OBJ_id_smime_aa,16L
-
-#define SN_id_smime_aa_ets_signerLocation		"id-smime-aa-ets-signerLocation"
-#define NID_id_smime_aa_ets_signerLocation		228
-#define OBJ_id_smime_aa_ets_signerLocation		OBJ_id_smime_aa,17L
-
-#define SN_id_smime_aa_ets_signerAttr		"id-smime-aa-ets-signerAttr"
-#define NID_id_smime_aa_ets_signerAttr		229
-#define OBJ_id_smime_aa_ets_signerAttr		OBJ_id_smime_aa,18L
-
-#define SN_id_smime_aa_ets_otherSigCert		"id-smime-aa-ets-otherSigCert"
-#define NID_id_smime_aa_ets_otherSigCert		230
-#define OBJ_id_smime_aa_ets_otherSigCert		OBJ_id_smime_aa,19L
-
-#define SN_id_smime_aa_ets_contentTimestamp		"id-smime-aa-ets-contentTimestamp"
-#define NID_id_smime_aa_ets_contentTimestamp		231
-#define OBJ_id_smime_aa_ets_contentTimestamp		OBJ_id_smime_aa,20L
-
-#define SN_id_smime_aa_ets_CertificateRefs		"id-smime-aa-ets-CertificateRefs"
-#define NID_id_smime_aa_ets_CertificateRefs		232
-#define OBJ_id_smime_aa_ets_CertificateRefs		OBJ_id_smime_aa,21L
-
-#define SN_id_smime_aa_ets_RevocationRefs		"id-smime-aa-ets-RevocationRefs"
-#define NID_id_smime_aa_ets_RevocationRefs		233
-#define OBJ_id_smime_aa_ets_RevocationRefs		OBJ_id_smime_aa,22L
-
-#define SN_id_smime_aa_ets_certValues		"id-smime-aa-ets-certValues"
-#define NID_id_smime_aa_ets_certValues		234
-#define OBJ_id_smime_aa_ets_certValues		OBJ_id_smime_aa,23L
-
-#define SN_id_smime_aa_ets_revocationValues		"id-smime-aa-ets-revocationValues"
-#define NID_id_smime_aa_ets_revocationValues		235
-#define OBJ_id_smime_aa_ets_revocationValues		OBJ_id_smime_aa,24L
-
-#define SN_id_smime_aa_ets_escTimeStamp		"id-smime-aa-ets-escTimeStamp"
-#define NID_id_smime_aa_ets_escTimeStamp		236
-#define OBJ_id_smime_aa_ets_escTimeStamp		OBJ_id_smime_aa,25L
-
-#define SN_id_smime_aa_ets_certCRLTimestamp		"id-smime-aa-ets-certCRLTimestamp"
-#define NID_id_smime_aa_ets_certCRLTimestamp		237
-#define OBJ_id_smime_aa_ets_certCRLTimestamp		OBJ_id_smime_aa,26L
-
-#define SN_id_smime_aa_ets_archiveTimeStamp		"id-smime-aa-ets-archiveTimeStamp"
-#define NID_id_smime_aa_ets_archiveTimeStamp		238
-#define OBJ_id_smime_aa_ets_archiveTimeStamp		OBJ_id_smime_aa,27L
-
-#define SN_id_smime_aa_signatureType		"id-smime-aa-signatureType"
-#define NID_id_smime_aa_signatureType		239
-#define OBJ_id_smime_aa_signatureType		OBJ_id_smime_aa,28L
-
-#define SN_id_smime_aa_dvcs_dvc		"id-smime-aa-dvcs-dvc"
-#define NID_id_smime_aa_dvcs_dvc		240
-#define OBJ_id_smime_aa_dvcs_dvc		OBJ_id_smime_aa,29L
-
-#define SN_id_smime_alg_ESDHwith3DES		"id-smime-alg-ESDHwith3DES"
-#define NID_id_smime_alg_ESDHwith3DES		241
-#define OBJ_id_smime_alg_ESDHwith3DES		OBJ_id_smime_alg,1L
-
-#define SN_id_smime_alg_ESDHwithRC2		"id-smime-alg-ESDHwithRC2"
-#define NID_id_smime_alg_ESDHwithRC2		242
-#define OBJ_id_smime_alg_ESDHwithRC2		OBJ_id_smime_alg,2L
-
-#define SN_id_smime_alg_3DESwrap		"id-smime-alg-3DESwrap"
-#define NID_id_smime_alg_3DESwrap		243
-#define OBJ_id_smime_alg_3DESwrap		OBJ_id_smime_alg,3L
-
-#define SN_id_smime_alg_RC2wrap		"id-smime-alg-RC2wrap"
-#define NID_id_smime_alg_RC2wrap		244
-#define OBJ_id_smime_alg_RC2wrap		OBJ_id_smime_alg,4L
-
-#define SN_id_smime_alg_ESDH		"id-smime-alg-ESDH"
-#define NID_id_smime_alg_ESDH		245
-#define OBJ_id_smime_alg_ESDH		OBJ_id_smime_alg,5L
-
-#define SN_id_smime_alg_CMS3DESwrap		"id-smime-alg-CMS3DESwrap"
-#define NID_id_smime_alg_CMS3DESwrap		246
-#define OBJ_id_smime_alg_CMS3DESwrap		OBJ_id_smime_alg,6L
-
-#define SN_id_smime_alg_CMSRC2wrap		"id-smime-alg-CMSRC2wrap"
-#define NID_id_smime_alg_CMSRC2wrap		247
-#define OBJ_id_smime_alg_CMSRC2wrap		OBJ_id_smime_alg,7L
-
-#define SN_id_smime_cd_ldap		"id-smime-cd-ldap"
-#define NID_id_smime_cd_ldap		248
-#define OBJ_id_smime_cd_ldap		OBJ_id_smime_cd,1L
-
-#define SN_id_smime_spq_ets_sqt_uri		"id-smime-spq-ets-sqt-uri"
-#define NID_id_smime_spq_ets_sqt_uri		249
-#define OBJ_id_smime_spq_ets_sqt_uri		OBJ_id_smime_spq,1L
-
-#define SN_id_smime_spq_ets_sqt_unotice		"id-smime-spq-ets-sqt-unotice"
-#define NID_id_smime_spq_ets_sqt_unotice		250
-#define OBJ_id_smime_spq_ets_sqt_unotice		OBJ_id_smime_spq,2L
-
-#define SN_id_smime_cti_ets_proofOfOrigin		"id-smime-cti-ets-proofOfOrigin"
-#define NID_id_smime_cti_ets_proofOfOrigin		251
-#define OBJ_id_smime_cti_ets_proofOfOrigin		OBJ_id_smime_cti,1L
-
-#define SN_id_smime_cti_ets_proofOfReceipt		"id-smime-cti-ets-proofOfReceipt"
-#define NID_id_smime_cti_ets_proofOfReceipt		252
-#define OBJ_id_smime_cti_ets_proofOfReceipt		OBJ_id_smime_cti,2L
-
-#define SN_id_smime_cti_ets_proofOfDelivery		"id-smime-cti-ets-proofOfDelivery"
-#define NID_id_smime_cti_ets_proofOfDelivery		253
-#define OBJ_id_smime_cti_ets_proofOfDelivery		OBJ_id_smime_cti,3L
-
-#define SN_id_smime_cti_ets_proofOfSender		"id-smime-cti-ets-proofOfSender"
-#define NID_id_smime_cti_ets_proofOfSender		254
-#define OBJ_id_smime_cti_ets_proofOfSender		OBJ_id_smime_cti,4L
-
-#define SN_id_smime_cti_ets_proofOfApproval		"id-smime-cti-ets-proofOfApproval"
-#define NID_id_smime_cti_ets_proofOfApproval		255
-#define OBJ_id_smime_cti_ets_proofOfApproval		OBJ_id_smime_cti,5L
-
-#define SN_id_smime_cti_ets_proofOfCreation		"id-smime-cti-ets-proofOfCreation"
-#define NID_id_smime_cti_ets_proofOfCreation		256
-#define OBJ_id_smime_cti_ets_proofOfCreation		OBJ_id_smime_cti,6L
-
-#define LN_friendlyName		"friendlyName"
-#define NID_friendlyName		156
-#define OBJ_friendlyName		OBJ_pkcs9,20L
-
-#define LN_localKeyID		"localKeyID"
-#define NID_localKeyID		157
-#define OBJ_localKeyID		OBJ_pkcs9,21L
-
-#define SN_ms_csp_name		"CSPName"
-#define LN_ms_csp_name		"Microsoft CSP Name"
-#define NID_ms_csp_name		417
-#define OBJ_ms_csp_name		1L,3L,6L,1L,4L,1L,311L,17L,1L
-
-#define SN_LocalKeySet		"LocalKeySet"
-#define LN_LocalKeySet		"Microsoft Local Key set"
-#define NID_LocalKeySet		856
-#define OBJ_LocalKeySet		1L,3L,6L,1L,4L,1L,311L,17L,2L
-
-#define OBJ_certTypes		OBJ_pkcs9,22L
-
-#define LN_x509Certificate		"x509Certificate"
-#define NID_x509Certificate		158
-#define OBJ_x509Certificate		OBJ_certTypes,1L
-
-#define LN_sdsiCertificate		"sdsiCertificate"
-#define NID_sdsiCertificate		159
-#define OBJ_sdsiCertificate		OBJ_certTypes,2L
-
-#define OBJ_crlTypes		OBJ_pkcs9,23L
-
-#define LN_x509Crl		"x509Crl"
-#define NID_x509Crl		160
-#define OBJ_x509Crl		OBJ_crlTypes,1L
-
-#define OBJ_pkcs12		OBJ_pkcs,12L
-
-#define OBJ_pkcs12_pbeids		OBJ_pkcs12,1L
-
-#define SN_pbe_WithSHA1And128BitRC4		"PBE-SHA1-RC4-128"
-#define LN_pbe_WithSHA1And128BitRC4		"pbeWithSHA1And128BitRC4"
-#define NID_pbe_WithSHA1And128BitRC4		144
-#define OBJ_pbe_WithSHA1And128BitRC4		OBJ_pkcs12_pbeids,1L
-
-#define SN_pbe_WithSHA1And40BitRC4		"PBE-SHA1-RC4-40"
-#define LN_pbe_WithSHA1And40BitRC4		"pbeWithSHA1And40BitRC4"
-#define NID_pbe_WithSHA1And40BitRC4		145
-#define OBJ_pbe_WithSHA1And40BitRC4		OBJ_pkcs12_pbeids,2L
-
-#define SN_pbe_WithSHA1And3_Key_TripleDES_CBC		"PBE-SHA1-3DES"
-#define LN_pbe_WithSHA1And3_Key_TripleDES_CBC		"pbeWithSHA1And3-KeyTripleDES-CBC"
-#define NID_pbe_WithSHA1And3_Key_TripleDES_CBC		146
-#define OBJ_pbe_WithSHA1And3_Key_TripleDES_CBC		OBJ_pkcs12_pbeids,3L
-
-#define SN_pbe_WithSHA1And2_Key_TripleDES_CBC		"PBE-SHA1-2DES"
-#define LN_pbe_WithSHA1And2_Key_TripleDES_CBC		"pbeWithSHA1And2-KeyTripleDES-CBC"
-#define NID_pbe_WithSHA1And2_Key_TripleDES_CBC		147
-#define OBJ_pbe_WithSHA1And2_Key_TripleDES_CBC		OBJ_pkcs12_pbeids,4L
-
-#define SN_pbe_WithSHA1And128BitRC2_CBC		"PBE-SHA1-RC2-128"
-#define LN_pbe_WithSHA1And128BitRC2_CBC		"pbeWithSHA1And128BitRC2-CBC"
-#define NID_pbe_WithSHA1And128BitRC2_CBC		148
-#define OBJ_pbe_WithSHA1And128BitRC2_CBC		OBJ_pkcs12_pbeids,5L
-
-#define SN_pbe_WithSHA1And40BitRC2_CBC		"PBE-SHA1-RC2-40"
-#define LN_pbe_WithSHA1And40BitRC2_CBC		"pbeWithSHA1And40BitRC2-CBC"
-#define NID_pbe_WithSHA1And40BitRC2_CBC		149
-#define OBJ_pbe_WithSHA1And40BitRC2_CBC		OBJ_pkcs12_pbeids,6L
-
-#define OBJ_pkcs12_Version1		OBJ_pkcs12,10L
-
-#define OBJ_pkcs12_BagIds		OBJ_pkcs12_Version1,1L
-
-#define LN_keyBag		"keyBag"
-#define NID_keyBag		150
-#define OBJ_keyBag		OBJ_pkcs12_BagIds,1L
-
-#define LN_pkcs8ShroudedKeyBag		"pkcs8ShroudedKeyBag"
-#define NID_pkcs8ShroudedKeyBag		151
-#define OBJ_pkcs8ShroudedKeyBag		OBJ_pkcs12_BagIds,2L
-
-#define LN_certBag		"certBag"
-#define NID_certBag		152
-#define OBJ_certBag		OBJ_pkcs12_BagIds,3L
-
-#define LN_crlBag		"crlBag"
-#define NID_crlBag		153
-#define OBJ_crlBag		OBJ_pkcs12_BagIds,4L
-
-#define LN_secretBag		"secretBag"
-#define NID_secretBag		154
-#define OBJ_secretBag		OBJ_pkcs12_BagIds,5L
-
-#define LN_safeContentsBag		"safeContentsBag"
-#define NID_safeContentsBag		155
-#define OBJ_safeContentsBag		OBJ_pkcs12_BagIds,6L
-
-#define SN_md2		"MD2"
-#define LN_md2		"md2"
-#define NID_md2		3
-#define OBJ_md2		OBJ_rsadsi,2L,2L
-
-#define SN_md4		"MD4"
-#define LN_md4		"md4"
-#define NID_md4		257
-#define OBJ_md4		OBJ_rsadsi,2L,4L
-
-#define SN_md5		"MD5"
-#define LN_md5		"md5"
-#define NID_md5		4
-#define OBJ_md5		OBJ_rsadsi,2L,5L
-
-#define SN_md5_sha1		"MD5-SHA1"
-#define LN_md5_sha1		"md5-sha1"
-#define NID_md5_sha1		114
-
-#define LN_hmacWithMD5		"hmacWithMD5"
-#define NID_hmacWithMD5		797
-#define OBJ_hmacWithMD5		OBJ_rsadsi,2L,6L
-
-#define LN_hmacWithSHA1		"hmacWithSHA1"
-#define NID_hmacWithSHA1		163
-#define OBJ_hmacWithSHA1		OBJ_rsadsi,2L,7L
-
-#define LN_hmacWithSHA224		"hmacWithSHA224"
-#define NID_hmacWithSHA224		798
-#define OBJ_hmacWithSHA224		OBJ_rsadsi,2L,8L
-
-#define LN_hmacWithSHA256		"hmacWithSHA256"
-#define NID_hmacWithSHA256		799
-#define OBJ_hmacWithSHA256		OBJ_rsadsi,2L,9L
-
-#define LN_hmacWithSHA384		"hmacWithSHA384"
-#define NID_hmacWithSHA384		800
-#define OBJ_hmacWithSHA384		OBJ_rsadsi,2L,10L
-
-#define LN_hmacWithSHA512		"hmacWithSHA512"
-#define NID_hmacWithSHA512		801
-#define OBJ_hmacWithSHA512		OBJ_rsadsi,2L,11L
-
-#define SN_rc2_cbc		"RC2-CBC"
-#define LN_rc2_cbc		"rc2-cbc"
-#define NID_rc2_cbc		37
-#define OBJ_rc2_cbc		OBJ_rsadsi,3L,2L
-
-#define SN_rc2_ecb		"RC2-ECB"
-#define LN_rc2_ecb		"rc2-ecb"
-#define NID_rc2_ecb		38
-
-#define SN_rc2_cfb64		"RC2-CFB"
-#define LN_rc2_cfb64		"rc2-cfb"
-#define NID_rc2_cfb64		39
-
-#define SN_rc2_ofb64		"RC2-OFB"
-#define LN_rc2_ofb64		"rc2-ofb"
-#define NID_rc2_ofb64		40
-
-#define SN_rc2_40_cbc		"RC2-40-CBC"
-#define LN_rc2_40_cbc		"rc2-40-cbc"
-#define NID_rc2_40_cbc		98
-
-#define SN_rc2_64_cbc		"RC2-64-CBC"
-#define LN_rc2_64_cbc		"rc2-64-cbc"
-#define NID_rc2_64_cbc		166
-
-#define SN_rc4		"RC4"
-#define LN_rc4		"rc4"
-#define NID_rc4		5
-#define OBJ_rc4		OBJ_rsadsi,3L,4L
-
-#define SN_rc4_40		"RC4-40"
-#define LN_rc4_40		"rc4-40"
-#define NID_rc4_40		97
-
-#define SN_des_ede3_cbc		"DES-EDE3-CBC"
-#define LN_des_ede3_cbc		"des-ede3-cbc"
-#define NID_des_ede3_cbc		44
-#define OBJ_des_ede3_cbc		OBJ_rsadsi,3L,7L
-
-#define SN_rc5_cbc		"RC5-CBC"
-#define LN_rc5_cbc		"rc5-cbc"
-#define NID_rc5_cbc		120
-#define OBJ_rc5_cbc		OBJ_rsadsi,3L,8L
-
-#define SN_rc5_ecb		"RC5-ECB"
-#define LN_rc5_ecb		"rc5-ecb"
-#define NID_rc5_ecb		121
-
-#define SN_rc5_cfb64		"RC5-CFB"
-#define LN_rc5_cfb64		"rc5-cfb"
-#define NID_rc5_cfb64		122
-
-#define SN_rc5_ofb64		"RC5-OFB"
-#define LN_rc5_ofb64		"rc5-ofb"
-#define NID_rc5_ofb64		123
-
-#define SN_ms_ext_req		"msExtReq"
-#define LN_ms_ext_req		"Microsoft Extension Request"
-#define NID_ms_ext_req		171
-#define OBJ_ms_ext_req		1L,3L,6L,1L,4L,1L,311L,2L,1L,14L
-
-#define SN_ms_code_ind		"msCodeInd"
-#define LN_ms_code_ind		"Microsoft Individual Code Signing"
-#define NID_ms_code_ind		134
-#define OBJ_ms_code_ind		1L,3L,6L,1L,4L,1L,311L,2L,1L,21L
-
-#define SN_ms_code_com		"msCodeCom"
-#define LN_ms_code_com		"Microsoft Commercial Code Signing"
-#define NID_ms_code_com		135
-#define OBJ_ms_code_com		1L,3L,6L,1L,4L,1L,311L,2L,1L,22L
-
-#define SN_ms_ctl_sign		"msCTLSign"
-#define LN_ms_ctl_sign		"Microsoft Trust List Signing"
-#define NID_ms_ctl_sign		136
-#define OBJ_ms_ctl_sign		1L,3L,6L,1L,4L,1L,311L,10L,3L,1L
-
-#define SN_ms_sgc		"msSGC"
-#define LN_ms_sgc		"Microsoft Server Gated Crypto"
-#define NID_ms_sgc		137
-#define OBJ_ms_sgc		1L,3L,6L,1L,4L,1L,311L,10L,3L,3L
-
-#define SN_ms_efs		"msEFS"
-#define LN_ms_efs		"Microsoft Encrypted File System"
-#define NID_ms_efs		138
-#define OBJ_ms_efs		1L,3L,6L,1L,4L,1L,311L,10L,3L,4L
-
-#define SN_ms_smartcard_login		"msSmartcardLogin"
-#define LN_ms_smartcard_login		"Microsoft Smartcardlogin"
-#define NID_ms_smartcard_login		648
-#define OBJ_ms_smartcard_login		1L,3L,6L,1L,4L,1L,311L,20L,2L,2L
-
-#define SN_ms_upn		"msUPN"
-#define LN_ms_upn		"Microsoft Universal Principal Name"
-#define NID_ms_upn		649
-#define OBJ_ms_upn		1L,3L,6L,1L,4L,1L,311L,20L,2L,3L
-
-#define SN_idea_cbc		"IDEA-CBC"
-#define LN_idea_cbc		"idea-cbc"
-#define NID_idea_cbc		34
-#define OBJ_idea_cbc		1L,3L,6L,1L,4L,1L,188L,7L,1L,1L,2L
-
-#define SN_idea_ecb		"IDEA-ECB"
-#define LN_idea_ecb		"idea-ecb"
-#define NID_idea_ecb		36
-
-#define SN_idea_cfb64		"IDEA-CFB"
-#define LN_idea_cfb64		"idea-cfb"
-#define NID_idea_cfb64		35
-
-#define SN_idea_ofb64		"IDEA-OFB"
-#define LN_idea_ofb64		"idea-ofb"
-#define NID_idea_ofb64		46
-
-#define SN_bf_cbc		"BF-CBC"
-#define LN_bf_cbc		"bf-cbc"
-#define NID_bf_cbc		91
-#define OBJ_bf_cbc		1L,3L,6L,1L,4L,1L,3029L,1L,2L
-
-#define SN_bf_ecb		"BF-ECB"
-#define LN_bf_ecb		"bf-ecb"
-#define NID_bf_ecb		92
-
-#define SN_bf_cfb64		"BF-CFB"
-#define LN_bf_cfb64		"bf-cfb"
-#define NID_bf_cfb64		93
-
-#define SN_bf_ofb64		"BF-OFB"
-#define LN_bf_ofb64		"bf-ofb"
-#define NID_bf_ofb64		94
-
-#define SN_id_pkix		"PKIX"
-#define NID_id_pkix		127
-#define OBJ_id_pkix		1L,3L,6L,1L,5L,5L,7L
-
-#define SN_id_pkix_mod		"id-pkix-mod"
-#define NID_id_pkix_mod		258
-#define OBJ_id_pkix_mod		OBJ_id_pkix,0L
-
-#define SN_id_pe		"id-pe"
-#define NID_id_pe		175
-#define OBJ_id_pe		OBJ_id_pkix,1L
-
-#define SN_id_qt		"id-qt"
-#define NID_id_qt		259
-#define OBJ_id_qt		OBJ_id_pkix,2L
-
-#define SN_id_kp		"id-kp"
-#define NID_id_kp		128
-#define OBJ_id_kp		OBJ_id_pkix,3L
-
-#define SN_id_it		"id-it"
-#define NID_id_it		260
-#define OBJ_id_it		OBJ_id_pkix,4L
-
-#define SN_id_pkip		"id-pkip"
-#define NID_id_pkip		261
-#define OBJ_id_pkip		OBJ_id_pkix,5L
-
-#define SN_id_alg		"id-alg"
-#define NID_id_alg		262
-#define OBJ_id_alg		OBJ_id_pkix,6L
-
-#define SN_id_cmc		"id-cmc"
-#define NID_id_cmc		263
-#define OBJ_id_cmc		OBJ_id_pkix,7L
-
-#define SN_id_on		"id-on"
-#define NID_id_on		264
-#define OBJ_id_on		OBJ_id_pkix,8L
-
-#define SN_id_pda		"id-pda"
-#define NID_id_pda		265
-#define OBJ_id_pda		OBJ_id_pkix,9L
-
-#define SN_id_aca		"id-aca"
-#define NID_id_aca		266
-#define OBJ_id_aca		OBJ_id_pkix,10L
-
-#define SN_id_qcs		"id-qcs"
-#define NID_id_qcs		267
-#define OBJ_id_qcs		OBJ_id_pkix,11L
-
-#define SN_id_cct		"id-cct"
-#define NID_id_cct		268
-#define OBJ_id_cct		OBJ_id_pkix,12L
-
-#define SN_id_ppl		"id-ppl"
-#define NID_id_ppl		662
-#define OBJ_id_ppl		OBJ_id_pkix,21L
-
-#define SN_id_ad		"id-ad"
-#define NID_id_ad		176
-#define OBJ_id_ad		OBJ_id_pkix,48L
-
-#define SN_id_pkix1_explicit_88		"id-pkix1-explicit-88"
-#define NID_id_pkix1_explicit_88		269
-#define OBJ_id_pkix1_explicit_88		OBJ_id_pkix_mod,1L
-
-#define SN_id_pkix1_implicit_88		"id-pkix1-implicit-88"
-#define NID_id_pkix1_implicit_88		270
-#define OBJ_id_pkix1_implicit_88		OBJ_id_pkix_mod,2L
-
-#define SN_id_pkix1_explicit_93		"id-pkix1-explicit-93"
-#define NID_id_pkix1_explicit_93		271
-#define OBJ_id_pkix1_explicit_93		OBJ_id_pkix_mod,3L
-
-#define SN_id_pkix1_implicit_93		"id-pkix1-implicit-93"
-#define NID_id_pkix1_implicit_93		272
-#define OBJ_id_pkix1_implicit_93		OBJ_id_pkix_mod,4L
-
-#define SN_id_mod_crmf		"id-mod-crmf"
-#define NID_id_mod_crmf		273
-#define OBJ_id_mod_crmf		OBJ_id_pkix_mod,5L
-
-#define SN_id_mod_cmc		"id-mod-cmc"
-#define NID_id_mod_cmc		274
-#define OBJ_id_mod_cmc		OBJ_id_pkix_mod,6L
-
-#define SN_id_mod_kea_profile_88		"id-mod-kea-profile-88"
-#define NID_id_mod_kea_profile_88		275
-#define OBJ_id_mod_kea_profile_88		OBJ_id_pkix_mod,7L
-
-#define SN_id_mod_kea_profile_93		"id-mod-kea-profile-93"
-#define NID_id_mod_kea_profile_93		276
-#define OBJ_id_mod_kea_profile_93		OBJ_id_pkix_mod,8L
-
-#define SN_id_mod_cmp		"id-mod-cmp"
-#define NID_id_mod_cmp		277
-#define OBJ_id_mod_cmp		OBJ_id_pkix_mod,9L
-
-#define SN_id_mod_qualified_cert_88		"id-mod-qualified-cert-88"
-#define NID_id_mod_qualified_cert_88		278
-#define OBJ_id_mod_qualified_cert_88		OBJ_id_pkix_mod,10L
-
-#define SN_id_mod_qualified_cert_93		"id-mod-qualified-cert-93"
-#define NID_id_mod_qualified_cert_93		279
-#define OBJ_id_mod_qualified_cert_93		OBJ_id_pkix_mod,11L
-
-#define SN_id_mod_attribute_cert		"id-mod-attribute-cert"
-#define NID_id_mod_attribute_cert		280
-#define OBJ_id_mod_attribute_cert		OBJ_id_pkix_mod,12L
-
-#define SN_id_mod_timestamp_protocol		"id-mod-timestamp-protocol"
-#define NID_id_mod_timestamp_protocol		281
-#define OBJ_id_mod_timestamp_protocol		OBJ_id_pkix_mod,13L
-
-#define SN_id_mod_ocsp		"id-mod-ocsp"
-#define NID_id_mod_ocsp		282
-#define OBJ_id_mod_ocsp		OBJ_id_pkix_mod,14L
-
-#define SN_id_mod_dvcs		"id-mod-dvcs"
-#define NID_id_mod_dvcs		283
-#define OBJ_id_mod_dvcs		OBJ_id_pkix_mod,15L
-
-#define SN_id_mod_cmp2000		"id-mod-cmp2000"
-#define NID_id_mod_cmp2000		284
-#define OBJ_id_mod_cmp2000		OBJ_id_pkix_mod,16L
-
-#define SN_info_access		"authorityInfoAccess"
-#define LN_info_access		"Authority Information Access"
-#define NID_info_access		177
-#define OBJ_info_access		OBJ_id_pe,1L
-
-#define SN_biometricInfo		"biometricInfo"
-#define LN_biometricInfo		"Biometric Info"
-#define NID_biometricInfo		285
-#define OBJ_biometricInfo		OBJ_id_pe,2L
-
-#define SN_qcStatements		"qcStatements"
-#define NID_qcStatements		286
-#define OBJ_qcStatements		OBJ_id_pe,3L
-
-#define SN_ac_auditEntity		"ac-auditEntity"
-#define NID_ac_auditEntity		287
-#define OBJ_ac_auditEntity		OBJ_id_pe,4L
-
-#define SN_ac_targeting		"ac-targeting"
-#define NID_ac_targeting		288
-#define OBJ_ac_targeting		OBJ_id_pe,5L
-
-#define SN_aaControls		"aaControls"
-#define NID_aaControls		289
-#define OBJ_aaControls		OBJ_id_pe,6L
-
-#define SN_sbgp_ipAddrBlock		"sbgp-ipAddrBlock"
-#define NID_sbgp_ipAddrBlock		290
-#define OBJ_sbgp_ipAddrBlock		OBJ_id_pe,7L
-
-#define SN_sbgp_autonomousSysNum		"sbgp-autonomousSysNum"
-#define NID_sbgp_autonomousSysNum		291
-#define OBJ_sbgp_autonomousSysNum		OBJ_id_pe,8L
-
-#define SN_sbgp_routerIdentifier		"sbgp-routerIdentifier"
-#define NID_sbgp_routerIdentifier		292
-#define OBJ_sbgp_routerIdentifier		OBJ_id_pe,9L
-
-#define SN_ac_proxying		"ac-proxying"
-#define NID_ac_proxying		397
-#define OBJ_ac_proxying		OBJ_id_pe,10L
-
-#define SN_sinfo_access		"subjectInfoAccess"
-#define LN_sinfo_access		"Subject Information Access"
-#define NID_sinfo_access		398
-#define OBJ_sinfo_access		OBJ_id_pe,11L
-
-#define SN_proxyCertInfo		"proxyCertInfo"
-#define LN_proxyCertInfo		"Proxy Certificate Information"
-#define NID_proxyCertInfo		663
-#define OBJ_proxyCertInfo		OBJ_id_pe,14L
-
-#define SN_id_qt_cps		"id-qt-cps"
-#define LN_id_qt_cps		"Policy Qualifier CPS"
-#define NID_id_qt_cps		164
-#define OBJ_id_qt_cps		OBJ_id_qt,1L
-
-#define SN_id_qt_unotice		"id-qt-unotice"
-#define LN_id_qt_unotice		"Policy Qualifier User Notice"
-#define NID_id_qt_unotice		165
-#define OBJ_id_qt_unotice		OBJ_id_qt,2L
-
-#define SN_textNotice		"textNotice"
-#define NID_textNotice		293
-#define OBJ_textNotice		OBJ_id_qt,3L
-
-#define SN_server_auth		"serverAuth"
-#define LN_server_auth		"TLS Web Server Authentication"
-#define NID_server_auth		129
-#define OBJ_server_auth		OBJ_id_kp,1L
-
-#define SN_client_auth		"clientAuth"
-#define LN_client_auth		"TLS Web Client Authentication"
-#define NID_client_auth		130
-#define OBJ_client_auth		OBJ_id_kp,2L
-
-#define SN_code_sign		"codeSigning"
-#define LN_code_sign		"Code Signing"
-#define NID_code_sign		131
-#define OBJ_code_sign		OBJ_id_kp,3L
-
-#define SN_email_protect		"emailProtection"
-#define LN_email_protect		"E-mail Protection"
-#define NID_email_protect		132
-#define OBJ_email_protect		OBJ_id_kp,4L
-
-#define SN_ipsecEndSystem		"ipsecEndSystem"
-#define LN_ipsecEndSystem		"IPSec End System"
-#define NID_ipsecEndSystem		294
-#define OBJ_ipsecEndSystem		OBJ_id_kp,5L
-
-#define SN_ipsecTunnel		"ipsecTunnel"
-#define LN_ipsecTunnel		"IPSec Tunnel"
-#define NID_ipsecTunnel		295
-#define OBJ_ipsecTunnel		OBJ_id_kp,6L
-
-#define SN_ipsecUser		"ipsecUser"
-#define LN_ipsecUser		"IPSec User"
-#define NID_ipsecUser		296
-#define OBJ_ipsecUser		OBJ_id_kp,7L
-
-#define SN_time_stamp		"timeStamping"
-#define LN_time_stamp		"Time Stamping"
-#define NID_time_stamp		133
-#define OBJ_time_stamp		OBJ_id_kp,8L
-
-#define SN_OCSP_sign		"OCSPSigning"
-#define LN_OCSP_sign		"OCSP Signing"
-#define NID_OCSP_sign		180
-#define OBJ_OCSP_sign		OBJ_id_kp,9L
-
-#define SN_dvcs		"DVCS"
-#define LN_dvcs		"dvcs"
-#define NID_dvcs		297
-#define OBJ_dvcs		OBJ_id_kp,10L
-
-#define SN_id_it_caProtEncCert		"id-it-caProtEncCert"
-#define NID_id_it_caProtEncCert		298
-#define OBJ_id_it_caProtEncCert		OBJ_id_it,1L
-
-#define SN_id_it_signKeyPairTypes		"id-it-signKeyPairTypes"
-#define NID_id_it_signKeyPairTypes		299
-#define OBJ_id_it_signKeyPairTypes		OBJ_id_it,2L
-
-#define SN_id_it_encKeyPairTypes		"id-it-encKeyPairTypes"
-#define NID_id_it_encKeyPairTypes		300
-#define OBJ_id_it_encKeyPairTypes		OBJ_id_it,3L
-
-#define SN_id_it_preferredSymmAlg		"id-it-preferredSymmAlg"
-#define NID_id_it_preferredSymmAlg		301
-#define OBJ_id_it_preferredSymmAlg		OBJ_id_it,4L
-
-#define SN_id_it_caKeyUpdateInfo		"id-it-caKeyUpdateInfo"
-#define NID_id_it_caKeyUpdateInfo		302
-#define OBJ_id_it_caKeyUpdateInfo		OBJ_id_it,5L
-
-#define SN_id_it_currentCRL		"id-it-currentCRL"
-#define NID_id_it_currentCRL		303
-#define OBJ_id_it_currentCRL		OBJ_id_it,6L
-
-#define SN_id_it_unsupportedOIDs		"id-it-unsupportedOIDs"
-#define NID_id_it_unsupportedOIDs		304
-#define OBJ_id_it_unsupportedOIDs		OBJ_id_it,7L
-
-#define SN_id_it_subscriptionRequest		"id-it-subscriptionRequest"
-#define NID_id_it_subscriptionRequest		305
-#define OBJ_id_it_subscriptionRequest		OBJ_id_it,8L
-
-#define SN_id_it_subscriptionResponse		"id-it-subscriptionResponse"
-#define NID_id_it_subscriptionResponse		306
-#define OBJ_id_it_subscriptionResponse		OBJ_id_it,9L
-
-#define SN_id_it_keyPairParamReq		"id-it-keyPairParamReq"
-#define NID_id_it_keyPairParamReq		307
-#define OBJ_id_it_keyPairParamReq		OBJ_id_it,10L
-
-#define SN_id_it_keyPairParamRep		"id-it-keyPairParamRep"
-#define NID_id_it_keyPairParamRep		308
-#define OBJ_id_it_keyPairParamRep		OBJ_id_it,11L
-
-#define SN_id_it_revPassphrase		"id-it-revPassphrase"
-#define NID_id_it_revPassphrase		309
-#define OBJ_id_it_revPassphrase		OBJ_id_it,12L
-
-#define SN_id_it_implicitConfirm		"id-it-implicitConfirm"
-#define NID_id_it_implicitConfirm		310
-#define OBJ_id_it_implicitConfirm		OBJ_id_it,13L
-
-#define SN_id_it_confirmWaitTime		"id-it-confirmWaitTime"
-#define NID_id_it_confirmWaitTime		311
-#define OBJ_id_it_confirmWaitTime		OBJ_id_it,14L
-
-#define SN_id_it_origPKIMessage		"id-it-origPKIMessage"
-#define NID_id_it_origPKIMessage		312
-#define OBJ_id_it_origPKIMessage		OBJ_id_it,15L
-
-#define SN_id_it_suppLangTags		"id-it-suppLangTags"
-#define NID_id_it_suppLangTags		784
-#define OBJ_id_it_suppLangTags		OBJ_id_it,16L
-
-#define SN_id_regCtrl		"id-regCtrl"
-#define NID_id_regCtrl		313
-#define OBJ_id_regCtrl		OBJ_id_pkip,1L
-
-#define SN_id_regInfo		"id-regInfo"
-#define NID_id_regInfo		314
-#define OBJ_id_regInfo		OBJ_id_pkip,2L
-
-#define SN_id_regCtrl_regToken		"id-regCtrl-regToken"
-#define NID_id_regCtrl_regToken		315
-#define OBJ_id_regCtrl_regToken		OBJ_id_regCtrl,1L
-
-#define SN_id_regCtrl_authenticator		"id-regCtrl-authenticator"
-#define NID_id_regCtrl_authenticator		316
-#define OBJ_id_regCtrl_authenticator		OBJ_id_regCtrl,2L
-
-#define SN_id_regCtrl_pkiPublicationInfo		"id-regCtrl-pkiPublicationInfo"
-#define NID_id_regCtrl_pkiPublicationInfo		317
-#define OBJ_id_regCtrl_pkiPublicationInfo		OBJ_id_regCtrl,3L
-
-#define SN_id_regCtrl_pkiArchiveOptions		"id-regCtrl-pkiArchiveOptions"
-#define NID_id_regCtrl_pkiArchiveOptions		318
-#define OBJ_id_regCtrl_pkiArchiveOptions		OBJ_id_regCtrl,4L
-
-#define SN_id_regCtrl_oldCertID		"id-regCtrl-oldCertID"
-#define NID_id_regCtrl_oldCertID		319
-#define OBJ_id_regCtrl_oldCertID		OBJ_id_regCtrl,5L
-
-#define SN_id_regCtrl_protocolEncrKey		"id-regCtrl-protocolEncrKey"
-#define NID_id_regCtrl_protocolEncrKey		320
-#define OBJ_id_regCtrl_protocolEncrKey		OBJ_id_regCtrl,6L
-
-#define SN_id_regInfo_utf8Pairs		"id-regInfo-utf8Pairs"
-#define NID_id_regInfo_utf8Pairs		321
-#define OBJ_id_regInfo_utf8Pairs		OBJ_id_regInfo,1L
-
-#define SN_id_regInfo_certReq		"id-regInfo-certReq"
-#define NID_id_regInfo_certReq		322
-#define OBJ_id_regInfo_certReq		OBJ_id_regInfo,2L
-
-#define SN_id_alg_des40		"id-alg-des40"
-#define NID_id_alg_des40		323
-#define OBJ_id_alg_des40		OBJ_id_alg,1L
-
-#define SN_id_alg_noSignature		"id-alg-noSignature"
-#define NID_id_alg_noSignature		324
-#define OBJ_id_alg_noSignature		OBJ_id_alg,2L
-
-#define SN_id_alg_dh_sig_hmac_sha1		"id-alg-dh-sig-hmac-sha1"
-#define NID_id_alg_dh_sig_hmac_sha1		325
-#define OBJ_id_alg_dh_sig_hmac_sha1		OBJ_id_alg,3L
-
-#define SN_id_alg_dh_pop		"id-alg-dh-pop"
-#define NID_id_alg_dh_pop		326
-#define OBJ_id_alg_dh_pop		OBJ_id_alg,4L
-
-#define SN_id_cmc_statusInfo		"id-cmc-statusInfo"
-#define NID_id_cmc_statusInfo		327
-#define OBJ_id_cmc_statusInfo		OBJ_id_cmc,1L
-
-#define SN_id_cmc_identification		"id-cmc-identification"
-#define NID_id_cmc_identification		328
-#define OBJ_id_cmc_identification		OBJ_id_cmc,2L
-
-#define SN_id_cmc_identityProof		"id-cmc-identityProof"
-#define NID_id_cmc_identityProof		329
-#define OBJ_id_cmc_identityProof		OBJ_id_cmc,3L
-
-#define SN_id_cmc_dataReturn		"id-cmc-dataReturn"
-#define NID_id_cmc_dataReturn		330
-#define OBJ_id_cmc_dataReturn		OBJ_id_cmc,4L
-
-#define SN_id_cmc_transactionId		"id-cmc-transactionId"
-#define NID_id_cmc_transactionId		331
-#define OBJ_id_cmc_transactionId		OBJ_id_cmc,5L
-
-#define SN_id_cmc_senderNonce		"id-cmc-senderNonce"
-#define NID_id_cmc_senderNonce		332
-#define OBJ_id_cmc_senderNonce		OBJ_id_cmc,6L
-
-#define SN_id_cmc_recipientNonce		"id-cmc-recipientNonce"
-#define NID_id_cmc_recipientNonce		333
-#define OBJ_id_cmc_recipientNonce		OBJ_id_cmc,7L
-
-#define SN_id_cmc_addExtensions		"id-cmc-addExtensions"
-#define NID_id_cmc_addExtensions		334
-#define OBJ_id_cmc_addExtensions		OBJ_id_cmc,8L
-
-#define SN_id_cmc_encryptedPOP		"id-cmc-encryptedPOP"
-#define NID_id_cmc_encryptedPOP		335
-#define OBJ_id_cmc_encryptedPOP		OBJ_id_cmc,9L
-
-#define SN_id_cmc_decryptedPOP		"id-cmc-decryptedPOP"
-#define NID_id_cmc_decryptedPOP		336
-#define OBJ_id_cmc_decryptedPOP		OBJ_id_cmc,10L
-
-#define SN_id_cmc_lraPOPWitness		"id-cmc-lraPOPWitness"
-#define NID_id_cmc_lraPOPWitness		337
-#define OBJ_id_cmc_lraPOPWitness		OBJ_id_cmc,11L
-
-#define SN_id_cmc_getCert		"id-cmc-getCert"
-#define NID_id_cmc_getCert		338
-#define OBJ_id_cmc_getCert		OBJ_id_cmc,15L
-
-#define SN_id_cmc_getCRL		"id-cmc-getCRL"
-#define NID_id_cmc_getCRL		339
-#define OBJ_id_cmc_getCRL		OBJ_id_cmc,16L
-
-#define SN_id_cmc_revokeRequest		"id-cmc-revokeRequest"
-#define NID_id_cmc_revokeRequest		340
-#define OBJ_id_cmc_revokeRequest		OBJ_id_cmc,17L
-
-#define SN_id_cmc_regInfo		"id-cmc-regInfo"
-#define NID_id_cmc_regInfo		341
-#define OBJ_id_cmc_regInfo		OBJ_id_cmc,18L
-
-#define SN_id_cmc_responseInfo		"id-cmc-responseInfo"
-#define NID_id_cmc_responseInfo		342
-#define OBJ_id_cmc_responseInfo		OBJ_id_cmc,19L
-
-#define SN_id_cmc_queryPending		"id-cmc-queryPending"
-#define NID_id_cmc_queryPending		343
-#define OBJ_id_cmc_queryPending		OBJ_id_cmc,21L
-
-#define SN_id_cmc_popLinkRandom		"id-cmc-popLinkRandom"
-#define NID_id_cmc_popLinkRandom		344
-#define OBJ_id_cmc_popLinkRandom		OBJ_id_cmc,22L
-
-#define SN_id_cmc_popLinkWitness		"id-cmc-popLinkWitness"
-#define NID_id_cmc_popLinkWitness		345
-#define OBJ_id_cmc_popLinkWitness		OBJ_id_cmc,23L
-
-#define SN_id_cmc_confirmCertAcceptance		"id-cmc-confirmCertAcceptance"
-#define NID_id_cmc_confirmCertAcceptance		346
-#define OBJ_id_cmc_confirmCertAcceptance		OBJ_id_cmc,24L
-
-#define SN_id_on_personalData		"id-on-personalData"
-#define NID_id_on_personalData		347
-#define OBJ_id_on_personalData		OBJ_id_on,1L
-
-#define SN_id_on_permanentIdentifier		"id-on-permanentIdentifier"
-#define LN_id_on_permanentIdentifier		"Permanent Identifier"
-#define NID_id_on_permanentIdentifier		858
-#define OBJ_id_on_permanentIdentifier		OBJ_id_on,3L
-
-#define SN_id_pda_dateOfBirth		"id-pda-dateOfBirth"
-#define NID_id_pda_dateOfBirth		348
-#define OBJ_id_pda_dateOfBirth		OBJ_id_pda,1L
-
-#define SN_id_pda_placeOfBirth		"id-pda-placeOfBirth"
-#define NID_id_pda_placeOfBirth		349
-#define OBJ_id_pda_placeOfBirth		OBJ_id_pda,2L
-
-#define SN_id_pda_gender		"id-pda-gender"
-#define NID_id_pda_gender		351
-#define OBJ_id_pda_gender		OBJ_id_pda,3L
-
-#define SN_id_pda_countryOfCitizenship		"id-pda-countryOfCitizenship"
-#define NID_id_pda_countryOfCitizenship		352
-#define OBJ_id_pda_countryOfCitizenship		OBJ_id_pda,4L
-
-#define SN_id_pda_countryOfResidence		"id-pda-countryOfResidence"
-#define NID_id_pda_countryOfResidence		353
-#define OBJ_id_pda_countryOfResidence		OBJ_id_pda,5L
-
-#define SN_id_aca_authenticationInfo		"id-aca-authenticationInfo"
-#define NID_id_aca_authenticationInfo		354
-#define OBJ_id_aca_authenticationInfo		OBJ_id_aca,1L
-
-#define SN_id_aca_accessIdentity		"id-aca-accessIdentity"
-#define NID_id_aca_accessIdentity		355
-#define OBJ_id_aca_accessIdentity		OBJ_id_aca,2L
-
-#define SN_id_aca_chargingIdentity		"id-aca-chargingIdentity"
-#define NID_id_aca_chargingIdentity		356
-#define OBJ_id_aca_chargingIdentity		OBJ_id_aca,3L
-
-#define SN_id_aca_group		"id-aca-group"
-#define NID_id_aca_group		357
-#define OBJ_id_aca_group		OBJ_id_aca,4L
-
-#define SN_id_aca_role		"id-aca-role"
-#define NID_id_aca_role		358
-#define OBJ_id_aca_role		OBJ_id_aca,5L
-
-#define SN_id_aca_encAttrs		"id-aca-encAttrs"
-#define NID_id_aca_encAttrs		399
-#define OBJ_id_aca_encAttrs		OBJ_id_aca,6L
-
-#define SN_id_qcs_pkixQCSyntax_v1		"id-qcs-pkixQCSyntax-v1"
-#define NID_id_qcs_pkixQCSyntax_v1		359
-#define OBJ_id_qcs_pkixQCSyntax_v1		OBJ_id_qcs,1L
-
-#define SN_id_cct_crs		"id-cct-crs"
-#define NID_id_cct_crs		360
-#define OBJ_id_cct_crs		OBJ_id_cct,1L
-
-#define SN_id_cct_PKIData		"id-cct-PKIData"
-#define NID_id_cct_PKIData		361
-#define OBJ_id_cct_PKIData		OBJ_id_cct,2L
-
-#define SN_id_cct_PKIResponse		"id-cct-PKIResponse"
-#define NID_id_cct_PKIResponse		362
-#define OBJ_id_cct_PKIResponse		OBJ_id_cct,3L
-
-#define SN_id_ppl_anyLanguage		"id-ppl-anyLanguage"
-#define LN_id_ppl_anyLanguage		"Any language"
-#define NID_id_ppl_anyLanguage		664
-#define OBJ_id_ppl_anyLanguage		OBJ_id_ppl,0L
-
-#define SN_id_ppl_inheritAll		"id-ppl-inheritAll"
-#define LN_id_ppl_inheritAll		"Inherit all"
-#define NID_id_ppl_inheritAll		665
-#define OBJ_id_ppl_inheritAll		OBJ_id_ppl,1L
-
-#define SN_Independent		"id-ppl-independent"
-#define LN_Independent		"Independent"
-#define NID_Independent		667
-#define OBJ_Independent		OBJ_id_ppl,2L
-
-#define SN_ad_OCSP		"OCSP"
-#define LN_ad_OCSP		"OCSP"
-#define NID_ad_OCSP		178
-#define OBJ_ad_OCSP		OBJ_id_ad,1L
-
-#define SN_ad_ca_issuers		"caIssuers"
-#define LN_ad_ca_issuers		"CA Issuers"
-#define NID_ad_ca_issuers		179
-#define OBJ_ad_ca_issuers		OBJ_id_ad,2L
-
-#define SN_ad_timeStamping		"ad_timestamping"
-#define LN_ad_timeStamping		"AD Time Stamping"
-#define NID_ad_timeStamping		363
-#define OBJ_ad_timeStamping		OBJ_id_ad,3L
-
-#define SN_ad_dvcs		"AD_DVCS"
-#define LN_ad_dvcs		"ad dvcs"
-#define NID_ad_dvcs		364
-#define OBJ_ad_dvcs		OBJ_id_ad,4L
-
-#define SN_caRepository		"caRepository"
-#define LN_caRepository		"CA Repository"
-#define NID_caRepository		785
-#define OBJ_caRepository		OBJ_id_ad,5L
-
-#define OBJ_id_pkix_OCSP		OBJ_ad_OCSP
-
-#define SN_id_pkix_OCSP_basic		"basicOCSPResponse"
-#define LN_id_pkix_OCSP_basic		"Basic OCSP Response"
-#define NID_id_pkix_OCSP_basic		365
-#define OBJ_id_pkix_OCSP_basic		OBJ_id_pkix_OCSP,1L
-
-#define SN_id_pkix_OCSP_Nonce		"Nonce"
-#define LN_id_pkix_OCSP_Nonce		"OCSP Nonce"
-#define NID_id_pkix_OCSP_Nonce		366
-#define OBJ_id_pkix_OCSP_Nonce		OBJ_id_pkix_OCSP,2L
-
-#define SN_id_pkix_OCSP_CrlID		"CrlID"
-#define LN_id_pkix_OCSP_CrlID		"OCSP CRL ID"
-#define NID_id_pkix_OCSP_CrlID		367
-#define OBJ_id_pkix_OCSP_CrlID		OBJ_id_pkix_OCSP,3L
-
-#define SN_id_pkix_OCSP_acceptableResponses		"acceptableResponses"
-#define LN_id_pkix_OCSP_acceptableResponses		"Acceptable OCSP Responses"
-#define NID_id_pkix_OCSP_acceptableResponses		368
-#define OBJ_id_pkix_OCSP_acceptableResponses		OBJ_id_pkix_OCSP,4L
-
-#define SN_id_pkix_OCSP_noCheck		"noCheck"
-#define LN_id_pkix_OCSP_noCheck		"OCSP No Check"
-#define NID_id_pkix_OCSP_noCheck		369
-#define OBJ_id_pkix_OCSP_noCheck		OBJ_id_pkix_OCSP,5L
-
-#define SN_id_pkix_OCSP_archiveCutoff		"archiveCutoff"
-#define LN_id_pkix_OCSP_archiveCutoff		"OCSP Archive Cutoff"
-#define NID_id_pkix_OCSP_archiveCutoff		370
-#define OBJ_id_pkix_OCSP_archiveCutoff		OBJ_id_pkix_OCSP,6L
-
-#define SN_id_pkix_OCSP_serviceLocator		"serviceLocator"
-#define LN_id_pkix_OCSP_serviceLocator		"OCSP Service Locator"
-#define NID_id_pkix_OCSP_serviceLocator		371
-#define OBJ_id_pkix_OCSP_serviceLocator		OBJ_id_pkix_OCSP,7L
-
-#define SN_id_pkix_OCSP_extendedStatus		"extendedStatus"
-#define LN_id_pkix_OCSP_extendedStatus		"Extended OCSP Status"
-#define NID_id_pkix_OCSP_extendedStatus		372
-#define OBJ_id_pkix_OCSP_extendedStatus		OBJ_id_pkix_OCSP,8L
-
-#define SN_id_pkix_OCSP_valid		"valid"
-#define NID_id_pkix_OCSP_valid		373
-#define OBJ_id_pkix_OCSP_valid		OBJ_id_pkix_OCSP,9L
-
-#define SN_id_pkix_OCSP_path		"path"
-#define NID_id_pkix_OCSP_path		374
-#define OBJ_id_pkix_OCSP_path		OBJ_id_pkix_OCSP,10L
-
-#define SN_id_pkix_OCSP_trustRoot		"trustRoot"
-#define LN_id_pkix_OCSP_trustRoot		"Trust Root"
-#define NID_id_pkix_OCSP_trustRoot		375
-#define OBJ_id_pkix_OCSP_trustRoot		OBJ_id_pkix_OCSP,11L
-
-#define SN_algorithm		"algorithm"
-#define LN_algorithm		"algorithm"
-#define NID_algorithm		376
-#define OBJ_algorithm		1L,3L,14L,3L,2L
-
-#define SN_md5WithRSA		"RSA-NP-MD5"
-#define LN_md5WithRSA		"md5WithRSA"
-#define NID_md5WithRSA		104
-#define OBJ_md5WithRSA		OBJ_algorithm,3L
-
-#define SN_des_ecb		"DES-ECB"
-#define LN_des_ecb		"des-ecb"
-#define NID_des_ecb		29
-#define OBJ_des_ecb		OBJ_algorithm,6L
-
-#define SN_des_cbc		"DES-CBC"
-#define LN_des_cbc		"des-cbc"
-#define NID_des_cbc		31
-#define OBJ_des_cbc		OBJ_algorithm,7L
-
-#define SN_des_ofb64		"DES-OFB"
-#define LN_des_ofb64		"des-ofb"
-#define NID_des_ofb64		45
-#define OBJ_des_ofb64		OBJ_algorithm,8L
-
-#define SN_des_cfb64		"DES-CFB"
-#define LN_des_cfb64		"des-cfb"
-#define NID_des_cfb64		30
-#define OBJ_des_cfb64		OBJ_algorithm,9L
-
-#define SN_rsaSignature		"rsaSignature"
-#define NID_rsaSignature		377
-#define OBJ_rsaSignature		OBJ_algorithm,11L
-
-#define SN_dsa_2		"DSA-old"
-#define LN_dsa_2		"dsaEncryption-old"
-#define NID_dsa_2		67
-#define OBJ_dsa_2		OBJ_algorithm,12L
-
-#define SN_dsaWithSHA		"DSA-SHA"
-#define LN_dsaWithSHA		"dsaWithSHA"
-#define NID_dsaWithSHA		66
-#define OBJ_dsaWithSHA		OBJ_algorithm,13L
-
-#define SN_shaWithRSAEncryption		"RSA-SHA"
-#define LN_shaWithRSAEncryption		"shaWithRSAEncryption"
-#define NID_shaWithRSAEncryption		42
-#define OBJ_shaWithRSAEncryption		OBJ_algorithm,15L
-
-#define SN_des_ede_ecb		"DES-EDE"
-#define LN_des_ede_ecb		"des-ede"
-#define NID_des_ede_ecb		32
-#define OBJ_des_ede_ecb		OBJ_algorithm,17L
-
-#define SN_des_ede3_ecb		"DES-EDE3"
-#define LN_des_ede3_ecb		"des-ede3"
-#define NID_des_ede3_ecb		33
-
-#define SN_des_ede_cbc		"DES-EDE-CBC"
-#define LN_des_ede_cbc		"des-ede-cbc"
-#define NID_des_ede_cbc		43
-
-#define SN_des_ede_cfb64		"DES-EDE-CFB"
-#define LN_des_ede_cfb64		"des-ede-cfb"
-#define NID_des_ede_cfb64		60
-
-#define SN_des_ede3_cfb64		"DES-EDE3-CFB"
-#define LN_des_ede3_cfb64		"des-ede3-cfb"
-#define NID_des_ede3_cfb64		61
-
-#define SN_des_ede_ofb64		"DES-EDE-OFB"
-#define LN_des_ede_ofb64		"des-ede-ofb"
-#define NID_des_ede_ofb64		62
-
-#define SN_des_ede3_ofb64		"DES-EDE3-OFB"
-#define LN_des_ede3_ofb64		"des-ede3-ofb"
-#define NID_des_ede3_ofb64		63
-
-#define SN_desx_cbc		"DESX-CBC"
-#define LN_desx_cbc		"desx-cbc"
-#define NID_desx_cbc		80
-
-#define SN_sha		"SHA"
-#define LN_sha		"sha"
-#define NID_sha		41
-#define OBJ_sha		OBJ_algorithm,18L
-
-#define SN_sha1		"SHA1"
-#define LN_sha1		"sha1"
-#define NID_sha1		64
-#define OBJ_sha1		OBJ_algorithm,26L
-
-#define SN_dsaWithSHA1_2		"DSA-SHA1-old"
-#define LN_dsaWithSHA1_2		"dsaWithSHA1-old"
-#define NID_dsaWithSHA1_2		70
-#define OBJ_dsaWithSHA1_2		OBJ_algorithm,27L
-
-#define SN_sha1WithRSA		"RSA-SHA1-2"
-#define LN_sha1WithRSA		"sha1WithRSA"
-#define NID_sha1WithRSA		115
-#define OBJ_sha1WithRSA		OBJ_algorithm,29L
-
-#define SN_ripemd160		"RIPEMD160"
-#define LN_ripemd160		"ripemd160"
-#define NID_ripemd160		117
-#define OBJ_ripemd160		1L,3L,36L,3L,2L,1L
-
-#define SN_ripemd160WithRSA		"RSA-RIPEMD160"
-#define LN_ripemd160WithRSA		"ripemd160WithRSA"
-#define NID_ripemd160WithRSA		119
-#define OBJ_ripemd160WithRSA		1L,3L,36L,3L,3L,1L,2L
-
-#define SN_sxnet		"SXNetID"
-#define LN_sxnet		"Strong Extranet ID"
-#define NID_sxnet		143
-#define OBJ_sxnet		1L,3L,101L,1L,4L,1L
-
-#define SN_X500		"X500"
-#define LN_X500		"directory services (X.500)"
-#define NID_X500		11
-#define OBJ_X500		2L,5L
-
-#define SN_X509		"X509"
-#define NID_X509		12
-#define OBJ_X509		OBJ_X500,4L
-
-#define SN_commonName		"CN"
-#define LN_commonName		"commonName"
-#define NID_commonName		13
-#define OBJ_commonName		OBJ_X509,3L
-
-#define SN_surname		"SN"
-#define LN_surname		"surname"
-#define NID_surname		100
-#define OBJ_surname		OBJ_X509,4L
-
-#define LN_serialNumber		"serialNumber"
-#define NID_serialNumber		105
-#define OBJ_serialNumber		OBJ_X509,5L
-
-#define SN_countryName		"C"
-#define LN_countryName		"countryName"
-#define NID_countryName		14
-#define OBJ_countryName		OBJ_X509,6L
-
-#define SN_localityName		"L"
-#define LN_localityName		"localityName"
-#define NID_localityName		15
-#define OBJ_localityName		OBJ_X509,7L
-
-#define SN_stateOrProvinceName		"ST"
-#define LN_stateOrProvinceName		"stateOrProvinceName"
-#define NID_stateOrProvinceName		16
-#define OBJ_stateOrProvinceName		OBJ_X509,8L
-
-#define SN_streetAddress		"street"
-#define LN_streetAddress		"streetAddress"
-#define NID_streetAddress		660
-#define OBJ_streetAddress		OBJ_X509,9L
-
-#define SN_organizationName		"O"
-#define LN_organizationName		"organizationName"
-#define NID_organizationName		17
-#define OBJ_organizationName		OBJ_X509,10L
-
-#define SN_organizationalUnitName		"OU"
-#define LN_organizationalUnitName		"organizationalUnitName"
-#define NID_organizationalUnitName		18
-#define OBJ_organizationalUnitName		OBJ_X509,11L
-
-#define SN_title		"title"
-#define LN_title		"title"
-#define NID_title		106
-#define OBJ_title		OBJ_X509,12L
-
-#define LN_description		"description"
-#define NID_description		107
-#define OBJ_description		OBJ_X509,13L
-
-#define LN_searchGuide		"searchGuide"
-#define NID_searchGuide		859
-#define OBJ_searchGuide		OBJ_X509,14L
-
-#define LN_businessCategory		"businessCategory"
-#define NID_businessCategory		860
-#define OBJ_businessCategory		OBJ_X509,15L
-
-#define LN_postalAddress		"postalAddress"
-#define NID_postalAddress		861
-#define OBJ_postalAddress		OBJ_X509,16L
-
-#define LN_postalCode		"postalCode"
-#define NID_postalCode		661
-#define OBJ_postalCode		OBJ_X509,17L
-
-#define LN_postOfficeBox		"postOfficeBox"
-#define NID_postOfficeBox		862
-#define OBJ_postOfficeBox		OBJ_X509,18L
-
-#define LN_physicalDeliveryOfficeName		"physicalDeliveryOfficeName"
-#define NID_physicalDeliveryOfficeName		863
-#define OBJ_physicalDeliveryOfficeName		OBJ_X509,19L
-
-#define LN_telephoneNumber		"telephoneNumber"
-#define NID_telephoneNumber		864
-#define OBJ_telephoneNumber		OBJ_X509,20L
-
-#define LN_telexNumber		"telexNumber"
-#define NID_telexNumber		865
-#define OBJ_telexNumber		OBJ_X509,21L
-
-#define LN_teletexTerminalIdentifier		"teletexTerminalIdentifier"
-#define NID_teletexTerminalIdentifier		866
-#define OBJ_teletexTerminalIdentifier		OBJ_X509,22L
-
-#define LN_facsimileTelephoneNumber		"facsimileTelephoneNumber"
-#define NID_facsimileTelephoneNumber		867
-#define OBJ_facsimileTelephoneNumber		OBJ_X509,23L
-
-#define LN_x121Address		"x121Address"
-#define NID_x121Address		868
-#define OBJ_x121Address		OBJ_X509,24L
-
-#define LN_internationaliSDNNumber		"internationaliSDNNumber"
-#define NID_internationaliSDNNumber		869
-#define OBJ_internationaliSDNNumber		OBJ_X509,25L
-
-#define LN_registeredAddress		"registeredAddress"
-#define NID_registeredAddress		870
-#define OBJ_registeredAddress		OBJ_X509,26L
-
-#define LN_destinationIndicator		"destinationIndicator"
-#define NID_destinationIndicator		871
-#define OBJ_destinationIndicator		OBJ_X509,27L
-
-#define LN_preferredDeliveryMethod		"preferredDeliveryMethod"
-#define NID_preferredDeliveryMethod		872
-#define OBJ_preferredDeliveryMethod		OBJ_X509,28L
-
-#define LN_presentationAddress		"presentationAddress"
-#define NID_presentationAddress		873
-#define OBJ_presentationAddress		OBJ_X509,29L
-
-#define LN_supportedApplicationContext		"supportedApplicationContext"
-#define NID_supportedApplicationContext		874
-#define OBJ_supportedApplicationContext		OBJ_X509,30L
-
-#define SN_member		"member"
-#define NID_member		875
-#define OBJ_member		OBJ_X509,31L
-
-#define SN_owner		"owner"
-#define NID_owner		876
-#define OBJ_owner		OBJ_X509,32L
-
-#define LN_roleOccupant		"roleOccupant"
-#define NID_roleOccupant		877
-#define OBJ_roleOccupant		OBJ_X509,33L
-
-#define SN_seeAlso		"seeAlso"
-#define NID_seeAlso		878
-#define OBJ_seeAlso		OBJ_X509,34L
-
-#define LN_userPassword		"userPassword"
-#define NID_userPassword		879
-#define OBJ_userPassword		OBJ_X509,35L
-
-#define LN_userCertificate		"userCertificate"
-#define NID_userCertificate		880
-#define OBJ_userCertificate		OBJ_X509,36L
-
-#define LN_cACertificate		"cACertificate"
-#define NID_cACertificate		881
-#define OBJ_cACertificate		OBJ_X509,37L
-
-#define LN_authorityRevocationList		"authorityRevocationList"
-#define NID_authorityRevocationList		882
-#define OBJ_authorityRevocationList		OBJ_X509,38L
-
-#define LN_certificateRevocationList		"certificateRevocationList"
-#define NID_certificateRevocationList		883
-#define OBJ_certificateRevocationList		OBJ_X509,39L
-
-#define LN_crossCertificatePair		"crossCertificatePair"
-#define NID_crossCertificatePair		884
-#define OBJ_crossCertificatePair		OBJ_X509,40L
-
-#define SN_name		"name"
-#define LN_name		"name"
-#define NID_name		173
-#define OBJ_name		OBJ_X509,41L
-
-#define SN_givenName		"GN"
-#define LN_givenName		"givenName"
-#define NID_givenName		99
-#define OBJ_givenName		OBJ_X509,42L
-
-#define SN_initials		"initials"
-#define LN_initials		"initials"
-#define NID_initials		101
-#define OBJ_initials		OBJ_X509,43L
-
-#define LN_generationQualifier		"generationQualifier"
-#define NID_generationQualifier		509
-#define OBJ_generationQualifier		OBJ_X509,44L
-
-#define LN_x500UniqueIdentifier		"x500UniqueIdentifier"
-#define NID_x500UniqueIdentifier		503
-#define OBJ_x500UniqueIdentifier		OBJ_X509,45L
-
-#define SN_dnQualifier		"dnQualifier"
-#define LN_dnQualifier		"dnQualifier"
-#define NID_dnQualifier		174
-#define OBJ_dnQualifier		OBJ_X509,46L
-
-#define LN_enhancedSearchGuide		"enhancedSearchGuide"
-#define NID_enhancedSearchGuide		885
-#define OBJ_enhancedSearchGuide		OBJ_X509,47L
-
-#define LN_protocolInformation		"protocolInformation"
-#define NID_protocolInformation		886
-#define OBJ_protocolInformation		OBJ_X509,48L
-
-#define LN_distinguishedName		"distinguishedName"
-#define NID_distinguishedName		887
-#define OBJ_distinguishedName		OBJ_X509,49L
-
-#define LN_uniqueMember		"uniqueMember"
-#define NID_uniqueMember		888
-#define OBJ_uniqueMember		OBJ_X509,50L
-
-#define LN_houseIdentifier		"houseIdentifier"
-#define NID_houseIdentifier		889
-#define OBJ_houseIdentifier		OBJ_X509,51L
-
-#define LN_supportedAlgorithms		"supportedAlgorithms"
-#define NID_supportedAlgorithms		890
-#define OBJ_supportedAlgorithms		OBJ_X509,52L
-
-#define LN_deltaRevocationList		"deltaRevocationList"
-#define NID_deltaRevocationList		891
-#define OBJ_deltaRevocationList		OBJ_X509,53L
-
-#define SN_dmdName		"dmdName"
-#define NID_dmdName		892
-#define OBJ_dmdName		OBJ_X509,54L
-
-#define LN_pseudonym		"pseudonym"
-#define NID_pseudonym		510
-#define OBJ_pseudonym		OBJ_X509,65L
-
-#define SN_role		"role"
-#define LN_role		"role"
-#define NID_role		400
-#define OBJ_role		OBJ_X509,72L
-
-#define SN_X500algorithms		"X500algorithms"
-#define LN_X500algorithms		"directory services - algorithms"
-#define NID_X500algorithms		378
-#define OBJ_X500algorithms		OBJ_X500,8L
-
-#define SN_rsa		"RSA"
-#define LN_rsa		"rsa"
-#define NID_rsa		19
-#define OBJ_rsa		OBJ_X500algorithms,1L,1L
-
-#define SN_mdc2WithRSA		"RSA-MDC2"
-#define LN_mdc2WithRSA		"mdc2WithRSA"
-#define NID_mdc2WithRSA		96
-#define OBJ_mdc2WithRSA		OBJ_X500algorithms,3L,100L
-
-#define SN_mdc2		"MDC2"
-#define LN_mdc2		"mdc2"
-#define NID_mdc2		95
-#define OBJ_mdc2		OBJ_X500algorithms,3L,101L
-
-#define SN_id_ce		"id-ce"
-#define NID_id_ce		81
-#define OBJ_id_ce		OBJ_X500,29L
-
-#define SN_subject_directory_attributes		"subjectDirectoryAttributes"
-#define LN_subject_directory_attributes		"X509v3 Subject Directory Attributes"
-#define NID_subject_directory_attributes		769
-#define OBJ_subject_directory_attributes		OBJ_id_ce,9L
-
-#define SN_subject_key_identifier		"subjectKeyIdentifier"
-#define LN_subject_key_identifier		"X509v3 Subject Key Identifier"
-#define NID_subject_key_identifier		82
-#define OBJ_subject_key_identifier		OBJ_id_ce,14L
-
-#define SN_key_usage		"keyUsage"
-#define LN_key_usage		"X509v3 Key Usage"
-#define NID_key_usage		83
-#define OBJ_key_usage		OBJ_id_ce,15L
-
-#define SN_private_key_usage_period		"privateKeyUsagePeriod"
-#define LN_private_key_usage_period		"X509v3 Private Key Usage Period"
-#define NID_private_key_usage_period		84
-#define OBJ_private_key_usage_period		OBJ_id_ce,16L
-
-#define SN_subject_alt_name		"subjectAltName"
-#define LN_subject_alt_name		"X509v3 Subject Alternative Name"
-#define NID_subject_alt_name		85
-#define OBJ_subject_alt_name		OBJ_id_ce,17L
-
-#define SN_issuer_alt_name		"issuerAltName"
-#define LN_issuer_alt_name		"X509v3 Issuer Alternative Name"
-#define NID_issuer_alt_name		86
-#define OBJ_issuer_alt_name		OBJ_id_ce,18L
-
-#define SN_basic_constraints		"basicConstraints"
-#define LN_basic_constraints		"X509v3 Basic Constraints"
-#define NID_basic_constraints		87
-#define OBJ_basic_constraints		OBJ_id_ce,19L
-
-#define SN_crl_number		"crlNumber"
-#define LN_crl_number		"X509v3 CRL Number"
-#define NID_crl_number		88
-#define OBJ_crl_number		OBJ_id_ce,20L
-
-#define SN_crl_reason		"CRLReason"
-#define LN_crl_reason		"X509v3 CRL Reason Code"
-#define NID_crl_reason		141
-#define OBJ_crl_reason		OBJ_id_ce,21L
-
-#define SN_invalidity_date		"invalidityDate"
-#define LN_invalidity_date		"Invalidity Date"
-#define NID_invalidity_date		142
-#define OBJ_invalidity_date		OBJ_id_ce,24L
-
-#define SN_delta_crl		"deltaCRL"
-#define LN_delta_crl		"X509v3 Delta CRL Indicator"
-#define NID_delta_crl		140
-#define OBJ_delta_crl		OBJ_id_ce,27L
-
-#define SN_issuing_distribution_point		"issuingDistributionPoint"
-#define LN_issuing_distribution_point		"X509v3 Issuing Distrubution Point"
-#define NID_issuing_distribution_point		770
-#define OBJ_issuing_distribution_point		OBJ_id_ce,28L
-
-#define SN_certificate_issuer		"certificateIssuer"
-#define LN_certificate_issuer		"X509v3 Certificate Issuer"
-#define NID_certificate_issuer		771
-#define OBJ_certificate_issuer		OBJ_id_ce,29L
-
-#define SN_name_constraints		"nameConstraints"
-#define LN_name_constraints		"X509v3 Name Constraints"
-#define NID_name_constraints		666
-#define OBJ_name_constraints		OBJ_id_ce,30L
-
-#define SN_crl_distribution_points		"crlDistributionPoints"
-#define LN_crl_distribution_points		"X509v3 CRL Distribution Points"
-#define NID_crl_distribution_points		103
-#define OBJ_crl_distribution_points		OBJ_id_ce,31L
-
-#define SN_certificate_policies		"certificatePolicies"
-#define LN_certificate_policies		"X509v3 Certificate Policies"
-#define NID_certificate_policies		89
-#define OBJ_certificate_policies		OBJ_id_ce,32L
-
-#define SN_any_policy		"anyPolicy"
-#define LN_any_policy		"X509v3 Any Policy"
-#define NID_any_policy		746
-#define OBJ_any_policy		OBJ_certificate_policies,0L
-
-#define SN_policy_mappings		"policyMappings"
-#define LN_policy_mappings		"X509v3 Policy Mappings"
-#define NID_policy_mappings		747
-#define OBJ_policy_mappings		OBJ_id_ce,33L
-
-#define SN_authority_key_identifier		"authorityKeyIdentifier"
-#define LN_authority_key_identifier		"X509v3 Authority Key Identifier"
-#define NID_authority_key_identifier		90
-#define OBJ_authority_key_identifier		OBJ_id_ce,35L
-
-#define SN_policy_constraints		"policyConstraints"
-#define LN_policy_constraints		"X509v3 Policy Constraints"
-#define NID_policy_constraints		401
-#define OBJ_policy_constraints		OBJ_id_ce,36L
-
-#define SN_ext_key_usage		"extendedKeyUsage"
-#define LN_ext_key_usage		"X509v3 Extended Key Usage"
-#define NID_ext_key_usage		126
-#define OBJ_ext_key_usage		OBJ_id_ce,37L
-
-#define SN_freshest_crl		"freshestCRL"
-#define LN_freshest_crl		"X509v3 Freshest CRL"
-#define NID_freshest_crl		857
-#define OBJ_freshest_crl		OBJ_id_ce,46L
-
-#define SN_inhibit_any_policy		"inhibitAnyPolicy"
-#define LN_inhibit_any_policy		"X509v3 Inhibit Any Policy"
-#define NID_inhibit_any_policy		748
-#define OBJ_inhibit_any_policy		OBJ_id_ce,54L
-
-#define SN_target_information		"targetInformation"
-#define LN_target_information		"X509v3 AC Targeting"
-#define NID_target_information		402
-#define OBJ_target_information		OBJ_id_ce,55L
-
-#define SN_no_rev_avail		"noRevAvail"
-#define LN_no_rev_avail		"X509v3 No Revocation Available"
-#define NID_no_rev_avail		403
-#define OBJ_no_rev_avail		OBJ_id_ce,56L
-
-#define SN_netscape		"Netscape"
-#define LN_netscape		"Netscape Communications Corp."
-#define NID_netscape		57
-#define OBJ_netscape		2L,16L,840L,1L,113730L
-
-#define SN_netscape_cert_extension		"nsCertExt"
-#define LN_netscape_cert_extension		"Netscape Certificate Extension"
-#define NID_netscape_cert_extension		58
-#define OBJ_netscape_cert_extension		OBJ_netscape,1L
-
-#define SN_netscape_data_type		"nsDataType"
-#define LN_netscape_data_type		"Netscape Data Type"
-#define NID_netscape_data_type		59
-#define OBJ_netscape_data_type		OBJ_netscape,2L
-
-#define SN_netscape_cert_type		"nsCertType"
-#define LN_netscape_cert_type		"Netscape Cert Type"
-#define NID_netscape_cert_type		71
-#define OBJ_netscape_cert_type		OBJ_netscape_cert_extension,1L
-
-#define SN_netscape_base_url		"nsBaseUrl"
-#define LN_netscape_base_url		"Netscape Base Url"
-#define NID_netscape_base_url		72
-#define OBJ_netscape_base_url		OBJ_netscape_cert_extension,2L
-
-#define SN_netscape_revocation_url		"nsRevocationUrl"
-#define LN_netscape_revocation_url		"Netscape Revocation Url"
-#define NID_netscape_revocation_url		73
-#define OBJ_netscape_revocation_url		OBJ_netscape_cert_extension,3L
-
-#define SN_netscape_ca_revocation_url		"nsCaRevocationUrl"
-#define LN_netscape_ca_revocation_url		"Netscape CA Revocation Url"
-#define NID_netscape_ca_revocation_url		74
-#define OBJ_netscape_ca_revocation_url		OBJ_netscape_cert_extension,4L
-
-#define SN_netscape_renewal_url		"nsRenewalUrl"
-#define LN_netscape_renewal_url		"Netscape Renewal Url"
-#define NID_netscape_renewal_url		75
-#define OBJ_netscape_renewal_url		OBJ_netscape_cert_extension,7L
-
-#define SN_netscape_ca_policy_url		"nsCaPolicyUrl"
-#define LN_netscape_ca_policy_url		"Netscape CA Policy Url"
-#define NID_netscape_ca_policy_url		76
-#define OBJ_netscape_ca_policy_url		OBJ_netscape_cert_extension,8L
-
-#define SN_netscape_ssl_server_name		"nsSslServerName"
-#define LN_netscape_ssl_server_name		"Netscape SSL Server Name"
-#define NID_netscape_ssl_server_name		77
-#define OBJ_netscape_ssl_server_name		OBJ_netscape_cert_extension,12L
-
-#define SN_netscape_comment		"nsComment"
-#define LN_netscape_comment		"Netscape Comment"
-#define NID_netscape_comment		78
-#define OBJ_netscape_comment		OBJ_netscape_cert_extension,13L
-
-#define SN_netscape_cert_sequence		"nsCertSequence"
-#define LN_netscape_cert_sequence		"Netscape Certificate Sequence"
-#define NID_netscape_cert_sequence		79
-#define OBJ_netscape_cert_sequence		OBJ_netscape_data_type,5L
-
-#define SN_ns_sgc		"nsSGC"
-#define LN_ns_sgc		"Netscape Server Gated Crypto"
-#define NID_ns_sgc		139
-#define OBJ_ns_sgc		OBJ_netscape,4L,1L
-
-#define SN_org		"ORG"
-#define LN_org		"org"
-#define NID_org		379
-#define OBJ_org		OBJ_iso,3L
-
-#define SN_dod		"DOD"
-#define LN_dod		"dod"
-#define NID_dod		380
-#define OBJ_dod		OBJ_org,6L
-
-#define SN_iana		"IANA"
-#define LN_iana		"iana"
-#define NID_iana		381
-#define OBJ_iana		OBJ_dod,1L
-
-#define OBJ_internet		OBJ_iana
-
-#define SN_Directory		"directory"
-#define LN_Directory		"Directory"
-#define NID_Directory		382
-#define OBJ_Directory		OBJ_internet,1L
-
-#define SN_Management		"mgmt"
-#define LN_Management		"Management"
-#define NID_Management		383
-#define OBJ_Management		OBJ_internet,2L
-
-#define SN_Experimental		"experimental"
-#define LN_Experimental		"Experimental"
-#define NID_Experimental		384
-#define OBJ_Experimental		OBJ_internet,3L
-
-#define SN_Private		"private"
-#define LN_Private		"Private"
-#define NID_Private		385
-#define OBJ_Private		OBJ_internet,4L
-
-#define SN_Security		"security"
-#define LN_Security		"Security"
-#define NID_Security		386
-#define OBJ_Security		OBJ_internet,5L
-
-#define SN_SNMPv2		"snmpv2"
-#define LN_SNMPv2		"SNMPv2"
-#define NID_SNMPv2		387
-#define OBJ_SNMPv2		OBJ_internet,6L
-
-#define LN_Mail		"Mail"
-#define NID_Mail		388
-#define OBJ_Mail		OBJ_internet,7L
-
-#define SN_Enterprises		"enterprises"
-#define LN_Enterprises		"Enterprises"
-#define NID_Enterprises		389
-#define OBJ_Enterprises		OBJ_Private,1L
-
-#define SN_dcObject		"dcobject"
-#define LN_dcObject		"dcObject"
-#define NID_dcObject		390
-#define OBJ_dcObject		OBJ_Enterprises,1466L,344L
-
-#define SN_mime_mhs		"mime-mhs"
-#define LN_mime_mhs		"MIME MHS"
-#define NID_mime_mhs		504
-#define OBJ_mime_mhs		OBJ_Mail,1L
-
-#define SN_mime_mhs_headings		"mime-mhs-headings"
-#define LN_mime_mhs_headings		"mime-mhs-headings"
-#define NID_mime_mhs_headings		505
-#define OBJ_mime_mhs_headings		OBJ_mime_mhs,1L
-
-#define SN_mime_mhs_bodies		"mime-mhs-bodies"
-#define LN_mime_mhs_bodies		"mime-mhs-bodies"
-#define NID_mime_mhs_bodies		506
-#define OBJ_mime_mhs_bodies		OBJ_mime_mhs,2L
-
-#define SN_id_hex_partial_message		"id-hex-partial-message"
-#define LN_id_hex_partial_message		"id-hex-partial-message"
-#define NID_id_hex_partial_message		507
-#define OBJ_id_hex_partial_message		OBJ_mime_mhs_headings,1L
-
-#define SN_id_hex_multipart_message		"id-hex-multipart-message"
-#define LN_id_hex_multipart_message		"id-hex-multipart-message"
-#define NID_id_hex_multipart_message		508
-#define OBJ_id_hex_multipart_message		OBJ_mime_mhs_headings,2L
-
-#define SN_rle_compression		"RLE"
-#define LN_rle_compression		"run length compression"
-#define NID_rle_compression		124
-#define OBJ_rle_compression		1L,1L,1L,1L,666L,1L
-
-#define SN_zlib_compression		"ZLIB"
-#define LN_zlib_compression		"zlib compression"
-#define NID_zlib_compression		125
-#define OBJ_zlib_compression		OBJ_id_smime_alg,8L
-
-#define OBJ_csor		2L,16L,840L,1L,101L,3L
-
-#define OBJ_nistAlgorithms		OBJ_csor,4L
-
-#define OBJ_aes		OBJ_nistAlgorithms,1L
-
-#define SN_aes_128_ecb		"AES-128-ECB"
-#define LN_aes_128_ecb		"aes-128-ecb"
-#define NID_aes_128_ecb		418
-#define OBJ_aes_128_ecb		OBJ_aes,1L
-
-#define SN_aes_128_cbc		"AES-128-CBC"
-#define LN_aes_128_cbc		"aes-128-cbc"
-#define NID_aes_128_cbc		419
-#define OBJ_aes_128_cbc		OBJ_aes,2L
-
-#define SN_aes_128_ofb128		"AES-128-OFB"
-#define LN_aes_128_ofb128		"aes-128-ofb"
-#define NID_aes_128_ofb128		420
-#define OBJ_aes_128_ofb128		OBJ_aes,3L
-
-#define SN_aes_128_cfb128		"AES-128-CFB"
-#define LN_aes_128_cfb128		"aes-128-cfb"
-#define NID_aes_128_cfb128		421
-#define OBJ_aes_128_cfb128		OBJ_aes,4L
-
-#define SN_aes_192_ecb		"AES-192-ECB"
-#define LN_aes_192_ecb		"aes-192-ecb"
-#define NID_aes_192_ecb		422
-#define OBJ_aes_192_ecb		OBJ_aes,21L
-
-#define SN_aes_192_cbc		"AES-192-CBC"
-#define LN_aes_192_cbc		"aes-192-cbc"
-#define NID_aes_192_cbc		423
-#define OBJ_aes_192_cbc		OBJ_aes,22L
-
-#define SN_aes_192_ofb128		"AES-192-OFB"
-#define LN_aes_192_ofb128		"aes-192-ofb"
-#define NID_aes_192_ofb128		424
-#define OBJ_aes_192_ofb128		OBJ_aes,23L
-
-#define SN_aes_192_cfb128		"AES-192-CFB"
-#define LN_aes_192_cfb128		"aes-192-cfb"
-#define NID_aes_192_cfb128		425
-#define OBJ_aes_192_cfb128		OBJ_aes,24L
-
-#define SN_aes_256_ecb		"AES-256-ECB"
-#define LN_aes_256_ecb		"aes-256-ecb"
-#define NID_aes_256_ecb		426
-#define OBJ_aes_256_ecb		OBJ_aes,41L
-
-#define SN_aes_256_cbc		"AES-256-CBC"
-#define LN_aes_256_cbc		"aes-256-cbc"
-#define NID_aes_256_cbc		427
-#define OBJ_aes_256_cbc		OBJ_aes,42L
-
-#define SN_aes_256_ofb128		"AES-256-OFB"
-#define LN_aes_256_ofb128		"aes-256-ofb"
-#define NID_aes_256_ofb128		428
-#define OBJ_aes_256_ofb128		OBJ_aes,43L
-
-#define SN_aes_256_cfb128		"AES-256-CFB"
-#define LN_aes_256_cfb128		"aes-256-cfb"
-#define NID_aes_256_cfb128		429
-#define OBJ_aes_256_cfb128		OBJ_aes,44L
-
-#define SN_aes_128_cfb1		"AES-128-CFB1"
-#define LN_aes_128_cfb1		"aes-128-cfb1"
-#define NID_aes_128_cfb1		650
-
-#define SN_aes_192_cfb1		"AES-192-CFB1"
-#define LN_aes_192_cfb1		"aes-192-cfb1"
-#define NID_aes_192_cfb1		651
-
-#define SN_aes_256_cfb1		"AES-256-CFB1"
-#define LN_aes_256_cfb1		"aes-256-cfb1"
-#define NID_aes_256_cfb1		652
-
-#define SN_aes_128_cfb8		"AES-128-CFB8"
-#define LN_aes_128_cfb8		"aes-128-cfb8"
-#define NID_aes_128_cfb8		653
-
-#define SN_aes_192_cfb8		"AES-192-CFB8"
-#define LN_aes_192_cfb8		"aes-192-cfb8"
-#define NID_aes_192_cfb8		654
-
-#define SN_aes_256_cfb8		"AES-256-CFB8"
-#define LN_aes_256_cfb8		"aes-256-cfb8"
-#define NID_aes_256_cfb8		655
-
-#define SN_des_cfb1		"DES-CFB1"
-#define LN_des_cfb1		"des-cfb1"
-#define NID_des_cfb1		656
-
-#define SN_des_cfb8		"DES-CFB8"
-#define LN_des_cfb8		"des-cfb8"
-#define NID_des_cfb8		657
-
-#define SN_des_ede3_cfb1		"DES-EDE3-CFB1"
-#define LN_des_ede3_cfb1		"des-ede3-cfb1"
-#define NID_des_ede3_cfb1		658
-
-#define SN_des_ede3_cfb8		"DES-EDE3-CFB8"
-#define LN_des_ede3_cfb8		"des-ede3-cfb8"
-#define NID_des_ede3_cfb8		659
-
-#define SN_id_aes128_wrap		"id-aes128-wrap"
-#define NID_id_aes128_wrap		788
-#define OBJ_id_aes128_wrap		OBJ_aes,5L
-
-#define SN_id_aes192_wrap		"id-aes192-wrap"
-#define NID_id_aes192_wrap		789
-#define OBJ_id_aes192_wrap		OBJ_aes,25L
-
-#define SN_id_aes256_wrap		"id-aes256-wrap"
-#define NID_id_aes256_wrap		790
-#define OBJ_id_aes256_wrap		OBJ_aes,45L
-
-#define OBJ_nist_hashalgs		OBJ_nistAlgorithms,2L
-
-#define SN_sha256		"SHA256"
-#define LN_sha256		"sha256"
-#define NID_sha256		672
-#define OBJ_sha256		OBJ_nist_hashalgs,1L
-
-#define SN_sha384		"SHA384"
-#define LN_sha384		"sha384"
-#define NID_sha384		673
-#define OBJ_sha384		OBJ_nist_hashalgs,2L
-
-#define SN_sha512		"SHA512"
-#define LN_sha512		"sha512"
-#define NID_sha512		674
-#define OBJ_sha512		OBJ_nist_hashalgs,3L
-
-#define SN_sha224		"SHA224"
-#define LN_sha224		"sha224"
-#define NID_sha224		675
-#define OBJ_sha224		OBJ_nist_hashalgs,4L
-
-#define OBJ_dsa_with_sha2		OBJ_nistAlgorithms,3L
-
-#define SN_dsa_with_SHA224		"dsa_with_SHA224"
-#define NID_dsa_with_SHA224		802
-#define OBJ_dsa_with_SHA224		OBJ_dsa_with_sha2,1L
-
-#define SN_dsa_with_SHA256		"dsa_with_SHA256"
-#define NID_dsa_with_SHA256		803
-#define OBJ_dsa_with_SHA256		OBJ_dsa_with_sha2,2L
-
-#define SN_hold_instruction_code		"holdInstructionCode"
-#define LN_hold_instruction_code		"Hold Instruction Code"
-#define NID_hold_instruction_code		430
-#define OBJ_hold_instruction_code		OBJ_id_ce,23L
-
-#define OBJ_holdInstruction		OBJ_X9_57,2L
-
-#define SN_hold_instruction_none		"holdInstructionNone"
-#define LN_hold_instruction_none		"Hold Instruction None"
-#define NID_hold_instruction_none		431
-#define OBJ_hold_instruction_none		OBJ_holdInstruction,1L
-
-#define SN_hold_instruction_call_issuer		"holdInstructionCallIssuer"
-#define LN_hold_instruction_call_issuer		"Hold Instruction Call Issuer"
-#define NID_hold_instruction_call_issuer		432
-#define OBJ_hold_instruction_call_issuer		OBJ_holdInstruction,2L
-
-#define SN_hold_instruction_reject		"holdInstructionReject"
-#define LN_hold_instruction_reject		"Hold Instruction Reject"
-#define NID_hold_instruction_reject		433
-#define OBJ_hold_instruction_reject		OBJ_holdInstruction,3L
-
-#define SN_data		"data"
-#define NID_data		434
-#define OBJ_data		OBJ_itu_t,9L
-
-#define SN_pss		"pss"
-#define NID_pss		435
-#define OBJ_pss		OBJ_data,2342L
-
-#define SN_ucl		"ucl"
-#define NID_ucl		436
-#define OBJ_ucl		OBJ_pss,19200300L
-
-#define SN_pilot		"pilot"
-#define NID_pilot		437
-#define OBJ_pilot		OBJ_ucl,100L
-
-#define LN_pilotAttributeType		"pilotAttributeType"
-#define NID_pilotAttributeType		438
-#define OBJ_pilotAttributeType		OBJ_pilot,1L
-
-#define LN_pilotAttributeSyntax		"pilotAttributeSyntax"
-#define NID_pilotAttributeSyntax		439
-#define OBJ_pilotAttributeSyntax		OBJ_pilot,3L
-
-#define LN_pilotObjectClass		"pilotObjectClass"
-#define NID_pilotObjectClass		440
-#define OBJ_pilotObjectClass		OBJ_pilot,4L
-
-#define LN_pilotGroups		"pilotGroups"
-#define NID_pilotGroups		441
-#define OBJ_pilotGroups		OBJ_pilot,10L
-
-#define LN_iA5StringSyntax		"iA5StringSyntax"
-#define NID_iA5StringSyntax		442
-#define OBJ_iA5StringSyntax		OBJ_pilotAttributeSyntax,4L
-
-#define LN_caseIgnoreIA5StringSyntax		"caseIgnoreIA5StringSyntax"
-#define NID_caseIgnoreIA5StringSyntax		443
-#define OBJ_caseIgnoreIA5StringSyntax		OBJ_pilotAttributeSyntax,5L
-
-#define LN_pilotObject		"pilotObject"
-#define NID_pilotObject		444
-#define OBJ_pilotObject		OBJ_pilotObjectClass,3L
-
-#define LN_pilotPerson		"pilotPerson"
-#define NID_pilotPerson		445
-#define OBJ_pilotPerson		OBJ_pilotObjectClass,4L
-
-#define SN_account		"account"
-#define NID_account		446
-#define OBJ_account		OBJ_pilotObjectClass,5L
-
-#define SN_document		"document"
-#define NID_document		447
-#define OBJ_document		OBJ_pilotObjectClass,6L
-
-#define SN_room		"room"
-#define NID_room		448
-#define OBJ_room		OBJ_pilotObjectClass,7L
-
-#define LN_documentSeries		"documentSeries"
-#define NID_documentSeries		449
-#define OBJ_documentSeries		OBJ_pilotObjectClass,9L
-
-#define SN_Domain		"domain"
-#define LN_Domain		"Domain"
-#define NID_Domain		392
-#define OBJ_Domain		OBJ_pilotObjectClass,13L
-
-#define LN_rFC822localPart		"rFC822localPart"
-#define NID_rFC822localPart		450
-#define OBJ_rFC822localPart		OBJ_pilotObjectClass,14L
-
-#define LN_dNSDomain		"dNSDomain"
-#define NID_dNSDomain		451
-#define OBJ_dNSDomain		OBJ_pilotObjectClass,15L
-
-#define LN_domainRelatedObject		"domainRelatedObject"
-#define NID_domainRelatedObject		452
-#define OBJ_domainRelatedObject		OBJ_pilotObjectClass,17L
-
-#define LN_friendlyCountry		"friendlyCountry"
-#define NID_friendlyCountry		453
-#define OBJ_friendlyCountry		OBJ_pilotObjectClass,18L
-
-#define LN_simpleSecurityObject		"simpleSecurityObject"
-#define NID_simpleSecurityObject		454
-#define OBJ_simpleSecurityObject		OBJ_pilotObjectClass,19L
-
-#define LN_pilotOrganization		"pilotOrganization"
-#define NID_pilotOrganization		455
-#define OBJ_pilotOrganization		OBJ_pilotObjectClass,20L
-
-#define LN_pilotDSA		"pilotDSA"
-#define NID_pilotDSA		456
-#define OBJ_pilotDSA		OBJ_pilotObjectClass,21L
-
-#define LN_qualityLabelledData		"qualityLabelledData"
-#define NID_qualityLabelledData		457
-#define OBJ_qualityLabelledData		OBJ_pilotObjectClass,22L
-
-#define SN_userId		"UID"
-#define LN_userId		"userId"
-#define NID_userId		458
-#define OBJ_userId		OBJ_pilotAttributeType,1L
-
-#define LN_textEncodedORAddress		"textEncodedORAddress"
-#define NID_textEncodedORAddress		459
-#define OBJ_textEncodedORAddress		OBJ_pilotAttributeType,2L
-
-#define SN_rfc822Mailbox		"mail"
-#define LN_rfc822Mailbox		"rfc822Mailbox"
-#define NID_rfc822Mailbox		460
-#define OBJ_rfc822Mailbox		OBJ_pilotAttributeType,3L
-
-#define SN_info		"info"
-#define NID_info		461
-#define OBJ_info		OBJ_pilotAttributeType,4L
-
-#define LN_favouriteDrink		"favouriteDrink"
-#define NID_favouriteDrink		462
-#define OBJ_favouriteDrink		OBJ_pilotAttributeType,5L
-
-#define LN_roomNumber		"roomNumber"
-#define NID_roomNumber		463
-#define OBJ_roomNumber		OBJ_pilotAttributeType,6L
-
-#define SN_photo		"photo"
-#define NID_photo		464
-#define OBJ_photo		OBJ_pilotAttributeType,7L
-
-#define LN_userClass		"userClass"
-#define NID_userClass		465
-#define OBJ_userClass		OBJ_pilotAttributeType,8L
-
-#define SN_host		"host"
-#define NID_host		466
-#define OBJ_host		OBJ_pilotAttributeType,9L
-
-#define SN_manager		"manager"
-#define NID_manager		467
-#define OBJ_manager		OBJ_pilotAttributeType,10L
-
-#define LN_documentIdentifier		"documentIdentifier"
-#define NID_documentIdentifier		468
-#define OBJ_documentIdentifier		OBJ_pilotAttributeType,11L
-
-#define LN_documentTitle		"documentTitle"
-#define NID_documentTitle		469
-#define OBJ_documentTitle		OBJ_pilotAttributeType,12L
-
-#define LN_documentVersion		"documentVersion"
-#define NID_documentVersion		470
-#define OBJ_documentVersion		OBJ_pilotAttributeType,13L
-
-#define LN_documentAuthor		"documentAuthor"
-#define NID_documentAuthor		471
-#define OBJ_documentAuthor		OBJ_pilotAttributeType,14L
-
-#define LN_documentLocation		"documentLocation"
-#define NID_documentLocation		472
-#define OBJ_documentLocation		OBJ_pilotAttributeType,15L
-
-#define LN_homeTelephoneNumber		"homeTelephoneNumber"
-#define NID_homeTelephoneNumber		473
-#define OBJ_homeTelephoneNumber		OBJ_pilotAttributeType,20L
-
-#define SN_secretary		"secretary"
-#define NID_secretary		474
-#define OBJ_secretary		OBJ_pilotAttributeType,21L
-
-#define LN_otherMailbox		"otherMailbox"
-#define NID_otherMailbox		475
-#define OBJ_otherMailbox		OBJ_pilotAttributeType,22L
-
-#define LN_lastModifiedTime		"lastModifiedTime"
-#define NID_lastModifiedTime		476
-#define OBJ_lastModifiedTime		OBJ_pilotAttributeType,23L
-
-#define LN_lastModifiedBy		"lastModifiedBy"
-#define NID_lastModifiedBy		477
-#define OBJ_lastModifiedBy		OBJ_pilotAttributeType,24L
-
-#define SN_domainComponent		"DC"
-#define LN_domainComponent		"domainComponent"
-#define NID_domainComponent		391
-#define OBJ_domainComponent		OBJ_pilotAttributeType,25L
-
-#define LN_aRecord		"aRecord"
-#define NID_aRecord		478
-#define OBJ_aRecord		OBJ_pilotAttributeType,26L
-
-#define LN_pilotAttributeType27		"pilotAttributeType27"
-#define NID_pilotAttributeType27		479
-#define OBJ_pilotAttributeType27		OBJ_pilotAttributeType,27L
-
-#define LN_mXRecord		"mXRecord"
-#define NID_mXRecord		480
-#define OBJ_mXRecord		OBJ_pilotAttributeType,28L
-
-#define LN_nSRecord		"nSRecord"
-#define NID_nSRecord		481
-#define OBJ_nSRecord		OBJ_pilotAttributeType,29L
-
-#define LN_sOARecord		"sOARecord"
-#define NID_sOARecord		482
-#define OBJ_sOARecord		OBJ_pilotAttributeType,30L
-
-#define LN_cNAMERecord		"cNAMERecord"
-#define NID_cNAMERecord		483
-#define OBJ_cNAMERecord		OBJ_pilotAttributeType,31L
-
-#define LN_associatedDomain		"associatedDomain"
-#define NID_associatedDomain		484
-#define OBJ_associatedDomain		OBJ_pilotAttributeType,37L
-
-#define LN_associatedName		"associatedName"
-#define NID_associatedName		485
-#define OBJ_associatedName		OBJ_pilotAttributeType,38L
-
-#define LN_homePostalAddress		"homePostalAddress"
-#define NID_homePostalAddress		486
-#define OBJ_homePostalAddress		OBJ_pilotAttributeType,39L
-
-#define LN_personalTitle		"personalTitle"
-#define NID_personalTitle		487
-#define OBJ_personalTitle		OBJ_pilotAttributeType,40L
-
-#define LN_mobileTelephoneNumber		"mobileTelephoneNumber"
-#define NID_mobileTelephoneNumber		488
-#define OBJ_mobileTelephoneNumber		OBJ_pilotAttributeType,41L
-
-#define LN_pagerTelephoneNumber		"pagerTelephoneNumber"
-#define NID_pagerTelephoneNumber		489
-#define OBJ_pagerTelephoneNumber		OBJ_pilotAttributeType,42L
-
-#define LN_friendlyCountryName		"friendlyCountryName"
-#define NID_friendlyCountryName		490
-#define OBJ_friendlyCountryName		OBJ_pilotAttributeType,43L
-
-#define LN_organizationalStatus		"organizationalStatus"
-#define NID_organizationalStatus		491
-#define OBJ_organizationalStatus		OBJ_pilotAttributeType,45L
-
-#define LN_janetMailbox		"janetMailbox"
-#define NID_janetMailbox		492
-#define OBJ_janetMailbox		OBJ_pilotAttributeType,46L
-
-#define LN_mailPreferenceOption		"mailPreferenceOption"
-#define NID_mailPreferenceOption		493
-#define OBJ_mailPreferenceOption		OBJ_pilotAttributeType,47L
-
-#define LN_buildingName		"buildingName"
-#define NID_buildingName		494
-#define OBJ_buildingName		OBJ_pilotAttributeType,48L
-
-#define LN_dSAQuality		"dSAQuality"
-#define NID_dSAQuality		495
-#define OBJ_dSAQuality		OBJ_pilotAttributeType,49L
-
-#define LN_singleLevelQuality		"singleLevelQuality"
-#define NID_singleLevelQuality		496
-#define OBJ_singleLevelQuality		OBJ_pilotAttributeType,50L
-
-#define LN_subtreeMinimumQuality		"subtreeMinimumQuality"
-#define NID_subtreeMinimumQuality		497
-#define OBJ_subtreeMinimumQuality		OBJ_pilotAttributeType,51L
-
-#define LN_subtreeMaximumQuality		"subtreeMaximumQuality"
-#define NID_subtreeMaximumQuality		498
-#define OBJ_subtreeMaximumQuality		OBJ_pilotAttributeType,52L
-
-#define LN_personalSignature		"personalSignature"
-#define NID_personalSignature		499
-#define OBJ_personalSignature		OBJ_pilotAttributeType,53L
-
-#define LN_dITRedirect		"dITRedirect"
-#define NID_dITRedirect		500
-#define OBJ_dITRedirect		OBJ_pilotAttributeType,54L
-
-#define SN_audio		"audio"
-#define NID_audio		501
-#define OBJ_audio		OBJ_pilotAttributeType,55L
-
-#define LN_documentPublisher		"documentPublisher"
-#define NID_documentPublisher		502
-#define OBJ_documentPublisher		OBJ_pilotAttributeType,56L
-
-#define SN_id_set		"id-set"
-#define LN_id_set		"Secure Electronic Transactions"
-#define NID_id_set		512
-#define OBJ_id_set		OBJ_international_organizations,42L
-
-#define SN_set_ctype		"set-ctype"
-#define LN_set_ctype		"content types"
-#define NID_set_ctype		513
-#define OBJ_set_ctype		OBJ_id_set,0L
-
-#define SN_set_msgExt		"set-msgExt"
-#define LN_set_msgExt		"message extensions"
-#define NID_set_msgExt		514
-#define OBJ_set_msgExt		OBJ_id_set,1L
-
-#define SN_set_attr		"set-attr"
-#define NID_set_attr		515
-#define OBJ_set_attr		OBJ_id_set,3L
-
-#define SN_set_policy		"set-policy"
-#define NID_set_policy		516
-#define OBJ_set_policy		OBJ_id_set,5L
-
-#define SN_set_certExt		"set-certExt"
-#define LN_set_certExt		"certificate extensions"
-#define NID_set_certExt		517
-#define OBJ_set_certExt		OBJ_id_set,7L
-
-#define SN_set_brand		"set-brand"
-#define NID_set_brand		518
-#define OBJ_set_brand		OBJ_id_set,8L
-
-#define SN_setct_PANData		"setct-PANData"
-#define NID_setct_PANData		519
-#define OBJ_setct_PANData		OBJ_set_ctype,0L
-
-#define SN_setct_PANToken		"setct-PANToken"
-#define NID_setct_PANToken		520
-#define OBJ_setct_PANToken		OBJ_set_ctype,1L
-
-#define SN_setct_PANOnly		"setct-PANOnly"
-#define NID_setct_PANOnly		521
-#define OBJ_setct_PANOnly		OBJ_set_ctype,2L
-
-#define SN_setct_OIData		"setct-OIData"
-#define NID_setct_OIData		522
-#define OBJ_setct_OIData		OBJ_set_ctype,3L
-
-#define SN_setct_PI		"setct-PI"
-#define NID_setct_PI		523
-#define OBJ_setct_PI		OBJ_set_ctype,4L
-
-#define SN_setct_PIData		"setct-PIData"
-#define NID_setct_PIData		524
-#define OBJ_setct_PIData		OBJ_set_ctype,5L
-
-#define SN_setct_PIDataUnsigned		"setct-PIDataUnsigned"
-#define NID_setct_PIDataUnsigned		525
-#define OBJ_setct_PIDataUnsigned		OBJ_set_ctype,6L
-
-#define SN_setct_HODInput		"setct-HODInput"
-#define NID_setct_HODInput		526
-#define OBJ_setct_HODInput		OBJ_set_ctype,7L
-
-#define SN_setct_AuthResBaggage		"setct-AuthResBaggage"
-#define NID_setct_AuthResBaggage		527
-#define OBJ_setct_AuthResBaggage		OBJ_set_ctype,8L
-
-#define SN_setct_AuthRevReqBaggage		"setct-AuthRevReqBaggage"
-#define NID_setct_AuthRevReqBaggage		528
-#define OBJ_setct_AuthRevReqBaggage		OBJ_set_ctype,9L
-
-#define SN_setct_AuthRevResBaggage		"setct-AuthRevResBaggage"
-#define NID_setct_AuthRevResBaggage		529
-#define OBJ_setct_AuthRevResBaggage		OBJ_set_ctype,10L
-
-#define SN_setct_CapTokenSeq		"setct-CapTokenSeq"
-#define NID_setct_CapTokenSeq		530
-#define OBJ_setct_CapTokenSeq		OBJ_set_ctype,11L
-
-#define SN_setct_PInitResData		"setct-PInitResData"
-#define NID_setct_PInitResData		531
-#define OBJ_setct_PInitResData		OBJ_set_ctype,12L
-
-#define SN_setct_PI_TBS		"setct-PI-TBS"
-#define NID_setct_PI_TBS		532
-#define OBJ_setct_PI_TBS		OBJ_set_ctype,13L
-
-#define SN_setct_PResData		"setct-PResData"
-#define NID_setct_PResData		533
-#define OBJ_setct_PResData		OBJ_set_ctype,14L
-
-#define SN_setct_AuthReqTBS		"setct-AuthReqTBS"
-#define NID_setct_AuthReqTBS		534
-#define OBJ_setct_AuthReqTBS		OBJ_set_ctype,16L
-
-#define SN_setct_AuthResTBS		"setct-AuthResTBS"
-#define NID_setct_AuthResTBS		535
-#define OBJ_setct_AuthResTBS		OBJ_set_ctype,17L
-
-#define SN_setct_AuthResTBSX		"setct-AuthResTBSX"
-#define NID_setct_AuthResTBSX		536
-#define OBJ_setct_AuthResTBSX		OBJ_set_ctype,18L
-
-#define SN_setct_AuthTokenTBS		"setct-AuthTokenTBS"
-#define NID_setct_AuthTokenTBS		537
-#define OBJ_setct_AuthTokenTBS		OBJ_set_ctype,19L
-
-#define SN_setct_CapTokenData		"setct-CapTokenData"
-#define NID_setct_CapTokenData		538
-#define OBJ_setct_CapTokenData		OBJ_set_ctype,20L
-
-#define SN_setct_CapTokenTBS		"setct-CapTokenTBS"
-#define NID_setct_CapTokenTBS		539
-#define OBJ_setct_CapTokenTBS		OBJ_set_ctype,21L
-
-#define SN_setct_AcqCardCodeMsg		"setct-AcqCardCodeMsg"
-#define NID_setct_AcqCardCodeMsg		540
-#define OBJ_setct_AcqCardCodeMsg		OBJ_set_ctype,22L
-
-#define SN_setct_AuthRevReqTBS		"setct-AuthRevReqTBS"
-#define NID_setct_AuthRevReqTBS		541
-#define OBJ_setct_AuthRevReqTBS		OBJ_set_ctype,23L
-
-#define SN_setct_AuthRevResData		"setct-AuthRevResData"
-#define NID_setct_AuthRevResData		542
-#define OBJ_setct_AuthRevResData		OBJ_set_ctype,24L
-
-#define SN_setct_AuthRevResTBS		"setct-AuthRevResTBS"
-#define NID_setct_AuthRevResTBS		543
-#define OBJ_setct_AuthRevResTBS		OBJ_set_ctype,25L
-
-#define SN_setct_CapReqTBS		"setct-CapReqTBS"
-#define NID_setct_CapReqTBS		544
-#define OBJ_setct_CapReqTBS		OBJ_set_ctype,26L
-
-#define SN_setct_CapReqTBSX		"setct-CapReqTBSX"
-#define NID_setct_CapReqTBSX		545
-#define OBJ_setct_CapReqTBSX		OBJ_set_ctype,27L
-
-#define SN_setct_CapResData		"setct-CapResData"
-#define NID_setct_CapResData		546
-#define OBJ_setct_CapResData		OBJ_set_ctype,28L
-
-#define SN_setct_CapRevReqTBS		"setct-CapRevReqTBS"
-#define NID_setct_CapRevReqTBS		547
-#define OBJ_setct_CapRevReqTBS		OBJ_set_ctype,29L
-
-#define SN_setct_CapRevReqTBSX		"setct-CapRevReqTBSX"
-#define NID_setct_CapRevReqTBSX		548
-#define OBJ_setct_CapRevReqTBSX		OBJ_set_ctype,30L
-
-#define SN_setct_CapRevResData		"setct-CapRevResData"
-#define NID_setct_CapRevResData		549
-#define OBJ_setct_CapRevResData		OBJ_set_ctype,31L
-
-#define SN_setct_CredReqTBS		"setct-CredReqTBS"
-#define NID_setct_CredReqTBS		550
-#define OBJ_setct_CredReqTBS		OBJ_set_ctype,32L
-
-#define SN_setct_CredReqTBSX		"setct-CredReqTBSX"
-#define NID_setct_CredReqTBSX		551
-#define OBJ_setct_CredReqTBSX		OBJ_set_ctype,33L
-
-#define SN_setct_CredResData		"setct-CredResData"
-#define NID_setct_CredResData		552
-#define OBJ_setct_CredResData		OBJ_set_ctype,34L
-
-#define SN_setct_CredRevReqTBS		"setct-CredRevReqTBS"
-#define NID_setct_CredRevReqTBS		553
-#define OBJ_setct_CredRevReqTBS		OBJ_set_ctype,35L
-
-#define SN_setct_CredRevReqTBSX		"setct-CredRevReqTBSX"
-#define NID_setct_CredRevReqTBSX		554
-#define OBJ_setct_CredRevReqTBSX		OBJ_set_ctype,36L
-
-#define SN_setct_CredRevResData		"setct-CredRevResData"
-#define NID_setct_CredRevResData		555
-#define OBJ_setct_CredRevResData		OBJ_set_ctype,37L
-
-#define SN_setct_PCertReqData		"setct-PCertReqData"
-#define NID_setct_PCertReqData		556
-#define OBJ_setct_PCertReqData		OBJ_set_ctype,38L
-
-#define SN_setct_PCertResTBS		"setct-PCertResTBS"
-#define NID_setct_PCertResTBS		557
-#define OBJ_setct_PCertResTBS		OBJ_set_ctype,39L
-
-#define SN_setct_BatchAdminReqData		"setct-BatchAdminReqData"
-#define NID_setct_BatchAdminReqData		558
-#define OBJ_setct_BatchAdminReqData		OBJ_set_ctype,40L
-
-#define SN_setct_BatchAdminResData		"setct-BatchAdminResData"
-#define NID_setct_BatchAdminResData		559
-#define OBJ_setct_BatchAdminResData		OBJ_set_ctype,41L
-
-#define SN_setct_CardCInitResTBS		"setct-CardCInitResTBS"
-#define NID_setct_CardCInitResTBS		560
-#define OBJ_setct_CardCInitResTBS		OBJ_set_ctype,42L
-
-#define SN_setct_MeAqCInitResTBS		"setct-MeAqCInitResTBS"
-#define NID_setct_MeAqCInitResTBS		561
-#define OBJ_setct_MeAqCInitResTBS		OBJ_set_ctype,43L
-
-#define SN_setct_RegFormResTBS		"setct-RegFormResTBS"
-#define NID_setct_RegFormResTBS		562
-#define OBJ_setct_RegFormResTBS		OBJ_set_ctype,44L
-
-#define SN_setct_CertReqData		"setct-CertReqData"
-#define NID_setct_CertReqData		563
-#define OBJ_setct_CertReqData		OBJ_set_ctype,45L
-
-#define SN_setct_CertReqTBS		"setct-CertReqTBS"
-#define NID_setct_CertReqTBS		564
-#define OBJ_setct_CertReqTBS		OBJ_set_ctype,46L
-
-#define SN_setct_CertResData		"setct-CertResData"
-#define NID_setct_CertResData		565
-#define OBJ_setct_CertResData		OBJ_set_ctype,47L
-
-#define SN_setct_CertInqReqTBS		"setct-CertInqReqTBS"
-#define NID_setct_CertInqReqTBS		566
-#define OBJ_setct_CertInqReqTBS		OBJ_set_ctype,48L
-
-#define SN_setct_ErrorTBS		"setct-ErrorTBS"
-#define NID_setct_ErrorTBS		567
-#define OBJ_setct_ErrorTBS		OBJ_set_ctype,49L
-
-#define SN_setct_PIDualSignedTBE		"setct-PIDualSignedTBE"
-#define NID_setct_PIDualSignedTBE		568
-#define OBJ_setct_PIDualSignedTBE		OBJ_set_ctype,50L
-
-#define SN_setct_PIUnsignedTBE		"setct-PIUnsignedTBE"
-#define NID_setct_PIUnsignedTBE		569
-#define OBJ_setct_PIUnsignedTBE		OBJ_set_ctype,51L
-
-#define SN_setct_AuthReqTBE		"setct-AuthReqTBE"
-#define NID_setct_AuthReqTBE		570
-#define OBJ_setct_AuthReqTBE		OBJ_set_ctype,52L
-
-#define SN_setct_AuthResTBE		"setct-AuthResTBE"
-#define NID_setct_AuthResTBE		571
-#define OBJ_setct_AuthResTBE		OBJ_set_ctype,53L
-
-#define SN_setct_AuthResTBEX		"setct-AuthResTBEX"
-#define NID_setct_AuthResTBEX		572
-#define OBJ_setct_AuthResTBEX		OBJ_set_ctype,54L
-
-#define SN_setct_AuthTokenTBE		"setct-AuthTokenTBE"
-#define NID_setct_AuthTokenTBE		573
-#define OBJ_setct_AuthTokenTBE		OBJ_set_ctype,55L
-
-#define SN_setct_CapTokenTBE		"setct-CapTokenTBE"
-#define NID_setct_CapTokenTBE		574
-#define OBJ_setct_CapTokenTBE		OBJ_set_ctype,56L
-
-#define SN_setct_CapTokenTBEX		"setct-CapTokenTBEX"
-#define NID_setct_CapTokenTBEX		575
-#define OBJ_setct_CapTokenTBEX		OBJ_set_ctype,57L
-
-#define SN_setct_AcqCardCodeMsgTBE		"setct-AcqCardCodeMsgTBE"
-#define NID_setct_AcqCardCodeMsgTBE		576
-#define OBJ_setct_AcqCardCodeMsgTBE		OBJ_set_ctype,58L
-
-#define SN_setct_AuthRevReqTBE		"setct-AuthRevReqTBE"
-#define NID_setct_AuthRevReqTBE		577
-#define OBJ_setct_AuthRevReqTBE		OBJ_set_ctype,59L
-
-#define SN_setct_AuthRevResTBE		"setct-AuthRevResTBE"
-#define NID_setct_AuthRevResTBE		578
-#define OBJ_setct_AuthRevResTBE		OBJ_set_ctype,60L
-
-#define SN_setct_AuthRevResTBEB		"setct-AuthRevResTBEB"
-#define NID_setct_AuthRevResTBEB		579
-#define OBJ_setct_AuthRevResTBEB		OBJ_set_ctype,61L
-
-#define SN_setct_CapReqTBE		"setct-CapReqTBE"
-#define NID_setct_CapReqTBE		580
-#define OBJ_setct_CapReqTBE		OBJ_set_ctype,62L
-
-#define SN_setct_CapReqTBEX		"setct-CapReqTBEX"
-#define NID_setct_CapReqTBEX		581
-#define OBJ_setct_CapReqTBEX		OBJ_set_ctype,63L
-
-#define SN_setct_CapResTBE		"setct-CapResTBE"
-#define NID_setct_CapResTBE		582
-#define OBJ_setct_CapResTBE		OBJ_set_ctype,64L
-
-#define SN_setct_CapRevReqTBE		"setct-CapRevReqTBE"
-#define NID_setct_CapRevReqTBE		583
-#define OBJ_setct_CapRevReqTBE		OBJ_set_ctype,65L
-
-#define SN_setct_CapRevReqTBEX		"setct-CapRevReqTBEX"
-#define NID_setct_CapRevReqTBEX		584
-#define OBJ_setct_CapRevReqTBEX		OBJ_set_ctype,66L
-
-#define SN_setct_CapRevResTBE		"setct-CapRevResTBE"
-#define NID_setct_CapRevResTBE		585
-#define OBJ_setct_CapRevResTBE		OBJ_set_ctype,67L
-
-#define SN_setct_CredReqTBE		"setct-CredReqTBE"
-#define NID_setct_CredReqTBE		586
-#define OBJ_setct_CredReqTBE		OBJ_set_ctype,68L
-
-#define SN_setct_CredReqTBEX		"setct-CredReqTBEX"
-#define NID_setct_CredReqTBEX		587
-#define OBJ_setct_CredReqTBEX		OBJ_set_ctype,69L
-
-#define SN_setct_CredResTBE		"setct-CredResTBE"
-#define NID_setct_CredResTBE		588
-#define OBJ_setct_CredResTBE		OBJ_set_ctype,70L
-
-#define SN_setct_CredRevReqTBE		"setct-CredRevReqTBE"
-#define NID_setct_CredRevReqTBE		589
-#define OBJ_setct_CredRevReqTBE		OBJ_set_ctype,71L
-
-#define SN_setct_CredRevReqTBEX		"setct-CredRevReqTBEX"
-#define NID_setct_CredRevReqTBEX		590
-#define OBJ_setct_CredRevReqTBEX		OBJ_set_ctype,72L
-
-#define SN_setct_CredRevResTBE		"setct-CredRevResTBE"
-#define NID_setct_CredRevResTBE		591
-#define OBJ_setct_CredRevResTBE		OBJ_set_ctype,73L
-
-#define SN_setct_BatchAdminReqTBE		"setct-BatchAdminReqTBE"
-#define NID_setct_BatchAdminReqTBE		592
-#define OBJ_setct_BatchAdminReqTBE		OBJ_set_ctype,74L
-
-#define SN_setct_BatchAdminResTBE		"setct-BatchAdminResTBE"
-#define NID_setct_BatchAdminResTBE		593
-#define OBJ_setct_BatchAdminResTBE		OBJ_set_ctype,75L
-
-#define SN_setct_RegFormReqTBE		"setct-RegFormReqTBE"
-#define NID_setct_RegFormReqTBE		594
-#define OBJ_setct_RegFormReqTBE		OBJ_set_ctype,76L
-
-#define SN_setct_CertReqTBE		"setct-CertReqTBE"
-#define NID_setct_CertReqTBE		595
-#define OBJ_setct_CertReqTBE		OBJ_set_ctype,77L
-
-#define SN_setct_CertReqTBEX		"setct-CertReqTBEX"
-#define NID_setct_CertReqTBEX		596
-#define OBJ_setct_CertReqTBEX		OBJ_set_ctype,78L
-
-#define SN_setct_CertResTBE		"setct-CertResTBE"
-#define NID_setct_CertResTBE		597
-#define OBJ_setct_CertResTBE		OBJ_set_ctype,79L
-
-#define SN_setct_CRLNotificationTBS		"setct-CRLNotificationTBS"
-#define NID_setct_CRLNotificationTBS		598
-#define OBJ_setct_CRLNotificationTBS		OBJ_set_ctype,80L
-
-#define SN_setct_CRLNotificationResTBS		"setct-CRLNotificationResTBS"
-#define NID_setct_CRLNotificationResTBS		599
-#define OBJ_setct_CRLNotificationResTBS		OBJ_set_ctype,81L
-
-#define SN_setct_BCIDistributionTBS		"setct-BCIDistributionTBS"
-#define NID_setct_BCIDistributionTBS		600
-#define OBJ_setct_BCIDistributionTBS		OBJ_set_ctype,82L
-
-#define SN_setext_genCrypt		"setext-genCrypt"
-#define LN_setext_genCrypt		"generic cryptogram"
-#define NID_setext_genCrypt		601
-#define OBJ_setext_genCrypt		OBJ_set_msgExt,1L
-
-#define SN_setext_miAuth		"setext-miAuth"
-#define LN_setext_miAuth		"merchant initiated auth"
-#define NID_setext_miAuth		602
-#define OBJ_setext_miAuth		OBJ_set_msgExt,3L
-
-#define SN_setext_pinSecure		"setext-pinSecure"
-#define NID_setext_pinSecure		603
-#define OBJ_setext_pinSecure		OBJ_set_msgExt,4L
-
-#define SN_setext_pinAny		"setext-pinAny"
-#define NID_setext_pinAny		604
-#define OBJ_setext_pinAny		OBJ_set_msgExt,5L
-
-#define SN_setext_track2		"setext-track2"
-#define NID_setext_track2		605
-#define OBJ_setext_track2		OBJ_set_msgExt,7L
-
-#define SN_setext_cv		"setext-cv"
-#define LN_setext_cv		"additional verification"
-#define NID_setext_cv		606
-#define OBJ_setext_cv		OBJ_set_msgExt,8L
-
-#define SN_set_policy_root		"set-policy-root"
-#define NID_set_policy_root		607
-#define OBJ_set_policy_root		OBJ_set_policy,0L
-
-#define SN_setCext_hashedRoot		"setCext-hashedRoot"
-#define NID_setCext_hashedRoot		608
-#define OBJ_setCext_hashedRoot		OBJ_set_certExt,0L
-
-#define SN_setCext_certType		"setCext-certType"
-#define NID_setCext_certType		609
-#define OBJ_setCext_certType		OBJ_set_certExt,1L
-
-#define SN_setCext_merchData		"setCext-merchData"
-#define NID_setCext_merchData		610
-#define OBJ_setCext_merchData		OBJ_set_certExt,2L
-
-#define SN_setCext_cCertRequired		"setCext-cCertRequired"
-#define NID_setCext_cCertRequired		611
-#define OBJ_setCext_cCertRequired		OBJ_set_certExt,3L
-
-#define SN_setCext_tunneling		"setCext-tunneling"
-#define NID_setCext_tunneling		612
-#define OBJ_setCext_tunneling		OBJ_set_certExt,4L
-
-#define SN_setCext_setExt		"setCext-setExt"
-#define NID_setCext_setExt		613
-#define OBJ_setCext_setExt		OBJ_set_certExt,5L
-
-#define SN_setCext_setQualf		"setCext-setQualf"
-#define NID_setCext_setQualf		614
-#define OBJ_setCext_setQualf		OBJ_set_certExt,6L
-
-#define SN_setCext_PGWYcapabilities		"setCext-PGWYcapabilities"
-#define NID_setCext_PGWYcapabilities		615
-#define OBJ_setCext_PGWYcapabilities		OBJ_set_certExt,7L
-
-#define SN_setCext_TokenIdentifier		"setCext-TokenIdentifier"
-#define NID_setCext_TokenIdentifier		616
-#define OBJ_setCext_TokenIdentifier		OBJ_set_certExt,8L
-
-#define SN_setCext_Track2Data		"setCext-Track2Data"
-#define NID_setCext_Track2Data		617
-#define OBJ_setCext_Track2Data		OBJ_set_certExt,9L
-
-#define SN_setCext_TokenType		"setCext-TokenType"
-#define NID_setCext_TokenType		618
-#define OBJ_setCext_TokenType		OBJ_set_certExt,10L
-
-#define SN_setCext_IssuerCapabilities		"setCext-IssuerCapabilities"
-#define NID_setCext_IssuerCapabilities		619
-#define OBJ_setCext_IssuerCapabilities		OBJ_set_certExt,11L
-
-#define SN_setAttr_Cert		"setAttr-Cert"
-#define NID_setAttr_Cert		620
-#define OBJ_setAttr_Cert		OBJ_set_attr,0L
-
-#define SN_setAttr_PGWYcap		"setAttr-PGWYcap"
-#define LN_setAttr_PGWYcap		"payment gateway capabilities"
-#define NID_setAttr_PGWYcap		621
-#define OBJ_setAttr_PGWYcap		OBJ_set_attr,1L
-
-#define SN_setAttr_TokenType		"setAttr-TokenType"
-#define NID_setAttr_TokenType		622
-#define OBJ_setAttr_TokenType		OBJ_set_attr,2L
-
-#define SN_setAttr_IssCap		"setAttr-IssCap"
-#define LN_setAttr_IssCap		"issuer capabilities"
-#define NID_setAttr_IssCap		623
-#define OBJ_setAttr_IssCap		OBJ_set_attr,3L
-
-#define SN_set_rootKeyThumb		"set-rootKeyThumb"
-#define NID_set_rootKeyThumb		624
-#define OBJ_set_rootKeyThumb		OBJ_setAttr_Cert,0L
-
-#define SN_set_addPolicy		"set-addPolicy"
-#define NID_set_addPolicy		625
-#define OBJ_set_addPolicy		OBJ_setAttr_Cert,1L
-
-#define SN_setAttr_Token_EMV		"setAttr-Token-EMV"
-#define NID_setAttr_Token_EMV		626
-#define OBJ_setAttr_Token_EMV		OBJ_setAttr_TokenType,1L
-
-#define SN_setAttr_Token_B0Prime		"setAttr-Token-B0Prime"
-#define NID_setAttr_Token_B0Prime		627
-#define OBJ_setAttr_Token_B0Prime		OBJ_setAttr_TokenType,2L
-
-#define SN_setAttr_IssCap_CVM		"setAttr-IssCap-CVM"
-#define NID_setAttr_IssCap_CVM		628
-#define OBJ_setAttr_IssCap_CVM		OBJ_setAttr_IssCap,3L
-
-#define SN_setAttr_IssCap_T2		"setAttr-IssCap-T2"
-#define NID_setAttr_IssCap_T2		629
-#define OBJ_setAttr_IssCap_T2		OBJ_setAttr_IssCap,4L
-
-#define SN_setAttr_IssCap_Sig		"setAttr-IssCap-Sig"
-#define NID_setAttr_IssCap_Sig		630
-#define OBJ_setAttr_IssCap_Sig		OBJ_setAttr_IssCap,5L
-
-#define SN_setAttr_GenCryptgrm		"setAttr-GenCryptgrm"
-#define LN_setAttr_GenCryptgrm		"generate cryptogram"
-#define NID_setAttr_GenCryptgrm		631
-#define OBJ_setAttr_GenCryptgrm		OBJ_setAttr_IssCap_CVM,1L
-
-#define SN_setAttr_T2Enc		"setAttr-T2Enc"
-#define LN_setAttr_T2Enc		"encrypted track 2"
-#define NID_setAttr_T2Enc		632
-#define OBJ_setAttr_T2Enc		OBJ_setAttr_IssCap_T2,1L
-
-#define SN_setAttr_T2cleartxt		"setAttr-T2cleartxt"
-#define LN_setAttr_T2cleartxt		"cleartext track 2"
-#define NID_setAttr_T2cleartxt		633
-#define OBJ_setAttr_T2cleartxt		OBJ_setAttr_IssCap_T2,2L
-
-#define SN_setAttr_TokICCsig		"setAttr-TokICCsig"
-#define LN_setAttr_TokICCsig		"ICC or token signature"
-#define NID_setAttr_TokICCsig		634
-#define OBJ_setAttr_TokICCsig		OBJ_setAttr_IssCap_Sig,1L
-
-#define SN_setAttr_SecDevSig		"setAttr-SecDevSig"
-#define LN_setAttr_SecDevSig		"secure device signature"
-#define NID_setAttr_SecDevSig		635
-#define OBJ_setAttr_SecDevSig		OBJ_setAttr_IssCap_Sig,2L
-
-#define SN_set_brand_IATA_ATA		"set-brand-IATA-ATA"
-#define NID_set_brand_IATA_ATA		636
-#define OBJ_set_brand_IATA_ATA		OBJ_set_brand,1L
-
-#define SN_set_brand_Diners		"set-brand-Diners"
-#define NID_set_brand_Diners		637
-#define OBJ_set_brand_Diners		OBJ_set_brand,30L
-
-#define SN_set_brand_AmericanExpress		"set-brand-AmericanExpress"
-#define NID_set_brand_AmericanExpress		638
-#define OBJ_set_brand_AmericanExpress		OBJ_set_brand,34L
-
-#define SN_set_brand_JCB		"set-brand-JCB"
-#define NID_set_brand_JCB		639
-#define OBJ_set_brand_JCB		OBJ_set_brand,35L
-
-#define SN_set_brand_Visa		"set-brand-Visa"
-#define NID_set_brand_Visa		640
-#define OBJ_set_brand_Visa		OBJ_set_brand,4L
-
-#define SN_set_brand_MasterCard		"set-brand-MasterCard"
-#define NID_set_brand_MasterCard		641
-#define OBJ_set_brand_MasterCard		OBJ_set_brand,5L
-
-#define SN_set_brand_Novus		"set-brand-Novus"
-#define NID_set_brand_Novus		642
-#define OBJ_set_brand_Novus		OBJ_set_brand,6011L
-
-#define SN_des_cdmf		"DES-CDMF"
-#define LN_des_cdmf		"des-cdmf"
-#define NID_des_cdmf		643
-#define OBJ_des_cdmf		OBJ_rsadsi,3L,10L
-
-#define SN_rsaOAEPEncryptionSET		"rsaOAEPEncryptionSET"
-#define NID_rsaOAEPEncryptionSET		644
-#define OBJ_rsaOAEPEncryptionSET		OBJ_rsadsi,1L,1L,6L
-
-#define SN_ipsec3		"Oakley-EC2N-3"
-#define LN_ipsec3		"ipsec3"
-#define NID_ipsec3		749
-
-#define SN_ipsec4		"Oakley-EC2N-4"
-#define LN_ipsec4		"ipsec4"
-#define NID_ipsec4		750
-
-#define SN_whirlpool		"whirlpool"
-#define NID_whirlpool		804
-#define OBJ_whirlpool		OBJ_iso,0L,10118L,3L,0L,55L
-
-#define SN_cryptopro		"cryptopro"
-#define NID_cryptopro		805
-#define OBJ_cryptopro		OBJ_member_body,643L,2L,2L
-
-#define SN_cryptocom		"cryptocom"
-#define NID_cryptocom		806
-#define OBJ_cryptocom		OBJ_member_body,643L,2L,9L
-
-#define SN_id_GostR3411_94_with_GostR3410_2001		"id-GostR3411-94-with-GostR3410-2001"
-#define LN_id_GostR3411_94_with_GostR3410_2001		"GOST R 34.11-94 with GOST R 34.10-2001"
-#define NID_id_GostR3411_94_with_GostR3410_2001		807
-#define OBJ_id_GostR3411_94_with_GostR3410_2001		OBJ_cryptopro,3L
-
-#define SN_id_GostR3411_94_with_GostR3410_94		"id-GostR3411-94-with-GostR3410-94"
-#define LN_id_GostR3411_94_with_GostR3410_94		"GOST R 34.11-94 with GOST R 34.10-94"
-#define NID_id_GostR3411_94_with_GostR3410_94		808
-#define OBJ_id_GostR3411_94_with_GostR3410_94		OBJ_cryptopro,4L
-
-#define SN_id_GostR3411_94		"md_gost94"
-#define LN_id_GostR3411_94		"GOST R 34.11-94"
-#define NID_id_GostR3411_94		809
-#define OBJ_id_GostR3411_94		OBJ_cryptopro,9L
-
-#define SN_id_HMACGostR3411_94		"id-HMACGostR3411-94"
-#define LN_id_HMACGostR3411_94		"HMAC GOST 34.11-94"
-#define NID_id_HMACGostR3411_94		810
-#define OBJ_id_HMACGostR3411_94		OBJ_cryptopro,10L
-
-#define SN_id_GostR3410_2001		"gost2001"
-#define LN_id_GostR3410_2001		"GOST R 34.10-2001"
-#define NID_id_GostR3410_2001		811
-#define OBJ_id_GostR3410_2001		OBJ_cryptopro,19L
-
-#define SN_id_GostR3410_94		"gost94"
-#define LN_id_GostR3410_94		"GOST R 34.10-94"
-#define NID_id_GostR3410_94		812
-#define OBJ_id_GostR3410_94		OBJ_cryptopro,20L
-
-#define SN_id_Gost28147_89		"gost89"
-#define LN_id_Gost28147_89		"GOST 28147-89"
-#define NID_id_Gost28147_89		813
-#define OBJ_id_Gost28147_89		OBJ_cryptopro,21L
-
-#define SN_gost89_cnt		"gost89-cnt"
-#define NID_gost89_cnt		814
-
-#define SN_id_Gost28147_89_MAC		"gost-mac"
-#define LN_id_Gost28147_89_MAC		"GOST 28147-89 MAC"
-#define NID_id_Gost28147_89_MAC		815
-#define OBJ_id_Gost28147_89_MAC		OBJ_cryptopro,22L
-
-#define SN_id_GostR3411_94_prf		"prf-gostr3411-94"
-#define LN_id_GostR3411_94_prf		"GOST R 34.11-94 PRF"
-#define NID_id_GostR3411_94_prf		816
-#define OBJ_id_GostR3411_94_prf		OBJ_cryptopro,23L
-
-#define SN_id_GostR3410_2001DH		"id-GostR3410-2001DH"
-#define LN_id_GostR3410_2001DH		"GOST R 34.10-2001 DH"
-#define NID_id_GostR3410_2001DH		817
-#define OBJ_id_GostR3410_2001DH		OBJ_cryptopro,98L
-
-#define SN_id_GostR3410_94DH		"id-GostR3410-94DH"
-#define LN_id_GostR3410_94DH		"GOST R 34.10-94 DH"
-#define NID_id_GostR3410_94DH		818
-#define OBJ_id_GostR3410_94DH		OBJ_cryptopro,99L
-
-#define SN_id_Gost28147_89_CryptoPro_KeyMeshing		"id-Gost28147-89-CryptoPro-KeyMeshing"
-#define NID_id_Gost28147_89_CryptoPro_KeyMeshing		819
-#define OBJ_id_Gost28147_89_CryptoPro_KeyMeshing		OBJ_cryptopro,14L,1L
-
-#define SN_id_Gost28147_89_None_KeyMeshing		"id-Gost28147-89-None-KeyMeshing"
-#define NID_id_Gost28147_89_None_KeyMeshing		820
-#define OBJ_id_Gost28147_89_None_KeyMeshing		OBJ_cryptopro,14L,0L
-
-#define SN_id_GostR3411_94_TestParamSet		"id-GostR3411-94-TestParamSet"
-#define NID_id_GostR3411_94_TestParamSet		821
-#define OBJ_id_GostR3411_94_TestParamSet		OBJ_cryptopro,30L,0L
-
-#define SN_id_GostR3411_94_CryptoProParamSet		"id-GostR3411-94-CryptoProParamSet"
-#define NID_id_GostR3411_94_CryptoProParamSet		822
-#define OBJ_id_GostR3411_94_CryptoProParamSet		OBJ_cryptopro,30L,1L
-
-#define SN_id_Gost28147_89_TestParamSet		"id-Gost28147-89-TestParamSet"
-#define NID_id_Gost28147_89_TestParamSet		823
-#define OBJ_id_Gost28147_89_TestParamSet		OBJ_cryptopro,31L,0L
-
-#define SN_id_Gost28147_89_CryptoPro_A_ParamSet		"id-Gost28147-89-CryptoPro-A-ParamSet"
-#define NID_id_Gost28147_89_CryptoPro_A_ParamSet		824
-#define OBJ_id_Gost28147_89_CryptoPro_A_ParamSet		OBJ_cryptopro,31L,1L
-
-#define SN_id_Gost28147_89_CryptoPro_B_ParamSet		"id-Gost28147-89-CryptoPro-B-ParamSet"
-#define NID_id_Gost28147_89_CryptoPro_B_ParamSet		825
-#define OBJ_id_Gost28147_89_CryptoPro_B_ParamSet		OBJ_cryptopro,31L,2L
-
-#define SN_id_Gost28147_89_CryptoPro_C_ParamSet		"id-Gost28147-89-CryptoPro-C-ParamSet"
-#define NID_id_Gost28147_89_CryptoPro_C_ParamSet		826
-#define OBJ_id_Gost28147_89_CryptoPro_C_ParamSet		OBJ_cryptopro,31L,3L
-
-#define SN_id_Gost28147_89_CryptoPro_D_ParamSet		"id-Gost28147-89-CryptoPro-D-ParamSet"
-#define NID_id_Gost28147_89_CryptoPro_D_ParamSet		827
-#define OBJ_id_Gost28147_89_CryptoPro_D_ParamSet		OBJ_cryptopro,31L,4L
-
-#define SN_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet		"id-Gost28147-89-CryptoPro-Oscar-1-1-ParamSet"
-#define NID_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet		828
-#define OBJ_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet		OBJ_cryptopro,31L,5L
-
-#define SN_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet		"id-Gost28147-89-CryptoPro-Oscar-1-0-ParamSet"
-#define NID_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet		829
-#define OBJ_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet		OBJ_cryptopro,31L,6L
-
-#define SN_id_Gost28147_89_CryptoPro_RIC_1_ParamSet		"id-Gost28147-89-CryptoPro-RIC-1-ParamSet"
-#define NID_id_Gost28147_89_CryptoPro_RIC_1_ParamSet		830
-#define OBJ_id_Gost28147_89_CryptoPro_RIC_1_ParamSet		OBJ_cryptopro,31L,7L
-
-#define SN_id_GostR3410_94_TestParamSet		"id-GostR3410-94-TestParamSet"
-#define NID_id_GostR3410_94_TestParamSet		831
-#define OBJ_id_GostR3410_94_TestParamSet		OBJ_cryptopro,32L,0L
-
-#define SN_id_GostR3410_94_CryptoPro_A_ParamSet		"id-GostR3410-94-CryptoPro-A-ParamSet"
-#define NID_id_GostR3410_94_CryptoPro_A_ParamSet		832
-#define OBJ_id_GostR3410_94_CryptoPro_A_ParamSet		OBJ_cryptopro,32L,2L
-
-#define SN_id_GostR3410_94_CryptoPro_B_ParamSet		"id-GostR3410-94-CryptoPro-B-ParamSet"
-#define NID_id_GostR3410_94_CryptoPro_B_ParamSet		833
-#define OBJ_id_GostR3410_94_CryptoPro_B_ParamSet		OBJ_cryptopro,32L,3L
-
-#define SN_id_GostR3410_94_CryptoPro_C_ParamSet		"id-GostR3410-94-CryptoPro-C-ParamSet"
-#define NID_id_GostR3410_94_CryptoPro_C_ParamSet		834
-#define OBJ_id_GostR3410_94_CryptoPro_C_ParamSet		OBJ_cryptopro,32L,4L
-
-#define SN_id_GostR3410_94_CryptoPro_D_ParamSet		"id-GostR3410-94-CryptoPro-D-ParamSet"
-#define NID_id_GostR3410_94_CryptoPro_D_ParamSet		835
-#define OBJ_id_GostR3410_94_CryptoPro_D_ParamSet		OBJ_cryptopro,32L,5L
-
-#define SN_id_GostR3410_94_CryptoPro_XchA_ParamSet		"id-GostR3410-94-CryptoPro-XchA-ParamSet"
-#define NID_id_GostR3410_94_CryptoPro_XchA_ParamSet		836
-#define OBJ_id_GostR3410_94_CryptoPro_XchA_ParamSet		OBJ_cryptopro,33L,1L
-
-#define SN_id_GostR3410_94_CryptoPro_XchB_ParamSet		"id-GostR3410-94-CryptoPro-XchB-ParamSet"
-#define NID_id_GostR3410_94_CryptoPro_XchB_ParamSet		837
-#define OBJ_id_GostR3410_94_CryptoPro_XchB_ParamSet		OBJ_cryptopro,33L,2L
-
-#define SN_id_GostR3410_94_CryptoPro_XchC_ParamSet		"id-GostR3410-94-CryptoPro-XchC-ParamSet"
-#define NID_id_GostR3410_94_CryptoPro_XchC_ParamSet		838
-#define OBJ_id_GostR3410_94_CryptoPro_XchC_ParamSet		OBJ_cryptopro,33L,3L
-
-#define SN_id_GostR3410_2001_TestParamSet		"id-GostR3410-2001-TestParamSet"
-#define NID_id_GostR3410_2001_TestParamSet		839
-#define OBJ_id_GostR3410_2001_TestParamSet		OBJ_cryptopro,35L,0L
-
-#define SN_id_GostR3410_2001_CryptoPro_A_ParamSet		"id-GostR3410-2001-CryptoPro-A-ParamSet"
-#define NID_id_GostR3410_2001_CryptoPro_A_ParamSet		840
-#define OBJ_id_GostR3410_2001_CryptoPro_A_ParamSet		OBJ_cryptopro,35L,1L
-
-#define SN_id_GostR3410_2001_CryptoPro_B_ParamSet		"id-GostR3410-2001-CryptoPro-B-ParamSet"
-#define NID_id_GostR3410_2001_CryptoPro_B_ParamSet		841
-#define OBJ_id_GostR3410_2001_CryptoPro_B_ParamSet		OBJ_cryptopro,35L,2L
-
-#define SN_id_GostR3410_2001_CryptoPro_C_ParamSet		"id-GostR3410-2001-CryptoPro-C-ParamSet"
-#define NID_id_GostR3410_2001_CryptoPro_C_ParamSet		842
-#define OBJ_id_GostR3410_2001_CryptoPro_C_ParamSet		OBJ_cryptopro,35L,3L
-
-#define SN_id_GostR3410_2001_CryptoPro_XchA_ParamSet		"id-GostR3410-2001-CryptoPro-XchA-ParamSet"
-#define NID_id_GostR3410_2001_CryptoPro_XchA_ParamSet		843
-#define OBJ_id_GostR3410_2001_CryptoPro_XchA_ParamSet		OBJ_cryptopro,36L,0L
-
-#define SN_id_GostR3410_2001_CryptoPro_XchB_ParamSet		"id-GostR3410-2001-CryptoPro-XchB-ParamSet"
-#define NID_id_GostR3410_2001_CryptoPro_XchB_ParamSet		844
-#define OBJ_id_GostR3410_2001_CryptoPro_XchB_ParamSet		OBJ_cryptopro,36L,1L
-
-#define SN_id_GostR3410_94_a		"id-GostR3410-94-a"
-#define NID_id_GostR3410_94_a		845
-#define OBJ_id_GostR3410_94_a		OBJ_id_GostR3410_94,1L
-
-#define SN_id_GostR3410_94_aBis		"id-GostR3410-94-aBis"
-#define NID_id_GostR3410_94_aBis		846
-#define OBJ_id_GostR3410_94_aBis		OBJ_id_GostR3410_94,2L
-
-#define SN_id_GostR3410_94_b		"id-GostR3410-94-b"
-#define NID_id_GostR3410_94_b		847
-#define OBJ_id_GostR3410_94_b		OBJ_id_GostR3410_94,3L
-
-#define SN_id_GostR3410_94_bBis		"id-GostR3410-94-bBis"
-#define NID_id_GostR3410_94_bBis		848
-#define OBJ_id_GostR3410_94_bBis		OBJ_id_GostR3410_94,4L
-
-#define SN_id_Gost28147_89_cc		"id-Gost28147-89-cc"
-#define LN_id_Gost28147_89_cc		"GOST 28147-89 Cryptocom ParamSet"
-#define NID_id_Gost28147_89_cc		849
-#define OBJ_id_Gost28147_89_cc		OBJ_cryptocom,1L,6L,1L
-
-#define SN_id_GostR3410_94_cc		"gost94cc"
-#define LN_id_GostR3410_94_cc		"GOST 34.10-94 Cryptocom"
-#define NID_id_GostR3410_94_cc		850
-#define OBJ_id_GostR3410_94_cc		OBJ_cryptocom,1L,5L,3L
-
-#define SN_id_GostR3410_2001_cc		"gost2001cc"
-#define LN_id_GostR3410_2001_cc		"GOST 34.10-2001 Cryptocom"
-#define NID_id_GostR3410_2001_cc		851
-#define OBJ_id_GostR3410_2001_cc		OBJ_cryptocom,1L,5L,4L
-
-#define SN_id_GostR3411_94_with_GostR3410_94_cc		"id-GostR3411-94-with-GostR3410-94-cc"
-#define LN_id_GostR3411_94_with_GostR3410_94_cc		"GOST R 34.11-94 with GOST R 34.10-94 Cryptocom"
-#define NID_id_GostR3411_94_with_GostR3410_94_cc		852
-#define OBJ_id_GostR3411_94_with_GostR3410_94_cc		OBJ_cryptocom,1L,3L,3L
-
-#define SN_id_GostR3411_94_with_GostR3410_2001_cc		"id-GostR3411-94-with-GostR3410-2001-cc"
-#define LN_id_GostR3411_94_with_GostR3410_2001_cc		"GOST R 34.11-94 with GOST R 34.10-2001 Cryptocom"
-#define NID_id_GostR3411_94_with_GostR3410_2001_cc		853
-#define OBJ_id_GostR3411_94_with_GostR3410_2001_cc		OBJ_cryptocom,1L,3L,4L
-
-#define SN_id_GostR3410_2001_ParamSet_cc		"id-GostR3410-2001-ParamSet-cc"
-#define LN_id_GostR3410_2001_ParamSet_cc		"GOST R 3410-2001 Parameter Set Cryptocom"
-#define NID_id_GostR3410_2001_ParamSet_cc		854
-#define OBJ_id_GostR3410_2001_ParamSet_cc		OBJ_cryptocom,1L,8L,1L
-
-#define SN_camellia_128_cbc		"CAMELLIA-128-CBC"
-#define LN_camellia_128_cbc		"camellia-128-cbc"
-#define NID_camellia_128_cbc		751
-#define OBJ_camellia_128_cbc		1L,2L,392L,200011L,61L,1L,1L,1L,2L
-
-#define SN_camellia_192_cbc		"CAMELLIA-192-CBC"
-#define LN_camellia_192_cbc		"camellia-192-cbc"
-#define NID_camellia_192_cbc		752
-#define OBJ_camellia_192_cbc		1L,2L,392L,200011L,61L,1L,1L,1L,3L
-
-#define SN_camellia_256_cbc		"CAMELLIA-256-CBC"
-#define LN_camellia_256_cbc		"camellia-256-cbc"
-#define NID_camellia_256_cbc		753
-#define OBJ_camellia_256_cbc		1L,2L,392L,200011L,61L,1L,1L,1L,4L
-
-#define OBJ_ntt_ds		0L,3L,4401L,5L
-
-#define OBJ_camellia		OBJ_ntt_ds,3L,1L,9L
-
-#define SN_camellia_128_ecb		"CAMELLIA-128-ECB"
-#define LN_camellia_128_ecb		"camellia-128-ecb"
-#define NID_camellia_128_ecb		754
-#define OBJ_camellia_128_ecb		OBJ_camellia,1L
-
-#define SN_camellia_128_ofb128		"CAMELLIA-128-OFB"
-#define LN_camellia_128_ofb128		"camellia-128-ofb"
-#define NID_camellia_128_ofb128		766
-#define OBJ_camellia_128_ofb128		OBJ_camellia,3L
-
-#define SN_camellia_128_cfb128		"CAMELLIA-128-CFB"
-#define LN_camellia_128_cfb128		"camellia-128-cfb"
-#define NID_camellia_128_cfb128		757
-#define OBJ_camellia_128_cfb128		OBJ_camellia,4L
-
-#define SN_camellia_192_ecb		"CAMELLIA-192-ECB"
-#define LN_camellia_192_ecb		"camellia-192-ecb"
-#define NID_camellia_192_ecb		755
-#define OBJ_camellia_192_ecb		OBJ_camellia,21L
-
-#define SN_camellia_192_ofb128		"CAMELLIA-192-OFB"
-#define LN_camellia_192_ofb128		"camellia-192-ofb"
-#define NID_camellia_192_ofb128		767
-#define OBJ_camellia_192_ofb128		OBJ_camellia,23L
-
-#define SN_camellia_192_cfb128		"CAMELLIA-192-CFB"
-#define LN_camellia_192_cfb128		"camellia-192-cfb"
-#define NID_camellia_192_cfb128		758
-#define OBJ_camellia_192_cfb128		OBJ_camellia,24L
-
-#define SN_camellia_256_ecb		"CAMELLIA-256-ECB"
-#define LN_camellia_256_ecb		"camellia-256-ecb"
-#define NID_camellia_256_ecb		756
-#define OBJ_camellia_256_ecb		OBJ_camellia,41L
-
-#define SN_camellia_256_ofb128		"CAMELLIA-256-OFB"
-#define LN_camellia_256_ofb128		"camellia-256-ofb"
-#define NID_camellia_256_ofb128		768
-#define OBJ_camellia_256_ofb128		OBJ_camellia,43L
-
-#define SN_camellia_256_cfb128		"CAMELLIA-256-CFB"
-#define LN_camellia_256_cfb128		"camellia-256-cfb"
-#define NID_camellia_256_cfb128		759
-#define OBJ_camellia_256_cfb128		OBJ_camellia,44L
-
-#define SN_camellia_128_cfb1		"CAMELLIA-128-CFB1"
-#define LN_camellia_128_cfb1		"camellia-128-cfb1"
-#define NID_camellia_128_cfb1		760
-
-#define SN_camellia_192_cfb1		"CAMELLIA-192-CFB1"
-#define LN_camellia_192_cfb1		"camellia-192-cfb1"
-#define NID_camellia_192_cfb1		761
-
-#define SN_camellia_256_cfb1		"CAMELLIA-256-CFB1"
-#define LN_camellia_256_cfb1		"camellia-256-cfb1"
-#define NID_camellia_256_cfb1		762
-
-#define SN_camellia_128_cfb8		"CAMELLIA-128-CFB8"
-#define LN_camellia_128_cfb8		"camellia-128-cfb8"
-#define NID_camellia_128_cfb8		763
-
-#define SN_camellia_192_cfb8		"CAMELLIA-192-CFB8"
-#define LN_camellia_192_cfb8		"camellia-192-cfb8"
-#define NID_camellia_192_cfb8		764
-
-#define SN_camellia_256_cfb8		"CAMELLIA-256-CFB8"
-#define LN_camellia_256_cfb8		"camellia-256-cfb8"
-#define NID_camellia_256_cfb8		765
-
-#define SN_kisa		"KISA"
-#define LN_kisa		"kisa"
-#define NID_kisa		773
-#define OBJ_kisa		OBJ_member_body,410L,200004L
-
-#define SN_seed_ecb		"SEED-ECB"
-#define LN_seed_ecb		"seed-ecb"
-#define NID_seed_ecb		776
-#define OBJ_seed_ecb		OBJ_kisa,1L,3L
-
-#define SN_seed_cbc		"SEED-CBC"
-#define LN_seed_cbc		"seed-cbc"
-#define NID_seed_cbc		777
-#define OBJ_seed_cbc		OBJ_kisa,1L,4L
-
-#define SN_seed_cfb128		"SEED-CFB"
-#define LN_seed_cfb128		"seed-cfb"
-#define NID_seed_cfb128		779
-#define OBJ_seed_cfb128		OBJ_kisa,1L,5L
-
-#define SN_seed_ofb128		"SEED-OFB"
-#define LN_seed_ofb128		"seed-ofb"
-#define NID_seed_ofb128		778
-#define OBJ_seed_ofb128		OBJ_kisa,1L,6L
-
-#define SN_hmac		"HMAC"
-#define LN_hmac		"hmac"
-#define NID_hmac		855
-
diff --git a/extra_lib/include/openssl/objects.h b/extra_lib/include/openssl/objects.h
deleted file mode 100644
index bd0ee52..0000000
--- a/extra_lib/include/openssl/objects.h
+++ /dev/null
@@ -1,1138 +0,0 @@
-/* crypto/objects/objects.h */
-/* Copyright (C) 1995-1998 Eric Young (eay at cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay at cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh at cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay at cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh at cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef HEADER_OBJECTS_H
-#define HEADER_OBJECTS_H
-
-#define USE_OBJ_MAC
-
-#ifdef USE_OBJ_MAC
-#include <openssl/obj_mac.h>
-#else
-#define SN_undef			"UNDEF"
-#define LN_undef			"undefined"
-#define NID_undef			0
-#define OBJ_undef			0L
-
-#define SN_Algorithm			"Algorithm"
-#define LN_algorithm			"algorithm"
-#define NID_algorithm			38
-#define OBJ_algorithm			1L,3L,14L,3L,2L
-
-#define LN_rsadsi			"rsadsi"
-#define NID_rsadsi			1
-#define OBJ_rsadsi			1L,2L,840L,113549L
-
-#define LN_pkcs				"pkcs"
-#define NID_pkcs			2
-#define OBJ_pkcs			OBJ_rsadsi,1L
-
-#define SN_md2				"MD2"
-#define LN_md2				"md2"
-#define NID_md2				3
-#define OBJ_md2				OBJ_rsadsi,2L,2L
-
-#define SN_md5				"MD5"
-#define LN_md5				"md5"
-#define NID_md5				4
-#define OBJ_md5				OBJ_rsadsi,2L,5L
-
-#define SN_rc4				"RC4"
-#define LN_rc4				"rc4"
-#define NID_rc4				5
-#define OBJ_rc4				OBJ_rsadsi,3L,4L
-
-#define LN_rsaEncryption		"rsaEncryption"
-#define NID_rsaEncryption		6
-#define OBJ_rsaEncryption		OBJ_pkcs,1L,1L
-
-#define SN_md2WithRSAEncryption		"RSA-MD2"
-#define LN_md2WithRSAEncryption		"md2WithRSAEncryption"
-#define NID_md2WithRSAEncryption	7
-#define OBJ_md2WithRSAEncryption	OBJ_pkcs,1L,2L
-
-#define SN_md5WithRSAEncryption		"RSA-MD5"
-#define LN_md5WithRSAEncryption		"md5WithRSAEncryption"
-#define NID_md5WithRSAEncryption	8
-#define OBJ_md5WithRSAEncryption	OBJ_pkcs,1L,4L
-
-#define SN_pbeWithMD2AndDES_CBC		"PBE-MD2-DES"
-#define LN_pbeWithMD2AndDES_CBC		"pbeWithMD2AndDES-CBC"
-#define NID_pbeWithMD2AndDES_CBC	9
-#define OBJ_pbeWithMD2AndDES_CBC	OBJ_pkcs,5L,1L
-
-#define SN_pbeWithMD5AndDES_CBC		"PBE-MD5-DES"
-#define LN_pbeWithMD5AndDES_CBC		"pbeWithMD5AndDES-CBC"
-#define NID_pbeWithMD5AndDES_CBC	10
-#define OBJ_pbeWithMD5AndDES_CBC	OBJ_pkcs,5L,3L
-
-#define LN_X500				"X500"
-#define NID_X500			11
-#define OBJ_X500			2L,5L
-
-#define LN_X509				"X509"
-#define NID_X509			12
-#define OBJ_X509			OBJ_X500,4L
-
-#define SN_commonName			"CN"
-#define LN_commonName			"commonName"
-#define NID_commonName			13
-#define OBJ_commonName			OBJ_X509,3L
-
-#define SN_countryName			"C"
-#define LN_countryName			"countryName"
-#define NID_countryName			14
-#define OBJ_countryName			OBJ_X509,6L
-
-#define SN_localityName			"L"
-#define LN_localityName			"localityName"
-#define NID_localityName		15
-#define OBJ_localityName		OBJ_X509,7L
-
-/* Postal Address? PA */
-
-/* should be "ST" (rfc1327) but MS uses 'S' */
-#define SN_stateOrProvinceName		"ST"
-#define LN_stateOrProvinceName		"stateOrProvinceName"
-#define NID_stateOrProvinceName		16
-#define OBJ_stateOrProvinceName		OBJ_X509,8L
-
-#define SN_organizationName		"O"
-#define LN_organizationName		"organizationName"
-#define NID_organizationName		17
-#define OBJ_organizationName		OBJ_X509,10L
-
-#define SN_organizationalUnitName	"OU"
-#define LN_organizationalUnitName	"organizationalUnitName"
-#define NID_organizationalUnitName	18
-#define OBJ_organizationalUnitName	OBJ_X509,11L
-
-#define SN_rsa				"RSA"
-#define LN_rsa				"rsa"
-#define NID_rsa				19
-#define OBJ_rsa				OBJ_X500,8L,1L,1L
-
-#define LN_pkcs7			"pkcs7"
-#define NID_pkcs7			20
-#define OBJ_pkcs7			OBJ_pkcs,7L
-
-#define LN_pkcs7_data			"pkcs7-data"
-#define NID_pkcs7_data			21
-#define OBJ_pkcs7_data			OBJ_pkcs7,1L
-
-#define LN_pkcs7_signed			"pkcs7-signedData"
-#define NID_pkcs7_signed		22
-#define OBJ_pkcs7_signed		OBJ_pkcs7,2L
-
-#define LN_pkcs7_enveloped		"pkcs7-envelopedData"
-#define NID_pkcs7_enveloped		23
-#define OBJ_pkcs7_enveloped		OBJ_pkcs7,3L
-
-#define LN_pkcs7_signedAndEnveloped	"pkcs7-signedAndEnvelopedData"
-#define NID_pkcs7_signedAndEnveloped	24
-#define OBJ_pkcs7_signedAndEnveloped	OBJ_pkcs7,4L
-
-#define LN_pkcs7_digest			"pkcs7-digestData"
-#define NID_pkcs7_digest		25
-#define OBJ_pkcs7_digest		OBJ_pkcs7,5L
-
-#define LN_pkcs7_encrypted		"pkcs7-encryptedData"
-#define NID_pkcs7_encrypted		26
-#define OBJ_pkcs7_encrypted		OBJ_pkcs7,6L
-
-#define LN_pkcs3			"pkcs3"
-#define NID_pkcs3			27
-#define OBJ_pkcs3			OBJ_pkcs,3L
-
-#define LN_dhKeyAgreement		"dhKeyAgreement"
-#define NID_dhKeyAgreement		28
-#define OBJ_dhKeyAgreement		OBJ_pkcs3,1L
-
-#define SN_des_ecb			"DES-ECB"
-#define LN_des_ecb			"des-ecb"
-#define NID_des_ecb			29
-#define OBJ_des_ecb			OBJ_algorithm,6L
-
-#define SN_des_cfb64			"DES-CFB"
-#define LN_des_cfb64			"des-cfb"
-#define NID_des_cfb64			30
-/* IV + num */
-#define OBJ_des_cfb64			OBJ_algorithm,9L
-
-#define SN_des_cbc			"DES-CBC"
-#define LN_des_cbc			"des-cbc"
-#define NID_des_cbc			31
-/* IV */
-#define OBJ_des_cbc			OBJ_algorithm,7L
-
-#define SN_des_ede			"DES-EDE"
-#define LN_des_ede			"des-ede"
-#define NID_des_ede			32
-/* ?? */
-#define OBJ_des_ede			OBJ_algorithm,17L
-
-#define SN_des_ede3			"DES-EDE3"
-#define LN_des_ede3			"des-ede3"
-#define NID_des_ede3			33
-
-#define SN_idea_cbc			"IDEA-CBC"
-#define LN_idea_cbc			"idea-cbc"
-#define NID_idea_cbc			34
-#define OBJ_idea_cbc			1L,3L,6L,1L,4L,1L,188L,7L,1L,1L,2L
-
-#define SN_idea_cfb64			"IDEA-CFB"
-#define LN_idea_cfb64			"idea-cfb"
-#define NID_idea_cfb64			35
-
-#define SN_idea_ecb			"IDEA-ECB"
-#define LN_idea_ecb			"idea-ecb"
-#define NID_idea_ecb			36
-
-#define SN_rc2_cbc			"RC2-CBC"
-#define LN_rc2_cbc			"rc2-cbc"
-#define NID_rc2_cbc			37
-#define OBJ_rc2_cbc			OBJ_rsadsi,3L,2L
-
-#define SN_rc2_ecb			"RC2-ECB"
-#define LN_rc2_ecb			"rc2-ecb"
-#define NID_rc2_ecb			38
-
-#define SN_rc2_cfb64			"RC2-CFB"
-#define LN_rc2_cfb64			"rc2-cfb"
-#define NID_rc2_cfb64			39
-
-#define SN_rc2_ofb64			"RC2-OFB"
-#define LN_rc2_ofb64			"rc2-ofb"
-#define NID_rc2_ofb64			40
-
-#define SN_sha				"SHA"
-#define LN_sha				"sha"
-#define NID_sha				41
-#define OBJ_sha				OBJ_algorithm,18L
-
-#define SN_shaWithRSAEncryption		"RSA-SHA"
-#define LN_shaWithRSAEncryption		"shaWithRSAEncryption"
-#define NID_shaWithRSAEncryption	42
-#define OBJ_shaWithRSAEncryption	OBJ_algorithm,15L
-
-#define SN_des_ede_cbc			"DES-EDE-CBC"
-#define LN_des_ede_cbc			"des-ede-cbc"
-#define NID_des_ede_cbc			43
-
-#define SN_des_ede3_cbc			"DES-EDE3-CBC"
-#define LN_des_ede3_cbc			"des-ede3-cbc"
-#define NID_des_ede3_cbc		44
-#define OBJ_des_ede3_cbc		OBJ_rsadsi,3L,7L
-
-#define SN_des_ofb64			"DES-OFB"
-#define LN_des_ofb64			"des-ofb"
-#define NID_des_ofb64			45
-#define OBJ_des_ofb64			OBJ_algorithm,8L
-
-#define SN_idea_ofb64			"IDEA-OFB"
-#define LN_idea_ofb64			"idea-ofb"
-#define NID_idea_ofb64			46
-
-#define LN_pkcs9			"pkcs9"
-#define NID_pkcs9			47
-#define OBJ_pkcs9			OBJ_pkcs,9L
-
-#define SN_pkcs9_emailAddress		"Email"
-#define LN_pkcs9_emailAddress		"emailAddress"
-#define NID_pkcs9_emailAddress		48
-#define OBJ_pkcs9_emailAddress		OBJ_pkcs9,1L
-
-#define LN_pkcs9_unstructuredName	"unstructuredName"
-#define NID_pkcs9_unstructuredName	49
-#define OBJ_pkcs9_unstructuredName	OBJ_pkcs9,2L
-
-#define LN_pkcs9_contentType		"contentType"
-#define NID_pkcs9_contentType		50
-#define OBJ_pkcs9_contentType		OBJ_pkcs9,3L
-
-#define LN_pkcs9_messageDigest		"messageDigest"
-#define NID_pkcs9_messageDigest		51
-#define OBJ_pkcs9_messageDigest		OBJ_pkcs9,4L
-
-#define LN_pkcs9_signingTime		"signingTime"
-#define NID_pkcs9_signingTime		52
-#define OBJ_pkcs9_signingTime		OBJ_pkcs9,5L
-
-#define LN_pkcs9_countersignature	"countersignature"
-#define NID_pkcs9_countersignature	53
-#define OBJ_pkcs9_countersignature	OBJ_pkcs9,6L
-
-#define LN_pkcs9_challengePassword	"challengePassword"
-#define NID_pkcs9_challengePassword	54
-#define OBJ_pkcs9_challengePassword	OBJ_pkcs9,7L
-
-#define LN_pkcs9_unstructuredAddress	"unstructuredAddress"
-#define NID_pkcs9_unstructuredAddress	55
-#define OBJ_pkcs9_unstructuredAddress	OBJ_pkcs9,8L
-
-#define LN_pkcs9_extCertAttributes	"extendedCertificateAttributes"
-#define NID_pkcs9_extCertAttributes	56
-#define OBJ_pkcs9_extCertAttributes	OBJ_pkcs9,9L
-
-#define SN_netscape			"Netscape"
-#define LN_netscape			"Netscape Communications Corp."
-#define NID_netscape			57
-#define OBJ_netscape			2L,16L,840L,1L,113730L
-
-#define SN_netscape_cert_extension	"nsCertExt"
-#define LN_netscape_cert_extension	"Netscape Certificate Extension"
-#define NID_netscape_cert_extension	58
-#define OBJ_netscape_cert_extension	OBJ_netscape,1L
-
-#define SN_netscape_data_type		"nsDataType"
-#define LN_netscape_data_type		"Netscape Data Type"
-#define NID_netscape_data_type		59
-#define OBJ_netscape_data_type		OBJ_netscape,2L
-
-#define SN_des_ede_cfb64		"DES-EDE-CFB"
-#define LN_des_ede_cfb64		"des-ede-cfb"
-#define NID_des_ede_cfb64		60
-
-#define SN_des_ede3_cfb64		"DES-EDE3-CFB"
-#define LN_des_ede3_cfb64		"des-ede3-cfb"
-#define NID_des_ede3_cfb64		61
-
-#define SN_des_ede_ofb64		"DES-EDE-OFB"
-#define LN_des_ede_ofb64		"des-ede-ofb"
-#define NID_des_ede_ofb64		62
-
-#define SN_des_ede3_ofb64		"DES-EDE3-OFB"
-#define LN_des_ede3_ofb64		"des-ede3-ofb"
-#define NID_des_ede3_ofb64		63
-
-/* I'm not sure about the object ID */
-#define SN_sha1				"SHA1"
-#define LN_sha1				"sha1"
-#define NID_sha1			64
-#define OBJ_sha1			OBJ_algorithm,26L
-/* 28 Jun 1996 - eay */
-/* #define OBJ_sha1			1L,3L,14L,2L,26L,05L <- wrong */
-
-#define SN_sha1WithRSAEncryption	"RSA-SHA1"
-#define LN_sha1WithRSAEncryption	"sha1WithRSAEncryption"
-#define NID_sha1WithRSAEncryption	65
-#define OBJ_sha1WithRSAEncryption	OBJ_pkcs,1L,5L
-
-#define SN_dsaWithSHA			"DSA-SHA"
-#define LN_dsaWithSHA			"dsaWithSHA"
-#define NID_dsaWithSHA			66
-#define OBJ_dsaWithSHA			OBJ_algorithm,13L
-
-#define SN_dsa_2			"DSA-old"
-#define LN_dsa_2			"dsaEncryption-old"
-#define NID_dsa_2			67
-#define OBJ_dsa_2			OBJ_algorithm,12L
-
-/* proposed by microsoft to RSA */
-#define SN_pbeWithSHA1AndRC2_CBC	"PBE-SHA1-RC2-64"
-#define LN_pbeWithSHA1AndRC2_CBC	"pbeWithSHA1AndRC2-CBC"
-#define NID_pbeWithSHA1AndRC2_CBC	68
-#define OBJ_pbeWithSHA1AndRC2_CBC	OBJ_pkcs,5L,11L 
-
-/* proposed by microsoft to RSA as pbeWithSHA1AndRC4: it is now
- * defined explicitly in PKCS#5 v2.0 as id-PBKDF2 which is something
- * completely different.
- */
-#define LN_id_pbkdf2			"PBKDF2"
-#define NID_id_pbkdf2			69
-#define OBJ_id_pbkdf2			OBJ_pkcs,5L,12L 
-
-#define SN_dsaWithSHA1_2		"DSA-SHA1-old"
-#define LN_dsaWithSHA1_2		"dsaWithSHA1-old"
-#define NID_dsaWithSHA1_2		70
-/* Got this one from 'sdn706r20.pdf' which is actually an NSA document :-) */
-#define OBJ_dsaWithSHA1_2		OBJ_algorithm,27L
-
-#define SN_netscape_cert_type		"nsCertType"
-#define LN_netscape_cert_type		"Netscape Cert Type"
-#define NID_netscape_cert_type		71
-#define OBJ_netscape_cert_type		OBJ_netscape_cert_extension,1L
-
-#define SN_netscape_base_url		"nsBaseUrl"
-#define LN_netscape_base_url		"Netscape Base Url"
-#define NID_netscape_base_url		72
-#define OBJ_netscape_base_url		OBJ_netscape_cert_extension,2L
-
-#define SN_netscape_revocation_url	"nsRevocationUrl"
-#define LN_netscape_revocation_url	"Netscape Revocation Url"
-#define NID_netscape_revocation_url	73
-#define OBJ_netscape_revocation_url	OBJ_netscape_cert_extension,3L
-
-#define SN_netscape_ca_revocation_url	"nsCaRevocationUrl"
-#define LN_netscape_ca_revocation_url	"Netscape CA Revocation Url"
-#define NID_netscape_ca_revocation_url	74
-#define OBJ_netscape_ca_revocation_url	OBJ_netscape_cert_extension,4L
-
-#define SN_netscape_renewal_url		"nsRenewalUrl"
-#define LN_netscape_renewal_url		"Netscape Renewal Url"
-#define NID_netscape_renewal_url	75
-#define OBJ_netscape_renewal_url	OBJ_netscape_cert_extension,7L
-
-#define SN_netscape_ca_policy_url	"nsCaPolicyUrl"
-#define LN_netscape_ca_policy_url	"Netscape CA Policy Url"
-#define NID_netscape_ca_policy_url	76
-#define OBJ_netscape_ca_policy_url	OBJ_netscape_cert_extension,8L
-
-#define SN_netscape_ssl_server_name	"nsSslServerName"
-#define LN_netscape_ssl_server_name	"Netscape SSL Server Name"
-#define NID_netscape_ssl_server_name	77
-#define OBJ_netscape_ssl_server_name	OBJ_netscape_cert_extension,12L
-
-#define SN_netscape_comment		"nsComment"
-#define LN_netscape_comment		"Netscape Comment"
-#define NID_netscape_comment		78
-#define OBJ_netscape_comment		OBJ_netscape_cert_extension,13L
-
-#define SN_netscape_cert_sequence	"nsCertSequence"
-#define LN_netscape_cert_sequence	"Netscape Certificate Sequence"
-#define NID_netscape_cert_sequence	79
-#define OBJ_netscape_cert_sequence	OBJ_netscape_data_type,5L
-
-#define SN_desx_cbc			"DESX-CBC"
-#define LN_desx_cbc			"desx-cbc"
-#define NID_desx_cbc			80
-
-#define SN_id_ce			"id-ce"
-#define NID_id_ce			81
-#define OBJ_id_ce			2L,5L,29L
-
-#define SN_subject_key_identifier	"subjectKeyIdentifier"
-#define LN_subject_key_identifier	"X509v3 Subject Key Identifier"
-#define NID_subject_key_identifier	82
-#define OBJ_subject_key_identifier	OBJ_id_ce,14L
-
-#define SN_key_usage			"keyUsage"
-#define LN_key_usage			"X509v3 Key Usage"
-#define NID_key_usage			83
-#define OBJ_key_usage			OBJ_id_ce,15L
-
-#define SN_private_key_usage_period	"privateKeyUsagePeriod"
-#define LN_private_key_usage_period	"X509v3 Private Key Usage Period"
-#define NID_private_key_usage_period	84
-#define OBJ_private_key_usage_period	OBJ_id_ce,16L
-
-#define SN_subject_alt_name		"subjectAltName"
-#define LN_subject_alt_name		"X509v3 Subject Alternative Name"
-#define NID_subject_alt_name		85
-#define OBJ_subject_alt_name		OBJ_id_ce,17L
-
-#define SN_issuer_alt_name		"issuerAltName"
-#define LN_issuer_alt_name		"X509v3 Issuer Alternative Name"
-#define NID_issuer_alt_name		86
-#define OBJ_issuer_alt_name		OBJ_id_ce,18L
-
-#define SN_basic_constraints		"basicConstraints"
-#define LN_basic_constraints		"X509v3 Basic Constraints"
-#define NID_basic_constraints		87
-#define OBJ_basic_constraints		OBJ_id_ce,19L
-
-#define SN_crl_number			"crlNumber"
-#define LN_crl_number			"X509v3 CRL Number"
-#define NID_crl_number			88
-#define OBJ_crl_number			OBJ_id_ce,20L
-
-#define SN_certificate_policies		"certificatePolicies"
-#define LN_certificate_policies		"X509v3 Certificate Policies"
-#define NID_certificate_policies	89
-#define OBJ_certificate_policies	OBJ_id_ce,32L
-
-#define SN_authority_key_identifier	"authorityKeyIdentifier"
-#define LN_authority_key_identifier	"X509v3 Authority Key Identifier"
-#define NID_authority_key_identifier	90
-#define OBJ_authority_key_identifier	OBJ_id_ce,35L
-
-#define SN_bf_cbc			"BF-CBC"
-#define LN_bf_cbc			"bf-cbc"
-#define NID_bf_cbc			91
-#define OBJ_bf_cbc			1L,3L,6L,1L,4L,1L,3029L,1L,2L
-
-#define SN_bf_ecb			"BF-ECB"
-#define LN_bf_ecb			"bf-ecb"
-#define NID_bf_ecb			92
-
-#define SN_bf_cfb64			"BF-CFB"
-#define LN_bf_cfb64			"bf-cfb"
-#define NID_bf_cfb64			93
-
-#define SN_bf_ofb64			"BF-OFB"
-#define LN_bf_ofb64			"bf-ofb"
-#define NID_bf_ofb64			94
-
-#define SN_mdc2				"MDC2"
-#define LN_mdc2				"mdc2"
-#define NID_mdc2			95
-#define OBJ_mdc2			2L,5L,8L,3L,101L
-/* An alternative?			1L,3L,14L,3L,2L,19L */
-
-#define SN_mdc2WithRSA			"RSA-MDC2"
-#define LN_mdc2WithRSA			"mdc2withRSA"
-#define NID_mdc2WithRSA			96
-#define OBJ_mdc2WithRSA			2L,5L,8L,3L,100L
-
-#define SN_rc4_40			"RC4-40"
-#define LN_rc4_40			"rc4-40"
-#define NID_rc4_40			97
-
-#define SN_rc2_40_cbc			"RC2-40-CBC"
-#define LN_rc2_40_cbc			"rc2-40-cbc"
-#define NID_rc2_40_cbc			98
-
-#define SN_givenName			"G"
-#define LN_givenName			"givenName"
-#define NID_givenName			99
-#define OBJ_givenName			OBJ_X509,42L
-
-#define SN_surname			"S"
-#define LN_surname			"surname"
-#define NID_surname			100
-#define OBJ_surname			OBJ_X509,4L
-
-#define SN_initials			"I"
-#define LN_initials			"initials"
-#define NID_initials			101
-#define OBJ_initials			OBJ_X509,43L
-
-#define SN_uniqueIdentifier		"UID"
-#define LN_uniqueIdentifier		"uniqueIdentifier"
-#define NID_uniqueIdentifier		102
-#define OBJ_uniqueIdentifier		OBJ_X509,45L
-
-#define SN_crl_distribution_points	"crlDistributionPoints"
-#define LN_crl_distribution_points	"X509v3 CRL Distribution Points"
-#define NID_crl_distribution_points	103
-#define OBJ_crl_distribution_points	OBJ_id_ce,31L
-
-#define SN_md5WithRSA			"RSA-NP-MD5"
-#define LN_md5WithRSA			"md5WithRSA"
-#define NID_md5WithRSA			104
-#define OBJ_md5WithRSA			OBJ_algorithm,3L
-
-#define SN_serialNumber			"SN"
-#define LN_serialNumber			"serialNumber"
-#define NID_serialNumber		105
-#define OBJ_serialNumber		OBJ_X509,5L
-
-#define SN_title			"T"
-#define LN_title			"title"
-#define NID_title			106
-#define OBJ_title			OBJ_X509,12L
-
-#define SN_description			"D"
-#define LN_description			"description"
-#define NID_description			107
-#define OBJ_description			OBJ_X509,13L
-
-/* CAST5 is CAST-128, I'm just sticking with the documentation */
-#define SN_cast5_cbc			"CAST5-CBC"
-#define LN_cast5_cbc			"cast5-cbc"
-#define NID_cast5_cbc			108
-#define OBJ_cast5_cbc			1L,2L,840L,113533L,7L,66L,10L
-
-#define SN_cast5_ecb			"CAST5-ECB"
-#define LN_cast5_ecb			"cast5-ecb"
-#define NID_cast5_ecb			109
-
-#define SN_cast5_cfb64			"CAST5-CFB"
-#define LN_cast5_cfb64			"cast5-cfb"
-#define NID_cast5_cfb64			110
-
-#define SN_cast5_ofb64			"CAST5-OFB"
-#define LN_cast5_ofb64			"cast5-ofb"
-#define NID_cast5_ofb64			111
-
-#define LN_pbeWithMD5AndCast5_CBC	"pbeWithMD5AndCast5CBC"
-#define NID_pbeWithMD5AndCast5_CBC	112
-#define OBJ_pbeWithMD5AndCast5_CBC	1L,2L,840L,113533L,7L,66L,12L
-
-/* This is one sun will soon be using :-(
- * id-dsa-with-sha1 ID  ::= {
- *   iso(1) member-body(2) us(840) x9-57 (10040) x9cm(4) 3 }
- */
-#define SN_dsaWithSHA1			"DSA-SHA1"
-#define LN_dsaWithSHA1			"dsaWithSHA1"
-#define NID_dsaWithSHA1			113
-#define OBJ_dsaWithSHA1			1L,2L,840L,10040L,4L,3L
-
-#define NID_md5_sha1			114
-#define SN_md5_sha1			"MD5-SHA1"
-#define LN_md5_sha1			"md5-sha1"
-
-#define SN_sha1WithRSA			"RSA-SHA1-2"
-#define LN_sha1WithRSA			"sha1WithRSA"
-#define NID_sha1WithRSA			115
-#define OBJ_sha1WithRSA			OBJ_algorithm,29L
-
-#define SN_dsa				"DSA"
-#define LN_dsa				"dsaEncryption"
-#define NID_dsa				116
-#define OBJ_dsa				1L,2L,840L,10040L,4L,1L
-
-#define SN_ripemd160			"RIPEMD160"
-#define LN_ripemd160			"ripemd160"
-#define NID_ripemd160			117
-#define OBJ_ripemd160			1L,3L,36L,3L,2L,1L
-
-/* The name should actually be rsaSignatureWithripemd160, but I'm going
- * to continue using the convention I'm using with the other ciphers */
-#define SN_ripemd160WithRSA		"RSA-RIPEMD160"
-#define LN_ripemd160WithRSA		"ripemd160WithRSA"
-#define NID_ripemd160WithRSA		119
-#define OBJ_ripemd160WithRSA		1L,3L,36L,3L,3L,1L,2L
-
-/* Taken from rfc2040
- *  RC5_CBC_Parameters ::= SEQUENCE {
- *	version           INTEGER (v1_0(16)),
- *	rounds            INTEGER (8..127),
- *	blockSizeInBits   INTEGER (64, 128),
- *	iv                OCTET STRING OPTIONAL
- *	}
- */
-#define SN_rc5_cbc			"RC5-CBC"
-#define LN_rc5_cbc			"rc5-cbc"
-#define NID_rc5_cbc			120
-#define OBJ_rc5_cbc			OBJ_rsadsi,3L,8L
-
-#define SN_rc5_ecb			"RC5-ECB"
-#define LN_rc5_ecb			"rc5-ecb"
-#define NID_rc5_ecb			121
-
-#define SN_rc5_cfb64			"RC5-CFB"
-#define LN_rc5_cfb64			"rc5-cfb"
-#define NID_rc5_cfb64			122
-
-#define SN_rc5_ofb64			"RC5-OFB"
-#define LN_rc5_ofb64			"rc5-ofb"
-#define NID_rc5_ofb64			123
-
-#define SN_rle_compression		"RLE"
-#define LN_rle_compression		"run length compression"
-#define NID_rle_compression		124
-#define OBJ_rle_compression		1L,1L,1L,1L,666L,1L
-
-#define SN_zlib_compression		"ZLIB"
-#define LN_zlib_compression		"zlib compression"
-#define NID_zlib_compression		125
-#define OBJ_zlib_compression		1L,1L,1L,1L,666L,2L
-
-#define SN_ext_key_usage		"extendedKeyUsage"
-#define LN_ext_key_usage		"X509v3 Extended Key Usage"
-#define NID_ext_key_usage		126
-#define OBJ_ext_key_usage		OBJ_id_ce,37
-
-#define SN_id_pkix			"PKIX"
-#define NID_id_pkix			127
-#define OBJ_id_pkix			1L,3L,6L,1L,5L,5L,7L
-
-#define SN_id_kp			"id-kp"
-#define NID_id_kp			128
-#define OBJ_id_kp			OBJ_id_pkix,3L
-
-/* PKIX extended key usage OIDs */
-
-#define SN_server_auth			"serverAuth"
-#define LN_server_auth			"TLS Web Server Authentication"
-#define NID_server_auth			129
-#define OBJ_server_auth			OBJ_id_kp,1L
-
-#define SN_client_auth			"clientAuth"
-#define LN_client_auth			"TLS Web Client Authentication"
-#define NID_client_auth			130
-#define OBJ_client_auth			OBJ_id_kp,2L
-
-#define SN_code_sign			"codeSigning"
-#define LN_code_sign			"Code Signing"
-#define NID_code_sign			131
-#define OBJ_code_sign			OBJ_id_kp,3L
-
-#define SN_email_protect		"emailProtection"
-#define LN_email_protect		"E-mail Protection"
-#define NID_email_protect		132
-#define OBJ_email_protect		OBJ_id_kp,4L
-
-#define SN_time_stamp			"timeStamping"
-#define LN_time_stamp			"Time Stamping"
-#define NID_time_stamp			133
-#define OBJ_time_stamp			OBJ_id_kp,8L
-
-/* Additional extended key usage OIDs: Microsoft */
-
-#define SN_ms_code_ind			"msCodeInd"
-#define LN_ms_code_ind			"Microsoft Individual Code Signing"
-#define NID_ms_code_ind			134
-#define OBJ_ms_code_ind			1L,3L,6L,1L,4L,1L,311L,2L,1L,21L
-
-#define SN_ms_code_com			"msCodeCom"
-#define LN_ms_code_com			"Microsoft Commercial Code Signing"
-#define NID_ms_code_com			135
-#define OBJ_ms_code_com			1L,3L,6L,1L,4L,1L,311L,2L,1L,22L
-
-#define SN_ms_ctl_sign			"msCTLSign"
-#define LN_ms_ctl_sign			"Microsoft Trust List Signing"
-#define NID_ms_ctl_sign			136
-#define OBJ_ms_ctl_sign			1L,3L,6L,1L,4L,1L,311L,10L,3L,1L
-
-#define SN_ms_sgc			"msSGC"
-#define LN_ms_sgc			"Microsoft Server Gated Crypto"
-#define NID_ms_sgc			137
-#define OBJ_ms_sgc			1L,3L,6L,1L,4L,1L,311L,10L,3L,3L
-
-#define SN_ms_efs			"msEFS"
-#define LN_ms_efs			"Microsoft Encrypted File System"
-#define NID_ms_efs			138
-#define OBJ_ms_efs			1L,3L,6L,1L,4L,1L,311L,10L,3L,4L
-
-/* Additional usage: Netscape */
-
-#define SN_ns_sgc			"nsSGC"
-#define LN_ns_sgc			"Netscape Server Gated Crypto"
-#define NID_ns_sgc			139
-#define OBJ_ns_sgc			OBJ_netscape,4L,1L
-
-#define SN_delta_crl			"deltaCRL"
-#define LN_delta_crl			"X509v3 Delta CRL Indicator"
-#define NID_delta_crl			140
-#define OBJ_delta_crl			OBJ_id_ce,27L
-
-#define SN_crl_reason			"CRLReason"
-#define LN_crl_reason			"CRL Reason Code"
-#define NID_crl_reason			141
-#define OBJ_crl_reason			OBJ_id_ce,21L
-
-#define SN_invalidity_date		"invalidityDate"
-#define LN_invalidity_date		"Invalidity Date"
-#define NID_invalidity_date		142
-#define OBJ_invalidity_date		OBJ_id_ce,24L
-
-#define SN_sxnet			"SXNetID"
-#define LN_sxnet			"Strong Extranet ID"
-#define NID_sxnet			143
-#define OBJ_sxnet			1L,3L,101L,1L,4L,1L
-
-/* PKCS12 and related OBJECT IDENTIFIERS */
-
-#define OBJ_pkcs12			OBJ_pkcs,12L
-#define OBJ_pkcs12_pbeids		OBJ_pkcs12, 1
-
-#define SN_pbe_WithSHA1And128BitRC4	"PBE-SHA1-RC4-128"
-#define LN_pbe_WithSHA1And128BitRC4	"pbeWithSHA1And128BitRC4"
-#define NID_pbe_WithSHA1And128BitRC4	144
-#define OBJ_pbe_WithSHA1And128BitRC4	OBJ_pkcs12_pbeids, 1L
-
-#define SN_pbe_WithSHA1And40BitRC4	"PBE-SHA1-RC4-40"
-#define LN_pbe_WithSHA1And40BitRC4	"pbeWithSHA1And40BitRC4"
-#define NID_pbe_WithSHA1And40BitRC4	145
-#define OBJ_pbe_WithSHA1And40BitRC4	OBJ_pkcs12_pbeids, 2L
-
-#define SN_pbe_WithSHA1And3_Key_TripleDES_CBC	"PBE-SHA1-3DES"
-#define LN_pbe_WithSHA1And3_Key_TripleDES_CBC	"pbeWithSHA1And3-KeyTripleDES-CBC"
-#define NID_pbe_WithSHA1And3_Key_TripleDES_CBC	146
-#define OBJ_pbe_WithSHA1And3_Key_TripleDES_CBC	OBJ_pkcs12_pbeids, 3L
-
-#define SN_pbe_WithSHA1And2_Key_TripleDES_CBC	"PBE-SHA1-2DES"
-#define LN_pbe_WithSHA1And2_Key_TripleDES_CBC	"pbeWithSHA1And2-KeyTripleDES-CBC"
-#define NID_pbe_WithSHA1And2_Key_TripleDES_CBC	147
-#define OBJ_pbe_WithSHA1And2_Key_TripleDES_CBC	OBJ_pkcs12_pbeids, 4L
-
-#define SN_pbe_WithSHA1And128BitRC2_CBC		"PBE-SHA1-RC2-128"
-#define LN_pbe_WithSHA1And128BitRC2_CBC		"pbeWithSHA1And128BitRC2-CBC"
-#define NID_pbe_WithSHA1And128BitRC2_CBC	148
-#define OBJ_pbe_WithSHA1And128BitRC2_CBC	OBJ_pkcs12_pbeids, 5L
-
-#define SN_pbe_WithSHA1And40BitRC2_CBC	"PBE-SHA1-RC2-40"
-#define LN_pbe_WithSHA1And40BitRC2_CBC	"pbeWithSHA1And40BitRC2-CBC"
-#define NID_pbe_WithSHA1And40BitRC2_CBC	149
-#define OBJ_pbe_WithSHA1And40BitRC2_CBC	OBJ_pkcs12_pbeids, 6L
-
-#define OBJ_pkcs12_Version1	OBJ_pkcs12, 10L
-
-#define OBJ_pkcs12_BagIds	OBJ_pkcs12_Version1, 1L
-
-#define LN_keyBag		"keyBag"
-#define NID_keyBag		150
-#define OBJ_keyBag		OBJ_pkcs12_BagIds, 1L
-
-#define LN_pkcs8ShroudedKeyBag	"pkcs8ShroudedKeyBag"
-#define NID_pkcs8ShroudedKeyBag	151
-#define OBJ_pkcs8ShroudedKeyBag	OBJ_pkcs12_BagIds, 2L
-
-#define LN_certBag		"certBag"
-#define NID_certBag		152
-#define OBJ_certBag		OBJ_pkcs12_BagIds, 3L
-
-#define LN_crlBag		"crlBag"
-#define NID_crlBag		153
-#define OBJ_crlBag		OBJ_pkcs12_BagIds, 4L
-
-#define LN_secretBag		"secretBag"
-#define NID_secretBag		154
-#define OBJ_secretBag		OBJ_pkcs12_BagIds, 5L
-
-#define LN_safeContentsBag	"safeContentsBag"
-#define NID_safeContentsBag	155
-#define OBJ_safeContentsBag	OBJ_pkcs12_BagIds, 6L
-
-#define LN_friendlyName		"friendlyName"
-#define	NID_friendlyName	156
-#define OBJ_friendlyName	OBJ_pkcs9, 20L
-
-#define LN_localKeyID		"localKeyID"
-#define	NID_localKeyID		157
-#define OBJ_localKeyID		OBJ_pkcs9, 21L
-
-#define OBJ_certTypes		OBJ_pkcs9, 22L
-
-#define LN_x509Certificate	"x509Certificate"
-#define	NID_x509Certificate	158
-#define OBJ_x509Certificate	OBJ_certTypes, 1L
-
-#define LN_sdsiCertificate	"sdsiCertificate"
-#define	NID_sdsiCertificate	159
-#define OBJ_sdsiCertificate	OBJ_certTypes, 2L
-
-#define OBJ_crlTypes		OBJ_pkcs9, 23L
-
-#define LN_x509Crl		"x509Crl"
-#define	NID_x509Crl		160
-#define OBJ_x509Crl		OBJ_crlTypes, 1L
-
-/* PKCS#5 v2 OIDs */
-
-#define LN_pbes2		"PBES2"
-#define NID_pbes2		161
-#define OBJ_pbes2		OBJ_pkcs,5L,13L
-
-#define LN_pbmac1		"PBMAC1"
-#define NID_pbmac1		162
-#define OBJ_pbmac1		OBJ_pkcs,5L,14L
-
-#define LN_hmacWithSHA1		"hmacWithSHA1"
-#define NID_hmacWithSHA1	163
-#define OBJ_hmacWithSHA1	OBJ_rsadsi,2L,7L
-
-/* Policy Qualifier Ids */
-
-#define LN_id_qt_cps		"Policy Qualifier CPS"
-#define SN_id_qt_cps		"id-qt-cps"
-#define NID_id_qt_cps		164
-#define OBJ_id_qt_cps		OBJ_id_pkix,2L,1L
-
-#define LN_id_qt_unotice	"Policy Qualifier User Notice"
-#define SN_id_qt_unotice	"id-qt-unotice"
-#define NID_id_qt_unotice	165
-#define OBJ_id_qt_unotice	OBJ_id_pkix,2L,2L
-
-#define SN_rc2_64_cbc			"RC2-64-CBC"
-#define LN_rc2_64_cbc			"rc2-64-cbc"
-#define NID_rc2_64_cbc			166
-
-#define SN_SMIMECapabilities		"SMIME-CAPS"
-#define LN_SMIMECapabilities		"S/MIME Capabilities"
-#define NID_SMIMECapabilities		167
-#define OBJ_SMIMECapabilities		OBJ_pkcs9,15L
-
-#define SN_pbeWithMD2AndRC2_CBC		"PBE-MD2-RC2-64"
-#define LN_pbeWithMD2AndRC2_CBC		"pbeWithMD2AndRC2-CBC"
-#define NID_pbeWithMD2AndRC2_CBC	168
-#define OBJ_pbeWithMD2AndRC2_CBC	OBJ_pkcs,5L,4L
-
-#define SN_pbeWithMD5AndRC2_CBC		"PBE-MD5-RC2-64"
-#define LN_pbeWithMD5AndRC2_CBC		"pbeWithMD5AndRC2-CBC"
-#define NID_pbeWithMD5AndRC2_CBC	169
-#define OBJ_pbeWithMD5AndRC2_CBC	OBJ_pkcs,5L,6L
-
-#define SN_pbeWithSHA1AndDES_CBC	"PBE-SHA1-DES"
-#define LN_pbeWithSHA1AndDES_CBC	"pbeWithSHA1AndDES-CBC"
-#define NID_pbeWithSHA1AndDES_CBC	170
-#define OBJ_pbeWithSHA1AndDES_CBC	OBJ_pkcs,5L,10L
-
-/* Extension request OIDs */
-
-#define LN_ms_ext_req			"Microsoft Extension Request"
-#define SN_ms_ext_req			"msExtReq"
-#define NID_ms_ext_req			171
-#define OBJ_ms_ext_req			1L,3L,6L,1L,4L,1L,311L,2L,1L,14L
-
-#define LN_ext_req			"Extension Request"
-#define SN_ext_req			"extReq"
-#define NID_ext_req			172
-#define OBJ_ext_req			OBJ_pkcs9,14L
-
-#define SN_name				"name"
-#define LN_name				"name"
-#define NID_name			173
-#define OBJ_name			OBJ_X509,41L
-
-#define SN_dnQualifier			"dnQualifier"
-#define LN_dnQualifier			"dnQualifier"
-#define NID_dnQualifier			174
-#define OBJ_dnQualifier			OBJ_X509,46L
-
-#define SN_id_pe			"id-pe"
-#define NID_id_pe			175
-#define OBJ_id_pe			OBJ_id_pkix,1L
-
-#define SN_id_ad			"id-ad"
-#define NID_id_ad			176
-#define OBJ_id_ad			OBJ_id_pkix,48L
-
-#define SN_info_access			"authorityInfoAccess"
-#define LN_info_access			"Authority Information Access"
-#define NID_info_access			177
-#define OBJ_info_access			OBJ_id_pe,1L
-
-#define SN_ad_OCSP			"OCSP"
-#define LN_ad_OCSP			"OCSP"
-#define NID_ad_OCSP			178
-#define OBJ_ad_OCSP			OBJ_id_ad,1L
-
-#define SN_ad_ca_issuers		"caIssuers"
-#define LN_ad_ca_issuers		"CA Issuers"
-#define NID_ad_ca_issuers		179
-#define OBJ_ad_ca_issuers		OBJ_id_ad,2L
-
-#define SN_OCSP_sign			"OCSPSigning"
-#define LN_OCSP_sign			"OCSP Signing"
-#define NID_OCSP_sign			180
-#define OBJ_OCSP_sign			OBJ_id_kp,9L
-#endif /* USE_OBJ_MAC */
-
-#include <openssl/bio.h>
-#include <openssl/asn1.h>
-
-#define	OBJ_NAME_TYPE_UNDEF		0x00
-#define	OBJ_NAME_TYPE_MD_METH		0x01
-#define	OBJ_NAME_TYPE_CIPHER_METH	0x02
-#define	OBJ_NAME_TYPE_PKEY_METH		0x03
-#define	OBJ_NAME_TYPE_COMP_METH		0x04
-#define	OBJ_NAME_TYPE_NUM		0x05
-
-#define	OBJ_NAME_ALIAS			0x8000
-
-#define OBJ_BSEARCH_VALUE_ON_NOMATCH		0x01
-#define OBJ_BSEARCH_FIRST_VALUE_ON_MATCH	0x02
-
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-typedef struct obj_name_st
-	{
-	int type;
-	int alias;
-	const char *name;
-	const char *data;
-	} OBJ_NAME;
-
-#define		OBJ_create_and_add_object(a,b,c) OBJ_create(a,b,c)
-
-
-int OBJ_NAME_init(void);
-int OBJ_NAME_new_index(unsigned long (*hash_func)(const char *),
-		       int (*cmp_func)(const char *, const char *),
-		       void (*free_func)(const char *, int, const char *));
-const char *OBJ_NAME_get(const char *name,int type);
-int OBJ_NAME_add(const char *name,int type,const char *data);
-int OBJ_NAME_remove(const char *name,int type);
-void OBJ_NAME_cleanup(int type); /* -1 for everything */
-void OBJ_NAME_do_all(int type,void (*fn)(const OBJ_NAME *,void *arg),
-		     void *arg);
-void OBJ_NAME_do_all_sorted(int type,void (*fn)(const OBJ_NAME *,void *arg),
-			    void *arg);
-
-ASN1_OBJECT *	OBJ_dup(const ASN1_OBJECT *o);
-ASN1_OBJECT *	OBJ_nid2obj(int n);
-const char *	OBJ_nid2ln(int n);
-const char *	OBJ_nid2sn(int n);
-int		OBJ_obj2nid(const ASN1_OBJECT *o);
-ASN1_OBJECT *	OBJ_txt2obj(const char *s, int no_name);
-int	OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name);
-int		OBJ_txt2nid(const char *s);
-int		OBJ_ln2nid(const char *s);
-int		OBJ_sn2nid(const char *s);
-int		OBJ_cmp(const ASN1_OBJECT *a,const ASN1_OBJECT *b);
-const void *	OBJ_bsearch_(const void *key,const void *base,int num,int size,
-			     int (*cmp)(const void *, const void *));
-const void *	OBJ_bsearch_ex_(const void *key,const void *base,int num,
-				int size,
-				int (*cmp)(const void *, const void *),
-				int flags);
-
-#define _DECLARE_OBJ_BSEARCH_CMP_FN(scope, type1, type2, nm)	\
-  static int nm##_cmp_BSEARCH_CMP_FN(const void *, const void *); \
-  static int nm##_cmp(type1 const *, type2 const *); \
-  scope type2 * OBJ_bsearch_##nm(type1 *key, type2 const *base, int num)
-
-#define DECLARE_OBJ_BSEARCH_CMP_FN(type1, type2, cmp)	\
-  _DECLARE_OBJ_BSEARCH_CMP_FN(static, type1, type2, cmp)
-#define DECLARE_OBJ_BSEARCH_GLOBAL_CMP_FN(type1, type2, nm)	\
-  type2 * OBJ_bsearch_##nm(type1 *key, type2 const *base, int num)
-
-/*
- * Unsolved problem: if a type is actually a pointer type, like
- * nid_triple is, then its impossible to get a const where you need
- * it. Consider:
- *
- * typedef int nid_triple[3];
- * const void *a_;
- * const nid_triple const *a = a_;
- *
- * The assignement discards a const because what you really want is:
- *
- * const int const * const *a = a_;
- *
- * But if you do that, you lose the fact that a is an array of 3 ints,
- * which breaks comparison functions.
- *
- * Thus we end up having to cast, sadly, or unpack the
- * declarations. Or, as I finally did in this case, delcare nid_triple
- * to be a struct, which it should have been in the first place.
- *
- * Ben, August 2008.
- *
- * Also, strictly speaking not all types need be const, but handling
- * the non-constness means a lot of complication, and in practice
- * comparison routines do always not touch their arguments.
- */
-
-#define IMPLEMENT_OBJ_BSEARCH_CMP_FN(type1, type2, nm)	\
-  static int nm##_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_)	\
-      { \
-      type1 const *a = a_; \
-      type2 const *b = b_; \
-      return nm##_cmp(a,b); \
-      } \
-  static type2 *OBJ_bsearch_##nm(type1 *key, type2 const *base, int num) \
-      { \
-      return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2), \
-					nm##_cmp_BSEARCH_CMP_FN); \
-      } \
-      extern void dummy_prototype(void)
-
-#define IMPLEMENT_OBJ_BSEARCH_GLOBAL_CMP_FN(type1, type2, nm)	\
-  static int nm##_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_)	\
-      { \
-      type1 const *a = a_; \
-      type2 const *b = b_; \
-      return nm##_cmp(a,b); \
-      } \
-  type2 *OBJ_bsearch_##nm(type1 *key, type2 const *base, int num) \
-      { \
-      return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2), \
-					nm##_cmp_BSEARCH_CMP_FN); \
-      } \
-      extern void dummy_prototype(void)
-
-#define OBJ_bsearch(type1,key,type2,base,num,cmp)			       \
-  ((type2 *)OBJ_bsearch_(CHECKED_PTR_OF(type1,key),CHECKED_PTR_OF(type2,base), \
-			 num,sizeof(type2),				\
-			 ((void)CHECKED_PTR_OF(type1,cmp##_type_1),	\
-			  (void)CHECKED_PTR_OF(type2,cmp##_type_2),	\
-			  cmp##_BSEARCH_CMP_FN)))
-
-#define OBJ_bsearch_ex(type1,key,type2,base,num,cmp,flags)			\
-  ((type2 *)OBJ_bsearch_ex_(CHECKED_PTR_OF(type1,key),CHECKED_PTR_OF(type2,base), \
-			 num,sizeof(type2),				\
-			 ((void)CHECKED_PTR_OF(type1,cmp##_type_1),	\
-			  (void)type_2=CHECKED_PTR_OF(type2,cmp##_type_2), \
-			  cmp##_BSEARCH_CMP_FN)),flags)
-
-int		OBJ_new_nid(int num);
-int		OBJ_add_object(const ASN1_OBJECT *obj);
-int		OBJ_create(const char *oid,const char *sn,const char *ln);
-void		OBJ_cleanup(void );
-int		OBJ_create_objects(BIO *in);
-
-int OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid);
-int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid);
-int OBJ_add_sigid(int signid, int dig_id, int pkey_id);
-void OBJ_sigid_free(void);
-
-extern int obj_cleanup_defer;
-void check_defer(int nid);
-
-/* BEGIN ERROR CODES */
-/* The following lines are auto generated by the script mkerr.pl. Any changes
- * made after this point may be overwritten when the script is next run.
- */
-void ERR_load_OBJ_strings(void);
-
-/* Error codes for the OBJ functions. */
-
-/* Function codes. */
-#define OBJ_F_OBJ_ADD_OBJECT				 105
-#define OBJ_F_OBJ_CREATE				 100
-#define OBJ_F_OBJ_DUP					 101
-#define OBJ_F_OBJ_NAME_NEW_INDEX			 106
-#define OBJ_F_OBJ_NID2LN				 102
-#define OBJ_F_OBJ_NID2OBJ				 103
-#define OBJ_F_OBJ_NID2SN				 104
-
-/* Reason codes. */
-#define OBJ_R_MALLOC_FAILURE				 100
-#define OBJ_R_UNKNOWN_NID				 101
-
-#ifdef  __cplusplus
-}
-#endif
-#endif
diff --git a/extra_lib/include/openssl/opensslconf.h b/extra_lib/include/openssl/opensslconf.h
deleted file mode 100644
index 8268e9a..0000000
--- a/extra_lib/include/openssl/opensslconf.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/* opensslconf.h */
-/* WARNING: Generated automatically from opensslconf.h.in by Configure. */
-
-/* OpenSSL was configured with the following options: */
-#ifndef OPENSSL_SYSNAME_WIN32
-# define OPENSSL_SYSNAME_WIN32
-#endif
-#ifndef OPENSSL_DOING_MAKEDEPEND
-
-
-#ifndef OPENSSL_NO_GMP
-# define OPENSSL_NO_GMP
-#endif
-#ifndef OPENSSL_NO_JPAKE
-# define OPENSSL_NO_JPAKE
-#endif
-#ifndef OPENSSL_NO_KRB5
-# define OPENSSL_NO_KRB5
-#endif
-#ifndef OPENSSL_NO_MD2
-# define OPENSSL_NO_MD2
-#endif
-#ifndef OPENSSL_NO_RC5
-# define OPENSSL_NO_RC5
-#endif
-#ifndef OPENSSL_NO_RFC3779
-# define OPENSSL_NO_RFC3779
-#endif
-#ifndef OPENSSL_NO_STORE
-# define OPENSSL_NO_STORE
-#endif
-
-#endif /* OPENSSL_DOING_MAKEDEPEND */
-
-#ifndef OPENSSL_THREADS
-# define OPENSSL_THREADS
-#endif
-
-/* The OPENSSL_NO_* macros are also defined as NO_* if the application
-   asks for it.  This is a transient feature that is provided for those
-   who haven't had the time to do the appropriate changes in their
-   applications.  */
-#ifdef OPENSSL_ALGORITHM_DEFINES
-# if defined(OPENSSL_NO_GMP) && !defined(NO_GMP)
-#  define NO_GMP
-# endif
-# if defined(OPENSSL_NO_JPAKE) && !defined(NO_JPAKE)
-#  define NO_JPAKE
-# endif
-# if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5)
-#  define NO_KRB5
-# endif
-# if defined(OPENSSL_NO_MD2) && !defined(NO_MD2)
-#  define NO_MD2
-# endif
-# if defined(OPENSSL_NO_RC5) && !defined(NO_RC5)
-#  define NO_RC5
-# endif
-# if defined(OPENSSL_NO_RFC3779) && !defined(NO_RFC3779)
-#  define NO_RFC3779
-# endif
-# if defined(OPENSSL_NO_STORE) && !defined(NO_STORE)
-#  define NO_STORE
-# endif
-#endif
-
-#define OPENSSL_CPUID_OBJ
-
-/* crypto/opensslconf.h.in */
-
-/* Generate 80386 code? */
-#undef I386_ONLY
-
-#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
-#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
-#define ENGINESDIR "c:cygwinhomeAdministrateurbuildslavefull-windows_xp_32buildgpac_extra_libs/lib/engines"
-#define OPENSSLDIR "c:cygwinhomeAdministrateurbuildslavefull-windows_xp_32buildgpac_extra_libs/c:cygwinhomeAdministrateurbuildslavefull-windows_xp_32buildgpac_extra_libs/ssl"
-#endif
-#endif
-
-#undef OPENSSL_UNISTD
-#define OPENSSL_UNISTD <unistd.h>
-
-#undef OPENSSL_EXPORT_VAR_AS_FUNCTION
-#define OPENSSL_EXPORT_VAR_AS_FUNCTION
-
-#if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
-#define IDEA_INT unsigned int
-#endif
-
-#if defined(HEADER_MD2_H) && !defined(MD2_INT)
-#define MD2_INT unsigned int
-#endif
-
-#if defined(HEADER_RC2_H) && !defined(RC2_INT)
-/* I need to put in a mod for the alpha - eay */
-#define RC2_INT unsigned int
-#endif
-
-#if defined(HEADER_RC4_H)
-#if !defined(RC4_INT)
-/* using int types make the structure larger but make the code faster
- * on most boxes I have tested - up to %20 faster. */
-/*
- * I don't know what does "most" mean, but declaring "int" is a must on:
- * - Intel P6 because partial register stalls are very expensive;
- * - elder Alpha because it lacks byte load/store instructions;
- */
-#define RC4_INT unsigned int
-#endif
-#if !defined(RC4_CHUNK)
-/*
- * This enables code handling data aligned at natural CPU word
- * boundary. See crypto/rc4/rc4_enc.c for further details.
- */
-#undef RC4_CHUNK
-#endif
-#endif
-
-#if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG)
-/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
- * %20 speed up (longs are 8 bytes, int's are 4). */
-#ifndef DES_LONG
-#define DES_LONG unsigned long
-#endif
-#endif
-
-#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
-#define CONFIG_HEADER_BN_H
-#define BN_LLONG
-
-/* Should we define BN_DIV2W here? */
-
-/* Only one for the following should be defined */
-#undef SIXTY_FOUR_BIT_LONG
-#undef SIXTY_FOUR_BIT
-#define THIRTY_TWO_BIT
-#endif
-
-#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)
-#define CONFIG_HEADER_RC4_LOCL_H
-/* if this is defined data[i] is used instead of *data, this is a %20
- * speedup on x86 */
-#define RC4_INDEX
-#endif
-
-#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
-#define CONFIG_HEADER_BF_LOCL_H
-#undef BF_PTR
-#endif /* HEADER_BF_LOCL_H */
-
-#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
-#define CONFIG_HEADER_DES_LOCL_H
-#ifndef DES_DEFAULT_OPTIONS
-/* the following is tweaked from a config script, that is why it is a
- * protected undef/define */
-#ifndef DES_PTR
-#undef DES_PTR
-#endif
-
-/* This helps C compiler generate the correct code for multiple functional
- * units.  It reduces register dependancies at the expense of 2 more
- * registers */
-#ifndef DES_RISC1
-#undef DES_RISC1
-#endif
-
-#ifndef DES_RISC2
-#undef DES_RISC2
-#endif
-
-#if defined(DES_RISC1) && defined(DES_RISC2)
-YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!!
-#endif
-
-/* Unroll the inner loop, this sometimes helps, sometimes hinders.
- * Very mucy CPU dependant */
-#ifndef DES_UNROLL
-#undef DES_UNROLL
-#endif
-
-/* These default values were supplied by
- * Peter Gutman <pgut001 at cs.auckland.ac.nz>
- * They are only used if nothing else has been defined */
-#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL)
-/* Special defines which change the way the code is built depending on the
-   CPU and OS.  For SGI machines you can use _MIPS_SZLONG (32 or 64) to find
-   even newer MIPS CPU's, but at the moment one size fits all for
-   optimization options.  Older Sparc's work better with only UNROLL, but
-   there's no way to tell at compile time what it is you're running on */
- 
-#if defined( sun )		/* Newer Sparc's */
-#  define DES_PTR
-#  define DES_RISC1
-#  define DES_UNROLL
-#elif defined( __ultrix )	/* Older MIPS */
-#  define DES_PTR
-#  define DES_RISC2
-#  define DES_UNROLL
-#elif defined( __osf1__ )	/* Alpha */
-#  define DES_PTR
-#  define DES_RISC2
-#elif defined ( _AIX )		/* RS6000 */
-  /* Unknown */
-#elif defined( __hpux )		/* HP-PA */
-  /* Unknown */
-#elif defined( __aux )		/* 68K */
-  /* Unknown */
-#elif defined( __dgux )		/* 88K (but P6 in latest boxes) */
-#  define DES_UNROLL
-#elif defined( __sgi )		/* Newer MIPS */
-#  define DES_PTR
-#  define DES_RISC2
-#  define DES_UNROLL
-#elif defined(i386) || defined(__i386__)	/* x86 boxes, should be gcc */
-#  define DES_PTR
-#  define DES_RISC1
-#  define DES_UNROLL
-#endif /* Systems-specific speed defines */
-#endif
-
-#endif /* DES_DEFAULT_OPTIONS */
-#endif /* HEADER_DES_LOCL_H */
diff --git a/extra_lib/include/openssl/opensslv.h b/extra_lib/include/openssl/opensslv.h
deleted file mode 100644
index e7fca83..0000000
--- a/extra_lib/include/openssl/opensslv.h
+++ /dev/null
@@ -1,89 +0,0 @@
-#ifndef HEADER_OPENSSLV_H
-#define HEADER_OPENSSLV_H
-
-/* Numeric release version identifier:
- * MNNFFPPS: major minor fix patch status
- * The status nibble has one of the values 0 for development, 1 to e for betas
- * 1 to 14, and f for release.  The patch level is exactly that.
- * For example:
- * 0.9.3-dev	  0x00903000
- * 0.9.3-beta1	  0x00903001
- * 0.9.3-beta2-dev 0x00903002
- * 0.9.3-beta2    0x00903002 (same as ...beta2-dev)
- * 0.9.3	  0x0090300f
- * 0.9.3a	  0x0090301f
- * 0.9.4 	  0x0090400f
- * 1.2.3z	  0x102031af
- *
- * For continuity reasons (because 0.9.5 is already out, and is coded
- * 0x00905100), between 0.9.5 and 0.9.6 the coding of the patch level
- * part is slightly different, by setting the highest bit.  This means
- * that 0.9.5a looks like this: 0x0090581f.  At 0.9.6, we can start
- * with 0x0090600S...
- *
- * (Prior to 0.9.3-dev a different scheme was used: 0.9.2b is 0x0922.)
- * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
- *  major minor fix final patch/beta)
- */
-#define OPENSSL_VERSION_NUMBER	0x1000004fL
-#ifdef OPENSSL_FIPS
-#define OPENSSL_VERSION_TEXT	"OpenSSL 1.0.0d-fips 8 Feb 2011"
-#else
-#define OPENSSL_VERSION_TEXT	"OpenSSL 1.0.0d 8 Feb 2011"
-#endif
-#define OPENSSL_VERSION_PTEXT	" part of " OPENSSL_VERSION_TEXT
-
-
-/* The macros below are to be used for shared library (.so, .dll, ...)
- * versioning.  That kind of versioning works a bit differently between
- * operating systems.  The most usual scheme is to set a major and a minor
- * number, and have the runtime loader check that the major number is equal
- * to what it was at application link time, while the minor number has to
- * be greater or equal to what it was at application link time.  With this
- * scheme, the version number is usually part of the file name, like this:
- *
- *	libcrypto.so.0.9
- *
- * Some unixen also make a softlink with the major verson number only:
- *
- *	libcrypto.so.0
- *
- * On Tru64 and IRIX 6.x it works a little bit differently.  There, the
- * shared library version is stored in the file, and is actually a series
- * of versions, separated by colons.  The rightmost version present in the
- * library when linking an application is stored in the application to be
- * matched at run time.  When the application is run, a check is done to
- * see if the library version stored in the application matches any of the
- * versions in the version string of the library itself.
- * This version string can be constructed in any way, depending on what
- * kind of matching is desired.  However, to implement the same scheme as
- * the one used in the other unixen, all compatible versions, from lowest
- * to highest, should be part of the string.  Consecutive builds would
- * give the following versions strings:
- *
- *	3.0
- *	3.0:3.1
- *	3.0:3.1:3.2
- *	4.0
- *	4.0:4.1
- *
- * Notice how version 4 is completely incompatible with version, and
- * therefore give the breach you can see.
- *
- * There may be other schemes as well that I haven't yet discovered.
- *
- * So, here's the way it works here: first of all, the library version
- * number doesn't need at all to match the overall OpenSSL version.
- * However, it's nice and more understandable if it actually does.
- * The current library version is stored in the macro SHLIB_VERSION_NUMBER,
- * which is just a piece of text in the format "M.m.e" (Major, minor, edit).
- * For the sake of Tru64, IRIX, and any other OS that behaves in similar ways,
- * we need to keep a history of version numbers, which is done in the
- * macro SHLIB_VERSION_HISTORY.  The numbers are separated by colons and
- * should only keep the versions that are binary compatible with the current.
- */
-#define SHLIB_VERSION_HISTORY ""
-#define SHLIB_VERSION_NUMBER "1.0.0"
-
-
-#endif /* HEADER_OPENSSLV_H */
diff --git a/extra_lib/include/openssl/ossl_typ.h b/extra_lib/include/openssl/ossl_typ.h
deleted file mode 100644
index 12bd701..0000000
--- a/extra_lib/include/openssl/ossl_typ.h
+++ /dev/null
@@ -1,200 +0,0 @@
-/* ====================================================================
- * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. 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.
- *
- * 3. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
- *
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
- *    endorse or promote products derived from this software without
- *    prior written permission. For written permission, please contact
- *    openssl-core at openssl.org.
- *
- * 5. Products derived from this software may not be called "OpenSSL"
- *    nor may "OpenSSL" appear in their names without prior written
- *    permission of the OpenSSL Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- *    acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
- *
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
- * EXPRESSED 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 OpenSSL PROJECT OR
- * ITS 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.
- * ====================================================================
- *
- * This product includes cryptographic software written by Eric Young
- * (eay at cryptsoft.com).  This product includes software written by Tim
- * Hudson (tjh at cryptsoft.com).
- *
- */
-
-#ifndef HEADER_OPENSSL_TYPES_H
-#define HEADER_OPENSSL_TYPES_H
-
-#include <openssl/e_os2.h>
-
-#ifdef NO_ASN1_TYPEDEFS
-#define ASN1_INTEGER		ASN1_STRING
-#define ASN1_ENUMERATED		ASN1_STRING
-#define ASN1_BIT_STRING		ASN1_STRING
-#define ASN1_OCTET_STRING	ASN1_STRING
-#define ASN1_PRINTABLESTRING	ASN1_STRING
-#define ASN1_T61STRING		ASN1_STRING
-#define ASN1_IA5STRING		ASN1_STRING
-#define ASN1_UTCTIME		ASN1_STRING
-#define ASN1_GENERALIZEDTIME	ASN1_STRING
-#define ASN1_TIME		ASN1_STRING
-#define ASN1_GENERALSTRING	ASN1_STRING
-#define ASN1_UNIVERSALSTRING	ASN1_STRING
-#define ASN1_BMPSTRING		ASN1_STRING
-#define ASN1_VISIBLESTRING	ASN1_STRING
-#define ASN1_UTF8STRING		ASN1_STRING
-#define ASN1_BOOLEAN		int
-#define ASN1_NULL		int
-#else
-typedef struct asn1_string_st ASN1_INTEGER;
-typedef struct asn1_string_st ASN1_ENUMERATED;
-typedef struct asn1_string_st ASN1_BIT_STRING;
-typedef struct asn1_string_st ASN1_OCTET_STRING;
-typedef struct asn1_string_st ASN1_PRINTABLESTRING;
-typedef struct asn1_string_st ASN1_T61STRING;
-typedef struct asn1_string_st ASN1_IA5STRING;
-typedef struct asn1_string_st ASN1_GENERALSTRING;
-typedef struct asn1_string_st ASN1_UNIVERSALSTRING;
-typedef struct asn1_string_st ASN1_BMPSTRING;
-typedef struct asn1_string_st ASN1_UTCTIME;
-typedef struct asn1_string_st ASN1_TIME;
-typedef struct asn1_string_st ASN1_GENERALIZEDTIME;
-typedef struct asn1_string_st ASN1_VISIBLESTRING;
-typedef struct asn1_string_st ASN1_UTF8STRING;
-typedef int ASN1_BOOLEAN;
-typedef int ASN1_NULL;
-#endif
-
-typedef struct asn1_pctx_st ASN1_PCTX;
-
-#ifdef OPENSSL_SYS_WIN32
-#undef X509_NAME
-#undef X509_EXTENSIONS
-#undef X509_CERT_PAIR
-#undef PKCS7_ISSUER_AND_SERIAL
-#undef OCSP_REQUEST
-#undef OCSP_RESPONSE
-#endif
-
-#ifdef BIGNUM
-#undef BIGNUM
-#endif
-typedef struct bignum_st BIGNUM;
-typedef struct bignum_ctx BN_CTX;
-typedef struct bn_blinding_st BN_BLINDING;
-typedef struct bn_mont_ctx_st BN_MONT_CTX;
-typedef struct bn_recp_ctx_st BN_RECP_CTX;
-typedef struct bn_gencb_st BN_GENCB;
-
-typedef struct buf_mem_st BUF_MEM;
-
-typedef struct evp_cipher_st EVP_CIPHER;
-typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
-typedef struct env_md_st EVP_MD;
-typedef struct env_md_ctx_st EVP_MD_CTX;
-typedef struct evp_pkey_st EVP_PKEY;
-
-typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD;
-
-typedef struct evp_pkey_method_st EVP_PKEY_METHOD;
-typedef struct evp_pkey_ctx_st EVP_PKEY_CTX;
-
-typedef struct dh_st DH;
-typedef struct dh_method DH_METHOD;
-
-typedef struct dsa_st DSA;
-typedef struct dsa_method DSA_METHOD;
-
-typedef struct rsa_st RSA;
-typedef struct rsa_meth_st RSA_METHOD;
-
-typedef struct rand_meth_st RAND_METHOD;
-
-typedef struct ecdh_method ECDH_METHOD;
-typedef struct ecdsa_method ECDSA_METHOD;
-
-typedef struct x509_st X509;
-typedef struct X509_algor_st X509_ALGOR;
-typedef struct X509_crl_st X509_CRL;
-typedef struct x509_crl_method_st X509_CRL_METHOD;
-typedef struct x509_revoked_st X509_REVOKED;
-typedef struct X509_name_st X509_NAME;
-typedef struct X509_pubkey_st X509_PUBKEY;
-typedef struct x509_store_st X509_STORE;
-typedef struct x509_store_ctx_st X509_STORE_CTX;
-
-typedef struct pkcs8_priv_key_info_st PKCS8_PRIV_KEY_INFO;
-
-typedef struct v3_ext_ctx X509V3_CTX;
-typedef struct conf_st CONF;
-
-typedef struct store_st STORE;
-typedef struct store_method_st STORE_METHOD;
-
-typedef struct ui_st UI;
-typedef struct ui_method_st UI_METHOD;
-
-typedef struct st_ERR_FNS ERR_FNS;
-
-typedef struct engine_st ENGINE;
-typedef struct ssl_st SSL;
-typedef struct ssl_ctx_st SSL_CTX;
-
-typedef struct X509_POLICY_NODE_st X509_POLICY_NODE;
-typedef struct X509_POLICY_LEVEL_st X509_POLICY_LEVEL;
-typedef struct X509_POLICY_TREE_st X509_POLICY_TREE;
-typedef struct X509_POLICY_CACHE_st X509_POLICY_CACHE;
-
-typedef struct AUTHORITY_KEYID_st AUTHORITY_KEYID;
-typedef struct DIST_POINT_st DIST_POINT;
-typedef struct ISSUING_DIST_POINT_st ISSUING_DIST_POINT;
-typedef struct NAME_CONSTRAINTS_st NAME_CONSTRAINTS;
-
-  /* If placed in pkcs12.h, we end up with a circular depency with pkcs7.h */
-#define DECLARE_PKCS12_STACK_OF(type) /* Nothing */
-#define IMPLEMENT_PKCS12_STACK_OF(type) /* Nothing */
-
-typedef struct crypto_ex_data_st CRYPTO_EX_DATA;
-/* Callback types for crypto.h */
-typedef int CRYPTO_EX_new(void *parent, void *ptr, CRYPTO_EX_DATA *ad,
-					int idx, long argl, void *argp);
-typedef void CRYPTO_EX_free(void *parent, void *ptr, CRYPTO_EX_DATA *ad,
-					int idx, long argl, void *argp);
-typedef int CRYPTO_EX_dup(CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from, void *from_d, 
-					int idx, long argl, void *argp);
-
-typedef struct ocsp_req_ctx_st OCSP_REQ_CTX;
-typedef struct ocsp_response_st OCSP_RESPONSE;
-typedef struct ocsp_responder_id_st OCSP_RESPID;
-
-#endif /* def HEADER_OPENSSL_TYPES_H */
diff --git a/extra_lib/include/openssl/pem.h b/extra_lib/include/openssl/pem.h
deleted file mode 100644
index 8a6abab..0000000
--- a/extra_lib/include/openssl/pem.h
+++ /dev/null
@@ -1,641 +0,0 @@
-/* crypto/pem/pem.h */
-/* Copyright (C) 1995-1997 Eric Young (eay at cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay at cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh at cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay at cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh at cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef HEADER_PEM_H
-#define HEADER_PEM_H
-
-#include <openssl/e_os2.h>
-#ifndef OPENSSL_NO_BIO
-#include <openssl/bio.h>
-#endif
-#ifndef OPENSSL_NO_STACK
-#include <openssl/stack.h>
-#endif
-#include <openssl/evp.h>
-#include <openssl/x509.h>
-#include <openssl/pem2.h>
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-#define PEM_BUFSIZE		1024
-
-#define PEM_OBJ_UNDEF		0
-#define PEM_OBJ_X509		1
-#define PEM_OBJ_X509_REQ	2
-#define PEM_OBJ_CRL		3
-#define PEM_OBJ_SSL_SESSION	4
-#define PEM_OBJ_PRIV_KEY	10
-#define PEM_OBJ_PRIV_RSA	11
-#define PEM_OBJ_PRIV_DSA	12
-#define PEM_OBJ_PRIV_DH		13
-#define PEM_OBJ_PUB_RSA		14
-#define PEM_OBJ_PUB_DSA		15
-#define PEM_OBJ_PUB_DH		16
-#define PEM_OBJ_DHPARAMS	17
-#define PEM_OBJ_DSAPARAMS	18
-#define PEM_OBJ_PRIV_RSA_PUBLIC	19
-#define PEM_OBJ_PRIV_ECDSA	20
-#define PEM_OBJ_PUB_ECDSA	21
-#define PEM_OBJ_ECPARAMETERS	22
-
-#define PEM_ERROR		30
-#define PEM_DEK_DES_CBC         40
-#define PEM_DEK_IDEA_CBC        45
-#define PEM_DEK_DES_EDE         50
-#define PEM_DEK_DES_ECB         60
-#define PEM_DEK_RSA             70
-#define PEM_DEK_RSA_MD2         80
-#define PEM_DEK_RSA_MD5         90
-
-#define PEM_MD_MD2		NID_md2
-#define PEM_MD_MD5		NID_md5
-#define PEM_MD_SHA		NID_sha
-#define PEM_MD_MD2_RSA		NID_md2WithRSAEncryption
-#define PEM_MD_MD5_RSA		NID_md5WithRSAEncryption
-#define PEM_MD_SHA_RSA		NID_sha1WithRSAEncryption
-
-#define PEM_STRING_X509_OLD	"X509 CERTIFICATE"
-#define PEM_STRING_X509		"CERTIFICATE"
-#define PEM_STRING_X509_PAIR	"CERTIFICATE PAIR"
-#define PEM_STRING_X509_TRUSTED	"TRUSTED CERTIFICATE"
-#define PEM_STRING_X509_REQ_OLD	"NEW CERTIFICATE REQUEST"
-#define PEM_STRING_X509_REQ	"CERTIFICATE REQUEST"
-#define PEM_STRING_X509_CRL	"X509 CRL"
-#define PEM_STRING_EVP_PKEY	"ANY PRIVATE KEY"
-#define PEM_STRING_PUBLIC	"PUBLIC KEY"
-#define PEM_STRING_RSA		"RSA PRIVATE KEY"
-#define PEM_STRING_RSA_PUBLIC	"RSA PUBLIC KEY"
-#define PEM_STRING_DSA		"DSA PRIVATE KEY"
-#define PEM_STRING_DSA_PUBLIC	"DSA PUBLIC KEY"
-#define PEM_STRING_PKCS7	"PKCS7"
-#define PEM_STRING_PKCS7_SIGNED	"PKCS #7 SIGNED DATA"
-#define PEM_STRING_PKCS8	"ENCRYPTED PRIVATE KEY"
-#define PEM_STRING_PKCS8INF	"PRIVATE KEY"
-#define PEM_STRING_DHPARAMS	"DH PARAMETERS"
-#define PEM_STRING_SSL_SESSION	"SSL SESSION PARAMETERS"
-#define PEM_STRING_DSAPARAMS	"DSA PARAMETERS"
-#define PEM_STRING_ECDSA_PUBLIC "ECDSA PUBLIC KEY"
-#define PEM_STRING_ECPARAMETERS "EC PARAMETERS"
-#define PEM_STRING_ECPRIVATEKEY	"EC PRIVATE KEY"
-#define PEM_STRING_PARAMETERS	"PARAMETERS"
-#define PEM_STRING_CMS		"CMS"
-
-  /* Note that this structure is initialised by PEM_SealInit and cleaned up
-     by PEM_SealFinal (at least for now) */
-typedef struct PEM_Encode_Seal_st
-	{
-	EVP_ENCODE_CTX encode;
-	EVP_MD_CTX md;
-	EVP_CIPHER_CTX cipher;
-	} PEM_ENCODE_SEAL_CTX;
-
-/* enc_type is one off */
-#define PEM_TYPE_ENCRYPTED      10
-#define PEM_TYPE_MIC_ONLY       20
-#define PEM_TYPE_MIC_CLEAR      30
-#define PEM_TYPE_CLEAR		40
-
-typedef struct pem_recip_st
-	{
-	char *name;
-	X509_NAME *dn;
-
-	int cipher;
-	int key_enc;
-	/*	char iv[8]; unused and wrong size */
-	} PEM_USER;
-
-typedef struct pem_ctx_st
-	{
-	int type;		/* what type of object */
-
-	struct	{
-		int version;	
-		int mode;		
-		} proc_type;
-
-	char *domain;
-
-	struct	{
-		int cipher;
-	/* unused, and wrong size
-	   unsigned char iv[8]; */
-		} DEK_info;
-		
-	PEM_USER *originator;
-
-	int num_recipient;
-	PEM_USER **recipient;
-
-	/* XXX(ben): don#t think this is used! 
-		STACK *x509_chain;	/ * certificate chain */
-	EVP_MD *md;		/* signature type */
-
-	int md_enc;		/* is the md encrypted or not? */
-	int md_len;		/* length of md_data */
-	char *md_data;		/* message digest, could be pkey encrypted */
-
-	EVP_CIPHER *dec;	/* date encryption cipher */
-	int key_len;		/* key length */
-	unsigned char *key;	/* key */
-	/* unused, and wrong size
-	   unsigned char iv[8]; */
-
-	
-	int  data_enc;		/* is the data encrypted */
-	int data_len;
-	unsigned char *data;
-	} PEM_CTX;
-
-/* These macros make the PEM_read/PEM_write functions easier to maintain and
- * write. Now they are all implemented with either:
- * IMPLEMENT_PEM_rw(...) or IMPLEMENT_PEM_rw_cb(...)
- */
-
-#ifdef OPENSSL_NO_FP_API
-
-#define IMPLEMENT_PEM_read_fp(name, type, str, asn1) /**/
-#define IMPLEMENT_PEM_write_fp(name, type, str, asn1) /**/
-#define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) /**/
-#define IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) /**/
-#define IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) /**/
-
-#else
-
-#define IMPLEMENT_PEM_read_fp(name, type, str, asn1) \
-type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u)\
-{ \
-return PEM_ASN1_read((d2i_of_void *)d2i_##asn1, str,fp,(void **)x,cb,u); \
-} 
-
-#define IMPLEMENT_PEM_write_fp(name, type, str, asn1) \
-int PEM_write_##name(FILE *fp, type *x) \
-{ \
-return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,x,NULL,NULL,0,NULL,NULL); \
-}
-
-#define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) \
-int PEM_write_##name(FILE *fp, const type *x) \
-{ \
-return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,(void *)x,NULL,NULL,0,NULL,NULL); \
-}
-
-#define IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) \
-int PEM_write_##name(FILE *fp, type *x, const EVP_CIPHER *enc, \
-	     unsigned char *kstr, int klen, pem_password_cb *cb, \
-		  void *u) \
-	{ \
-	return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u); \
-	}
-
-#define IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) \
-int PEM_write_##name(FILE *fp, type *x, const EVP_CIPHER *enc, \
-	     unsigned char *kstr, int klen, pem_password_cb *cb, \
-		  void *u) \
-	{ \
-	return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u); \
-	}
-
-#endif
-
-#define IMPLEMENT_PEM_read_bio(name, type, str, asn1) \
-type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u)\
-{ \
-return PEM_ASN1_read_bio((d2i_of_void *)d2i_##asn1, str,bp,(void **)x,cb,u); \
-}
-
-#define IMPLEMENT_PEM_write_bio(name, type, str, asn1) \
-int PEM_write_bio_##name(BIO *bp, type *x) \
-{ \
-return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,x,NULL,NULL,0,NULL,NULL); \
-}
-
-#define IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \
-int PEM_write_bio_##name(BIO *bp, const type *x) \
-{ \
-return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,(void *)x,NULL,NULL,0,NULL,NULL); \
-}
-
-#define IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1) \
-int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \
-	     unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \
-	{ \
-	return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,x,enc,kstr,klen,cb,u); \
-	}
-
-#define IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1) \
-int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \
-	     unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \
-	{ \
-	return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,(void *)x,enc,kstr,klen,cb,u); \
-	}
-
-#define IMPLEMENT_PEM_write(name, type, str, asn1) \
-	IMPLEMENT_PEM_write_bio(name, type, str, asn1) \
-	IMPLEMENT_PEM_write_fp(name, type, str, asn1) 
-
-#define IMPLEMENT_PEM_write_const(name, type, str, asn1) \
-	IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \
-	IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) 
-
-#define IMPLEMENT_PEM_write_cb(name, type, str, asn1) \
-	IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1) \
-	IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) 
-
-#define IMPLEMENT_PEM_write_cb_const(name, type, str, asn1) \
-	IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1) \
-	IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) 
-
-#define IMPLEMENT_PEM_read(name, type, str, asn1) \
-	IMPLEMENT_PEM_read_bio(name, type, str, asn1) \
-	IMPLEMENT_PEM_read_fp(name, type, str, asn1) 
-
-#define IMPLEMENT_PEM_rw(name, type, str, asn1) \
-	IMPLEMENT_PEM_read(name, type, str, asn1) \
-	IMPLEMENT_PEM_write(name, type, str, asn1)
-
-#define IMPLEMENT_PEM_rw_const(name, type, str, asn1) \
-	IMPLEMENT_PEM_read(name, type, str, asn1) \
-	IMPLEMENT_PEM_write_const(name, type, str, asn1)
-
-#define IMPLEMENT_PEM_rw_cb(name, type, str, asn1) \
-	IMPLEMENT_PEM_read(name, type, str, asn1) \
-	IMPLEMENT_PEM_write_cb(name, type, str, asn1)
-
-/* These are the same except they are for the declarations */
-
-#if defined(OPENSSL_NO_FP_API)
-
-#define DECLARE_PEM_read_fp(name, type) /**/
-#define DECLARE_PEM_write_fp(name, type) /**/
-#define DECLARE_PEM_write_cb_fp(name, type) /**/
-
-#else
-
-#define DECLARE_PEM_read_fp(name, type) \
-	type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u);
-
-#define DECLARE_PEM_write_fp(name, type) \
-	int PEM_write_##name(FILE *fp, type *x);
-
-#define DECLARE_PEM_write_fp_const(name, type) \
-	int PEM_write_##name(FILE *fp, const type *x);
-
-#define DECLARE_PEM_write_cb_fp(name, type) \
-	int PEM_write_##name(FILE *fp, type *x, const EVP_CIPHER *enc, \
-	     unsigned char *kstr, int klen, pem_password_cb *cb, void *u);
-
-#endif
-
-#ifndef OPENSSL_NO_BIO
-#define DECLARE_PEM_read_bio(name, type) \
-	type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u);
-
-#define DECLARE_PEM_write_bio(name, type) \
-	int PEM_write_bio_##name(BIO *bp, type *x);
-
-#define DECLARE_PEM_write_bio_const(name, type) \
-	int PEM_write_bio_##name(BIO *bp, const type *x);
-
-#define DECLARE_PEM_write_cb_bio(name, type) \
-	int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \
-	     unsigned char *kstr, int klen, pem_password_cb *cb, void *u);
-
-#else
-
-#define DECLARE_PEM_read_bio(name, type) /**/
-#define DECLARE_PEM_write_bio(name, type) /**/
-#define DECLARE_PEM_write_bio_const(name, type) /**/
-#define DECLARE_PEM_write_cb_bio(name, type) /**/
-
-#endif
-
-#define DECLARE_PEM_write(name, type) \
-	DECLARE_PEM_write_bio(name, type) \
-	DECLARE_PEM_write_fp(name, type) 
-
-#define DECLARE_PEM_write_const(name, type) \
-	DECLARE_PEM_write_bio_const(name, type) \
-	DECLARE_PEM_write_fp_const(name, type)
-
-#define DECLARE_PEM_write_cb(name, type) \
-	DECLARE_PEM_write_cb_bio(name, type) \
-	DECLARE_PEM_write_cb_fp(name, type) 
-
-#define DECLARE_PEM_read(name, type) \
-	DECLARE_PEM_read_bio(name, type) \
-	DECLARE_PEM_read_fp(name, type)
-
-#define DECLARE_PEM_rw(name, type) \
-	DECLARE_PEM_read(name, type) \
-	DECLARE_PEM_write(name, type)
-
-#define DECLARE_PEM_rw_const(name, type) \
-	DECLARE_PEM_read(name, type) \
-	DECLARE_PEM_write_const(name, type)
-
-#define DECLARE_PEM_rw_cb(name, type) \
-	DECLARE_PEM_read(name, type) \
-	DECLARE_PEM_write_cb(name, type)
-
-#if 1
-/* "userdata": new with OpenSSL 0.9.4 */
-typedef int pem_password_cb(char *buf, int size, int rwflag, void *userdata);
-#else
-/* OpenSSL 0.9.3, 0.9.3a */
-typedef int pem_password_cb(char *buf, int size, int rwflag);
-#endif
-
-int	PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher);
-int	PEM_do_header (EVP_CIPHER_INFO *cipher, unsigned char *data,long *len,
-	pem_password_cb *callback,void *u);
-
-#ifndef OPENSSL_NO_BIO
-int	PEM_read_bio(BIO *bp, char **name, char **header,
-		unsigned char **data,long *len);
-int	PEM_write_bio(BIO *bp,const char *name,char *hdr,unsigned char *data,
-		long len);
-int PEM_bytes_read_bio(unsigned char **pdata, long *plen, char **pnm, const char *name, BIO *bp,
-	     pem_password_cb *cb, void *u);
-void *	PEM_ASN1_read_bio(d2i_of_void *d2i, const char *name, BIO *bp,
-			  void **x, pem_password_cb *cb, void *u);
-int	PEM_ASN1_write_bio(i2d_of_void *i2d,const char *name,BIO *bp, void *x,
-			   const EVP_CIPHER *enc,unsigned char *kstr,int klen,
-			   pem_password_cb *cb, void *u);
-
-STACK_OF(X509_INFO) *	PEM_X509_INFO_read_bio(BIO *bp, STACK_OF(X509_INFO) *sk, pem_password_cb *cb, void *u);
-int	PEM_X509_INFO_write_bio(BIO *bp,X509_INFO *xi, EVP_CIPHER *enc,
-		unsigned char *kstr, int klen, pem_password_cb *cd, void *u);
-#endif
-
-int	PEM_read(FILE *fp, char **name, char **header,
-		unsigned char **data,long *len);
-int	PEM_write(FILE *fp,char *name,char *hdr,unsigned char *data,long len);
-void *  PEM_ASN1_read(d2i_of_void *d2i, const char *name, FILE *fp, void **x,
-		      pem_password_cb *cb, void *u);
-int	PEM_ASN1_write(i2d_of_void *i2d,const char *name,FILE *fp,
-		       void *x,const EVP_CIPHER *enc,unsigned char *kstr,
-		       int klen,pem_password_cb *callback, void *u);
-STACK_OF(X509_INFO) *	PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk,
-	pem_password_cb *cb, void *u);
-
-int	PEM_SealInit(PEM_ENCODE_SEAL_CTX *ctx, EVP_CIPHER *type,
-		EVP_MD *md_type, unsigned char **ek, int *ekl,
-		unsigned char *iv, EVP_PKEY **pubk, int npubk);
-void	PEM_SealUpdate(PEM_ENCODE_SEAL_CTX *ctx, unsigned char *out, int *outl,
-		unsigned char *in, int inl);
-int	PEM_SealFinal(PEM_ENCODE_SEAL_CTX *ctx, unsigned char *sig,int *sigl,
-		unsigned char *out, int *outl, EVP_PKEY *priv);
-
-void    PEM_SignInit(EVP_MD_CTX *ctx, EVP_MD *type);
-void    PEM_SignUpdate(EVP_MD_CTX *ctx,unsigned char *d,unsigned int cnt);
-int	PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret,
-		unsigned int *siglen, EVP_PKEY *pkey);
-
-int	PEM_def_callback(char *buf, int num, int w, void *key);
-void	PEM_proc_type(char *buf, int type);
-void	PEM_dek_info(char *buf, const char *type, int len, char *str);
-
-
-#include <openssl/symhacks.h>
-
-DECLARE_PEM_rw(X509, X509)
-
-DECLARE_PEM_rw(X509_AUX, X509)
-
-DECLARE_PEM_rw(X509_CERT_PAIR, X509_CERT_PAIR)
-
-DECLARE_PEM_rw(X509_REQ, X509_REQ)
-DECLARE_PEM_write(X509_REQ_NEW, X509_REQ)
-
-DECLARE_PEM_rw(X509_CRL, X509_CRL)
-
-DECLARE_PEM_rw(PKCS7, PKCS7)
-
-DECLARE_PEM_rw(NETSCAPE_CERT_SEQUENCE, NETSCAPE_CERT_SEQUENCE)
-
-DECLARE_PEM_rw(PKCS8, X509_SIG)
-
-DECLARE_PEM_rw(PKCS8_PRIV_KEY_INFO, PKCS8_PRIV_KEY_INFO)
-
-#ifndef OPENSSL_NO_RSA
-
-DECLARE_PEM_rw_cb(RSAPrivateKey, RSA)
-
-DECLARE_PEM_rw_const(RSAPublicKey, RSA)
-DECLARE_PEM_rw(RSA_PUBKEY, RSA)
-
-#endif
-
-#ifndef OPENSSL_NO_DSA
-
-DECLARE_PEM_rw_cb(DSAPrivateKey, DSA)
-
-DECLARE_PEM_rw(DSA_PUBKEY, DSA)
-
-DECLARE_PEM_rw_const(DSAparams, DSA)
-
-#endif
-
-#ifndef OPENSSL_NO_EC
-DECLARE_PEM_rw_const(ECPKParameters, EC_GROUP)
-DECLARE_PEM_rw_cb(ECPrivateKey, EC_KEY)
-DECLARE_PEM_rw(EC_PUBKEY, EC_KEY)
-#endif
-
-#ifndef OPENSSL_NO_DH
-
-DECLARE_PEM_rw_const(DHparams, DH)
-
-#endif
-
-DECLARE_PEM_rw_cb(PrivateKey, EVP_PKEY)
-
-DECLARE_PEM_rw(PUBKEY, EVP_PKEY)
-
-int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, EVP_PKEY *x, int nid,
-				  char *kstr, int klen,
-				  pem_password_cb *cb, void *u);
-int PEM_write_bio_PKCS8PrivateKey(BIO *, EVP_PKEY *, const EVP_CIPHER *,
-                                  char *, int, pem_password_cb *, void *);
-int i2d_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc,
-				  char *kstr, int klen,
-				  pem_password_cb *cb, void *u);
-int i2d_PKCS8PrivateKey_nid_bio(BIO *bp, EVP_PKEY *x, int nid,
-				  char *kstr, int klen,
-				  pem_password_cb *cb, void *u);
-EVP_PKEY *d2i_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, void *u);
-
-int i2d_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc,
-				  char *kstr, int klen,
-				  pem_password_cb *cb, void *u);
-int i2d_PKCS8PrivateKey_nid_fp(FILE *fp, EVP_PKEY *x, int nid,
-				  char *kstr, int klen,
-				  pem_password_cb *cb, void *u);
-int PEM_write_PKCS8PrivateKey_nid(FILE *fp, EVP_PKEY *x, int nid,
-				  char *kstr, int klen,
-				  pem_password_cb *cb, void *u);
-
-EVP_PKEY *d2i_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY **x, pem_password_cb *cb, void *u);
-
-int PEM_write_PKCS8PrivateKey(FILE *fp,EVP_PKEY *x,const EVP_CIPHER *enc,
-			      char *kstr,int klen, pem_password_cb *cd, void *u);
-
-EVP_PKEY *PEM_read_bio_Parameters(BIO *bp, EVP_PKEY **x);
-int PEM_write_bio_Parameters(BIO *bp, EVP_PKEY *x);
-
-
-EVP_PKEY *b2i_PrivateKey(const unsigned char **in, long length);
-EVP_PKEY *b2i_PublicKey(const unsigned char **in, long length);
-EVP_PKEY *b2i_PrivateKey_bio(BIO *in);
-EVP_PKEY *b2i_PublicKey_bio(BIO *in);
-int i2b_PrivateKey_bio(BIO *out, EVP_PKEY *pk);
-int i2b_PublicKey_bio(BIO *out, EVP_PKEY *pk);
-#ifndef OPENSSL_NO_RC4
-EVP_PKEY *b2i_PVK_bio(BIO *in, pem_password_cb *cb, void *u);
-int i2b_PVK_bio(BIO *out, EVP_PKEY *pk, int enclevel,
-		pem_password_cb *cb, void *u);
-#endif
-
-
-/* BEGIN ERROR CODES */
-/* The following lines are auto generated by the script mkerr.pl. Any changes
- * made after this point may be overwritten when the script is next run.
- */
-void ERR_load_PEM_strings(void);
-
-/* Error codes for the PEM functions. */
-
-/* Function codes. */
-#define PEM_F_B2I_DSS					 127
-#define PEM_F_B2I_PVK_BIO				 128
-#define PEM_F_B2I_RSA					 129
-#define PEM_F_CHECK_BITLEN_DSA				 130
-#define PEM_F_CHECK_BITLEN_RSA				 131
-#define PEM_F_D2I_PKCS8PRIVATEKEY_BIO			 120
-#define PEM_F_D2I_PKCS8PRIVATEKEY_FP			 121
-#define PEM_F_DO_B2I					 132
-#define PEM_F_DO_B2I_BIO				 133
-#define PEM_F_DO_BLOB_HEADER				 134
-#define PEM_F_DO_PK8PKEY				 126
-#define PEM_F_DO_PK8PKEY_FP				 125
-#define PEM_F_DO_PVK_BODY				 135
-#define PEM_F_DO_PVK_HEADER				 136
-#define PEM_F_I2B_PVK					 137
-#define PEM_F_I2B_PVK_BIO				 138
-#define PEM_F_LOAD_IV					 101
-#define PEM_F_PEM_ASN1_READ				 102
-#define PEM_F_PEM_ASN1_READ_BIO				 103
-#define PEM_F_PEM_ASN1_WRITE				 104
-#define PEM_F_PEM_ASN1_WRITE_BIO			 105
-#define PEM_F_PEM_DEF_CALLBACK				 100
-#define PEM_F_PEM_DO_HEADER				 106
-#define PEM_F_PEM_F_PEM_WRITE_PKCS8PRIVATEKEY		 118
-#define PEM_F_PEM_GET_EVP_CIPHER_INFO			 107
-#define PEM_F_PEM_PK8PKEY				 119
-#define PEM_F_PEM_READ					 108
-#define PEM_F_PEM_READ_BIO				 109
-#define PEM_F_PEM_READ_BIO_PARAMETERS			 140
-#define PEM_F_PEM_READ_BIO_PRIVATEKEY			 123
-#define PEM_F_PEM_READ_PRIVATEKEY			 124
-#define PEM_F_PEM_SEALFINAL				 110
-#define PEM_F_PEM_SEALINIT				 111
-#define PEM_F_PEM_SIGNFINAL				 112
-#define PEM_F_PEM_WRITE					 113
-#define PEM_F_PEM_WRITE_BIO				 114
-#define PEM_F_PEM_WRITE_PRIVATEKEY			 139
-#define PEM_F_PEM_X509_INFO_READ			 115
-#define PEM_F_PEM_X509_INFO_READ_BIO			 116
-#define PEM_F_PEM_X509_INFO_WRITE_BIO			 117
-
-/* Reason codes. */
-#define PEM_R_BAD_BASE64_DECODE				 100
-#define PEM_R_BAD_DECRYPT				 101
-#define PEM_R_BAD_END_LINE				 102
-#define PEM_R_BAD_IV_CHARS				 103
-#define PEM_R_BAD_MAGIC_NUMBER				 116
-#define PEM_R_BAD_PASSWORD_READ				 104
-#define PEM_R_BAD_VERSION_NUMBER			 117
-#define PEM_R_BIO_WRITE_FAILURE				 118
-#define PEM_R_CIPHER_IS_NULL				 127
-#define PEM_R_ERROR_CONVERTING_PRIVATE_KEY		 115
-#define PEM_R_EXPECTING_PRIVATE_KEY_BLOB		 119
-#define PEM_R_EXPECTING_PUBLIC_KEY_BLOB			 120
-#define PEM_R_INCONSISTENT_HEADER			 121
-#define PEM_R_KEYBLOB_HEADER_PARSE_ERROR		 122
-#define PEM_R_KEYBLOB_TOO_SHORT				 123
-#define PEM_R_NOT_DEK_INFO				 105
-#define PEM_R_NOT_ENCRYPTED				 106
-#define PEM_R_NOT_PROC_TYPE				 107
-#define PEM_R_NO_START_LINE				 108
-#define PEM_R_PROBLEMS_GETTING_PASSWORD			 109
-#define PEM_R_PUBLIC_KEY_NO_RSA				 110
-#define PEM_R_PVK_DATA_TOO_SHORT			 124
-#define PEM_R_PVK_TOO_SHORT				 125
-#define PEM_R_READ_KEY					 111
-#define PEM_R_SHORT_HEADER				 112
-#define PEM_R_UNSUPPORTED_CIPHER			 113
-#define PEM_R_UNSUPPORTED_ENCRYPTION			 114
-#define PEM_R_UNSUPPORTED_KEY_COMPONENTS		 126
-
-#ifdef  __cplusplus
-}
-#endif
-#endif
diff --git a/extra_lib/include/openssl/pem2.h b/extra_lib/include/openssl/pem2.h
deleted file mode 100644
index f31790d..0000000
--- a/extra_lib/include/openssl/pem2.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* ====================================================================
- * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. 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.
- *
- * 3. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
- *
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
- *    endorse or promote products derived from this software without
- *    prior written permission. For written permission, please contact
- *    licensing at OpenSSL.org.
- *
- * 5. Products derived from this software may not be called "OpenSSL"
- *    nor may "OpenSSL" appear in their names without prior written
- *    permission of the OpenSSL Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- *    acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
- *
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
- * EXPRESSED 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 OpenSSL PROJECT OR
- * ITS 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.
- * ====================================================================
- *
- * This product includes cryptographic software written by Eric Young
- * (eay at cryptsoft.com).  This product includes software written by Tim
- * Hudson (tjh at cryptsoft.com).
- *
- */
-
-/*
- * This header only exists to break a circular dependency between pem and err
- * Ben 30 Jan 1999.
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef HEADER_PEM_H
-void ERR_load_PEM_strings(void);
-#endif
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/extra_lib/include/openssl/pkcs7.h b/extra_lib/include/openssl/pkcs7.h
deleted file mode 100644
index e4d4431..0000000
--- a/extra_lib/include/openssl/pkcs7.h
+++ /dev/null
@@ -1,499 +0,0 @@
-/* crypto/pkcs7/pkcs7.h */
-/* Copyright (C) 1995-1998 Eric Young (eay at cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay at cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh at cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay at cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh at cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef HEADER_PKCS7_H
-#define HEADER_PKCS7_H
-
-#include <openssl/asn1.h>
-#include <openssl/bio.h>
-#include <openssl/e_os2.h>
-
-#include <openssl/symhacks.h>
-#include <openssl/ossl_typ.h>
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-#ifdef OPENSSL_SYS_WIN32
-/* Under Win32 thes are defined in wincrypt.h */
-#undef PKCS7_ISSUER_AND_SERIAL
-#undef PKCS7_SIGNER_INFO
-#endif
-
-/*
-Encryption_ID		DES-CBC
-Digest_ID		MD5
-Digest_Encryption_ID	rsaEncryption
-Key_Encryption_ID	rsaEncryption
-*/
-
-typedef struct pkcs7_issuer_and_serial_st
-	{
-	X509_NAME *issuer;
-	ASN1_INTEGER *serial;
-	} PKCS7_ISSUER_AND_SERIAL;
-
-typedef struct pkcs7_signer_info_st
-	{
-	ASN1_INTEGER 			*version;	/* version 1 */
-	PKCS7_ISSUER_AND_SERIAL		*issuer_and_serial;
-	X509_ALGOR			*digest_alg;
-	STACK_OF(X509_ATTRIBUTE)	*auth_attr;	/* [ 0 ] */
-	X509_ALGOR			*digest_enc_alg;
-	ASN1_OCTET_STRING		*enc_digest;
-	STACK_OF(X509_ATTRIBUTE)	*unauth_attr;	/* [ 1 ] */
-
-	/* The private key to sign with */
-	EVP_PKEY			*pkey;
-	} PKCS7_SIGNER_INFO;
-
-DECLARE_STACK_OF(PKCS7_SIGNER_INFO)
-DECLARE_ASN1_SET_OF(PKCS7_SIGNER_INFO)
-
-typedef struct pkcs7_recip_info_st
-	{
-	ASN1_INTEGER			*version;	/* version 0 */
-	PKCS7_ISSUER_AND_SERIAL		*issuer_and_serial;
-	X509_ALGOR			*key_enc_algor;
-	ASN1_OCTET_STRING		*enc_key;
-	X509				*cert; /* get the pub-key from this */
-	} PKCS7_RECIP_INFO;
-
-DECLARE_STACK_OF(PKCS7_RECIP_INFO)
-DECLARE_ASN1_SET_OF(PKCS7_RECIP_INFO)
-
-typedef struct pkcs7_signed_st
-	{
-	ASN1_INTEGER			*version;	/* version 1 */
-	STACK_OF(X509_ALGOR)		*md_algs;	/* md used */
-	STACK_OF(X509)			*cert;		/* [ 0 ] */
-	STACK_OF(X509_CRL)		*crl;		/* [ 1 ] */
-	STACK_OF(PKCS7_SIGNER_INFO)	*signer_info;
-
-	struct pkcs7_st			*contents;
-	} PKCS7_SIGNED;
-/* The above structure is very very similar to PKCS7_SIGN_ENVELOPE.
- * How about merging the two */
-
-typedef struct pkcs7_enc_content_st
-	{
-	ASN1_OBJECT			*content_type;
-	X509_ALGOR			*algorithm;
-	ASN1_OCTET_STRING		*enc_data;	/* [ 0 ] */
-	const EVP_CIPHER		*cipher;
-	} PKCS7_ENC_CONTENT;
-
-typedef struct pkcs7_enveloped_st
-	{
-	ASN1_INTEGER			*version;	/* version 0 */
-	STACK_OF(PKCS7_RECIP_INFO)	*recipientinfo;
-	PKCS7_ENC_CONTENT		*enc_data;
-	} PKCS7_ENVELOPE;
-
-typedef struct pkcs7_signedandenveloped_st
-	{
-	ASN1_INTEGER			*version;	/* version 1 */
-	STACK_OF(X509_ALGOR)		*md_algs;	/* md used */
-	STACK_OF(X509)			*cert;		/* [ 0 ] */
-	STACK_OF(X509_CRL)		*crl;		/* [ 1 ] */
-	STACK_OF(PKCS7_SIGNER_INFO)	*signer_info;
-
-	PKCS7_ENC_CONTENT		*enc_data;
-	STACK_OF(PKCS7_RECIP_INFO)	*recipientinfo;
-	} PKCS7_SIGN_ENVELOPE;
-
-typedef struct pkcs7_digest_st
-	{
-	ASN1_INTEGER			*version;	/* version 0 */
-	X509_ALGOR			*md;		/* md used */
-	struct pkcs7_st 		*contents;
-	ASN1_OCTET_STRING		*digest;
-	} PKCS7_DIGEST;
-
-typedef struct pkcs7_encrypted_st
-	{
-	ASN1_INTEGER			*version;	/* version 0 */
-	PKCS7_ENC_CONTENT		*enc_data;
-	} PKCS7_ENCRYPT;
-
-typedef struct pkcs7_st
-	{
-	/* The following is non NULL if it contains ASN1 encoding of
-	 * this structure */
-	unsigned char *asn1;
-	long length;
-
-#define PKCS7_S_HEADER	0
-#define PKCS7_S_BODY	1
-#define PKCS7_S_TAIL	2
-	int state; /* used during processing */
-
-	int detached;
-
-	ASN1_OBJECT *type;
-	/* content as defined by the type */
-	/* all encryption/message digests are applied to the 'contents',
-	 * leaving out the 'type' field. */
-	union	{
-		char *ptr;
-
-		/* NID_pkcs7_data */
-		ASN1_OCTET_STRING *data;
-
-		/* NID_pkcs7_signed */
-		PKCS7_SIGNED *sign;
-
-		/* NID_pkcs7_enveloped */
-		PKCS7_ENVELOPE *enveloped;
-
-		/* NID_pkcs7_signedAndEnveloped */
-		PKCS7_SIGN_ENVELOPE *signed_and_enveloped;
-
-		/* NID_pkcs7_digest */
-		PKCS7_DIGEST *digest;
-
-		/* NID_pkcs7_encrypted */
-		PKCS7_ENCRYPT *encrypted;
-
-		/* Anything else */
-		ASN1_TYPE *other;
-		} d;
-	} PKCS7;
-
-DECLARE_STACK_OF(PKCS7)
-DECLARE_ASN1_SET_OF(PKCS7)
-DECLARE_PKCS12_STACK_OF(PKCS7)
-
-#define PKCS7_OP_SET_DETACHED_SIGNATURE	1
-#define PKCS7_OP_GET_DETACHED_SIGNATURE	2
-
-#define PKCS7_get_signed_attributes(si)	((si)->auth_attr)
-#define PKCS7_get_attributes(si)	((si)->unauth_attr)
-
-#define PKCS7_type_is_signed(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_signed)
-#define PKCS7_type_is_encrypted(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_encrypted)
-#define PKCS7_type_is_enveloped(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_enveloped)
-#define PKCS7_type_is_signedAndEnveloped(a) \
-		(OBJ_obj2nid((a)->type) == NID_pkcs7_signedAndEnveloped)
-#define PKCS7_type_is_data(a)   (OBJ_obj2nid((a)->type) == NID_pkcs7_data)
-#define PKCS7_type_is_digest(a)   (OBJ_obj2nid((a)->type) == NID_pkcs7_digest)
-#define PKCS7_type_is_encrypted(a) \
-		(OBJ_obj2nid((a)->type) == NID_pkcs7_encrypted)
-
-#define PKCS7_type_is_digest(a)   (OBJ_obj2nid((a)->type) == NID_pkcs7_digest)
-
-#define PKCS7_set_detached(p,v) \
-		PKCS7_ctrl(p,PKCS7_OP_SET_DETACHED_SIGNATURE,v,NULL)
-#define PKCS7_get_detached(p) \
-		PKCS7_ctrl(p,PKCS7_OP_GET_DETACHED_SIGNATURE,0,NULL)
-
-#define PKCS7_is_detached(p7) (PKCS7_type_is_signed(p7) && PKCS7_get_detached(p7))
-
-/* S/MIME related flags */
-
-#define PKCS7_TEXT		0x1
-#define PKCS7_NOCERTS		0x2
-#define PKCS7_NOSIGS		0x4
-#define PKCS7_NOCHAIN		0x8
-#define PKCS7_NOINTERN		0x10
-#define PKCS7_NOVERIFY		0x20
-#define PKCS7_DETACHED		0x40
-#define PKCS7_BINARY		0x80
-#define PKCS7_NOATTR		0x100
-#define	PKCS7_NOSMIMECAP	0x200
-#define PKCS7_NOOLDMIMETYPE	0x400
-#define PKCS7_CRLFEOL		0x800
-#define PKCS7_STREAM		0x1000
-#define PKCS7_NOCRL		0x2000
-#define PKCS7_PARTIAL		0x4000
-#define PKCS7_REUSE_DIGEST	0x8000
-
-/* Flags: for compatibility with older code */
-
-#define SMIME_TEXT	PKCS7_TEXT
-#define SMIME_NOCERTS	PKCS7_NOCERTS
-#define SMIME_NOSIGS	PKCS7_NOSIGS
-#define SMIME_NOCHAIN	PKCS7_NOCHAIN
-#define SMIME_NOINTERN	PKCS7_NOINTERN
-#define SMIME_NOVERIFY	PKCS7_NOVERIFY
-#define SMIME_DETACHED	PKCS7_DETACHED
-#define SMIME_BINARY	PKCS7_BINARY
-#define SMIME_NOATTR	PKCS7_NOATTR
-
-DECLARE_ASN1_FUNCTIONS(PKCS7_ISSUER_AND_SERIAL)
-
-int PKCS7_ISSUER_AND_SERIAL_digest(PKCS7_ISSUER_AND_SERIAL *data,const EVP_MD *type,
-	unsigned char *md,unsigned int *len);
-#ifndef OPENSSL_NO_FP_API
-PKCS7 *d2i_PKCS7_fp(FILE *fp,PKCS7 **p7);
-int i2d_PKCS7_fp(FILE *fp,PKCS7 *p7);
-#endif
-PKCS7 *PKCS7_dup(PKCS7 *p7);
-PKCS7 *d2i_PKCS7_bio(BIO *bp,PKCS7 **p7);
-int i2d_PKCS7_bio(BIO *bp,PKCS7 *p7);
-int i2d_PKCS7_bio_stream(BIO *out, PKCS7 *p7, BIO *in, int flags);
-int PEM_write_bio_PKCS7_stream(BIO *out, PKCS7 *p7, BIO *in, int flags);
-
-DECLARE_ASN1_FUNCTIONS(PKCS7_SIGNER_INFO)
-DECLARE_ASN1_FUNCTIONS(PKCS7_RECIP_INFO)
-DECLARE_ASN1_FUNCTIONS(PKCS7_SIGNED)
-DECLARE_ASN1_FUNCTIONS(PKCS7_ENC_CONTENT)
-DECLARE_ASN1_FUNCTIONS(PKCS7_ENVELOPE)
-DECLARE_ASN1_FUNCTIONS(PKCS7_SIGN_ENVELOPE)
-DECLARE_ASN1_FUNCTIONS(PKCS7_DIGEST)
-DECLARE_ASN1_FUNCTIONS(PKCS7_ENCRYPT)
-DECLARE_ASN1_FUNCTIONS(PKCS7)
-
-DECLARE_ASN1_ITEM(PKCS7_ATTR_SIGN)
-DECLARE_ASN1_ITEM(PKCS7_ATTR_VERIFY)
-
-DECLARE_ASN1_NDEF_FUNCTION(PKCS7)
-DECLARE_ASN1_PRINT_FUNCTION(PKCS7)
-
-long PKCS7_ctrl(PKCS7 *p7, int cmd, long larg, char *parg);
-
-int PKCS7_set_type(PKCS7 *p7, int type);
-int PKCS7_set0_type_other(PKCS7 *p7, int type, ASN1_TYPE *other);
-int PKCS7_set_content(PKCS7 *p7, PKCS7 *p7_data);
-int PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey,
-	const EVP_MD *dgst);
-int PKCS7_SIGNER_INFO_sign(PKCS7_SIGNER_INFO *si);
-int PKCS7_add_signer(PKCS7 *p7, PKCS7_SIGNER_INFO *p7i);
-int PKCS7_add_certificate(PKCS7 *p7, X509 *x509);
-int PKCS7_add_crl(PKCS7 *p7, X509_CRL *x509);
-int PKCS7_content_new(PKCS7 *p7, int nid);
-int PKCS7_dataVerify(X509_STORE *cert_store, X509_STORE_CTX *ctx,
-	BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si); 
-int PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si,
-								X509 *x509);
-
-BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio);
-int PKCS7_dataFinal(PKCS7 *p7, BIO *bio);
-BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert);
-
-
-PKCS7_SIGNER_INFO *PKCS7_add_signature(PKCS7 *p7, X509 *x509,
-	EVP_PKEY *pkey, const EVP_MD *dgst);
-X509 *PKCS7_cert_from_signer_info(PKCS7 *p7, PKCS7_SIGNER_INFO *si);
-int PKCS7_set_digest(PKCS7 *p7, const EVP_MD *md);
-STACK_OF(PKCS7_SIGNER_INFO) *PKCS7_get_signer_info(PKCS7 *p7);
-
-PKCS7_RECIP_INFO *PKCS7_add_recipient(PKCS7 *p7, X509 *x509);
-void PKCS7_SIGNER_INFO_get0_algs(PKCS7_SIGNER_INFO *si, EVP_PKEY **pk,
-					X509_ALGOR **pdig, X509_ALGOR **psig);
-void PKCS7_RECIP_INFO_get0_alg(PKCS7_RECIP_INFO *ri, X509_ALGOR **penc);
-int PKCS7_add_recipient_info(PKCS7 *p7, PKCS7_RECIP_INFO *ri);
-int PKCS7_RECIP_INFO_set(PKCS7_RECIP_INFO *p7i, X509 *x509);
-int PKCS7_set_cipher(PKCS7 *p7, const EVP_CIPHER *cipher);
-int PKCS7_stream(unsigned char ***boundary, PKCS7 *p7);
-
-PKCS7_ISSUER_AND_SERIAL *PKCS7_get_issuer_and_serial(PKCS7 *p7, int idx);
-ASN1_OCTET_STRING *PKCS7_digest_from_attributes(STACK_OF(X509_ATTRIBUTE) *sk);
-int PKCS7_add_signed_attribute(PKCS7_SIGNER_INFO *p7si,int nid,int type,
-	void *data);
-int PKCS7_add_attribute (PKCS7_SIGNER_INFO *p7si, int nid, int atrtype,
-	void *value);
-ASN1_TYPE *PKCS7_get_attribute(PKCS7_SIGNER_INFO *si, int nid);
-ASN1_TYPE *PKCS7_get_signed_attribute(PKCS7_SIGNER_INFO *si, int nid);
-int PKCS7_set_signed_attributes(PKCS7_SIGNER_INFO *p7si,
-				STACK_OF(X509_ATTRIBUTE) *sk);
-int PKCS7_set_attributes(PKCS7_SIGNER_INFO *p7si,STACK_OF(X509_ATTRIBUTE) *sk);
-
-
-PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs,
-							BIO *data, int flags);
-
-PKCS7_SIGNER_INFO *PKCS7_sign_add_signer(PKCS7 *p7,
-			X509 *signcert, EVP_PKEY *pkey, const EVP_MD *md,
-			int flags);
-
-int PKCS7_final(PKCS7 *p7, BIO *data, int flags);
-int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store,
-					BIO *indata, BIO *out, int flags);
-STACK_OF(X509) *PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs, int flags);
-PKCS7 *PKCS7_encrypt(STACK_OF(X509) *certs, BIO *in, const EVP_CIPHER *cipher,
-								int flags);
-int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, int flags);
-
-int PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si,
-			      STACK_OF(X509_ALGOR) *cap);
-STACK_OF(X509_ALGOR) *PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si);
-int PKCS7_simple_smimecap(STACK_OF(X509_ALGOR) *sk, int nid, int arg);
-
-int PKCS7_add_attrib_content_type(PKCS7_SIGNER_INFO *si, ASN1_OBJECT *coid);
-int PKCS7_add0_attrib_signing_time(PKCS7_SIGNER_INFO *si, ASN1_TIME *t);
-int PKCS7_add1_attrib_digest(PKCS7_SIGNER_INFO *si,
-				const unsigned char *md, int mdlen);
-
-int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags);
-PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont);
-
-BIO *BIO_new_PKCS7(BIO *out, PKCS7 *p7);
-
-
-/* BEGIN ERROR CODES */
-/* The following lines are auto generated by the script mkerr.pl. Any changes
- * made after this point may be overwritten when the script is next run.
- */
-void ERR_load_PKCS7_strings(void);
-
-/* Error codes for the PKCS7 functions. */
-
-/* Function codes. */
-#define PKCS7_F_B64_READ_PKCS7				 120
-#define PKCS7_F_B64_WRITE_PKCS7				 121
-#define PKCS7_F_DO_PKCS7_SIGNED_ATTRIB			 136
-#define PKCS7_F_I2D_PKCS7_BIO_STREAM			 140
-#define PKCS7_F_PKCS7_ADD0_ATTRIB_SIGNING_TIME		 135
-#define PKCS7_F_PKCS7_ADD_ATTRIB_SMIMECAP		 118
-#define PKCS7_F_PKCS7_ADD_CERTIFICATE			 100
-#define PKCS7_F_PKCS7_ADD_CRL				 101
-#define PKCS7_F_PKCS7_ADD_RECIPIENT_INFO		 102
-#define PKCS7_F_PKCS7_ADD_SIGNATURE			 131
-#define PKCS7_F_PKCS7_ADD_SIGNER			 103
-#define PKCS7_F_PKCS7_BIO_ADD_DIGEST			 125
-#define PKCS7_F_PKCS7_COPY_EXISTING_DIGEST		 138
-#define PKCS7_F_PKCS7_CTRL				 104
-#define PKCS7_F_PKCS7_DATADECODE			 112
-#define PKCS7_F_PKCS7_DATAFINAL				 128
-#define PKCS7_F_PKCS7_DATAINIT				 105
-#define PKCS7_F_PKCS7_DATASIGN				 106
-#define PKCS7_F_PKCS7_DATAVERIFY			 107
-#define PKCS7_F_PKCS7_DECRYPT				 114
-#define PKCS7_F_PKCS7_DECRYPT_RINFO			 133
-#define PKCS7_F_PKCS7_ENCODE_RINFO			 132
-#define PKCS7_F_PKCS7_ENCRYPT				 115
-#define PKCS7_F_PKCS7_FINAL				 134
-#define PKCS7_F_PKCS7_FIND_DIGEST			 127
-#define PKCS7_F_PKCS7_GET0_SIGNERS			 124
-#define PKCS7_F_PKCS7_RECIP_INFO_SET			 130
-#define PKCS7_F_PKCS7_SET_CIPHER			 108
-#define PKCS7_F_PKCS7_SET_CONTENT			 109
-#define PKCS7_F_PKCS7_SET_DIGEST			 126
-#define PKCS7_F_PKCS7_SET_TYPE				 110
-#define PKCS7_F_PKCS7_SIGN				 116
-#define PKCS7_F_PKCS7_SIGNATUREVERIFY			 113
-#define PKCS7_F_PKCS7_SIGNER_INFO_SET			 129
-#define PKCS7_F_PKCS7_SIGNER_INFO_SIGN			 139
-#define PKCS7_F_PKCS7_SIGN_ADD_SIGNER			 137
-#define PKCS7_F_PKCS7_SIMPLE_SMIMECAP			 119
-#define PKCS7_F_PKCS7_VERIFY				 117
-#define PKCS7_F_SMIME_READ_PKCS7			 122
-#define PKCS7_F_SMIME_TEXT				 123
-
-/* Reason codes. */
-#define PKCS7_R_CERTIFICATE_VERIFY_ERROR		 117
-#define PKCS7_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER		 144
-#define PKCS7_R_CIPHER_NOT_INITIALIZED			 116
-#define PKCS7_R_CONTENT_AND_DATA_PRESENT		 118
-#define PKCS7_R_CTRL_ERROR				 152
-#define PKCS7_R_DECODE_ERROR				 130
-#define PKCS7_R_DECRYPTED_KEY_IS_WRONG_LENGTH		 100
-#define PKCS7_R_DECRYPT_ERROR				 119
-#define PKCS7_R_DIGEST_FAILURE				 101
-#define PKCS7_R_ENCRYPTION_CTRL_FAILURE			 149
-#define PKCS7_R_ENCRYPTION_NOT_SUPPORTED_FOR_THIS_KEY_TYPE 150
-#define PKCS7_R_ERROR_ADDING_RECIPIENT			 120
-#define PKCS7_R_ERROR_SETTING_CIPHER			 121
-#define PKCS7_R_INVALID_MIME_TYPE			 131
-#define PKCS7_R_INVALID_NULL_POINTER			 143
-#define PKCS7_R_MIME_NO_CONTENT_TYPE			 132
-#define PKCS7_R_MIME_PARSE_ERROR			 133
-#define PKCS7_R_MIME_SIG_PARSE_ERROR			 134
-#define PKCS7_R_MISSING_CERIPEND_INFO			 103
-#define PKCS7_R_NO_CONTENT				 122
-#define PKCS7_R_NO_CONTENT_TYPE				 135
-#define PKCS7_R_NO_DEFAULT_DIGEST			 151
-#define PKCS7_R_NO_MATCHING_DIGEST_TYPE_FOUND		 154
-#define PKCS7_R_NO_MULTIPART_BODY_FAILURE		 136
-#define PKCS7_R_NO_MULTIPART_BOUNDARY			 137
-#define PKCS7_R_NO_RECIPIENT_MATCHES_CERTIFICATE	 115
-#define PKCS7_R_NO_RECIPIENT_MATCHES_KEY		 146
-#define PKCS7_R_NO_SIGNATURES_ON_DATA			 123
-#define PKCS7_R_NO_SIGNERS				 142
-#define PKCS7_R_NO_SIG_CONTENT_TYPE			 138
-#define PKCS7_R_OPERATION_NOT_SUPPORTED_ON_THIS_TYPE	 104
-#define PKCS7_R_PKCS7_ADD_SIGNATURE_ERROR		 124
-#define PKCS7_R_PKCS7_ADD_SIGNER_ERROR			 153
-#define PKCS7_R_PKCS7_DATAFINAL				 126
-#define PKCS7_R_PKCS7_DATAFINAL_ERROR			 125
-#define PKCS7_R_PKCS7_DATASIGN				 145
-#define PKCS7_R_PKCS7_PARSE_ERROR			 139
-#define PKCS7_R_PKCS7_SIG_PARSE_ERROR			 140
-#define PKCS7_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE	 127
-#define PKCS7_R_SIGNATURE_FAILURE			 105
-#define PKCS7_R_SIGNER_CERTIFICATE_NOT_FOUND		 128
-#define PKCS7_R_SIGNING_CTRL_FAILURE			 147
-#define PKCS7_R_SIGNING_NOT_SUPPORTED_FOR_THIS_KEY_TYPE	 148
-#define PKCS7_R_SIG_INVALID_MIME_TYPE			 141
-#define PKCS7_R_SMIME_TEXT_ERROR			 129
-#define PKCS7_R_UNABLE_TO_FIND_CERTIFICATE		 106
-#define PKCS7_R_UNABLE_TO_FIND_MEM_BIO			 107
-#define PKCS7_R_UNABLE_TO_FIND_MESSAGE_DIGEST		 108
-#define PKCS7_R_UNKNOWN_DIGEST_TYPE			 109
-#define PKCS7_R_UNKNOWN_OPERATION			 110
-#define PKCS7_R_UNSUPPORTED_CIPHER_TYPE			 111
-#define PKCS7_R_UNSUPPORTED_CONTENT_TYPE		 112
-#define PKCS7_R_WRONG_CONTENT_TYPE			 113
-#define PKCS7_R_WRONG_PKCS7_TYPE			 114
-
-#ifdef  __cplusplus
-}
-#endif
-#endif
diff --git a/extra_lib/include/openssl/pqueue.h b/extra_lib/include/openssl/pqueue.h
deleted file mode 100644
index 87fc903..0000000
--- a/extra_lib/include/openssl/pqueue.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/* crypto/pqueue/pqueue.h */
-/* 
- * DTLS implementation written by Nagendra Modadugu
- * (nagendra at cs.stanford.edu) for the OpenSSL project 2005.  
- */
-/* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. 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.
- *
- * 3. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
- *
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
- *    endorse or promote products derived from this software without
- *    prior written permission. For written permission, please contact
- *    openssl-core at OpenSSL.org.
- *
- * 5. Products derived from this software may not be called "OpenSSL"
- *    nor may "OpenSSL" appear in their names without prior written
- *    permission of the OpenSSL Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- *    acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
- *
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
- * EXPRESSED 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 OpenSSL PROJECT OR
- * ITS 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.
- * ====================================================================
- *
- * This product includes cryptographic software written by Eric Young
- * (eay at cryptsoft.com).  This product includes software written by Tim
- * Hudson (tjh at cryptsoft.com).
- *
- */
-
-#ifndef HEADER_PQUEUE_H
-#define HEADER_PQUEUE_H
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-typedef struct _pqueue *pqueue;
-
-typedef struct _pitem
-	{
-	unsigned char priority[8]; /* 64-bit value in big-endian encoding */
-	void *data;
-	struct _pitem *next;
-	} pitem;
-
-typedef struct _pitem *piterator;
-
-pitem *pitem_new(unsigned char *prio64be, void *data);
-void   pitem_free(pitem *item);
-
-pqueue pqueue_new(void);
-void   pqueue_free(pqueue pq);
-
-pitem *pqueue_insert(pqueue pq, pitem *item);
-pitem *pqueue_peek(pqueue pq);
-pitem *pqueue_pop(pqueue pq);
-pitem *pqueue_find(pqueue pq, unsigned char *prio64be);
-pitem *pqueue_iterator(pqueue pq);
-pitem *pqueue_next(piterator *iter);
-
-void   pqueue_print(pqueue pq);
-int    pqueue_size(pqueue pq);
-
-#endif /* ! HEADER_PQUEUE_H */
diff --git a/extra_lib/include/openssl/rand.h b/extra_lib/include/openssl/rand.h
deleted file mode 100644
index ac6c021..0000000
--- a/extra_lib/include/openssl/rand.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/* crypto/rand/rand.h */
-/* Copyright (C) 1995-1998 Eric Young (eay at cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay at cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh at cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay at cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh at cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef HEADER_RAND_H
-#define HEADER_RAND_H
-
-#include <stdlib.h>
-#include <openssl/ossl_typ.h>
-#include <openssl/e_os2.h>
-
-#if defined(OPENSSL_SYS_WINDOWS)
-#include <windows.h>
-#endif
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-#if defined(OPENSSL_FIPS)
-#define FIPS_RAND_SIZE_T size_t
-#endif
-
-/* Already defined in ossl_typ.h */
-/* typedef struct rand_meth_st RAND_METHOD; */
-
-struct rand_meth_st
-	{
-	void (*seed)(const void *buf, int num);
-	int (*bytes)(unsigned char *buf, int num);
-	void (*cleanup)(void);
-	void (*add)(const void *buf, int num, double entropy);
-	int (*pseudorand)(unsigned char *buf, int num);
-	int (*status)(void);
-	};
-
-#ifdef BN_DEBUG
-extern int rand_predictable;
-#endif
-
-int RAND_set_rand_method(const RAND_METHOD *meth);
-const RAND_METHOD *RAND_get_rand_method(void);
-#ifndef OPENSSL_NO_ENGINE
-int RAND_set_rand_engine(ENGINE *engine);
-#endif
-RAND_METHOD *RAND_SSLeay(void);
-void RAND_cleanup(void );
-int  RAND_bytes(unsigned char *buf,int num);
-int  RAND_pseudo_bytes(unsigned char *buf,int num);
-void RAND_seed(const void *buf,int num);
-void RAND_add(const void *buf,int num,double entropy);
-int  RAND_load_file(const char *file,long max_bytes);
-int  RAND_write_file(const char *file);
-const char *RAND_file_name(char *file,size_t num);
-int RAND_status(void);
-int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes);
-int RAND_egd(const char *path);
-int RAND_egd_bytes(const char *path,int bytes);
-int RAND_poll(void);
-
-#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32)
-
-void RAND_screen(void);
-int RAND_event(UINT, WPARAM, LPARAM);
-
-#endif
-
-/* BEGIN ERROR CODES */
-/* The following lines are auto generated by the script mkerr.pl. Any changes
- * made after this point may be overwritten when the script is next run.
- */
-void ERR_load_RAND_strings(void);
-
-/* Error codes for the RAND functions. */
-
-/* Function codes. */
-#define RAND_F_RAND_GET_RAND_METHOD			 101
-#define RAND_F_SSLEAY_RAND_BYTES			 100
-
-/* Reason codes. */
-#define RAND_R_PRNG_NOT_SEEDED				 100
-
-#ifdef  __cplusplus
-}
-#endif
-#endif
diff --git a/extra_lib/include/openssl/rsa.h b/extra_lib/include/openssl/rsa.h
deleted file mode 100644
index cf74343..0000000
--- a/extra_lib/include/openssl/rsa.h
+++ /dev/null
@@ -1,503 +0,0 @@
-/* crypto/rsa/rsa.h */
-/* Copyright (C) 1995-1998 Eric Young (eay at cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay at cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh at cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay at cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh at cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef HEADER_RSA_H
-#define HEADER_RSA_H
-
-#include <openssl/asn1.h>
-
-#ifndef OPENSSL_NO_BIO
-#include <openssl/bio.h>
-#endif
-#include <openssl/crypto.h>
-#include <openssl/ossl_typ.h>
-#ifndef OPENSSL_NO_DEPRECATED
-#include <openssl/bn.h>
-#endif
-
-#ifdef OPENSSL_NO_RSA
-#error RSA is disabled.
-#endif
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-/* Declared already in ossl_typ.h */
-/* typedef struct rsa_st RSA; */
-/* typedef struct rsa_meth_st RSA_METHOD; */
-
-struct rsa_meth_st
-	{
-	const char *name;
-	int (*rsa_pub_enc)(int flen,const unsigned char *from,
-			   unsigned char *to,
-			   RSA *rsa,int padding);
-	int (*rsa_pub_dec)(int flen,const unsigned char *from,
-			   unsigned char *to,
-			   RSA *rsa,int padding);
-	int (*rsa_priv_enc)(int flen,const unsigned char *from,
-			    unsigned char *to,
-			    RSA *rsa,int padding);
-	int (*rsa_priv_dec)(int flen,const unsigned char *from,
-			    unsigned char *to,
-			    RSA *rsa,int padding);
-	int (*rsa_mod_exp)(BIGNUM *r0,const BIGNUM *I,RSA *rsa,BN_CTX *ctx); /* Can be null */
-	int (*bn_mod_exp)(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
-			  const BIGNUM *m, BN_CTX *ctx,
-			  BN_MONT_CTX *m_ctx); /* Can be null */
-	int (*init)(RSA *rsa);		/* called at new */
-	int (*finish)(RSA *rsa);	/* called at free */
-	int flags;			/* RSA_METHOD_FLAG_* things */
-	char *app_data;			/* may be needed! */
-/* New sign and verify functions: some libraries don't allow arbitrary data
- * to be signed/verified: this allows them to be used. Note: for this to work
- * the RSA_public_decrypt() and RSA_private_encrypt() should *NOT* be used
- * RSA_sign(), RSA_verify() should be used instead. Note: for backwards
- * compatibility this functionality is only enabled if the RSA_FLAG_SIGN_VER
- * option is set in 'flags'.
- */
-	int (*rsa_sign)(int type,
-		const unsigned char *m, unsigned int m_length,
-		unsigned char *sigret, unsigned int *siglen, const RSA *rsa);
-	int (*rsa_verify)(int dtype,
-		const unsigned char *m, unsigned int m_length,
-		const unsigned char *sigbuf, unsigned int siglen,
-								const RSA *rsa);
-/* If this callback is NULL, the builtin software RSA key-gen will be used. This
- * is for behavioural compatibility whilst the code gets rewired, but one day
- * it would be nice to assume there are no such things as "builtin software"
- * implementations. */
-	int (*rsa_keygen)(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
-	};
-
-struct rsa_st
-	{
-	/* The first parameter is used to pickup errors where
-	 * this is passed instead of aEVP_PKEY, it is set to 0 */
-	int pad;
-	long version;
-	const RSA_METHOD *meth;
-	/* functional reference if 'meth' is ENGINE-provided */
-	ENGINE *engine;
-	BIGNUM *n;
-	BIGNUM *e;
-	BIGNUM *d;
-	BIGNUM *p;
-	BIGNUM *q;
-	BIGNUM *dmp1;
-	BIGNUM *dmq1;
-	BIGNUM *iqmp;
-	/* be careful using this if the RSA structure is shared */
-	CRYPTO_EX_DATA ex_data;
-	int references;
-	int flags;
-
-	/* Used to cache montgomery values */
-	BN_MONT_CTX *_method_mod_n;
-	BN_MONT_CTX *_method_mod_p;
-	BN_MONT_CTX *_method_mod_q;
-
-	/* all BIGNUM values are actually in the following data, if it is not
-	 * NULL */
-	char *bignum_data;
-	BN_BLINDING *blinding;
-	BN_BLINDING *mt_blinding;
-	};
-
-#ifndef OPENSSL_RSA_MAX_MODULUS_BITS
-# define OPENSSL_RSA_MAX_MODULUS_BITS	16384
-#endif
-
-#ifndef OPENSSL_RSA_SMALL_MODULUS_BITS
-# define OPENSSL_RSA_SMALL_MODULUS_BITS	3072
-#endif
-#ifndef OPENSSL_RSA_MAX_PUBEXP_BITS
-# define OPENSSL_RSA_MAX_PUBEXP_BITS	64 /* exponent limit enforced for "large" modulus only */
-#endif
-
-#define RSA_3	0x3L
-#define RSA_F4	0x10001L
-
-#define RSA_METHOD_FLAG_NO_CHECK	0x0001 /* don't check pub/private match */
-
-#define RSA_FLAG_CACHE_PUBLIC		0x0002
-#define RSA_FLAG_CACHE_PRIVATE		0x0004
-#define RSA_FLAG_BLINDING		0x0008
-#define RSA_FLAG_THREAD_SAFE		0x0010
-/* This flag means the private key operations will be handled by rsa_mod_exp
- * and that they do not depend on the private key components being present:
- * for example a key stored in external hardware. Without this flag bn_mod_exp
- * gets called when private key components are absent.
- */
-#define RSA_FLAG_EXT_PKEY		0x0020
-
-/* This flag in the RSA_METHOD enables the new rsa_sign, rsa_verify functions.
- */
-#define RSA_FLAG_SIGN_VER		0x0040
-
-#define RSA_FLAG_NO_BLINDING		0x0080 /* new with 0.9.6j and 0.9.7b; the built-in
-                                                * RSA implementation now uses blinding by
-                                                * default (ignoring RSA_FLAG_BLINDING),
-                                                * but other engines might not need it
-                                                */
-#define RSA_FLAG_NO_CONSTTIME		0x0100 /* new with 0.9.8f; the built-in RSA
-						* implementation now uses constant time
-						* operations by default in private key operations,
-						* e.g., constant time modular exponentiation, 
-                                                * modular inverse without leaking branches, 
-                                                * division without leaking branches. This 
-                                                * flag disables these constant time 
-                                                * operations and results in faster RSA 
-                                                * private key operations.
-                                                */ 
-#ifndef OPENSSL_NO_DEPRECATED
-#define RSA_FLAG_NO_EXP_CONSTTIME RSA_FLAG_NO_CONSTTIME /* deprecated name for the flag*/
-                                                /* new with 0.9.7h; the built-in RSA
-                                                * implementation now uses constant time
-                                                * modular exponentiation for secret exponents
-                                                * by default. This flag causes the
-                                                * faster variable sliding window method to
-                                                * be used for all exponents.
-                                                */
-#endif
-
-
-#define EVP_PKEY_CTX_set_rsa_padding(ctx, pad) \
-	EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, -1, EVP_PKEY_CTRL_RSA_PADDING, \
-				pad, NULL)
-
-#define EVP_PKEY_CTX_set_rsa_pss_saltlen(ctx, len) \
-	EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, \
-				(EVP_PKEY_OP_SIGN|EVP_PKEY_OP_VERIFY), \
-				EVP_PKEY_CTRL_RSA_PSS_SALTLEN, \
-				len, NULL)
-
-#define EVP_PKEY_CTX_set_rsa_keygen_bits(ctx, bits) \
-	EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_KEYGEN, \
-				EVP_PKEY_CTRL_RSA_KEYGEN_BITS, bits, NULL)
-
-#define EVP_PKEY_CTX_set_rsa_keygen_pubexp(ctx, pubexp) \
-	EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_KEYGEN, \
-				EVP_PKEY_CTRL_RSA_KEYGEN_PUBEXP, 0, pubexp)
-
-#define EVP_PKEY_CTRL_RSA_PADDING	(EVP_PKEY_ALG_CTRL + 1)
-#define EVP_PKEY_CTRL_RSA_PSS_SALTLEN	(EVP_PKEY_ALG_CTRL + 2)
-
-#define EVP_PKEY_CTRL_RSA_KEYGEN_BITS	(EVP_PKEY_ALG_CTRL + 3)
-#define EVP_PKEY_CTRL_RSA_KEYGEN_PUBEXP	(EVP_PKEY_ALG_CTRL + 4)
-
-#define RSA_PKCS1_PADDING	1
-#define RSA_SSLV23_PADDING	2
-#define RSA_NO_PADDING		3
-#define RSA_PKCS1_OAEP_PADDING	4
-#define RSA_X931_PADDING	5
-/* EVP_PKEY_ only */
-#define RSA_PKCS1_PSS_PADDING	6
-
-#define RSA_PKCS1_PADDING_SIZE	11
-
-#define RSA_set_app_data(s,arg)         RSA_set_ex_data(s,0,arg)
-#define RSA_get_app_data(s)             RSA_get_ex_data(s,0)
-
-RSA *	RSA_new(void);
-RSA *	RSA_new_method(ENGINE *engine);
-int	RSA_size(const RSA *);
-
-/* Deprecated version */
-#ifndef OPENSSL_NO_DEPRECATED
-RSA *	RSA_generate_key(int bits, unsigned long e,void
-		(*callback)(int,int,void *),void *cb_arg);
-#endif /* !defined(OPENSSL_NO_DEPRECATED) */
-
-/* New version */
-int	RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
-
-int	RSA_check_key(const RSA *);
-	/* next 4 return -1 on error */
-int	RSA_public_encrypt(int flen, const unsigned char *from,
-		unsigned char *to, RSA *rsa,int padding);
-int	RSA_private_encrypt(int flen, const unsigned char *from,
-		unsigned char *to, RSA *rsa,int padding);
-int	RSA_public_decrypt(int flen, const unsigned char *from, 
-		unsigned char *to, RSA *rsa,int padding);
-int	RSA_private_decrypt(int flen, const unsigned char *from, 
-		unsigned char *to, RSA *rsa,int padding);
-void	RSA_free (RSA *r);
-/* "up" the RSA object's reference count */
-int	RSA_up_ref(RSA *r);
-
-int	RSA_flags(const RSA *r);
-
-void RSA_set_default_method(const RSA_METHOD *meth);
-const RSA_METHOD *RSA_get_default_method(void);
-const RSA_METHOD *RSA_get_method(const RSA *rsa);
-int RSA_set_method(RSA *rsa, const RSA_METHOD *meth);
-
-/* This function needs the memory locking malloc callbacks to be installed */
-int RSA_memory_lock(RSA *r);
-
-/* these are the actual SSLeay RSA functions */
-const RSA_METHOD *RSA_PKCS1_SSLeay(void);
-
-const RSA_METHOD *RSA_null_method(void);
-
-DECLARE_ASN1_ENCODE_FUNCTIONS_const(RSA, RSAPublicKey)
-DECLARE_ASN1_ENCODE_FUNCTIONS_const(RSA, RSAPrivateKey)
-
-#ifndef OPENSSL_NO_FP_API
-int	RSA_print_fp(FILE *fp, const RSA *r,int offset);
-#endif
-
-#ifndef OPENSSL_NO_BIO
-int	RSA_print(BIO *bp, const RSA *r,int offset);
-#endif
-
-#ifndef OPENSSL_NO_RC4
-int i2d_RSA_NET(const RSA *a, unsigned char **pp,
-		int (*cb)(char *buf, int len, const char *prompt, int verify),
-		int sgckey);
-RSA *d2i_RSA_NET(RSA **a, const unsigned char **pp, long length,
-		 int (*cb)(char *buf, int len, const char *prompt, int verify),
-		 int sgckey);
-
-int i2d_Netscape_RSA(const RSA *a, unsigned char **pp,
-		     int (*cb)(char *buf, int len, const char *prompt,
-			       int verify));
-RSA *d2i_Netscape_RSA(RSA **a, const unsigned char **pp, long length,
-		      int (*cb)(char *buf, int len, const char *prompt,
-				int verify));
-#endif
-
-/* The following 2 functions sign and verify a X509_SIG ASN1 object
- * inside PKCS#1 padded RSA encryption */
-int RSA_sign(int type, const unsigned char *m, unsigned int m_length,
-	unsigned char *sigret, unsigned int *siglen, RSA *rsa);
-int RSA_verify(int type, const unsigned char *m, unsigned int m_length,
-	const unsigned char *sigbuf, unsigned int siglen, RSA *rsa);
-
-/* The following 2 function sign and verify a ASN1_OCTET_STRING
- * object inside PKCS#1 padded RSA encryption */
-int RSA_sign_ASN1_OCTET_STRING(int type,
-	const unsigned char *m, unsigned int m_length,
-	unsigned char *sigret, unsigned int *siglen, RSA *rsa);
-int RSA_verify_ASN1_OCTET_STRING(int type,
-	const unsigned char *m, unsigned int m_length,
-	unsigned char *sigbuf, unsigned int siglen, RSA *rsa);
-
-int RSA_blinding_on(RSA *rsa, BN_CTX *ctx);
-void RSA_blinding_off(RSA *rsa);
-BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *ctx);
-
-int RSA_padding_add_PKCS1_type_1(unsigned char *to,int tlen,
-	const unsigned char *f,int fl);
-int RSA_padding_check_PKCS1_type_1(unsigned char *to,int tlen,
-	const unsigned char *f,int fl,int rsa_len);
-int RSA_padding_add_PKCS1_type_2(unsigned char *to,int tlen,
-	const unsigned char *f,int fl);
-int RSA_padding_check_PKCS1_type_2(unsigned char *to,int tlen,
-	const unsigned char *f,int fl,int rsa_len);
-int PKCS1_MGF1(unsigned char *mask, long len,
-	const unsigned char *seed, long seedlen, const EVP_MD *dgst);
-int RSA_padding_add_PKCS1_OAEP(unsigned char *to,int tlen,
-	const unsigned char *f,int fl,
-	const unsigned char *p,int pl);
-int RSA_padding_check_PKCS1_OAEP(unsigned char *to,int tlen,
-	const unsigned char *f,int fl,int rsa_len,
-	const unsigned char *p,int pl);
-int RSA_padding_add_SSLv23(unsigned char *to,int tlen,
-	const unsigned char *f,int fl);
-int RSA_padding_check_SSLv23(unsigned char *to,int tlen,
-	const unsigned char *f,int fl,int rsa_len);
-int RSA_padding_add_none(unsigned char *to,int tlen,
-	const unsigned char *f,int fl);
-int RSA_padding_check_none(unsigned char *to,int tlen,
-	const unsigned char *f,int fl,int rsa_len);
-int RSA_padding_add_X931(unsigned char *to,int tlen,
-	const unsigned char *f,int fl);
-int RSA_padding_check_X931(unsigned char *to,int tlen,
-	const unsigned char *f,int fl,int rsa_len);
-int RSA_X931_hash_id(int nid);
-
-int RSA_verify_PKCS1_PSS(RSA *rsa, const unsigned char *mHash,
-			const EVP_MD *Hash, const unsigned char *EM, int sLen);
-int RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM,
-			const unsigned char *mHash,
-			const EVP_MD *Hash, int sLen);
-
-int RSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
-	CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
-int RSA_set_ex_data(RSA *r,int idx,void *arg);
-void *RSA_get_ex_data(const RSA *r, int idx);
-
-RSA *RSAPublicKey_dup(RSA *rsa);
-RSA *RSAPrivateKey_dup(RSA *rsa);
-
-/* BEGIN ERROR CODES */
-/* The following lines are auto generated by the script mkerr.pl. Any changes
- * made after this point may be overwritten when the script is next run.
- */
-void ERR_load_RSA_strings(void);
-
-/* Error codes for the RSA functions. */
-
-/* Function codes. */
-#define RSA_F_CHECK_PADDING_MD				 140
-#define RSA_F_DO_RSA_PRINT				 146
-#define RSA_F_INT_RSA_VERIFY				 145
-#define RSA_F_MEMORY_LOCK				 100
-#define RSA_F_OLD_RSA_PRIV_DECODE			 147
-#define RSA_F_PKEY_RSA_CTRL				 143
-#define RSA_F_PKEY_RSA_CTRL_STR				 144
-#define RSA_F_PKEY_RSA_SIGN				 142
-#define RSA_F_PKEY_RSA_VERIFYRECOVER			 141
-#define RSA_F_RSA_BUILTIN_KEYGEN			 129
-#define RSA_F_RSA_CHECK_KEY				 123
-#define RSA_F_RSA_EAY_PRIVATE_DECRYPT			 101
-#define RSA_F_RSA_EAY_PRIVATE_ENCRYPT			 102
-#define RSA_F_RSA_EAY_PUBLIC_DECRYPT			 103
-#define RSA_F_RSA_EAY_PUBLIC_ENCRYPT			 104
-#define RSA_F_RSA_GENERATE_KEY				 105
-#define RSA_F_RSA_MEMORY_LOCK				 130
-#define RSA_F_RSA_NEW_METHOD				 106
-#define RSA_F_RSA_NULL					 124
-#define RSA_F_RSA_NULL_MOD_EXP				 131
-#define RSA_F_RSA_NULL_PRIVATE_DECRYPT			 132
-#define RSA_F_RSA_NULL_PRIVATE_ENCRYPT			 133
-#define RSA_F_RSA_NULL_PUBLIC_DECRYPT			 134
-#define RSA_F_RSA_NULL_PUBLIC_ENCRYPT			 135
-#define RSA_F_RSA_PADDING_ADD_NONE			 107
-#define RSA_F_RSA_PADDING_ADD_PKCS1_OAEP		 121
-#define RSA_F_RSA_PADDING_ADD_PKCS1_PSS			 125
-#define RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_1		 108
-#define RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_2		 109
-#define RSA_F_RSA_PADDING_ADD_SSLV23			 110
-#define RSA_F_RSA_PADDING_ADD_X931			 127
-#define RSA_F_RSA_PADDING_CHECK_NONE			 111
-#define RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP		 122
-#define RSA_F_RSA_PADDING_CHECK_PKCS1_TYPE_1		 112
-#define RSA_F_RSA_PADDING_CHECK_PKCS1_TYPE_2		 113
-#define RSA_F_RSA_PADDING_CHECK_SSLV23			 114
-#define RSA_F_RSA_PADDING_CHECK_X931			 128
-#define RSA_F_RSA_PRINT					 115
-#define RSA_F_RSA_PRINT_FP				 116
-#define RSA_F_RSA_PRIV_DECODE				 137
-#define RSA_F_RSA_PRIV_ENCODE				 138
-#define RSA_F_RSA_PUB_DECODE				 139
-#define RSA_F_RSA_SETUP_BLINDING			 136
-#define RSA_F_RSA_SIGN					 117
-#define RSA_F_RSA_SIGN_ASN1_OCTET_STRING		 118
-#define RSA_F_RSA_VERIFY				 119
-#define RSA_F_RSA_VERIFY_ASN1_OCTET_STRING		 120
-#define RSA_F_RSA_VERIFY_PKCS1_PSS			 126
-
-/* Reason codes. */
-#define RSA_R_ALGORITHM_MISMATCH			 100
-#define RSA_R_BAD_E_VALUE				 101
-#define RSA_R_BAD_FIXED_HEADER_DECRYPT			 102
-#define RSA_R_BAD_PAD_BYTE_COUNT			 103
-#define RSA_R_BAD_SIGNATURE				 104
-#define RSA_R_BLOCK_TYPE_IS_NOT_01			 106
-#define RSA_R_BLOCK_TYPE_IS_NOT_02			 107
-#define RSA_R_DATA_GREATER_THAN_MOD_LEN			 108
-#define RSA_R_DATA_TOO_LARGE				 109
-#define RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE		 110
-#define RSA_R_DATA_TOO_LARGE_FOR_MODULUS		 132
-#define RSA_R_DATA_TOO_SMALL				 111
-#define RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE		 122
-#define RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY		 112
-#define RSA_R_DMP1_NOT_CONGRUENT_TO_D			 124
-#define RSA_R_DMQ1_NOT_CONGRUENT_TO_D			 125
-#define RSA_R_D_E_NOT_CONGRUENT_TO_1			 123
-#define RSA_R_FIRST_OCTET_INVALID			 133
-#define RSA_R_ILLEGAL_OR_UNSUPPORTED_PADDING_MODE	 144
-#define RSA_R_INVALID_DIGEST_LENGTH			 143
-#define RSA_R_INVALID_HEADER				 137
-#define RSA_R_INVALID_KEYBITS				 145
-#define RSA_R_INVALID_MESSAGE_LENGTH			 131
-#define RSA_R_INVALID_PADDING				 138
-#define RSA_R_INVALID_PADDING_MODE			 141
-#define RSA_R_INVALID_PSS_SALTLEN			 146
-#define RSA_R_INVALID_TRAILER				 139
-#define RSA_R_INVALID_X931_DIGEST			 142
-#define RSA_R_IQMP_NOT_INVERSE_OF_Q			 126
-#define RSA_R_KEY_SIZE_TOO_SMALL			 120
-#define RSA_R_LAST_OCTET_INVALID			 134
-#define RSA_R_MODULUS_TOO_LARGE				 105
-#define RSA_R_NO_PUBLIC_EXPONENT			 140
-#define RSA_R_NULL_BEFORE_BLOCK_MISSING			 113
-#define RSA_R_N_DOES_NOT_EQUAL_P_Q			 127
-#define RSA_R_OAEP_DECODING_ERROR			 121
-#define RSA_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE	 148
-#define RSA_R_PADDING_CHECK_FAILED			 114
-#define RSA_R_P_NOT_PRIME				 128
-#define RSA_R_Q_NOT_PRIME				 129
-#define RSA_R_RSA_OPERATIONS_NOT_SUPPORTED		 130
-#define RSA_R_SLEN_CHECK_FAILED				 136
-#define RSA_R_SLEN_RECOVERY_FAILED			 135
-#define RSA_R_SSLV3_ROLLBACK_ATTACK			 115
-#define RSA_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD 116
-#define RSA_R_UNKNOWN_ALGORITHM_TYPE			 117
-#define RSA_R_UNKNOWN_PADDING_TYPE			 118
-#define RSA_R_VALUE_MISSING				 147
-#define RSA_R_WRONG_SIGNATURE_LENGTH			 119
-
-#ifdef  __cplusplus
-}
-#endif
-#endif
diff --git a/extra_lib/include/openssl/safestack.h b/extra_lib/include/openssl/safestack.h
deleted file mode 100644
index 39914bd..0000000
--- a/extra_lib/include/openssl/safestack.h
+++ /dev/null
@@ -1,2575 +0,0 @@
-/* ====================================================================
- * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. 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.
- *
- * 3. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
- *
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
- *    endorse or promote products derived from this software without
- *    prior written permission. For written permission, please contact
- *    openssl-core at openssl.org.
- *
- * 5. Products derived from this software may not be called "OpenSSL"
- *    nor may "OpenSSL" appear in their names without prior written
- *    permission of the OpenSSL Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- *    acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
- *
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
- * EXPRESSED 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 OpenSSL PROJECT OR
- * ITS 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.
- * ====================================================================
- *
- * This product includes cryptographic software written by Eric Young
- * (eay at cryptsoft.com).  This product includes software written by Tim
- * Hudson (tjh at cryptsoft.com).
- *
- */
-
-#ifndef HEADER_SAFESTACK_H
-#define HEADER_SAFESTACK_H
-
-#include <openssl/stack.h>
-
-#ifndef CHECKED_PTR_OF
-#define CHECKED_PTR_OF(type, p) \
-    ((void*) (1 ? p : (type*)0))
-#endif
-
-/* In C++ we get problems because an explicit cast is needed from (void *)
- * we use CHECKED_STACK_OF to ensure the correct type is passed in the macros
- * below. 
- */
-
-#define CHECKED_STACK_OF(type, p) \
-    ((_STACK*) (1 ? p : (STACK_OF(type)*)0))
-
-#define CHECKED_SK_FREE_FUNC(type, p) \
-    ((void (*)(void *)) ((1 ? p : (void (*)(type *))0)))
-
-#define CHECKED_SK_FREE_FUNC2(type, p) \
-    ((void (*)(void *)) ((1 ? p : (void (*)(type))0)))
-
-#define CHECKED_SK_CMP_FUNC(type, p) \
-    ((int (*)(const void *, const void *)) \
-	((1 ? p : (int (*)(const type * const *, const type * const *))0)))
-
-#define STACK_OF(type) struct stack_st_##type
-#define PREDECLARE_STACK_OF(type) STACK_OF(type);
-
-#define DECLARE_STACK_OF(type) \
-STACK_OF(type) \
-    { \
-    _STACK stack; \
-    };
-#define DECLARE_SPECIAL_STACK_OF(type, type2) \
-STACK_OF(type) \
-    { \
-    _STACK stack; \
-    };
-
-#define IMPLEMENT_STACK_OF(type) /* nada (obsolete in new safestack approach)*/
-
-
-/* Strings are special: normally an lhash entry will point to a single
- * (somewhat) mutable object. In the case of strings:
- *
- * a) Instead of a single char, there is an array of chars, NUL-terminated.
- * b) The string may have be immutable.
- *
- * So, they need their own declarations. Especially important for
- * type-checking tools, such as Deputy.
- *
-o * In practice, however, it appears to be hard to have a const
- * string. For now, I'm settling for dealing with the fact it is a
- * string at all.
- */
-typedef char *OPENSSL_STRING;
-
-typedef const char *OPENSSL_CSTRING;
-
-/* Confusingly, LHASH_OF(STRING) deals with char ** throughout, but
- * STACK_OF(STRING) is really more like STACK_OF(char), only, as
- * mentioned above, instead of a single char each entry is a
- * NUL-terminated array of chars. So, we have to implement STRING
- * specially for STACK_OF. This is dealt with in the autogenerated
- * macros below.
- */
-
-DECLARE_SPECIAL_STACK_OF(OPENSSL_STRING, char)
-
-/* Similarly, we sometimes use a block of characters, NOT
- * nul-terminated. These should also be distinguished from "normal"
- * stacks. */
-
-typedef void *OPENSSL_BLOCK;
-DECLARE_SPECIAL_STACK_OF(OPENSSL_BLOCK, void)
-
-/* SKM_sk_... stack macros are internal to safestack.h:
- * never use them directly, use sk_<type>_... instead */
-#define SKM_sk_new(type, cmp) \
-	((STACK_OF(type) *)sk_new(CHECKED_SK_CMP_FUNC(type, cmp)))
-#define SKM_sk_new_null(type) \
-	((STACK_OF(type) *)sk_new_null())
-#define SKM_sk_free(type, st) \
-	sk_free(CHECKED_STACK_OF(type, st))
-#define SKM_sk_num(type, st) \
-	sk_num(CHECKED_STACK_OF(type, st))
-#define SKM_sk_value(type, st,i) \
-	((type *)sk_value(CHECKED_STACK_OF(type, st), i))
-#define SKM_sk_set(type, st,i,val) \
-	sk_set(CHECKED_STACK_OF(type, st), i, CHECKED_PTR_OF(type, val))
-#define SKM_sk_zero(type, st) \
-	sk_zero(CHECKED_STACK_OF(type, st))
-#define SKM_sk_push(type, st, val) \
-	sk_push(CHECKED_STACK_OF(type, st), CHECKED_PTR_OF(type, val))
-#define SKM_sk_unshift(type, st, val) \
-	sk_unshift(CHECKED_STACK_OF(type, st), CHECKED_PTR_OF(type, val))
-#define SKM_sk_find(type, st, val) \
-	sk_find(CHECKED_STACK_OF(type, st), CHECKED_PTR_OF(type, val))
-#define SKM_sk_find_ex(type, st, val) \
-	sk_find_ex(CHECKED_STACK_OF(type, st), \
-		   CHECKED_PTR_OF(type, val))
-#define SKM_sk_delete(type, st, i) \
-	(type *)sk_delete(CHECKED_STACK_OF(type, st), i)
-#define SKM_sk_delete_ptr(type, st, ptr) \
-	(type *)sk_delete_ptr(CHECKED_STACK_OF(type, st), CHECKED_PTR_OF(type, ptr))
-#define SKM_sk_insert(type, st,val, i) \
-	sk_insert(CHECKED_STACK_OF(type, st), CHECKED_PTR_OF(type, val), i)
-#define SKM_sk_set_cmp_func(type, st, cmp) \
-	((int (*)(const type * const *,const type * const *)) \
-	sk_set_cmp_func(CHECKED_STACK_OF(type, st), CHECKED_SK_CMP_FUNC(type, cmp)))
-#define SKM_sk_dup(type, st) \
-	(STACK_OF(type) *)sk_dup(CHECKED_STACK_OF(type, st))
-#define SKM_sk_pop_free(type, st, free_func) \
-	sk_pop_free(CHECKED_STACK_OF(type, st), CHECKED_SK_FREE_FUNC(type, free_func))
-#define SKM_sk_shift(type, st) \
-	(type *)sk_shift(CHECKED_STACK_OF(type, st))
-#define SKM_sk_pop(type, st) \
-	(type *)sk_pop(CHECKED_STACK_OF(type, st))
-#define SKM_sk_sort(type, st) \
-	sk_sort(CHECKED_STACK_OF(type, st))
-#define SKM_sk_is_sorted(type, st) \
-	sk_is_sorted(CHECKED_STACK_OF(type, st))
-
-#define	SKM_ASN1_SET_OF_d2i(type, st, pp, length, d2i_func, free_func, ex_tag, ex_class) \
-  (STACK_OF(type) *)d2i_ASN1_SET( \
-				(STACK_OF(OPENSSL_BLOCK) **)CHECKED_PTR_OF(STACK_OF(type)*, st), \
-				pp, length, \
-				CHECKED_D2I_OF(type, d2i_func), \
-				CHECKED_SK_FREE_FUNC(type, free_func), \
-				ex_tag, ex_class)
-
-#define	SKM_ASN1_SET_OF_i2d(type, st, pp, i2d_func, ex_tag, ex_class, is_set) \
-  i2d_ASN1_SET((STACK_OF(OPENSSL_BLOCK) *)CHECKED_STACK_OF(type, st), pp, \
-				CHECKED_I2D_OF(type, i2d_func), \
-				ex_tag, ex_class, is_set)
-
-#define	SKM_ASN1_seq_pack(type, st, i2d_func, buf, len) \
-	ASN1_seq_pack(CHECKED_PTR_OF(STACK_OF(type), st), \
-			CHECKED_I2D_OF(type, i2d_func), buf, len)
-
-#define	SKM_ASN1_seq_unpack(type, buf, len, d2i_func, free_func) \
-	(STACK_OF(type) *)ASN1_seq_unpack(buf, len, CHECKED_D2I_OF(type, d2i_func), CHECKED_SK_FREE_FUNC(type, free_func))
-
-#define SKM_PKCS12_decrypt_d2i(type, algor, d2i_func, free_func, pass, passlen, oct, seq) \
-	(STACK_OF(type) *)PKCS12_decrypt_d2i(algor, \
-				CHECKED_D2I_OF(type, d2i_func), \
-				CHECKED_SK_FREE_FUNC(type, free_func), \
-				pass, passlen, oct, seq)
-
-/* This block of defines is updated by util/mkstack.pl, please do not touch! */
-#define sk_ACCESS_DESCRIPTION_new(cmp) SKM_sk_new(ACCESS_DESCRIPTION, (cmp))
-#define sk_ACCESS_DESCRIPTION_new_null() SKM_sk_new_null(ACCESS_DESCRIPTION)
-#define sk_ACCESS_DESCRIPTION_free(st) SKM_sk_free(ACCESS_DESCRIPTION, (st))
-#define sk_ACCESS_DESCRIPTION_num(st) SKM_sk_num(ACCESS_DESCRIPTION, (st))
-#define sk_ACCESS_DESCRIPTION_value(st, i) SKM_sk_value(ACCESS_DESCRIPTION, (st), (i))
-#define sk_ACCESS_DESCRIPTION_set(st, i, val) SKM_sk_set(ACCESS_DESCRIPTION, (st), (i), (val))
-#define sk_ACCESS_DESCRIPTION_zero(st) SKM_sk_zero(ACCESS_DESCRIPTION, (st))
-#define sk_ACCESS_DESCRIPTION_push(st, val) SKM_sk_push(ACCESS_DESCRIPTION, (st), (val))
-#define sk_ACCESS_DESCRIPTION_unshift(st, val) SKM_sk_unshift(ACCESS_DESCRIPTION, (st), (val))
-#define sk_ACCESS_DESCRIPTION_find(st, val) SKM_sk_find(ACCESS_DESCRIPTION, (st), (val))
-#define sk_ACCESS_DESCRIPTION_find_ex(st, val) SKM_sk_find_ex(ACCESS_DESCRIPTION, (st), (val))
-#define sk_ACCESS_DESCRIPTION_delete(st, i) SKM_sk_delete(ACCESS_DESCRIPTION, (st), (i))
-#define sk_ACCESS_DESCRIPTION_delete_ptr(st, ptr) SKM_sk_delete_ptr(ACCESS_DESCRIPTION, (st), (ptr))
-#define sk_ACCESS_DESCRIPTION_insert(st, val, i) SKM_sk_insert(ACCESS_DESCRIPTION, (st), (val), (i))
-#define sk_ACCESS_DESCRIPTION_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ACCESS_DESCRIPTION, (st), (cmp))
-#define sk_ACCESS_DESCRIPTION_dup(st) SKM_sk_dup(ACCESS_DESCRIPTION, st)
-#define sk_ACCESS_DESCRIPTION_pop_free(st, free_func) SKM_sk_pop_free(ACCESS_DESCRIPTION, (st), (free_func))
-#define sk_ACCESS_DESCRIPTION_shift(st) SKM_sk_shift(ACCESS_DESCRIPTION, (st))
-#define sk_ACCESS_DESCRIPTION_pop(st) SKM_sk_pop(ACCESS_DESCRIPTION, (st))
-#define sk_ACCESS_DESCRIPTION_sort(st) SKM_sk_sort(ACCESS_DESCRIPTION, (st))
-#define sk_ACCESS_DESCRIPTION_is_sorted(st) SKM_sk_is_sorted(ACCESS_DESCRIPTION, (st))
-
-#define sk_ASIdOrRange_new(cmp) SKM_sk_new(ASIdOrRange, (cmp))
-#define sk_ASIdOrRange_new_null() SKM_sk_new_null(ASIdOrRange)
-#define sk_ASIdOrRange_free(st) SKM_sk_free(ASIdOrRange, (st))
-#define sk_ASIdOrRange_num(st) SKM_sk_num(ASIdOrRange, (st))
-#define sk_ASIdOrRange_value(st, i) SKM_sk_value(ASIdOrRange, (st), (i))
-#define sk_ASIdOrRange_set(st, i, val) SKM_sk_set(ASIdOrRange, (st), (i), (val))
-#define sk_ASIdOrRange_zero(st) SKM_sk_zero(ASIdOrRange, (st))
-#define sk_ASIdOrRange_push(st, val) SKM_sk_push(ASIdOrRange, (st), (val))
-#define sk_ASIdOrRange_unshift(st, val) SKM_sk_unshift(ASIdOrRange, (st), (val))
-#define sk_ASIdOrRange_find(st, val) SKM_sk_find(ASIdOrRange, (st), (val))
-#define sk_ASIdOrRange_find_ex(st, val) SKM_sk_find_ex(ASIdOrRange, (st), (val))
-#define sk_ASIdOrRange_delete(st, i) SKM_sk_delete(ASIdOrRange, (st), (i))
-#define sk_ASIdOrRange_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASIdOrRange, (st), (ptr))
-#define sk_ASIdOrRange_insert(st, val, i) SKM_sk_insert(ASIdOrRange, (st), (val), (i))
-#define sk_ASIdOrRange_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASIdOrRange, (st), (cmp))
-#define sk_ASIdOrRange_dup(st) SKM_sk_dup(ASIdOrRange, st)
-#define sk_ASIdOrRange_pop_free(st, free_func) SKM_sk_pop_free(ASIdOrRange, (st), (free_func))
-#define sk_ASIdOrRange_shift(st) SKM_sk_shift(ASIdOrRange, (st))
-#define sk_ASIdOrRange_pop(st) SKM_sk_pop(ASIdOrRange, (st))
-#define sk_ASIdOrRange_sort(st) SKM_sk_sort(ASIdOrRange, (st))
-#define sk_ASIdOrRange_is_sorted(st) SKM_sk_is_sorted(ASIdOrRange, (st))
-
-#define sk_ASN1_GENERALSTRING_new(cmp) SKM_sk_new(ASN1_GENERALSTRING, (cmp))
-#define sk_ASN1_GENERALSTRING_new_null() SKM_sk_new_null(ASN1_GENERALSTRING)
-#define sk_ASN1_GENERALSTRING_free(st) SKM_sk_free(ASN1_GENERALSTRING, (st))
-#define sk_ASN1_GENERALSTRING_num(st) SKM_sk_num(ASN1_GENERALSTRING, (st))
-#define sk_ASN1_GENERALSTRING_value(st, i) SKM_sk_value(ASN1_GENERALSTRING, (st), (i))
-#define sk_ASN1_GENERALSTRING_set(st, i, val) SKM_sk_set(ASN1_GENERALSTRING, (st), (i), (val))
-#define sk_ASN1_GENERALSTRING_zero(st) SKM_sk_zero(ASN1_GENERALSTRING, (st))
-#define sk_ASN1_GENERALSTRING_push(st, val) SKM_sk_push(ASN1_GENERALSTRING, (st), (val))
-#define sk_ASN1_GENERALSTRING_unshift(st, val) SKM_sk_unshift(ASN1_GENERALSTRING, (st), (val))
-#define sk_ASN1_GENERALSTRING_find(st, val) SKM_sk_find(ASN1_GENERALSTRING, (st), (val))
-#define sk_ASN1_GENERALSTRING_find_ex(st, val) SKM_sk_find_ex(ASN1_GENERALSTRING, (st), (val))
-#define sk_ASN1_GENERALSTRING_delete(st, i) SKM_sk_delete(ASN1_GENERALSTRING, (st), (i))
-#define sk_ASN1_GENERALSTRING_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASN1_GENERALSTRING, (st), (ptr))
-#define sk_ASN1_GENERALSTRING_insert(st, val, i) SKM_sk_insert(ASN1_GENERALSTRING, (st), (val), (i))
-#define sk_ASN1_GENERALSTRING_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASN1_GENERALSTRING, (st), (cmp))
-#define sk_ASN1_GENERALSTRING_dup(st) SKM_sk_dup(ASN1_GENERALSTRING, st)
-#define sk_ASN1_GENERALSTRING_pop_free(st, free_func) SKM_sk_pop_free(ASN1_GENERALSTRING, (st), (free_func))
-#define sk_ASN1_GENERALSTRING_shift(st) SKM_sk_shift(ASN1_GENERALSTRING, (st))
-#define sk_ASN1_GENERALSTRING_pop(st) SKM_sk_pop(ASN1_GENERALSTRING, (st))
-#define sk_ASN1_GENERALSTRING_sort(st) SKM_sk_sort(ASN1_GENERALSTRING, (st))
-#define sk_ASN1_GENERALSTRING_is_sorted(st) SKM_sk_is_sorted(ASN1_GENERALSTRING, (st))
-
-#define sk_ASN1_INTEGER_new(cmp) SKM_sk_new(ASN1_INTEGER, (cmp))
-#define sk_ASN1_INTEGER_new_null() SKM_sk_new_null(ASN1_INTEGER)
-#define sk_ASN1_INTEGER_free(st) SKM_sk_free(ASN1_INTEGER, (st))
-#define sk_ASN1_INTEGER_num(st) SKM_sk_num(ASN1_INTEGER, (st))
-#define sk_ASN1_INTEGER_value(st, i) SKM_sk_value(ASN1_INTEGER, (st), (i))
-#define sk_ASN1_INTEGER_set(st, i, val) SKM_sk_set(ASN1_INTEGER, (st), (i), (val))
-#define sk_ASN1_INTEGER_zero(st) SKM_sk_zero(ASN1_INTEGER, (st))
-#define sk_ASN1_INTEGER_push(st, val) SKM_sk_push(ASN1_INTEGER, (st), (val))
-#define sk_ASN1_INTEGER_unshift(st, val) SKM_sk_unshift(ASN1_INTEGER, (st), (val))
-#define sk_ASN1_INTEGER_find(st, val) SKM_sk_find(ASN1_INTEGER, (st), (val))
-#define sk_ASN1_INTEGER_find_ex(st, val) SKM_sk_find_ex(ASN1_INTEGER, (st), (val))
-#define sk_ASN1_INTEGER_delete(st, i) SKM_sk_delete(ASN1_INTEGER, (st), (i))
-#define sk_ASN1_INTEGER_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASN1_INTEGER, (st), (ptr))
-#define sk_ASN1_INTEGER_insert(st, val, i) SKM_sk_insert(ASN1_INTEGER, (st), (val), (i))
-#define sk_ASN1_INTEGER_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASN1_INTEGER, (st), (cmp))
-#define sk_ASN1_INTEGER_dup(st) SKM_sk_dup(ASN1_INTEGER, st)
-#define sk_ASN1_INTEGER_pop_free(st, free_func) SKM_sk_pop_free(ASN1_INTEGER, (st), (free_func))
-#define sk_ASN1_INTEGER_shift(st) SKM_sk_shift(ASN1_INTEGER, (st))
-#define sk_ASN1_INTEGER_pop(st) SKM_sk_pop(ASN1_INTEGER, (st))
-#define sk_ASN1_INTEGER_sort(st) SKM_sk_sort(ASN1_INTEGER, (st))
-#define sk_ASN1_INTEGER_is_sorted(st) SKM_sk_is_sorted(ASN1_INTEGER, (st))
-
-#define sk_ASN1_OBJECT_new(cmp) SKM_sk_new(ASN1_OBJECT, (cmp))
-#define sk_ASN1_OBJECT_new_null() SKM_sk_new_null(ASN1_OBJECT)
-#define sk_ASN1_OBJECT_free(st) SKM_sk_free(ASN1_OBJECT, (st))
-#define sk_ASN1_OBJECT_num(st) SKM_sk_num(ASN1_OBJECT, (st))
-#define sk_ASN1_OBJECT_value(st, i) SKM_sk_value(ASN1_OBJECT, (st), (i))
-#define sk_ASN1_OBJECT_set(st, i, val) SKM_sk_set(ASN1_OBJECT, (st), (i), (val))
-#define sk_ASN1_OBJECT_zero(st) SKM_sk_zero(ASN1_OBJECT, (st))
-#define sk_ASN1_OBJECT_push(st, val) SKM_sk_push(ASN1_OBJECT, (st), (val))
-#define sk_ASN1_OBJECT_unshift(st, val) SKM_sk_unshift(ASN1_OBJECT, (st), (val))
-#define sk_ASN1_OBJECT_find(st, val) SKM_sk_find(ASN1_OBJECT, (st), (val))
-#define sk_ASN1_OBJECT_find_ex(st, val) SKM_sk_find_ex(ASN1_OBJECT, (st), (val))
-#define sk_ASN1_OBJECT_delete(st, i) SKM_sk_delete(ASN1_OBJECT, (st), (i))
-#define sk_ASN1_OBJECT_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASN1_OBJECT, (st), (ptr))
-#define sk_ASN1_OBJECT_insert(st, val, i) SKM_sk_insert(ASN1_OBJECT, (st), (val), (i))
-#define sk_ASN1_OBJECT_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASN1_OBJECT, (st), (cmp))
-#define sk_ASN1_OBJECT_dup(st) SKM_sk_dup(ASN1_OBJECT, st)
-#define sk_ASN1_OBJECT_pop_free(st, free_func) SKM_sk_pop_free(ASN1_OBJECT, (st), (free_func))
-#define sk_ASN1_OBJECT_shift(st) SKM_sk_shift(ASN1_OBJECT, (st))
-#define sk_ASN1_OBJECT_pop(st) SKM_sk_pop(ASN1_OBJECT, (st))
-#define sk_ASN1_OBJECT_sort(st) SKM_sk_sort(ASN1_OBJECT, (st))
-#define sk_ASN1_OBJECT_is_sorted(st) SKM_sk_is_sorted(ASN1_OBJECT, (st))
-
-#define sk_ASN1_STRING_TABLE_new(cmp) SKM_sk_new(ASN1_STRING_TABLE, (cmp))
-#define sk_ASN1_STRING_TABLE_new_null() SKM_sk_new_null(ASN1_STRING_TABLE)
-#define sk_ASN1_STRING_TABLE_free(st) SKM_sk_free(ASN1_STRING_TABLE, (st))
-#define sk_ASN1_STRING_TABLE_num(st) SKM_sk_num(ASN1_STRING_TABLE, (st))
-#define sk_ASN1_STRING_TABLE_value(st, i) SKM_sk_value(ASN1_STRING_TABLE, (st), (i))
-#define sk_ASN1_STRING_TABLE_set(st, i, val) SKM_sk_set(ASN1_STRING_TABLE, (st), (i), (val))
-#define sk_ASN1_STRING_TABLE_zero(st) SKM_sk_zero(ASN1_STRING_TABLE, (st))
-#define sk_ASN1_STRING_TABLE_push(st, val) SKM_sk_push(ASN1_STRING_TABLE, (st), (val))
-#define sk_ASN1_STRING_TABLE_unshift(st, val) SKM_sk_unshift(ASN1_STRING_TABLE, (st), (val))
-#define sk_ASN1_STRING_TABLE_find(st, val) SKM_sk_find(ASN1_STRING_TABLE, (st), (val))
-#define sk_ASN1_STRING_TABLE_find_ex(st, val) SKM_sk_find_ex(ASN1_STRING_TABLE, (st), (val))
-#define sk_ASN1_STRING_TABLE_delete(st, i) SKM_sk_delete(ASN1_STRING_TABLE, (st), (i))
-#define sk_ASN1_STRING_TABLE_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASN1_STRING_TABLE, (st), (ptr))
-#define sk_ASN1_STRING_TABLE_insert(st, val, i) SKM_sk_insert(ASN1_STRING_TABLE, (st), (val), (i))
-#define sk_ASN1_STRING_TABLE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASN1_STRING_TABLE, (st), (cmp))
-#define sk_ASN1_STRING_TABLE_dup(st) SKM_sk_dup(ASN1_STRING_TABLE, st)
-#define sk_ASN1_STRING_TABLE_pop_free(st, free_func) SKM_sk_pop_free(ASN1_STRING_TABLE, (st), (free_func))
-#define sk_ASN1_STRING_TABLE_shift(st) SKM_sk_shift(ASN1_STRING_TABLE, (st))
-#define sk_ASN1_STRING_TABLE_pop(st) SKM_sk_pop(ASN1_STRING_TABLE, (st))
-#define sk_ASN1_STRING_TABLE_sort(st) SKM_sk_sort(ASN1_STRING_TABLE, (st))
-#define sk_ASN1_STRING_TABLE_is_sorted(st) SKM_sk_is_sorted(ASN1_STRING_TABLE, (st))
-
-#define sk_ASN1_TYPE_new(cmp) SKM_sk_new(ASN1_TYPE, (cmp))
-#define sk_ASN1_TYPE_new_null() SKM_sk_new_null(ASN1_TYPE)
-#define sk_ASN1_TYPE_free(st) SKM_sk_free(ASN1_TYPE, (st))
-#define sk_ASN1_TYPE_num(st) SKM_sk_num(ASN1_TYPE, (st))
-#define sk_ASN1_TYPE_value(st, i) SKM_sk_value(ASN1_TYPE, (st), (i))
-#define sk_ASN1_TYPE_set(st, i, val) SKM_sk_set(ASN1_TYPE, (st), (i), (val))
-#define sk_ASN1_TYPE_zero(st) SKM_sk_zero(ASN1_TYPE, (st))
-#define sk_ASN1_TYPE_push(st, val) SKM_sk_push(ASN1_TYPE, (st), (val))
-#define sk_ASN1_TYPE_unshift(st, val) SKM_sk_unshift(ASN1_TYPE, (st), (val))
-#define sk_ASN1_TYPE_find(st, val) SKM_sk_find(ASN1_TYPE, (st), (val))
-#define sk_ASN1_TYPE_find_ex(st, val) SKM_sk_find_ex(ASN1_TYPE, (st), (val))
-#define sk_ASN1_TYPE_delete(st, i) SKM_sk_delete(ASN1_TYPE, (st), (i))
-#define sk_ASN1_TYPE_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASN1_TYPE, (st), (ptr))
-#define sk_ASN1_TYPE_insert(st, val, i) SKM_sk_insert(ASN1_TYPE, (st), (val), (i))
-#define sk_ASN1_TYPE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASN1_TYPE, (st), (cmp))
-#define sk_ASN1_TYPE_dup(st) SKM_sk_dup(ASN1_TYPE, st)
-#define sk_ASN1_TYPE_pop_free(st, free_func) SKM_sk_pop_free(ASN1_TYPE, (st), (free_func))
-#define sk_ASN1_TYPE_shift(st) SKM_sk_shift(ASN1_TYPE, (st))
-#define sk_ASN1_TYPE_pop(st) SKM_sk_pop(ASN1_TYPE, (st))
-#define sk_ASN1_TYPE_sort(st) SKM_sk_sort(ASN1_TYPE, (st))
-#define sk_ASN1_TYPE_is_sorted(st) SKM_sk_is_sorted(ASN1_TYPE, (st))
-
-#define sk_ASN1_UTF8STRING_new(cmp) SKM_sk_new(ASN1_UTF8STRING, (cmp))
-#define sk_ASN1_UTF8STRING_new_null() SKM_sk_new_null(ASN1_UTF8STRING)
-#define sk_ASN1_UTF8STRING_free(st) SKM_sk_free(ASN1_UTF8STRING, (st))
-#define sk_ASN1_UTF8STRING_num(st) SKM_sk_num(ASN1_UTF8STRING, (st))
-#define sk_ASN1_UTF8STRING_value(st, i) SKM_sk_value(ASN1_UTF8STRING, (st), (i))
-#define sk_ASN1_UTF8STRING_set(st, i, val) SKM_sk_set(ASN1_UTF8STRING, (st), (i), (val))
-#define sk_ASN1_UTF8STRING_zero(st) SKM_sk_zero(ASN1_UTF8STRING, (st))
-#define sk_ASN1_UTF8STRING_push(st, val) SKM_sk_push(ASN1_UTF8STRING, (st), (val))
-#define sk_ASN1_UTF8STRING_unshift(st, val) SKM_sk_unshift(ASN1_UTF8STRING, (st), (val))
-#define sk_ASN1_UTF8STRING_find(st, val) SKM_sk_find(ASN1_UTF8STRING, (st), (val))
-#define sk_ASN1_UTF8STRING_find_ex(st, val) SKM_sk_find_ex(ASN1_UTF8STRING, (st), (val))
-#define sk_ASN1_UTF8STRING_delete(st, i) SKM_sk_delete(ASN1_UTF8STRING, (st), (i))
-#define sk_ASN1_UTF8STRING_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASN1_UTF8STRING, (st), (ptr))
-#define sk_ASN1_UTF8STRING_insert(st, val, i) SKM_sk_insert(ASN1_UTF8STRING, (st), (val), (i))
-#define sk_ASN1_UTF8STRING_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASN1_UTF8STRING, (st), (cmp))
-#define sk_ASN1_UTF8STRING_dup(st) SKM_sk_dup(ASN1_UTF8STRING, st)
-#define sk_ASN1_UTF8STRING_pop_free(st, free_func) SKM_sk_pop_free(ASN1_UTF8STRING, (st), (free_func))
-#define sk_ASN1_UTF8STRING_shift(st) SKM_sk_shift(ASN1_UTF8STRING, (st))
-#define sk_ASN1_UTF8STRING_pop(st) SKM_sk_pop(ASN1_UTF8STRING, (st))
-#define sk_ASN1_UTF8STRING_sort(st) SKM_sk_sort(ASN1_UTF8STRING, (st))
-#define sk_ASN1_UTF8STRING_is_sorted(st) SKM_sk_is_sorted(ASN1_UTF8STRING, (st))
-
-#define sk_ASN1_VALUE_new(cmp) SKM_sk_new(ASN1_VALUE, (cmp))
-#define sk_ASN1_VALUE_new_null() SKM_sk_new_null(ASN1_VALUE)
-#define sk_ASN1_VALUE_free(st) SKM_sk_free(ASN1_VALUE, (st))
-#define sk_ASN1_VALUE_num(st) SKM_sk_num(ASN1_VALUE, (st))
-#define sk_ASN1_VALUE_value(st, i) SKM_sk_value(ASN1_VALUE, (st), (i))
-#define sk_ASN1_VALUE_set(st, i, val) SKM_sk_set(ASN1_VALUE, (st), (i), (val))
-#define sk_ASN1_VALUE_zero(st) SKM_sk_zero(ASN1_VALUE, (st))
-#define sk_ASN1_VALUE_push(st, val) SKM_sk_push(ASN1_VALUE, (st), (val))
-#define sk_ASN1_VALUE_unshift(st, val) SKM_sk_unshift(ASN1_VALUE, (st), (val))
-#define sk_ASN1_VALUE_find(st, val) SKM_sk_find(ASN1_VALUE, (st), (val))
-#define sk_ASN1_VALUE_find_ex(st, val) SKM_sk_find_ex(ASN1_VALUE, (st), (val))
-#define sk_ASN1_VALUE_delete(st, i) SKM_sk_delete(ASN1_VALUE, (st), (i))
-#define sk_ASN1_VALUE_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASN1_VALUE, (st), (ptr))
-#define sk_ASN1_VALUE_insert(st, val, i) SKM_sk_insert(ASN1_VALUE, (st), (val), (i))
-#define sk_ASN1_VALUE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASN1_VALUE, (st), (cmp))
-#define sk_ASN1_VALUE_dup(st) SKM_sk_dup(ASN1_VALUE, st)
-#define sk_ASN1_VALUE_pop_free(st, free_func) SKM_sk_pop_free(ASN1_VALUE, (st), (free_func))
-#define sk_ASN1_VALUE_shift(st) SKM_sk_shift(ASN1_VALUE, (st))
-#define sk_ASN1_VALUE_pop(st) SKM_sk_pop(ASN1_VALUE, (st))
-#define sk_ASN1_VALUE_sort(st) SKM_sk_sort(ASN1_VALUE, (st))
-#define sk_ASN1_VALUE_is_sorted(st) SKM_sk_is_sorted(ASN1_VALUE, (st))
-
-#define sk_BIO_new(cmp) SKM_sk_new(BIO, (cmp))
-#define sk_BIO_new_null() SKM_sk_new_null(BIO)
-#define sk_BIO_free(st) SKM_sk_free(BIO, (st))
-#define sk_BIO_num(st) SKM_sk_num(BIO, (st))
-#define sk_BIO_value(st, i) SKM_sk_value(BIO, (st), (i))
-#define sk_BIO_set(st, i, val) SKM_sk_set(BIO, (st), (i), (val))
-#define sk_BIO_zero(st) SKM_sk_zero(BIO, (st))
-#define sk_BIO_push(st, val) SKM_sk_push(BIO, (st), (val))
-#define sk_BIO_unshift(st, val) SKM_sk_unshift(BIO, (st), (val))
-#define sk_BIO_find(st, val) SKM_sk_find(BIO, (st), (val))
-#define sk_BIO_find_ex(st, val) SKM_sk_find_ex(BIO, (st), (val))
-#define sk_BIO_delete(st, i) SKM_sk_delete(BIO, (st), (i))
-#define sk_BIO_delete_ptr(st, ptr) SKM_sk_delete_ptr(BIO, (st), (ptr))
-#define sk_BIO_insert(st, val, i) SKM_sk_insert(BIO, (st), (val), (i))
-#define sk_BIO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(BIO, (st), (cmp))
-#define sk_BIO_dup(st) SKM_sk_dup(BIO, st)
-#define sk_BIO_pop_free(st, free_func) SKM_sk_pop_free(BIO, (st), (free_func))
-#define sk_BIO_shift(st) SKM_sk_shift(BIO, (st))
-#define sk_BIO_pop(st) SKM_sk_pop(BIO, (st))
-#define sk_BIO_sort(st) SKM_sk_sort(BIO, (st))
-#define sk_BIO_is_sorted(st) SKM_sk_is_sorted(BIO, (st))
-
-#define sk_BY_DIR_ENTRY_new(cmp) SKM_sk_new(BY_DIR_ENTRY, (cmp))
-#define sk_BY_DIR_ENTRY_new_null() SKM_sk_new_null(BY_DIR_ENTRY)
-#define sk_BY_DIR_ENTRY_free(st) SKM_sk_free(BY_DIR_ENTRY, (st))
-#define sk_BY_DIR_ENTRY_num(st) SKM_sk_num(BY_DIR_ENTRY, (st))
-#define sk_BY_DIR_ENTRY_value(st, i) SKM_sk_value(BY_DIR_ENTRY, (st), (i))
-#define sk_BY_DIR_ENTRY_set(st, i, val) SKM_sk_set(BY_DIR_ENTRY, (st), (i), (val))
-#define sk_BY_DIR_ENTRY_zero(st) SKM_sk_zero(BY_DIR_ENTRY, (st))
-#define sk_BY_DIR_ENTRY_push(st, val) SKM_sk_push(BY_DIR_ENTRY, (st), (val))
-#define sk_BY_DIR_ENTRY_unshift(st, val) SKM_sk_unshift(BY_DIR_ENTRY, (st), (val))
-#define sk_BY_DIR_ENTRY_find(st, val) SKM_sk_find(BY_DIR_ENTRY, (st), (val))
-#define sk_BY_DIR_ENTRY_find_ex(st, val) SKM_sk_find_ex(BY_DIR_ENTRY, (st), (val))
-#define sk_BY_DIR_ENTRY_delete(st, i) SKM_sk_delete(BY_DIR_ENTRY, (st), (i))
-#define sk_BY_DIR_ENTRY_delete_ptr(st, ptr) SKM_sk_delete_ptr(BY_DIR_ENTRY, (st), (ptr))
-#define sk_BY_DIR_ENTRY_insert(st, val, i) SKM_sk_insert(BY_DIR_ENTRY, (st), (val), (i))
-#define sk_BY_DIR_ENTRY_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(BY_DIR_ENTRY, (st), (cmp))
-#define sk_BY_DIR_ENTRY_dup(st) SKM_sk_dup(BY_DIR_ENTRY, st)
-#define sk_BY_DIR_ENTRY_pop_free(st, free_func) SKM_sk_pop_free(BY_DIR_ENTRY, (st), (free_func))
-#define sk_BY_DIR_ENTRY_shift(st) SKM_sk_shift(BY_DIR_ENTRY, (st))
-#define sk_BY_DIR_ENTRY_pop(st) SKM_sk_pop(BY_DIR_ENTRY, (st))
-#define sk_BY_DIR_ENTRY_sort(st) SKM_sk_sort(BY_DIR_ENTRY, (st))
-#define sk_BY_DIR_ENTRY_is_sorted(st) SKM_sk_is_sorted(BY_DIR_ENTRY, (st))
-
-#define sk_BY_DIR_HASH_new(cmp) SKM_sk_new(BY_DIR_HASH, (cmp))
-#define sk_BY_DIR_HASH_new_null() SKM_sk_new_null(BY_DIR_HASH)
-#define sk_BY_DIR_HASH_free(st) SKM_sk_free(BY_DIR_HASH, (st))
-#define sk_BY_DIR_HASH_num(st) SKM_sk_num(BY_DIR_HASH, (st))
-#define sk_BY_DIR_HASH_value(st, i) SKM_sk_value(BY_DIR_HASH, (st), (i))
-#define sk_BY_DIR_HASH_set(st, i, val) SKM_sk_set(BY_DIR_HASH, (st), (i), (val))
-#define sk_BY_DIR_HASH_zero(st) SKM_sk_zero(BY_DIR_HASH, (st))
-#define sk_BY_DIR_HASH_push(st, val) SKM_sk_push(BY_DIR_HASH, (st), (val))
-#define sk_BY_DIR_HASH_unshift(st, val) SKM_sk_unshift(BY_DIR_HASH, (st), (val))
-#define sk_BY_DIR_HASH_find(st, val) SKM_sk_find(BY_DIR_HASH, (st), (val))
-#define sk_BY_DIR_HASH_find_ex(st, val) SKM_sk_find_ex(BY_DIR_HASH, (st), (val))
-#define sk_BY_DIR_HASH_delete(st, i) SKM_sk_delete(BY_DIR_HASH, (st), (i))
-#define sk_BY_DIR_HASH_delete_ptr(st, ptr) SKM_sk_delete_ptr(BY_DIR_HASH, (st), (ptr))
-#define sk_BY_DIR_HASH_insert(st, val, i) SKM_sk_insert(BY_DIR_HASH, (st), (val), (i))
-#define sk_BY_DIR_HASH_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(BY_DIR_HASH, (st), (cmp))
-#define sk_BY_DIR_HASH_dup(st) SKM_sk_dup(BY_DIR_HASH, st)
-#define sk_BY_DIR_HASH_pop_free(st, free_func) SKM_sk_pop_free(BY_DIR_HASH, (st), (free_func))
-#define sk_BY_DIR_HASH_shift(st) SKM_sk_shift(BY_DIR_HASH, (st))
-#define sk_BY_DIR_HASH_pop(st) SKM_sk_pop(BY_DIR_HASH, (st))
-#define sk_BY_DIR_HASH_sort(st) SKM_sk_sort(BY_DIR_HASH, (st))
-#define sk_BY_DIR_HASH_is_sorted(st) SKM_sk_is_sorted(BY_DIR_HASH, (st))
-
-#define sk_CMS_CertificateChoices_new(cmp) SKM_sk_new(CMS_CertificateChoices, (cmp))
-#define sk_CMS_CertificateChoices_new_null() SKM_sk_new_null(CMS_CertificateChoices)
-#define sk_CMS_CertificateChoices_free(st) SKM_sk_free(CMS_CertificateChoices, (st))
-#define sk_CMS_CertificateChoices_num(st) SKM_sk_num(CMS_CertificateChoices, (st))
-#define sk_CMS_CertificateChoices_value(st, i) SKM_sk_value(CMS_CertificateChoices, (st), (i))
-#define sk_CMS_CertificateChoices_set(st, i, val) SKM_sk_set(CMS_CertificateChoices, (st), (i), (val))
-#define sk_CMS_CertificateChoices_zero(st) SKM_sk_zero(CMS_CertificateChoices, (st))
-#define sk_CMS_CertificateChoices_push(st, val) SKM_sk_push(CMS_CertificateChoices, (st), (val))
-#define sk_CMS_CertificateChoices_unshift(st, val) SKM_sk_unshift(CMS_CertificateChoices, (st), (val))
-#define sk_CMS_CertificateChoices_find(st, val) SKM_sk_find(CMS_CertificateChoices, (st), (val))
-#define sk_CMS_CertificateChoices_find_ex(st, val) SKM_sk_find_ex(CMS_CertificateChoices, (st), (val))
-#define sk_CMS_CertificateChoices_delete(st, i) SKM_sk_delete(CMS_CertificateChoices, (st), (i))
-#define sk_CMS_CertificateChoices_delete_ptr(st, ptr) SKM_sk_delete_ptr(CMS_CertificateChoices, (st), (ptr))
-#define sk_CMS_CertificateChoices_insert(st, val, i) SKM_sk_insert(CMS_CertificateChoices, (st), (val), (i))
-#define sk_CMS_CertificateChoices_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CMS_CertificateChoices, (st), (cmp))
-#define sk_CMS_CertificateChoices_dup(st) SKM_sk_dup(CMS_CertificateChoices, st)
-#define sk_CMS_CertificateChoices_pop_free(st, free_func) SKM_sk_pop_free(CMS_CertificateChoices, (st), (free_func))
-#define sk_CMS_CertificateChoices_shift(st) SKM_sk_shift(CMS_CertificateChoices, (st))
-#define sk_CMS_CertificateChoices_pop(st) SKM_sk_pop(CMS_CertificateChoices, (st))
-#define sk_CMS_CertificateChoices_sort(st) SKM_sk_sort(CMS_CertificateChoices, (st))
-#define sk_CMS_CertificateChoices_is_sorted(st) SKM_sk_is_sorted(CMS_CertificateChoices, (st))
-
-#define sk_CMS_RecipientInfo_new(cmp) SKM_sk_new(CMS_RecipientInfo, (cmp))
-#define sk_CMS_RecipientInfo_new_null() SKM_sk_new_null(CMS_RecipientInfo)
-#define sk_CMS_RecipientInfo_free(st) SKM_sk_free(CMS_RecipientInfo, (st))
-#define sk_CMS_RecipientInfo_num(st) SKM_sk_num(CMS_RecipientInfo, (st))
-#define sk_CMS_RecipientInfo_value(st, i) SKM_sk_value(CMS_RecipientInfo, (st), (i))
-#define sk_CMS_RecipientInfo_set(st, i, val) SKM_sk_set(CMS_RecipientInfo, (st), (i), (val))
-#define sk_CMS_RecipientInfo_zero(st) SKM_sk_zero(CMS_RecipientInfo, (st))
-#define sk_CMS_RecipientInfo_push(st, val) SKM_sk_push(CMS_RecipientInfo, (st), (val))
-#define sk_CMS_RecipientInfo_unshift(st, val) SKM_sk_unshift(CMS_RecipientInfo, (st), (val))
-#define sk_CMS_RecipientInfo_find(st, val) SKM_sk_find(CMS_RecipientInfo, (st), (val))
-#define sk_CMS_RecipientInfo_find_ex(st, val) SKM_sk_find_ex(CMS_RecipientInfo, (st), (val))
-#define sk_CMS_RecipientInfo_delete(st, i) SKM_sk_delete(CMS_RecipientInfo, (st), (i))
-#define sk_CMS_RecipientInfo_delete_ptr(st, ptr) SKM_sk_delete_ptr(CMS_RecipientInfo, (st), (ptr))
-#define sk_CMS_RecipientInfo_insert(st, val, i) SKM_sk_insert(CMS_RecipientInfo, (st), (val), (i))
-#define sk_CMS_RecipientInfo_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CMS_RecipientInfo, (st), (cmp))
-#define sk_CMS_RecipientInfo_dup(st) SKM_sk_dup(CMS_RecipientInfo, st)
-#define sk_CMS_RecipientInfo_pop_free(st, free_func) SKM_sk_pop_free(CMS_RecipientInfo, (st), (free_func))
-#define sk_CMS_RecipientInfo_shift(st) SKM_sk_shift(CMS_RecipientInfo, (st))
-#define sk_CMS_RecipientInfo_pop(st) SKM_sk_pop(CMS_RecipientInfo, (st))
-#define sk_CMS_RecipientInfo_sort(st) SKM_sk_sort(CMS_RecipientInfo, (st))
-#define sk_CMS_RecipientInfo_is_sorted(st) SKM_sk_is_sorted(CMS_RecipientInfo, (st))
-
-#define sk_CMS_RevocationInfoChoice_new(cmp) SKM_sk_new(CMS_RevocationInfoChoice, (cmp))
-#define sk_CMS_RevocationInfoChoice_new_null() SKM_sk_new_null(CMS_RevocationInfoChoice)
-#define sk_CMS_RevocationInfoChoice_free(st) SKM_sk_free(CMS_RevocationInfoChoice, (st))
-#define sk_CMS_RevocationInfoChoice_num(st) SKM_sk_num(CMS_RevocationInfoChoice, (st))
-#define sk_CMS_RevocationInfoChoice_value(st, i) SKM_sk_value(CMS_RevocationInfoChoice, (st), (i))
-#define sk_CMS_RevocationInfoChoice_set(st, i, val) SKM_sk_set(CMS_RevocationInfoChoice, (st), (i), (val))
-#define sk_CMS_RevocationInfoChoice_zero(st) SKM_sk_zero(CMS_RevocationInfoChoice, (st))
-#define sk_CMS_RevocationInfoChoice_push(st, val) SKM_sk_push(CMS_RevocationInfoChoice, (st), (val))
-#define sk_CMS_RevocationInfoChoice_unshift(st, val) SKM_sk_unshift(CMS_RevocationInfoChoice, (st), (val))
-#define sk_CMS_RevocationInfoChoice_find(st, val) SKM_sk_find(CMS_RevocationInfoChoice, (st), (val))
-#define sk_CMS_RevocationInfoChoice_find_ex(st, val) SKM_sk_find_ex(CMS_RevocationInfoChoice, (st), (val))
-#define sk_CMS_RevocationInfoChoice_delete(st, i) SKM_sk_delete(CMS_RevocationInfoChoice, (st), (i))
-#define sk_CMS_RevocationInfoChoice_delete_ptr(st, ptr) SKM_sk_delete_ptr(CMS_RevocationInfoChoice, (st), (ptr))
-#define sk_CMS_RevocationInfoChoice_insert(st, val, i) SKM_sk_insert(CMS_RevocationInfoChoice, (st), (val), (i))
-#define sk_CMS_RevocationInfoChoice_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CMS_RevocationInfoChoice, (st), (cmp))
-#define sk_CMS_RevocationInfoChoice_dup(st) SKM_sk_dup(CMS_RevocationInfoChoice, st)
-#define sk_CMS_RevocationInfoChoice_pop_free(st, free_func) SKM_sk_pop_free(CMS_RevocationInfoChoice, (st), (free_func))
-#define sk_CMS_RevocationInfoChoice_shift(st) SKM_sk_shift(CMS_RevocationInfoChoice, (st))
-#define sk_CMS_RevocationInfoChoice_pop(st) SKM_sk_pop(CMS_RevocationInfoChoice, (st))
-#define sk_CMS_RevocationInfoChoice_sort(st) SKM_sk_sort(CMS_RevocationInfoChoice, (st))
-#define sk_CMS_RevocationInfoChoice_is_sorted(st) SKM_sk_is_sorted(CMS_RevocationInfoChoice, (st))
-
-#define sk_CMS_SignerInfo_new(cmp) SKM_sk_new(CMS_SignerInfo, (cmp))
-#define sk_CMS_SignerInfo_new_null() SKM_sk_new_null(CMS_SignerInfo)
-#define sk_CMS_SignerInfo_free(st) SKM_sk_free(CMS_SignerInfo, (st))
-#define sk_CMS_SignerInfo_num(st) SKM_sk_num(CMS_SignerInfo, (st))
-#define sk_CMS_SignerInfo_value(st, i) SKM_sk_value(CMS_SignerInfo, (st), (i))
-#define sk_CMS_SignerInfo_set(st, i, val) SKM_sk_set(CMS_SignerInfo, (st), (i), (val))
-#define sk_CMS_SignerInfo_zero(st) SKM_sk_zero(CMS_SignerInfo, (st))
-#define sk_CMS_SignerInfo_push(st, val) SKM_sk_push(CMS_SignerInfo, (st), (val))
-#define sk_CMS_SignerInfo_unshift(st, val) SKM_sk_unshift(CMS_SignerInfo, (st), (val))
-#define sk_CMS_SignerInfo_find(st, val) SKM_sk_find(CMS_SignerInfo, (st), (val))
-#define sk_CMS_SignerInfo_find_ex(st, val) SKM_sk_find_ex(CMS_SignerInfo, (st), (val))
-#define sk_CMS_SignerInfo_delete(st, i) SKM_sk_delete(CMS_SignerInfo, (st), (i))
-#define sk_CMS_SignerInfo_delete_ptr(st, ptr) SKM_sk_delete_ptr(CMS_SignerInfo, (st), (ptr))
-#define sk_CMS_SignerInfo_insert(st, val, i) SKM_sk_insert(CMS_SignerInfo, (st), (val), (i))
-#define sk_CMS_SignerInfo_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CMS_SignerInfo, (st), (cmp))
-#define sk_CMS_SignerInfo_dup(st) SKM_sk_dup(CMS_SignerInfo, st)
-#define sk_CMS_SignerInfo_pop_free(st, free_func) SKM_sk_pop_free(CMS_SignerInfo, (st), (free_func))
-#define sk_CMS_SignerInfo_shift(st) SKM_sk_shift(CMS_SignerInfo, (st))
-#define sk_CMS_SignerInfo_pop(st) SKM_sk_pop(CMS_SignerInfo, (st))
-#define sk_CMS_SignerInfo_sort(st) SKM_sk_sort(CMS_SignerInfo, (st))
-#define sk_CMS_SignerInfo_is_sorted(st) SKM_sk_is_sorted(CMS_SignerInfo, (st))
-
-#define sk_CONF_IMODULE_new(cmp) SKM_sk_new(CONF_IMODULE, (cmp))
-#define sk_CONF_IMODULE_new_null() SKM_sk_new_null(CONF_IMODULE)
-#define sk_CONF_IMODULE_free(st) SKM_sk_free(CONF_IMODULE, (st))
-#define sk_CONF_IMODULE_num(st) SKM_sk_num(CONF_IMODULE, (st))
-#define sk_CONF_IMODULE_value(st, i) SKM_sk_value(CONF_IMODULE, (st), (i))
-#define sk_CONF_IMODULE_set(st, i, val) SKM_sk_set(CONF_IMODULE, (st), (i), (val))
-#define sk_CONF_IMODULE_zero(st) SKM_sk_zero(CONF_IMODULE, (st))
-#define sk_CONF_IMODULE_push(st, val) SKM_sk_push(CONF_IMODULE, (st), (val))
-#define sk_CONF_IMODULE_unshift(st, val) SKM_sk_unshift(CONF_IMODULE, (st), (val))
-#define sk_CONF_IMODULE_find(st, val) SKM_sk_find(CONF_IMODULE, (st), (val))
-#define sk_CONF_IMODULE_find_ex(st, val) SKM_sk_find_ex(CONF_IMODULE, (st), (val))
-#define sk_CONF_IMODULE_delete(st, i) SKM_sk_delete(CONF_IMODULE, (st), (i))
-#define sk_CONF_IMODULE_delete_ptr(st, ptr) SKM_sk_delete_ptr(CONF_IMODULE, (st), (ptr))
-#define sk_CONF_IMODULE_insert(st, val, i) SKM_sk_insert(CONF_IMODULE, (st), (val), (i))
-#define sk_CONF_IMODULE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CONF_IMODULE, (st), (cmp))
-#define sk_CONF_IMODULE_dup(st) SKM_sk_dup(CONF_IMODULE, st)
-#define sk_CONF_IMODULE_pop_free(st, free_func) SKM_sk_pop_free(CONF_IMODULE, (st), (free_func))
-#define sk_CONF_IMODULE_shift(st) SKM_sk_shift(CONF_IMODULE, (st))
-#define sk_CONF_IMODULE_pop(st) SKM_sk_pop(CONF_IMODULE, (st))
-#define sk_CONF_IMODULE_sort(st) SKM_sk_sort(CONF_IMODULE, (st))
-#define sk_CONF_IMODULE_is_sorted(st) SKM_sk_is_sorted(CONF_IMODULE, (st))
-
-#define sk_CONF_MODULE_new(cmp) SKM_sk_new(CONF_MODULE, (cmp))
-#define sk_CONF_MODULE_new_null() SKM_sk_new_null(CONF_MODULE)
-#define sk_CONF_MODULE_free(st) SKM_sk_free(CONF_MODULE, (st))
-#define sk_CONF_MODULE_num(st) SKM_sk_num(CONF_MODULE, (st))
-#define sk_CONF_MODULE_value(st, i) SKM_sk_value(CONF_MODULE, (st), (i))
-#define sk_CONF_MODULE_set(st, i, val) SKM_sk_set(CONF_MODULE, (st), (i), (val))
-#define sk_CONF_MODULE_zero(st) SKM_sk_zero(CONF_MODULE, (st))
-#define sk_CONF_MODULE_push(st, val) SKM_sk_push(CONF_MODULE, (st), (val))
-#define sk_CONF_MODULE_unshift(st, val) SKM_sk_unshift(CONF_MODULE, (st), (val))
-#define sk_CONF_MODULE_find(st, val) SKM_sk_find(CONF_MODULE, (st), (val))
-#define sk_CONF_MODULE_find_ex(st, val) SKM_sk_find_ex(CONF_MODULE, (st), (val))
-#define sk_CONF_MODULE_delete(st, i) SKM_sk_delete(CONF_MODULE, (st), (i))
-#define sk_CONF_MODULE_delete_ptr(st, ptr) SKM_sk_delete_ptr(CONF_MODULE, (st), (ptr))
-#define sk_CONF_MODULE_insert(st, val, i) SKM_sk_insert(CONF_MODULE, (st), (val), (i))
-#define sk_CONF_MODULE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CONF_MODULE, (st), (cmp))
-#define sk_CONF_MODULE_dup(st) SKM_sk_dup(CONF_MODULE, st)
-#define sk_CONF_MODULE_pop_free(st, free_func) SKM_sk_pop_free(CONF_MODULE, (st), (free_func))
-#define sk_CONF_MODULE_shift(st) SKM_sk_shift(CONF_MODULE, (st))
-#define sk_CONF_MODULE_pop(st) SKM_sk_pop(CONF_MODULE, (st))
-#define sk_CONF_MODULE_sort(st) SKM_sk_sort(CONF_MODULE, (st))
-#define sk_CONF_MODULE_is_sorted(st) SKM_sk_is_sorted(CONF_MODULE, (st))
-
-#define sk_CONF_VALUE_new(cmp) SKM_sk_new(CONF_VALUE, (cmp))
-#define sk_CONF_VALUE_new_null() SKM_sk_new_null(CONF_VALUE)
-#define sk_CONF_VALUE_free(st) SKM_sk_free(CONF_VALUE, (st))
-#define sk_CONF_VALUE_num(st) SKM_sk_num(CONF_VALUE, (st))
-#define sk_CONF_VALUE_value(st, i) SKM_sk_value(CONF_VALUE, (st), (i))
-#define sk_CONF_VALUE_set(st, i, val) SKM_sk_set(CONF_VALUE, (st), (i), (val))
-#define sk_CONF_VALUE_zero(st) SKM_sk_zero(CONF_VALUE, (st))
-#define sk_CONF_VALUE_push(st, val) SKM_sk_push(CONF_VALUE, (st), (val))
-#define sk_CONF_VALUE_unshift(st, val) SKM_sk_unshift(CONF_VALUE, (st), (val))
-#define sk_CONF_VALUE_find(st, val) SKM_sk_find(CONF_VALUE, (st), (val))
-#define sk_CONF_VALUE_find_ex(st, val) SKM_sk_find_ex(CONF_VALUE, (st), (val))
-#define sk_CONF_VALUE_delete(st, i) SKM_sk_delete(CONF_VALUE, (st), (i))
-#define sk_CONF_VALUE_delete_ptr(st, ptr) SKM_sk_delete_ptr(CONF_VALUE, (st), (ptr))
-#define sk_CONF_VALUE_insert(st, val, i) SKM_sk_insert(CONF_VALUE, (st), (val), (i))
-#define sk_CONF_VALUE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CONF_VALUE, (st), (cmp))
-#define sk_CONF_VALUE_dup(st) SKM_sk_dup(CONF_VALUE, st)
-#define sk_CONF_VALUE_pop_free(st, free_func) SKM_sk_pop_free(CONF_VALUE, (st), (free_func))
-#define sk_CONF_VALUE_shift(st) SKM_sk_shift(CONF_VALUE, (st))
-#define sk_CONF_VALUE_pop(st) SKM_sk_pop(CONF_VALUE, (st))
-#define sk_CONF_VALUE_sort(st) SKM_sk_sort(CONF_VALUE, (st))
-#define sk_CONF_VALUE_is_sorted(st) SKM_sk_is_sorted(CONF_VALUE, (st))
-
-#define sk_CRYPTO_EX_DATA_FUNCS_new(cmp) SKM_sk_new(CRYPTO_EX_DATA_FUNCS, (cmp))
-#define sk_CRYPTO_EX_DATA_FUNCS_new_null() SKM_sk_new_null(CRYPTO_EX_DATA_FUNCS)
-#define sk_CRYPTO_EX_DATA_FUNCS_free(st) SKM_sk_free(CRYPTO_EX_DATA_FUNCS, (st))
-#define sk_CRYPTO_EX_DATA_FUNCS_num(st) SKM_sk_num(CRYPTO_EX_DATA_FUNCS, (st))
-#define sk_CRYPTO_EX_DATA_FUNCS_value(st, i) SKM_sk_value(CRYPTO_EX_DATA_FUNCS, (st), (i))
-#define sk_CRYPTO_EX_DATA_FUNCS_set(st, i, val) SKM_sk_set(CRYPTO_EX_DATA_FUNCS, (st), (i), (val))
-#define sk_CRYPTO_EX_DATA_FUNCS_zero(st) SKM_sk_zero(CRYPTO_EX_DATA_FUNCS, (st))
-#define sk_CRYPTO_EX_DATA_FUNCS_push(st, val) SKM_sk_push(CRYPTO_EX_DATA_FUNCS, (st), (val))
-#define sk_CRYPTO_EX_DATA_FUNCS_unshift(st, val) SKM_sk_unshift(CRYPTO_EX_DATA_FUNCS, (st), (val))
-#define sk_CRYPTO_EX_DATA_FUNCS_find(st, val) SKM_sk_find(CRYPTO_EX_DATA_FUNCS, (st), (val))
-#define sk_CRYPTO_EX_DATA_FUNCS_find_ex(st, val) SKM_sk_find_ex(CRYPTO_EX_DATA_FUNCS, (st), (val))
-#define sk_CRYPTO_EX_DATA_FUNCS_delete(st, i) SKM_sk_delete(CRYPTO_EX_DATA_FUNCS, (st), (i))
-#define sk_CRYPTO_EX_DATA_FUNCS_delete_ptr(st, ptr) SKM_sk_delete_ptr(CRYPTO_EX_DATA_FUNCS, (st), (ptr))
-#define sk_CRYPTO_EX_DATA_FUNCS_insert(st, val, i) SKM_sk_insert(CRYPTO_EX_DATA_FUNCS, (st), (val), (i))
-#define sk_CRYPTO_EX_DATA_FUNCS_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CRYPTO_EX_DATA_FUNCS, (st), (cmp))
-#define sk_CRYPTO_EX_DATA_FUNCS_dup(st) SKM_sk_dup(CRYPTO_EX_DATA_FUNCS, st)
-#define sk_CRYPTO_EX_DATA_FUNCS_pop_free(st, free_func) SKM_sk_pop_free(CRYPTO_EX_DATA_FUNCS, (st), (free_func))
-#define sk_CRYPTO_EX_DATA_FUNCS_shift(st) SKM_sk_shift(CRYPTO_EX_DATA_FUNCS, (st))
-#define sk_CRYPTO_EX_DATA_FUNCS_pop(st) SKM_sk_pop(CRYPTO_EX_DATA_FUNCS, (st))
-#define sk_CRYPTO_EX_DATA_FUNCS_sort(st) SKM_sk_sort(CRYPTO_EX_DATA_FUNCS, (st))
-#define sk_CRYPTO_EX_DATA_FUNCS_is_sorted(st) SKM_sk_is_sorted(CRYPTO_EX_DATA_FUNCS, (st))
-
-#define sk_CRYPTO_dynlock_new(cmp) SKM_sk_new(CRYPTO_dynlock, (cmp))
-#define sk_CRYPTO_dynlock_new_null() SKM_sk_new_null(CRYPTO_dynlock)
-#define sk_CRYPTO_dynlock_free(st) SKM_sk_free(CRYPTO_dynlock, (st))
-#define sk_CRYPTO_dynlock_num(st) SKM_sk_num(CRYPTO_dynlock, (st))
-#define sk_CRYPTO_dynlock_value(st, i) SKM_sk_value(CRYPTO_dynlock, (st), (i))
-#define sk_CRYPTO_dynlock_set(st, i, val) SKM_sk_set(CRYPTO_dynlock, (st), (i), (val))
-#define sk_CRYPTO_dynlock_zero(st) SKM_sk_zero(CRYPTO_dynlock, (st))
-#define sk_CRYPTO_dynlock_push(st, val) SKM_sk_push(CRYPTO_dynlock, (st), (val))
-#define sk_CRYPTO_dynlock_unshift(st, val) SKM_sk_unshift(CRYPTO_dynlock, (st), (val))
-#define sk_CRYPTO_dynlock_find(st, val) SKM_sk_find(CRYPTO_dynlock, (st), (val))
-#define sk_CRYPTO_dynlock_find_ex(st, val) SKM_sk_find_ex(CRYPTO_dynlock, (st), (val))
-#define sk_CRYPTO_dynlock_delete(st, i) SKM_sk_delete(CRYPTO_dynlock, (st), (i))
-#define sk_CRYPTO_dynlock_delete_ptr(st, ptr) SKM_sk_delete_ptr(CRYPTO_dynlock, (st), (ptr))
-#define sk_CRYPTO_dynlock_insert(st, val, i) SKM_sk_insert(CRYPTO_dynlock, (st), (val), (i))
-#define sk_CRYPTO_dynlock_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CRYPTO_dynlock, (st), (cmp))
-#define sk_CRYPTO_dynlock_dup(st) SKM_sk_dup(CRYPTO_dynlock, st)
-#define sk_CRYPTO_dynlock_pop_free(st, free_func) SKM_sk_pop_free(CRYPTO_dynlock, (st), (free_func))
-#define sk_CRYPTO_dynlock_shift(st) SKM_sk_shift(CRYPTO_dynlock, (st))
-#define sk_CRYPTO_dynlock_pop(st) SKM_sk_pop(CRYPTO_dynlock, (st))
-#define sk_CRYPTO_dynlock_sort(st) SKM_sk_sort(CRYPTO_dynlock, (st))
-#define sk_CRYPTO_dynlock_is_sorted(st) SKM_sk_is_sorted(CRYPTO_dynlock, (st))
-
-#define sk_DIST_POINT_new(cmp) SKM_sk_new(DIST_POINT, (cmp))
-#define sk_DIST_POINT_new_null() SKM_sk_new_null(DIST_POINT)
-#define sk_DIST_POINT_free(st) SKM_sk_free(DIST_POINT, (st))
-#define sk_DIST_POINT_num(st) SKM_sk_num(DIST_POINT, (st))
-#define sk_DIST_POINT_value(st, i) SKM_sk_value(DIST_POINT, (st), (i))
-#define sk_DIST_POINT_set(st, i, val) SKM_sk_set(DIST_POINT, (st), (i), (val))
-#define sk_DIST_POINT_zero(st) SKM_sk_zero(DIST_POINT, (st))
-#define sk_DIST_POINT_push(st, val) SKM_sk_push(DIST_POINT, (st), (val))
-#define sk_DIST_POINT_unshift(st, val) SKM_sk_unshift(DIST_POINT, (st), (val))
-#define sk_DIST_POINT_find(st, val) SKM_sk_find(DIST_POINT, (st), (val))
-#define sk_DIST_POINT_find_ex(st, val) SKM_sk_find_ex(DIST_POINT, (st), (val))
-#define sk_DIST_POINT_delete(st, i) SKM_sk_delete(DIST_POINT, (st), (i))
-#define sk_DIST_POINT_delete_ptr(st, ptr) SKM_sk_delete_ptr(DIST_POINT, (st), (ptr))
-#define sk_DIST_POINT_insert(st, val, i) SKM_sk_insert(DIST_POINT, (st), (val), (i))
-#define sk_DIST_POINT_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(DIST_POINT, (st), (cmp))
-#define sk_DIST_POINT_dup(st) SKM_sk_dup(DIST_POINT, st)
-#define sk_DIST_POINT_pop_free(st, free_func) SKM_sk_pop_free(DIST_POINT, (st), (free_func))
-#define sk_DIST_POINT_shift(st) SKM_sk_shift(DIST_POINT, (st))
-#define sk_DIST_POINT_pop(st) SKM_sk_pop(DIST_POINT, (st))
-#define sk_DIST_POINT_sort(st) SKM_sk_sort(DIST_POINT, (st))
-#define sk_DIST_POINT_is_sorted(st) SKM_sk_is_sorted(DIST_POINT, (st))
-
-#define sk_ENGINE_new(cmp) SKM_sk_new(ENGINE, (cmp))
-#define sk_ENGINE_new_null() SKM_sk_new_null(ENGINE)
-#define sk_ENGINE_free(st) SKM_sk_free(ENGINE, (st))
-#define sk_ENGINE_num(st) SKM_sk_num(ENGINE, (st))
-#define sk_ENGINE_value(st, i) SKM_sk_value(ENGINE, (st), (i))
-#define sk_ENGINE_set(st, i, val) SKM_sk_set(ENGINE, (st), (i), (val))
-#define sk_ENGINE_zero(st) SKM_sk_zero(ENGINE, (st))
-#define sk_ENGINE_push(st, val) SKM_sk_push(ENGINE, (st), (val))
-#define sk_ENGINE_unshift(st, val) SKM_sk_unshift(ENGINE, (st), (val))
-#define sk_ENGINE_find(st, val) SKM_sk_find(ENGINE, (st), (val))
-#define sk_ENGINE_find_ex(st, val) SKM_sk_find_ex(ENGINE, (st), (val))
-#define sk_ENGINE_delete(st, i) SKM_sk_delete(ENGINE, (st), (i))
-#define sk_ENGINE_delete_ptr(st, ptr) SKM_sk_delete_ptr(ENGINE, (st), (ptr))
-#define sk_ENGINE_insert(st, val, i) SKM_sk_insert(ENGINE, (st), (val), (i))
-#define sk_ENGINE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ENGINE, (st), (cmp))
-#define sk_ENGINE_dup(st) SKM_sk_dup(ENGINE, st)
-#define sk_ENGINE_pop_free(st, free_func) SKM_sk_pop_free(ENGINE, (st), (free_func))
-#define sk_ENGINE_shift(st) SKM_sk_shift(ENGINE, (st))
-#define sk_ENGINE_pop(st) SKM_sk_pop(ENGINE, (st))
-#define sk_ENGINE_sort(st) SKM_sk_sort(ENGINE, (st))
-#define sk_ENGINE_is_sorted(st) SKM_sk_is_sorted(ENGINE, (st))
-
-#define sk_ENGINE_CLEANUP_ITEM_new(cmp) SKM_sk_new(ENGINE_CLEANUP_ITEM, (cmp))
-#define sk_ENGINE_CLEANUP_ITEM_new_null() SKM_sk_new_null(ENGINE_CLEANUP_ITEM)
-#define sk_ENGINE_CLEANUP_ITEM_free(st) SKM_sk_free(ENGINE_CLEANUP_ITEM, (st))
-#define sk_ENGINE_CLEANUP_ITEM_num(st) SKM_sk_num(ENGINE_CLEANUP_ITEM, (st))
-#define sk_ENGINE_CLEANUP_ITEM_value(st, i) SKM_sk_value(ENGINE_CLEANUP_ITEM, (st), (i))
-#define sk_ENGINE_CLEANUP_ITEM_set(st, i, val) SKM_sk_set(ENGINE_CLEANUP_ITEM, (st), (i), (val))
-#define sk_ENGINE_CLEANUP_ITEM_zero(st) SKM_sk_zero(ENGINE_CLEANUP_ITEM, (st))
-#define sk_ENGINE_CLEANUP_ITEM_push(st, val) SKM_sk_push(ENGINE_CLEANUP_ITEM, (st), (val))
-#define sk_ENGINE_CLEANUP_ITEM_unshift(st, val) SKM_sk_unshift(ENGINE_CLEANUP_ITEM, (st), (val))
-#define sk_ENGINE_CLEANUP_ITEM_find(st, val) SKM_sk_find(ENGINE_CLEANUP_ITEM, (st), (val))
-#define sk_ENGINE_CLEANUP_ITEM_find_ex(st, val) SKM_sk_find_ex(ENGINE_CLEANUP_ITEM, (st), (val))
-#define sk_ENGINE_CLEANUP_ITEM_delete(st, i) SKM_sk_delete(ENGINE_CLEANUP_ITEM, (st), (i))
-#define sk_ENGINE_CLEANUP_ITEM_delete_ptr(st, ptr) SKM_sk_delete_ptr(ENGINE_CLEANUP_ITEM, (st), (ptr))
-#define sk_ENGINE_CLEANUP_ITEM_insert(st, val, i) SKM_sk_insert(ENGINE_CLEANUP_ITEM, (st), (val), (i))
-#define sk_ENGINE_CLEANUP_ITEM_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ENGINE_CLEANUP_ITEM, (st), (cmp))
-#define sk_ENGINE_CLEANUP_ITEM_dup(st) SKM_sk_dup(ENGINE_CLEANUP_ITEM, st)
-#define sk_ENGINE_CLEANUP_ITEM_pop_free(st, free_func) SKM_sk_pop_free(ENGINE_CLEANUP_ITEM, (st), (free_func))
-#define sk_ENGINE_CLEANUP_ITEM_shift(st) SKM_sk_shift(ENGINE_CLEANUP_ITEM, (st))
-#define sk_ENGINE_CLEANUP_ITEM_pop(st) SKM_sk_pop(ENGINE_CLEANUP_ITEM, (st))
-#define sk_ENGINE_CLEANUP_ITEM_sort(st) SKM_sk_sort(ENGINE_CLEANUP_ITEM, (st))
-#define sk_ENGINE_CLEANUP_ITEM_is_sorted(st) SKM_sk_is_sorted(ENGINE_CLEANUP_ITEM, (st))
-
-#define sk_ESS_CERT_ID_new(cmp) SKM_sk_new(ESS_CERT_ID, (cmp))
-#define sk_ESS_CERT_ID_new_null() SKM_sk_new_null(ESS_CERT_ID)
-#define sk_ESS_CERT_ID_free(st) SKM_sk_free(ESS_CERT_ID, (st))
-#define sk_ESS_CERT_ID_num(st) SKM_sk_num(ESS_CERT_ID, (st))
-#define sk_ESS_CERT_ID_value(st, i) SKM_sk_value(ESS_CERT_ID, (st), (i))
-#define sk_ESS_CERT_ID_set(st, i, val) SKM_sk_set(ESS_CERT_ID, (st), (i), (val))
-#define sk_ESS_CERT_ID_zero(st) SKM_sk_zero(ESS_CERT_ID, (st))
-#define sk_ESS_CERT_ID_push(st, val) SKM_sk_push(ESS_CERT_ID, (st), (val))
-#define sk_ESS_CERT_ID_unshift(st, val) SKM_sk_unshift(ESS_CERT_ID, (st), (val))
-#define sk_ESS_CERT_ID_find(st, val) SKM_sk_find(ESS_CERT_ID, (st), (val))
-#define sk_ESS_CERT_ID_find_ex(st, val) SKM_sk_find_ex(ESS_CERT_ID, (st), (val))
-#define sk_ESS_CERT_ID_delete(st, i) SKM_sk_delete(ESS_CERT_ID, (st), (i))
-#define sk_ESS_CERT_ID_delete_ptr(st, ptr) SKM_sk_delete_ptr(ESS_CERT_ID, (st), (ptr))
-#define sk_ESS_CERT_ID_insert(st, val, i) SKM_sk_insert(ESS_CERT_ID, (st), (val), (i))
-#define sk_ESS_CERT_ID_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ESS_CERT_ID, (st), (cmp))
-#define sk_ESS_CERT_ID_dup(st) SKM_sk_dup(ESS_CERT_ID, st)
-#define sk_ESS_CERT_ID_pop_free(st, free_func) SKM_sk_pop_free(ESS_CERT_ID, (st), (free_func))
-#define sk_ESS_CERT_ID_shift(st) SKM_sk_shift(ESS_CERT_ID, (st))
-#define sk_ESS_CERT_ID_pop(st) SKM_sk_pop(ESS_CERT_ID, (st))
-#define sk_ESS_CERT_ID_sort(st) SKM_sk_sort(ESS_CERT_ID, (st))
-#define sk_ESS_CERT_ID_is_sorted(st) SKM_sk_is_sorted(ESS_CERT_ID, (st))
-
-#define sk_EVP_MD_new(cmp) SKM_sk_new(EVP_MD, (cmp))
-#define sk_EVP_MD_new_null() SKM_sk_new_null(EVP_MD)
-#define sk_EVP_MD_free(st) SKM_sk_free(EVP_MD, (st))
-#define sk_EVP_MD_num(st) SKM_sk_num(EVP_MD, (st))
-#define sk_EVP_MD_value(st, i) SKM_sk_value(EVP_MD, (st), (i))
-#define sk_EVP_MD_set(st, i, val) SKM_sk_set(EVP_MD, (st), (i), (val))
-#define sk_EVP_MD_zero(st) SKM_sk_zero(EVP_MD, (st))
-#define sk_EVP_MD_push(st, val) SKM_sk_push(EVP_MD, (st), (val))
-#define sk_EVP_MD_unshift(st, val) SKM_sk_unshift(EVP_MD, (st), (val))
-#define sk_EVP_MD_find(st, val) SKM_sk_find(EVP_MD, (st), (val))
-#define sk_EVP_MD_find_ex(st, val) SKM_sk_find_ex(EVP_MD, (st), (val))
-#define sk_EVP_MD_delete(st, i) SKM_sk_delete(EVP_MD, (st), (i))
-#define sk_EVP_MD_delete_ptr(st, ptr) SKM_sk_delete_ptr(EVP_MD, (st), (ptr))
-#define sk_EVP_MD_insert(st, val, i) SKM_sk_insert(EVP_MD, (st), (val), (i))
-#define sk_EVP_MD_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(EVP_MD, (st), (cmp))
-#define sk_EVP_MD_dup(st) SKM_sk_dup(EVP_MD, st)
-#define sk_EVP_MD_pop_free(st, free_func) SKM_sk_pop_free(EVP_MD, (st), (free_func))
-#define sk_EVP_MD_shift(st) SKM_sk_shift(EVP_MD, (st))
-#define sk_EVP_MD_pop(st) SKM_sk_pop(EVP_MD, (st))
-#define sk_EVP_MD_sort(st) SKM_sk_sort(EVP_MD, (st))
-#define sk_EVP_MD_is_sorted(st) SKM_sk_is_sorted(EVP_MD, (st))
-
-#define sk_EVP_PBE_CTL_new(cmp) SKM_sk_new(EVP_PBE_CTL, (cmp))
-#define sk_EVP_PBE_CTL_new_null() SKM_sk_new_null(EVP_PBE_CTL)
-#define sk_EVP_PBE_CTL_free(st) SKM_sk_free(EVP_PBE_CTL, (st))
-#define sk_EVP_PBE_CTL_num(st) SKM_sk_num(EVP_PBE_CTL, (st))
-#define sk_EVP_PBE_CTL_value(st, i) SKM_sk_value(EVP_PBE_CTL, (st), (i))
-#define sk_EVP_PBE_CTL_set(st, i, val) SKM_sk_set(EVP_PBE_CTL, (st), (i), (val))
-#define sk_EVP_PBE_CTL_zero(st) SKM_sk_zero(EVP_PBE_CTL, (st))
-#define sk_EVP_PBE_CTL_push(st, val) SKM_sk_push(EVP_PBE_CTL, (st), (val))
-#define sk_EVP_PBE_CTL_unshift(st, val) SKM_sk_unshift(EVP_PBE_CTL, (st), (val))
-#define sk_EVP_PBE_CTL_find(st, val) SKM_sk_find(EVP_PBE_CTL, (st), (val))
-#define sk_EVP_PBE_CTL_find_ex(st, val) SKM_sk_find_ex(EVP_PBE_CTL, (st), (val))
-#define sk_EVP_PBE_CTL_delete(st, i) SKM_sk_delete(EVP_PBE_CTL, (st), (i))
-#define sk_EVP_PBE_CTL_delete_ptr(st, ptr) SKM_sk_delete_ptr(EVP_PBE_CTL, (st), (ptr))
-#define sk_EVP_PBE_CTL_insert(st, val, i) SKM_sk_insert(EVP_PBE_CTL, (st), (val), (i))
-#define sk_EVP_PBE_CTL_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(EVP_PBE_CTL, (st), (cmp))
-#define sk_EVP_PBE_CTL_dup(st) SKM_sk_dup(EVP_PBE_CTL, st)
-#define sk_EVP_PBE_CTL_pop_free(st, free_func) SKM_sk_pop_free(EVP_PBE_CTL, (st), (free_func))
-#define sk_EVP_PBE_CTL_shift(st) SKM_sk_shift(EVP_PBE_CTL, (st))
-#define sk_EVP_PBE_CTL_pop(st) SKM_sk_pop(EVP_PBE_CTL, (st))
-#define sk_EVP_PBE_CTL_sort(st) SKM_sk_sort(EVP_PBE_CTL, (st))
-#define sk_EVP_PBE_CTL_is_sorted(st) SKM_sk_is_sorted(EVP_PBE_CTL, (st))
-
-#define sk_EVP_PKEY_ASN1_METHOD_new(cmp) SKM_sk_new(EVP_PKEY_ASN1_METHOD, (cmp))
-#define sk_EVP_PKEY_ASN1_METHOD_new_null() SKM_sk_new_null(EVP_PKEY_ASN1_METHOD)
-#define sk_EVP_PKEY_ASN1_METHOD_free(st) SKM_sk_free(EVP_PKEY_ASN1_METHOD, (st))
-#define sk_EVP_PKEY_ASN1_METHOD_num(st) SKM_sk_num(EVP_PKEY_ASN1_METHOD, (st))
-#define sk_EVP_PKEY_ASN1_METHOD_value(st, i) SKM_sk_value(EVP_PKEY_ASN1_METHOD, (st), (i))
-#define sk_EVP_PKEY_ASN1_METHOD_set(st, i, val) SKM_sk_set(EVP_PKEY_ASN1_METHOD, (st), (i), (val))
-#define sk_EVP_PKEY_ASN1_METHOD_zero(st) SKM_sk_zero(EVP_PKEY_ASN1_METHOD, (st))
-#define sk_EVP_PKEY_ASN1_METHOD_push(st, val) SKM_sk_push(EVP_PKEY_ASN1_METHOD, (st), (val))
-#define sk_EVP_PKEY_ASN1_METHOD_unshift(st, val) SKM_sk_unshift(EVP_PKEY_ASN1_METHOD, (st), (val))
-#define sk_EVP_PKEY_ASN1_METHOD_find(st, val) SKM_sk_find(EVP_PKEY_ASN1_METHOD, (st), (val))
-#define sk_EVP_PKEY_ASN1_METHOD_find_ex(st, val) SKM_sk_find_ex(EVP_PKEY_ASN1_METHOD, (st), (val))
-#define sk_EVP_PKEY_ASN1_METHOD_delete(st, i) SKM_sk_delete(EVP_PKEY_ASN1_METHOD, (st), (i))
-#define sk_EVP_PKEY_ASN1_METHOD_delete_ptr(st, ptr) SKM_sk_delete_ptr(EVP_PKEY_ASN1_METHOD, (st), (ptr))
-#define sk_EVP_PKEY_ASN1_METHOD_insert(st, val, i) SKM_sk_insert(EVP_PKEY_ASN1_METHOD, (st), (val), (i))
-#define sk_EVP_PKEY_ASN1_METHOD_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(EVP_PKEY_ASN1_METHOD, (st), (cmp))
-#define sk_EVP_PKEY_ASN1_METHOD_dup(st) SKM_sk_dup(EVP_PKEY_ASN1_METHOD, st)
-#define sk_EVP_PKEY_ASN1_METHOD_pop_free(st, free_func) SKM_sk_pop_free(EVP_PKEY_ASN1_METHOD, (st), (free_func))
-#define sk_EVP_PKEY_ASN1_METHOD_shift(st) SKM_sk_shift(EVP_PKEY_ASN1_METHOD, (st))
-#define sk_EVP_PKEY_ASN1_METHOD_pop(st) SKM_sk_pop(EVP_PKEY_ASN1_METHOD, (st))
-#define sk_EVP_PKEY_ASN1_METHOD_sort(st) SKM_sk_sort(EVP_PKEY_ASN1_METHOD, (st))
-#define sk_EVP_PKEY_ASN1_METHOD_is_sorted(st) SKM_sk_is_sorted(EVP_PKEY_ASN1_METHOD, (st))
-
-#define sk_EVP_PKEY_METHOD_new(cmp) SKM_sk_new(EVP_PKEY_METHOD, (cmp))
-#define sk_EVP_PKEY_METHOD_new_null() SKM_sk_new_null(EVP_PKEY_METHOD)
-#define sk_EVP_PKEY_METHOD_free(st) SKM_sk_free(EVP_PKEY_METHOD, (st))
-#define sk_EVP_PKEY_METHOD_num(st) SKM_sk_num(EVP_PKEY_METHOD, (st))
-#define sk_EVP_PKEY_METHOD_value(st, i) SKM_sk_value(EVP_PKEY_METHOD, (st), (i))
-#define sk_EVP_PKEY_METHOD_set(st, i, val) SKM_sk_set(EVP_PKEY_METHOD, (st), (i), (val))
-#define sk_EVP_PKEY_METHOD_zero(st) SKM_sk_zero(EVP_PKEY_METHOD, (st))
-#define sk_EVP_PKEY_METHOD_push(st, val) SKM_sk_push(EVP_PKEY_METHOD, (st), (val))
-#define sk_EVP_PKEY_METHOD_unshift(st, val) SKM_sk_unshift(EVP_PKEY_METHOD, (st), (val))
-#define sk_EVP_PKEY_METHOD_find(st, val) SKM_sk_find(EVP_PKEY_METHOD, (st), (val))
-#define sk_EVP_PKEY_METHOD_find_ex(st, val) SKM_sk_find_ex(EVP_PKEY_METHOD, (st), (val))
-#define sk_EVP_PKEY_METHOD_delete(st, i) SKM_sk_delete(EVP_PKEY_METHOD, (st), (i))
-#define sk_EVP_PKEY_METHOD_delete_ptr(st, ptr) SKM_sk_delete_ptr(EVP_PKEY_METHOD, (st), (ptr))
-#define sk_EVP_PKEY_METHOD_insert(st, val, i) SKM_sk_insert(EVP_PKEY_METHOD, (st), (val), (i))
-#define sk_EVP_PKEY_METHOD_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(EVP_PKEY_METHOD, (st), (cmp))
-#define sk_EVP_PKEY_METHOD_dup(st) SKM_sk_dup(EVP_PKEY_METHOD, st)
-#define sk_EVP_PKEY_METHOD_pop_free(st, free_func) SKM_sk_pop_free(EVP_PKEY_METHOD, (st), (free_func))
-#define sk_EVP_PKEY_METHOD_shift(st) SKM_sk_shift(EVP_PKEY_METHOD, (st))
-#define sk_EVP_PKEY_METHOD_pop(st) SKM_sk_pop(EVP_PKEY_METHOD, (st))
-#define sk_EVP_PKEY_METHOD_sort(st) SKM_sk_sort(EVP_PKEY_METHOD, (st))
-#define sk_EVP_PKEY_METHOD_is_sorted(st) SKM_sk_is_sorted(EVP_PKEY_METHOD, (st))
-
-#define sk_GENERAL_NAME_new(cmp) SKM_sk_new(GENERAL_NAME, (cmp))
-#define sk_GENERAL_NAME_new_null() SKM_sk_new_null(GENERAL_NAME)
-#define sk_GENERAL_NAME_free(st) SKM_sk_free(GENERAL_NAME, (st))
-#define sk_GENERAL_NAME_num(st) SKM_sk_num(GENERAL_NAME, (st))
-#define sk_GENERAL_NAME_value(st, i) SKM_sk_value(GENERAL_NAME, (st), (i))
-#define sk_GENERAL_NAME_set(st, i, val) SKM_sk_set(GENERAL_NAME, (st), (i), (val))
-#define sk_GENERAL_NAME_zero(st) SKM_sk_zero(GENERAL_NAME, (st))
-#define sk_GENERAL_NAME_push(st, val) SKM_sk_push(GENERAL_NAME, (st), (val))
-#define sk_GENERAL_NAME_unshift(st, val) SKM_sk_unshift(GENERAL_NAME, (st), (val))
-#define sk_GENERAL_NAME_find(st, val) SKM_sk_find(GENERAL_NAME, (st), (val))
-#define sk_GENERAL_NAME_find_ex(st, val) SKM_sk_find_ex(GENERAL_NAME, (st), (val))
-#define sk_GENERAL_NAME_delete(st, i) SKM_sk_delete(GENERAL_NAME, (st), (i))
-#define sk_GENERAL_NAME_delete_ptr(st, ptr) SKM_sk_delete_ptr(GENERAL_NAME, (st), (ptr))
-#define sk_GENERAL_NAME_insert(st, val, i) SKM_sk_insert(GENERAL_NAME, (st), (val), (i))
-#define sk_GENERAL_NAME_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(GENERAL_NAME, (st), (cmp))
-#define sk_GENERAL_NAME_dup(st) SKM_sk_dup(GENERAL_NAME, st)
-#define sk_GENERAL_NAME_pop_free(st, free_func) SKM_sk_pop_free(GENERAL_NAME, (st), (free_func))
-#define sk_GENERAL_NAME_shift(st) SKM_sk_shift(GENERAL_NAME, (st))
-#define sk_GENERAL_NAME_pop(st) SKM_sk_pop(GENERAL_NAME, (st))
-#define sk_GENERAL_NAME_sort(st) SKM_sk_sort(GENERAL_NAME, (st))
-#define sk_GENERAL_NAME_is_sorted(st) SKM_sk_is_sorted(GENERAL_NAME, (st))
-
-#define sk_GENERAL_NAMES_new(cmp) SKM_sk_new(GENERAL_NAMES, (cmp))
-#define sk_GENERAL_NAMES_new_null() SKM_sk_new_null(GENERAL_NAMES)
-#define sk_GENERAL_NAMES_free(st) SKM_sk_free(GENERAL_NAMES, (st))
-#define sk_GENERAL_NAMES_num(st) SKM_sk_num(GENERAL_NAMES, (st))
-#define sk_GENERAL_NAMES_value(st, i) SKM_sk_value(GENERAL_NAMES, (st), (i))
-#define sk_GENERAL_NAMES_set(st, i, val) SKM_sk_set(GENERAL_NAMES, (st), (i), (val))
-#define sk_GENERAL_NAMES_zero(st) SKM_sk_zero(GENERAL_NAMES, (st))
-#define sk_GENERAL_NAMES_push(st, val) SKM_sk_push(GENERAL_NAMES, (st), (val))
-#define sk_GENERAL_NAMES_unshift(st, val) SKM_sk_unshift(GENERAL_NAMES, (st), (val))
-#define sk_GENERAL_NAMES_find(st, val) SKM_sk_find(GENERAL_NAMES, (st), (val))
-#define sk_GENERAL_NAMES_find_ex(st, val) SKM_sk_find_ex(GENERAL_NAMES, (st), (val))
-#define sk_GENERAL_NAMES_delete(st, i) SKM_sk_delete(GENERAL_NAMES, (st), (i))
-#define sk_GENERAL_NAMES_delete_ptr(st, ptr) SKM_sk_delete_ptr(GENERAL_NAMES, (st), (ptr))
-#define sk_GENERAL_NAMES_insert(st, val, i) SKM_sk_insert(GENERAL_NAMES, (st), (val), (i))
-#define sk_GENERAL_NAMES_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(GENERAL_NAMES, (st), (cmp))
-#define sk_GENERAL_NAMES_dup(st) SKM_sk_dup(GENERAL_NAMES, st)
-#define sk_GENERAL_NAMES_pop_free(st, free_func) SKM_sk_pop_free(GENERAL_NAMES, (st), (free_func))
-#define sk_GENERAL_NAMES_shift(st) SKM_sk_shift(GENERAL_NAMES, (st))
-#define sk_GENERAL_NAMES_pop(st) SKM_sk_pop(GENERAL_NAMES, (st))
-#define sk_GENERAL_NAMES_sort(st) SKM_sk_sort(GENERAL_NAMES, (st))
-#define sk_GENERAL_NAMES_is_sorted(st) SKM_sk_is_sorted(GENERAL_NAMES, (st))
-
-#define sk_GENERAL_SUBTREE_new(cmp) SKM_sk_new(GENERAL_SUBTREE, (cmp))
-#define sk_GENERAL_SUBTREE_new_null() SKM_sk_new_null(GENERAL_SUBTREE)
-#define sk_GENERAL_SUBTREE_free(st) SKM_sk_free(GENERAL_SUBTREE, (st))
-#define sk_GENERAL_SUBTREE_num(st) SKM_sk_num(GENERAL_SUBTREE, (st))
-#define sk_GENERAL_SUBTREE_value(st, i) SKM_sk_value(GENERAL_SUBTREE, (st), (i))
-#define sk_GENERAL_SUBTREE_set(st, i, val) SKM_sk_set(GENERAL_SUBTREE, (st), (i), (val))
-#define sk_GENERAL_SUBTREE_zero(st) SKM_sk_zero(GENERAL_SUBTREE, (st))
-#define sk_GENERAL_SUBTREE_push(st, val) SKM_sk_push(GENERAL_SUBTREE, (st), (val))
-#define sk_GENERAL_SUBTREE_unshift(st, val) SKM_sk_unshift(GENERAL_SUBTREE, (st), (val))
-#define sk_GENERAL_SUBTREE_find(st, val) SKM_sk_find(GENERAL_SUBTREE, (st), (val))
-#define sk_GENERAL_SUBTREE_find_ex(st, val) SKM_sk_find_ex(GENERAL_SUBTREE, (st), (val))
-#define sk_GENERAL_SUBTREE_delete(st, i) SKM_sk_delete(GENERAL_SUBTREE, (st), (i))
-#define sk_GENERAL_SUBTREE_delete_ptr(st, ptr) SKM_sk_delete_ptr(GENERAL_SUBTREE, (st), (ptr))
-#define sk_GENERAL_SUBTREE_insert(st, val, i) SKM_sk_insert(GENERAL_SUBTREE, (st), (val), (i))
-#define sk_GENERAL_SUBTREE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(GENERAL_SUBTREE, (st), (cmp))
-#define sk_GENERAL_SUBTREE_dup(st) SKM_sk_dup(GENERAL_SUBTREE, st)
-#define sk_GENERAL_SUBTREE_pop_free(st, free_func) SKM_sk_pop_free(GENERAL_SUBTREE, (st), (free_func))
-#define sk_GENERAL_SUBTREE_shift(st) SKM_sk_shift(GENERAL_SUBTREE, (st))
-#define sk_GENERAL_SUBTREE_pop(st) SKM_sk_pop(GENERAL_SUBTREE, (st))
-#define sk_GENERAL_SUBTREE_sort(st) SKM_sk_sort(GENERAL_SUBTREE, (st))
-#define sk_GENERAL_SUBTREE_is_sorted(st) SKM_sk_is_sorted(GENERAL_SUBTREE, (st))
-
-#define sk_IPAddressFamily_new(cmp) SKM_sk_new(IPAddressFamily, (cmp))
-#define sk_IPAddressFamily_new_null() SKM_sk_new_null(IPAddressFamily)
-#define sk_IPAddressFamily_free(st) SKM_sk_free(IPAddressFamily, (st))
-#define sk_IPAddressFamily_num(st) SKM_sk_num(IPAddressFamily, (st))
-#define sk_IPAddressFamily_value(st, i) SKM_sk_value(IPAddressFamily, (st), (i))
-#define sk_IPAddressFamily_set(st, i, val) SKM_sk_set(IPAddressFamily, (st), (i), (val))
-#define sk_IPAddressFamily_zero(st) SKM_sk_zero(IPAddressFamily, (st))
-#define sk_IPAddressFamily_push(st, val) SKM_sk_push(IPAddressFamily, (st), (val))
-#define sk_IPAddressFamily_unshift(st, val) SKM_sk_unshift(IPAddressFamily, (st), (val))
-#define sk_IPAddressFamily_find(st, val) SKM_sk_find(IPAddressFamily, (st), (val))
-#define sk_IPAddressFamily_find_ex(st, val) SKM_sk_find_ex(IPAddressFamily, (st), (val))
-#define sk_IPAddressFamily_delete(st, i) SKM_sk_delete(IPAddressFamily, (st), (i))
-#define sk_IPAddressFamily_delete_ptr(st, ptr) SKM_sk_delete_ptr(IPAddressFamily, (st), (ptr))
-#define sk_IPAddressFamily_insert(st, val, i) SKM_sk_insert(IPAddressFamily, (st), (val), (i))
-#define sk_IPAddressFamily_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(IPAddressFamily, (st), (cmp))
-#define sk_IPAddressFamily_dup(st) SKM_sk_dup(IPAddressFamily, st)
-#define sk_IPAddressFamily_pop_free(st, free_func) SKM_sk_pop_free(IPAddressFamily, (st), (free_func))
-#define sk_IPAddressFamily_shift(st) SKM_sk_shift(IPAddressFamily, (st))
-#define sk_IPAddressFamily_pop(st) SKM_sk_pop(IPAddressFamily, (st))
-#define sk_IPAddressFamily_sort(st) SKM_sk_sort(IPAddressFamily, (st))
-#define sk_IPAddressFamily_is_sorted(st) SKM_sk_is_sorted(IPAddressFamily, (st))
-
-#define sk_IPAddressOrRange_new(cmp) SKM_sk_new(IPAddressOrRange, (cmp))
-#define sk_IPAddressOrRange_new_null() SKM_sk_new_null(IPAddressOrRange)
-#define sk_IPAddressOrRange_free(st) SKM_sk_free(IPAddressOrRange, (st))
-#define sk_IPAddressOrRange_num(st) SKM_sk_num(IPAddressOrRange, (st))
-#define sk_IPAddressOrRange_value(st, i) SKM_sk_value(IPAddressOrRange, (st), (i))
-#define sk_IPAddressOrRange_set(st, i, val) SKM_sk_set(IPAddressOrRange, (st), (i), (val))
-#define sk_IPAddressOrRange_zero(st) SKM_sk_zero(IPAddressOrRange, (st))
-#define sk_IPAddressOrRange_push(st, val) SKM_sk_push(IPAddressOrRange, (st), (val))
-#define sk_IPAddressOrRange_unshift(st, val) SKM_sk_unshift(IPAddressOrRange, (st), (val))
-#define sk_IPAddressOrRange_find(st, val) SKM_sk_find(IPAddressOrRange, (st), (val))
-#define sk_IPAddressOrRange_find_ex(st, val) SKM_sk_find_ex(IPAddressOrRange, (st), (val))
-#define sk_IPAddressOrRange_delete(st, i) SKM_sk_delete(IPAddressOrRange, (st), (i))
-#define sk_IPAddressOrRange_delete_ptr(st, ptr) SKM_sk_delete_ptr(IPAddressOrRange, (st), (ptr))
-#define sk_IPAddressOrRange_insert(st, val, i) SKM_sk_insert(IPAddressOrRange, (st), (val), (i))
-#define sk_IPAddressOrRange_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(IPAddressOrRange, (st), (cmp))
-#define sk_IPAddressOrRange_dup(st) SKM_sk_dup(IPAddressOrRange, st)
-#define sk_IPAddressOrRange_pop_free(st, free_func) SKM_sk_pop_free(IPAddressOrRange, (st), (free_func))
-#define sk_IPAddressOrRange_shift(st) SKM_sk_shift(IPAddressOrRange, (st))
-#define sk_IPAddressOrRange_pop(st) SKM_sk_pop(IPAddressOrRange, (st))
-#define sk_IPAddressOrRange_sort(st) SKM_sk_sort(IPAddressOrRange, (st))
-#define sk_IPAddressOrRange_is_sorted(st) SKM_sk_is_sorted(IPAddressOrRange, (st))
-
-#define sk_KRB5_APREQBODY_new(cmp) SKM_sk_new(KRB5_APREQBODY, (cmp))
-#define sk_KRB5_APREQBODY_new_null() SKM_sk_new_null(KRB5_APREQBODY)
-#define sk_KRB5_APREQBODY_free(st) SKM_sk_free(KRB5_APREQBODY, (st))
-#define sk_KRB5_APREQBODY_num(st) SKM_sk_num(KRB5_APREQBODY, (st))
-#define sk_KRB5_APREQBODY_value(st, i) SKM_sk_value(KRB5_APREQBODY, (st), (i))
-#define sk_KRB5_APREQBODY_set(st, i, val) SKM_sk_set(KRB5_APREQBODY, (st), (i), (val))
-#define sk_KRB5_APREQBODY_zero(st) SKM_sk_zero(KRB5_APREQBODY, (st))
-#define sk_KRB5_APREQBODY_push(st, val) SKM_sk_push(KRB5_APREQBODY, (st), (val))
-#define sk_KRB5_APREQBODY_unshift(st, val) SKM_sk_unshift(KRB5_APREQBODY, (st), (val))
-#define sk_KRB5_APREQBODY_find(st, val) SKM_sk_find(KRB5_APREQBODY, (st), (val))
-#define sk_KRB5_APREQBODY_find_ex(st, val) SKM_sk_find_ex(KRB5_APREQBODY, (st), (val))
-#define sk_KRB5_APREQBODY_delete(st, i) SKM_sk_delete(KRB5_APREQBODY, (st), (i))
-#define sk_KRB5_APREQBODY_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_APREQBODY, (st), (ptr))
-#define sk_KRB5_APREQBODY_insert(st, val, i) SKM_sk_insert(KRB5_APREQBODY, (st), (val), (i))
-#define sk_KRB5_APREQBODY_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_APREQBODY, (st), (cmp))
-#define sk_KRB5_APREQBODY_dup(st) SKM_sk_dup(KRB5_APREQBODY, st)
-#define sk_KRB5_APREQBODY_pop_free(st, free_func) SKM_sk_pop_free(KRB5_APREQBODY, (st), (free_func))
-#define sk_KRB5_APREQBODY_shift(st) SKM_sk_shift(KRB5_APREQBODY, (st))
-#define sk_KRB5_APREQBODY_pop(st) SKM_sk_pop(KRB5_APREQBODY, (st))
-#define sk_KRB5_APREQBODY_sort(st) SKM_sk_sort(KRB5_APREQBODY, (st))
-#define sk_KRB5_APREQBODY_is_sorted(st) SKM_sk_is_sorted(KRB5_APREQBODY, (st))
-
-#define sk_KRB5_AUTHDATA_new(cmp) SKM_sk_new(KRB5_AUTHDATA, (cmp))
-#define sk_KRB5_AUTHDATA_new_null() SKM_sk_new_null(KRB5_AUTHDATA)
-#define sk_KRB5_AUTHDATA_free(st) SKM_sk_free(KRB5_AUTHDATA, (st))
-#define sk_KRB5_AUTHDATA_num(st) SKM_sk_num(KRB5_AUTHDATA, (st))
-#define sk_KRB5_AUTHDATA_value(st, i) SKM_sk_value(KRB5_AUTHDATA, (st), (i))
-#define sk_KRB5_AUTHDATA_set(st, i, val) SKM_sk_set(KRB5_AUTHDATA, (st), (i), (val))
-#define sk_KRB5_AUTHDATA_zero(st) SKM_sk_zero(KRB5_AUTHDATA, (st))
-#define sk_KRB5_AUTHDATA_push(st, val) SKM_sk_push(KRB5_AUTHDATA, (st), (val))
-#define sk_KRB5_AUTHDATA_unshift(st, val) SKM_sk_unshift(KRB5_AUTHDATA, (st), (val))
-#define sk_KRB5_AUTHDATA_find(st, val) SKM_sk_find(KRB5_AUTHDATA, (st), (val))
-#define sk_KRB5_AUTHDATA_find_ex(st, val) SKM_sk_find_ex(KRB5_AUTHDATA, (st), (val))
-#define sk_KRB5_AUTHDATA_delete(st, i) SKM_sk_delete(KRB5_AUTHDATA, (st), (i))
-#define sk_KRB5_AUTHDATA_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_AUTHDATA, (st), (ptr))
-#define sk_KRB5_AUTHDATA_insert(st, val, i) SKM_sk_insert(KRB5_AUTHDATA, (st), (val), (i))
-#define sk_KRB5_AUTHDATA_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_AUTHDATA, (st), (cmp))
-#define sk_KRB5_AUTHDATA_dup(st) SKM_sk_dup(KRB5_AUTHDATA, st)
-#define sk_KRB5_AUTHDATA_pop_free(st, free_func) SKM_sk_pop_free(KRB5_AUTHDATA, (st), (free_func))
-#define sk_KRB5_AUTHDATA_shift(st) SKM_sk_shift(KRB5_AUTHDATA, (st))
-#define sk_KRB5_AUTHDATA_pop(st) SKM_sk_pop(KRB5_AUTHDATA, (st))
-#define sk_KRB5_AUTHDATA_sort(st) SKM_sk_sort(KRB5_AUTHDATA, (st))
-#define sk_KRB5_AUTHDATA_is_sorted(st) SKM_sk_is_sorted(KRB5_AUTHDATA, (st))
-
-#define sk_KRB5_AUTHENTBODY_new(cmp) SKM_sk_new(KRB5_AUTHENTBODY, (cmp))
-#define sk_KRB5_AUTHENTBODY_new_null() SKM_sk_new_null(KRB5_AUTHENTBODY)
-#define sk_KRB5_AUTHENTBODY_free(st) SKM_sk_free(KRB5_AUTHENTBODY, (st))
-#define sk_KRB5_AUTHENTBODY_num(st) SKM_sk_num(KRB5_AUTHENTBODY, (st))
-#define sk_KRB5_AUTHENTBODY_value(st, i) SKM_sk_value(KRB5_AUTHENTBODY, (st), (i))
-#define sk_KRB5_AUTHENTBODY_set(st, i, val) SKM_sk_set(KRB5_AUTHENTBODY, (st), (i), (val))
-#define sk_KRB5_AUTHENTBODY_zero(st) SKM_sk_zero(KRB5_AUTHENTBODY, (st))
-#define sk_KRB5_AUTHENTBODY_push(st, val) SKM_sk_push(KRB5_AUTHENTBODY, (st), (val))
-#define sk_KRB5_AUTHENTBODY_unshift(st, val) SKM_sk_unshift(KRB5_AUTHENTBODY, (st), (val))
-#define sk_KRB5_AUTHENTBODY_find(st, val) SKM_sk_find(KRB5_AUTHENTBODY, (st), (val))
-#define sk_KRB5_AUTHENTBODY_find_ex(st, val) SKM_sk_find_ex(KRB5_AUTHENTBODY, (st), (val))
-#define sk_KRB5_AUTHENTBODY_delete(st, i) SKM_sk_delete(KRB5_AUTHENTBODY, (st), (i))
-#define sk_KRB5_AUTHENTBODY_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_AUTHENTBODY, (st), (ptr))
-#define sk_KRB5_AUTHENTBODY_insert(st, val, i) SKM_sk_insert(KRB5_AUTHENTBODY, (st), (val), (i))
-#define sk_KRB5_AUTHENTBODY_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_AUTHENTBODY, (st), (cmp))
-#define sk_KRB5_AUTHENTBODY_dup(st) SKM_sk_dup(KRB5_AUTHENTBODY, st)
-#define sk_KRB5_AUTHENTBODY_pop_free(st, free_func) SKM_sk_pop_free(KRB5_AUTHENTBODY, (st), (free_func))
-#define sk_KRB5_AUTHENTBODY_shift(st) SKM_sk_shift(KRB5_AUTHENTBODY, (st))
-#define sk_KRB5_AUTHENTBODY_pop(st) SKM_sk_pop(KRB5_AUTHENTBODY, (st))
-#define sk_KRB5_AUTHENTBODY_sort(st) SKM_sk_sort(KRB5_AUTHENTBODY, (st))
-#define sk_KRB5_AUTHENTBODY_is_sorted(st) SKM_sk_is_sorted(KRB5_AUTHENTBODY, (st))
-
-#define sk_KRB5_CHECKSUM_new(cmp) SKM_sk_new(KRB5_CHECKSUM, (cmp))
-#define sk_KRB5_CHECKSUM_new_null() SKM_sk_new_null(KRB5_CHECKSUM)
-#define sk_KRB5_CHECKSUM_free(st) SKM_sk_free(KRB5_CHECKSUM, (st))
-#define sk_KRB5_CHECKSUM_num(st) SKM_sk_num(KRB5_CHECKSUM, (st))
-#define sk_KRB5_CHECKSUM_value(st, i) SKM_sk_value(KRB5_CHECKSUM, (st), (i))
-#define sk_KRB5_CHECKSUM_set(st, i, val) SKM_sk_set(KRB5_CHECKSUM, (st), (i), (val))
-#define sk_KRB5_CHECKSUM_zero(st) SKM_sk_zero(KRB5_CHECKSUM, (st))
-#define sk_KRB5_CHECKSUM_push(st, val) SKM_sk_push(KRB5_CHECKSUM, (st), (val))
-#define sk_KRB5_CHECKSUM_unshift(st, val) SKM_sk_unshift(KRB5_CHECKSUM, (st), (val))
-#define sk_KRB5_CHECKSUM_find(st, val) SKM_sk_find(KRB5_CHECKSUM, (st), (val))
-#define sk_KRB5_CHECKSUM_find_ex(st, val) SKM_sk_find_ex(KRB5_CHECKSUM, (st), (val))
-#define sk_KRB5_CHECKSUM_delete(st, i) SKM_sk_delete(KRB5_CHECKSUM, (st), (i))
-#define sk_KRB5_CHECKSUM_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_CHECKSUM, (st), (ptr))
-#define sk_KRB5_CHECKSUM_insert(st, val, i) SKM_sk_insert(KRB5_CHECKSUM, (st), (val), (i))
-#define sk_KRB5_CHECKSUM_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_CHECKSUM, (st), (cmp))
-#define sk_KRB5_CHECKSUM_dup(st) SKM_sk_dup(KRB5_CHECKSUM, st)
-#define sk_KRB5_CHECKSUM_pop_free(st, free_func) SKM_sk_pop_free(KRB5_CHECKSUM, (st), (free_func))
-#define sk_KRB5_CHECKSUM_shift(st) SKM_sk_shift(KRB5_CHECKSUM, (st))
-#define sk_KRB5_CHECKSUM_pop(st) SKM_sk_pop(KRB5_CHECKSUM, (st))
-#define sk_KRB5_CHECKSUM_sort(st) SKM_sk_sort(KRB5_CHECKSUM, (st))
-#define sk_KRB5_CHECKSUM_is_sorted(st) SKM_sk_is_sorted(KRB5_CHECKSUM, (st))
-
-#define sk_KRB5_ENCDATA_new(cmp) SKM_sk_new(KRB5_ENCDATA, (cmp))
-#define sk_KRB5_ENCDATA_new_null() SKM_sk_new_null(KRB5_ENCDATA)
-#define sk_KRB5_ENCDATA_free(st) SKM_sk_free(KRB5_ENCDATA, (st))
-#define sk_KRB5_ENCDATA_num(st) SKM_sk_num(KRB5_ENCDATA, (st))
-#define sk_KRB5_ENCDATA_value(st, i) SKM_sk_value(KRB5_ENCDATA, (st), (i))
-#define sk_KRB5_ENCDATA_set(st, i, val) SKM_sk_set(KRB5_ENCDATA, (st), (i), (val))
-#define sk_KRB5_ENCDATA_zero(st) SKM_sk_zero(KRB5_ENCDATA, (st))
-#define sk_KRB5_ENCDATA_push(st, val) SKM_sk_push(KRB5_ENCDATA, (st), (val))
-#define sk_KRB5_ENCDATA_unshift(st, val) SKM_sk_unshift(KRB5_ENCDATA, (st), (val))
-#define sk_KRB5_ENCDATA_find(st, val) SKM_sk_find(KRB5_ENCDATA, (st), (val))
-#define sk_KRB5_ENCDATA_find_ex(st, val) SKM_sk_find_ex(KRB5_ENCDATA, (st), (val))
-#define sk_KRB5_ENCDATA_delete(st, i) SKM_sk_delete(KRB5_ENCDATA, (st), (i))
-#define sk_KRB5_ENCDATA_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_ENCDATA, (st), (ptr))
-#define sk_KRB5_ENCDATA_insert(st, val, i) SKM_sk_insert(KRB5_ENCDATA, (st), (val), (i))
-#define sk_KRB5_ENCDATA_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_ENCDATA, (st), (cmp))
-#define sk_KRB5_ENCDATA_dup(st) SKM_sk_dup(KRB5_ENCDATA, st)
-#define sk_KRB5_ENCDATA_pop_free(st, free_func) SKM_sk_pop_free(KRB5_ENCDATA, (st), (free_func))
-#define sk_KRB5_ENCDATA_shift(st) SKM_sk_shift(KRB5_ENCDATA, (st))
-#define sk_KRB5_ENCDATA_pop(st) SKM_sk_pop(KRB5_ENCDATA, (st))
-#define sk_KRB5_ENCDATA_sort(st) SKM_sk_sort(KRB5_ENCDATA, (st))
-#define sk_KRB5_ENCDATA_is_sorted(st) SKM_sk_is_sorted(KRB5_ENCDATA, (st))
-
-#define sk_KRB5_ENCKEY_new(cmp) SKM_sk_new(KRB5_ENCKEY, (cmp))
-#define sk_KRB5_ENCKEY_new_null() SKM_sk_new_null(KRB5_ENCKEY)
-#define sk_KRB5_ENCKEY_free(st) SKM_sk_free(KRB5_ENCKEY, (st))
-#define sk_KRB5_ENCKEY_num(st) SKM_sk_num(KRB5_ENCKEY, (st))
-#define sk_KRB5_ENCKEY_value(st, i) SKM_sk_value(KRB5_ENCKEY, (st), (i))
-#define sk_KRB5_ENCKEY_set(st, i, val) SKM_sk_set(KRB5_ENCKEY, (st), (i), (val))
-#define sk_KRB5_ENCKEY_zero(st) SKM_sk_zero(KRB5_ENCKEY, (st))
-#define sk_KRB5_ENCKEY_push(st, val) SKM_sk_push(KRB5_ENCKEY, (st), (val))
-#define sk_KRB5_ENCKEY_unshift(st, val) SKM_sk_unshift(KRB5_ENCKEY, (st), (val))
-#define sk_KRB5_ENCKEY_find(st, val) SKM_sk_find(KRB5_ENCKEY, (st), (val))
-#define sk_KRB5_ENCKEY_find_ex(st, val) SKM_sk_find_ex(KRB5_ENCKEY, (st), (val))
-#define sk_KRB5_ENCKEY_delete(st, i) SKM_sk_delete(KRB5_ENCKEY, (st), (i))
-#define sk_KRB5_ENCKEY_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_ENCKEY, (st), (ptr))
-#define sk_KRB5_ENCKEY_insert(st, val, i) SKM_sk_insert(KRB5_ENCKEY, (st), (val), (i))
-#define sk_KRB5_ENCKEY_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_ENCKEY, (st), (cmp))
-#define sk_KRB5_ENCKEY_dup(st) SKM_sk_dup(KRB5_ENCKEY, st)
-#define sk_KRB5_ENCKEY_pop_free(st, free_func) SKM_sk_pop_free(KRB5_ENCKEY, (st), (free_func))
-#define sk_KRB5_ENCKEY_shift(st) SKM_sk_shift(KRB5_ENCKEY, (st))
-#define sk_KRB5_ENCKEY_pop(st) SKM_sk_pop(KRB5_ENCKEY, (st))
-#define sk_KRB5_ENCKEY_sort(st) SKM_sk_sort(KRB5_ENCKEY, (st))
-#define sk_KRB5_ENCKEY_is_sorted(st) SKM_sk_is_sorted(KRB5_ENCKEY, (st))
-
-#define sk_KRB5_PRINCNAME_new(cmp) SKM_sk_new(KRB5_PRINCNAME, (cmp))
-#define sk_KRB5_PRINCNAME_new_null() SKM_sk_new_null(KRB5_PRINCNAME)
-#define sk_KRB5_PRINCNAME_free(st) SKM_sk_free(KRB5_PRINCNAME, (st))
-#define sk_KRB5_PRINCNAME_num(st) SKM_sk_num(KRB5_PRINCNAME, (st))
-#define sk_KRB5_PRINCNAME_value(st, i) SKM_sk_value(KRB5_PRINCNAME, (st), (i))
-#define sk_KRB5_PRINCNAME_set(st, i, val) SKM_sk_set(KRB5_PRINCNAME, (st), (i), (val))
-#define sk_KRB5_PRINCNAME_zero(st) SKM_sk_zero(KRB5_PRINCNAME, (st))
-#define sk_KRB5_PRINCNAME_push(st, val) SKM_sk_push(KRB5_PRINCNAME, (st), (val))
-#define sk_KRB5_PRINCNAME_unshift(st, val) SKM_sk_unshift(KRB5_PRINCNAME, (st), (val))
-#define sk_KRB5_PRINCNAME_find(st, val) SKM_sk_find(KRB5_PRINCNAME, (st), (val))
-#define sk_KRB5_PRINCNAME_find_ex(st, val) SKM_sk_find_ex(KRB5_PRINCNAME, (st), (val))
-#define sk_KRB5_PRINCNAME_delete(st, i) SKM_sk_delete(KRB5_PRINCNAME, (st), (i))
-#define sk_KRB5_PRINCNAME_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_PRINCNAME, (st), (ptr))
-#define sk_KRB5_PRINCNAME_insert(st, val, i) SKM_sk_insert(KRB5_PRINCNAME, (st), (val), (i))
-#define sk_KRB5_PRINCNAME_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_PRINCNAME, (st), (cmp))
-#define sk_KRB5_PRINCNAME_dup(st) SKM_sk_dup(KRB5_PRINCNAME, st)
-#define sk_KRB5_PRINCNAME_pop_free(st, free_func) SKM_sk_pop_free(KRB5_PRINCNAME, (st), (free_func))
-#define sk_KRB5_PRINCNAME_shift(st) SKM_sk_shift(KRB5_PRINCNAME, (st))
-#define sk_KRB5_PRINCNAME_pop(st) SKM_sk_pop(KRB5_PRINCNAME, (st))
-#define sk_KRB5_PRINCNAME_sort(st) SKM_sk_sort(KRB5_PRINCNAME, (st))
-#define sk_KRB5_PRINCNAME_is_sorted(st) SKM_sk_is_sorted(KRB5_PRINCNAME, (st))
-
-#define sk_KRB5_TKTBODY_new(cmp) SKM_sk_new(KRB5_TKTBODY, (cmp))
-#define sk_KRB5_TKTBODY_new_null() SKM_sk_new_null(KRB5_TKTBODY)
-#define sk_KRB5_TKTBODY_free(st) SKM_sk_free(KRB5_TKTBODY, (st))
-#define sk_KRB5_TKTBODY_num(st) SKM_sk_num(KRB5_TKTBODY, (st))
-#define sk_KRB5_TKTBODY_value(st, i) SKM_sk_value(KRB5_TKTBODY, (st), (i))
-#define sk_KRB5_TKTBODY_set(st, i, val) SKM_sk_set(KRB5_TKTBODY, (st), (i), (val))
-#define sk_KRB5_TKTBODY_zero(st) SKM_sk_zero(KRB5_TKTBODY, (st))
-#define sk_KRB5_TKTBODY_push(st, val) SKM_sk_push(KRB5_TKTBODY, (st), (val))
-#define sk_KRB5_TKTBODY_unshift(st, val) SKM_sk_unshift(KRB5_TKTBODY, (st), (val))
-#define sk_KRB5_TKTBODY_find(st, val) SKM_sk_find(KRB5_TKTBODY, (st), (val))
-#define sk_KRB5_TKTBODY_find_ex(st, val) SKM_sk_find_ex(KRB5_TKTBODY, (st), (val))
-#define sk_KRB5_TKTBODY_delete(st, i) SKM_sk_delete(KRB5_TKTBODY, (st), (i))
-#define sk_KRB5_TKTBODY_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_TKTBODY, (st), (ptr))
-#define sk_KRB5_TKTBODY_insert(st, val, i) SKM_sk_insert(KRB5_TKTBODY, (st), (val), (i))
-#define sk_KRB5_TKTBODY_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_TKTBODY, (st), (cmp))
-#define sk_KRB5_TKTBODY_dup(st) SKM_sk_dup(KRB5_TKTBODY, st)
-#define sk_KRB5_TKTBODY_pop_free(st, free_func) SKM_sk_pop_free(KRB5_TKTBODY, (st), (free_func))
-#define sk_KRB5_TKTBODY_shift(st) SKM_sk_shift(KRB5_TKTBODY, (st))
-#define sk_KRB5_TKTBODY_pop(st) SKM_sk_pop(KRB5_TKTBODY, (st))
-#define sk_KRB5_TKTBODY_sort(st) SKM_sk_sort(KRB5_TKTBODY, (st))
-#define sk_KRB5_TKTBODY_is_sorted(st) SKM_sk_is_sorted(KRB5_TKTBODY, (st))
-
-#define sk_MEM_OBJECT_DATA_new(cmp) SKM_sk_new(MEM_OBJECT_DATA, (cmp))
-#define sk_MEM_OBJECT_DATA_new_null() SKM_sk_new_null(MEM_OBJECT_DATA)
-#define sk_MEM_OBJECT_DATA_free(st) SKM_sk_free(MEM_OBJECT_DATA, (st))
-#define sk_MEM_OBJECT_DATA_num(st) SKM_sk_num(MEM_OBJECT_DATA, (st))
-#define sk_MEM_OBJECT_DATA_value(st, i) SKM_sk_value(MEM_OBJECT_DATA, (st), (i))
-#define sk_MEM_OBJECT_DATA_set(st, i, val) SKM_sk_set(MEM_OBJECT_DATA, (st), (i), (val))
-#define sk_MEM_OBJECT_DATA_zero(st) SKM_sk_zero(MEM_OBJECT_DATA, (st))
-#define sk_MEM_OBJECT_DATA_push(st, val) SKM_sk_push(MEM_OBJECT_DATA, (st), (val))
-#define sk_MEM_OBJECT_DATA_unshift(st, val) SKM_sk_unshift(MEM_OBJECT_DATA, (st), (val))
-#define sk_MEM_OBJECT_DATA_find(st, val) SKM_sk_find(MEM_OBJECT_DATA, (st), (val))
-#define sk_MEM_OBJECT_DATA_find_ex(st, val) SKM_sk_find_ex(MEM_OBJECT_DATA, (st), (val))
-#define sk_MEM_OBJECT_DATA_delete(st, i) SKM_sk_delete(MEM_OBJECT_DATA, (st), (i))
-#define sk_MEM_OBJECT_DATA_delete_ptr(st, ptr) SKM_sk_delete_ptr(MEM_OBJECT_DATA, (st), (ptr))
-#define sk_MEM_OBJECT_DATA_insert(st, val, i) SKM_sk_insert(MEM_OBJECT_DATA, (st), (val), (i))
-#define sk_MEM_OBJECT_DATA_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(MEM_OBJECT_DATA, (st), (cmp))
-#define sk_MEM_OBJECT_DATA_dup(st) SKM_sk_dup(MEM_OBJECT_DATA, st)
-#define sk_MEM_OBJECT_DATA_pop_free(st, free_func) SKM_sk_pop_free(MEM_OBJECT_DATA, (st), (free_func))
-#define sk_MEM_OBJECT_DATA_shift(st) SKM_sk_shift(MEM_OBJECT_DATA, (st))
-#define sk_MEM_OBJECT_DATA_pop(st) SKM_sk_pop(MEM_OBJECT_DATA, (st))
-#define sk_MEM_OBJECT_DATA_sort(st) SKM_sk_sort(MEM_OBJECT_DATA, (st))
-#define sk_MEM_OBJECT_DATA_is_sorted(st) SKM_sk_is_sorted(MEM_OBJECT_DATA, (st))
-
-#define sk_MIME_HEADER_new(cmp) SKM_sk_new(MIME_HEADER, (cmp))
-#define sk_MIME_HEADER_new_null() SKM_sk_new_null(MIME_HEADER)
-#define sk_MIME_HEADER_free(st) SKM_sk_free(MIME_HEADER, (st))
-#define sk_MIME_HEADER_num(st) SKM_sk_num(MIME_HEADER, (st))
-#define sk_MIME_HEADER_value(st, i) SKM_sk_value(MIME_HEADER, (st), (i))
-#define sk_MIME_HEADER_set(st, i, val) SKM_sk_set(MIME_HEADER, (st), (i), (val))
-#define sk_MIME_HEADER_zero(st) SKM_sk_zero(MIME_HEADER, (st))
-#define sk_MIME_HEADER_push(st, val) SKM_sk_push(MIME_HEADER, (st), (val))
-#define sk_MIME_HEADER_unshift(st, val) SKM_sk_unshift(MIME_HEADER, (st), (val))
-#define sk_MIME_HEADER_find(st, val) SKM_sk_find(MIME_HEADER, (st), (val))
-#define sk_MIME_HEADER_find_ex(st, val) SKM_sk_find_ex(MIME_HEADER, (st), (val))
-#define sk_MIME_HEADER_delete(st, i) SKM_sk_delete(MIME_HEADER, (st), (i))
-#define sk_MIME_HEADER_delete_ptr(st, ptr) SKM_sk_delete_ptr(MIME_HEADER, (st), (ptr))
-#define sk_MIME_HEADER_insert(st, val, i) SKM_sk_insert(MIME_HEADER, (st), (val), (i))
-#define sk_MIME_HEADER_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(MIME_HEADER, (st), (cmp))
-#define sk_MIME_HEADER_dup(st) SKM_sk_dup(MIME_HEADER, st)
-#define sk_MIME_HEADER_pop_free(st, free_func) SKM_sk_pop_free(MIME_HEADER, (st), (free_func))
-#define sk_MIME_HEADER_shift(st) SKM_sk_shift(MIME_HEADER, (st))
-#define sk_MIME_HEADER_pop(st) SKM_sk_pop(MIME_HEADER, (st))
-#define sk_MIME_HEADER_sort(st) SKM_sk_sort(MIME_HEADER, (st))
-#define sk_MIME_HEADER_is_sorted(st) SKM_sk_is_sorted(MIME_HEADER, (st))
-
-#define sk_MIME_PARAM_new(cmp) SKM_sk_new(MIME_PARAM, (cmp))
-#define sk_MIME_PARAM_new_null() SKM_sk_new_null(MIME_PARAM)
-#define sk_MIME_PARAM_free(st) SKM_sk_free(MIME_PARAM, (st))
-#define sk_MIME_PARAM_num(st) SKM_sk_num(MIME_PARAM, (st))
-#define sk_MIME_PARAM_value(st, i) SKM_sk_value(MIME_PARAM, (st), (i))
-#define sk_MIME_PARAM_set(st, i, val) SKM_sk_set(MIME_PARAM, (st), (i), (val))
-#define sk_MIME_PARAM_zero(st) SKM_sk_zero(MIME_PARAM, (st))
-#define sk_MIME_PARAM_push(st, val) SKM_sk_push(MIME_PARAM, (st), (val))
-#define sk_MIME_PARAM_unshift(st, val) SKM_sk_unshift(MIME_PARAM, (st), (val))
-#define sk_MIME_PARAM_find(st, val) SKM_sk_find(MIME_PARAM, (st), (val))
-#define sk_MIME_PARAM_find_ex(st, val) SKM_sk_find_ex(MIME_PARAM, (st), (val))
-#define sk_MIME_PARAM_delete(st, i) SKM_sk_delete(MIME_PARAM, (st), (i))
-#define sk_MIME_PARAM_delete_ptr(st, ptr) SKM_sk_delete_ptr(MIME_PARAM, (st), (ptr))
-#define sk_MIME_PARAM_insert(st, val, i) SKM_sk_insert(MIME_PARAM, (st), (val), (i))
-#define sk_MIME_PARAM_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(MIME_PARAM, (st), (cmp))
-#define sk_MIME_PARAM_dup(st) SKM_sk_dup(MIME_PARAM, st)
-#define sk_MIME_PARAM_pop_free(st, free_func) SKM_sk_pop_free(MIME_PARAM, (st), (free_func))
-#define sk_MIME_PARAM_shift(st) SKM_sk_shift(MIME_PARAM, (st))
-#define sk_MIME_PARAM_pop(st) SKM_sk_pop(MIME_PARAM, (st))
-#define sk_MIME_PARAM_sort(st) SKM_sk_sort(MIME_PARAM, (st))
-#define sk_MIME_PARAM_is_sorted(st) SKM_sk_is_sorted(MIME_PARAM, (st))
-
-#define sk_NAME_FUNCS_new(cmp) SKM_sk_new(NAME_FUNCS, (cmp))
-#define sk_NAME_FUNCS_new_null() SKM_sk_new_null(NAME_FUNCS)
-#define sk_NAME_FUNCS_free(st) SKM_sk_free(NAME_FUNCS, (st))
-#define sk_NAME_FUNCS_num(st) SKM_sk_num(NAME_FUNCS, (st))
-#define sk_NAME_FUNCS_value(st, i) SKM_sk_value(NAME_FUNCS, (st), (i))
-#define sk_NAME_FUNCS_set(st, i, val) SKM_sk_set(NAME_FUNCS, (st), (i), (val))
-#define sk_NAME_FUNCS_zero(st) SKM_sk_zero(NAME_FUNCS, (st))
-#define sk_NAME_FUNCS_push(st, val) SKM_sk_push(NAME_FUNCS, (st), (val))
-#define sk_NAME_FUNCS_unshift(st, val) SKM_sk_unshift(NAME_FUNCS, (st), (val))
-#define sk_NAME_FUNCS_find(st, val) SKM_sk_find(NAME_FUNCS, (st), (val))
-#define sk_NAME_FUNCS_find_ex(st, val) SKM_sk_find_ex(NAME_FUNCS, (st), (val))
-#define sk_NAME_FUNCS_delete(st, i) SKM_sk_delete(NAME_FUNCS, (st), (i))
-#define sk_NAME_FUNCS_delete_ptr(st, ptr) SKM_sk_delete_ptr(NAME_FUNCS, (st), (ptr))
-#define sk_NAME_FUNCS_insert(st, val, i) SKM_sk_insert(NAME_FUNCS, (st), (val), (i))
-#define sk_NAME_FUNCS_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(NAME_FUNCS, (st), (cmp))
-#define sk_NAME_FUNCS_dup(st) SKM_sk_dup(NAME_FUNCS, st)
-#define sk_NAME_FUNCS_pop_free(st, free_func) SKM_sk_pop_free(NAME_FUNCS, (st), (free_func))
-#define sk_NAME_FUNCS_shift(st) SKM_sk_shift(NAME_FUNCS, (st))
-#define sk_NAME_FUNCS_pop(st) SKM_sk_pop(NAME_FUNCS, (st))
-#define sk_NAME_FUNCS_sort(st) SKM_sk_sort(NAME_FUNCS, (st))
-#define sk_NAME_FUNCS_is_sorted(st) SKM_sk_is_sorted(NAME_FUNCS, (st))
-
-#define sk_OCSP_CERTID_new(cmp) SKM_sk_new(OCSP_CERTID, (cmp))
-#define sk_OCSP_CERTID_new_null() SKM_sk_new_null(OCSP_CERTID)
-#define sk_OCSP_CERTID_free(st) SKM_sk_free(OCSP_CERTID, (st))
-#define sk_OCSP_CERTID_num(st) SKM_sk_num(OCSP_CERTID, (st))
-#define sk_OCSP_CERTID_value(st, i) SKM_sk_value(OCSP_CERTID, (st), (i))
-#define sk_OCSP_CERTID_set(st, i, val) SKM_sk_set(OCSP_CERTID, (st), (i), (val))
-#define sk_OCSP_CERTID_zero(st) SKM_sk_zero(OCSP_CERTID, (st))
-#define sk_OCSP_CERTID_push(st, val) SKM_sk_push(OCSP_CERTID, (st), (val))
-#define sk_OCSP_CERTID_unshift(st, val) SKM_sk_unshift(OCSP_CERTID, (st), (val))
-#define sk_OCSP_CERTID_find(st, val) SKM_sk_find(OCSP_CERTID, (st), (val))
-#define sk_OCSP_CERTID_find_ex(st, val) SKM_sk_find_ex(OCSP_CERTID, (st), (val))
-#define sk_OCSP_CERTID_delete(st, i) SKM_sk_delete(OCSP_CERTID, (st), (i))
-#define sk_OCSP_CERTID_delete_ptr(st, ptr) SKM_sk_delete_ptr(OCSP_CERTID, (st), (ptr))
-#define sk_OCSP_CERTID_insert(st, val, i) SKM_sk_insert(OCSP_CERTID, (st), (val), (i))
-#define sk_OCSP_CERTID_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(OCSP_CERTID, (st), (cmp))
-#define sk_OCSP_CERTID_dup(st) SKM_sk_dup(OCSP_CERTID, st)
-#define sk_OCSP_CERTID_pop_free(st, free_func) SKM_sk_pop_free(OCSP_CERTID, (st), (free_func))
-#define sk_OCSP_CERTID_shift(st) SKM_sk_shift(OCSP_CERTID, (st))
-#define sk_OCSP_CERTID_pop(st) SKM_sk_pop(OCSP_CERTID, (st))
-#define sk_OCSP_CERTID_sort(st) SKM_sk_sort(OCSP_CERTID, (st))
-#define sk_OCSP_CERTID_is_sorted(st) SKM_sk_is_sorted(OCSP_CERTID, (st))
-
-#define sk_OCSP_ONEREQ_new(cmp) SKM_sk_new(OCSP_ONEREQ, (cmp))
-#define sk_OCSP_ONEREQ_new_null() SKM_sk_new_null(OCSP_ONEREQ)
-#define sk_OCSP_ONEREQ_free(st) SKM_sk_free(OCSP_ONEREQ, (st))
-#define sk_OCSP_ONEREQ_num(st) SKM_sk_num(OCSP_ONEREQ, (st))
-#define sk_OCSP_ONEREQ_value(st, i) SKM_sk_value(OCSP_ONEREQ, (st), (i))
-#define sk_OCSP_ONEREQ_set(st, i, val) SKM_sk_set(OCSP_ONEREQ, (st), (i), (val))
-#define sk_OCSP_ONEREQ_zero(st) SKM_sk_zero(OCSP_ONEREQ, (st))
-#define sk_OCSP_ONEREQ_push(st, val) SKM_sk_push(OCSP_ONEREQ, (st), (val))
-#define sk_OCSP_ONEREQ_unshift(st, val) SKM_sk_unshift(OCSP_ONEREQ, (st), (val))
-#define sk_OCSP_ONEREQ_find(st, val) SKM_sk_find(OCSP_ONEREQ, (st), (val))
-#define sk_OCSP_ONEREQ_find_ex(st, val) SKM_sk_find_ex(OCSP_ONEREQ, (st), (val))
-#define sk_OCSP_ONEREQ_delete(st, i) SKM_sk_delete(OCSP_ONEREQ, (st), (i))
-#define sk_OCSP_ONEREQ_delete_ptr(st, ptr) SKM_sk_delete_ptr(OCSP_ONEREQ, (st), (ptr))
-#define sk_OCSP_ONEREQ_insert(st, val, i) SKM_sk_insert(OCSP_ONEREQ, (st), (val), (i))
-#define sk_OCSP_ONEREQ_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(OCSP_ONEREQ, (st), (cmp))
-#define sk_OCSP_ONEREQ_dup(st) SKM_sk_dup(OCSP_ONEREQ, st)
-#define sk_OCSP_ONEREQ_pop_free(st, free_func) SKM_sk_pop_free(OCSP_ONEREQ, (st), (free_func))
-#define sk_OCSP_ONEREQ_shift(st) SKM_sk_shift(OCSP_ONEREQ, (st))
-#define sk_OCSP_ONEREQ_pop(st) SKM_sk_pop(OCSP_ONEREQ, (st))
-#define sk_OCSP_ONEREQ_sort(st) SKM_sk_sort(OCSP_ONEREQ, (st))
-#define sk_OCSP_ONEREQ_is_sorted(st) SKM_sk_is_sorted(OCSP_ONEREQ, (st))
-
-#define sk_OCSP_RESPID_new(cmp) SKM_sk_new(OCSP_RESPID, (cmp))
-#define sk_OCSP_RESPID_new_null() SKM_sk_new_null(OCSP_RESPID)
-#define sk_OCSP_RESPID_free(st) SKM_sk_free(OCSP_RESPID, (st))
-#define sk_OCSP_RESPID_num(st) SKM_sk_num(OCSP_RESPID, (st))
-#define sk_OCSP_RESPID_value(st, i) SKM_sk_value(OCSP_RESPID, (st), (i))
-#define sk_OCSP_RESPID_set(st, i, val) SKM_sk_set(OCSP_RESPID, (st), (i), (val))
-#define sk_OCSP_RESPID_zero(st) SKM_sk_zero(OCSP_RESPID, (st))
-#define sk_OCSP_RESPID_push(st, val) SKM_sk_push(OCSP_RESPID, (st), (val))
-#define sk_OCSP_RESPID_unshift(st, val) SKM_sk_unshift(OCSP_RESPID, (st), (val))
-#define sk_OCSP_RESPID_find(st, val) SKM_sk_find(OCSP_RESPID, (st), (val))
-#define sk_OCSP_RESPID_find_ex(st, val) SKM_sk_find_ex(OCSP_RESPID, (st), (val))
-#define sk_OCSP_RESPID_delete(st, i) SKM_sk_delete(OCSP_RESPID, (st), (i))
-#define sk_OCSP_RESPID_delete_ptr(st, ptr) SKM_sk_delete_ptr(OCSP_RESPID, (st), (ptr))
-#define sk_OCSP_RESPID_insert(st, val, i) SKM_sk_insert(OCSP_RESPID, (st), (val), (i))
-#define sk_OCSP_RESPID_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(OCSP_RESPID, (st), (cmp))
-#define sk_OCSP_RESPID_dup(st) SKM_sk_dup(OCSP_RESPID, st)
-#define sk_OCSP_RESPID_pop_free(st, free_func) SKM_sk_pop_free(OCSP_RESPID, (st), (free_func))
-#define sk_OCSP_RESPID_shift(st) SKM_sk_shift(OCSP_RESPID, (st))
-#define sk_OCSP_RESPID_pop(st) SKM_sk_pop(OCSP_RESPID, (st))
-#define sk_OCSP_RESPID_sort(st) SKM_sk_sort(OCSP_RESPID, (st))
-#define sk_OCSP_RESPID_is_sorted(st) SKM_sk_is_sorted(OCSP_RESPID, (st))
-
-#define sk_OCSP_SINGLERESP_new(cmp) SKM_sk_new(OCSP_SINGLERESP, (cmp))
-#define sk_OCSP_SINGLERESP_new_null() SKM_sk_new_null(OCSP_SINGLERESP)
-#define sk_OCSP_SINGLERESP_free(st) SKM_sk_free(OCSP_SINGLERESP, (st))
-#define sk_OCSP_SINGLERESP_num(st) SKM_sk_num(OCSP_SINGLERESP, (st))
-#define sk_OCSP_SINGLERESP_value(st, i) SKM_sk_value(OCSP_SINGLERESP, (st), (i))
-#define sk_OCSP_SINGLERESP_set(st, i, val) SKM_sk_set(OCSP_SINGLERESP, (st), (i), (val))
-#define sk_OCSP_SINGLERESP_zero(st) SKM_sk_zero(OCSP_SINGLERESP, (st))
-#define sk_OCSP_SINGLERESP_push(st, val) SKM_sk_push(OCSP_SINGLERESP, (st), (val))
-#define sk_OCSP_SINGLERESP_unshift(st, val) SKM_sk_unshift(OCSP_SINGLERESP, (st), (val))
-#define sk_OCSP_SINGLERESP_find(st, val) SKM_sk_find(OCSP_SINGLERESP, (st), (val))
-#define sk_OCSP_SINGLERESP_find_ex(st, val) SKM_sk_find_ex(OCSP_SINGLERESP, (st), (val))
-#define sk_OCSP_SINGLERESP_delete(st, i) SKM_sk_delete(OCSP_SINGLERESP, (st), (i))
-#define sk_OCSP_SINGLERESP_delete_ptr(st, ptr) SKM_sk_delete_ptr(OCSP_SINGLERESP, (st), (ptr))
-#define sk_OCSP_SINGLERESP_insert(st, val, i) SKM_sk_insert(OCSP_SINGLERESP, (st), (val), (i))
-#define sk_OCSP_SINGLERESP_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(OCSP_SINGLERESP, (st), (cmp))
-#define sk_OCSP_SINGLERESP_dup(st) SKM_sk_dup(OCSP_SINGLERESP, st)
-#define sk_OCSP_SINGLERESP_pop_free(st, free_func) SKM_sk_pop_free(OCSP_SINGLERESP, (st), (free_func))
-#define sk_OCSP_SINGLERESP_shift(st) SKM_sk_shift(OCSP_SINGLERESP, (st))
-#define sk_OCSP_SINGLERESP_pop(st) SKM_sk_pop(OCSP_SINGLERESP, (st))
-#define sk_OCSP_SINGLERESP_sort(st) SKM_sk_sort(OCSP_SINGLERESP, (st))
-#define sk_OCSP_SINGLERESP_is_sorted(st) SKM_sk_is_sorted(OCSP_SINGLERESP, (st))
-
-#define sk_PKCS12_SAFEBAG_new(cmp) SKM_sk_new(PKCS12_SAFEBAG, (cmp))
-#define sk_PKCS12_SAFEBAG_new_null() SKM_sk_new_null(PKCS12_SAFEBAG)
-#define sk_PKCS12_SAFEBAG_free(st) SKM_sk_free(PKCS12_SAFEBAG, (st))
-#define sk_PKCS12_SAFEBAG_num(st) SKM_sk_num(PKCS12_SAFEBAG, (st))
-#define sk_PKCS12_SAFEBAG_value(st, i) SKM_sk_value(PKCS12_SAFEBAG, (st), (i))
-#define sk_PKCS12_SAFEBAG_set(st, i, val) SKM_sk_set(PKCS12_SAFEBAG, (st), (i), (val))
-#define sk_PKCS12_SAFEBAG_zero(st) SKM_sk_zero(PKCS12_SAFEBAG, (st))
-#define sk_PKCS12_SAFEBAG_push(st, val) SKM_sk_push(PKCS12_SAFEBAG, (st), (val))
-#define sk_PKCS12_SAFEBAG_unshift(st, val) SKM_sk_unshift(PKCS12_SAFEBAG, (st), (val))
-#define sk_PKCS12_SAFEBAG_find(st, val) SKM_sk_find(PKCS12_SAFEBAG, (st), (val))
-#define sk_PKCS12_SAFEBAG_find_ex(st, val) SKM_sk_find_ex(PKCS12_SAFEBAG, (st), (val))
-#define sk_PKCS12_SAFEBAG_delete(st, i) SKM_sk_delete(PKCS12_SAFEBAG, (st), (i))
-#define sk_PKCS12_SAFEBAG_delete_ptr(st, ptr) SKM_sk_delete_ptr(PKCS12_SAFEBAG, (st), (ptr))
-#define sk_PKCS12_SAFEBAG_insert(st, val, i) SKM_sk_insert(PKCS12_SAFEBAG, (st), (val), (i))
-#define sk_PKCS12_SAFEBAG_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(PKCS12_SAFEBAG, (st), (cmp))
-#define sk_PKCS12_SAFEBAG_dup(st) SKM_sk_dup(PKCS12_SAFEBAG, st)
-#define sk_PKCS12_SAFEBAG_pop_free(st, free_func) SKM_sk_pop_free(PKCS12_SAFEBAG, (st), (free_func))
-#define sk_PKCS12_SAFEBAG_shift(st) SKM_sk_shift(PKCS12_SAFEBAG, (st))
-#define sk_PKCS12_SAFEBAG_pop(st) SKM_sk_pop(PKCS12_SAFEBAG, (st))
-#define sk_PKCS12_SAFEBAG_sort(st) SKM_sk_sort(PKCS12_SAFEBAG, (st))
-#define sk_PKCS12_SAFEBAG_is_sorted(st) SKM_sk_is_sorted(PKCS12_SAFEBAG, (st))
-
-#define sk_PKCS7_new(cmp) SKM_sk_new(PKCS7, (cmp))
-#define sk_PKCS7_new_null() SKM_sk_new_null(PKCS7)
-#define sk_PKCS7_free(st) SKM_sk_free(PKCS7, (st))
-#define sk_PKCS7_num(st) SKM_sk_num(PKCS7, (st))
-#define sk_PKCS7_value(st, i) SKM_sk_value(PKCS7, (st), (i))
-#define sk_PKCS7_set(st, i, val) SKM_sk_set(PKCS7, (st), (i), (val))
-#define sk_PKCS7_zero(st) SKM_sk_zero(PKCS7, (st))
-#define sk_PKCS7_push(st, val) SKM_sk_push(PKCS7, (st), (val))
-#define sk_PKCS7_unshift(st, val) SKM_sk_unshift(PKCS7, (st), (val))
-#define sk_PKCS7_find(st, val) SKM_sk_find(PKCS7, (st), (val))
-#define sk_PKCS7_find_ex(st, val) SKM_sk_find_ex(PKCS7, (st), (val))
-#define sk_PKCS7_delete(st, i) SKM_sk_delete(PKCS7, (st), (i))
-#define sk_PKCS7_delete_ptr(st, ptr) SKM_sk_delete_ptr(PKCS7, (st), (ptr))
-#define sk_PKCS7_insert(st, val, i) SKM_sk_insert(PKCS7, (st), (val), (i))
-#define sk_PKCS7_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(PKCS7, (st), (cmp))
-#define sk_PKCS7_dup(st) SKM_sk_dup(PKCS7, st)
-#define sk_PKCS7_pop_free(st, free_func) SKM_sk_pop_free(PKCS7, (st), (free_func))
-#define sk_PKCS7_shift(st) SKM_sk_shift(PKCS7, (st))
-#define sk_PKCS7_pop(st) SKM_sk_pop(PKCS7, (st))
-#define sk_PKCS7_sort(st) SKM_sk_sort(PKCS7, (st))
-#define sk_PKCS7_is_sorted(st) SKM_sk_is_sorted(PKCS7, (st))
-
-#define sk_PKCS7_RECIP_INFO_new(cmp) SKM_sk_new(PKCS7_RECIP_INFO, (cmp))
-#define sk_PKCS7_RECIP_INFO_new_null() SKM_sk_new_null(PKCS7_RECIP_INFO)
-#define sk_PKCS7_RECIP_INFO_free(st) SKM_sk_free(PKCS7_RECIP_INFO, (st))
-#define sk_PKCS7_RECIP_INFO_num(st) SKM_sk_num(PKCS7_RECIP_INFO, (st))
-#define sk_PKCS7_RECIP_INFO_value(st, i) SKM_sk_value(PKCS7_RECIP_INFO, (st), (i))
-#define sk_PKCS7_RECIP_INFO_set(st, i, val) SKM_sk_set(PKCS7_RECIP_INFO, (st), (i), (val))
-#define sk_PKCS7_RECIP_INFO_zero(st) SKM_sk_zero(PKCS7_RECIP_INFO, (st))
-#define sk_PKCS7_RECIP_INFO_push(st, val) SKM_sk_push(PKCS7_RECIP_INFO, (st), (val))
-#define sk_PKCS7_RECIP_INFO_unshift(st, val) SKM_sk_unshift(PKCS7_RECIP_INFO, (st), (val))
-#define sk_PKCS7_RECIP_INFO_find(st, val) SKM_sk_find(PKCS7_RECIP_INFO, (st), (val))
-#define sk_PKCS7_RECIP_INFO_find_ex(st, val) SKM_sk_find_ex(PKCS7_RECIP_INFO, (st), (val))
-#define sk_PKCS7_RECIP_INFO_delete(st, i) SKM_sk_delete(PKCS7_RECIP_INFO, (st), (i))
-#define sk_PKCS7_RECIP_INFO_delete_ptr(st, ptr) SKM_sk_delete_ptr(PKCS7_RECIP_INFO, (st), (ptr))
-#define sk_PKCS7_RECIP_INFO_insert(st, val, i) SKM_sk_insert(PKCS7_RECIP_INFO, (st), (val), (i))
-#define sk_PKCS7_RECIP_INFO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(PKCS7_RECIP_INFO, (st), (cmp))
-#define sk_PKCS7_RECIP_INFO_dup(st) SKM_sk_dup(PKCS7_RECIP_INFO, st)
-#define sk_PKCS7_RECIP_INFO_pop_free(st, free_func) SKM_sk_pop_free(PKCS7_RECIP_INFO, (st), (free_func))
-#define sk_PKCS7_RECIP_INFO_shift(st) SKM_sk_shift(PKCS7_RECIP_INFO, (st))
-#define sk_PKCS7_RECIP_INFO_pop(st) SKM_sk_pop(PKCS7_RECIP_INFO, (st))
-#define sk_PKCS7_RECIP_INFO_sort(st) SKM_sk_sort(PKCS7_RECIP_INFO, (st))
-#define sk_PKCS7_RECIP_INFO_is_sorted(st) SKM_sk_is_sorted(PKCS7_RECIP_INFO, (st))
-
-#define sk_PKCS7_SIGNER_INFO_new(cmp) SKM_sk_new(PKCS7_SIGNER_INFO, (cmp))
-#define sk_PKCS7_SIGNER_INFO_new_null() SKM_sk_new_null(PKCS7_SIGNER_INFO)
-#define sk_PKCS7_SIGNER_INFO_free(st) SKM_sk_free(PKCS7_SIGNER_INFO, (st))
-#define sk_PKCS7_SIGNER_INFO_num(st) SKM_sk_num(PKCS7_SIGNER_INFO, (st))
-#define sk_PKCS7_SIGNER_INFO_value(st, i) SKM_sk_value(PKCS7_SIGNER_INFO, (st), (i))
-#define sk_PKCS7_SIGNER_INFO_set(st, i, val) SKM_sk_set(PKCS7_SIGNER_INFO, (st), (i), (val))
-#define sk_PKCS7_SIGNER_INFO_zero(st) SKM_sk_zero(PKCS7_SIGNER_INFO, (st))
-#define sk_PKCS7_SIGNER_INFO_push(st, val) SKM_sk_push(PKCS7_SIGNER_INFO, (st), (val))
-#define sk_PKCS7_SIGNER_INFO_unshift(st, val) SKM_sk_unshift(PKCS7_SIGNER_INFO, (st), (val))
-#define sk_PKCS7_SIGNER_INFO_find(st, val) SKM_sk_find(PKCS7_SIGNER_INFO, (st), (val))
-#define sk_PKCS7_SIGNER_INFO_find_ex(st, val) SKM_sk_find_ex(PKCS7_SIGNER_INFO, (st), (val))
-#define sk_PKCS7_SIGNER_INFO_delete(st, i) SKM_sk_delete(PKCS7_SIGNER_INFO, (st), (i))
-#define sk_PKCS7_SIGNER_INFO_delete_ptr(st, ptr) SKM_sk_delete_ptr(PKCS7_SIGNER_INFO, (st), (ptr))
-#define sk_PKCS7_SIGNER_INFO_insert(st, val, i) SKM_sk_insert(PKCS7_SIGNER_INFO, (st), (val), (i))
-#define sk_PKCS7_SIGNER_INFO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(PKCS7_SIGNER_INFO, (st), (cmp))
-#define sk_PKCS7_SIGNER_INFO_dup(st) SKM_sk_dup(PKCS7_SIGNER_INFO, st)
-#define sk_PKCS7_SIGNER_INFO_pop_free(st, free_func) SKM_sk_pop_free(PKCS7_SIGNER_INFO, (st), (free_func))
-#define sk_PKCS7_SIGNER_INFO_shift(st) SKM_sk_shift(PKCS7_SIGNER_INFO, (st))
-#define sk_PKCS7_SIGNER_INFO_pop(st) SKM_sk_pop(PKCS7_SIGNER_INFO, (st))
-#define sk_PKCS7_SIGNER_INFO_sort(st) SKM_sk_sort(PKCS7_SIGNER_INFO, (st))
-#define sk_PKCS7_SIGNER_INFO_is_sorted(st) SKM_sk_is_sorted(PKCS7_SIGNER_INFO, (st))
-
-#define sk_POLICYINFO_new(cmp) SKM_sk_new(POLICYINFO, (cmp))
-#define sk_POLICYINFO_new_null() SKM_sk_new_null(POLICYINFO)
-#define sk_POLICYINFO_free(st) SKM_sk_free(POLICYINFO, (st))
-#define sk_POLICYINFO_num(st) SKM_sk_num(POLICYINFO, (st))
-#define sk_POLICYINFO_value(st, i) SKM_sk_value(POLICYINFO, (st), (i))
-#define sk_POLICYINFO_set(st, i, val) SKM_sk_set(POLICYINFO, (st), (i), (val))
-#define sk_POLICYINFO_zero(st) SKM_sk_zero(POLICYINFO, (st))
-#define sk_POLICYINFO_push(st, val) SKM_sk_push(POLICYINFO, (st), (val))
-#define sk_POLICYINFO_unshift(st, val) SKM_sk_unshift(POLICYINFO, (st), (val))
-#define sk_POLICYINFO_find(st, val) SKM_sk_find(POLICYINFO, (st), (val))
-#define sk_POLICYINFO_find_ex(st, val) SKM_sk_find_ex(POLICYINFO, (st), (val))
-#define sk_POLICYINFO_delete(st, i) SKM_sk_delete(POLICYINFO, (st), (i))
-#define sk_POLICYINFO_delete_ptr(st, ptr) SKM_sk_delete_ptr(POLICYINFO, (st), (ptr))
-#define sk_POLICYINFO_insert(st, val, i) SKM_sk_insert(POLICYINFO, (st), (val), (i))
-#define sk_POLICYINFO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(POLICYINFO, (st), (cmp))
-#define sk_POLICYINFO_dup(st) SKM_sk_dup(POLICYINFO, st)
-#define sk_POLICYINFO_pop_free(st, free_func) SKM_sk_pop_free(POLICYINFO, (st), (free_func))
-#define sk_POLICYINFO_shift(st) SKM_sk_shift(POLICYINFO, (st))
-#define sk_POLICYINFO_pop(st) SKM_sk_pop(POLICYINFO, (st))
-#define sk_POLICYINFO_sort(st) SKM_sk_sort(POLICYINFO, (st))
-#define sk_POLICYINFO_is_sorted(st) SKM_sk_is_sorted(POLICYINFO, (st))
-
-#define sk_POLICYQUALINFO_new(cmp) SKM_sk_new(POLICYQUALINFO, (cmp))
-#define sk_POLICYQUALINFO_new_null() SKM_sk_new_null(POLICYQUALINFO)
-#define sk_POLICYQUALINFO_free(st) SKM_sk_free(POLICYQUALINFO, (st))
-#define sk_POLICYQUALINFO_num(st) SKM_sk_num(POLICYQUALINFO, (st))
-#define sk_POLICYQUALINFO_value(st, i) SKM_sk_value(POLICYQUALINFO, (st), (i))
-#define sk_POLICYQUALINFO_set(st, i, val) SKM_sk_set(POLICYQUALINFO, (st), (i), (val))
-#define sk_POLICYQUALINFO_zero(st) SKM_sk_zero(POLICYQUALINFO, (st))
-#define sk_POLICYQUALINFO_push(st, val) SKM_sk_push(POLICYQUALINFO, (st), (val))
-#define sk_POLICYQUALINFO_unshift(st, val) SKM_sk_unshift(POLICYQUALINFO, (st), (val))
-#define sk_POLICYQUALINFO_find(st, val) SKM_sk_find(POLICYQUALINFO, (st), (val))
-#define sk_POLICYQUALINFO_find_ex(st, val) SKM_sk_find_ex(POLICYQUALINFO, (st), (val))
-#define sk_POLICYQUALINFO_delete(st, i) SKM_sk_delete(POLICYQUALINFO, (st), (i))
-#define sk_POLICYQUALINFO_delete_ptr(st, ptr) SKM_sk_delete_ptr(POLICYQUALINFO, (st), (ptr))
-#define sk_POLICYQUALINFO_insert(st, val, i) SKM_sk_insert(POLICYQUALINFO, (st), (val), (i))
-#define sk_POLICYQUALINFO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(POLICYQUALINFO, (st), (cmp))
-#define sk_POLICYQUALINFO_dup(st) SKM_sk_dup(POLICYQUALINFO, st)
-#define sk_POLICYQUALINFO_pop_free(st, free_func) SKM_sk_pop_free(POLICYQUALINFO, (st), (free_func))
-#define sk_POLICYQUALINFO_shift(st) SKM_sk_shift(POLICYQUALINFO, (st))
-#define sk_POLICYQUALINFO_pop(st) SKM_sk_pop(POLICYQUALINFO, (st))
-#define sk_POLICYQUALINFO_sort(st) SKM_sk_sort(POLICYQUALINFO, (st))
-#define sk_POLICYQUALINFO_is_sorted(st) SKM_sk_is_sorted(POLICYQUALINFO, (st))
-
-#define sk_POLICY_MAPPING_new(cmp) SKM_sk_new(POLICY_MAPPING, (cmp))
-#define sk_POLICY_MAPPING_new_null() SKM_sk_new_null(POLICY_MAPPING)
-#define sk_POLICY_MAPPING_free(st) SKM_sk_free(POLICY_MAPPING, (st))
-#define sk_POLICY_MAPPING_num(st) SKM_sk_num(POLICY_MAPPING, (st))
-#define sk_POLICY_MAPPING_value(st, i) SKM_sk_value(POLICY_MAPPING, (st), (i))
-#define sk_POLICY_MAPPING_set(st, i, val) SKM_sk_set(POLICY_MAPPING, (st), (i), (val))
-#define sk_POLICY_MAPPING_zero(st) SKM_sk_zero(POLICY_MAPPING, (st))
-#define sk_POLICY_MAPPING_push(st, val) SKM_sk_push(POLICY_MAPPING, (st), (val))
-#define sk_POLICY_MAPPING_unshift(st, val) SKM_sk_unshift(POLICY_MAPPING, (st), (val))
-#define sk_POLICY_MAPPING_find(st, val) SKM_sk_find(POLICY_MAPPING, (st), (val))
-#define sk_POLICY_MAPPING_find_ex(st, val) SKM_sk_find_ex(POLICY_MAPPING, (st), (val))
-#define sk_POLICY_MAPPING_delete(st, i) SKM_sk_delete(POLICY_MAPPING, (st), (i))
-#define sk_POLICY_MAPPING_delete_ptr(st, ptr) SKM_sk_delete_ptr(POLICY_MAPPING, (st), (ptr))
-#define sk_POLICY_MAPPING_insert(st, val, i) SKM_sk_insert(POLICY_MAPPING, (st), (val), (i))
-#define sk_POLICY_MAPPING_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(POLICY_MAPPING, (st), (cmp))
-#define sk_POLICY_MAPPING_dup(st) SKM_sk_dup(POLICY_MAPPING, st)
-#define sk_POLICY_MAPPING_pop_free(st, free_func) SKM_sk_pop_free(POLICY_MAPPING, (st), (free_func))
-#define sk_POLICY_MAPPING_shift(st) SKM_sk_shift(POLICY_MAPPING, (st))
-#define sk_POLICY_MAPPING_pop(st) SKM_sk_pop(POLICY_MAPPING, (st))
-#define sk_POLICY_MAPPING_sort(st) SKM_sk_sort(POLICY_MAPPING, (st))
-#define sk_POLICY_MAPPING_is_sorted(st) SKM_sk_is_sorted(POLICY_MAPPING, (st))
-
-#define sk_SSL_CIPHER_new(cmp) SKM_sk_new(SSL_CIPHER, (cmp))
-#define sk_SSL_CIPHER_new_null() SKM_sk_new_null(SSL_CIPHER)
-#define sk_SSL_CIPHER_free(st) SKM_sk_free(SSL_CIPHER, (st))
-#define sk_SSL_CIPHER_num(st) SKM_sk_num(SSL_CIPHER, (st))
-#define sk_SSL_CIPHER_value(st, i) SKM_sk_value(SSL_CIPHER, (st), (i))
-#define sk_SSL_CIPHER_set(st, i, val) SKM_sk_set(SSL_CIPHER, (st), (i), (val))
-#define sk_SSL_CIPHER_zero(st) SKM_sk_zero(SSL_CIPHER, (st))
-#define sk_SSL_CIPHER_push(st, val) SKM_sk_push(SSL_CIPHER, (st), (val))
-#define sk_SSL_CIPHER_unshift(st, val) SKM_sk_unshift(SSL_CIPHER, (st), (val))
-#define sk_SSL_CIPHER_find(st, val) SKM_sk_find(SSL_CIPHER, (st), (val))
-#define sk_SSL_CIPHER_find_ex(st, val) SKM_sk_find_ex(SSL_CIPHER, (st), (val))
-#define sk_SSL_CIPHER_delete(st, i) SKM_sk_delete(SSL_CIPHER, (st), (i))
-#define sk_SSL_CIPHER_delete_ptr(st, ptr) SKM_sk_delete_ptr(SSL_CIPHER, (st), (ptr))
-#define sk_SSL_CIPHER_insert(st, val, i) SKM_sk_insert(SSL_CIPHER, (st), (val), (i))
-#define sk_SSL_CIPHER_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(SSL_CIPHER, (st), (cmp))
-#define sk_SSL_CIPHER_dup(st) SKM_sk_dup(SSL_CIPHER, st)
-#define sk_SSL_CIPHER_pop_free(st, free_func) SKM_sk_pop_free(SSL_CIPHER, (st), (free_func))
-#define sk_SSL_CIPHER_shift(st) SKM_sk_shift(SSL_CIPHER, (st))
-#define sk_SSL_CIPHER_pop(st) SKM_sk_pop(SSL_CIPHER, (st))
-#define sk_SSL_CIPHER_sort(st) SKM_sk_sort(SSL_CIPHER, (st))
-#define sk_SSL_CIPHER_is_sorted(st) SKM_sk_is_sorted(SSL_CIPHER, (st))
-
-#define sk_SSL_COMP_new(cmp) SKM_sk_new(SSL_COMP, (cmp))
-#define sk_SSL_COMP_new_null() SKM_sk_new_null(SSL_COMP)
-#define sk_SSL_COMP_free(st) SKM_sk_free(SSL_COMP, (st))
-#define sk_SSL_COMP_num(st) SKM_sk_num(SSL_COMP, (st))
-#define sk_SSL_COMP_value(st, i) SKM_sk_value(SSL_COMP, (st), (i))
-#define sk_SSL_COMP_set(st, i, val) SKM_sk_set(SSL_COMP, (st), (i), (val))
-#define sk_SSL_COMP_zero(st) SKM_sk_zero(SSL_COMP, (st))
-#define sk_SSL_COMP_push(st, val) SKM_sk_push(SSL_COMP, (st), (val))
-#define sk_SSL_COMP_unshift(st, val) SKM_sk_unshift(SSL_COMP, (st), (val))
-#define sk_SSL_COMP_find(st, val) SKM_sk_find(SSL_COMP, (st), (val))
-#define sk_SSL_COMP_find_ex(st, val) SKM_sk_find_ex(SSL_COMP, (st), (val))
-#define sk_SSL_COMP_delete(st, i) SKM_sk_delete(SSL_COMP, (st), (i))
-#define sk_SSL_COMP_delete_ptr(st, ptr) SKM_sk_delete_ptr(SSL_COMP, (st), (ptr))
-#define sk_SSL_COMP_insert(st, val, i) SKM_sk_insert(SSL_COMP, (st), (val), (i))
-#define sk_SSL_COMP_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(SSL_COMP, (st), (cmp))
-#define sk_SSL_COMP_dup(st) SKM_sk_dup(SSL_COMP, st)
-#define sk_SSL_COMP_pop_free(st, free_func) SKM_sk_pop_free(SSL_COMP, (st), (free_func))
-#define sk_SSL_COMP_shift(st) SKM_sk_shift(SSL_COMP, (st))
-#define sk_SSL_COMP_pop(st) SKM_sk_pop(SSL_COMP, (st))
-#define sk_SSL_COMP_sort(st) SKM_sk_sort(SSL_COMP, (st))
-#define sk_SSL_COMP_is_sorted(st) SKM_sk_is_sorted(SSL_COMP, (st))
-
-#define sk_STACK_OF_X509_NAME_ENTRY_new(cmp) SKM_sk_new(STACK_OF_X509_NAME_ENTRY, (cmp))
-#define sk_STACK_OF_X509_NAME_ENTRY_new_null() SKM_sk_new_null(STACK_OF_X509_NAME_ENTRY)
-#define sk_STACK_OF_X509_NAME_ENTRY_free(st) SKM_sk_free(STACK_OF_X509_NAME_ENTRY, (st))
-#define sk_STACK_OF_X509_NAME_ENTRY_num(st) SKM_sk_num(STACK_OF_X509_NAME_ENTRY, (st))
-#define sk_STACK_OF_X509_NAME_ENTRY_value(st, i) SKM_sk_value(STACK_OF_X509_NAME_ENTRY, (st), (i))
-#define sk_STACK_OF_X509_NAME_ENTRY_set(st, i, val) SKM_sk_set(STACK_OF_X509_NAME_ENTRY, (st), (i), (val))
-#define sk_STACK_OF_X509_NAME_ENTRY_zero(st) SKM_sk_zero(STACK_OF_X509_NAME_ENTRY, (st))
-#define sk_STACK_OF_X509_NAME_ENTRY_push(st, val) SKM_sk_push(STACK_OF_X509_NAME_ENTRY, (st), (val))
-#define sk_STACK_OF_X509_NAME_ENTRY_unshift(st, val) SKM_sk_unshift(STACK_OF_X509_NAME_ENTRY, (st), (val))
-#define sk_STACK_OF_X509_NAME_ENTRY_find(st, val) SKM_sk_find(STACK_OF_X509_NAME_ENTRY, (st), (val))
-#define sk_STACK_OF_X509_NAME_ENTRY_find_ex(st, val) SKM_sk_find_ex(STACK_OF_X509_NAME_ENTRY, (st), (val))
-#define sk_STACK_OF_X509_NAME_ENTRY_delete(st, i) SKM_sk_delete(STACK_OF_X509_NAME_ENTRY, (st), (i))
-#define sk_STACK_OF_X509_NAME_ENTRY_delete_ptr(st, ptr) SKM_sk_delete_ptr(STACK_OF_X509_NAME_ENTRY, (st), (ptr))
-#define sk_STACK_OF_X509_NAME_ENTRY_insert(st, val, i) SKM_sk_insert(STACK_OF_X509_NAME_ENTRY, (st), (val), (i))
-#define sk_STACK_OF_X509_NAME_ENTRY_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(STACK_OF_X509_NAME_ENTRY, (st), (cmp))
-#define sk_STACK_OF_X509_NAME_ENTRY_dup(st) SKM_sk_dup(STACK_OF_X509_NAME_ENTRY, st)
-#define sk_STACK_OF_X509_NAME_ENTRY_pop_free(st, free_func) SKM_sk_pop_free(STACK_OF_X509_NAME_ENTRY, (st), (free_func))
-#define sk_STACK_OF_X509_NAME_ENTRY_shift(st) SKM_sk_shift(STACK_OF_X509_NAME_ENTRY, (st))
-#define sk_STACK_OF_X509_NAME_ENTRY_pop(st) SKM_sk_pop(STACK_OF_X509_NAME_ENTRY, (st))
-#define sk_STACK_OF_X509_NAME_ENTRY_sort(st) SKM_sk_sort(STACK_OF_X509_NAME_ENTRY, (st))
-#define sk_STACK_OF_X509_NAME_ENTRY_is_sorted(st) SKM_sk_is_sorted(STACK_OF_X509_NAME_ENTRY, (st))
-
-#define sk_STORE_ATTR_INFO_new(cmp) SKM_sk_new(STORE_ATTR_INFO, (cmp))
-#define sk_STORE_ATTR_INFO_new_null() SKM_sk_new_null(STORE_ATTR_INFO)
-#define sk_STORE_ATTR_INFO_free(st) SKM_sk_free(STORE_ATTR_INFO, (st))
-#define sk_STORE_ATTR_INFO_num(st) SKM_sk_num(STORE_ATTR_INFO, (st))
-#define sk_STORE_ATTR_INFO_value(st, i) SKM_sk_value(STORE_ATTR_INFO, (st), (i))
-#define sk_STORE_ATTR_INFO_set(st, i, val) SKM_sk_set(STORE_ATTR_INFO, (st), (i), (val))
-#define sk_STORE_ATTR_INFO_zero(st) SKM_sk_zero(STORE_ATTR_INFO, (st))
-#define sk_STORE_ATTR_INFO_push(st, val) SKM_sk_push(STORE_ATTR_INFO, (st), (val))
-#define sk_STORE_ATTR_INFO_unshift(st, val) SKM_sk_unshift(STORE_ATTR_INFO, (st), (val))
-#define sk_STORE_ATTR_INFO_find(st, val) SKM_sk_find(STORE_ATTR_INFO, (st), (val))
-#define sk_STORE_ATTR_INFO_find_ex(st, val) SKM_sk_find_ex(STORE_ATTR_INFO, (st), (val))
-#define sk_STORE_ATTR_INFO_delete(st, i) SKM_sk_delete(STORE_ATTR_INFO, (st), (i))
-#define sk_STORE_ATTR_INFO_delete_ptr(st, ptr) SKM_sk_delete_ptr(STORE_ATTR_INFO, (st), (ptr))
-#define sk_STORE_ATTR_INFO_insert(st, val, i) SKM_sk_insert(STORE_ATTR_INFO, (st), (val), (i))
-#define sk_STORE_ATTR_INFO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(STORE_ATTR_INFO, (st), (cmp))
-#define sk_STORE_ATTR_INFO_dup(st) SKM_sk_dup(STORE_ATTR_INFO, st)
-#define sk_STORE_ATTR_INFO_pop_free(st, free_func) SKM_sk_pop_free(STORE_ATTR_INFO, (st), (free_func))
-#define sk_STORE_ATTR_INFO_shift(st) SKM_sk_shift(STORE_ATTR_INFO, (st))
-#define sk_STORE_ATTR_INFO_pop(st) SKM_sk_pop(STORE_ATTR_INFO, (st))
-#define sk_STORE_ATTR_INFO_sort(st) SKM_sk_sort(STORE_ATTR_INFO, (st))
-#define sk_STORE_ATTR_INFO_is_sorted(st) SKM_sk_is_sorted(STORE_ATTR_INFO, (st))
-
-#define sk_STORE_OBJECT_new(cmp) SKM_sk_new(STORE_OBJECT, (cmp))
-#define sk_STORE_OBJECT_new_null() SKM_sk_new_null(STORE_OBJECT)
-#define sk_STORE_OBJECT_free(st) SKM_sk_free(STORE_OBJECT, (st))
-#define sk_STORE_OBJECT_num(st) SKM_sk_num(STORE_OBJECT, (st))
-#define sk_STORE_OBJECT_value(st, i) SKM_sk_value(STORE_OBJECT, (st), (i))
-#define sk_STORE_OBJECT_set(st, i, val) SKM_sk_set(STORE_OBJECT, (st), (i), (val))
-#define sk_STORE_OBJECT_zero(st) SKM_sk_zero(STORE_OBJECT, (st))
-#define sk_STORE_OBJECT_push(st, val) SKM_sk_push(STORE_OBJECT, (st), (val))
-#define sk_STORE_OBJECT_unshift(st, val) SKM_sk_unshift(STORE_OBJECT, (st), (val))
-#define sk_STORE_OBJECT_find(st, val) SKM_sk_find(STORE_OBJECT, (st), (val))
-#define sk_STORE_OBJECT_find_ex(st, val) SKM_sk_find_ex(STORE_OBJECT, (st), (val))
-#define sk_STORE_OBJECT_delete(st, i) SKM_sk_delete(STORE_OBJECT, (st), (i))
-#define sk_STORE_OBJECT_delete_ptr(st, ptr) SKM_sk_delete_ptr(STORE_OBJECT, (st), (ptr))
-#define sk_STORE_OBJECT_insert(st, val, i) SKM_sk_insert(STORE_OBJECT, (st), (val), (i))
-#define sk_STORE_OBJECT_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(STORE_OBJECT, (st), (cmp))
-#define sk_STORE_OBJECT_dup(st) SKM_sk_dup(STORE_OBJECT, st)
-#define sk_STORE_OBJECT_pop_free(st, free_func) SKM_sk_pop_free(STORE_OBJECT, (st), (free_func))
-#define sk_STORE_OBJECT_shift(st) SKM_sk_shift(STORE_OBJECT, (st))
-#define sk_STORE_OBJECT_pop(st) SKM_sk_pop(STORE_OBJECT, (st))
-#define sk_STORE_OBJECT_sort(st) SKM_sk_sort(STORE_OBJECT, (st))
-#define sk_STORE_OBJECT_is_sorted(st) SKM_sk_is_sorted(STORE_OBJECT, (st))
-
-#define sk_SXNETID_new(cmp) SKM_sk_new(SXNETID, (cmp))
-#define sk_SXNETID_new_null() SKM_sk_new_null(SXNETID)
-#define sk_SXNETID_free(st) SKM_sk_free(SXNETID, (st))
-#define sk_SXNETID_num(st) SKM_sk_num(SXNETID, (st))
-#define sk_SXNETID_value(st, i) SKM_sk_value(SXNETID, (st), (i))
-#define sk_SXNETID_set(st, i, val) SKM_sk_set(SXNETID, (st), (i), (val))
-#define sk_SXNETID_zero(st) SKM_sk_zero(SXNETID, (st))
-#define sk_SXNETID_push(st, val) SKM_sk_push(SXNETID, (st), (val))
-#define sk_SXNETID_unshift(st, val) SKM_sk_unshift(SXNETID, (st), (val))
-#define sk_SXNETID_find(st, val) SKM_sk_find(SXNETID, (st), (val))
-#define sk_SXNETID_find_ex(st, val) SKM_sk_find_ex(SXNETID, (st), (val))
-#define sk_SXNETID_delete(st, i) SKM_sk_delete(SXNETID, (st), (i))
-#define sk_SXNETID_delete_ptr(st, ptr) SKM_sk_delete_ptr(SXNETID, (st), (ptr))
-#define sk_SXNETID_insert(st, val, i) SKM_sk_insert(SXNETID, (st), (val), (i))
-#define sk_SXNETID_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(SXNETID, (st), (cmp))
-#define sk_SXNETID_dup(st) SKM_sk_dup(SXNETID, st)
-#define sk_SXNETID_pop_free(st, free_func) SKM_sk_pop_free(SXNETID, (st), (free_func))
-#define sk_SXNETID_shift(st) SKM_sk_shift(SXNETID, (st))
-#define sk_SXNETID_pop(st) SKM_sk_pop(SXNETID, (st))
-#define sk_SXNETID_sort(st) SKM_sk_sort(SXNETID, (st))
-#define sk_SXNETID_is_sorted(st) SKM_sk_is_sorted(SXNETID, (st))
-
-#define sk_UI_STRING_new(cmp) SKM_sk_new(UI_STRING, (cmp))
-#define sk_UI_STRING_new_null() SKM_sk_new_null(UI_STRING)
-#define sk_UI_STRING_free(st) SKM_sk_free(UI_STRING, (st))
-#define sk_UI_STRING_num(st) SKM_sk_num(UI_STRING, (st))
-#define sk_UI_STRING_value(st, i) SKM_sk_value(UI_STRING, (st), (i))
-#define sk_UI_STRING_set(st, i, val) SKM_sk_set(UI_STRING, (st), (i), (val))
-#define sk_UI_STRING_zero(st) SKM_sk_zero(UI_STRING, (st))
-#define sk_UI_STRING_push(st, val) SKM_sk_push(UI_STRING, (st), (val))
-#define sk_UI_STRING_unshift(st, val) SKM_sk_unshift(UI_STRING, (st), (val))
-#define sk_UI_STRING_find(st, val) SKM_sk_find(UI_STRING, (st), (val))
-#define sk_UI_STRING_find_ex(st, val) SKM_sk_find_ex(UI_STRING, (st), (val))
-#define sk_UI_STRING_delete(st, i) SKM_sk_delete(UI_STRING, (st), (i))
-#define sk_UI_STRING_delete_ptr(st, ptr) SKM_sk_delete_ptr(UI_STRING, (st), (ptr))
-#define sk_UI_STRING_insert(st, val, i) SKM_sk_insert(UI_STRING, (st), (val), (i))
-#define sk_UI_STRING_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(UI_STRING, (st), (cmp))
-#define sk_UI_STRING_dup(st) SKM_sk_dup(UI_STRING, st)
-#define sk_UI_STRING_pop_free(st, free_func) SKM_sk_pop_free(UI_STRING, (st), (free_func))
-#define sk_UI_STRING_shift(st) SKM_sk_shift(UI_STRING, (st))
-#define sk_UI_STRING_pop(st) SKM_sk_pop(UI_STRING, (st))
-#define sk_UI_STRING_sort(st) SKM_sk_sort(UI_STRING, (st))
-#define sk_UI_STRING_is_sorted(st) SKM_sk_is_sorted(UI_STRING, (st))
-
-#define sk_X509_new(cmp) SKM_sk_new(X509, (cmp))
-#define sk_X509_new_null() SKM_sk_new_null(X509)
-#define sk_X509_free(st) SKM_sk_free(X509, (st))
-#define sk_X509_num(st) SKM_sk_num(X509, (st))
-#define sk_X509_value(st, i) SKM_sk_value(X509, (st), (i))
-#define sk_X509_set(st, i, val) SKM_sk_set(X509, (st), (i), (val))
-#define sk_X509_zero(st) SKM_sk_zero(X509, (st))
-#define sk_X509_push(st, val) SKM_sk_push(X509, (st), (val))
-#define sk_X509_unshift(st, val) SKM_sk_unshift(X509, (st), (val))
-#define sk_X509_find(st, val) SKM_sk_find(X509, (st), (val))
-#define sk_X509_find_ex(st, val) SKM_sk_find_ex(X509, (st), (val))
-#define sk_X509_delete(st, i) SKM_sk_delete(X509, (st), (i))
-#define sk_X509_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509, (st), (ptr))
-#define sk_X509_insert(st, val, i) SKM_sk_insert(X509, (st), (val), (i))
-#define sk_X509_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509, (st), (cmp))
-#define sk_X509_dup(st) SKM_sk_dup(X509, st)
-#define sk_X509_pop_free(st, free_func) SKM_sk_pop_free(X509, (st), (free_func))
-#define sk_X509_shift(st) SKM_sk_shift(X509, (st))
-#define sk_X509_pop(st) SKM_sk_pop(X509, (st))
-#define sk_X509_sort(st) SKM_sk_sort(X509, (st))
-#define sk_X509_is_sorted(st) SKM_sk_is_sorted(X509, (st))
-
-#define sk_X509V3_EXT_METHOD_new(cmp) SKM_sk_new(X509V3_EXT_METHOD, (cmp))
-#define sk_X509V3_EXT_METHOD_new_null() SKM_sk_new_null(X509V3_EXT_METHOD)
-#define sk_X509V3_EXT_METHOD_free(st) SKM_sk_free(X509V3_EXT_METHOD, (st))
-#define sk_X509V3_EXT_METHOD_num(st) SKM_sk_num(X509V3_EXT_METHOD, (st))
-#define sk_X509V3_EXT_METHOD_value(st, i) SKM_sk_value(X509V3_EXT_METHOD, (st), (i))
-#define sk_X509V3_EXT_METHOD_set(st, i, val) SKM_sk_set(X509V3_EXT_METHOD, (st), (i), (val))
-#define sk_X509V3_EXT_METHOD_zero(st) SKM_sk_zero(X509V3_EXT_METHOD, (st))
-#define sk_X509V3_EXT_METHOD_push(st, val) SKM_sk_push(X509V3_EXT_METHOD, (st), (val))
-#define sk_X509V3_EXT_METHOD_unshift(st, val) SKM_sk_unshift(X509V3_EXT_METHOD, (st), (val))
-#define sk_X509V3_EXT_METHOD_find(st, val) SKM_sk_find(X509V3_EXT_METHOD, (st), (val))
-#define sk_X509V3_EXT_METHOD_find_ex(st, val) SKM_sk_find_ex(X509V3_EXT_METHOD, (st), (val))
-#define sk_X509V3_EXT_METHOD_delete(st, i) SKM_sk_delete(X509V3_EXT_METHOD, (st), (i))
-#define sk_X509V3_EXT_METHOD_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509V3_EXT_METHOD, (st), (ptr))
-#define sk_X509V3_EXT_METHOD_insert(st, val, i) SKM_sk_insert(X509V3_EXT_METHOD, (st), (val), (i))
-#define sk_X509V3_EXT_METHOD_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509V3_EXT_METHOD, (st), (cmp))
-#define sk_X509V3_EXT_METHOD_dup(st) SKM_sk_dup(X509V3_EXT_METHOD, st)
-#define sk_X509V3_EXT_METHOD_pop_free(st, free_func) SKM_sk_pop_free(X509V3_EXT_METHOD, (st), (free_func))
-#define sk_X509V3_EXT_METHOD_shift(st) SKM_sk_shift(X509V3_EXT_METHOD, (st))
-#define sk_X509V3_EXT_METHOD_pop(st) SKM_sk_pop(X509V3_EXT_METHOD, (st))
-#define sk_X509V3_EXT_METHOD_sort(st) SKM_sk_sort(X509V3_EXT_METHOD, (st))
-#define sk_X509V3_EXT_METHOD_is_sorted(st) SKM_sk_is_sorted(X509V3_EXT_METHOD, (st))
-
-#define sk_X509_ALGOR_new(cmp) SKM_sk_new(X509_ALGOR, (cmp))
-#define sk_X509_ALGOR_new_null() SKM_sk_new_null(X509_ALGOR)
-#define sk_X509_ALGOR_free(st) SKM_sk_free(X509_ALGOR, (st))
-#define sk_X509_ALGOR_num(st) SKM_sk_num(X509_ALGOR, (st))
-#define sk_X509_ALGOR_value(st, i) SKM_sk_value(X509_ALGOR, (st), (i))
-#define sk_X509_ALGOR_set(st, i, val) SKM_sk_set(X509_ALGOR, (st), (i), (val))
-#define sk_X509_ALGOR_zero(st) SKM_sk_zero(X509_ALGOR, (st))
-#define sk_X509_ALGOR_push(st, val) SKM_sk_push(X509_ALGOR, (st), (val))
-#define sk_X509_ALGOR_unshift(st, val) SKM_sk_unshift(X509_ALGOR, (st), (val))
-#define sk_X509_ALGOR_find(st, val) SKM_sk_find(X509_ALGOR, (st), (val))
-#define sk_X509_ALGOR_find_ex(st, val) SKM_sk_find_ex(X509_ALGOR, (st), (val))
-#define sk_X509_ALGOR_delete(st, i) SKM_sk_delete(X509_ALGOR, (st), (i))
-#define sk_X509_ALGOR_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_ALGOR, (st), (ptr))
-#define sk_X509_ALGOR_insert(st, val, i) SKM_sk_insert(X509_ALGOR, (st), (val), (i))
-#define sk_X509_ALGOR_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_ALGOR, (st), (cmp))
-#define sk_X509_ALGOR_dup(st) SKM_sk_dup(X509_ALGOR, st)
-#define sk_X509_ALGOR_pop_free(st, free_func) SKM_sk_pop_free(X509_ALGOR, (st), (free_func))
-#define sk_X509_ALGOR_shift(st) SKM_sk_shift(X509_ALGOR, (st))
-#define sk_X509_ALGOR_pop(st) SKM_sk_pop(X509_ALGOR, (st))
-#define sk_X509_ALGOR_sort(st) SKM_sk_sort(X509_ALGOR, (st))
-#define sk_X509_ALGOR_is_sorted(st) SKM_sk_is_sorted(X509_ALGOR, (st))
-
-#define sk_X509_ATTRIBUTE_new(cmp) SKM_sk_new(X509_ATTRIBUTE, (cmp))
-#define sk_X509_ATTRIBUTE_new_null() SKM_sk_new_null(X509_ATTRIBUTE)
-#define sk_X509_ATTRIBUTE_free(st) SKM_sk_free(X509_ATTRIBUTE, (st))
-#define sk_X509_ATTRIBUTE_num(st) SKM_sk_num(X509_ATTRIBUTE, (st))
-#define sk_X509_ATTRIBUTE_value(st, i) SKM_sk_value(X509_ATTRIBUTE, (st), (i))
-#define sk_X509_ATTRIBUTE_set(st, i, val) SKM_sk_set(X509_ATTRIBUTE, (st), (i), (val))
-#define sk_X509_ATTRIBUTE_zero(st) SKM_sk_zero(X509_ATTRIBUTE, (st))
-#define sk_X509_ATTRIBUTE_push(st, val) SKM_sk_push(X509_ATTRIBUTE, (st), (val))
-#define sk_X509_ATTRIBUTE_unshift(st, val) SKM_sk_unshift(X509_ATTRIBUTE, (st), (val))
-#define sk_X509_ATTRIBUTE_find(st, val) SKM_sk_find(X509_ATTRIBUTE, (st), (val))
-#define sk_X509_ATTRIBUTE_find_ex(st, val) SKM_sk_find_ex(X509_ATTRIBUTE, (st), (val))
-#define sk_X509_ATTRIBUTE_delete(st, i) SKM_sk_delete(X509_ATTRIBUTE, (st), (i))
-#define sk_X509_ATTRIBUTE_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_ATTRIBUTE, (st), (ptr))
-#define sk_X509_ATTRIBUTE_insert(st, val, i) SKM_sk_insert(X509_ATTRIBUTE, (st), (val), (i))
-#define sk_X509_ATTRIBUTE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_ATTRIBUTE, (st), (cmp))
-#define sk_X509_ATTRIBUTE_dup(st) SKM_sk_dup(X509_ATTRIBUTE, st)
-#define sk_X509_ATTRIBUTE_pop_free(st, free_func) SKM_sk_pop_free(X509_ATTRIBUTE, (st), (free_func))
-#define sk_X509_ATTRIBUTE_shift(st) SKM_sk_shift(X509_ATTRIBUTE, (st))
-#define sk_X509_ATTRIBUTE_pop(st) SKM_sk_pop(X509_ATTRIBUTE, (st))
-#define sk_X509_ATTRIBUTE_sort(st) SKM_sk_sort(X509_ATTRIBUTE, (st))
-#define sk_X509_ATTRIBUTE_is_sorted(st) SKM_sk_is_sorted(X509_ATTRIBUTE, (st))
-
-#define sk_X509_CRL_new(cmp) SKM_sk_new(X509_CRL, (cmp))
-#define sk_X509_CRL_new_null() SKM_sk_new_null(X509_CRL)
-#define sk_X509_CRL_free(st) SKM_sk_free(X509_CRL, (st))
-#define sk_X509_CRL_num(st) SKM_sk_num(X509_CRL, (st))
-#define sk_X509_CRL_value(st, i) SKM_sk_value(X509_CRL, (st), (i))
-#define sk_X509_CRL_set(st, i, val) SKM_sk_set(X509_CRL, (st), (i), (val))
-#define sk_X509_CRL_zero(st) SKM_sk_zero(X509_CRL, (st))
-#define sk_X509_CRL_push(st, val) SKM_sk_push(X509_CRL, (st), (val))
-#define sk_X509_CRL_unshift(st, val) SKM_sk_unshift(X509_CRL, (st), (val))
-#define sk_X509_CRL_find(st, val) SKM_sk_find(X509_CRL, (st), (val))
-#define sk_X509_CRL_find_ex(st, val) SKM_sk_find_ex(X509_CRL, (st), (val))
-#define sk_X509_CRL_delete(st, i) SKM_sk_delete(X509_CRL, (st), (i))
-#define sk_X509_CRL_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_CRL, (st), (ptr))
-#define sk_X509_CRL_insert(st, val, i) SKM_sk_insert(X509_CRL, (st), (val), (i))
-#define sk_X509_CRL_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_CRL, (st), (cmp))
-#define sk_X509_CRL_dup(st) SKM_sk_dup(X509_CRL, st)
-#define sk_X509_CRL_pop_free(st, free_func) SKM_sk_pop_free(X509_CRL, (st), (free_func))
-#define sk_X509_CRL_shift(st) SKM_sk_shift(X509_CRL, (st))
-#define sk_X509_CRL_pop(st) SKM_sk_pop(X509_CRL, (st))
-#define sk_X509_CRL_sort(st) SKM_sk_sort(X509_CRL, (st))
-#define sk_X509_CRL_is_sorted(st) SKM_sk_is_sorted(X509_CRL, (st))
-
-#define sk_X509_EXTENSION_new(cmp) SKM_sk_new(X509_EXTENSION, (cmp))
-#define sk_X509_EXTENSION_new_null() SKM_sk_new_null(X509_EXTENSION)
-#define sk_X509_EXTENSION_free(st) SKM_sk_free(X509_EXTENSION, (st))
-#define sk_X509_EXTENSION_num(st) SKM_sk_num(X509_EXTENSION, (st))
-#define sk_X509_EXTENSION_value(st, i) SKM_sk_value(X509_EXTENSION, (st), (i))
-#define sk_X509_EXTENSION_set(st, i, val) SKM_sk_set(X509_EXTENSION, (st), (i), (val))
-#define sk_X509_EXTENSION_zero(st) SKM_sk_zero(X509_EXTENSION, (st))
-#define sk_X509_EXTENSION_push(st, val) SKM_sk_push(X509_EXTENSION, (st), (val))
-#define sk_X509_EXTENSION_unshift(st, val) SKM_sk_unshift(X509_EXTENSION, (st), (val))
-#define sk_X509_EXTENSION_find(st, val) SKM_sk_find(X509_EXTENSION, (st), (val))
-#define sk_X509_EXTENSION_find_ex(st, val) SKM_sk_find_ex(X509_EXTENSION, (st), (val))
-#define sk_X509_EXTENSION_delete(st, i) SKM_sk_delete(X509_EXTENSION, (st), (i))
-#define sk_X509_EXTENSION_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_EXTENSION, (st), (ptr))
-#define sk_X509_EXTENSION_insert(st, val, i) SKM_sk_insert(X509_EXTENSION, (st), (val), (i))
-#define sk_X509_EXTENSION_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_EXTENSION, (st), (cmp))
-#define sk_X509_EXTENSION_dup(st) SKM_sk_dup(X509_EXTENSION, st)
-#define sk_X509_EXTENSION_pop_free(st, free_func) SKM_sk_pop_free(X509_EXTENSION, (st), (free_func))
-#define sk_X509_EXTENSION_shift(st) SKM_sk_shift(X509_EXTENSION, (st))
-#define sk_X509_EXTENSION_pop(st) SKM_sk_pop(X509_EXTENSION, (st))
-#define sk_X509_EXTENSION_sort(st) SKM_sk_sort(X509_EXTENSION, (st))
-#define sk_X509_EXTENSION_is_sorted(st) SKM_sk_is_sorted(X509_EXTENSION, (st))
-
-#define sk_X509_INFO_new(cmp) SKM_sk_new(X509_INFO, (cmp))
-#define sk_X509_INFO_new_null() SKM_sk_new_null(X509_INFO)
-#define sk_X509_INFO_free(st) SKM_sk_free(X509_INFO, (st))
-#define sk_X509_INFO_num(st) SKM_sk_num(X509_INFO, (st))
-#define sk_X509_INFO_value(st, i) SKM_sk_value(X509_INFO, (st), (i))
-#define sk_X509_INFO_set(st, i, val) SKM_sk_set(X509_INFO, (st), (i), (val))
-#define sk_X509_INFO_zero(st) SKM_sk_zero(X509_INFO, (st))
-#define sk_X509_INFO_push(st, val) SKM_sk_push(X509_INFO, (st), (val))
-#define sk_X509_INFO_unshift(st, val) SKM_sk_unshift(X509_INFO, (st), (val))
-#define sk_X509_INFO_find(st, val) SKM_sk_find(X509_INFO, (st), (val))
-#define sk_X509_INFO_find_ex(st, val) SKM_sk_find_ex(X509_INFO, (st), (val))
-#define sk_X509_INFO_delete(st, i) SKM_sk_delete(X509_INFO, (st), (i))
-#define sk_X509_INFO_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_INFO, (st), (ptr))
-#define sk_X509_INFO_insert(st, val, i) SKM_sk_insert(X509_INFO, (st), (val), (i))
-#define sk_X509_INFO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_INFO, (st), (cmp))
-#define sk_X509_INFO_dup(st) SKM_sk_dup(X509_INFO, st)
-#define sk_X509_INFO_pop_free(st, free_func) SKM_sk_pop_free(X509_INFO, (st), (free_func))
-#define sk_X509_INFO_shift(st) SKM_sk_shift(X509_INFO, (st))
-#define sk_X509_INFO_pop(st) SKM_sk_pop(X509_INFO, (st))
-#define sk_X509_INFO_sort(st) SKM_sk_sort(X509_INFO, (st))
-#define sk_X509_INFO_is_sorted(st) SKM_sk_is_sorted(X509_INFO, (st))
-
-#define sk_X509_LOOKUP_new(cmp) SKM_sk_new(X509_LOOKUP, (cmp))
-#define sk_X509_LOOKUP_new_null() SKM_sk_new_null(X509_LOOKUP)
-#define sk_X509_LOOKUP_free(st) SKM_sk_free(X509_LOOKUP, (st))
-#define sk_X509_LOOKUP_num(st) SKM_sk_num(X509_LOOKUP, (st))
-#define sk_X509_LOOKUP_value(st, i) SKM_sk_value(X509_LOOKUP, (st), (i))
-#define sk_X509_LOOKUP_set(st, i, val) SKM_sk_set(X509_LOOKUP, (st), (i), (val))
-#define sk_X509_LOOKUP_zero(st) SKM_sk_zero(X509_LOOKUP, (st))
-#define sk_X509_LOOKUP_push(st, val) SKM_sk_push(X509_LOOKUP, (st), (val))
-#define sk_X509_LOOKUP_unshift(st, val) SKM_sk_unshift(X509_LOOKUP, (st), (val))
-#define sk_X509_LOOKUP_find(st, val) SKM_sk_find(X509_LOOKUP, (st), (val))
-#define sk_X509_LOOKUP_find_ex(st, val) SKM_sk_find_ex(X509_LOOKUP, (st), (val))
-#define sk_X509_LOOKUP_delete(st, i) SKM_sk_delete(X509_LOOKUP, (st), (i))
-#define sk_X509_LOOKUP_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_LOOKUP, (st), (ptr))
-#define sk_X509_LOOKUP_insert(st, val, i) SKM_sk_insert(X509_LOOKUP, (st), (val), (i))
-#define sk_X509_LOOKUP_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_LOOKUP, (st), (cmp))
-#define sk_X509_LOOKUP_dup(st) SKM_sk_dup(X509_LOOKUP, st)
-#define sk_X509_LOOKUP_pop_free(st, free_func) SKM_sk_pop_free(X509_LOOKUP, (st), (free_func))
-#define sk_X509_LOOKUP_shift(st) SKM_sk_shift(X509_LOOKUP, (st))
-#define sk_X509_LOOKUP_pop(st) SKM_sk_pop(X509_LOOKUP, (st))
-#define sk_X509_LOOKUP_sort(st) SKM_sk_sort(X509_LOOKUP, (st))
-#define sk_X509_LOOKUP_is_sorted(st) SKM_sk_is_sorted(X509_LOOKUP, (st))
-
-#define sk_X509_NAME_new(cmp) SKM_sk_new(X509_NAME, (cmp))
-#define sk_X509_NAME_new_null() SKM_sk_new_null(X509_NAME)
-#define sk_X509_NAME_free(st) SKM_sk_free(X509_NAME, (st))
-#define sk_X509_NAME_num(st) SKM_sk_num(X509_NAME, (st))
-#define sk_X509_NAME_value(st, i) SKM_sk_value(X509_NAME, (st), (i))
-#define sk_X509_NAME_set(st, i, val) SKM_sk_set(X509_NAME, (st), (i), (val))
-#define sk_X509_NAME_zero(st) SKM_sk_zero(X509_NAME, (st))
-#define sk_X509_NAME_push(st, val) SKM_sk_push(X509_NAME, (st), (val))
-#define sk_X509_NAME_unshift(st, val) SKM_sk_unshift(X509_NAME, (st), (val))
-#define sk_X509_NAME_find(st, val) SKM_sk_find(X509_NAME, (st), (val))
-#define sk_X509_NAME_find_ex(st, val) SKM_sk_find_ex(X509_NAME, (st), (val))
-#define sk_X509_NAME_delete(st, i) SKM_sk_delete(X509_NAME, (st), (i))
-#define sk_X509_NAME_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_NAME, (st), (ptr))
-#define sk_X509_NAME_insert(st, val, i) SKM_sk_insert(X509_NAME, (st), (val), (i))
-#define sk_X509_NAME_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_NAME, (st), (cmp))
-#define sk_X509_NAME_dup(st) SKM_sk_dup(X509_NAME, st)
-#define sk_X509_NAME_pop_free(st, free_func) SKM_sk_pop_free(X509_NAME, (st), (free_func))
-#define sk_X509_NAME_shift(st) SKM_sk_shift(X509_NAME, (st))
-#define sk_X509_NAME_pop(st) SKM_sk_pop(X509_NAME, (st))
-#define sk_X509_NAME_sort(st) SKM_sk_sort(X509_NAME, (st))
-#define sk_X509_NAME_is_sorted(st) SKM_sk_is_sorted(X509_NAME, (st))
-
-#define sk_X509_NAME_ENTRY_new(cmp) SKM_sk_new(X509_NAME_ENTRY, (cmp))
-#define sk_X509_NAME_ENTRY_new_null() SKM_sk_new_null(X509_NAME_ENTRY)
-#define sk_X509_NAME_ENTRY_free(st) SKM_sk_free(X509_NAME_ENTRY, (st))
-#define sk_X509_NAME_ENTRY_num(st) SKM_sk_num(X509_NAME_ENTRY, (st))
-#define sk_X509_NAME_ENTRY_value(st, i) SKM_sk_value(X509_NAME_ENTRY, (st), (i))
-#define sk_X509_NAME_ENTRY_set(st, i, val) SKM_sk_set(X509_NAME_ENTRY, (st), (i), (val))
-#define sk_X509_NAME_ENTRY_zero(st) SKM_sk_zero(X509_NAME_ENTRY, (st))
-#define sk_X509_NAME_ENTRY_push(st, val) SKM_sk_push(X509_NAME_ENTRY, (st), (val))
-#define sk_X509_NAME_ENTRY_unshift(st, val) SKM_sk_unshift(X509_NAME_ENTRY, (st), (val))
-#define sk_X509_NAME_ENTRY_find(st, val) SKM_sk_find(X509_NAME_ENTRY, (st), (val))
-#define sk_X509_NAME_ENTRY_find_ex(st, val) SKM_sk_find_ex(X509_NAME_ENTRY, (st), (val))
-#define sk_X509_NAME_ENTRY_delete(st, i) SKM_sk_delete(X509_NAME_ENTRY, (st), (i))
-#define sk_X509_NAME_ENTRY_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_NAME_ENTRY, (st), (ptr))
-#define sk_X509_NAME_ENTRY_insert(st, val, i) SKM_sk_insert(X509_NAME_ENTRY, (st), (val), (i))
-#define sk_X509_NAME_ENTRY_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_NAME_ENTRY, (st), (cmp))
-#define sk_X509_NAME_ENTRY_dup(st) SKM_sk_dup(X509_NAME_ENTRY, st)
-#define sk_X509_NAME_ENTRY_pop_free(st, free_func) SKM_sk_pop_free(X509_NAME_ENTRY, (st), (free_func))
-#define sk_X509_NAME_ENTRY_shift(st) SKM_sk_shift(X509_NAME_ENTRY, (st))
-#define sk_X509_NAME_ENTRY_pop(st) SKM_sk_pop(X509_NAME_ENTRY, (st))
-#define sk_X509_NAME_ENTRY_sort(st) SKM_sk_sort(X509_NAME_ENTRY, (st))
-#define sk_X509_NAME_ENTRY_is_sorted(st) SKM_sk_is_sorted(X509_NAME_ENTRY, (st))
-
-#define sk_X509_OBJECT_new(cmp) SKM_sk_new(X509_OBJECT, (cmp))
-#define sk_X509_OBJECT_new_null() SKM_sk_new_null(X509_OBJECT)
-#define sk_X509_OBJECT_free(st) SKM_sk_free(X509_OBJECT, (st))
-#define sk_X509_OBJECT_num(st) SKM_sk_num(X509_OBJECT, (st))
-#define sk_X509_OBJECT_value(st, i) SKM_sk_value(X509_OBJECT, (st), (i))
-#define sk_X509_OBJECT_set(st, i, val) SKM_sk_set(X509_OBJECT, (st), (i), (val))
-#define sk_X509_OBJECT_zero(st) SKM_sk_zero(X509_OBJECT, (st))
-#define sk_X509_OBJECT_push(st, val) SKM_sk_push(X509_OBJECT, (st), (val))
-#define sk_X509_OBJECT_unshift(st, val) SKM_sk_unshift(X509_OBJECT, (st), (val))
-#define sk_X509_OBJECT_find(st, val) SKM_sk_find(X509_OBJECT, (st), (val))
-#define sk_X509_OBJECT_find_ex(st, val) SKM_sk_find_ex(X509_OBJECT, (st), (val))
-#define sk_X509_OBJECT_delete(st, i) SKM_sk_delete(X509_OBJECT, (st), (i))
-#define sk_X509_OBJECT_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_OBJECT, (st), (ptr))
-#define sk_X509_OBJECT_insert(st, val, i) SKM_sk_insert(X509_OBJECT, (st), (val), (i))
-#define sk_X509_OBJECT_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_OBJECT, (st), (cmp))
-#define sk_X509_OBJECT_dup(st) SKM_sk_dup(X509_OBJECT, st)
-#define sk_X509_OBJECT_pop_free(st, free_func) SKM_sk_pop_free(X509_OBJECT, (st), (free_func))
-#define sk_X509_OBJECT_shift(st) SKM_sk_shift(X509_OBJECT, (st))
-#define sk_X509_OBJECT_pop(st) SKM_sk_pop(X509_OBJECT, (st))
-#define sk_X509_OBJECT_sort(st) SKM_sk_sort(X509_OBJECT, (st))
-#define sk_X509_OBJECT_is_sorted(st) SKM_sk_is_sorted(X509_OBJECT, (st))
-
-#define sk_X509_POLICY_DATA_new(cmp) SKM_sk_new(X509_POLICY_DATA, (cmp))
-#define sk_X509_POLICY_DATA_new_null() SKM_sk_new_null(X509_POLICY_DATA)
-#define sk_X509_POLICY_DATA_free(st) SKM_sk_free(X509_POLICY_DATA, (st))
-#define sk_X509_POLICY_DATA_num(st) SKM_sk_num(X509_POLICY_DATA, (st))
-#define sk_X509_POLICY_DATA_value(st, i) SKM_sk_value(X509_POLICY_DATA, (st), (i))
-#define sk_X509_POLICY_DATA_set(st, i, val) SKM_sk_set(X509_POLICY_DATA, (st), (i), (val))
-#define sk_X509_POLICY_DATA_zero(st) SKM_sk_zero(X509_POLICY_DATA, (st))
-#define sk_X509_POLICY_DATA_push(st, val) SKM_sk_push(X509_POLICY_DATA, (st), (val))
-#define sk_X509_POLICY_DATA_unshift(st, val) SKM_sk_unshift(X509_POLICY_DATA, (st), (val))
-#define sk_X509_POLICY_DATA_find(st, val) SKM_sk_find(X509_POLICY_DATA, (st), (val))
-#define sk_X509_POLICY_DATA_find_ex(st, val) SKM_sk_find_ex(X509_POLICY_DATA, (st), (val))
-#define sk_X509_POLICY_DATA_delete(st, i) SKM_sk_delete(X509_POLICY_DATA, (st), (i))
-#define sk_X509_POLICY_DATA_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_POLICY_DATA, (st), (ptr))
-#define sk_X509_POLICY_DATA_insert(st, val, i) SKM_sk_insert(X509_POLICY_DATA, (st), (val), (i))
-#define sk_X509_POLICY_DATA_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_POLICY_DATA, (st), (cmp))
-#define sk_X509_POLICY_DATA_dup(st) SKM_sk_dup(X509_POLICY_DATA, st)
-#define sk_X509_POLICY_DATA_pop_free(st, free_func) SKM_sk_pop_free(X509_POLICY_DATA, (st), (free_func))
-#define sk_X509_POLICY_DATA_shift(st) SKM_sk_shift(X509_POLICY_DATA, (st))
-#define sk_X509_POLICY_DATA_pop(st) SKM_sk_pop(X509_POLICY_DATA, (st))
-#define sk_X509_POLICY_DATA_sort(st) SKM_sk_sort(X509_POLICY_DATA, (st))
-#define sk_X509_POLICY_DATA_is_sorted(st) SKM_sk_is_sorted(X509_POLICY_DATA, (st))
-
-#define sk_X509_POLICY_NODE_new(cmp) SKM_sk_new(X509_POLICY_NODE, (cmp))
-#define sk_X509_POLICY_NODE_new_null() SKM_sk_new_null(X509_POLICY_NODE)
-#define sk_X509_POLICY_NODE_free(st) SKM_sk_free(X509_POLICY_NODE, (st))
-#define sk_X509_POLICY_NODE_num(st) SKM_sk_num(X509_POLICY_NODE, (st))
-#define sk_X509_POLICY_NODE_value(st, i) SKM_sk_value(X509_POLICY_NODE, (st), (i))
-#define sk_X509_POLICY_NODE_set(st, i, val) SKM_sk_set(X509_POLICY_NODE, (st), (i), (val))
-#define sk_X509_POLICY_NODE_zero(st) SKM_sk_zero(X509_POLICY_NODE, (st))
-#define sk_X509_POLICY_NODE_push(st, val) SKM_sk_push(X509_POLICY_NODE, (st), (val))
-#define sk_X509_POLICY_NODE_unshift(st, val) SKM_sk_unshift(X509_POLICY_NODE, (st), (val))
-#define sk_X509_POLICY_NODE_find(st, val) SKM_sk_find(X509_POLICY_NODE, (st), (val))
-#define sk_X509_POLICY_NODE_find_ex(st, val) SKM_sk_find_ex(X509_POLICY_NODE, (st), (val))
-#define sk_X509_POLICY_NODE_delete(st, i) SKM_sk_delete(X509_POLICY_NODE, (st), (i))
-#define sk_X509_POLICY_NODE_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_POLICY_NODE, (st), (ptr))
-#define sk_X509_POLICY_NODE_insert(st, val, i) SKM_sk_insert(X509_POLICY_NODE, (st), (val), (i))
-#define sk_X509_POLICY_NODE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_POLICY_NODE, (st), (cmp))
-#define sk_X509_POLICY_NODE_dup(st) SKM_sk_dup(X509_POLICY_NODE, st)
-#define sk_X509_POLICY_NODE_pop_free(st, free_func) SKM_sk_pop_free(X509_POLICY_NODE, (st), (free_func))
-#define sk_X509_POLICY_NODE_shift(st) SKM_sk_shift(X509_POLICY_NODE, (st))
-#define sk_X509_POLICY_NODE_pop(st) SKM_sk_pop(X509_POLICY_NODE, (st))
-#define sk_X509_POLICY_NODE_sort(st) SKM_sk_sort(X509_POLICY_NODE, (st))
-#define sk_X509_POLICY_NODE_is_sorted(st) SKM_sk_is_sorted(X509_POLICY_NODE, (st))
-
-#define sk_X509_PURPOSE_new(cmp) SKM_sk_new(X509_PURPOSE, (cmp))
-#define sk_X509_PURPOSE_new_null() SKM_sk_new_null(X509_PURPOSE)
-#define sk_X509_PURPOSE_free(st) SKM_sk_free(X509_PURPOSE, (st))
-#define sk_X509_PURPOSE_num(st) SKM_sk_num(X509_PURPOSE, (st))
-#define sk_X509_PURPOSE_value(st, i) SKM_sk_value(X509_PURPOSE, (st), (i))
-#define sk_X509_PURPOSE_set(st, i, val) SKM_sk_set(X509_PURPOSE, (st), (i), (val))
-#define sk_X509_PURPOSE_zero(st) SKM_sk_zero(X509_PURPOSE, (st))
-#define sk_X509_PURPOSE_push(st, val) SKM_sk_push(X509_PURPOSE, (st), (val))
-#define sk_X509_PURPOSE_unshift(st, val) SKM_sk_unshift(X509_PURPOSE, (st), (val))
-#define sk_X509_PURPOSE_find(st, val) SKM_sk_find(X509_PURPOSE, (st), (val))
-#define sk_X509_PURPOSE_find_ex(st, val) SKM_sk_find_ex(X509_PURPOSE, (st), (val))
-#define sk_X509_PURPOSE_delete(st, i) SKM_sk_delete(X509_PURPOSE, (st), (i))
-#define sk_X509_PURPOSE_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_PURPOSE, (st), (ptr))
-#define sk_X509_PURPOSE_insert(st, val, i) SKM_sk_insert(X509_PURPOSE, (st), (val), (i))
-#define sk_X509_PURPOSE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_PURPOSE, (st), (cmp))
-#define sk_X509_PURPOSE_dup(st) SKM_sk_dup(X509_PURPOSE, st)
-#define sk_X509_PURPOSE_pop_free(st, free_func) SKM_sk_pop_free(X509_PURPOSE, (st), (free_func))
-#define sk_X509_PURPOSE_shift(st) SKM_sk_shift(X509_PURPOSE, (st))
-#define sk_X509_PURPOSE_pop(st) SKM_sk_pop(X509_PURPOSE, (st))
-#define sk_X509_PURPOSE_sort(st) SKM_sk_sort(X509_PURPOSE, (st))
-#define sk_X509_PURPOSE_is_sorted(st) SKM_sk_is_sorted(X509_PURPOSE, (st))
-
-#define sk_X509_REVOKED_new(cmp) SKM_sk_new(X509_REVOKED, (cmp))
-#define sk_X509_REVOKED_new_null() SKM_sk_new_null(X509_REVOKED)
-#define sk_X509_REVOKED_free(st) SKM_sk_free(X509_REVOKED, (st))
-#define sk_X509_REVOKED_num(st) SKM_sk_num(X509_REVOKED, (st))
-#define sk_X509_REVOKED_value(st, i) SKM_sk_value(X509_REVOKED, (st), (i))
-#define sk_X509_REVOKED_set(st, i, val) SKM_sk_set(X509_REVOKED, (st), (i), (val))
-#define sk_X509_REVOKED_zero(st) SKM_sk_zero(X509_REVOKED, (st))
-#define sk_X509_REVOKED_push(st, val) SKM_sk_push(X509_REVOKED, (st), (val))
-#define sk_X509_REVOKED_unshift(st, val) SKM_sk_unshift(X509_REVOKED, (st), (val))
-#define sk_X509_REVOKED_find(st, val) SKM_sk_find(X509_REVOKED, (st), (val))
-#define sk_X509_REVOKED_find_ex(st, val) SKM_sk_find_ex(X509_REVOKED, (st), (val))
-#define sk_X509_REVOKED_delete(st, i) SKM_sk_delete(X509_REVOKED, (st), (i))
-#define sk_X509_REVOKED_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_REVOKED, (st), (ptr))
-#define sk_X509_REVOKED_insert(st, val, i) SKM_sk_insert(X509_REVOKED, (st), (val), (i))
-#define sk_X509_REVOKED_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_REVOKED, (st), (cmp))
-#define sk_X509_REVOKED_dup(st) SKM_sk_dup(X509_REVOKED, st)
-#define sk_X509_REVOKED_pop_free(st, free_func) SKM_sk_pop_free(X509_REVOKED, (st), (free_func))
-#define sk_X509_REVOKED_shift(st) SKM_sk_shift(X509_REVOKED, (st))
-#define sk_X509_REVOKED_pop(st) SKM_sk_pop(X509_REVOKED, (st))
-#define sk_X509_REVOKED_sort(st) SKM_sk_sort(X509_REVOKED, (st))
-#define sk_X509_REVOKED_is_sorted(st) SKM_sk_is_sorted(X509_REVOKED, (st))
-
-#define sk_X509_TRUST_new(cmp) SKM_sk_new(X509_TRUST, (cmp))
-#define sk_X509_TRUST_new_null() SKM_sk_new_null(X509_TRUST)
-#define sk_X509_TRUST_free(st) SKM_sk_free(X509_TRUST, (st))
-#define sk_X509_TRUST_num(st) SKM_sk_num(X509_TRUST, (st))
-#define sk_X509_TRUST_value(st, i) SKM_sk_value(X509_TRUST, (st), (i))
-#define sk_X509_TRUST_set(st, i, val) SKM_sk_set(X509_TRUST, (st), (i), (val))
-#define sk_X509_TRUST_zero(st) SKM_sk_zero(X509_TRUST, (st))
-#define sk_X509_TRUST_push(st, val) SKM_sk_push(X509_TRUST, (st), (val))
-#define sk_X509_TRUST_unshift(st, val) SKM_sk_unshift(X509_TRUST, (st), (val))
-#define sk_X509_TRUST_find(st, val) SKM_sk_find(X509_TRUST, (st), (val))
-#define sk_X509_TRUST_find_ex(st, val) SKM_sk_find_ex(X509_TRUST, (st), (val))
-#define sk_X509_TRUST_delete(st, i) SKM_sk_delete(X509_TRUST, (st), (i))
-#define sk_X509_TRUST_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_TRUST, (st), (ptr))
-#define sk_X509_TRUST_insert(st, val, i) SKM_sk_insert(X509_TRUST, (st), (val), (i))
-#define sk_X509_TRUST_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_TRUST, (st), (cmp))
-#define sk_X509_TRUST_dup(st) SKM_sk_dup(X509_TRUST, st)
-#define sk_X509_TRUST_pop_free(st, free_func) SKM_sk_pop_free(X509_TRUST, (st), (free_func))
-#define sk_X509_TRUST_shift(st) SKM_sk_shift(X509_TRUST, (st))
-#define sk_X509_TRUST_pop(st) SKM_sk_pop(X509_TRUST, (st))
-#define sk_X509_TRUST_sort(st) SKM_sk_sort(X509_TRUST, (st))
-#define sk_X509_TRUST_is_sorted(st) SKM_sk_is_sorted(X509_TRUST, (st))
-
-#define sk_X509_VERIFY_PARAM_new(cmp) SKM_sk_new(X509_VERIFY_PARAM, (cmp))
-#define sk_X509_VERIFY_PARAM_new_null() SKM_sk_new_null(X509_VERIFY_PARAM)
-#define sk_X509_VERIFY_PARAM_free(st) SKM_sk_free(X509_VERIFY_PARAM, (st))
-#define sk_X509_VERIFY_PARAM_num(st) SKM_sk_num(X509_VERIFY_PARAM, (st))
-#define sk_X509_VERIFY_PARAM_value(st, i) SKM_sk_value(X509_VERIFY_PARAM, (st), (i))
-#define sk_X509_VERIFY_PARAM_set(st, i, val) SKM_sk_set(X509_VERIFY_PARAM, (st), (i), (val))
-#define sk_X509_VERIFY_PARAM_zero(st) SKM_sk_zero(X509_VERIFY_PARAM, (st))
-#define sk_X509_VERIFY_PARAM_push(st, val) SKM_sk_push(X509_VERIFY_PARAM, (st), (val))
-#define sk_X509_VERIFY_PARAM_unshift(st, val) SKM_sk_unshift(X509_VERIFY_PARAM, (st), (val))
-#define sk_X509_VERIFY_PARAM_find(st, val) SKM_sk_find(X509_VERIFY_PARAM, (st), (val))
-#define sk_X509_VERIFY_PARAM_find_ex(st, val) SKM_sk_find_ex(X509_VERIFY_PARAM, (st), (val))
-#define sk_X509_VERIFY_PARAM_delete(st, i) SKM_sk_delete(X509_VERIFY_PARAM, (st), (i))
-#define sk_X509_VERIFY_PARAM_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_VERIFY_PARAM, (st), (ptr))
-#define sk_X509_VERIFY_PARAM_insert(st, val, i) SKM_sk_insert(X509_VERIFY_PARAM, (st), (val), (i))
-#define sk_X509_VERIFY_PARAM_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_VERIFY_PARAM, (st), (cmp))
-#define sk_X509_VERIFY_PARAM_dup(st) SKM_sk_dup(X509_VERIFY_PARAM, st)
-#define sk_X509_VERIFY_PARAM_pop_free(st, free_func) SKM_sk_pop_free(X509_VERIFY_PARAM, (st), (free_func))
-#define sk_X509_VERIFY_PARAM_shift(st) SKM_sk_shift(X509_VERIFY_PARAM, (st))
-#define sk_X509_VERIFY_PARAM_pop(st) SKM_sk_pop(X509_VERIFY_PARAM, (st))
-#define sk_X509_VERIFY_PARAM_sort(st) SKM_sk_sort(X509_VERIFY_PARAM, (st))
-#define sk_X509_VERIFY_PARAM_is_sorted(st) SKM_sk_is_sorted(X509_VERIFY_PARAM, (st))
-
-#define sk_nid_triple_new(cmp) SKM_sk_new(nid_triple, (cmp))
-#define sk_nid_triple_new_null() SKM_sk_new_null(nid_triple)
-#define sk_nid_triple_free(st) SKM_sk_free(nid_triple, (st))
-#define sk_nid_triple_num(st) SKM_sk_num(nid_triple, (st))
-#define sk_nid_triple_value(st, i) SKM_sk_value(nid_triple, (st), (i))
-#define sk_nid_triple_set(st, i, val) SKM_sk_set(nid_triple, (st), (i), (val))
-#define sk_nid_triple_zero(st) SKM_sk_zero(nid_triple, (st))
-#define sk_nid_triple_push(st, val) SKM_sk_push(nid_triple, (st), (val))
-#define sk_nid_triple_unshift(st, val) SKM_sk_unshift(nid_triple, (st), (val))
-#define sk_nid_triple_find(st, val) SKM_sk_find(nid_triple, (st), (val))
-#define sk_nid_triple_find_ex(st, val) SKM_sk_find_ex(nid_triple, (st), (val))
-#define sk_nid_triple_delete(st, i) SKM_sk_delete(nid_triple, (st), (i))
-#define sk_nid_triple_delete_ptr(st, ptr) SKM_sk_delete_ptr(nid_triple, (st), (ptr))
-#define sk_nid_triple_insert(st, val, i) SKM_sk_insert(nid_triple, (st), (val), (i))
-#define sk_nid_triple_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(nid_triple, (st), (cmp))
-#define sk_nid_triple_dup(st) SKM_sk_dup(nid_triple, st)
-#define sk_nid_triple_pop_free(st, free_func) SKM_sk_pop_free(nid_triple, (st), (free_func))
-#define sk_nid_triple_shift(st) SKM_sk_shift(nid_triple, (st))
-#define sk_nid_triple_pop(st) SKM_sk_pop(nid_triple, (st))
-#define sk_nid_triple_sort(st) SKM_sk_sort(nid_triple, (st))
-#define sk_nid_triple_is_sorted(st) SKM_sk_is_sorted(nid_triple, (st))
-
-#define sk_void_new(cmp) SKM_sk_new(void, (cmp))
-#define sk_void_new_null() SKM_sk_new_null(void)
-#define sk_void_free(st) SKM_sk_free(void, (st))
-#define sk_void_num(st) SKM_sk_num(void, (st))
-#define sk_void_value(st, i) SKM_sk_value(void, (st), (i))
-#define sk_void_set(st, i, val) SKM_sk_set(void, (st), (i), (val))
-#define sk_void_zero(st) SKM_sk_zero(void, (st))
-#define sk_void_push(st, val) SKM_sk_push(void, (st), (val))
-#define sk_void_unshift(st, val) SKM_sk_unshift(void, (st), (val))
-#define sk_void_find(st, val) SKM_sk_find(void, (st), (val))
-#define sk_void_find_ex(st, val) SKM_sk_find_ex(void, (st), (val))
-#define sk_void_delete(st, i) SKM_sk_delete(void, (st), (i))
-#define sk_void_delete_ptr(st, ptr) SKM_sk_delete_ptr(void, (st), (ptr))
-#define sk_void_insert(st, val, i) SKM_sk_insert(void, (st), (val), (i))
-#define sk_void_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(void, (st), (cmp))
-#define sk_void_dup(st) SKM_sk_dup(void, st)
-#define sk_void_pop_free(st, free_func) SKM_sk_pop_free(void, (st), (free_func))
-#define sk_void_shift(st) SKM_sk_shift(void, (st))
-#define sk_void_pop(st) SKM_sk_pop(void, (st))
-#define sk_void_sort(st) SKM_sk_sort(void, (st))
-#define sk_void_is_sorted(st) SKM_sk_is_sorted(void, (st))
-
-#define sk_OPENSSL_STRING_new(cmp) ((STACK_OF(OPENSSL_STRING) *)sk_new(CHECKED_SK_CMP_FUNC(char, cmp)))
-#define sk_OPENSSL_STRING_new_null() ((STACK_OF(OPENSSL_STRING) *)sk_new_null())
-#define sk_OPENSSL_STRING_push(st, val) sk_push(CHECKED_STACK_OF(OPENSSL_STRING, st), CHECKED_PTR_OF(char, val))
-#define sk_OPENSSL_STRING_find(st, val) sk_find(CHECKED_STACK_OF(OPENSSL_STRING, st), CHECKED_PTR_OF(char, val))
-#define sk_OPENSSL_STRING_value(st, i) ((OPENSSL_STRING)sk_value(CHECKED_STACK_OF(OPENSSL_STRING, st), i))
-#define sk_OPENSSL_STRING_num(st) SKM_sk_num(OPENSSL_STRING, st)
-#define sk_OPENSSL_STRING_pop_free(st, free_func) sk_pop_free(CHECKED_STACK_OF(OPENSSL_STRING, st), CHECKED_SK_FREE_FUNC2(OPENSSL_STRING, free_func))
-#define sk_OPENSSL_STRING_insert(st, val, i) sk_insert(CHECKED_STACK_OF(OPENSSL_STRING, st), CHECKED_PTR_OF(char, val), i)
-#define sk_OPENSSL_STRING_free(st) SKM_sk_free(OPENSSL_STRING, st)
-#define sk_OPENSSL_STRING_set(st, i, val) sk_set(CHECKED_STACK_OF(OPENSSL_STRING, st), i, CHECKED_PTR_OF(char, val))
-#define sk_OPENSSL_STRING_zero(st) SKM_sk_zero(OPENSSL_STRING, (st))
-#define sk_OPENSSL_STRING_unshift(st, val) sk_unshift(CHECKED_STACK_OF(OPENSSL_STRING, st), CHECKED_PTR_OF(char, val))
-#define sk_OPENSSL_STRING_find_ex(st, val) sk_find_ex((_STACK *)CHECKED_CONST_PTR_OF(STACK_OF(OPENSSL_STRING), st), CHECKED_CONST_PTR_OF(char, val))
-#define sk_OPENSSL_STRING_delete(st, i) SKM_sk_delete(OPENSSL_STRING, (st), (i))
-#define sk_OPENSSL_STRING_delete_ptr(st, ptr) (OPENSSL_STRING *)sk_delete_ptr(CHECKED_STACK_OF(OPENSSL_STRING, st), CHECKED_PTR_OF(char, ptr))
-#define sk_OPENSSL_STRING_set_cmp_func(st, cmp)  \
-	((int (*)(const char * const *,const char * const *)) \
-	sk_set_cmp_func(CHECKED_STACK_OF(OPENSSL_STRING, st), CHECKED_SK_CMP_FUNC(char, cmp)))
-#define sk_OPENSSL_STRING_dup(st) SKM_sk_dup(OPENSSL_STRING, st)
-#define sk_OPENSSL_STRING_shift(st) SKM_sk_shift(OPENSSL_STRING, (st))
-#define sk_OPENSSL_STRING_pop(st) (char *)sk_pop(CHECKED_STACK_OF(OPENSSL_STRING, st))
-#define sk_OPENSSL_STRING_sort(st) SKM_sk_sort(OPENSSL_STRING, (st))
-#define sk_OPENSSL_STRING_is_sorted(st) SKM_sk_is_sorted(OPENSSL_STRING, (st))
-
-
-#define sk_OPENSSL_BLOCK_new(cmp) ((STACK_OF(OPENSSL_BLOCK) *)sk_new(CHECKED_SK_CMP_FUNC(void, cmp)))
-#define sk_OPENSSL_BLOCK_new_null() ((STACK_OF(OPENSSL_BLOCK) *)sk_new_null())
-#define sk_OPENSSL_BLOCK_push(st, val) sk_push(CHECKED_STACK_OF(OPENSSL_BLOCK, st), CHECKED_PTR_OF(void, val))
-#define sk_OPENSSL_BLOCK_find(st, val) sk_find(CHECKED_STACK_OF(OPENSSL_BLOCK, st), CHECKED_PTR_OF(void, val))
-#define sk_OPENSSL_BLOCK_value(st, i) ((OPENSSL_BLOCK)sk_value(CHECKED_STACK_OF(OPENSSL_BLOCK, st), i))
-#define sk_OPENSSL_BLOCK_num(st) SKM_sk_num(OPENSSL_BLOCK, st)
-#define sk_OPENSSL_BLOCK_pop_free(st, free_func) sk_pop_free(CHECKED_STACK_OF(OPENSSL_BLOCK, st), CHECKED_SK_FREE_FUNC2(OPENSSL_BLOCK, free_func))
-#define sk_OPENSSL_BLOCK_insert(st, val, i) sk_insert(CHECKED_STACK_OF(OPENSSL_BLOCK, st), CHECKED_PTR_OF(void, val), i)
-#define sk_OPENSSL_BLOCK_free(st) SKM_sk_free(OPENSSL_BLOCK, st)
-#define sk_OPENSSL_BLOCK_set(st, i, val) sk_set(CHECKED_STACK_OF(OPENSSL_BLOCK, st), i, CHECKED_PTR_OF(void, val))
-#define sk_OPENSSL_BLOCK_zero(st) SKM_sk_zero(OPENSSL_BLOCK, (st))
-#define sk_OPENSSL_BLOCK_unshift(st, val) sk_unshift(CHECKED_STACK_OF(OPENSSL_BLOCK, st), CHECKED_PTR_OF(void, val))
-#define sk_OPENSSL_BLOCK_find_ex(st, val) sk_find_ex((_STACK *)CHECKED_CONST_PTR_OF(STACK_OF(OPENSSL_BLOCK), st), CHECKED_CONST_PTR_OF(void, val))
-#define sk_OPENSSL_BLOCK_delete(st, i) SKM_sk_delete(OPENSSL_BLOCK, (st), (i))
-#define sk_OPENSSL_BLOCK_delete_ptr(st, ptr) (OPENSSL_BLOCK *)sk_delete_ptr(CHECKED_STACK_OF(OPENSSL_BLOCK, st), CHECKED_PTR_OF(void, ptr))
-#define sk_OPENSSL_BLOCK_set_cmp_func(st, cmp)  \
-	((int (*)(const void * const *,const void * const *)) \
-	sk_set_cmp_func(CHECKED_STACK_OF(OPENSSL_BLOCK, st), CHECKED_SK_CMP_FUNC(void, cmp)))
-#define sk_OPENSSL_BLOCK_dup(st) SKM_sk_dup(OPENSSL_BLOCK, st)
-#define sk_OPENSSL_BLOCK_shift(st) SKM_sk_shift(OPENSSL_BLOCK, (st))
-#define sk_OPENSSL_BLOCK_pop(st) (void *)sk_pop(CHECKED_STACK_OF(OPENSSL_BLOCK, st))
-#define sk_OPENSSL_BLOCK_sort(st) SKM_sk_sort(OPENSSL_BLOCK, (st))
-#define sk_OPENSSL_BLOCK_is_sorted(st) SKM_sk_is_sorted(OPENSSL_BLOCK, (st))
-
-
-#define sk_OPENSSL_PSTRING_new(cmp) ((STACK_OF(OPENSSL_PSTRING) *)sk_new(CHECKED_SK_CMP_FUNC(OPENSSL_STRING, cmp)))
-#define sk_OPENSSL_PSTRING_new_null() ((STACK_OF(OPENSSL_PSTRING) *)sk_new_null())
-#define sk_OPENSSL_PSTRING_push(st, val) sk_push(CHECKED_STACK_OF(OPENSSL_PSTRING, st), CHECKED_PTR_OF(OPENSSL_STRING, val))
-#define sk_OPENSSL_PSTRING_find(st, val) sk_find(CHECKED_STACK_OF(OPENSSL_PSTRING, st), CHECKED_PTR_OF(OPENSSL_STRING, val))
-#define sk_OPENSSL_PSTRING_value(st, i) ((OPENSSL_PSTRING)sk_value(CHECKED_STACK_OF(OPENSSL_PSTRING, st), i))
-#define sk_OPENSSL_PSTRING_num(st) SKM_sk_num(OPENSSL_PSTRING, st)
-#define sk_OPENSSL_PSTRING_pop_free(st, free_func) sk_pop_free(CHECKED_STACK_OF(OPENSSL_PSTRING, st), CHECKED_SK_FREE_FUNC2(OPENSSL_PSTRING, free_func))
-#define sk_OPENSSL_PSTRING_insert(st, val, i) sk_insert(CHECKED_STACK_OF(OPENSSL_PSTRING, st), CHECKED_PTR_OF(OPENSSL_STRING, val), i)
-#define sk_OPENSSL_PSTRING_free(st) SKM_sk_free(OPENSSL_PSTRING, st)
-#define sk_OPENSSL_PSTRING_set(st, i, val) sk_set(CHECKED_STACK_OF(OPENSSL_PSTRING, st), i, CHECKED_PTR_OF(OPENSSL_STRING, val))
-#define sk_OPENSSL_PSTRING_zero(st) SKM_sk_zero(OPENSSL_PSTRING, (st))
-#define sk_OPENSSL_PSTRING_unshift(st, val) sk_unshift(CHECKED_STACK_OF(OPENSSL_PSTRING, st), CHECKED_PTR_OF(OPENSSL_STRING, val))
-#define sk_OPENSSL_PSTRING_find_ex(st, val) sk_find_ex((_STACK *)CHECKED_CONST_PTR_OF(STACK_OF(OPENSSL_PSTRING), st), CHECKED_CONST_PTR_OF(OPENSSL_STRING, val))
-#define sk_OPENSSL_PSTRING_delete(st, i) SKM_sk_delete(OPENSSL_PSTRING, (st), (i))
-#define sk_OPENSSL_PSTRING_delete_ptr(st, ptr) (OPENSSL_PSTRING *)sk_delete_ptr(CHECKED_STACK_OF(OPENSSL_PSTRING, st), CHECKED_PTR_OF(OPENSSL_STRING, ptr))
-#define sk_OPENSSL_PSTRING_set_cmp_func(st, cmp)  \
-	((int (*)(const OPENSSL_STRING * const *,const OPENSSL_STRING * const *)) \
-	sk_set_cmp_func(CHECKED_STACK_OF(OPENSSL_PSTRING, st), CHECKED_SK_CMP_FUNC(OPENSSL_STRING, cmp)))
-#define sk_OPENSSL_PSTRING_dup(st) SKM_sk_dup(OPENSSL_PSTRING, st)
-#define sk_OPENSSL_PSTRING_shift(st) SKM_sk_shift(OPENSSL_PSTRING, (st))
-#define sk_OPENSSL_PSTRING_pop(st) (OPENSSL_STRING *)sk_pop(CHECKED_STACK_OF(OPENSSL_PSTRING, st))
-#define sk_OPENSSL_PSTRING_sort(st) SKM_sk_sort(OPENSSL_PSTRING, (st))
-#define sk_OPENSSL_PSTRING_is_sorted(st) SKM_sk_is_sorted(OPENSSL_PSTRING, (st))
-
-
-#define d2i_ASN1_SET_OF_ACCESS_DESCRIPTION(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \
-	SKM_ASN1_SET_OF_d2i(ACCESS_DESCRIPTION, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) 
-#define i2d_ASN1_SET_OF_ACCESS_DESCRIPTION(st, pp, i2d_func, ex_tag, ex_class, is_set) \
-	SKM_ASN1_SET_OF_i2d(ACCESS_DESCRIPTION, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))
-#define ASN1_seq_pack_ACCESS_DESCRIPTION(st, i2d_func, buf, len) \
-	SKM_ASN1_seq_pack(ACCESS_DESCRIPTION, (st), (i2d_func), (buf), (len))
-#define ASN1_seq_unpack_ACCESS_DESCRIPTION(buf, len, d2i_func, free_func) \
-	SKM_ASN1_seq_unpack(ACCESS_DESCRIPTION, (buf), (len), (d2i_func), (free_func))
-
-#define d2i_ASN1_SET_OF_ASN1_INTEGER(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \
-	SKM_ASN1_SET_OF_d2i(ASN1_INTEGER, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) 
-#define i2d_ASN1_SET_OF_ASN1_INTEGER(st, pp, i2d_func, ex_tag, ex_class, is_set) \
-	SKM_ASN1_SET_OF_i2d(ASN1_INTEGER, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))
-#define ASN1_seq_pack_ASN1_INTEGER(st, i2d_func, buf, len) \
-	SKM_ASN1_seq_pack(ASN1_INTEGER, (st), (i2d_func), (buf), (len))
-#define ASN1_seq_unpack_ASN1_INTEGER(buf, len, d2i_func, free_func) \
-	SKM_ASN1_seq_unpack(ASN1_INTEGER, (buf), (len), (d2i_func), (free_func))
-
-#define d2i_ASN1_SET_OF_ASN1_OBJECT(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \
-	SKM_ASN1_SET_OF_d2i(ASN1_OBJECT, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) 
-#define i2d_ASN1_SET_OF_ASN1_OBJECT(st, pp, i2d_func, ex_tag, ex_class, is_set) \
-	SKM_ASN1_SET_OF_i2d(ASN1_OBJECT, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))
-#define ASN1_seq_pack_ASN1_OBJECT(st, i2d_func, buf, len) \
-	SKM_ASN1_seq_pack(ASN1_OBJECT, (st), (i2d_func), (buf), (len))
-#define ASN1_seq_unpack_ASN1_OBJECT(buf, len, d2i_func, free_func) \
-	SKM_ASN1_seq_unpack(ASN1_OBJECT, (buf), (len), (d2i_func), (free_func))
-
-#define d2i_ASN1_SET_OF_ASN1_TYPE(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \
-	SKM_ASN1_SET_OF_d2i(ASN1_TYPE, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) 
-#define i2d_ASN1_SET_OF_ASN1_TYPE(st, pp, i2d_func, ex_tag, ex_class, is_set) \
-	SKM_ASN1_SET_OF_i2d(ASN1_TYPE, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))
-#define ASN1_seq_pack_ASN1_TYPE(st, i2d_func, buf, len) \
-	SKM_ASN1_seq_pack(ASN1_TYPE, (st), (i2d_func), (buf), (len))
-#define ASN1_seq_unpack_ASN1_TYPE(buf, len, d2i_func, free_func) \
-	SKM_ASN1_seq_unpack(ASN1_TYPE, (buf), (len), (d2i_func), (free_func))
-
-#define d2i_ASN1_SET_OF_ASN1_UTF8STRING(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \
-	SKM_ASN1_SET_OF_d2i(ASN1_UTF8STRING, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) 
-#define i2d_ASN1_SET_OF_ASN1_UTF8STRING(st, pp, i2d_func, ex_tag, ex_class, is_set) \
-	SKM_ASN1_SET_OF_i2d(ASN1_UTF8STRING, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))
-#define ASN1_seq_pack_ASN1_UTF8STRING(st, i2d_func, buf, len) \
-	SKM_ASN1_seq_pack(ASN1_UTF8STRING, (st), (i2d_func), (buf), (len))
-#define ASN1_seq_unpack_ASN1_UTF8STRING(buf, len, d2i_func, free_func) \
-	SKM_ASN1_seq_unpack(ASN1_UTF8STRING, (buf), (len), (d2i_func), (free_func))
-
-#define d2i_ASN1_SET_OF_DIST_POINT(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \
-	SKM_ASN1_SET_OF_d2i(DIST_POINT, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) 
-#define i2d_ASN1_SET_OF_DIST_POINT(st, pp, i2d_func, ex_tag, ex_class, is_set) \
-	SKM_ASN1_SET_OF_i2d(DIST_POINT, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))
-#define ASN1_seq_pack_DIST_POINT(st, i2d_func, buf, len) \
-	SKM_ASN1_seq_pack(DIST_POINT, (st), (i2d_func), (buf), (len))
-#define ASN1_seq_unpack_DIST_POINT(buf, len, d2i_func, free_func) \
-	SKM_ASN1_seq_unpack(DIST_POINT, (buf), (len), (d2i_func), (free_func))
-
-#define d2i_ASN1_SET_OF_ESS_CERT_ID(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \
-	SKM_ASN1_SET_OF_d2i(ESS_CERT_ID, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) 
-#define i2d_ASN1_SET_OF_ESS_CERT_ID(st, pp, i2d_func, ex_tag, ex_class, is_set) \
-	SKM_ASN1_SET_OF_i2d(ESS_CERT_ID, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))
-#define ASN1_seq_pack_ESS_CERT_ID(st, i2d_func, buf, len) \
-	SKM_ASN1_seq_pack(ESS_CERT_ID, (st), (i2d_func), (buf), (len))
-#define ASN1_seq_unpack_ESS_CERT_ID(buf, len, d2i_func, free_func) \
-	SKM_ASN1_seq_unpack(ESS_CERT_ID, (buf), (len), (d2i_func), (free_func))
-
-#define d2i_ASN1_SET_OF_EVP_MD(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \
-	SKM_ASN1_SET_OF_d2i(EVP_MD, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) 
-#define i2d_ASN1_SET_OF_EVP_MD(st, pp, i2d_func, ex_tag, ex_class, is_set) \
-	SKM_ASN1_SET_OF_i2d(EVP_MD, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))
-#define ASN1_seq_pack_EVP_MD(st, i2d_func, buf, len) \
-	SKM_ASN1_seq_pack(EVP_MD, (st), (i2d_func), (buf), (len))
-#define ASN1_seq_unpack_EVP_MD(buf, len, d2i_func, free_func) \
-	SKM_ASN1_seq_unpack(EVP_MD, (buf), (len), (d2i_func), (free_func))
-
-#define d2i_ASN1_SET_OF_GENERAL_NAME(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \
-	SKM_ASN1_SET_OF_d2i(GENERAL_NAME, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) 
-#define i2d_ASN1_SET_OF_GENERAL_NAME(st, pp, i2d_func, ex_tag, ex_class, is_set) \
-	SKM_ASN1_SET_OF_i2d(GENERAL_NAME, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))
-#define ASN1_seq_pack_GENERAL_NAME(st, i2d_func, buf, len) \
-	SKM_ASN1_seq_pack(GENERAL_NAME, (st), (i2d_func), (buf), (len))
-#define ASN1_seq_unpack_GENERAL_NAME(buf, len, d2i_func, free_func) \
-	SKM_ASN1_seq_unpack(GENERAL_NAME, (buf), (len), (d2i_func), (free_func))
-
-#define d2i_ASN1_SET_OF_OCSP_ONEREQ(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \
-	SKM_ASN1_SET_OF_d2i(OCSP_ONEREQ, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) 
-#define i2d_ASN1_SET_OF_OCSP_ONEREQ(st, pp, i2d_func, ex_tag, ex_class, is_set) \
-	SKM_ASN1_SET_OF_i2d(OCSP_ONEREQ, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))
-#define ASN1_seq_pack_OCSP_ONEREQ(st, i2d_func, buf, len) \
-	SKM_ASN1_seq_pack(OCSP_ONEREQ, (st), (i2d_func), (buf), (len))
-#define ASN1_seq_unpack_OCSP_ONEREQ(buf, len, d2i_func, free_func) \
-	SKM_ASN1_seq_unpack(OCSP_ONEREQ, (buf), (len), (d2i_func), (free_func))
-
-#define d2i_ASN1_SET_OF_OCSP_SINGLERESP(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \
-	SKM_ASN1_SET_OF_d2i(OCSP_SINGLERESP, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) 
-#define i2d_ASN1_SET_OF_OCSP_SINGLERESP(st, pp, i2d_func, ex_tag, ex_class, is_set) \
-	SKM_ASN1_SET_OF_i2d(OCSP_SINGLERESP, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))
-#define ASN1_seq_pack_OCSP_SINGLERESP(st, i2d_func, buf, len) \
-	SKM_ASN1_seq_pack(OCSP_SINGLERESP, (st), (i2d_func), (buf), (len))
-#define ASN1_seq_unpack_OCSP_SINGLERESP(buf, len, d2i_func, free_func) \
-	SKM_ASN1_seq_unpack(OCSP_SINGLERESP, (buf), (len), (d2i_func), (free_func))
-
-#define d2i_ASN1_SET_OF_PKCS12_SAFEBAG(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \
-	SKM_ASN1_SET_OF_d2i(PKCS12_SAFEBAG, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) 
-#define i2d_ASN1_SET_OF_PKCS12_SAFEBAG(st, pp, i2d_func, ex_tag, ex_class, is_set) \
-	SKM_ASN1_SET_OF_i2d(PKCS12_SAFEBAG, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))
-#define ASN1_seq_pack_PKCS12_SAFEBAG(st, i2d_func, buf, len) \
-	SKM_ASN1_seq_pack(PKCS12_SAFEBAG, (st), (i2d_func), (buf), (len))
-#define ASN1_seq_unpack_PKCS12_SAFEBAG(buf, len, d2i_func, free_func) \
-	SKM_ASN1_seq_unpack(PKCS12_SAFEBAG, (buf), (len), (d2i_func), (free_func))
-
-#define d2i_ASN1_SET_OF_PKCS7(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \
-	SKM_ASN1_SET_OF_d2i(PKCS7, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) 
-#define i2d_ASN1_SET_OF_PKCS7(st, pp, i2d_func, ex_tag, ex_class, is_set) \
-	SKM_ASN1_SET_OF_i2d(PKCS7, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))
-#define ASN1_seq_pack_PKCS7(st, i2d_func, buf, len) \
-	SKM_ASN1_seq_pack(PKCS7, (st), (i2d_func), (buf), (len))
-#define ASN1_seq_unpack_PKCS7(buf, len, d2i_func, free_func) \
-	SKM_ASN1_seq_unpack(PKCS7, (buf), (len), (d2i_func), (free_func))
-
-#define d2i_ASN1_SET_OF_PKCS7_RECIP_INFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \
-	SKM_ASN1_SET_OF_d2i(PKCS7_RECIP_INFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) 
-#define i2d_ASN1_SET_OF_PKCS7_RECIP_INFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \
-	SKM_ASN1_SET_OF_i2d(PKCS7_RECIP_INFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))
-#define ASN1_seq_pack_PKCS7_RECIP_INFO(st, i2d_func, buf, len) \
-	SKM_ASN1_seq_pack(PKCS7_RECIP_INFO, (st), (i2d_func), (buf), (len))
-#define ASN1_seq_unpack_PKCS7_RECIP_INFO(buf, len, d2i_func, free_func) \
-	SKM_ASN1_seq_unpack(PKCS7_RECIP_INFO, (buf), (len), (d2i_func), (free_func))
-
-#define d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \
-	SKM_ASN1_SET_OF_d2i(PKCS7_SIGNER_INFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) 
-#define i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \
-	SKM_ASN1_SET_OF_i2d(PKCS7_SIGNER_INFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))
-#define ASN1_seq_pack_PKCS7_SIGNER_INFO(st, i2d_func, buf, len) \
-	SKM_ASN1_seq_pack(PKCS7_SIGNER_INFO, (st), (i2d_func), (buf), (len))
-#define ASN1_seq_unpack_PKCS7_SIGNER_INFO(buf, len, d2i_func, free_func) \
-	SKM_ASN1_seq_unpack(PKCS7_SIGNER_INFO, (buf), (len), (d2i_func), (free_func))
-
-#define d2i_ASN1_SET_OF_POLICYINFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \
-	SKM_ASN1_SET_OF_d2i(POLICYINFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) 
-#define i2d_ASN1_SET_OF_POLICYINFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \
-	SKM_ASN1_SET_OF_i2d(POLICYINFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))
-#define ASN1_seq_pack_POLICYINFO(st, i2d_func, buf, len) \
-	SKM_ASN1_seq_pack(POLICYINFO, (st), (i2d_func), (buf), (len))
-#define ASN1_seq_unpack_POLICYINFO(buf, len, d2i_func, free_func) \
-	SKM_ASN1_seq_unpack(POLICYINFO, (buf), (len), (d2i_func), (free_func))
-
-#define d2i_ASN1_SET_OF_POLICYQUALINFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \
-	SKM_ASN1_SET_OF_d2i(POLICYQUALINFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) 
-#define i2d_ASN1_SET_OF_POLICYQUALINFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \
-	SKM_ASN1_SET_OF_i2d(POLICYQUALINFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))
-#define ASN1_seq_pack_POLICYQUALINFO(st, i2d_func, buf, len) \
-	SKM_ASN1_seq_pack(POLICYQUALINFO, (st), (i2d_func), (buf), (len))
-#define ASN1_seq_unpack_POLICYQUALINFO(buf, len, d2i_func, free_func) \
-	SKM_ASN1_seq_unpack(POLICYQUALINFO, (buf), (len), (d2i_func), (free_func))
-
-#define d2i_ASN1_SET_OF_SXNETID(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \
-	SKM_ASN1_SET_OF_d2i(SXNETID, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) 
-#define i2d_ASN1_SET_OF_SXNETID(st, pp, i2d_func, ex_tag, ex_class, is_set) \
-	SKM_ASN1_SET_OF_i2d(SXNETID, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))
-#define ASN1_seq_pack_SXNETID(st, i2d_func, buf, len) \
-	SKM_ASN1_seq_pack(SXNETID, (st), (i2d_func), (buf), (len))
-#define ASN1_seq_unpack_SXNETID(buf, len, d2i_func, free_func) \
-	SKM_ASN1_seq_unpack(SXNETID, (buf), (len), (d2i_func), (free_func))
-
-#define d2i_ASN1_SET_OF_X509(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \
-	SKM_ASN1_SET_OF_d2i(X509, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) 
-#define i2d_ASN1_SET_OF_X509(st, pp, i2d_func, ex_tag, ex_class, is_set) \
-	SKM_ASN1_SET_OF_i2d(X509, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))
-#define ASN1_seq_pack_X509(st, i2d_func, buf, len) \
-	SKM_ASN1_seq_pack(X509, (st), (i2d_func), (buf), (len))
-#define ASN1_seq_unpack_X509(buf, len, d2i_func, free_func) \
-	SKM_ASN1_seq_unpack(X509, (buf), (len), (d2i_func), (free_func))
-
-#define d2i_ASN1_SET_OF_X509_ALGOR(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \
-	SKM_ASN1_SET_OF_d2i(X509_ALGOR, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) 
-#define i2d_ASN1_SET_OF_X509_ALGOR(st, pp, i2d_func, ex_tag, ex_class, is_set) \
-	SKM_ASN1_SET_OF_i2d(X509_ALGOR, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))
-#define ASN1_seq_pack_X509_ALGOR(st, i2d_func, buf, len) \
-	SKM_ASN1_seq_pack(X509_ALGOR, (st), (i2d_func), (buf), (len))
-#define ASN1_seq_unpack_X509_ALGOR(buf, len, d2i_func, free_func) \
-	SKM_ASN1_seq_unpack(X509_ALGOR, (buf), (len), (d2i_func), (free_func))
-
-#define d2i_ASN1_SET_OF_X509_ATTRIBUTE(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \
-	SKM_ASN1_SET_OF_d2i(X509_ATTRIBUTE, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) 
-#define i2d_ASN1_SET_OF_X509_ATTRIBUTE(st, pp, i2d_func, ex_tag, ex_class, is_set) \
-	SKM_ASN1_SET_OF_i2d(X509_ATTRIBUTE, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))
-#define ASN1_seq_pack_X509_ATTRIBUTE(st, i2d_func, buf, len) \
-	SKM_ASN1_seq_pack(X509_ATTRIBUTE, (st), (i2d_func), (buf), (len))
-#define ASN1_seq_unpack_X509_ATTRIBUTE(buf, len, d2i_func, free_func) \
-	SKM_ASN1_seq_unpack(X509_ATTRIBUTE, (buf), (len), (d2i_func), (free_func))
-
-#define d2i_ASN1_SET_OF_X509_CRL(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \
-	SKM_ASN1_SET_OF_d2i(X509_CRL, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) 
-#define i2d_ASN1_SET_OF_X509_CRL(st, pp, i2d_func, ex_tag, ex_class, is_set) \
-	SKM_ASN1_SET_OF_i2d(X509_CRL, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))
-#define ASN1_seq_pack_X509_CRL(st, i2d_func, buf, len) \
-	SKM_ASN1_seq_pack(X509_CRL, (st), (i2d_func), (buf), (len))
-#define ASN1_seq_unpack_X509_CRL(buf, len, d2i_func, free_func) \
-	SKM_ASN1_seq_unpack(X509_CRL, (buf), (len), (d2i_func), (free_func))
-
-#define d2i_ASN1_SET_OF_X509_EXTENSION(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \
-	SKM_ASN1_SET_OF_d2i(X509_EXTENSION, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) 
-#define i2d_ASN1_SET_OF_X509_EXTENSION(st, pp, i2d_func, ex_tag, ex_class, is_set) \
-	SKM_ASN1_SET_OF_i2d(X509_EXTENSION, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))
-#define ASN1_seq_pack_X509_EXTENSION(st, i2d_func, buf, len) \
-	SKM_ASN1_seq_pack(X509_EXTENSION, (st), (i2d_func), (buf), (len))
-#define ASN1_seq_unpack_X509_EXTENSION(buf, len, d2i_func, free_func) \
-	SKM_ASN1_seq_unpack(X509_EXTENSION, (buf), (len), (d2i_func), (free_func))
-
-#define d2i_ASN1_SET_OF_X509_NAME_ENTRY(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \
-	SKM_ASN1_SET_OF_d2i(X509_NAME_ENTRY, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) 
-#define i2d_ASN1_SET_OF_X509_NAME_ENTRY(st, pp, i2d_func, ex_tag, ex_class, is_set) \
-	SKM_ASN1_SET_OF_i2d(X509_NAME_ENTRY, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))
-#define ASN1_seq_pack_X509_NAME_ENTRY(st, i2d_func, buf, len) \
-	SKM_ASN1_seq_pack(X509_NAME_ENTRY, (st), (i2d_func), (buf), (len))
-#define ASN1_seq_unpack_X509_NAME_ENTRY(buf, len, d2i_func, free_func) \
-	SKM_ASN1_seq_unpack(X509_NAME_ENTRY, (buf), (len), (d2i_func), (free_func))
-
-#define d2i_ASN1_SET_OF_X509_REVOKED(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \
-	SKM_ASN1_SET_OF_d2i(X509_REVOKED, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) 
-#define i2d_ASN1_SET_OF_X509_REVOKED(st, pp, i2d_func, ex_tag, ex_class, is_set) \
-	SKM_ASN1_SET_OF_i2d(X509_REVOKED, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))
-#define ASN1_seq_pack_X509_REVOKED(st, i2d_func, buf, len) \
-	SKM_ASN1_seq_pack(X509_REVOKED, (st), (i2d_func), (buf), (len))
-#define ASN1_seq_unpack_X509_REVOKED(buf, len, d2i_func, free_func) \
-	SKM_ASN1_seq_unpack(X509_REVOKED, (buf), (len), (d2i_func), (free_func))
-
-#define PKCS12_decrypt_d2i_PKCS12_SAFEBAG(algor, d2i_func, free_func, pass, passlen, oct, seq) \
-	SKM_PKCS12_decrypt_d2i(PKCS12_SAFEBAG, (algor), (d2i_func), (free_func), (pass), (passlen), (oct), (seq))
-
-#define PKCS12_decrypt_d2i_PKCS7(algor, d2i_func, free_func, pass, passlen, oct, seq) \
-	SKM_PKCS12_decrypt_d2i(PKCS7, (algor), (d2i_func), (free_func), (pass), (passlen), (oct), (seq))
-
-#define lh_ADDED_OBJ_new() LHM_lh_new(ADDED_OBJ,added_obj)
-#define lh_ADDED_OBJ_insert(lh,inst) LHM_lh_insert(ADDED_OBJ,lh,inst)
-#define lh_ADDED_OBJ_retrieve(lh,inst) LHM_lh_retrieve(ADDED_OBJ,lh,inst)
-#define lh_ADDED_OBJ_delete(lh,inst) LHM_lh_delete(ADDED_OBJ,lh,inst)
-#define lh_ADDED_OBJ_doall(lh,fn) LHM_lh_doall(ADDED_OBJ,lh,fn)
-#define lh_ADDED_OBJ_doall_arg(lh,fn,arg_type,arg) \
-  LHM_lh_doall_arg(ADDED_OBJ,lh,fn,arg_type,arg)
-#define lh_ADDED_OBJ_error(lh) LHM_lh_error(ADDED_OBJ,lh)
-#define lh_ADDED_OBJ_num_items(lh) LHM_lh_num_items(ADDED_OBJ,lh)
-#define lh_ADDED_OBJ_down_load(lh) LHM_lh_down_load(ADDED_OBJ,lh)
-#define lh_ADDED_OBJ_node_stats_bio(lh,out) \
-  LHM_lh_node_stats_bio(ADDED_OBJ,lh,out)
-#define lh_ADDED_OBJ_node_usage_stats_bio(lh,out) \
-  LHM_lh_node_usage_stats_bio(ADDED_OBJ,lh,out)
-#define lh_ADDED_OBJ_stats_bio(lh,out) \
-  LHM_lh_stats_bio(ADDED_OBJ,lh,out)
-#define lh_ADDED_OBJ_free(lh) LHM_lh_free(ADDED_OBJ,lh)
-
-#define lh_APP_INFO_new() LHM_lh_new(APP_INFO,app_info)
-#define lh_APP_INFO_insert(lh,inst) LHM_lh_insert(APP_INFO,lh,inst)
-#define lh_APP_INFO_retrieve(lh,inst) LHM_lh_retrieve(APP_INFO,lh,inst)
-#define lh_APP_INFO_delete(lh,inst) LHM_lh_delete(APP_INFO,lh,inst)
-#define lh_APP_INFO_doall(lh,fn) LHM_lh_doall(APP_INFO,lh,fn)
-#define lh_APP_INFO_doall_arg(lh,fn,arg_type,arg) \
-  LHM_lh_doall_arg(APP_INFO,lh,fn,arg_type,arg)
-#define lh_APP_INFO_error(lh) LHM_lh_error(APP_INFO,lh)
-#define lh_APP_INFO_num_items(lh) LHM_lh_num_items(APP_INFO,lh)
-#define lh_APP_INFO_down_load(lh) LHM_lh_down_load(APP_INFO,lh)
-#define lh_APP_INFO_node_stats_bio(lh,out) \
-  LHM_lh_node_stats_bio(APP_INFO,lh,out)
-#define lh_APP_INFO_node_usage_stats_bio(lh,out) \
-  LHM_lh_node_usage_stats_bio(APP_INFO,lh,out)
-#define lh_APP_INFO_stats_bio(lh,out) \
-  LHM_lh_stats_bio(APP_INFO,lh,out)
-#define lh_APP_INFO_free(lh) LHM_lh_free(APP_INFO,lh)
-
-#define lh_CONF_VALUE_new() LHM_lh_new(CONF_VALUE,conf_value)
-#define lh_CONF_VALUE_insert(lh,inst) LHM_lh_insert(CONF_VALUE,lh,inst)
-#define lh_CONF_VALUE_retrieve(lh,inst) LHM_lh_retrieve(CONF_VALUE,lh,inst)
-#define lh_CONF_VALUE_delete(lh,inst) LHM_lh_delete(CONF_VALUE,lh,inst)
-#define lh_CONF_VALUE_doall(lh,fn) LHM_lh_doall(CONF_VALUE,lh,fn)
-#define lh_CONF_VALUE_doall_arg(lh,fn,arg_type,arg) \
-  LHM_lh_doall_arg(CONF_VALUE,lh,fn,arg_type,arg)
-#define lh_CONF_VALUE_error(lh) LHM_lh_error(CONF_VALUE,lh)
-#define lh_CONF_VALUE_num_items(lh) LHM_lh_num_items(CONF_VALUE,lh)
-#define lh_CONF_VALUE_down_load(lh) LHM_lh_down_load(CONF_VALUE,lh)
-#define lh_CONF_VALUE_node_stats_bio(lh,out) \
-  LHM_lh_node_stats_bio(CONF_VALUE,lh,out)
-#define lh_CONF_VALUE_node_usage_stats_bio(lh,out) \
-  LHM_lh_node_usage_stats_bio(CONF_VALUE,lh,out)
-#define lh_CONF_VALUE_stats_bio(lh,out) \
-  LHM_lh_stats_bio(CONF_VALUE,lh,out)
-#define lh_CONF_VALUE_free(lh) LHM_lh_free(CONF_VALUE,lh)
-
-#define lh_ENGINE_PILE_new() LHM_lh_new(ENGINE_PILE,engine_pile)
-#define lh_ENGINE_PILE_insert(lh,inst) LHM_lh_insert(ENGINE_PILE,lh,inst)
-#define lh_ENGINE_PILE_retrieve(lh,inst) LHM_lh_retrieve(ENGINE_PILE,lh,inst)
-#define lh_ENGINE_PILE_delete(lh,inst) LHM_lh_delete(ENGINE_PILE,lh,inst)
-#define lh_ENGINE_PILE_doall(lh,fn) LHM_lh_doall(ENGINE_PILE,lh,fn)
-#define lh_ENGINE_PILE_doall_arg(lh,fn,arg_type,arg) \
-  LHM_lh_doall_arg(ENGINE_PILE,lh,fn,arg_type,arg)
-#define lh_ENGINE_PILE_error(lh) LHM_lh_error(ENGINE_PILE,lh)
-#define lh_ENGINE_PILE_num_items(lh) LHM_lh_num_items(ENGINE_PILE,lh)
-#define lh_ENGINE_PILE_down_load(lh) LHM_lh_down_load(ENGINE_PILE,lh)
-#define lh_ENGINE_PILE_node_stats_bio(lh,out) \
-  LHM_lh_node_stats_bio(ENGINE_PILE,lh,out)
-#define lh_ENGINE_PILE_node_usage_stats_bio(lh,out) \
-  LHM_lh_node_usage_stats_bio(ENGINE_PILE,lh,out)
-#define lh_ENGINE_PILE_stats_bio(lh,out) \
-  LHM_lh_stats_bio(ENGINE_PILE,lh,out)
-#define lh_ENGINE_PILE_free(lh) LHM_lh_free(ENGINE_PILE,lh)
-
-#define lh_ERR_STATE_new() LHM_lh_new(ERR_STATE,err_state)
-#define lh_ERR_STATE_insert(lh,inst) LHM_lh_insert(ERR_STATE,lh,inst)
-#define lh_ERR_STATE_retrieve(lh,inst) LHM_lh_retrieve(ERR_STATE,lh,inst)
-#define lh_ERR_STATE_delete(lh,inst) LHM_lh_delete(ERR_STATE,lh,inst)
-#define lh_ERR_STATE_doall(lh,fn) LHM_lh_doall(ERR_STATE,lh,fn)
-#define lh_ERR_STATE_doall_arg(lh,fn,arg_type,arg) \
-  LHM_lh_doall_arg(ERR_STATE,lh,fn,arg_type,arg)
-#define lh_ERR_STATE_error(lh) LHM_lh_error(ERR_STATE,lh)
-#define lh_ERR_STATE_num_items(lh) LHM_lh_num_items(ERR_STATE,lh)
-#define lh_ERR_STATE_down_load(lh) LHM_lh_down_load(ERR_STATE,lh)
-#define lh_ERR_STATE_node_stats_bio(lh,out) \
-  LHM_lh_node_stats_bio(ERR_STATE,lh,out)
-#define lh_ERR_STATE_node_usage_stats_bio(lh,out) \
-  LHM_lh_node_usage_stats_bio(ERR_STATE,lh,out)
-#define lh_ERR_STATE_stats_bio(lh,out) \
-  LHM_lh_stats_bio(ERR_STATE,lh,out)
-#define lh_ERR_STATE_free(lh) LHM_lh_free(ERR_STATE,lh)
-
-#define lh_ERR_STRING_DATA_new() LHM_lh_new(ERR_STRING_DATA,err_string_data)
-#define lh_ERR_STRING_DATA_insert(lh,inst) LHM_lh_insert(ERR_STRING_DATA,lh,inst)
-#define lh_ERR_STRING_DATA_retrieve(lh,inst) LHM_lh_retrieve(ERR_STRING_DATA,lh,inst)
-#define lh_ERR_STRING_DATA_delete(lh,inst) LHM_lh_delete(ERR_STRING_DATA,lh,inst)
-#define lh_ERR_STRING_DATA_doall(lh,fn) LHM_lh_doall(ERR_STRING_DATA,lh,fn)
-#define lh_ERR_STRING_DATA_doall_arg(lh,fn,arg_type,arg) \
-  LHM_lh_doall_arg(ERR_STRING_DATA,lh,fn,arg_type,arg)
-#define lh_ERR_STRING_DATA_error(lh) LHM_lh_error(ERR_STRING_DATA,lh)
-#define lh_ERR_STRING_DATA_num_items(lh) LHM_lh_num_items(ERR_STRING_DATA,lh)
-#define lh_ERR_STRING_DATA_down_load(lh) LHM_lh_down_load(ERR_STRING_DATA,lh)
-#define lh_ERR_STRING_DATA_node_stats_bio(lh,out) \
-  LHM_lh_node_stats_bio(ERR_STRING_DATA,lh,out)
-#define lh_ERR_STRING_DATA_node_usage_stats_bio(lh,out) \
-  LHM_lh_node_usage_stats_bio(ERR_STRING_DATA,lh,out)
-#define lh_ERR_STRING_DATA_stats_bio(lh,out) \
-  LHM_lh_stats_bio(ERR_STRING_DATA,lh,out)
-#define lh_ERR_STRING_DATA_free(lh) LHM_lh_free(ERR_STRING_DATA,lh)
-
-#define lh_EX_CLASS_ITEM_new() LHM_lh_new(EX_CLASS_ITEM,ex_class_item)
-#define lh_EX_CLASS_ITEM_insert(lh,inst) LHM_lh_insert(EX_CLASS_ITEM,lh,inst)
-#define lh_EX_CLASS_ITEM_retrieve(lh,inst) LHM_lh_retrieve(EX_CLASS_ITEM,lh,inst)
-#define lh_EX_CLASS_ITEM_delete(lh,inst) LHM_lh_delete(EX_CLASS_ITEM,lh,inst)
-#define lh_EX_CLASS_ITEM_doall(lh,fn) LHM_lh_doall(EX_CLASS_ITEM,lh,fn)
-#define lh_EX_CLASS_ITEM_doall_arg(lh,fn,arg_type,arg) \
-  LHM_lh_doall_arg(EX_CLASS_ITEM,lh,fn,arg_type,arg)
-#define lh_EX_CLASS_ITEM_error(lh) LHM_lh_error(EX_CLASS_ITEM,lh)
-#define lh_EX_CLASS_ITEM_num_items(lh) LHM_lh_num_items(EX_CLASS_ITEM,lh)
-#define lh_EX_CLASS_ITEM_down_load(lh) LHM_lh_down_load(EX_CLASS_ITEM,lh)
-#define lh_EX_CLASS_ITEM_node_stats_bio(lh,out) \
-  LHM_lh_node_stats_bio(EX_CLASS_ITEM,lh,out)
-#define lh_EX_CLASS_ITEM_node_usage_stats_bio(lh,out) \
-  LHM_lh_node_usage_stats_bio(EX_CLASS_ITEM,lh,out)
-#define lh_EX_CLASS_ITEM_stats_bio(lh,out) \
-  LHM_lh_stats_bio(EX_CLASS_ITEM,lh,out)
-#define lh_EX_CLASS_ITEM_free(lh) LHM_lh_free(EX_CLASS_ITEM,lh)
-
-#define lh_FUNCTION_new() LHM_lh_new(FUNCTION,function)
-#define lh_FUNCTION_insert(lh,inst) LHM_lh_insert(FUNCTION,lh,inst)
-#define lh_FUNCTION_retrieve(lh,inst) LHM_lh_retrieve(FUNCTION,lh,inst)
-#define lh_FUNCTION_delete(lh,inst) LHM_lh_delete(FUNCTION,lh,inst)
-#define lh_FUNCTION_doall(lh,fn) LHM_lh_doall(FUNCTION,lh,fn)
-#define lh_FUNCTION_doall_arg(lh,fn,arg_type,arg) \
-  LHM_lh_doall_arg(FUNCTION,lh,fn,arg_type,arg)
-#define lh_FUNCTION_error(lh) LHM_lh_error(FUNCTION,lh)
-#define lh_FUNCTION_num_items(lh) LHM_lh_num_items(FUNCTION,lh)
-#define lh_FUNCTION_down_load(lh) LHM_lh_down_load(FUNCTION,lh)
-#define lh_FUNCTION_node_stats_bio(lh,out) \
-  LHM_lh_node_stats_bio(FUNCTION,lh,out)
-#define lh_FUNCTION_node_usage_stats_bio(lh,out) \
-  LHM_lh_node_usage_stats_bio(FUNCTION,lh,out)
-#define lh_FUNCTION_stats_bio(lh,out) \
-  LHM_lh_stats_bio(FUNCTION,lh,out)
-#define lh_FUNCTION_free(lh) LHM_lh_free(FUNCTION,lh)
-
-#define lh_MEM_new() LHM_lh_new(MEM,mem)
-#define lh_MEM_insert(lh,inst) LHM_lh_insert(MEM,lh,inst)
-#define lh_MEM_retrieve(lh,inst) LHM_lh_retrieve(MEM,lh,inst)
-#define lh_MEM_delete(lh,inst) LHM_lh_delete(MEM,lh,inst)
-#define lh_MEM_doall(lh,fn) LHM_lh_doall(MEM,lh,fn)
-#define lh_MEM_doall_arg(lh,fn,arg_type,arg) \
-  LHM_lh_doall_arg(MEM,lh,fn,arg_type,arg)
-#define lh_MEM_error(lh) LHM_lh_error(MEM,lh)
-#define lh_MEM_num_items(lh) LHM_lh_num_items(MEM,lh)
-#define lh_MEM_down_load(lh) LHM_lh_down_load(MEM,lh)
-#define lh_MEM_node_stats_bio(lh,out) \
-  LHM_lh_node_stats_bio(MEM,lh,out)
-#define lh_MEM_node_usage_stats_bio(lh,out) \
-  LHM_lh_node_usage_stats_bio(MEM,lh,out)
-#define lh_MEM_stats_bio(lh,out) \
-  LHM_lh_stats_bio(MEM,lh,out)
-#define lh_MEM_free(lh) LHM_lh_free(MEM,lh)
-
-#define lh_OBJ_NAME_new() LHM_lh_new(OBJ_NAME,obj_name)
-#define lh_OBJ_NAME_insert(lh,inst) LHM_lh_insert(OBJ_NAME,lh,inst)
-#define lh_OBJ_NAME_retrieve(lh,inst) LHM_lh_retrieve(OBJ_NAME,lh,inst)
-#define lh_OBJ_NAME_delete(lh,inst) LHM_lh_delete(OBJ_NAME,lh,inst)
-#define lh_OBJ_NAME_doall(lh,fn) LHM_lh_doall(OBJ_NAME,lh,fn)
-#define lh_OBJ_NAME_doall_arg(lh,fn,arg_type,arg) \
-  LHM_lh_doall_arg(OBJ_NAME,lh,fn,arg_type,arg)
-#define lh_OBJ_NAME_error(lh) LHM_lh_error(OBJ_NAME,lh)
-#define lh_OBJ_NAME_num_items(lh) LHM_lh_num_items(OBJ_NAME,lh)
-#define lh_OBJ_NAME_down_load(lh) LHM_lh_down_load(OBJ_NAME,lh)
-#define lh_OBJ_NAME_node_stats_bio(lh,out) \
-  LHM_lh_node_stats_bio(OBJ_NAME,lh,out)
-#define lh_OBJ_NAME_node_usage_stats_bio(lh,out) \
-  LHM_lh_node_usage_stats_bio(OBJ_NAME,lh,out)
-#define lh_OBJ_NAME_stats_bio(lh,out) \
-  LHM_lh_stats_bio(OBJ_NAME,lh,out)
-#define lh_OBJ_NAME_free(lh) LHM_lh_free(OBJ_NAME,lh)
-
-#define lh_OPENSSL_CSTRING_new() LHM_lh_new(OPENSSL_CSTRING,openssl_cstring)
-#define lh_OPENSSL_CSTRING_insert(lh,inst) LHM_lh_insert(OPENSSL_CSTRING,lh,inst)
-#define lh_OPENSSL_CSTRING_retrieve(lh,inst) LHM_lh_retrieve(OPENSSL_CSTRING,lh,inst)
-#define lh_OPENSSL_CSTRING_delete(lh,inst) LHM_lh_delete(OPENSSL_CSTRING,lh,inst)
-#define lh_OPENSSL_CSTRING_doall(lh,fn) LHM_lh_doall(OPENSSL_CSTRING,lh,fn)
-#define lh_OPENSSL_CSTRING_doall_arg(lh,fn,arg_type,arg) \
-  LHM_lh_doall_arg(OPENSSL_CSTRING,lh,fn,arg_type,arg)
-#define lh_OPENSSL_CSTRING_error(lh) LHM_lh_error(OPENSSL_CSTRING,lh)
-#define lh_OPENSSL_CSTRING_num_items(lh) LHM_lh_num_items(OPENSSL_CSTRING,lh)
-#define lh_OPENSSL_CSTRING_down_load(lh) LHM_lh_down_load(OPENSSL_CSTRING,lh)
-#define lh_OPENSSL_CSTRING_node_stats_bio(lh,out) \
-  LHM_lh_node_stats_bio(OPENSSL_CSTRING,lh,out)
-#define lh_OPENSSL_CSTRING_node_usage_stats_bio(lh,out) \
-  LHM_lh_node_usage_stats_bio(OPENSSL_CSTRING,lh,out)
-#define lh_OPENSSL_CSTRING_stats_bio(lh,out) \
-  LHM_lh_stats_bio(OPENSSL_CSTRING,lh,out)
-#define lh_OPENSSL_CSTRING_free(lh) LHM_lh_free(OPENSSL_CSTRING,lh)
-
-#define lh_OPENSSL_STRING_new() LHM_lh_new(OPENSSL_STRING,openssl_string)
-#define lh_OPENSSL_STRING_insert(lh,inst) LHM_lh_insert(OPENSSL_STRING,lh,inst)
-#define lh_OPENSSL_STRING_retrieve(lh,inst) LHM_lh_retrieve(OPENSSL_STRING,lh,inst)
-#define lh_OPENSSL_STRING_delete(lh,inst) LHM_lh_delete(OPENSSL_STRING,lh,inst)
-#define lh_OPENSSL_STRING_doall(lh,fn) LHM_lh_doall(OPENSSL_STRING,lh,fn)
-#define lh_OPENSSL_STRING_doall_arg(lh,fn,arg_type,arg) \
-  LHM_lh_doall_arg(OPENSSL_STRING,lh,fn,arg_type,arg)
-#define lh_OPENSSL_STRING_error(lh) LHM_lh_error(OPENSSL_STRING,lh)
-#define lh_OPENSSL_STRING_num_items(lh) LHM_lh_num_items(OPENSSL_STRING,lh)
-#define lh_OPENSSL_STRING_down_load(lh) LHM_lh_down_load(OPENSSL_STRING,lh)
-#define lh_OPENSSL_STRING_node_stats_bio(lh,out) \
-  LHM_lh_node_stats_bio(OPENSSL_STRING,lh,out)
-#define lh_OPENSSL_STRING_node_usage_stats_bio(lh,out) \
-  LHM_lh_node_usage_stats_bio(OPENSSL_STRING,lh,out)
-#define lh_OPENSSL_STRING_stats_bio(lh,out) \
-  LHM_lh_stats_bio(OPENSSL_STRING,lh,out)
-#define lh_OPENSSL_STRING_free(lh) LHM_lh_free(OPENSSL_STRING,lh)
-
-#define lh_SSL_SESSION_new() LHM_lh_new(SSL_SESSION,ssl_session)
-#define lh_SSL_SESSION_insert(lh,inst) LHM_lh_insert(SSL_SESSION,lh,inst)
-#define lh_SSL_SESSION_retrieve(lh,inst) LHM_lh_retrieve(SSL_SESSION,lh,inst)
-#define lh_SSL_SESSION_delete(lh,inst) LHM_lh_delete(SSL_SESSION,lh,inst)
-#define lh_SSL_SESSION_doall(lh,fn) LHM_lh_doall(SSL_SESSION,lh,fn)
-#define lh_SSL_SESSION_doall_arg(lh,fn,arg_type,arg) \
-  LHM_lh_doall_arg(SSL_SESSION,lh,fn,arg_type,arg)
-#define lh_SSL_SESSION_error(lh) LHM_lh_error(SSL_SESSION,lh)
-#define lh_SSL_SESSION_num_items(lh) LHM_lh_num_items(SSL_SESSION,lh)
-#define lh_SSL_SESSION_down_load(lh) LHM_lh_down_load(SSL_SESSION,lh)
-#define lh_SSL_SESSION_node_stats_bio(lh,out) \
-  LHM_lh_node_stats_bio(SSL_SESSION,lh,out)
-#define lh_SSL_SESSION_node_usage_stats_bio(lh,out) \
-  LHM_lh_node_usage_stats_bio(SSL_SESSION,lh,out)
-#define lh_SSL_SESSION_stats_bio(lh,out) \
-  LHM_lh_stats_bio(SSL_SESSION,lh,out)
-#define lh_SSL_SESSION_free(lh) LHM_lh_free(SSL_SESSION,lh)
-/* End of util/mkstack.pl block, you may now edit :-) */
-
-#endif /* !defined HEADER_SAFESTACK_H */
diff --git a/extra_lib/include/openssl/sha.h b/extra_lib/include/openssl/sha.h
deleted file mode 100644
index 16cacf9..0000000
--- a/extra_lib/include/openssl/sha.h
+++ /dev/null
@@ -1,200 +0,0 @@
-/* crypto/sha/sha.h */
-/* Copyright (C) 1995-1998 Eric Young (eay at cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay at cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh at cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay at cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh at cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef HEADER_SHA_H
-#define HEADER_SHA_H
-
-#include <openssl/e_os2.h>
-#include <stddef.h>
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-#if defined(OPENSSL_NO_SHA) || (defined(OPENSSL_NO_SHA0) && defined(OPENSSL_NO_SHA1))
-#error SHA is disabled.
-#endif
-
-#if defined(OPENSSL_FIPS)
-#define FIPS_SHA_SIZE_T size_t
-#endif
-
-/*
- * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- * ! SHA_LONG has to be at least 32 bits wide. If it's wider, then !
- * ! SHA_LONG_LOG2 has to be defined along.                        !
- * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- */
-
-#if defined(__LP32__)
-#define SHA_LONG unsigned long
-#elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__)
-#define SHA_LONG unsigned long
-#define SHA_LONG_LOG2 3
-#else
-#define SHA_LONG unsigned int
-#endif
-
-#define SHA_LBLOCK	16
-#define SHA_CBLOCK	(SHA_LBLOCK*4)	/* SHA treats input data as a
-					 * contiguous array of 32 bit
-					 * wide big-endian values. */
-#define SHA_LAST_BLOCK  (SHA_CBLOCK-8)
-#define SHA_DIGEST_LENGTH 20
-
-typedef struct SHAstate_st
-	{
-	SHA_LONG h0,h1,h2,h3,h4;
-	SHA_LONG Nl,Nh;
-	SHA_LONG data[SHA_LBLOCK];
-	unsigned int num;
-	} SHA_CTX;
-
-#ifndef OPENSSL_NO_SHA0
-int SHA_Init(SHA_CTX *c);
-int SHA_Update(SHA_CTX *c, const void *data, size_t len);
-int SHA_Final(unsigned char *md, SHA_CTX *c);
-unsigned char *SHA(const unsigned char *d, size_t n, unsigned char *md);
-void SHA_Transform(SHA_CTX *c, const unsigned char *data);
-#endif
-#ifndef OPENSSL_NO_SHA1
-int SHA1_Init(SHA_CTX *c);
-int SHA1_Update(SHA_CTX *c, const void *data, size_t len);
-int SHA1_Final(unsigned char *md, SHA_CTX *c);
-unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md);
-void SHA1_Transform(SHA_CTX *c, const unsigned char *data);
-#endif
-
-#define SHA256_CBLOCK	(SHA_LBLOCK*4)	/* SHA-256 treats input data as a
-					 * contiguous array of 32 bit
-					 * wide big-endian values. */
-#define SHA224_DIGEST_LENGTH	28
-#define SHA256_DIGEST_LENGTH	32
-
-typedef struct SHA256state_st
-	{
-	SHA_LONG h[8];
-	SHA_LONG Nl,Nh;
-	SHA_LONG data[SHA_LBLOCK];
-	unsigned int num,md_len;
-	} SHA256_CTX;
-
-#ifndef OPENSSL_NO_SHA256
-int SHA224_Init(SHA256_CTX *c);
-int SHA224_Update(SHA256_CTX *c, const void *data, size_t len);
-int SHA224_Final(unsigned char *md, SHA256_CTX *c);
-unsigned char *SHA224(const unsigned char *d, size_t n,unsigned char *md);
-int SHA256_Init(SHA256_CTX *c);
-int SHA256_Update(SHA256_CTX *c, const void *data, size_t len);
-int SHA256_Final(unsigned char *md, SHA256_CTX *c);
-unsigned char *SHA256(const unsigned char *d, size_t n,unsigned char *md);
-void SHA256_Transform(SHA256_CTX *c, const unsigned char *data);
-#endif
-
-#define SHA384_DIGEST_LENGTH	48
-#define SHA512_DIGEST_LENGTH	64
-
-#ifndef OPENSSL_NO_SHA512
-/*
- * Unlike 32-bit digest algorithms, SHA-512 *relies* on SHA_LONG64
- * being exactly 64-bit wide. See Implementation Notes in sha512.c
- * for further details.
- */
-#define SHA512_CBLOCK	(SHA_LBLOCK*8)	/* SHA-512 treats input data as a
-					 * contiguous array of 64 bit
-					 * wide big-endian values. */
-#if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__)
-#define SHA_LONG64 unsigned __int64
-#define U64(C)     C##UI64
-#elif defined(__arch64__)
-#define SHA_LONG64 unsigned long
-#define U64(C)     C##UL
-#else
-#define SHA_LONG64 unsigned long long
-#define U64(C)     C##ULL
-#endif
-
-typedef struct SHA512state_st
-	{
-	SHA_LONG64 h[8];
-	SHA_LONG64 Nl,Nh;
-	union {
-		SHA_LONG64	d[SHA_LBLOCK];
-		unsigned char	p[SHA512_CBLOCK];
-	} u;
-	unsigned int num,md_len;
-	} SHA512_CTX;
-#endif
-
-#ifndef OPENSSL_NO_SHA512
-int SHA384_Init(SHA512_CTX *c);
-int SHA384_Update(SHA512_CTX *c, const void *data, size_t len);
-int SHA384_Final(unsigned char *md, SHA512_CTX *c);
-unsigned char *SHA384(const unsigned char *d, size_t n,unsigned char *md);
-int SHA512_Init(SHA512_CTX *c);
-int SHA512_Update(SHA512_CTX *c, const void *data, size_t len);
-int SHA512_Final(unsigned char *md, SHA512_CTX *c);
-unsigned char *SHA512(const unsigned char *d, size_t n,unsigned char *md);
-void SHA512_Transform(SHA512_CTX *c, const unsigned char *data);
-#endif
-
-#ifdef  __cplusplus
-}
-#endif
-
-#endif
diff --git a/extra_lib/include/openssl/ssl.h b/extra_lib/include/openssl/ssl.h
deleted file mode 100644
index e4c3f65..0000000
--- a/extra_lib/include/openssl/ssl.h
+++ /dev/null
@@ -1,2302 +0,0 @@
-/* ssl/ssl.h */
-/* Copyright (C) 1995-1998 Eric Young (eay at cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay at cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh at cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay at cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh at cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-/* ====================================================================
- * Copyright (c) 1998-2007 The OpenSSL Project.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. 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.
- *
- * 3. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
- *
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
- *    endorse or promote products derived from this software without
- *    prior written permission. For written permission, please contact
- *    openssl-core at openssl.org.
- *
- * 5. Products derived from this software may not be called "OpenSSL"
- *    nor may "OpenSSL" appear in their names without prior written
- *    permission of the OpenSSL Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- *    acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
- *
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
- * EXPRESSED 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 OpenSSL PROJECT OR
- * ITS 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.
- * ====================================================================
- *
- * This product includes cryptographic software written by Eric Young
- * (eay at cryptsoft.com).  This product includes software written by Tim
- * Hudson (tjh at cryptsoft.com).
- *
- */
-/* ====================================================================
- * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
- * ECC cipher suite support in OpenSSL originally developed by 
- * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
- */
-/* ====================================================================
- * Copyright 2005 Nokia. All rights reserved.
- *
- * The portions of the attached software ("Contribution") is developed by
- * Nokia Corporation and is licensed pursuant to the OpenSSL open source
- * license.
- *
- * The Contribution, originally written by Mika Kousa and Pasi Eronen of
- * Nokia Corporation, consists of the "PSK" (Pre-Shared Key) ciphersuites
- * support (see RFC 4279) to OpenSSL.
- *
- * No patent licenses or other rights except those expressly stated in
- * the OpenSSL open source license shall be deemed granted or received
- * expressly, by implication, estoppel, or otherwise.
- *
- * No assurances are provided by Nokia that the Contribution does not
- * infringe the patent or other intellectual property rights of any third
- * party or that the license provides you with all the necessary rights
- * to make use of the Contribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. IN
- * ADDITION TO THE DISCLAIMERS INCLUDED IN THE LICENSE, NOKIA
- * SPECIFICALLY DISCLAIMS ANY LIABILITY FOR CLAIMS BROUGHT BY YOU OR ANY
- * OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OR
- * OTHERWISE.
- */
-
-#ifndef HEADER_SSL_H 
-#define HEADER_SSL_H 
-
-#include <openssl/e_os2.h>
-
-#ifndef OPENSSL_NO_COMP
-#include <openssl/comp.h>
-#endif
-#ifndef OPENSSL_NO_BIO
-#include <openssl/bio.h>
-#endif
-#ifndef OPENSSL_NO_DEPRECATED
-#ifndef OPENSSL_NO_X509
-#include <openssl/x509.h>
-#endif
-#include <openssl/crypto.h>
-#include <openssl/lhash.h>
-#include <openssl/buffer.h>
-#endif
-#include <openssl/pem.h>
-#include <openssl/hmac.h>
-
-#include <openssl/kssl.h>
-#include <openssl/safestack.h>
-#include <openssl/symhacks.h>
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-/* SSLeay version number for ASN.1 encoding of the session information */
-/* Version 0 - initial version
- * Version 1 - added the optional peer certificate
- */
-#define SSL_SESSION_ASN1_VERSION 0x0001
-
-/* text strings for the ciphers */
-#define SSL_TXT_NULL_WITH_MD5		SSL2_TXT_NULL_WITH_MD5			
-#define SSL_TXT_RC4_128_WITH_MD5	SSL2_TXT_RC4_128_WITH_MD5		
-#define SSL_TXT_RC4_128_EXPORT40_WITH_MD5 SSL2_TXT_RC4_128_EXPORT40_WITH_MD5	
-#define SSL_TXT_RC2_128_CBC_WITH_MD5	SSL2_TXT_RC2_128_CBC_WITH_MD5		
-#define SSL_TXT_RC2_128_CBC_EXPORT40_WITH_MD5 SSL2_TXT_RC2_128_CBC_EXPORT40_WITH_MD5	
-#define SSL_TXT_IDEA_128_CBC_WITH_MD5	SSL2_TXT_IDEA_128_CBC_WITH_MD5		
-#define SSL_TXT_DES_64_CBC_WITH_MD5	SSL2_TXT_DES_64_CBC_WITH_MD5		
-#define SSL_TXT_DES_64_CBC_WITH_SHA	SSL2_TXT_DES_64_CBC_WITH_SHA		
-#define SSL_TXT_DES_192_EDE3_CBC_WITH_MD5 SSL2_TXT_DES_192_EDE3_CBC_WITH_MD5	
-#define SSL_TXT_DES_192_EDE3_CBC_WITH_SHA SSL2_TXT_DES_192_EDE3_CBC_WITH_SHA	
-
-/*    VRS Additional Kerberos5 entries
- */
-#define SSL_TXT_KRB5_DES_64_CBC_SHA   SSL3_TXT_KRB5_DES_64_CBC_SHA
-#define SSL_TXT_KRB5_DES_192_CBC3_SHA SSL3_TXT_KRB5_DES_192_CBC3_SHA
-#define SSL_TXT_KRB5_RC4_128_SHA      SSL3_TXT_KRB5_RC4_128_SHA
-#define SSL_TXT_KRB5_IDEA_128_CBC_SHA SSL3_TXT_KRB5_IDEA_128_CBC_SHA
-#define SSL_TXT_KRB5_DES_64_CBC_MD5   SSL3_TXT_KRB5_DES_64_CBC_MD5       
-#define SSL_TXT_KRB5_DES_192_CBC3_MD5 SSL3_TXT_KRB5_DES_192_CBC3_MD5       
-#define SSL_TXT_KRB5_RC4_128_MD5      SSL3_TXT_KRB5_RC4_128_MD5
-#define SSL_TXT_KRB5_IDEA_128_CBC_MD5 SSL3_TXT_KRB5_IDEA_128_CBC_MD5 
-
-#define SSL_TXT_KRB5_DES_40_CBC_SHA   SSL3_TXT_KRB5_DES_40_CBC_SHA 
-#define SSL_TXT_KRB5_RC2_40_CBC_SHA   SSL3_TXT_KRB5_RC2_40_CBC_SHA 
-#define SSL_TXT_KRB5_RC4_40_SHA	      SSL3_TXT_KRB5_RC4_40_SHA
-#define SSL_TXT_KRB5_DES_40_CBC_MD5   SSL3_TXT_KRB5_DES_40_CBC_MD5 
-#define SSL_TXT_KRB5_RC2_40_CBC_MD5   SSL3_TXT_KRB5_RC2_40_CBC_MD5 
-#define SSL_TXT_KRB5_RC4_40_MD5	      SSL3_TXT_KRB5_RC4_40_MD5
-
-#define SSL_TXT_KRB5_DES_40_CBC_SHA   SSL3_TXT_KRB5_DES_40_CBC_SHA
-#define SSL_TXT_KRB5_DES_40_CBC_MD5   SSL3_TXT_KRB5_DES_40_CBC_MD5
-#define SSL_TXT_KRB5_DES_64_CBC_SHA   SSL3_TXT_KRB5_DES_64_CBC_SHA
-#define SSL_TXT_KRB5_DES_64_CBC_MD5   SSL3_TXT_KRB5_DES_64_CBC_MD5
-#define SSL_TXT_KRB5_DES_192_CBC3_SHA SSL3_TXT_KRB5_DES_192_CBC3_SHA
-#define SSL_TXT_KRB5_DES_192_CBC3_MD5 SSL3_TXT_KRB5_DES_192_CBC3_MD5
-#define SSL_MAX_KRB5_PRINCIPAL_LENGTH  256
-
-#define SSL_MAX_SSL_SESSION_ID_LENGTH		32
-#define SSL_MAX_SID_CTX_LENGTH			32
-
-#define SSL_MIN_RSA_MODULUS_LENGTH_IN_BYTES	(512/8)
-#define SSL_MAX_KEY_ARG_LENGTH			8
-#define SSL_MAX_MASTER_KEY_LENGTH		48
-
-
-/* These are used to specify which ciphers to use and not to use */
-
-#define SSL_TXT_EXP40		"EXPORT40"
-#define SSL_TXT_EXP56		"EXPORT56"
-#define SSL_TXT_LOW		"LOW"
-#define SSL_TXT_MEDIUM		"MEDIUM"
-#define SSL_TXT_HIGH		"HIGH"
-#define SSL_TXT_FIPS		"FIPS"
-
-#define SSL_TXT_kFZA		"kFZA" /* unused! */
-#define	SSL_TXT_aFZA		"aFZA" /* unused! */
-#define SSL_TXT_eFZA		"eFZA" /* unused! */
-#define SSL_TXT_FZA		"FZA"  /* unused! */
-
-#define	SSL_TXT_aNULL		"aNULL"
-#define	SSL_TXT_eNULL		"eNULL"
-#define	SSL_TXT_NULL		"NULL"
-
-#define SSL_TXT_kRSA		"kRSA"
-#define SSL_TXT_kDHr		"kDHr" /* no such ciphersuites supported! */
-#define SSL_TXT_kDHd		"kDHd" /* no such ciphersuites supported! */
-#define SSL_TXT_kDH 		"kDH"  /* no such ciphersuites supported! */
-#define SSL_TXT_kEDH		"kEDH"
-#define SSL_TXT_kKRB5     	"kKRB5"
-#define SSL_TXT_kECDHr		"kECDHr"
-#define SSL_TXT_kECDHe		"kECDHe"
-#define SSL_TXT_kECDH		"kECDH"
-#define SSL_TXT_kEECDH		"kEECDH"
-#define SSL_TXT_kPSK            "kPSK"
-#define SSL_TXT_kGOST		"kGOST"
-
-#define	SSL_TXT_aRSA		"aRSA"
-#define	SSL_TXT_aDSS		"aDSS"
-#define	SSL_TXT_aDH		"aDH" /* no such ciphersuites supported! */
-#define	SSL_TXT_aECDH		"aECDH"
-#define SSL_TXT_aKRB5     	"aKRB5"
-#define SSL_TXT_aECDSA		"aECDSA"
-#define SSL_TXT_aPSK            "aPSK"
-#define SSL_TXT_aGOST94	"aGOST94"
-#define SSL_TXT_aGOST01 "aGOST01"
-#define SSL_TXT_aGOST  "aGOST"
-
-#define	SSL_TXT_DSS		"DSS"
-#define SSL_TXT_DH		"DH"
-#define SSL_TXT_EDH		"EDH" /* same as "kEDH:-ADH" */
-#define SSL_TXT_ADH		"ADH"
-#define SSL_TXT_RSA		"RSA"
-#define SSL_TXT_ECDH		"ECDH"
-#define SSL_TXT_EECDH		"EECDH" /* same as "kEECDH:-AECDH" */
-#define SSL_TXT_AECDH		"AECDH"
-#define SSL_TXT_ECDSA		"ECDSA"
-#define SSL_TXT_KRB5      	"KRB5"
-#define SSL_TXT_PSK             "PSK"
-
-#define SSL_TXT_DES		"DES"
-#define SSL_TXT_3DES		"3DES"
-#define SSL_TXT_RC4		"RC4"
-#define SSL_TXT_RC2		"RC2"
-#define SSL_TXT_IDEA		"IDEA"
-#define SSL_TXT_SEED		"SEED"
-#define SSL_TXT_AES128		"AES128"
-#define SSL_TXT_AES256		"AES256"
-#define SSL_TXT_AES		"AES"
-#define SSL_TXT_CAMELLIA128	"CAMELLIA128"
-#define SSL_TXT_CAMELLIA256	"CAMELLIA256"
-#define SSL_TXT_CAMELLIA	"CAMELLIA"
-
-#define SSL_TXT_MD5		"MD5"
-#define SSL_TXT_SHA1		"SHA1"
-#define SSL_TXT_SHA		"SHA" /* same as "SHA1" */
-#define SSL_TXT_GOST94		"GOST94" 
-#define SSL_TXT_GOST89MAC		"GOST89MAC" 
-
-#define SSL_TXT_SSLV2		"SSLv2"
-#define SSL_TXT_SSLV3		"SSLv3"
-#define SSL_TXT_TLSV1		"TLSv1"
-
-#define SSL_TXT_EXP		"EXP"
-#define SSL_TXT_EXPORT		"EXPORT"
-
-#define SSL_TXT_ALL		"ALL"
-
-/*
- * COMPLEMENTOF* definitions. These identifiers are used to (de-select)
- * ciphers normally not being used.
- * Example: "RC4" will activate all ciphers using RC4 including ciphers
- * without authentication, which would normally disabled by DEFAULT (due
- * the "!ADH" being part of default). Therefore "RC4:!COMPLEMENTOFDEFAULT"
- * will make sure that it is also disabled in the specific selection.
- * COMPLEMENTOF* identifiers are portable between version, as adjustments
- * to the default cipher setup will also be included here.
- *
- * COMPLEMENTOFDEFAULT does not experience the same special treatment that
- * DEFAULT gets, as only selection is being done and no sorting as needed
- * for DEFAULT.
- */
-#define SSL_TXT_CMPALL		"COMPLEMENTOFALL"
-#define SSL_TXT_CMPDEF		"COMPLEMENTOFDEFAULT"
-
-/* The following cipher list is used by default.
- * It also is substituted when an application-defined cipher list string
- * starts with 'DEFAULT'. */
-#define SSL_DEFAULT_CIPHER_LIST	"ALL:!aNULL:!eNULL:!SSLv2"
-/* As of OpenSSL 1.0.0, ssl_create_cipher_list() in ssl/ssl_ciph.c always
- * starts with a reasonable order, and all we have to do for DEFAULT is
- * throwing out anonymous and unencrypted ciphersuites!
- * (The latter are not actually enabled by ALL, but "ALL:RSA" would enable
- * some of them.)
- */
-
-/* Used in SSL_set_shutdown()/SSL_get_shutdown(); */
-#define SSL_SENT_SHUTDOWN	1
-#define SSL_RECEIVED_SHUTDOWN	2
-
-#ifdef __cplusplus
-}
-#endif
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-#if (defined(OPENSSL_NO_RSA) || defined(OPENSSL_NO_MD5)) && !defined(OPENSSL_NO_SSL2)
-#define OPENSSL_NO_SSL2
-#endif
-
-#define SSL_FILETYPE_ASN1	X509_FILETYPE_ASN1
-#define SSL_FILETYPE_PEM	X509_FILETYPE_PEM
-
-/* This is needed to stop compilers complaining about the
- * 'struct ssl_st *' function parameters used to prototype callbacks
- * in SSL_CTX. */
-typedef struct ssl_st *ssl_crock_st;
-typedef struct tls_session_ticket_ext_st TLS_SESSION_TICKET_EXT;
-
-/* used to hold info on the particular ciphers used */
-typedef struct ssl_cipher_st
-	{
-	int valid;
-	const char *name;		/* text name */
-	unsigned long id;		/* id, 4 bytes, first is version */
-
-	/* changed in 0.9.9: these four used to be portions of a single value 'algorithms' */
-	unsigned long algorithm_mkey;	/* key exchange algorithm */
-	unsigned long algorithm_auth;	/* server authentication */
-	unsigned long algorithm_enc;	/* symmetric encryption */
-	unsigned long algorithm_mac;	/* symmetric authentication */
-	unsigned long algorithm_ssl;	/* (major) protocol version */
-
-	unsigned long algo_strength;	/* strength and export flags */
-	unsigned long algorithm2;	/* Extra flags */
-	int strength_bits;		/* Number of bits really used */
-	int alg_bits;			/* Number of bits for algorithm */
-	} SSL_CIPHER;
-
-DECLARE_STACK_OF(SSL_CIPHER)
-
-typedef int (*tls_session_ticket_ext_cb_fn)(SSL *s, const unsigned char *data, int len, void *arg);
-typedef int (*tls_session_secret_cb_fn)(SSL *s, void *secret, int *secret_len, STACK_OF(SSL_CIPHER) *peer_ciphers, SSL_CIPHER **cipher, void *arg);
-
-/* Used to hold functions for SSLv2 or SSLv3/TLSv1 functions */
-typedef struct ssl_method_st
-	{
-	int version;
-	int (*ssl_new)(SSL *s);
-	void (*ssl_clear)(SSL *s);
-	void (*ssl_free)(SSL *s);
-	int (*ssl_accept)(SSL *s);
-	int (*ssl_connect)(SSL *s);
-	int (*ssl_read)(SSL *s,void *buf,int len);
-	int (*ssl_peek)(SSL *s,void *buf,int len);
-	int (*ssl_write)(SSL *s,const void *buf,int len);
-	int (*ssl_shutdown)(SSL *s);
-	int (*ssl_renegotiate)(SSL *s);
-	int (*ssl_renegotiate_check)(SSL *s);
-	long (*ssl_get_message)(SSL *s, int st1, int stn, int mt, long
-		max, int *ok);
-	int (*ssl_read_bytes)(SSL *s, int type, unsigned char *buf, int len, 
-		int peek);
-	int (*ssl_write_bytes)(SSL *s, int type, const void *buf_, int len);
-	int (*ssl_dispatch_alert)(SSL *s);
-	long (*ssl_ctrl)(SSL *s,int cmd,long larg,void *parg);
-	long (*ssl_ctx_ctrl)(SSL_CTX *ctx,int cmd,long larg,void *parg);
-	const SSL_CIPHER *(*get_cipher_by_char)(const unsigned char *ptr);
-	int (*put_cipher_by_char)(const SSL_CIPHER *cipher,unsigned char *ptr);
-	int (*ssl_pending)(const SSL *s);
-	int (*num_ciphers)(void);
-	const SSL_CIPHER *(*get_cipher)(unsigned ncipher);
-	const struct ssl_method_st *(*get_ssl_method)(int version);
-	long (*get_timeout)(void);
-	struct ssl3_enc_method *ssl3_enc; /* Extra SSLv3/TLS stuff */
-	int (*ssl_version)(void);
-	long (*ssl_callback_ctrl)(SSL *s, int cb_id, void (*fp)(void));
-	long (*ssl_ctx_callback_ctrl)(SSL_CTX *s, int cb_id, void (*fp)(void));
-	} SSL_METHOD;
-
-/* Lets make this into an ASN.1 type structure as follows
- * SSL_SESSION_ID ::= SEQUENCE {
- *	version 		INTEGER,	-- structure version number
- *	SSLversion 		INTEGER,	-- SSL version number
- *	Cipher 			OCTET STRING,	-- the 3 byte cipher ID
- *	Session_ID 		OCTET STRING,	-- the Session ID
- *	Master_key 		OCTET STRING,	-- the master key
- *	KRB5_principal		OCTET STRING	-- optional Kerberos principal
- *	Key_Arg [ 0 ] IMPLICIT	OCTET STRING,	-- the optional Key argument
- *	Time [ 1 ] EXPLICIT	INTEGER,	-- optional Start Time
- *	Timeout [ 2 ] EXPLICIT	INTEGER,	-- optional Timeout ins seconds
- *	Peer [ 3 ] EXPLICIT	X509,		-- optional Peer Certificate
- *	Session_ID_context [ 4 ] EXPLICIT OCTET STRING,   -- the Session ID context
- *	Verify_result [ 5 ] EXPLICIT INTEGER,   -- X509_V_... code for `Peer'
- *	HostName [ 6 ] EXPLICIT OCTET STRING,   -- optional HostName from servername TLS extension 
- *	ECPointFormatList [ 7 ] OCTET STRING,     -- optional EC point format list from TLS extension
- *	PSK_identity_hint [ 8 ] EXPLICIT OCTET STRING, -- optional PSK identity hint
- *	PSK_identity [ 9 ] EXPLICIT OCTET STRING -- optional PSK identity
- *	}
- * Look in ssl/ssl_asn1.c for more details
- * I'm using EXPLICIT tags so I can read the damn things using asn1parse :-).
- */
-typedef struct ssl_session_st
-	{
-	int ssl_version;	/* what ssl version session info is
-				 * being kept in here? */
-
-	/* only really used in SSLv2 */
-	unsigned int key_arg_length;
-	unsigned char key_arg[SSL_MAX_KEY_ARG_LENGTH];
-	int master_key_length;
-	unsigned char master_key[SSL_MAX_MASTER_KEY_LENGTH];
-	/* session_id - valid? */
-	unsigned int session_id_length;
-	unsigned char session_id[SSL_MAX_SSL_SESSION_ID_LENGTH];
-	/* this is used to determine whether the session is being reused in
-	 * the appropriate context. It is up to the application to set this,
-	 * via SSL_new */
-	unsigned int sid_ctx_length;
-	unsigned char sid_ctx[SSL_MAX_SID_CTX_LENGTH];
-
-#ifndef OPENSSL_NO_KRB5
-        unsigned int krb5_client_princ_len;
-        unsigned char krb5_client_princ[SSL_MAX_KRB5_PRINCIPAL_LENGTH];
-#endif /* OPENSSL_NO_KRB5 */
-#ifndef OPENSSL_NO_PSK
-	char *psk_identity_hint;
-	char *psk_identity;
-#endif
-	int not_resumable;
-
-	/* The cert is the certificate used to establish this connection */
-	struct sess_cert_st /* SESS_CERT */ *sess_cert;
-
-	/* This is the cert for the other end.
-	 * On clients, it will be the same as sess_cert->peer_key->x509
-	 * (the latter is not enough as sess_cert is not retained
-	 * in the external representation of sessions, see ssl_asn1.c). */
-	X509 *peer;
-	/* when app_verify_callback accepts a session where the peer's certificate
-	 * is not ok, we must remember the error for session reuse: */
-	long verify_result; /* only for servers */
-
-	int references;
-	long timeout;
-	long time;
-
-	unsigned int compress_meth;	/* Need to lookup the method */
-
-	const SSL_CIPHER *cipher;
-	unsigned long cipher_id;	/* when ASN.1 loaded, this
-					 * needs to be used to load
-					 * the 'cipher' structure */
-
-	STACK_OF(SSL_CIPHER) *ciphers; /* shared ciphers? */
-
-	CRYPTO_EX_DATA ex_data; /* application specific data */
-
-	/* These are used to make removal of session-ids more
-	 * efficient and to implement a maximum cache size. */
-	struct ssl_session_st *prev,*next;
-#ifndef OPENSSL_NO_TLSEXT
-	char *tlsext_hostname;
-#ifndef OPENSSL_NO_EC
-	size_t tlsext_ecpointformatlist_length;
-	unsigned char *tlsext_ecpointformatlist; /* peer's list */
-	size_t tlsext_ellipticcurvelist_length;
-	unsigned char *tlsext_ellipticcurvelist; /* peer's list */
-#endif /* OPENSSL_NO_EC */
-	/* RFC4507 info */
-	unsigned char *tlsext_tick;	/* Session ticket */
-	size_t	tlsext_ticklen;		/* Session ticket length */	
-	long tlsext_tick_lifetime_hint;	/* Session lifetime hint in seconds */
-#endif
-	} SSL_SESSION;
-
-
-#define SSL_OP_MICROSOFT_SESS_ID_BUG			0x00000001L
-#define SSL_OP_NETSCAPE_CHALLENGE_BUG			0x00000002L
-/* Allow initial connection to servers that don't support RI */
-#define SSL_OP_LEGACY_SERVER_CONNECT			0x00000004L
-#define SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG		0x00000008L
-#define SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG		0x00000010L
-#define SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER		0x00000020L
-#define SSL_OP_MSIE_SSLV2_RSA_PADDING			0x00000040L /* no effect since 0.9.7h and 0.9.8b */
-#define SSL_OP_SSLEAY_080_CLIENT_DH_BUG			0x00000080L
-#define SSL_OP_TLS_D5_BUG				0x00000100L
-#define SSL_OP_TLS_BLOCK_PADDING_BUG			0x00000200L
-
-/* Disable SSL 3.0/TLS 1.0 CBC vulnerability workaround that was added
- * in OpenSSL 0.9.6d.  Usually (depending on the application protocol)
- * the workaround is not needed.  Unfortunately some broken SSL/TLS
- * implementations cannot handle it at all, which is why we include
- * it in SSL_OP_ALL. */
-#define SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS              0x00000800L /* added in 0.9.6e */
-
-/* SSL_OP_ALL: various bug workarounds that should be rather harmless.
- *             This used to be 0x000FFFFFL before 0.9.7. */
-#define SSL_OP_ALL					0x80000FFFL
-
-/* DTLS options */
-#define SSL_OP_NO_QUERY_MTU                 0x00001000L
-/* Turn on Cookie Exchange (on relevant for servers) */
-#define SSL_OP_COOKIE_EXCHANGE              0x00002000L
-/* Don't use RFC4507 ticket extension */
-#define SSL_OP_NO_TICKET	            0x00004000L
-/* Use Cisco's "speshul" version of DTLS_BAD_VER (as client)  */
-#define SSL_OP_CISCO_ANYCONNECT		    0x00008000L
-
-/* As server, disallow session resumption on renegotiation */
-#define SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION	0x00010000L
-/* Don't use compression even if supported */
-#define SSL_OP_NO_COMPRESSION				0x00020000L
-/* Permit unsafe legacy renegotiation */
-#define SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION	0x00040000L
-/* If set, always create a new key when using tmp_ecdh parameters */
-#define SSL_OP_SINGLE_ECDH_USE				0x00080000L
-/* If set, always create a new key when using tmp_dh parameters */
-#define SSL_OP_SINGLE_DH_USE				0x00100000L
-/* Set to always use the tmp_rsa key when doing RSA operations,
- * even when this violates protocol specs */
-#define SSL_OP_EPHEMERAL_RSA				0x00200000L
-/* Set on servers to choose the cipher according to the server's
- * preferences */
-#define SSL_OP_CIPHER_SERVER_PREFERENCE			0x00400000L
-/* If set, a server will allow a client to issue a SSLv3.0 version number
- * as latest version supported in the premaster secret, even when TLSv1.0
- * (version 3.1) was announced in the client hello. Normally this is
- * forbidden to prevent version rollback attacks. */
-#define SSL_OP_TLS_ROLLBACK_BUG				0x00800000L
-
-#define SSL_OP_NO_SSLv2					0x01000000L
-#define SSL_OP_NO_SSLv3					0x02000000L
-#define SSL_OP_NO_TLSv1					0x04000000L
-
-/* The next flag deliberately changes the ciphertest, this is a check
- * for the PKCS#1 attack */
-#define SSL_OP_PKCS1_CHECK_1				0x08000000L
-#define SSL_OP_PKCS1_CHECK_2				0x10000000L
-#define SSL_OP_NETSCAPE_CA_DN_BUG			0x20000000L
-#define SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG		0x40000000L
-/* Make server add server-hello extension from early version of
- * cryptopro draft, when GOST ciphersuite is negotiated. 
- * Required for interoperability with CryptoPro CSP 3.x 
- */
-#define SSL_OP_CRYPTOPRO_TLSEXT_BUG			0x80000000L
-
-/* Allow SSL_write(..., n) to return r with 0 < r < n (i.e. report success
- * when just a single record has been written): */
-#define SSL_MODE_ENABLE_PARTIAL_WRITE       0x00000001L
-/* Make it possible to retry SSL_write() with changed buffer location
- * (buffer contents must stay the same!); this is not the default to avoid
- * the misconception that non-blocking SSL_write() behaves like
- * non-blocking write(): */
-#define SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER 0x00000002L
-/* Never bother the application with retries if the transport
- * is blocking: */
-#define SSL_MODE_AUTO_RETRY 0x00000004L
-/* Don't attempt to automatically build certificate chain */
-#define SSL_MODE_NO_AUTO_CHAIN 0x00000008L
-/* Save RAM by releasing read and write buffers when they're empty. (SSL3 and
- * TLS only.)  "Released" buffers are put onto a free-list in the context
- * or just freed (depending on the context's setting for freelist_max_len). */
-#define SSL_MODE_RELEASE_BUFFERS 0x00000010L
-
-/* Note: SSL[_CTX]_set_{options,mode} use |= op on the previous value,
- * they cannot be used to clear bits. */
-
-#define SSL_CTX_set_options(ctx,op) \
-	SSL_CTX_ctrl((ctx),SSL_CTRL_OPTIONS,(op),NULL)
-#define SSL_CTX_clear_options(ctx,op) \
-	SSL_CTX_ctrl((ctx),SSL_CTRL_CLEAR_OPTIONS,(op),NULL)
-#define SSL_CTX_get_options(ctx) \
-	SSL_CTX_ctrl((ctx),SSL_CTRL_OPTIONS,0,NULL)
-#define SSL_set_options(ssl,op) \
-	SSL_ctrl((ssl),SSL_CTRL_OPTIONS,(op),NULL)
-#define SSL_clear_options(ssl,op) \
-	SSL_ctrl((ssl),SSL_CTRL_CLEAR_OPTIONS,(op),NULL)
-#define SSL_get_options(ssl) \
-        SSL_ctrl((ssl),SSL_CTRL_OPTIONS,0,NULL)
-
-#define SSL_CTX_set_mode(ctx,op) \
-	SSL_CTX_ctrl((ctx),SSL_CTRL_MODE,(op),NULL)
-#define SSL_CTX_clear_mode(ctx,op) \
-	SSL_CTX_ctrl((ctx),SSL_CTRL_CLEAR_MODE,(op),NULL)
-#define SSL_CTX_get_mode(ctx) \
-	SSL_CTX_ctrl((ctx),SSL_CTRL_MODE,0,NULL)
-#define SSL_clear_mode(ssl,op) \
-	SSL_ctrl((ssl),SSL_CTRL_CLEAR_MODE,(op),NULL)
-#define SSL_set_mode(ssl,op) \
-	SSL_ctrl((ssl),SSL_CTRL_MODE,(op),NULL)
-#define SSL_get_mode(ssl) \
-        SSL_ctrl((ssl),SSL_CTRL_MODE,0,NULL)
-#define SSL_set_mtu(ssl, mtu) \
-        SSL_ctrl((ssl),SSL_CTRL_SET_MTU,(mtu),NULL)
-
-#define SSL_get_secure_renegotiation_support(ssl) \
-	SSL_ctrl((ssl), SSL_CTRL_GET_RI_SUPPORT, 0, NULL)
-
-void SSL_CTX_set_msg_callback(SSL_CTX *ctx, void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg));
-void SSL_set_msg_callback(SSL *ssl, void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg));
-#define SSL_CTX_set_msg_callback_arg(ctx, arg) SSL_CTX_ctrl((ctx), SSL_CTRL_SET_MSG_CALLBACK_ARG, 0, (arg))
-#define SSL_set_msg_callback_arg(ssl, arg) SSL_ctrl((ssl), SSL_CTRL_SET_MSG_CALLBACK_ARG, 0, (arg))
-
-
-
-#if defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_WIN32)
-#define SSL_MAX_CERT_LIST_DEFAULT 1024*30 /* 30k max cert list :-) */
-#else
-#define SSL_MAX_CERT_LIST_DEFAULT 1024*100 /* 100k max cert list :-) */
-#endif
-
-#define SSL_SESSION_CACHE_MAX_SIZE_DEFAULT	(1024*20)
-
-/* This callback type is used inside SSL_CTX, SSL, and in the functions that set
- * them. It is used to override the generation of SSL/TLS session IDs in a
- * server. Return value should be zero on an error, non-zero to proceed. Also,
- * callbacks should themselves check if the id they generate is unique otherwise
- * the SSL handshake will fail with an error - callbacks can do this using the
- * 'ssl' value they're passed by;
- *      SSL_has_matching_session_id(ssl, id, *id_len)
- * The length value passed in is set at the maximum size the session ID can be.
- * In SSLv2 this is 16 bytes, whereas SSLv3/TLSv1 it is 32 bytes. The callback
- * can alter this length to be less if desired, but under SSLv2 session IDs are
- * supposed to be fixed at 16 bytes so the id will be padded after the callback
- * returns in this case. It is also an error for the callback to set the size to
- * zero. */
-typedef int (*GEN_SESSION_CB)(const SSL *ssl, unsigned char *id,
-				unsigned int *id_len);
-
-typedef struct ssl_comp_st
-	{
-	int id;
-	const char *name;
-#ifndef OPENSSL_NO_COMP
-	COMP_METHOD *method;
-#else
-	char *method;
-#endif
-	} SSL_COMP;
-
-DECLARE_STACK_OF(SSL_COMP)
-DECLARE_LHASH_OF(SSL_SESSION);
-
-struct ssl_ctx_st
-	{
-	const SSL_METHOD *method;
-
-	STACK_OF(SSL_CIPHER) *cipher_list;
-	/* same as above but sorted for lookup */
-	STACK_OF(SSL_CIPHER) *cipher_list_by_id;
-
-	struct x509_store_st /* X509_STORE */ *cert_store;
-	LHASH_OF(SSL_SESSION) *sessions;
-	/* Most session-ids that will be cached, default is
-	 * SSL_SESSION_CACHE_MAX_SIZE_DEFAULT. 0 is unlimited. */
-	unsigned long session_cache_size;
-	struct ssl_session_st *session_cache_head;
-	struct ssl_session_st *session_cache_tail;
-
-	/* This can have one of 2 values, ored together,
-	 * SSL_SESS_CACHE_CLIENT,
-	 * SSL_SESS_CACHE_SERVER,
-	 * Default is SSL_SESSION_CACHE_SERVER, which means only
-	 * SSL_accept which cache SSL_SESSIONS. */
-	int session_cache_mode;
-
-	/* If timeout is not 0, it is the default timeout value set
-	 * when SSL_new() is called.  This has been put in to make
-	 * life easier to set things up */
-	long session_timeout;
-
-	/* If this callback is not null, it will be called each
-	 * time a session id is added to the cache.  If this function
-	 * returns 1, it means that the callback will do a
-	 * SSL_SESSION_free() when it has finished using it.  Otherwise,
-	 * on 0, it means the callback has finished with it.
-	 * If remove_session_cb is not null, it will be called when
-	 * a session-id is removed from the cache.  After the call,
-	 * OpenSSL will SSL_SESSION_free() it. */
-	int (*new_session_cb)(struct ssl_st *ssl,SSL_SESSION *sess);
-	void (*remove_session_cb)(struct ssl_ctx_st *ctx,SSL_SESSION *sess);
-	SSL_SESSION *(*get_session_cb)(struct ssl_st *ssl,
-		unsigned char *data,int len,int *copy);
-
-	struct
-		{
-		int sess_connect;	/* SSL new conn - started */
-		int sess_connect_renegotiate;/* SSL reneg - requested */
-		int sess_connect_good;	/* SSL new conne/reneg - finished */
-		int sess_accept;	/* SSL new accept - started */
-		int sess_accept_renegotiate;/* SSL reneg - requested */
-		int sess_accept_good;	/* SSL accept/reneg - finished */
-		int sess_miss;		/* session lookup misses  */
-		int sess_timeout;	/* reuse attempt on timeouted session */
-		int sess_cache_full;	/* session removed due to full cache */
-		int sess_hit;		/* session reuse actually done */
-		int sess_cb_hit;	/* session-id that was not
-					 * in the cache was
-					 * passed back via the callback.  This
-					 * indicates that the application is
-					 * supplying session-id's from other
-					 * processes - spooky :-) */
-		} stats;
-
-	int references;
-
-	/* if defined, these override the X509_verify_cert() calls */
-	int (*app_verify_callback)(X509_STORE_CTX *, void *);
-	void *app_verify_arg;
-	/* before OpenSSL 0.9.7, 'app_verify_arg' was ignored
-	 * ('app_verify_callback' was called with just one argument) */
-
-	/* Default password callback. */
-	pem_password_cb *default_passwd_callback;
-
-	/* Default password callback user data. */
-	void *default_passwd_callback_userdata;
-
-	/* get client cert callback */
-	int (*client_cert_cb)(SSL *ssl, X509 **x509, EVP_PKEY **pkey);
-
-    /* cookie generate callback */
-    int (*app_gen_cookie_cb)(SSL *ssl, unsigned char *cookie, 
-        unsigned int *cookie_len);
-
-    /* verify cookie callback */
-    int (*app_verify_cookie_cb)(SSL *ssl, unsigned char *cookie, 
-        unsigned int cookie_len);
-
-	CRYPTO_EX_DATA ex_data;
-
-	const EVP_MD *rsa_md5;/* For SSLv2 - name is 'ssl2-md5' */
-	const EVP_MD *md5;	/* For SSLv3/TLSv1 'ssl3-md5' */
-	const EVP_MD *sha1;   /* For SSLv3/TLSv1 'ssl3->sha1' */
-
-	STACK_OF(X509) *extra_certs;
-	STACK_OF(SSL_COMP) *comp_methods; /* stack of SSL_COMP, SSLv3/TLSv1 */
-
-
-	/* Default values used when no per-SSL value is defined follow */
-
-	void (*info_callback)(const SSL *ssl,int type,int val); /* used if SSL's info_callback is NULL */
-
-	/* what we put in client cert requests */
-	STACK_OF(X509_NAME) *client_CA;
-
-
-	/* Default values to use in SSL structures follow (these are copied by SSL_new) */
-
-	unsigned long options;
-	unsigned long mode;
-	long max_cert_list;
-
-	struct cert_st /* CERT */ *cert;
-	int read_ahead;
-
-	/* callback that allows applications to peek at protocol messages */
-	void (*msg_callback)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg);
-	void *msg_callback_arg;
-
-	int verify_mode;
-	unsigned int sid_ctx_length;
-	unsigned char sid_ctx[SSL_MAX_SID_CTX_LENGTH];
-	int (*default_verify_callback)(int ok,X509_STORE_CTX *ctx); /* called 'verify_callback' in the SSL */
-
-	/* Default generate session ID callback. */
-	GEN_SESSION_CB generate_session_id;
-
-	X509_VERIFY_PARAM *param;
-
-#if 0
-	int purpose;		/* Purpose setting */
-	int trust;		/* Trust setting */
-#endif
-
-	int quiet_shutdown;
-
-	/* Maximum amount of data to send in one fragment.
-	 * actual record size can be more than this due to
-	 * padding and MAC overheads.
-	 */
-	unsigned int max_send_fragment;
-
-#ifndef OPENSSL_ENGINE
-	/* Engine to pass requests for client certs to
-	 */
-	ENGINE *client_cert_engine;
-#endif
-
-#ifndef OPENSSL_NO_TLSEXT
-	/* TLS extensions servername callback */
-	int (*tlsext_servername_callback)(SSL*, int *, void *);
-	void *tlsext_servername_arg;
-	/* RFC 4507 session ticket keys */
-	unsigned char tlsext_tick_key_name[16];
-	unsigned char tlsext_tick_hmac_key[16];
-	unsigned char tlsext_tick_aes_key[16];
-	/* Callback to support customisation of ticket key setting */
-	int (*tlsext_ticket_key_cb)(SSL *ssl,
-					unsigned char *name, unsigned char *iv,
-					EVP_CIPHER_CTX *ectx,
- 					HMAC_CTX *hctx, int enc);
-
-	/* certificate status request info */
-	/* Callback for status request */
-	int (*tlsext_status_cb)(SSL *ssl, void *arg);
-	void *tlsext_status_arg;
-
-	/* draft-rescorla-tls-opaque-prf-input-00.txt information */
-	int (*tlsext_opaque_prf_input_callback)(SSL *, void *peerinput, size_t len, void *arg);
-	void *tlsext_opaque_prf_input_callback_arg;
-#endif
-
-#ifndef OPENSSL_NO_PSK
-	char *psk_identity_hint;
-	unsigned int (*psk_client_callback)(SSL *ssl, const char *hint, char *identity,
-		unsigned int max_identity_len, unsigned char *psk,
-		unsigned int max_psk_len);
-	unsigned int (*psk_server_callback)(SSL *ssl, const char *identity,
-		unsigned char *psk, unsigned int max_psk_len);
-#endif
-
-#ifndef OPENSSL_NO_BUF_FREELISTS
-#define SSL_MAX_BUF_FREELIST_LEN_DEFAULT 32
-	unsigned int freelist_max_len;
-	struct ssl3_buf_freelist_st *wbuf_freelist;
-	struct ssl3_buf_freelist_st *rbuf_freelist;
-#endif
-	};
-
-#define SSL_SESS_CACHE_OFF			0x0000
-#define SSL_SESS_CACHE_CLIENT			0x0001
-#define SSL_SESS_CACHE_SERVER			0x0002
-#define SSL_SESS_CACHE_BOTH	(SSL_SESS_CACHE_CLIENT|SSL_SESS_CACHE_SERVER)
-#define SSL_SESS_CACHE_NO_AUTO_CLEAR		0x0080
-/* enough comments already ... see SSL_CTX_set_session_cache_mode(3) */
-#define SSL_SESS_CACHE_NO_INTERNAL_LOOKUP	0x0100
-#define SSL_SESS_CACHE_NO_INTERNAL_STORE	0x0200
-#define SSL_SESS_CACHE_NO_INTERNAL \
-	(SSL_SESS_CACHE_NO_INTERNAL_LOOKUP|SSL_SESS_CACHE_NO_INTERNAL_STORE)
-
-LHASH_OF(SSL_SESSION) *SSL_CTX_sessions(SSL_CTX *ctx);
-#define SSL_CTX_sess_number(ctx) \
-	SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_NUMBER,0,NULL)
-#define SSL_CTX_sess_connect(ctx) \
-	SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CONNECT,0,NULL)
-#define SSL_CTX_sess_connect_good(ctx) \
-	SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CONNECT_GOOD,0,NULL)
-#define SSL_CTX_sess_connect_renegotiate(ctx) \
-	SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CONNECT_RENEGOTIATE,0,NULL)
-#define SSL_CTX_sess_accept(ctx) \
-	SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_ACCEPT,0,NULL)
-#define SSL_CTX_sess_accept_renegotiate(ctx) \
-	SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_ACCEPT_RENEGOTIATE,0,NULL)
-#define SSL_CTX_sess_accept_good(ctx) \
-	SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_ACCEPT_GOOD,0,NULL)
-#define SSL_CTX_sess_hits(ctx) \
-	SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_HIT,0,NULL)
-#define SSL_CTX_sess_cb_hits(ctx) \
-	SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CB_HIT,0,NULL)
-#define SSL_CTX_sess_misses(ctx) \
-	SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_MISSES,0,NULL)
-#define SSL_CTX_sess_timeouts(ctx) \
-	SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_TIMEOUTS,0,NULL)
-#define SSL_CTX_sess_cache_full(ctx) \
-	SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CACHE_FULL,0,NULL)
-
-void SSL_CTX_sess_set_new_cb(SSL_CTX *ctx, int (*new_session_cb)(struct ssl_st *ssl,SSL_SESSION *sess));
-int (*SSL_CTX_sess_get_new_cb(SSL_CTX *ctx))(struct ssl_st *ssl, SSL_SESSION *sess);
-void SSL_CTX_sess_set_remove_cb(SSL_CTX *ctx, void (*remove_session_cb)(struct ssl_ctx_st *ctx,SSL_SESSION *sess));
-void (*SSL_CTX_sess_get_remove_cb(SSL_CTX *ctx))(struct ssl_ctx_st *ctx, SSL_SESSION *sess);
-void SSL_CTX_sess_set_get_cb(SSL_CTX *ctx, SSL_SESSION *(*get_session_cb)(struct ssl_st *ssl, unsigned char *data,int len,int *copy));
-SSL_SESSION *(*SSL_CTX_sess_get_get_cb(SSL_CTX *ctx))(struct ssl_st *ssl, unsigned char *Data, int len, int *copy);
-void SSL_CTX_set_info_callback(SSL_CTX *ctx, void (*cb)(const SSL *ssl,int type,int val));
-void (*SSL_CTX_get_info_callback(SSL_CTX *ctx))(const SSL *ssl,int type,int val);
-void SSL_CTX_set_client_cert_cb(SSL_CTX *ctx, int (*client_cert_cb)(SSL *ssl, X509 **x509, EVP_PKEY **pkey));
-int (*SSL_CTX_get_client_cert_cb(SSL_CTX *ctx))(SSL *ssl, X509 **x509, EVP_PKEY **pkey);
-#ifndef OPENSSL_NO_ENGINE
-int SSL_CTX_set_client_cert_engine(SSL_CTX *ctx, ENGINE *e);
-#endif
-void SSL_CTX_set_cookie_generate_cb(SSL_CTX *ctx, int (*app_gen_cookie_cb)(SSL *ssl, unsigned char *cookie, unsigned int *cookie_len));
-void SSL_CTX_set_cookie_verify_cb(SSL_CTX *ctx, int (*app_verify_cookie_cb)(SSL *ssl, unsigned char *cookie, unsigned int cookie_len));
-
-#ifndef OPENSSL_NO_PSK
-/* the maximum length of the buffer given to callbacks containing the
- * resulting identity/psk */
-#define PSK_MAX_IDENTITY_LEN 128
-#define PSK_MAX_PSK_LEN 256
-void SSL_CTX_set_psk_client_callback(SSL_CTX *ctx, 
-	unsigned int (*psk_client_callback)(SSL *ssl, const char *hint, 
-		char *identity, unsigned int max_identity_len, unsigned char *psk,
-		unsigned int max_psk_len));
-void SSL_set_psk_client_callback(SSL *ssl, 
-	unsigned int (*psk_client_callback)(SSL *ssl, const char *hint, 
-		char *identity, unsigned int max_identity_len, unsigned char *psk,
-		unsigned int max_psk_len));
-void SSL_CTX_set_psk_server_callback(SSL_CTX *ctx, 
-	unsigned int (*psk_server_callback)(SSL *ssl, const char *identity,
-		unsigned char *psk, unsigned int max_psk_len));
-void SSL_set_psk_server_callback(SSL *ssl,
-	unsigned int (*psk_server_callback)(SSL *ssl, const char *identity,
-		unsigned char *psk, unsigned int max_psk_len));
-int SSL_CTX_use_psk_identity_hint(SSL_CTX *ctx, const char *identity_hint);
-int SSL_use_psk_identity_hint(SSL *s, const char *identity_hint);
-const char *SSL_get_psk_identity_hint(const SSL *s);
-const char *SSL_get_psk_identity(const SSL *s);
-#endif
-
-#define SSL_NOTHING	1
-#define SSL_WRITING	2
-#define SSL_READING	3
-#define SSL_X509_LOOKUP	4
-
-/* These will only be used when doing non-blocking IO */
-#define SSL_want_nothing(s)	(SSL_want(s) == SSL_NOTHING)
-#define SSL_want_read(s)	(SSL_want(s) == SSL_READING)
-#define SSL_want_write(s)	(SSL_want(s) == SSL_WRITING)
-#define SSL_want_x509_lookup(s)	(SSL_want(s) == SSL_X509_LOOKUP)
-
-#define SSL_MAC_FLAG_READ_MAC_STREAM 1
-#define SSL_MAC_FLAG_WRITE_MAC_STREAM 2
-
-struct ssl_st
-	{
-	/* protocol version
-	 * (one of SSL2_VERSION, SSL3_VERSION, TLS1_VERSION, DTLS1_VERSION)
-	 */
-	int version;
-	int type; /* SSL_ST_CONNECT or SSL_ST_ACCEPT */
-
-	const SSL_METHOD *method; /* SSLv3 */
-
-	/* There are 2 BIO's even though they are normally both the
-	 * same.  This is so data can be read and written to different
-	 * handlers */
-
-#ifndef OPENSSL_NO_BIO
-	BIO *rbio; /* used by SSL_read */
-	BIO *wbio; /* used by SSL_write */
-	BIO *bbio; /* used during session-id reuse to concatenate
-		    * messages */
-#else
-	char *rbio; /* used by SSL_read */
-	char *wbio; /* used by SSL_write */
-	char *bbio;
-#endif
-	/* This holds a variable that indicates what we were doing
-	 * when a 0 or -1 is returned.  This is needed for
-	 * non-blocking IO so we know what request needs re-doing when
-	 * in SSL_accept or SSL_connect */
-	int rwstate;
-
-	/* true when we are actually in SSL_accept() or SSL_connect() */
-	int in_handshake;
-	int (*handshake_func)(SSL *);
-
-	/* Imagine that here's a boolean member "init" that is
-	 * switched as soon as SSL_set_{accept/connect}_state
-	 * is called for the first time, so that "state" and
-	 * "handshake_func" are properly initialized.  But as
-	 * handshake_func is == 0 until then, we use this
-	 * test instead of an "init" member.
-	 */
-
-	int server;	/* are we the server side? - mostly used by SSL_clear*/
-
-	int new_session;/* 1 if we are to use a new session.
-	                 * 2 if we are a server and are inside a handshake
-	                 *   (i.e. not just sending a HelloRequest)
-	                 * NB: For servers, the 'new' session may actually be a previously
-	                 * cached session or even the previous session unless
-	                 * SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION is set */
-	int quiet_shutdown;/* don't send shutdown packets */
-	int shutdown;	/* we have shut things down, 0x01 sent, 0x02
-			 * for received */
-	int state;	/* where we are */
-	int rstate;	/* where we are when reading */
-
-	BUF_MEM *init_buf;	/* buffer used during init */
-	void *init_msg;   	/* pointer to handshake message body, set by ssl3_get_message() */
-	int init_num;		/* amount read/written */
-	int init_off;		/* amount read/written */
-
-	/* used internally to point at a raw packet */
-	unsigned char *packet;
-	unsigned int packet_length;
-
-	struct ssl2_state_st *s2; /* SSLv2 variables */
-	struct ssl3_state_st *s3; /* SSLv3 variables */
-	struct dtls1_state_st *d1; /* DTLSv1 variables */
-
-	int read_ahead;		/* Read as many input bytes as possible
-	               	 	 * (for non-blocking reads) */
-
-	/* callback that allows applications to peek at protocol messages */
-	void (*msg_callback)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg);
-	void *msg_callback_arg;
-
-	int hit;		/* reusing a previous session */
-
-	X509_VERIFY_PARAM *param;
-
-#if 0
-	int purpose;		/* Purpose setting */
-	int trust;		/* Trust setting */
-#endif
-
-	/* crypto */
-	STACK_OF(SSL_CIPHER) *cipher_list;
-	STACK_OF(SSL_CIPHER) *cipher_list_by_id;
-
-	/* These are the ones being used, the ones in SSL_SESSION are
-	 * the ones to be 'copied' into these ones */
-	int mac_flags; 
-	EVP_CIPHER_CTX *enc_read_ctx;		/* cryptographic state */
-	EVP_MD_CTX *read_hash;		/* used for mac generation */
-#ifndef OPENSSL_NO_COMP
-	COMP_CTX *expand;			/* uncompress */
-#else
-	char *expand;
-#endif
-
-	EVP_CIPHER_CTX *enc_write_ctx;		/* cryptographic state */
-	EVP_MD_CTX *write_hash;		/* used for mac generation */
-#ifndef OPENSSL_NO_COMP
-	COMP_CTX *compress;			/* compression */
-#else
-	char *compress;	
-#endif
-
-	/* session info */
-
-	/* client cert? */
-	/* This is used to hold the server certificate used */
-	struct cert_st /* CERT */ *cert;
-
-	/* the session_id_context is used to ensure sessions are only reused
-	 * in the appropriate context */
-	unsigned int sid_ctx_length;
-	unsigned char sid_ctx[SSL_MAX_SID_CTX_LENGTH];
-
-	/* This can also be in the session once a session is established */
-	SSL_SESSION *session;
-
-	/* Default generate session ID callback. */
-	GEN_SESSION_CB generate_session_id;
-
-	/* Used in SSL2 and SSL3 */
-	int verify_mode;	/* 0 don't care about verify failure.
-				 * 1 fail if verify fails */
-	int (*verify_callback)(int ok,X509_STORE_CTX *ctx); /* fail if callback returns 0 */
-
-	void (*info_callback)(const SSL *ssl,int type,int val); /* optional informational callback */
-
-	int error;		/* error bytes to be written */
-	int error_code;		/* actual code */
-
-#ifndef OPENSSL_NO_KRB5
-	KSSL_CTX *kssl_ctx;     /* Kerberos 5 context */
-#endif	/* OPENSSL_NO_KRB5 */
-
-#ifndef OPENSSL_NO_PSK
-	unsigned int (*psk_client_callback)(SSL *ssl, const char *hint, char *identity,
-		unsigned int max_identity_len, unsigned char *psk,
-		unsigned int max_psk_len);
-	unsigned int (*psk_server_callback)(SSL *ssl, const char *identity,
-		unsigned char *psk, unsigned int max_psk_len);
-#endif
-
-	SSL_CTX *ctx;
-	/* set this flag to 1 and a sleep(1) is put into all SSL_read()
-	 * and SSL_write() calls, good for nbio debuging :-) */
-	int debug;	
-
-	/* extra application data */
-	long verify_result;
-	CRYPTO_EX_DATA ex_data;
-
-	/* for server side, keep the list of CA_dn we can use */
-	STACK_OF(X509_NAME) *client_CA;
-
-	int references;
-	unsigned long options; /* protocol behaviour */
-	unsigned long mode; /* API behaviour */
-	long max_cert_list;
-	int first_packet;
-	int client_version;	/* what was passed, used for
-				 * SSLv3/TLS rollback check */
-	unsigned int max_send_fragment;
-#ifndef OPENSSL_NO_TLSEXT
-	/* TLS extension debug callback */
-	void (*tlsext_debug_cb)(SSL *s, int client_server, int type,
-					unsigned char *data, int len,
-					void *arg);
-	void *tlsext_debug_arg;
-	char *tlsext_hostname;
-	int servername_done;   /* no further mod of servername 
-	                          0 : call the servername extension callback.
-	                          1 : prepare 2, allow last ack just after in server callback.
-	                          2 : don't call servername callback, no ack in server hello
-	                       */
-	/* certificate status request info */
-	/* Status type or -1 if no status type */
-	int tlsext_status_type;
-	/* Expect OCSP CertificateStatus message */
-	int tlsext_status_expected;
-	/* OCSP status request only */
-	STACK_OF(OCSP_RESPID) *tlsext_ocsp_ids;
-	X509_EXTENSIONS *tlsext_ocsp_exts;
-	/* OCSP response received or to be sent */
-	unsigned char *tlsext_ocsp_resp;
-	int tlsext_ocsp_resplen;
-
-	/* RFC4507 session ticket expected to be received or sent */
-	int tlsext_ticket_expected;
-#ifndef OPENSSL_NO_EC
-	size_t tlsext_ecpointformatlist_length;
-	unsigned char *tlsext_ecpointformatlist; /* our list */
-	size_t tlsext_ellipticcurvelist_length;
-	unsigned char *tlsext_ellipticcurvelist; /* our list */
-#endif /* OPENSSL_NO_EC */
-
-	/* draft-rescorla-tls-opaque-prf-input-00.txt information to be used for handshakes */
-	void *tlsext_opaque_prf_input;
-	size_t tlsext_opaque_prf_input_len;
-
-	/* TLS Session Ticket extension override */
-	TLS_SESSION_TICKET_EXT *tlsext_session_ticket;
-
-	/* TLS Session Ticket extension callback */
-	tls_session_ticket_ext_cb_fn tls_session_ticket_ext_cb;
-	void *tls_session_ticket_ext_cb_arg;
-
-	/* TLS pre-shared secret session resumption */
-	tls_session_secret_cb_fn tls_session_secret_cb;
-	void *tls_session_secret_cb_arg;
-
-	SSL_CTX * initial_ctx; /* initial ctx, used to store sessions */
-#define session_ctx initial_ctx
-#else
-#define session_ctx ctx
-#endif /* OPENSSL_NO_TLSEXT */
-	};
-
-#ifdef __cplusplus
-}
-#endif
-
-#include <openssl/ssl2.h>
-#include <openssl/ssl3.h>
-#include <openssl/tls1.h> /* This is mostly sslv3 with a few tweaks */
-#include <openssl/dtls1.h> /* Datagram TLS */
-#include <openssl/ssl23.h>
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-/* compatibility */
-#define SSL_set_app_data(s,arg)		(SSL_set_ex_data(s,0,(char *)arg))
-#define SSL_get_app_data(s)		(SSL_get_ex_data(s,0))
-#define SSL_SESSION_set_app_data(s,a)	(SSL_SESSION_set_ex_data(s,0,(char *)a))
-#define SSL_SESSION_get_app_data(s)	(SSL_SESSION_get_ex_data(s,0))
-#define SSL_CTX_get_app_data(ctx)	(SSL_CTX_get_ex_data(ctx,0))
-#define SSL_CTX_set_app_data(ctx,arg)	(SSL_CTX_set_ex_data(ctx,0,(char *)arg))
-
-/* The following are the possible values for ssl->state are are
- * used to indicate where we are up to in the SSL connection establishment.
- * The macros that follow are about the only things you should need to use
- * and even then, only when using non-blocking IO.
- * It can also be useful to work out where you were when the connection
- * failed */
-
-#define SSL_ST_CONNECT			0x1000
-#define SSL_ST_ACCEPT			0x2000
-#define SSL_ST_MASK			0x0FFF
-#define SSL_ST_INIT			(SSL_ST_CONNECT|SSL_ST_ACCEPT)
-#define SSL_ST_BEFORE			0x4000
-#define SSL_ST_OK			0x03
-#define SSL_ST_RENEGOTIATE		(0x04|SSL_ST_INIT)
-
-#define SSL_CB_LOOP			0x01
-#define SSL_CB_EXIT			0x02
-#define SSL_CB_READ			0x04
-#define SSL_CB_WRITE			0x08
-#define SSL_CB_ALERT			0x4000 /* used in callback */
-#define SSL_CB_READ_ALERT		(SSL_CB_ALERT|SSL_CB_READ)
-#define SSL_CB_WRITE_ALERT		(SSL_CB_ALERT|SSL_CB_WRITE)
-#define SSL_CB_ACCEPT_LOOP		(SSL_ST_ACCEPT|SSL_CB_LOOP)
-#define SSL_CB_ACCEPT_EXIT		(SSL_ST_ACCEPT|SSL_CB_EXIT)
-#define SSL_CB_CONNECT_LOOP		(SSL_ST_CONNECT|SSL_CB_LOOP)
-#define SSL_CB_CONNECT_EXIT		(SSL_ST_CONNECT|SSL_CB_EXIT)
-#define SSL_CB_HANDSHAKE_START		0x10
-#define SSL_CB_HANDSHAKE_DONE		0x20
-
-/* Is the SSL_connection established? */
-#define SSL_get_state(a)		SSL_state(a)
-#define SSL_is_init_finished(a)		(SSL_state(a) == SSL_ST_OK)
-#define SSL_in_init(a)			(SSL_state(a)&SSL_ST_INIT)
-#define SSL_in_before(a)		(SSL_state(a)&SSL_ST_BEFORE)
-#define SSL_in_connect_init(a)		(SSL_state(a)&SSL_ST_CONNECT)
-#define SSL_in_accept_init(a)		(SSL_state(a)&SSL_ST_ACCEPT)
-
-/* The following 2 states are kept in ssl->rstate when reads fail,
- * you should not need these */
-#define SSL_ST_READ_HEADER			0xF0
-#define SSL_ST_READ_BODY			0xF1
-#define SSL_ST_READ_DONE			0xF2
-
-/* Obtain latest Finished message
- *   -- that we sent (SSL_get_finished)
- *   -- that we expected from peer (SSL_get_peer_finished).
- * Returns length (0 == no Finished so far), copies up to 'count' bytes. */
-size_t SSL_get_finished(const SSL *s, void *buf, size_t count);
-size_t SSL_get_peer_finished(const SSL *s, void *buf, size_t count);
-
-/* use either SSL_VERIFY_NONE or SSL_VERIFY_PEER, the last 2 options
- * are 'ored' with SSL_VERIFY_PEER if they are desired */
-#define SSL_VERIFY_NONE			0x00
-#define SSL_VERIFY_PEER			0x01
-#define SSL_VERIFY_FAIL_IF_NO_PEER_CERT	0x02
-#define SSL_VERIFY_CLIENT_ONCE		0x04
-
-#define OpenSSL_add_ssl_algorithms()	SSL_library_init()
-#define SSLeay_add_ssl_algorithms()	SSL_library_init()
-
-/* this is for backward compatibility */
-#if 0 /* NEW_SSLEAY */
-#define SSL_CTX_set_default_verify(a,b,c) SSL_CTX_set_verify(a,b,c)
-#define SSL_set_pref_cipher(c,n)	SSL_set_cipher_list(c,n)
-#define SSL_add_session(a,b)            SSL_CTX_add_session((a),(b))
-#define SSL_remove_session(a,b)		SSL_CTX_remove_session((a),(b))
-#define SSL_flush_sessions(a,b)		SSL_CTX_flush_sessions((a),(b))
-#endif
-/* More backward compatibility */
-#define SSL_get_cipher(s) \
-		SSL_CIPHER_get_name(SSL_get_current_cipher(s))
-#define SSL_get_cipher_bits(s,np) \
-		SSL_CIPHER_get_bits(SSL_get_current_cipher(s),np)
-#define SSL_get_cipher_version(s) \
-		SSL_CIPHER_get_version(SSL_get_current_cipher(s))
-#define SSL_get_cipher_name(s) \
-		SSL_CIPHER_get_name(SSL_get_current_cipher(s))
-#define SSL_get_time(a)		SSL_SESSION_get_time(a)
-#define SSL_set_time(a,b)	SSL_SESSION_set_time((a),(b))
-#define SSL_get_timeout(a)	SSL_SESSION_get_timeout(a)
-#define SSL_set_timeout(a,b)	SSL_SESSION_set_timeout((a),(b))
-
-#define d2i_SSL_SESSION_bio(bp,s_id) ASN1_d2i_bio_of(SSL_SESSION,SSL_SESSION_new,d2i_SSL_SESSION,bp,s_id)
-#define i2d_SSL_SESSION_bio(bp,s_id) ASN1_i2d_bio_of(SSL_SESSION,i2d_SSL_SESSION,bp,s_id)
-
-DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION)
-
-#define SSL_AD_REASON_OFFSET		1000 /* offset to get SSL_R_... value from SSL_AD_... */
-
-/* These alert types are for SSLv3 and TLSv1 */
-#define SSL_AD_CLOSE_NOTIFY		SSL3_AD_CLOSE_NOTIFY
-#define SSL_AD_UNEXPECTED_MESSAGE	SSL3_AD_UNEXPECTED_MESSAGE /* fatal */
-#define SSL_AD_BAD_RECORD_MAC		SSL3_AD_BAD_RECORD_MAC     /* fatal */
-#define SSL_AD_DECRYPTION_FAILED	TLS1_AD_DECRYPTION_FAILED
-#define SSL_AD_RECORD_OVERFLOW		TLS1_AD_RECORD_OVERFLOW
-#define SSL_AD_DECOMPRESSION_FAILURE	SSL3_AD_DECOMPRESSION_FAILURE/* fatal */
-#define SSL_AD_HANDSHAKE_FAILURE	SSL3_AD_HANDSHAKE_FAILURE/* fatal */
-#define SSL_AD_NO_CERTIFICATE		SSL3_AD_NO_CERTIFICATE /* Not for TLS */
-#define SSL_AD_BAD_CERTIFICATE		SSL3_AD_BAD_CERTIFICATE
-#define SSL_AD_UNSUPPORTED_CERTIFICATE	SSL3_AD_UNSUPPORTED_CERTIFICATE
-#define SSL_AD_CERTIFICATE_REVOKED	SSL3_AD_CERTIFICATE_REVOKED
-#define SSL_AD_CERTIFICATE_EXPIRED	SSL3_AD_CERTIFICATE_EXPIRED
-#define SSL_AD_CERTIFICATE_UNKNOWN	SSL3_AD_CERTIFICATE_UNKNOWN
-#define SSL_AD_ILLEGAL_PARAMETER	SSL3_AD_ILLEGAL_PARAMETER   /* fatal */
-#define SSL_AD_UNKNOWN_CA		TLS1_AD_UNKNOWN_CA	/* fatal */
-#define SSL_AD_ACCESS_DENIED		TLS1_AD_ACCESS_DENIED	/* fatal */
-#define SSL_AD_DECODE_ERROR		TLS1_AD_DECODE_ERROR	/* fatal */
-#define SSL_AD_DECRYPT_ERROR		TLS1_AD_DECRYPT_ERROR
-#define SSL_AD_EXPORT_RESTRICTION	TLS1_AD_EXPORT_RESTRICTION/* fatal */
-#define SSL_AD_PROTOCOL_VERSION		TLS1_AD_PROTOCOL_VERSION /* fatal */
-#define SSL_AD_INSUFFICIENT_SECURITY	TLS1_AD_INSUFFICIENT_SECURITY/* fatal */
-#define SSL_AD_INTERNAL_ERROR		TLS1_AD_INTERNAL_ERROR	/* fatal */
-#define SSL_AD_USER_CANCELLED		TLS1_AD_USER_CANCELLED
-#define SSL_AD_NO_RENEGOTIATION		TLS1_AD_NO_RENEGOTIATION
-#define SSL_AD_UNSUPPORTED_EXTENSION	TLS1_AD_UNSUPPORTED_EXTENSION
-#define SSL_AD_CERTIFICATE_UNOBTAINABLE TLS1_AD_CERTIFICATE_UNOBTAINABLE
-#define SSL_AD_UNRECOGNIZED_NAME	TLS1_AD_UNRECOGNIZED_NAME
-#define SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE
-#define SSL_AD_BAD_CERTIFICATE_HASH_VALUE TLS1_AD_BAD_CERTIFICATE_HASH_VALUE
-#define SSL_AD_UNKNOWN_PSK_IDENTITY     TLS1_AD_UNKNOWN_PSK_IDENTITY /* fatal */
-
-#define SSL_ERROR_NONE			0
-#define SSL_ERROR_SSL			1
-#define SSL_ERROR_WANT_READ		2
-#define SSL_ERROR_WANT_WRITE		3
-#define SSL_ERROR_WANT_X509_LOOKUP	4
-#define SSL_ERROR_SYSCALL		5 /* look at error stack/return value/errno */
-#define SSL_ERROR_ZERO_RETURN		6
-#define SSL_ERROR_WANT_CONNECT		7
-#define SSL_ERROR_WANT_ACCEPT		8
-
-#define SSL_CTRL_NEED_TMP_RSA			1
-#define SSL_CTRL_SET_TMP_RSA			2
-#define SSL_CTRL_SET_TMP_DH			3
-#define SSL_CTRL_SET_TMP_ECDH			4
-#define SSL_CTRL_SET_TMP_RSA_CB			5
-#define SSL_CTRL_SET_TMP_DH_CB			6
-#define SSL_CTRL_SET_TMP_ECDH_CB		7
-
-#define SSL_CTRL_GET_SESSION_REUSED		8
-#define SSL_CTRL_GET_CLIENT_CERT_REQUEST	9
-#define SSL_CTRL_GET_NUM_RENEGOTIATIONS		10
-#define SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS	11
-#define SSL_CTRL_GET_TOTAL_RENEGOTIATIONS	12
-#define SSL_CTRL_GET_FLAGS			13
-#define SSL_CTRL_EXTRA_CHAIN_CERT		14
-
-#define SSL_CTRL_SET_MSG_CALLBACK               15
-#define SSL_CTRL_SET_MSG_CALLBACK_ARG           16
-
-/* only applies to datagram connections */
-#define SSL_CTRL_SET_MTU                17
-/* Stats */
-#define SSL_CTRL_SESS_NUMBER			20
-#define SSL_CTRL_SESS_CONNECT			21
-#define SSL_CTRL_SESS_CONNECT_GOOD		22
-#define SSL_CTRL_SESS_CONNECT_RENEGOTIATE	23
-#define SSL_CTRL_SESS_ACCEPT			24
-#define SSL_CTRL_SESS_ACCEPT_GOOD		25
-#define SSL_CTRL_SESS_ACCEPT_RENEGOTIATE	26
-#define SSL_CTRL_SESS_HIT			27
-#define SSL_CTRL_SESS_CB_HIT			28
-#define SSL_CTRL_SESS_MISSES			29
-#define SSL_CTRL_SESS_TIMEOUTS			30
-#define SSL_CTRL_SESS_CACHE_FULL		31
-#define SSL_CTRL_OPTIONS			32
-#define SSL_CTRL_MODE				33
-
-#define SSL_CTRL_GET_READ_AHEAD			40
-#define SSL_CTRL_SET_READ_AHEAD			41
-#define SSL_CTRL_SET_SESS_CACHE_SIZE		42
-#define SSL_CTRL_GET_SESS_CACHE_SIZE		43
-#define SSL_CTRL_SET_SESS_CACHE_MODE		44
-#define SSL_CTRL_GET_SESS_CACHE_MODE		45
-
-#define SSL_CTRL_GET_MAX_CERT_LIST		50
-#define SSL_CTRL_SET_MAX_CERT_LIST		51
-
-#define SSL_CTRL_SET_MAX_SEND_FRAGMENT		52
-
-/* see tls1.h for macros based on these */
-#ifndef OPENSSL_NO_TLSEXT
-#define SSL_CTRL_SET_TLSEXT_SERVERNAME_CB	53
-#define SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG	54
-#define SSL_CTRL_SET_TLSEXT_HOSTNAME		55
-#define SSL_CTRL_SET_TLSEXT_DEBUG_CB		56
-#define SSL_CTRL_SET_TLSEXT_DEBUG_ARG		57
-#define SSL_CTRL_GET_TLSEXT_TICKET_KEYS		58
-#define SSL_CTRL_SET_TLSEXT_TICKET_KEYS		59
-#define SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT	60
-#define SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT_CB	61
-#define SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT_CB_ARG 62
-#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB	63
-#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG	64
-#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE	65
-#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS	66
-#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS	67
-#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS	68
-#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS	69
-#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP	70
-#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP	71
-
-#define SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB	72
-#endif
-
-#define DTLS_CTRL_GET_TIMEOUT		73
-#define DTLS_CTRL_HANDLE_TIMEOUT	74
-#define DTLS_CTRL_LISTEN			75
-
-#define SSL_CTRL_GET_RI_SUPPORT			76
-#define SSL_CTRL_CLEAR_OPTIONS			77
-#define SSL_CTRL_CLEAR_MODE			78
-
-#define DTLSv1_get_timeout(ssl, arg) \
-	SSL_ctrl(ssl,DTLS_CTRL_GET_TIMEOUT,0, (void *)arg)
-#define DTLSv1_handle_timeout(ssl) \
-	SSL_ctrl(ssl,DTLS_CTRL_HANDLE_TIMEOUT,0, NULL)
-#define DTLSv1_listen(ssl, peer) \
-	SSL_ctrl(ssl,DTLS_CTRL_LISTEN,0, (void *)peer)
-
-#define SSL_session_reused(ssl) \
-	SSL_ctrl((ssl),SSL_CTRL_GET_SESSION_REUSED,0,NULL)
-#define SSL_num_renegotiations(ssl) \
-	SSL_ctrl((ssl),SSL_CTRL_GET_NUM_RENEGOTIATIONS,0,NULL)
-#define SSL_clear_num_renegotiations(ssl) \
-	SSL_ctrl((ssl),SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS,0,NULL)
-#define SSL_total_renegotiations(ssl) \
-	SSL_ctrl((ssl),SSL_CTRL_GET_TOTAL_RENEGOTIATIONS,0,NULL)
-
-#define SSL_CTX_need_tmp_RSA(ctx) \
-	SSL_CTX_ctrl(ctx,SSL_CTRL_NEED_TMP_RSA,0,NULL)
-#define SSL_CTX_set_tmp_rsa(ctx,rsa) \
-	SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_RSA,0,(char *)rsa)
-#define SSL_CTX_set_tmp_dh(ctx,dh) \
-	SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_DH,0,(char *)dh)
-#define SSL_CTX_set_tmp_ecdh(ctx,ecdh) \
-	SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_ECDH,0,(char *)ecdh)
-
-#define SSL_need_tmp_RSA(ssl) \
-	SSL_ctrl(ssl,SSL_CTRL_NEED_TMP_RSA,0,NULL)
-#define SSL_set_tmp_rsa(ssl,rsa) \
-	SSL_ctrl(ssl,SSL_CTRL_SET_TMP_RSA,0,(char *)rsa)
-#define SSL_set_tmp_dh(ssl,dh) \
-	SSL_ctrl(ssl,SSL_CTRL_SET_TMP_DH,0,(char *)dh)
-#define SSL_set_tmp_ecdh(ssl,ecdh) \
-	SSL_ctrl(ssl,SSL_CTRL_SET_TMP_ECDH,0,(char *)ecdh)
-
-#define SSL_CTX_add_extra_chain_cert(ctx,x509) \
-	SSL_CTX_ctrl(ctx,SSL_CTRL_EXTRA_CHAIN_CERT,0,(char *)x509)
-
-#ifndef OPENSSL_NO_BIO
-BIO_METHOD *BIO_f_ssl(void);
-BIO *BIO_new_ssl(SSL_CTX *ctx,int client);
-BIO *BIO_new_ssl_connect(SSL_CTX *ctx);
-BIO *BIO_new_buffer_ssl_connect(SSL_CTX *ctx);
-int BIO_ssl_copy_session_id(BIO *to,BIO *from);
-void BIO_ssl_shutdown(BIO *ssl_bio);
-
-#endif
-
-int	SSL_CTX_set_cipher_list(SSL_CTX *,const char *str);
-SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth);
-void	SSL_CTX_free(SSL_CTX *);
-long SSL_CTX_set_timeout(SSL_CTX *ctx,long t);
-long SSL_CTX_get_timeout(const SSL_CTX *ctx);
-X509_STORE *SSL_CTX_get_cert_store(const SSL_CTX *);
-void SSL_CTX_set_cert_store(SSL_CTX *,X509_STORE *);
-int SSL_want(const SSL *s);
-int	SSL_clear(SSL *s);
-
-void	SSL_CTX_flush_sessions(SSL_CTX *ctx,long tm);
-
-const SSL_CIPHER *SSL_get_current_cipher(const SSL *s);
-int	SSL_CIPHER_get_bits(const SSL_CIPHER *c,int *alg_bits);
-char *	SSL_CIPHER_get_version(const SSL_CIPHER *c);
-const char *	SSL_CIPHER_get_name(const SSL_CIPHER *c);
-
-int	SSL_get_fd(const SSL *s);
-int	SSL_get_rfd(const SSL *s);
-int	SSL_get_wfd(const SSL *s);
-const char  * SSL_get_cipher_list(const SSL *s,int n);
-char *	SSL_get_shared_ciphers(const SSL *s, char *buf, int len);
-int	SSL_get_read_ahead(const SSL * s);
-int	SSL_pending(const SSL *s);
-#ifndef OPENSSL_NO_SOCK
-int	SSL_set_fd(SSL *s, int fd);
-int	SSL_set_rfd(SSL *s, int fd);
-int	SSL_set_wfd(SSL *s, int fd);
-#endif
-#ifndef OPENSSL_NO_BIO
-void	SSL_set_bio(SSL *s, BIO *rbio,BIO *wbio);
-BIO *	SSL_get_rbio(const SSL *s);
-BIO *	SSL_get_wbio(const SSL *s);
-#endif
-int	SSL_set_cipher_list(SSL *s, const char *str);
-void	SSL_set_read_ahead(SSL *s, int yes);
-int	SSL_get_verify_mode(const SSL *s);
-int	SSL_get_verify_depth(const SSL *s);
-int	(*SSL_get_verify_callback(const SSL *s))(int,X509_STORE_CTX *);
-void	SSL_set_verify(SSL *s, int mode,
-		       int (*callback)(int ok,X509_STORE_CTX *ctx));
-void	SSL_set_verify_depth(SSL *s, int depth);
-#ifndef OPENSSL_NO_RSA
-int	SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa);
-#endif
-int	SSL_use_RSAPrivateKey_ASN1(SSL *ssl, unsigned char *d, long len);
-int	SSL_use_PrivateKey(SSL *ssl, EVP_PKEY *pkey);
-int	SSL_use_PrivateKey_ASN1(int pk,SSL *ssl, const unsigned char *d, long len);
-int	SSL_use_certificate(SSL *ssl, X509 *x);
-int	SSL_use_certificate_ASN1(SSL *ssl, const unsigned char *d, int len);
-
-#ifndef OPENSSL_NO_STDIO
-int	SSL_use_RSAPrivateKey_file(SSL *ssl, const char *file, int type);
-int	SSL_use_PrivateKey_file(SSL *ssl, const char *file, int type);
-int	SSL_use_certificate_file(SSL *ssl, const char *file, int type);
-int	SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file, int type);
-int	SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type);
-int	SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file, int type);
-int	SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file); /* PEM type */
-STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file);
-int	SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs,
-					    const char *file);
-#ifndef OPENSSL_SYS_VMS
-#ifndef OPENSSL_SYS_MACINTOSH_CLASSIC /* XXXXX: Better scheme needed! [was: #ifndef MAC_OS_pre_X] */
-int	SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs,
-					   const char *dir);
-#endif
-#endif
-
-#endif
-
-void	SSL_load_error_strings(void );
-const char *SSL_state_string(const SSL *s);
-const char *SSL_rstate_string(const SSL *s);
-const char *SSL_state_string_long(const SSL *s);
-const char *SSL_rstate_string_long(const SSL *s);
-long	SSL_SESSION_get_time(const SSL_SESSION *s);
-long	SSL_SESSION_set_time(SSL_SESSION *s, long t);
-long	SSL_SESSION_get_timeout(const SSL_SESSION *s);
-long	SSL_SESSION_set_timeout(SSL_SESSION *s, long t);
-void	SSL_copy_session_id(SSL *to,const SSL *from);
-
-SSL_SESSION *SSL_SESSION_new(void);
-const unsigned char *SSL_SESSION_get_id(const SSL_SESSION *s,
-					unsigned int *len);
-#ifndef OPENSSL_NO_FP_API
-int	SSL_SESSION_print_fp(FILE *fp,const SSL_SESSION *ses);
-#endif
-#ifndef OPENSSL_NO_BIO
-int	SSL_SESSION_print(BIO *fp,const SSL_SESSION *ses);
-#endif
-void	SSL_SESSION_free(SSL_SESSION *ses);
-int	i2d_SSL_SESSION(SSL_SESSION *in,unsigned char **pp);
-int	SSL_set_session(SSL *to, SSL_SESSION *session);
-int	SSL_CTX_add_session(SSL_CTX *s, SSL_SESSION *c);
-int	SSL_CTX_remove_session(SSL_CTX *,SSL_SESSION *c);
-int	SSL_CTX_set_generate_session_id(SSL_CTX *, GEN_SESSION_CB);
-int	SSL_set_generate_session_id(SSL *, GEN_SESSION_CB);
-int	SSL_has_matching_session_id(const SSL *ssl, const unsigned char *id,
-					unsigned int id_len);
-SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a,const unsigned char **pp,
-			     long length);
-
-#ifdef HEADER_X509_H
-X509 *	SSL_get_peer_certificate(const SSL *s);
-#endif
-
-STACK_OF(X509) *SSL_get_peer_cert_chain(const SSL *s);
-
-int SSL_CTX_get_verify_mode(const SSL_CTX *ctx);
-int SSL_CTX_get_verify_depth(const SSL_CTX *ctx);
-int (*SSL_CTX_get_verify_callback(const SSL_CTX *ctx))(int,X509_STORE_CTX *);
-void SSL_CTX_set_verify(SSL_CTX *ctx,int mode,
-			int (*callback)(int, X509_STORE_CTX *));
-void SSL_CTX_set_verify_depth(SSL_CTX *ctx,int depth);
-void SSL_CTX_set_cert_verify_callback(SSL_CTX *ctx, int (*cb)(X509_STORE_CTX *,void *), void *arg);
-#ifndef OPENSSL_NO_RSA
-int SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa);
-#endif
-int SSL_CTX_use_RSAPrivateKey_ASN1(SSL_CTX *ctx, const unsigned char *d, long len);
-int SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey);
-int SSL_CTX_use_PrivateKey_ASN1(int pk,SSL_CTX *ctx,
-	const unsigned char *d, long len);
-int SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x);
-int SSL_CTX_use_certificate_ASN1(SSL_CTX *ctx, int len, const unsigned char *d);
-
-void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb);
-void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX *ctx, void *u);
-
-int SSL_CTX_check_private_key(const SSL_CTX *ctx);
-int SSL_check_private_key(const SSL *ctx);
-
-int	SSL_CTX_set_session_id_context(SSL_CTX *ctx,const unsigned char *sid_ctx,
-				       unsigned int sid_ctx_len);
-
-SSL *	SSL_new(SSL_CTX *ctx);
-int	SSL_set_session_id_context(SSL *ssl,const unsigned char *sid_ctx,
-				   unsigned int sid_ctx_len);
-
-int SSL_CTX_set_purpose(SSL_CTX *s, int purpose);
-int SSL_set_purpose(SSL *s, int purpose);
-int SSL_CTX_set_trust(SSL_CTX *s, int trust);
-int SSL_set_trust(SSL *s, int trust);
-
-int SSL_CTX_set1_param(SSL_CTX *ctx, X509_VERIFY_PARAM *vpm);
-int SSL_set1_param(SSL *ssl, X509_VERIFY_PARAM *vpm);
-
-void	SSL_free(SSL *ssl);
-int 	SSL_accept(SSL *ssl);
-int 	SSL_connect(SSL *ssl);
-int 	SSL_read(SSL *ssl,void *buf,int num);
-int 	SSL_peek(SSL *ssl,void *buf,int num);
-int 	SSL_write(SSL *ssl,const void *buf,int num);
-long	SSL_ctrl(SSL *ssl,int cmd, long larg, void *parg);
-long	SSL_callback_ctrl(SSL *, int, void (*)(void));
-long	SSL_CTX_ctrl(SSL_CTX *ctx,int cmd, long larg, void *parg);
-long	SSL_CTX_callback_ctrl(SSL_CTX *, int, void (*)(void));
-
-int	SSL_get_error(const SSL *s,int ret_code);
-const char *SSL_get_version(const SSL *s);
-
-/* This sets the 'default' SSL version that SSL_new() will create */
-int SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *meth);
-
-#ifndef OPENSSL_NO_SSL2
-const SSL_METHOD *SSLv2_method(void);		/* SSLv2 */
-const SSL_METHOD *SSLv2_server_method(void);	/* SSLv2 */
-const SSL_METHOD *SSLv2_client_method(void);	/* SSLv2 */
-#endif
-
-const SSL_METHOD *SSLv3_method(void);		/* SSLv3 */
-const SSL_METHOD *SSLv3_server_method(void);	/* SSLv3 */
-const SSL_METHOD *SSLv3_client_method(void);	/* SSLv3 */
-
-const SSL_METHOD *SSLv23_method(void);	/* SSLv3 but can rollback to v2 */
-const SSL_METHOD *SSLv23_server_method(void);	/* SSLv3 but can rollback to v2 */
-const SSL_METHOD *SSLv23_client_method(void);	/* SSLv3 but can rollback to v2 */
-
-const SSL_METHOD *TLSv1_method(void);		/* TLSv1.0 */
-const SSL_METHOD *TLSv1_server_method(void);	/* TLSv1.0 */
-const SSL_METHOD *TLSv1_client_method(void);	/* TLSv1.0 */
-
-const SSL_METHOD *DTLSv1_method(void);		/* DTLSv1.0 */
-const SSL_METHOD *DTLSv1_server_method(void);	/* DTLSv1.0 */
-const SSL_METHOD *DTLSv1_client_method(void);	/* DTLSv1.0 */
-
-STACK_OF(SSL_CIPHER) *SSL_get_ciphers(const SSL *s);
-
-int SSL_do_handshake(SSL *s);
-int SSL_renegotiate(SSL *s);
-int SSL_renegotiate_pending(SSL *s);
-int SSL_shutdown(SSL *s);
-
-const SSL_METHOD *SSL_get_ssl_method(SSL *s);
-int SSL_set_ssl_method(SSL *s, const SSL_METHOD *method);
-const char *SSL_alert_type_string_long(int value);
-const char *SSL_alert_type_string(int value);
-const char *SSL_alert_desc_string_long(int value);
-const char *SSL_alert_desc_string(int value);
-
-void SSL_set_client_CA_list(SSL *s, STACK_OF(X509_NAME) *name_list);
-void SSL_CTX_set_client_CA_list(SSL_CTX *ctx, STACK_OF(X509_NAME) *name_list);
-STACK_OF(X509_NAME) *SSL_get_client_CA_list(const SSL *s);
-STACK_OF(X509_NAME) *SSL_CTX_get_client_CA_list(const SSL_CTX *s);
-int SSL_add_client_CA(SSL *ssl,X509 *x);
-int SSL_CTX_add_client_CA(SSL_CTX *ctx,X509 *x);
-
-void SSL_set_connect_state(SSL *s);
-void SSL_set_accept_state(SSL *s);
-
-long SSL_get_default_timeout(const SSL *s);
-
-int SSL_library_init(void );
-
-char *SSL_CIPHER_description(const SSL_CIPHER *,char *buf,int size);
-STACK_OF(X509_NAME) *SSL_dup_CA_list(STACK_OF(X509_NAME) *sk);
-
-SSL *SSL_dup(SSL *ssl);
-
-X509 *SSL_get_certificate(const SSL *ssl);
-/* EVP_PKEY */ struct evp_pkey_st *SSL_get_privatekey(SSL *ssl);
-
-void SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx,int mode);
-int SSL_CTX_get_quiet_shutdown(const SSL_CTX *ctx);
-void SSL_set_quiet_shutdown(SSL *ssl,int mode);
-int SSL_get_quiet_shutdown(const SSL *ssl);
-void SSL_set_shutdown(SSL *ssl,int mode);
-int SSL_get_shutdown(const SSL *ssl);
-int SSL_version(const SSL *ssl);
-int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx);
-int SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile,
-	const char *CApath);
-#define SSL_get0_session SSL_get_session /* just peek at pointer */
-SSL_SESSION *SSL_get_session(const SSL *ssl);
-SSL_SESSION *SSL_get1_session(SSL *ssl); /* obtain a reference count */
-SSL_CTX *SSL_get_SSL_CTX(const SSL *ssl);
-SSL_CTX *SSL_set_SSL_CTX(SSL *ssl, SSL_CTX* ctx);
-void SSL_set_info_callback(SSL *ssl,
-			   void (*cb)(const SSL *ssl,int type,int val));
-void (*SSL_get_info_callback(const SSL *ssl))(const SSL *ssl,int type,int val);
-int SSL_state(const SSL *ssl);
-
-void SSL_set_verify_result(SSL *ssl,long v);
-long SSL_get_verify_result(const SSL *ssl);
-
-int SSL_set_ex_data(SSL *ssl,int idx,void *data);
-void *SSL_get_ex_data(const SSL *ssl,int idx);
-int SSL_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
-	CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
-
-int SSL_SESSION_set_ex_data(SSL_SESSION *ss,int idx,void *data);
-void *SSL_SESSION_get_ex_data(const SSL_SESSION *ss,int idx);
-int SSL_SESSION_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
-	CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
-
-int SSL_CTX_set_ex_data(SSL_CTX *ssl,int idx,void *data);
-void *SSL_CTX_get_ex_data(const SSL_CTX *ssl,int idx);
-int SSL_CTX_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
-	CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
-
-int SSL_get_ex_data_X509_STORE_CTX_idx(void );
-
-#define SSL_CTX_sess_set_cache_size(ctx,t) \
-	SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SESS_CACHE_SIZE,t,NULL)
-#define SSL_CTX_sess_get_cache_size(ctx) \
-	SSL_CTX_ctrl(ctx,SSL_CTRL_GET_SESS_CACHE_SIZE,0,NULL)
-#define SSL_CTX_set_session_cache_mode(ctx,m) \
-	SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SESS_CACHE_MODE,m,NULL)
-#define SSL_CTX_get_session_cache_mode(ctx) \
-	SSL_CTX_ctrl(ctx,SSL_CTRL_GET_SESS_CACHE_MODE,0,NULL)
-
-#define SSL_CTX_get_default_read_ahead(ctx) SSL_CTX_get_read_ahead(ctx)
-#define SSL_CTX_set_default_read_ahead(ctx,m) SSL_CTX_set_read_ahead(ctx,m)
-#define SSL_CTX_get_read_ahead(ctx) \
-	SSL_CTX_ctrl(ctx,SSL_CTRL_GET_READ_AHEAD,0,NULL)
-#define SSL_CTX_set_read_ahead(ctx,m) \
-	SSL_CTX_ctrl(ctx,SSL_CTRL_SET_READ_AHEAD,m,NULL)
-#define SSL_CTX_get_max_cert_list(ctx) \
-	SSL_CTX_ctrl(ctx,SSL_CTRL_GET_MAX_CERT_LIST,0,NULL)
-#define SSL_CTX_set_max_cert_list(ctx,m) \
-	SSL_CTX_ctrl(ctx,SSL_CTRL_SET_MAX_CERT_LIST,m,NULL)
-#define SSL_get_max_cert_list(ssl) \
-	SSL_ctrl(ssl,SSL_CTRL_GET_MAX_CERT_LIST,0,NULL)
-#define SSL_set_max_cert_list(ssl,m) \
-	SSL_ctrl(ssl,SSL_CTRL_SET_MAX_CERT_LIST,m,NULL)
-
-#define SSL_CTX_set_max_send_fragment(ctx,m) \
-	SSL_CTX_ctrl(ctx,SSL_CTRL_SET_MAX_SEND_FRAGMENT,m,NULL)
-#define SSL_set_max_send_fragment(ssl,m) \
-	SSL_ctrl(ssl,SSL_CTRL_SET_MAX_SEND_FRAGMENT,m,NULL)
-
-     /* NB: the keylength is only applicable when is_export is true */
-#ifndef OPENSSL_NO_RSA
-void SSL_CTX_set_tmp_rsa_callback(SSL_CTX *ctx,
-				  RSA *(*cb)(SSL *ssl,int is_export,
-					     int keylength));
-
-void SSL_set_tmp_rsa_callback(SSL *ssl,
-				  RSA *(*cb)(SSL *ssl,int is_export,
-					     int keylength));
-#endif
-#ifndef OPENSSL_NO_DH
-void SSL_CTX_set_tmp_dh_callback(SSL_CTX *ctx,
-				 DH *(*dh)(SSL *ssl,int is_export,
-					   int keylength));
-void SSL_set_tmp_dh_callback(SSL *ssl,
-				 DH *(*dh)(SSL *ssl,int is_export,
-					   int keylength));
-#endif
-#ifndef OPENSSL_NO_ECDH
-void SSL_CTX_set_tmp_ecdh_callback(SSL_CTX *ctx,
-				 EC_KEY *(*ecdh)(SSL *ssl,int is_export,
-					   int keylength));
-void SSL_set_tmp_ecdh_callback(SSL *ssl,
-				 EC_KEY *(*ecdh)(SSL *ssl,int is_export,
-					   int keylength));
-#endif
-
-#ifndef OPENSSL_NO_COMP
-const COMP_METHOD *SSL_get_current_compression(SSL *s);
-const COMP_METHOD *SSL_get_current_expansion(SSL *s);
-const char *SSL_COMP_get_name(const COMP_METHOD *comp);
-STACK_OF(SSL_COMP) *SSL_COMP_get_compression_methods(void);
-int SSL_COMP_add_compression_method(int id,COMP_METHOD *cm);
-#else
-const void *SSL_get_current_compression(SSL *s);
-const void *SSL_get_current_expansion(SSL *s);
-const char *SSL_COMP_get_name(const void *comp);
-void *SSL_COMP_get_compression_methods(void);
-int SSL_COMP_add_compression_method(int id,void *cm);
-#endif
-
-/* TLS extensions functions */
-int SSL_set_session_ticket_ext(SSL *s, void *ext_data, int ext_len);
-
-int SSL_set_session_ticket_ext_cb(SSL *s, tls_session_ticket_ext_cb_fn cb,
-				  void *arg);
-
-/* Pre-shared secret session resumption functions */
-int SSL_set_session_secret_cb(SSL *s, tls_session_secret_cb_fn tls_session_secret_cb, void *arg);
-
-/* BEGIN ERROR CODES */
-/* The following lines are auto generated by the script mkerr.pl. Any changes
- * made after this point may be overwritten when the script is next run.
- */
-void ERR_load_SSL_strings(void);
-
-/* Error codes for the SSL functions. */
-
-/* Function codes. */
-#define SSL_F_CLIENT_CERTIFICATE			 100
-#define SSL_F_CLIENT_FINISHED				 167
-#define SSL_F_CLIENT_HELLO				 101
-#define SSL_F_CLIENT_MASTER_KEY				 102
-#define SSL_F_D2I_SSL_SESSION				 103
-#define SSL_F_DO_DTLS1_WRITE				 245
-#define SSL_F_DO_SSL3_WRITE				 104
-#define SSL_F_DTLS1_ACCEPT				 246
-#define SSL_F_DTLS1_ADD_CERT_TO_BUF			 295
-#define SSL_F_DTLS1_BUFFER_RECORD			 247
-#define SSL_F_DTLS1_CLIENT_HELLO			 248
-#define SSL_F_DTLS1_CONNECT				 249
-#define SSL_F_DTLS1_ENC					 250
-#define SSL_F_DTLS1_GET_HELLO_VERIFY			 251
-#define SSL_F_DTLS1_GET_MESSAGE				 252
-#define SSL_F_DTLS1_GET_MESSAGE_FRAGMENT		 253
-#define SSL_F_DTLS1_GET_RECORD				 254
-#define SSL_F_DTLS1_HANDLE_TIMEOUT			 297
-#define SSL_F_DTLS1_OUTPUT_CERT_CHAIN			 255
-#define SSL_F_DTLS1_PREPROCESS_FRAGMENT			 288
-#define SSL_F_DTLS1_PROCESS_OUT_OF_SEQ_MESSAGE		 256
-#define SSL_F_DTLS1_PROCESS_RECORD			 257
-#define SSL_F_DTLS1_READ_BYTES				 258
-#define SSL_F_DTLS1_READ_FAILED				 259
-#define SSL_F_DTLS1_SEND_CERTIFICATE_REQUEST		 260
-#define SSL_F_DTLS1_SEND_CLIENT_CERTIFICATE		 261
-#define SSL_F_DTLS1_SEND_CLIENT_KEY_EXCHANGE		 262
-#define SSL_F_DTLS1_SEND_CLIENT_VERIFY			 263
-#define SSL_F_DTLS1_SEND_HELLO_VERIFY_REQUEST		 264
-#define SSL_F_DTLS1_SEND_SERVER_CERTIFICATE		 265
-#define SSL_F_DTLS1_SEND_SERVER_HELLO			 266
-#define SSL_F_DTLS1_SEND_SERVER_KEY_EXCHANGE		 267
-#define SSL_F_DTLS1_WRITE_APP_DATA_BYTES		 268
-#define SSL_F_GET_CLIENT_FINISHED			 105
-#define SSL_F_GET_CLIENT_HELLO				 106
-#define SSL_F_GET_CLIENT_MASTER_KEY			 107
-#define SSL_F_GET_SERVER_FINISHED			 108
-#define SSL_F_GET_SERVER_HELLO				 109
-#define SSL_F_GET_SERVER_VERIFY				 110
-#define SSL_F_I2D_SSL_SESSION				 111
-#define SSL_F_READ_N					 112
-#define SSL_F_REQUEST_CERTIFICATE			 113
-#define SSL_F_SERVER_FINISH				 239
-#define SSL_F_SERVER_HELLO				 114
-#define SSL_F_SERVER_VERIFY				 240
-#define SSL_F_SSL23_ACCEPT				 115
-#define SSL_F_SSL23_CLIENT_HELLO			 116
-#define SSL_F_SSL23_CONNECT				 117
-#define SSL_F_SSL23_GET_CLIENT_HELLO			 118
-#define SSL_F_SSL23_GET_SERVER_HELLO			 119
-#define SSL_F_SSL23_PEEK				 237
-#define SSL_F_SSL23_READ				 120
-#define SSL_F_SSL23_WRITE				 121
-#define SSL_F_SSL2_ACCEPT				 122
-#define SSL_F_SSL2_CONNECT				 123
-#define SSL_F_SSL2_ENC_INIT				 124
-#define SSL_F_SSL2_GENERATE_KEY_MATERIAL		 241
-#define SSL_F_SSL2_PEEK					 234
-#define SSL_F_SSL2_READ					 125
-#define SSL_F_SSL2_READ_INTERNAL			 236
-#define SSL_F_SSL2_SET_CERTIFICATE			 126
-#define SSL_F_SSL2_WRITE				 127
-#define SSL_F_SSL3_ACCEPT				 128
-#define SSL_F_SSL3_ADD_CERT_TO_BUF			 296
-#define SSL_F_SSL3_CALLBACK_CTRL			 233
-#define SSL_F_SSL3_CHANGE_CIPHER_STATE			 129
-#define SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM		 130
-#define SSL_F_SSL3_CLIENT_HELLO				 131
-#define SSL_F_SSL3_CONNECT				 132
-#define SSL_F_SSL3_CTRL					 213
-#define SSL_F_SSL3_CTX_CTRL				 133
-#define SSL_F_SSL3_DIGEST_CACHED_RECORDS		 293
-#define SSL_F_SSL3_DO_CHANGE_CIPHER_SPEC		 292
-#define SSL_F_SSL3_ENC					 134
-#define SSL_F_SSL3_GENERATE_KEY_BLOCK			 238
-#define SSL_F_SSL3_GET_CERTIFICATE_REQUEST		 135
-#define SSL_F_SSL3_GET_CERT_STATUS			 289
-#define SSL_F_SSL3_GET_CERT_VERIFY			 136
-#define SSL_F_SSL3_GET_CLIENT_CERTIFICATE		 137
-#define SSL_F_SSL3_GET_CLIENT_HELLO			 138
-#define SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE		 139
-#define SSL_F_SSL3_GET_FINISHED				 140
-#define SSL_F_SSL3_GET_KEY_EXCHANGE			 141
-#define SSL_F_SSL3_GET_MESSAGE				 142
-#define SSL_F_SSL3_GET_NEW_SESSION_TICKET		 283
-#define SSL_F_SSL3_GET_RECORD				 143
-#define SSL_F_SSL3_GET_SERVER_CERTIFICATE		 144
-#define SSL_F_SSL3_GET_SERVER_DONE			 145
-#define SSL_F_SSL3_GET_SERVER_HELLO			 146
-#define SSL_F_SSL3_HANDSHAKE_MAC			 285
-#define SSL_F_SSL3_NEW_SESSION_TICKET			 287
-#define SSL_F_SSL3_OUTPUT_CERT_CHAIN			 147
-#define SSL_F_SSL3_PEEK					 235
-#define SSL_F_SSL3_READ_BYTES				 148
-#define SSL_F_SSL3_READ_N				 149
-#define SSL_F_SSL3_SEND_CERTIFICATE_REQUEST		 150
-#define SSL_F_SSL3_SEND_CLIENT_CERTIFICATE		 151
-#define SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE		 152
-#define SSL_F_SSL3_SEND_CLIENT_VERIFY			 153
-#define SSL_F_SSL3_SEND_SERVER_CERTIFICATE		 154
-#define SSL_F_SSL3_SEND_SERVER_HELLO			 242
-#define SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE		 155
-#define SSL_F_SSL3_SETUP_KEY_BLOCK			 157
-#define SSL_F_SSL3_SETUP_READ_BUFFER			 156
-#define SSL_F_SSL3_SETUP_WRITE_BUFFER			 291
-#define SSL_F_SSL3_WRITE_BYTES				 158
-#define SSL_F_SSL3_WRITE_PENDING			 159
-#define SSL_F_SSL_ADD_CLIENTHELLO_RENEGOTIATE_EXT	 298
-#define SSL_F_SSL_ADD_CLIENTHELLO_TLSEXT		 277
-#define SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK	 215
-#define SSL_F_SSL_ADD_FILE_CERT_SUBJECTS_TO_STACK	 216
-#define SSL_F_SSL_ADD_SERVERHELLO_RENEGOTIATE_EXT	 299
-#define SSL_F_SSL_ADD_SERVERHELLO_TLSEXT		 278
-#define SSL_F_SSL_BAD_METHOD				 160
-#define SSL_F_SSL_BYTES_TO_CIPHER_LIST			 161
-#define SSL_F_SSL_CERT_DUP				 221
-#define SSL_F_SSL_CERT_INST				 222
-#define SSL_F_SSL_CERT_INSTANTIATE			 214
-#define SSL_F_SSL_CERT_NEW				 162
-#define SSL_F_SSL_CHECK_PRIVATE_KEY			 163
-#define SSL_F_SSL_CHECK_SERVERHELLO_TLSEXT		 280
-#define SSL_F_SSL_CHECK_SRVR_ECC_CERT_AND_ALG		 279
-#define SSL_F_SSL_CIPHER_PROCESS_RULESTR		 230
-#define SSL_F_SSL_CIPHER_STRENGTH_SORT			 231
-#define SSL_F_SSL_CLEAR					 164
-#define SSL_F_SSL_COMP_ADD_COMPRESSION_METHOD		 165
-#define SSL_F_SSL_CREATE_CIPHER_LIST			 166
-#define SSL_F_SSL_CTRL					 232
-#define SSL_F_SSL_CTX_CHECK_PRIVATE_KEY			 168
-#define SSL_F_SSL_CTX_NEW				 169
-#define SSL_F_SSL_CTX_SET_CIPHER_LIST			 269
-#define SSL_F_SSL_CTX_SET_CLIENT_CERT_ENGINE		 290
-#define SSL_F_SSL_CTX_SET_PURPOSE			 226
-#define SSL_F_SSL_CTX_SET_SESSION_ID_CONTEXT		 219
-#define SSL_F_SSL_CTX_SET_SSL_VERSION			 170
-#define SSL_F_SSL_CTX_SET_TRUST				 229
-#define SSL_F_SSL_CTX_USE_CERTIFICATE			 171
-#define SSL_F_SSL_CTX_USE_CERTIFICATE_ASN1		 172
-#define SSL_F_SSL_CTX_USE_CERTIFICATE_CHAIN_FILE	 220
-#define SSL_F_SSL_CTX_USE_CERTIFICATE_FILE		 173
-#define SSL_F_SSL_CTX_USE_PRIVATEKEY			 174
-#define SSL_F_SSL_CTX_USE_PRIVATEKEY_ASN1		 175
-#define SSL_F_SSL_CTX_USE_PRIVATEKEY_FILE		 176
-#define SSL_F_SSL_CTX_USE_PSK_IDENTITY_HINT		 272
-#define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY			 177
-#define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_ASN1		 178
-#define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_FILE		 179
-#define SSL_F_SSL_DO_HANDSHAKE				 180
-#define SSL_F_SSL_GET_NEW_SESSION			 181
-#define SSL_F_SSL_GET_PREV_SESSION			 217
-#define SSL_F_SSL_GET_SERVER_SEND_CERT			 182
-#define SSL_F_SSL_GET_SIGN_PKEY				 183
-#define SSL_F_SSL_INIT_WBIO_BUFFER			 184
-#define SSL_F_SSL_LOAD_CLIENT_CA_FILE			 185
-#define SSL_F_SSL_NEW					 186
-#define SSL_F_SSL_PARSE_CLIENTHELLO_RENEGOTIATE_EXT	 300
-#define SSL_F_SSL_PARSE_CLIENTHELLO_TLSEXT		 302
-#define SSL_F_SSL_PARSE_SERVERHELLO_RENEGOTIATE_EXT	 301
-#define SSL_F_SSL_PARSE_SERVERHELLO_TLSEXT		 303
-#define SSL_F_SSL_PEEK					 270
-#define SSL_F_SSL_PREPARE_CLIENTHELLO_TLSEXT		 281
-#define SSL_F_SSL_PREPARE_SERVERHELLO_TLSEXT		 282
-#define SSL_F_SSL_READ					 223
-#define SSL_F_SSL_RSA_PRIVATE_DECRYPT			 187
-#define SSL_F_SSL_RSA_PUBLIC_ENCRYPT			 188
-#define SSL_F_SSL_SESSION_NEW				 189
-#define SSL_F_SSL_SESSION_PRINT_FP			 190
-#define SSL_F_SSL_SESS_CERT_NEW				 225
-#define SSL_F_SSL_SET_CERT				 191
-#define SSL_F_SSL_SET_CIPHER_LIST			 271
-#define SSL_F_SSL_SET_FD				 192
-#define SSL_F_SSL_SET_PKEY				 193
-#define SSL_F_SSL_SET_PURPOSE				 227
-#define SSL_F_SSL_SET_RFD				 194
-#define SSL_F_SSL_SET_SESSION				 195
-#define SSL_F_SSL_SET_SESSION_ID_CONTEXT		 218
-#define SSL_F_SSL_SET_SESSION_TICKET_EXT		 294
-#define SSL_F_SSL_SET_TRUST				 228
-#define SSL_F_SSL_SET_WFD				 196
-#define SSL_F_SSL_SHUTDOWN				 224
-#define SSL_F_SSL_UNDEFINED_CONST_FUNCTION		 243
-#define SSL_F_SSL_UNDEFINED_FUNCTION			 197
-#define SSL_F_SSL_UNDEFINED_VOID_FUNCTION		 244
-#define SSL_F_SSL_USE_CERTIFICATE			 198
-#define SSL_F_SSL_USE_CERTIFICATE_ASN1			 199
-#define SSL_F_SSL_USE_CERTIFICATE_FILE			 200
-#define SSL_F_SSL_USE_PRIVATEKEY			 201
-#define SSL_F_SSL_USE_PRIVATEKEY_ASN1			 202
-#define SSL_F_SSL_USE_PRIVATEKEY_FILE			 203
-#define SSL_F_SSL_USE_PSK_IDENTITY_HINT			 273
-#define SSL_F_SSL_USE_RSAPRIVATEKEY			 204
-#define SSL_F_SSL_USE_RSAPRIVATEKEY_ASN1		 205
-#define SSL_F_SSL_USE_RSAPRIVATEKEY_FILE		 206
-#define SSL_F_SSL_VERIFY_CERT_CHAIN			 207
-#define SSL_F_SSL_WRITE					 208
-#define SSL_F_TLS1_CERT_VERIFY_MAC			 286
-#define SSL_F_TLS1_CHANGE_CIPHER_STATE			 209
-#define SSL_F_TLS1_CHECK_SERVERHELLO_TLSEXT		 274
-#define SSL_F_TLS1_ENC					 210
-#define SSL_F_TLS1_PREPARE_CLIENTHELLO_TLSEXT		 275
-#define SSL_F_TLS1_PREPARE_SERVERHELLO_TLSEXT		 276
-#define SSL_F_TLS1_PRF					 284
-#define SSL_F_TLS1_SETUP_KEY_BLOCK			 211
-#define SSL_F_WRITE_PENDING				 212
-
-/* Reason codes. */
-#define SSL_R_APP_DATA_IN_HANDSHAKE			 100
-#define SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT 272
-#define SSL_R_BAD_ALERT_RECORD				 101
-#define SSL_R_BAD_AUTHENTICATION_TYPE			 102
-#define SSL_R_BAD_CHANGE_CIPHER_SPEC			 103
-#define SSL_R_BAD_CHECKSUM				 104
-#define SSL_R_BAD_DATA_RETURNED_BY_CALLBACK		 106
-#define SSL_R_BAD_DECOMPRESSION				 107
-#define SSL_R_BAD_DH_G_LENGTH				 108
-#define SSL_R_BAD_DH_PUB_KEY_LENGTH			 109
-#define SSL_R_BAD_DH_P_LENGTH				 110
-#define SSL_R_BAD_DIGEST_LENGTH				 111
-#define SSL_R_BAD_DSA_SIGNATURE				 112
-#define SSL_R_BAD_ECC_CERT				 304
-#define SSL_R_BAD_ECDSA_SIGNATURE			 305
-#define SSL_R_BAD_ECPOINT				 306
-#define SSL_R_BAD_HANDSHAKE_LENGTH			 332
-#define SSL_R_BAD_HELLO_REQUEST				 105
-#define SSL_R_BAD_LENGTH				 271
-#define SSL_R_BAD_MAC_DECODE				 113
-#define SSL_R_BAD_MAC_LENGTH				 333
-#define SSL_R_BAD_MESSAGE_TYPE				 114
-#define SSL_R_BAD_PACKET_LENGTH				 115
-#define SSL_R_BAD_PROTOCOL_VERSION_NUMBER		 116
-#define SSL_R_BAD_PSK_IDENTITY_HINT_LENGTH		 316
-#define SSL_R_BAD_RESPONSE_ARGUMENT			 117
-#define SSL_R_BAD_RSA_DECRYPT				 118
-#define SSL_R_BAD_RSA_ENCRYPT				 119
-#define SSL_R_BAD_RSA_E_LENGTH				 120
-#define SSL_R_BAD_RSA_MODULUS_LENGTH			 121
-#define SSL_R_BAD_RSA_SIGNATURE				 122
-#define SSL_R_BAD_SIGNATURE				 123
-#define SSL_R_BAD_SSL_FILETYPE				 124
-#define SSL_R_BAD_SSL_SESSION_ID_LENGTH			 125
-#define SSL_R_BAD_STATE					 126
-#define SSL_R_BAD_WRITE_RETRY				 127
-#define SSL_R_BIO_NOT_SET				 128
-#define SSL_R_BLOCK_CIPHER_PAD_IS_WRONG			 129
-#define SSL_R_BN_LIB					 130
-#define SSL_R_CA_DN_LENGTH_MISMATCH			 131
-#define SSL_R_CA_DN_TOO_LONG				 132
-#define SSL_R_CCS_RECEIVED_EARLY			 133
-#define SSL_R_CERTIFICATE_VERIFY_FAILED			 134
-#define SSL_R_CERT_LENGTH_MISMATCH			 135
-#define SSL_R_CHALLENGE_IS_DIFFERENT			 136
-#define SSL_R_CIPHER_CODE_WRONG_LENGTH			 137
-#define SSL_R_CIPHER_OR_HASH_UNAVAILABLE		 138
-#define SSL_R_CIPHER_TABLE_SRC_ERROR			 139
-#define SSL_R_CLIENTHELLO_TLSEXT			 226
-#define SSL_R_COMPRESSED_LENGTH_TOO_LONG		 140
-#define SSL_R_COMPRESSION_DISABLED			 343
-#define SSL_R_COMPRESSION_FAILURE			 141
-#define SSL_R_COMPRESSION_ID_NOT_WITHIN_PRIVATE_RANGE	 307
-#define SSL_R_COMPRESSION_LIBRARY_ERROR			 142
-#define SSL_R_CONNECTION_ID_IS_DIFFERENT		 143
-#define SSL_R_CONNECTION_TYPE_NOT_SET			 144
-#define SSL_R_COOKIE_MISMATCH				 308
-#define SSL_R_DATA_BETWEEN_CCS_AND_FINISHED		 145
-#define SSL_R_DATA_LENGTH_TOO_LONG			 146
-#define SSL_R_DECRYPTION_FAILED				 147
-#define SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC	 281
-#define SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG		 148
-#define SSL_R_DIGEST_CHECK_FAILED			 149
-#define SSL_R_DTLS_MESSAGE_TOO_BIG			 334
-#define SSL_R_DUPLICATE_COMPRESSION_ID			 309
-#define SSL_R_ECC_CERT_NOT_FOR_KEY_AGREEMENT		 317
-#define SSL_R_ECC_CERT_NOT_FOR_SIGNING			 318
-#define SSL_R_ECC_CERT_SHOULD_HAVE_RSA_SIGNATURE	 322
-#define SSL_R_ECC_CERT_SHOULD_HAVE_SHA1_SIGNATURE	 323
-#define SSL_R_ECGROUP_TOO_LARGE_FOR_CIPHER		 310
-#define SSL_R_ENCRYPTED_LENGTH_TOO_LONG			 150
-#define SSL_R_ERROR_GENERATING_TMP_RSA_KEY		 282
-#define SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST		 151
-#define SSL_R_EXCESSIVE_MESSAGE_SIZE			 152
-#define SSL_R_EXTRA_DATA_IN_MESSAGE			 153
-#define SSL_R_GOT_A_FIN_BEFORE_A_CCS			 154
-#define SSL_R_HTTPS_PROXY_REQUEST			 155
-#define SSL_R_HTTP_REQUEST				 156
-#define SSL_R_ILLEGAL_PADDING				 283
-#define SSL_R_INCONSISTENT_COMPRESSION			 340
-#define SSL_R_INVALID_CHALLENGE_LENGTH			 158
-#define SSL_R_INVALID_COMMAND				 280
-#define SSL_R_INVALID_COMPRESSION_ALGORITHM		 341
-#define SSL_R_INVALID_PURPOSE				 278
-#define SSL_R_INVALID_STATUS_RESPONSE			 328
-#define SSL_R_INVALID_TICKET_KEYS_LENGTH		 325
-#define SSL_R_INVALID_TRUST				 279
-#define SSL_R_KEY_ARG_TOO_LONG				 284
-#define SSL_R_KRB5					 285
-#define SSL_R_KRB5_C_CC_PRINC				 286
-#define SSL_R_KRB5_C_GET_CRED				 287
-#define SSL_R_KRB5_C_INIT				 288
-#define SSL_R_KRB5_C_MK_REQ				 289
-#define SSL_R_KRB5_S_BAD_TICKET				 290
-#define SSL_R_KRB5_S_INIT				 291
-#define SSL_R_KRB5_S_RD_REQ				 292
-#define SSL_R_KRB5_S_TKT_EXPIRED			 293
-#define SSL_R_KRB5_S_TKT_NYV				 294
-#define SSL_R_KRB5_S_TKT_SKEW				 295
-#define SSL_R_LENGTH_MISMATCH				 159
-#define SSL_R_LENGTH_TOO_SHORT				 160
-#define SSL_R_LIBRARY_BUG				 274
-#define SSL_R_LIBRARY_HAS_NO_CIPHERS			 161
-#define SSL_R_MESSAGE_TOO_LONG				 296
-#define SSL_R_MISSING_DH_DSA_CERT			 162
-#define SSL_R_MISSING_DH_KEY				 163
-#define SSL_R_MISSING_DH_RSA_CERT			 164
-#define SSL_R_MISSING_DSA_SIGNING_CERT			 165
-#define SSL_R_MISSING_EXPORT_TMP_DH_KEY			 166
-#define SSL_R_MISSING_EXPORT_TMP_RSA_KEY		 167
-#define SSL_R_MISSING_RSA_CERTIFICATE			 168
-#define SSL_R_MISSING_RSA_ENCRYPTING_CERT		 169
-#define SSL_R_MISSING_RSA_SIGNING_CERT			 170
-#define SSL_R_MISSING_TMP_DH_KEY			 171
-#define SSL_R_MISSING_TMP_ECDH_KEY			 311
-#define SSL_R_MISSING_TMP_RSA_KEY			 172
-#define SSL_R_MISSING_TMP_RSA_PKEY			 173
-#define SSL_R_MISSING_VERIFY_MESSAGE			 174
-#define SSL_R_NON_SSLV2_INITIAL_PACKET			 175
-#define SSL_R_NO_CERTIFICATES_RETURNED			 176
-#define SSL_R_NO_CERTIFICATE_ASSIGNED			 177
-#define SSL_R_NO_CERTIFICATE_RETURNED			 178
-#define SSL_R_NO_CERTIFICATE_SET			 179
-#define SSL_R_NO_CERTIFICATE_SPECIFIED			 180
-#define SSL_R_NO_CIPHERS_AVAILABLE			 181
-#define SSL_R_NO_CIPHERS_PASSED				 182
-#define SSL_R_NO_CIPHERS_SPECIFIED			 183
-#define SSL_R_NO_CIPHER_LIST				 184
-#define SSL_R_NO_CIPHER_MATCH				 185
-#define SSL_R_NO_CLIENT_CERT_METHOD			 331
-#define SSL_R_NO_CLIENT_CERT_RECEIVED			 186
-#define SSL_R_NO_COMPRESSION_SPECIFIED			 187
-#define SSL_R_NO_GOST_CERTIFICATE_SENT_BY_PEER		 330
-#define SSL_R_NO_METHOD_SPECIFIED			 188
-#define SSL_R_NO_PRIVATEKEY				 189
-#define SSL_R_NO_PRIVATE_KEY_ASSIGNED			 190
-#define SSL_R_NO_PROTOCOLS_AVAILABLE			 191
-#define SSL_R_NO_PUBLICKEY				 192
-#define SSL_R_NO_RENEGOTIATION				 339
-#define SSL_R_NO_REQUIRED_DIGEST			 324
-#define SSL_R_NO_SHARED_CIPHER				 193
-#define SSL_R_NO_VERIFY_CALLBACK			 194
-#define SSL_R_NULL_SSL_CTX				 195
-#define SSL_R_NULL_SSL_METHOD_PASSED			 196
-#define SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED		 197
-#define SSL_R_OLD_SESSION_COMPRESSION_ALGORITHM_NOT_RETURNED 344
-#define SSL_R_ONLY_TLS_ALLOWED_IN_FIPS_MODE		 297
-#define SSL_R_OPAQUE_PRF_INPUT_TOO_LONG			 327
-#define SSL_R_PACKET_LENGTH_TOO_LONG			 198
-#define SSL_R_PARSE_TLSEXT				 227
-#define SSL_R_PATH_TOO_LONG				 270
-#define SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE		 199
-#define SSL_R_PEER_ERROR				 200
-#define SSL_R_PEER_ERROR_CERTIFICATE			 201
-#define SSL_R_PEER_ERROR_NO_CERTIFICATE			 202
-#define SSL_R_PEER_ERROR_NO_CIPHER			 203
-#define SSL_R_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE	 204
-#define SSL_R_PRE_MAC_LENGTH_TOO_LONG			 205
-#define SSL_R_PROBLEMS_MAPPING_CIPHER_FUNCTIONS		 206
-#define SSL_R_PROTOCOL_IS_SHUTDOWN			 207
-#define SSL_R_PSK_IDENTITY_NOT_FOUND			 223
-#define SSL_R_PSK_NO_CLIENT_CB				 224
-#define SSL_R_PSK_NO_SERVER_CB				 225
-#define SSL_R_PUBLIC_KEY_ENCRYPT_ERROR			 208
-#define SSL_R_PUBLIC_KEY_IS_NOT_RSA			 209
-#define SSL_R_PUBLIC_KEY_NOT_RSA			 210
-#define SSL_R_READ_BIO_NOT_SET				 211
-#define SSL_R_READ_TIMEOUT_EXPIRED			 312
-#define SSL_R_READ_WRONG_PACKET_TYPE			 212
-#define SSL_R_RECORD_LENGTH_MISMATCH			 213
-#define SSL_R_RECORD_TOO_LARGE				 214
-#define SSL_R_RECORD_TOO_SMALL				 298
-#define SSL_R_RENEGOTIATE_EXT_TOO_LONG			 335
-#define SSL_R_RENEGOTIATION_ENCODING_ERR		 336
-#define SSL_R_RENEGOTIATION_MISMATCH			 337
-#define SSL_R_REQUIRED_CIPHER_MISSING			 215
-#define SSL_R_REQUIRED_COMPRESSSION_ALGORITHM_MISSING	 342
-#define SSL_R_REUSE_CERT_LENGTH_NOT_ZERO		 216
-#define SSL_R_REUSE_CERT_TYPE_NOT_ZERO			 217
-#define SSL_R_REUSE_CIPHER_LIST_NOT_ZERO		 218
-#define SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING		 345
-#define SSL_R_SERVERHELLO_TLSEXT			 275
-#define SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED		 277
-#define SSL_R_SHORT_READ				 219
-#define SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE	 220
-#define SSL_R_SSL23_DOING_SESSION_ID_REUSE		 221
-#define SSL_R_SSL2_CONNECTION_ID_TOO_LONG		 299
-#define SSL_R_SSL3_EXT_INVALID_ECPOINTFORMAT		 321
-#define SSL_R_SSL3_EXT_INVALID_SERVERNAME		 319
-#define SSL_R_SSL3_EXT_INVALID_SERVERNAME_TYPE		 320
-#define SSL_R_SSL3_SESSION_ID_TOO_LONG			 300
-#define SSL_R_SSL3_SESSION_ID_TOO_SHORT			 222
-#define SSL_R_SSLV3_ALERT_BAD_CERTIFICATE		 1042
-#define SSL_R_SSLV3_ALERT_BAD_RECORD_MAC		 1020
-#define SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED		 1045
-#define SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED		 1044
-#define SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN		 1046
-#define SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE		 1030
-#define SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE		 1040
-#define SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER		 1047
-#define SSL_R_SSLV3_ALERT_NO_CERTIFICATE		 1041
-#define SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE		 1010
-#define SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE	 1043
-#define SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION	 228
-#define SSL_R_SSL_HANDSHAKE_FAILURE			 229
-#define SSL_R_SSL_LIBRARY_HAS_NO_CIPHERS		 230
-#define SSL_R_SSL_SESSION_ID_CALLBACK_FAILED		 301
-#define SSL_R_SSL_SESSION_ID_CONFLICT			 302
-#define SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG		 273
-#define SSL_R_SSL_SESSION_ID_HAS_BAD_LENGTH		 303
-#define SSL_R_SSL_SESSION_ID_IS_DIFFERENT		 231
-#define SSL_R_TLSV1_ALERT_ACCESS_DENIED			 1049
-#define SSL_R_TLSV1_ALERT_DECODE_ERROR			 1050
-#define SSL_R_TLSV1_ALERT_DECRYPTION_FAILED		 1021
-#define SSL_R_TLSV1_ALERT_DECRYPT_ERROR			 1051
-#define SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION		 1060
-#define SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY		 1071
-#define SSL_R_TLSV1_ALERT_INTERNAL_ERROR		 1080
-#define SSL_R_TLSV1_ALERT_NO_RENEGOTIATION		 1100
-#define SSL_R_TLSV1_ALERT_PROTOCOL_VERSION		 1070
-#define SSL_R_TLSV1_ALERT_RECORD_OVERFLOW		 1022
-#define SSL_R_TLSV1_ALERT_UNKNOWN_CA			 1048
-#define SSL_R_TLSV1_ALERT_USER_CANCELLED		 1090
-#define SSL_R_TLSV1_BAD_CERTIFICATE_HASH_VALUE		 1114
-#define SSL_R_TLSV1_BAD_CERTIFICATE_STATUS_RESPONSE	 1113
-#define SSL_R_TLSV1_CERTIFICATE_UNOBTAINABLE		 1111
-#define SSL_R_TLSV1_UNRECOGNIZED_NAME			 1112
-#define SSL_R_TLSV1_UNSUPPORTED_EXTENSION		 1110
-#define SSL_R_TLS_CLIENT_CERT_REQ_WITH_ANON_CIPHER	 232
-#define SSL_R_TLS_INVALID_ECPOINTFORMAT_LIST		 157
-#define SSL_R_TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST 233
-#define SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG	 234
-#define SSL_R_TRIED_TO_USE_UNSUPPORTED_CIPHER		 235
-#define SSL_R_UNABLE_TO_DECODE_DH_CERTS			 236
-#define SSL_R_UNABLE_TO_DECODE_ECDH_CERTS		 313
-#define SSL_R_UNABLE_TO_EXTRACT_PUBLIC_KEY		 237
-#define SSL_R_UNABLE_TO_FIND_DH_PARAMETERS		 238
-#define SSL_R_UNABLE_TO_FIND_ECDH_PARAMETERS		 314
-#define SSL_R_UNABLE_TO_FIND_PUBLIC_KEY_PARAMETERS	 239
-#define SSL_R_UNABLE_TO_FIND_SSL_METHOD			 240
-#define SSL_R_UNABLE_TO_LOAD_SSL2_MD5_ROUTINES		 241
-#define SSL_R_UNABLE_TO_LOAD_SSL3_MD5_ROUTINES		 242
-#define SSL_R_UNABLE_TO_LOAD_SSL3_SHA1_ROUTINES		 243
-#define SSL_R_UNEXPECTED_MESSAGE			 244
-#define SSL_R_UNEXPECTED_RECORD				 245
-#define SSL_R_UNINITIALIZED				 276
-#define SSL_R_UNKNOWN_ALERT_TYPE			 246
-#define SSL_R_UNKNOWN_CERTIFICATE_TYPE			 247
-#define SSL_R_UNKNOWN_CIPHER_RETURNED			 248
-#define SSL_R_UNKNOWN_CIPHER_TYPE			 249
-#define SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE			 250
-#define SSL_R_UNKNOWN_PKEY_TYPE				 251
-#define SSL_R_UNKNOWN_PROTOCOL				 252
-#define SSL_R_UNKNOWN_REMOTE_ERROR_TYPE			 253
-#define SSL_R_UNKNOWN_SSL_VERSION			 254
-#define SSL_R_UNKNOWN_STATE				 255
-#define SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED	 338
-#define SSL_R_UNSUPPORTED_CIPHER			 256
-#define SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM		 257
-#define SSL_R_UNSUPPORTED_DIGEST_TYPE			 326
-#define SSL_R_UNSUPPORTED_ELLIPTIC_CURVE		 315
-#define SSL_R_UNSUPPORTED_PROTOCOL			 258
-#define SSL_R_UNSUPPORTED_SSL_VERSION			 259
-#define SSL_R_UNSUPPORTED_STATUS_TYPE			 329
-#define SSL_R_WRITE_BIO_NOT_SET				 260
-#define SSL_R_WRONG_CIPHER_RETURNED			 261
-#define SSL_R_WRONG_MESSAGE_TYPE			 262
-#define SSL_R_WRONG_NUMBER_OF_KEY_BITS			 263
-#define SSL_R_WRONG_SIGNATURE_LENGTH			 264
-#define SSL_R_WRONG_SIGNATURE_SIZE			 265
-#define SSL_R_WRONG_SSL_VERSION				 266
-#define SSL_R_WRONG_VERSION_NUMBER			 267
-#define SSL_R_X509_LIB					 268
-#define SSL_R_X509_VERIFICATION_SETUP_PROBLEMS		 269
-
-#ifdef  __cplusplus
-}
-#endif
-#endif
diff --git a/extra_lib/include/openssl/ssl2.h b/extra_lib/include/openssl/ssl2.h
deleted file mode 100644
index 99a52ea..0000000
--- a/extra_lib/include/openssl/ssl2.h
+++ /dev/null
@@ -1,268 +0,0 @@
-/* ssl/ssl2.h */
-/* Copyright (C) 1995-1998 Eric Young (eay at cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay at cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh at cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay at cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh at cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef HEADER_SSL2_H 
-#define HEADER_SSL2_H 
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-/* Protocol Version Codes */
-#define SSL2_VERSION		0x0002
-#define SSL2_VERSION_MAJOR	0x00
-#define SSL2_VERSION_MINOR	0x02
-/* #define SSL2_CLIENT_VERSION	0x0002 */
-/* #define SSL2_SERVER_VERSION	0x0002 */
-
-/* Protocol Message Codes */
-#define SSL2_MT_ERROR			0
-#define SSL2_MT_CLIENT_HELLO		1
-#define SSL2_MT_CLIENT_MASTER_KEY	2
-#define SSL2_MT_CLIENT_FINISHED		3
-#define SSL2_MT_SERVER_HELLO		4
-#define SSL2_MT_SERVER_VERIFY		5
-#define SSL2_MT_SERVER_FINISHED		6
-#define SSL2_MT_REQUEST_CERTIFICATE	7
-#define SSL2_MT_CLIENT_CERTIFICATE	8
-
-/* Error Message Codes */
-#define SSL2_PE_UNDEFINED_ERROR		0x0000
-#define SSL2_PE_NO_CIPHER		0x0001
-#define SSL2_PE_NO_CERTIFICATE		0x0002
-#define SSL2_PE_BAD_CERTIFICATE		0x0004
-#define SSL2_PE_UNSUPPORTED_CERTIFICATE_TYPE 0x0006
-
-/* Cipher Kind Values */
-#define SSL2_CK_NULL_WITH_MD5			0x02000000 /* v3 */
-#define SSL2_CK_RC4_128_WITH_MD5		0x02010080
-#define SSL2_CK_RC4_128_EXPORT40_WITH_MD5	0x02020080
-#define SSL2_CK_RC2_128_CBC_WITH_MD5		0x02030080
-#define SSL2_CK_RC2_128_CBC_EXPORT40_WITH_MD5	0x02040080
-#define SSL2_CK_IDEA_128_CBC_WITH_MD5		0x02050080
-#define SSL2_CK_DES_64_CBC_WITH_MD5		0x02060040
-#define SSL2_CK_DES_64_CBC_WITH_SHA		0x02060140 /* v3 */
-#define SSL2_CK_DES_192_EDE3_CBC_WITH_MD5	0x020700c0
-#define SSL2_CK_DES_192_EDE3_CBC_WITH_SHA	0x020701c0 /* v3 */
-#define SSL2_CK_RC4_64_WITH_MD5			0x02080080 /* MS hack */
- 
-#define SSL2_CK_DES_64_CFB64_WITH_MD5_1		0x02ff0800 /* SSLeay */
-#define SSL2_CK_NULL				0x02ff0810 /* SSLeay */
-
-#define SSL2_TXT_DES_64_CFB64_WITH_MD5_1	"DES-CFB-M1"
-#define SSL2_TXT_NULL_WITH_MD5			"NULL-MD5"
-#define SSL2_TXT_RC4_128_WITH_MD5		"RC4-MD5"
-#define SSL2_TXT_RC4_128_EXPORT40_WITH_MD5	"EXP-RC4-MD5"
-#define SSL2_TXT_RC2_128_CBC_WITH_MD5		"RC2-CBC-MD5"
-#define SSL2_TXT_RC2_128_CBC_EXPORT40_WITH_MD5	"EXP-RC2-CBC-MD5"
-#define SSL2_TXT_IDEA_128_CBC_WITH_MD5		"IDEA-CBC-MD5"
-#define SSL2_TXT_DES_64_CBC_WITH_MD5		"DES-CBC-MD5"
-#define SSL2_TXT_DES_64_CBC_WITH_SHA		"DES-CBC-SHA"
-#define SSL2_TXT_DES_192_EDE3_CBC_WITH_MD5	"DES-CBC3-MD5"
-#define SSL2_TXT_DES_192_EDE3_CBC_WITH_SHA	"DES-CBC3-SHA"
-#define SSL2_TXT_RC4_64_WITH_MD5		"RC4-64-MD5"
-
-#define SSL2_TXT_NULL				"NULL"
-
-/* Flags for the SSL_CIPHER.algorithm2 field */
-#define SSL2_CF_5_BYTE_ENC			0x01
-#define SSL2_CF_8_BYTE_ENC			0x02
-
-/* Certificate Type Codes */
-#define SSL2_CT_X509_CERTIFICATE		0x01
-
-/* Authentication Type Code */
-#define SSL2_AT_MD5_WITH_RSA_ENCRYPTION		0x01
-
-#define SSL2_MAX_SSL_SESSION_ID_LENGTH		32
-
-/* Upper/Lower Bounds */
-#define SSL2_MAX_MASTER_KEY_LENGTH_IN_BITS	256
-#ifdef OPENSSL_SYS_MPE
-#define SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER	29998u
-#else
-#define SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER	32767u  /* 2^15-1 */
-#endif
-#define SSL2_MAX_RECORD_LENGTH_3_BYTE_HEADER	16383 /* 2^14-1 */
-
-#define SSL2_CHALLENGE_LENGTH	16
-/*#define SSL2_CHALLENGE_LENGTH	32 */
-#define SSL2_MIN_CHALLENGE_LENGTH	16
-#define SSL2_MAX_CHALLENGE_LENGTH	32
-#define SSL2_CONNECTION_ID_LENGTH	16
-#define SSL2_MAX_CONNECTION_ID_LENGTH	16
-#define SSL2_SSL_SESSION_ID_LENGTH	16
-#define SSL2_MAX_CERT_CHALLENGE_LENGTH	32
-#define SSL2_MIN_CERT_CHALLENGE_LENGTH	16
-#define SSL2_MAX_KEY_MATERIAL_LENGTH	24
-
-#ifndef HEADER_SSL_LOCL_H
-#define  CERT		char
-#endif
-
-typedef struct ssl2_state_st
-	{
-	int three_byte_header;
-	int clear_text;		/* clear text */
-	int escape;		/* not used in SSLv2 */
-	int ssl2_rollback;	/* used if SSLv23 rolled back to SSLv2 */
-
-	/* non-blocking io info, used to make sure the same
-	 * args were passwd */
-	unsigned int wnum;	/* number of bytes sent so far */
-	int wpend_tot;
-	const unsigned char *wpend_buf;
-
-	int wpend_off;	/* offset to data to write */
-	int wpend_len; 	/* number of bytes passwd to write */
-	int wpend_ret; 	/* number of bytes to return to caller */
-
-	/* buffer raw data */
-	int rbuf_left;
-	int rbuf_offs;
-	unsigned char *rbuf;
-	unsigned char *wbuf;
-
-	unsigned char *write_ptr;/* used to point to the start due to
-				  * 2/3 byte header. */
-
-	unsigned int padding;
-	unsigned int rlength; /* passed to ssl2_enc */
-	int ract_data_length; /* Set when things are encrypted. */
-	unsigned int wlength; /* passed to ssl2_enc */
-	int wact_data_length; /* Set when things are decrypted. */
-	unsigned char *ract_data;
-	unsigned char *wact_data;
-	unsigned char *mac_data;
-
-	unsigned char *read_key;
-	unsigned char *write_key;
-
-		/* Stuff specifically to do with this SSL session */
-	unsigned int challenge_length;
-	unsigned char challenge[SSL2_MAX_CHALLENGE_LENGTH];
-	unsigned int conn_id_length;
-	unsigned char conn_id[SSL2_MAX_CONNECTION_ID_LENGTH];
-	unsigned int key_material_length;
-	unsigned char key_material[SSL2_MAX_KEY_MATERIAL_LENGTH*2];
-
-	unsigned long read_sequence;
-	unsigned long write_sequence;
-
-	struct	{
-		unsigned int conn_id_length;
-		unsigned int cert_type;	
-		unsigned int cert_length;
-		unsigned int csl; 
-		unsigned int clear;
-		unsigned int enc; 
-		unsigned char ccl[SSL2_MAX_CERT_CHALLENGE_LENGTH];
-		unsigned int cipher_spec_length;
-		unsigned int session_id_length;
-		unsigned int clen;
-		unsigned int rlen;
-		} tmp;
-	} SSL2_STATE;
-
-/* SSLv2 */
-/* client */
-#define SSL2_ST_SEND_CLIENT_HELLO_A		(0x10|SSL_ST_CONNECT)
-#define SSL2_ST_SEND_CLIENT_HELLO_B		(0x11|SSL_ST_CONNECT)
-#define SSL2_ST_GET_SERVER_HELLO_A		(0x20|SSL_ST_CONNECT)
-#define SSL2_ST_GET_SERVER_HELLO_B		(0x21|SSL_ST_CONNECT)
-#define SSL2_ST_SEND_CLIENT_MASTER_KEY_A	(0x30|SSL_ST_CONNECT)
-#define SSL2_ST_SEND_CLIENT_MASTER_KEY_B	(0x31|SSL_ST_CONNECT)
-#define SSL2_ST_SEND_CLIENT_FINISHED_A		(0x40|SSL_ST_CONNECT)
-#define SSL2_ST_SEND_CLIENT_FINISHED_B		(0x41|SSL_ST_CONNECT)
-#define SSL2_ST_SEND_CLIENT_CERTIFICATE_A	(0x50|SSL_ST_CONNECT)
-#define SSL2_ST_SEND_CLIENT_CERTIFICATE_B	(0x51|SSL_ST_CONNECT)
-#define SSL2_ST_SEND_CLIENT_CERTIFICATE_C	(0x52|SSL_ST_CONNECT)
-#define SSL2_ST_SEND_CLIENT_CERTIFICATE_D	(0x53|SSL_ST_CONNECT)
-#define SSL2_ST_GET_SERVER_VERIFY_A		(0x60|SSL_ST_CONNECT)
-#define SSL2_ST_GET_SERVER_VERIFY_B		(0x61|SSL_ST_CONNECT)
-#define SSL2_ST_GET_SERVER_FINISHED_A		(0x70|SSL_ST_CONNECT)
-#define SSL2_ST_GET_SERVER_FINISHED_B		(0x71|SSL_ST_CONNECT)
-#define SSL2_ST_CLIENT_START_ENCRYPTION		(0x80|SSL_ST_CONNECT)
-#define SSL2_ST_X509_GET_CLIENT_CERTIFICATE	(0x90|SSL_ST_CONNECT)
-/* server */
-#define SSL2_ST_GET_CLIENT_HELLO_A		(0x10|SSL_ST_ACCEPT)
-#define SSL2_ST_GET_CLIENT_HELLO_B		(0x11|SSL_ST_ACCEPT)
-#define SSL2_ST_GET_CLIENT_HELLO_C		(0x12|SSL_ST_ACCEPT)
-#define SSL2_ST_SEND_SERVER_HELLO_A		(0x20|SSL_ST_ACCEPT)
-#define SSL2_ST_SEND_SERVER_HELLO_B		(0x21|SSL_ST_ACCEPT)
-#define SSL2_ST_GET_CLIENT_MASTER_KEY_A		(0x30|SSL_ST_ACCEPT)
-#define SSL2_ST_GET_CLIENT_MASTER_KEY_B		(0x31|SSL_ST_ACCEPT)
-#define SSL2_ST_SEND_SERVER_VERIFY_A		(0x40|SSL_ST_ACCEPT)
-#define SSL2_ST_SEND_SERVER_VERIFY_B		(0x41|SSL_ST_ACCEPT)
-#define SSL2_ST_SEND_SERVER_VERIFY_C		(0x42|SSL_ST_ACCEPT)
-#define SSL2_ST_GET_CLIENT_FINISHED_A		(0x50|SSL_ST_ACCEPT)
-#define SSL2_ST_GET_CLIENT_FINISHED_B		(0x51|SSL_ST_ACCEPT)
-#define SSL2_ST_SEND_SERVER_FINISHED_A		(0x60|SSL_ST_ACCEPT)
-#define SSL2_ST_SEND_SERVER_FINISHED_B		(0x61|SSL_ST_ACCEPT)
-#define SSL2_ST_SEND_REQUEST_CERTIFICATE_A	(0x70|SSL_ST_ACCEPT)
-#define SSL2_ST_SEND_REQUEST_CERTIFICATE_B	(0x71|SSL_ST_ACCEPT)
-#define SSL2_ST_SEND_REQUEST_CERTIFICATE_C	(0x72|SSL_ST_ACCEPT)
-#define SSL2_ST_SEND_REQUEST_CERTIFICATE_D	(0x73|SSL_ST_ACCEPT)
-#define SSL2_ST_SERVER_START_ENCRYPTION		(0x80|SSL_ST_ACCEPT)
-#define SSL2_ST_X509_GET_SERVER_CERTIFICATE	(0x90|SSL_ST_ACCEPT)
-
-#ifdef  __cplusplus
-}
-#endif
-#endif
-
diff --git a/extra_lib/include/openssl/ssl23.h b/extra_lib/include/openssl/ssl23.h
deleted file mode 100644
index d322898..0000000
--- a/extra_lib/include/openssl/ssl23.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* ssl/ssl23.h */
-/* Copyright (C) 1995-1998 Eric Young (eay at cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay at cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh at cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay at cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh at cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef HEADER_SSL23_H 
-#define HEADER_SSL23_H 
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-/*client */
-/* write to server */
-#define SSL23_ST_CW_CLNT_HELLO_A	(0x210|SSL_ST_CONNECT)
-#define SSL23_ST_CW_CLNT_HELLO_B	(0x211|SSL_ST_CONNECT)
-/* read from server */
-#define SSL23_ST_CR_SRVR_HELLO_A	(0x220|SSL_ST_CONNECT)
-#define SSL23_ST_CR_SRVR_HELLO_B	(0x221|SSL_ST_CONNECT)
-
-/* server */
-/* read from client */
-#define SSL23_ST_SR_CLNT_HELLO_A	(0x210|SSL_ST_ACCEPT)
-#define SSL23_ST_SR_CLNT_HELLO_B	(0x211|SSL_ST_ACCEPT)
-
-#ifdef  __cplusplus
-}
-#endif
-#endif
-
diff --git a/extra_lib/include/openssl/ssl3.h b/extra_lib/include/openssl/ssl3.h
deleted file mode 100644
index baaa89e..0000000
--- a/extra_lib/include/openssl/ssl3.h
+++ /dev/null
@@ -1,637 +0,0 @@
-/* ssl/ssl3.h */
-/* Copyright (C) 1995-1998 Eric Young (eay at cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay at cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh at cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay at cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh at cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-/* ====================================================================
- * Copyright (c) 1998-2002 The OpenSSL Project.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. 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.
- *
- * 3. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
- *
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
- *    endorse or promote products derived from this software without
- *    prior written permission. For written permission, please contact
- *    openssl-core at openssl.org.
- *
- * 5. Products derived from this software may not be called "OpenSSL"
- *    nor may "OpenSSL" appear in their names without prior written
- *    permission of the OpenSSL Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- *    acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
- *
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
- * EXPRESSED 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 OpenSSL PROJECT OR
- * ITS 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.
- * ====================================================================
- *
- * This product includes cryptographic software written by Eric Young
- * (eay at cryptsoft.com).  This product includes software written by Tim
- * Hudson (tjh at cryptsoft.com).
- *
- */
-/* ====================================================================
- * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
- * ECC cipher suite support in OpenSSL originally developed by 
- * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
- */
-
-#ifndef HEADER_SSL3_H 
-#define HEADER_SSL3_H 
-
-#ifndef OPENSSL_NO_COMP
-#include <openssl/comp.h>
-#endif
-#include <openssl/buffer.h>
-#include <openssl/evp.h>
-#include <openssl/ssl.h>
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-/* Signalling cipher suite value: from draft-ietf-tls-renegotiation-03.txt */
-#define SSL3_CK_SCSV				0x030000FF
-
-#define SSL3_CK_RSA_NULL_MD5			0x03000001
-#define SSL3_CK_RSA_NULL_SHA			0x03000002
-#define SSL3_CK_RSA_RC4_40_MD5 			0x03000003
-#define SSL3_CK_RSA_RC4_128_MD5			0x03000004
-#define SSL3_CK_RSA_RC4_128_SHA			0x03000005
-#define SSL3_CK_RSA_RC2_40_MD5			0x03000006
-#define SSL3_CK_RSA_IDEA_128_SHA		0x03000007
-#define SSL3_CK_RSA_DES_40_CBC_SHA		0x03000008
-#define SSL3_CK_RSA_DES_64_CBC_SHA		0x03000009
-#define SSL3_CK_RSA_DES_192_CBC3_SHA		0x0300000A
-
-#define SSL3_CK_DH_DSS_DES_40_CBC_SHA		0x0300000B
-#define SSL3_CK_DH_DSS_DES_64_CBC_SHA		0x0300000C
-#define SSL3_CK_DH_DSS_DES_192_CBC3_SHA 	0x0300000D
-#define SSL3_CK_DH_RSA_DES_40_CBC_SHA		0x0300000E
-#define SSL3_CK_DH_RSA_DES_64_CBC_SHA		0x0300000F
-#define SSL3_CK_DH_RSA_DES_192_CBC3_SHA 	0x03000010
-
-#define SSL3_CK_EDH_DSS_DES_40_CBC_SHA		0x03000011
-#define SSL3_CK_EDH_DSS_DES_64_CBC_SHA		0x03000012
-#define SSL3_CK_EDH_DSS_DES_192_CBC3_SHA	0x03000013
-#define SSL3_CK_EDH_RSA_DES_40_CBC_SHA		0x03000014
-#define SSL3_CK_EDH_RSA_DES_64_CBC_SHA		0x03000015
-#define SSL3_CK_EDH_RSA_DES_192_CBC3_SHA	0x03000016
-
-#define SSL3_CK_ADH_RC4_40_MD5			0x03000017
-#define SSL3_CK_ADH_RC4_128_MD5			0x03000018
-#define SSL3_CK_ADH_DES_40_CBC_SHA		0x03000019
-#define SSL3_CK_ADH_DES_64_CBC_SHA		0x0300001A
-#define SSL3_CK_ADH_DES_192_CBC_SHA		0x0300001B
-
-#if 0
-	#define SSL3_CK_FZA_DMS_NULL_SHA		0x0300001C
-	#define SSL3_CK_FZA_DMS_FZA_SHA			0x0300001D
-	#if 0 /* Because it clashes with KRB5, is never used any more, and is safe
-		 to remove according to David Hopwood <david.hopwood at zetnet.co.uk>
-		 of the ietf-tls list */
-	#define SSL3_CK_FZA_DMS_RC4_SHA			0x0300001E
-	#endif
-#endif
-
-/*    VRS Additional Kerberos5 entries
- */
-#define SSL3_CK_KRB5_DES_64_CBC_SHA		0x0300001E
-#define SSL3_CK_KRB5_DES_192_CBC3_SHA		0x0300001F
-#define SSL3_CK_KRB5_RC4_128_SHA		0x03000020
-#define SSL3_CK_KRB5_IDEA_128_CBC_SHA	       	0x03000021
-#define SSL3_CK_KRB5_DES_64_CBC_MD5       	0x03000022
-#define SSL3_CK_KRB5_DES_192_CBC3_MD5       	0x03000023
-#define SSL3_CK_KRB5_RC4_128_MD5	       	0x03000024
-#define SSL3_CK_KRB5_IDEA_128_CBC_MD5 		0x03000025
-
-#define SSL3_CK_KRB5_DES_40_CBC_SHA 		0x03000026
-#define SSL3_CK_KRB5_RC2_40_CBC_SHA 		0x03000027
-#define SSL3_CK_KRB5_RC4_40_SHA	 		0x03000028
-#define SSL3_CK_KRB5_DES_40_CBC_MD5 		0x03000029
-#define SSL3_CK_KRB5_RC2_40_CBC_MD5 		0x0300002A
-#define SSL3_CK_KRB5_RC4_40_MD5	 		0x0300002B
-
-#define SSL3_TXT_RSA_NULL_MD5			"NULL-MD5"
-#define SSL3_TXT_RSA_NULL_SHA			"NULL-SHA"
-#define SSL3_TXT_RSA_RC4_40_MD5 		"EXP-RC4-MD5"
-#define SSL3_TXT_RSA_RC4_128_MD5		"RC4-MD5"
-#define SSL3_TXT_RSA_RC4_128_SHA		"RC4-SHA"
-#define SSL3_TXT_RSA_RC2_40_MD5			"EXP-RC2-CBC-MD5"
-#define SSL3_TXT_RSA_IDEA_128_SHA		"IDEA-CBC-SHA"
-#define SSL3_TXT_RSA_DES_40_CBC_SHA		"EXP-DES-CBC-SHA"
-#define SSL3_TXT_RSA_DES_64_CBC_SHA		"DES-CBC-SHA"
-#define SSL3_TXT_RSA_DES_192_CBC3_SHA		"DES-CBC3-SHA"
-
-#define SSL3_TXT_DH_DSS_DES_40_CBC_SHA		"EXP-DH-DSS-DES-CBC-SHA"
-#define SSL3_TXT_DH_DSS_DES_64_CBC_SHA		"DH-DSS-DES-CBC-SHA"
-#define SSL3_TXT_DH_DSS_DES_192_CBC3_SHA 	"DH-DSS-DES-CBC3-SHA"
-#define SSL3_TXT_DH_RSA_DES_40_CBC_SHA		"EXP-DH-RSA-DES-CBC-SHA"
-#define SSL3_TXT_DH_RSA_DES_64_CBC_SHA		"DH-RSA-DES-CBC-SHA"
-#define SSL3_TXT_DH_RSA_DES_192_CBC3_SHA 	"DH-RSA-DES-CBC3-SHA"
-
-#define SSL3_TXT_EDH_DSS_DES_40_CBC_SHA		"EXP-EDH-DSS-DES-CBC-SHA"
-#define SSL3_TXT_EDH_DSS_DES_64_CBC_SHA		"EDH-DSS-DES-CBC-SHA"
-#define SSL3_TXT_EDH_DSS_DES_192_CBC3_SHA	"EDH-DSS-DES-CBC3-SHA"
-#define SSL3_TXT_EDH_RSA_DES_40_CBC_SHA		"EXP-EDH-RSA-DES-CBC-SHA"
-#define SSL3_TXT_EDH_RSA_DES_64_CBC_SHA		"EDH-RSA-DES-CBC-SHA"
-#define SSL3_TXT_EDH_RSA_DES_192_CBC3_SHA	"EDH-RSA-DES-CBC3-SHA"
-
-#define SSL3_TXT_ADH_RC4_40_MD5			"EXP-ADH-RC4-MD5"
-#define SSL3_TXT_ADH_RC4_128_MD5		"ADH-RC4-MD5"
-#define SSL3_TXT_ADH_DES_40_CBC_SHA		"EXP-ADH-DES-CBC-SHA"
-#define SSL3_TXT_ADH_DES_64_CBC_SHA		"ADH-DES-CBC-SHA"
-#define SSL3_TXT_ADH_DES_192_CBC_SHA		"ADH-DES-CBC3-SHA"
-
-#if 0
-	#define SSL3_TXT_FZA_DMS_NULL_SHA		"FZA-NULL-SHA"
-	#define SSL3_TXT_FZA_DMS_FZA_SHA		"FZA-FZA-CBC-SHA"
-	#define SSL3_TXT_FZA_DMS_RC4_SHA		"FZA-RC4-SHA"
-#endif
-
-#define SSL3_TXT_KRB5_DES_64_CBC_SHA		"KRB5-DES-CBC-SHA"
-#define SSL3_TXT_KRB5_DES_192_CBC3_SHA		"KRB5-DES-CBC3-SHA"
-#define SSL3_TXT_KRB5_RC4_128_SHA		"KRB5-RC4-SHA"
-#define SSL3_TXT_KRB5_IDEA_128_CBC_SHA	       	"KRB5-IDEA-CBC-SHA"
-#define SSL3_TXT_KRB5_DES_64_CBC_MD5       	"KRB5-DES-CBC-MD5"
-#define SSL3_TXT_KRB5_DES_192_CBC3_MD5       	"KRB5-DES-CBC3-MD5"
-#define SSL3_TXT_KRB5_RC4_128_MD5		"KRB5-RC4-MD5"
-#define SSL3_TXT_KRB5_IDEA_128_CBC_MD5 		"KRB5-IDEA-CBC-MD5"
-
-#define SSL3_TXT_KRB5_DES_40_CBC_SHA 		"EXP-KRB5-DES-CBC-SHA"
-#define SSL3_TXT_KRB5_RC2_40_CBC_SHA 		"EXP-KRB5-RC2-CBC-SHA"
-#define SSL3_TXT_KRB5_RC4_40_SHA	 	"EXP-KRB5-RC4-SHA"
-#define SSL3_TXT_KRB5_DES_40_CBC_MD5 		"EXP-KRB5-DES-CBC-MD5"
-#define SSL3_TXT_KRB5_RC2_40_CBC_MD5 		"EXP-KRB5-RC2-CBC-MD5"
-#define SSL3_TXT_KRB5_RC4_40_MD5	 	"EXP-KRB5-RC4-MD5"
-
-#define SSL3_SSL_SESSION_ID_LENGTH		32
-#define SSL3_MAX_SSL_SESSION_ID_LENGTH		32
-
-#define SSL3_MASTER_SECRET_SIZE			48
-#define SSL3_RANDOM_SIZE			32
-#define SSL3_SESSION_ID_SIZE			32
-#define SSL3_RT_HEADER_LENGTH			5
-
-#ifndef SSL3_ALIGN_PAYLOAD
- /* Some will argue that this increases memory footprint, but it's
-  * not actually true. Point is that malloc has to return at least
-  * 64-bit aligned pointers, meaning that allocating 5 bytes wastes
-  * 3 bytes in either case. Suggested pre-gaping simply moves these
-  * wasted bytes from the end of allocated region to its front,
-  * but makes data payload aligned, which improves performance:-) */
-# define SSL3_ALIGN_PAYLOAD			8
-#else
-# if (SSL3_ALIGN_PAYLOAD&(SSL3_ALIGN_PAYLOAD-1))!=0
-#  error "insane SSL3_ALIGN_PAYLOAD"
-#  undef SSL3_ALIGN_PAYLOAD
-# endif
-#endif
-
-/* This is the maximum MAC (digest) size used by the SSL library.
- * Currently maximum of 20 is used by SHA1, but we reserve for
- * future extension for 512-bit hashes.
- */
-
-#define SSL3_RT_MAX_MD_SIZE			64
-
-/* Maximum block size used in all ciphersuites. Currently 16 for AES.
- */
-
-#define	SSL_RT_MAX_CIPHER_BLOCK_SIZE		16
-
-#define SSL3_RT_MAX_EXTRA			(16384)
-
-/* Maximum plaintext length: defined by SSL/TLS standards */
-#define SSL3_RT_MAX_PLAIN_LENGTH		16384
-/* Maximum compression overhead: defined by SSL/TLS standards */
-#define SSL3_RT_MAX_COMPRESSED_OVERHEAD		1024
-
-/* The standards give a maximum encryption overhead of 1024 bytes.
- * In practice the value is lower than this. The overhead is the maximum
- * number of padding bytes (256) plus the mac size.
- */
-#define SSL3_RT_MAX_ENCRYPTED_OVERHEAD	(256 + SSL3_RT_MAX_MD_SIZE)
-
-/* OpenSSL currently only uses a padding length of at most one block so
- * the send overhead is smaller.
- */
-
-#define SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD \
-			(SSL_RT_MAX_CIPHER_BLOCK_SIZE + SSL3_RT_MAX_MD_SIZE)
-
-/* If compression isn't used don't include the compression overhead */
-
-#ifdef OPENSSL_NO_COMP
-#define SSL3_RT_MAX_COMPRESSED_LENGTH		SSL3_RT_MAX_PLAIN_LENGTH
-#else
-#define SSL3_RT_MAX_COMPRESSED_LENGTH	\
-		(SSL3_RT_MAX_PLAIN_LENGTH+SSL3_RT_MAX_COMPRESSED_OVERHEAD)
-#endif
-#define SSL3_RT_MAX_ENCRYPTED_LENGTH	\
-		(SSL3_RT_MAX_ENCRYPTED_OVERHEAD+SSL3_RT_MAX_COMPRESSED_LENGTH)
-#define SSL3_RT_MAX_PACKET_SIZE		\
-		(SSL3_RT_MAX_ENCRYPTED_LENGTH+SSL3_RT_HEADER_LENGTH)
-
-#define SSL3_MD_CLIENT_FINISHED_CONST	"\x43\x4C\x4E\x54"
-#define SSL3_MD_SERVER_FINISHED_CONST	"\x53\x52\x56\x52"
-
-#define SSL3_VERSION			0x0300
-#define SSL3_VERSION_MAJOR		0x03
-#define SSL3_VERSION_MINOR		0x00
-
-#define SSL3_RT_CHANGE_CIPHER_SPEC	20
-#define SSL3_RT_ALERT			21
-#define SSL3_RT_HANDSHAKE		22
-#define SSL3_RT_APPLICATION_DATA	23
-
-#define SSL3_AL_WARNING			1
-#define SSL3_AL_FATAL			2
-
-#define SSL3_AD_CLOSE_NOTIFY		 0
-#define SSL3_AD_UNEXPECTED_MESSAGE	10	/* fatal */
-#define SSL3_AD_BAD_RECORD_MAC		20	/* fatal */
-#define SSL3_AD_DECOMPRESSION_FAILURE	30	/* fatal */
-#define SSL3_AD_HANDSHAKE_FAILURE	40	/* fatal */
-#define SSL3_AD_NO_CERTIFICATE		41
-#define SSL3_AD_BAD_CERTIFICATE		42
-#define SSL3_AD_UNSUPPORTED_CERTIFICATE	43
-#define SSL3_AD_CERTIFICATE_REVOKED	44
-#define SSL3_AD_CERTIFICATE_EXPIRED	45
-#define SSL3_AD_CERTIFICATE_UNKNOWN	46
-#define SSL3_AD_ILLEGAL_PARAMETER	47	/* fatal */
-
-typedef struct ssl3_record_st
-	{
-/*r */	int type;               /* type of record */
-/*rw*/	unsigned int length;    /* How many bytes available */
-/*r */	unsigned int off;       /* read/write offset into 'buf' */
-/*rw*/	unsigned char *data;    /* pointer to the record data */
-/*rw*/	unsigned char *input;   /* where the decode bytes are */
-/*r */	unsigned char *comp;    /* only used with decompression - malloc()ed */
-/*r */  unsigned long epoch;    /* epoch number, needed by DTLS1 */
-/*r */  unsigned char seq_num[8]; /* sequence number, needed by DTLS1 */
-	} SSL3_RECORD;
-
-typedef struct ssl3_buffer_st
-	{
-	unsigned char *buf;     /* at least SSL3_RT_MAX_PACKET_SIZE bytes,
-	                         * see ssl3_setup_buffers() */
-	size_t len;             /* buffer size */
-	int offset;             /* where to 'copy from' */
-	int left;               /* how many bytes left */
-	} SSL3_BUFFER;
-
-#define SSL3_CT_RSA_SIGN			1
-#define SSL3_CT_DSS_SIGN			2
-#define SSL3_CT_RSA_FIXED_DH			3
-#define SSL3_CT_DSS_FIXED_DH			4
-#define SSL3_CT_RSA_EPHEMERAL_DH		5
-#define SSL3_CT_DSS_EPHEMERAL_DH		6
-#define SSL3_CT_FORTEZZA_DMS			20
-/* SSL3_CT_NUMBER is used to size arrays and it must be large
- * enough to contain all of the cert types defined either for
- * SSLv3 and TLSv1.
- */
-#define SSL3_CT_NUMBER			9
-
-
-#define SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS	0x0001
-#define SSL3_FLAGS_DELAY_CLIENT_FINISHED	0x0002
-#define SSL3_FLAGS_POP_BUFFER			0x0004
-#define TLS1_FLAGS_TLS_PADDING_BUG		0x0008
-#define TLS1_FLAGS_SKIP_CERT_VERIFY		0x0010
-
-typedef struct ssl3_state_st
-	{
-	long flags;
-	int delay_buf_pop_ret;
-
-	unsigned char read_sequence[8];
-	int read_mac_secret_size;
-	unsigned char read_mac_secret[EVP_MAX_MD_SIZE];
-	unsigned char write_sequence[8];
-	int write_mac_secret_size;
-	unsigned char write_mac_secret[EVP_MAX_MD_SIZE];
-
-	unsigned char server_random[SSL3_RANDOM_SIZE];
-	unsigned char client_random[SSL3_RANDOM_SIZE];
-
-	/* flags for countermeasure against known-IV weakness */
-	int need_empty_fragments;
-	int empty_fragment_done;
-
-	/* The value of 'extra' when the buffers were initialized */
-	int init_extra;
-
-	SSL3_BUFFER rbuf;	/* read IO goes into here */
-	SSL3_BUFFER wbuf;	/* write IO goes into here */
-
-	SSL3_RECORD rrec;	/* each decoded record goes in here */
-	SSL3_RECORD wrec;	/* goes out from here */
-
-	/* storage for Alert/Handshake protocol data received but not
-	 * yet processed by ssl3_read_bytes: */
-	unsigned char alert_fragment[2];
-	unsigned int alert_fragment_len;
-	unsigned char handshake_fragment[4];
-	unsigned int handshake_fragment_len;
-
-	/* partial write - check the numbers match */
-	unsigned int wnum;	/* number of bytes sent so far */
-	int wpend_tot;		/* number bytes written */
-	int wpend_type;
-	int wpend_ret;		/* number of bytes submitted */
-	const unsigned char *wpend_buf;
-
-	/* used during startup, digest all incoming/outgoing packets */
-	BIO *handshake_buffer;
-	/* When set of handshake digests is determined, buffer is hashed
-	 * and freed and MD_CTX-es for all required digests are stored in
-	 * this array */
-	EVP_MD_CTX **handshake_dgst;
-	/* this is set whenerver we see a change_cipher_spec message
-	 * come in when we are not looking for one */
-	int change_cipher_spec;
-
-	int warn_alert;
-	int fatal_alert;
-	/* we allow one fatal and one warning alert to be outstanding,
-	 * send close alert via the warning alert */
-	int alert_dispatch;
-	unsigned char send_alert[2];
-
-	/* This flag is set when we should renegotiate ASAP, basically when
-	 * there is no more data in the read or write buffers */
-	int renegotiate;
-	int total_renegotiations;
-	int num_renegotiations;
-
-	int in_read_app_data;
-
-	/* Opaque PRF input as used for the current handshake.
-	 * These fields are used only if TLSEXT_TYPE_opaque_prf_input is defined
-	 * (otherwise, they are merely present to improve binary compatibility) */
-	void *client_opaque_prf_input;
-	size_t client_opaque_prf_input_len;
-	void *server_opaque_prf_input;
-	size_t server_opaque_prf_input_len;
-
-	struct	{
-		/* actually only needs to be 16+20 */
-		unsigned char cert_verify_md[EVP_MAX_MD_SIZE*2];
-
-		/* actually only need to be 16+20 for SSLv3 and 12 for TLS */
-		unsigned char finish_md[EVP_MAX_MD_SIZE*2];
-		int finish_md_len;
-		unsigned char peer_finish_md[EVP_MAX_MD_SIZE*2];
-		int peer_finish_md_len;
-		
-		unsigned long message_size;
-		int message_type;
-
-		/* used to hold the new cipher we are going to use */
-		const SSL_CIPHER *new_cipher;
-#ifndef OPENSSL_NO_DH
-		DH *dh;
-#endif
-
-#ifndef OPENSSL_NO_ECDH
-		EC_KEY *ecdh; /* holds short lived ECDH key */
-#endif
-
-		/* used when SSL_ST_FLUSH_DATA is entered */
-		int next_state;			
-
-		int reuse_message;
-
-		/* used for certificate requests */
-		int cert_req;
-		int ctype_num;
-		char ctype[SSL3_CT_NUMBER];
-		STACK_OF(X509_NAME) *ca_names;
-
-		int use_rsa_tmp;
-
-		int key_block_length;
-		unsigned char *key_block;
-
-		const EVP_CIPHER *new_sym_enc;
-		const EVP_MD *new_hash;
-		int new_mac_pkey_type;
-		int new_mac_secret_size;
-#ifndef OPENSSL_NO_COMP
-		const SSL_COMP *new_compression;
-#else
-		char *new_compression;
-#endif
-		int cert_request;
-		} tmp;
-
-        /* Connection binding to prevent renegotiation attacks */
-        unsigned char previous_client_finished[EVP_MAX_MD_SIZE];
-        unsigned char previous_client_finished_len;
-        unsigned char previous_server_finished[EVP_MAX_MD_SIZE];
-        unsigned char previous_server_finished_len;
-        int send_connection_binding; /* TODOEKR */
-	} SSL3_STATE;
-
-
-/* SSLv3 */
-/*client */
-/* extra state */
-#define SSL3_ST_CW_FLUSH		(0x100|SSL_ST_CONNECT)
-/* write to server */
-#define SSL3_ST_CW_CLNT_HELLO_A		(0x110|SSL_ST_CONNECT)
-#define SSL3_ST_CW_CLNT_HELLO_B		(0x111|SSL_ST_CONNECT)
-/* read from server */
-#define SSL3_ST_CR_SRVR_HELLO_A		(0x120|SSL_ST_CONNECT)
-#define SSL3_ST_CR_SRVR_HELLO_B		(0x121|SSL_ST_CONNECT)
-#define DTLS1_ST_CR_HELLO_VERIFY_REQUEST_A (0x126|SSL_ST_CONNECT)
-#define DTLS1_ST_CR_HELLO_VERIFY_REQUEST_B (0x127|SSL_ST_CONNECT)
-#define SSL3_ST_CR_CERT_A		(0x130|SSL_ST_CONNECT)
-#define SSL3_ST_CR_CERT_B		(0x131|SSL_ST_CONNECT)
-#define SSL3_ST_CR_KEY_EXCH_A		(0x140|SSL_ST_CONNECT)
-#define SSL3_ST_CR_KEY_EXCH_B		(0x141|SSL_ST_CONNECT)
-#define SSL3_ST_CR_CERT_REQ_A		(0x150|SSL_ST_CONNECT)
-#define SSL3_ST_CR_CERT_REQ_B		(0x151|SSL_ST_CONNECT)
-#define SSL3_ST_CR_SRVR_DONE_A		(0x160|SSL_ST_CONNECT)
-#define SSL3_ST_CR_SRVR_DONE_B		(0x161|SSL_ST_CONNECT)
-/* write to server */
-#define SSL3_ST_CW_CERT_A		(0x170|SSL_ST_CONNECT)
-#define SSL3_ST_CW_CERT_B		(0x171|SSL_ST_CONNECT)
-#define SSL3_ST_CW_CERT_C		(0x172|SSL_ST_CONNECT)
-#define SSL3_ST_CW_CERT_D		(0x173|SSL_ST_CONNECT)
-#define SSL3_ST_CW_KEY_EXCH_A		(0x180|SSL_ST_CONNECT)
-#define SSL3_ST_CW_KEY_EXCH_B		(0x181|SSL_ST_CONNECT)
-#define SSL3_ST_CW_CERT_VRFY_A		(0x190|SSL_ST_CONNECT)
-#define SSL3_ST_CW_CERT_VRFY_B		(0x191|SSL_ST_CONNECT)
-#define SSL3_ST_CW_CHANGE_A		(0x1A0|SSL_ST_CONNECT)
-#define SSL3_ST_CW_CHANGE_B		(0x1A1|SSL_ST_CONNECT)
-#define SSL3_ST_CW_FINISHED_A		(0x1B0|SSL_ST_CONNECT)
-#define SSL3_ST_CW_FINISHED_B		(0x1B1|SSL_ST_CONNECT)
-/* read from server */
-#define SSL3_ST_CR_CHANGE_A		(0x1C0|SSL_ST_CONNECT)
-#define SSL3_ST_CR_CHANGE_B		(0x1C1|SSL_ST_CONNECT)
-#define SSL3_ST_CR_FINISHED_A		(0x1D0|SSL_ST_CONNECT)
-#define SSL3_ST_CR_FINISHED_B		(0x1D1|SSL_ST_CONNECT)
-#define SSL3_ST_CR_SESSION_TICKET_A	(0x1E0|SSL_ST_CONNECT)
-#define SSL3_ST_CR_SESSION_TICKET_B	(0x1E1|SSL_ST_CONNECT)
-#define SSL3_ST_CR_CERT_STATUS_A	(0x1F0|SSL_ST_CONNECT)
-#define SSL3_ST_CR_CERT_STATUS_B	(0x1F1|SSL_ST_CONNECT)
-
-/* server */
-/* extra state */
-#define SSL3_ST_SW_FLUSH		(0x100|SSL_ST_ACCEPT)
-/* read from client */
-/* Do not change the number values, they do matter */
-#define SSL3_ST_SR_CLNT_HELLO_A		(0x110|SSL_ST_ACCEPT)
-#define SSL3_ST_SR_CLNT_HELLO_B		(0x111|SSL_ST_ACCEPT)
-#define SSL3_ST_SR_CLNT_HELLO_C		(0x112|SSL_ST_ACCEPT)
-/* write to client */
-#define DTLS1_ST_SW_HELLO_VERIFY_REQUEST_A (0x113|SSL_ST_ACCEPT)
-#define DTLS1_ST_SW_HELLO_VERIFY_REQUEST_B (0x114|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_HELLO_REQ_A		(0x120|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_HELLO_REQ_B		(0x121|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_HELLO_REQ_C		(0x122|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_SRVR_HELLO_A		(0x130|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_SRVR_HELLO_B		(0x131|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_CERT_A		(0x140|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_CERT_B		(0x141|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_KEY_EXCH_A		(0x150|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_KEY_EXCH_B		(0x151|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_CERT_REQ_A		(0x160|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_CERT_REQ_B		(0x161|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_SRVR_DONE_A		(0x170|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_SRVR_DONE_B		(0x171|SSL_ST_ACCEPT)
-/* read from client */
-#define SSL3_ST_SR_CERT_A		(0x180|SSL_ST_ACCEPT)
-#define SSL3_ST_SR_CERT_B		(0x181|SSL_ST_ACCEPT)
-#define SSL3_ST_SR_KEY_EXCH_A		(0x190|SSL_ST_ACCEPT)
-#define SSL3_ST_SR_KEY_EXCH_B		(0x191|SSL_ST_ACCEPT)
-#define SSL3_ST_SR_CERT_VRFY_A		(0x1A0|SSL_ST_ACCEPT)
-#define SSL3_ST_SR_CERT_VRFY_B		(0x1A1|SSL_ST_ACCEPT)
-#define SSL3_ST_SR_CHANGE_A		(0x1B0|SSL_ST_ACCEPT)
-#define SSL3_ST_SR_CHANGE_B		(0x1B1|SSL_ST_ACCEPT)
-#define SSL3_ST_SR_FINISHED_A		(0x1C0|SSL_ST_ACCEPT)
-#define SSL3_ST_SR_FINISHED_B		(0x1C1|SSL_ST_ACCEPT)
-/* write to client */
-#define SSL3_ST_SW_CHANGE_A		(0x1D0|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_CHANGE_B		(0x1D1|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_FINISHED_A		(0x1E0|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_FINISHED_B		(0x1E1|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_SESSION_TICKET_A	(0x1F0|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_SESSION_TICKET_B	(0x1F1|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_CERT_STATUS_A	(0x200|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_CERT_STATUS_B	(0x201|SSL_ST_ACCEPT)
-
-#define SSL3_MT_HELLO_REQUEST			0
-#define SSL3_MT_CLIENT_HELLO			1
-#define SSL3_MT_SERVER_HELLO			2
-#define	SSL3_MT_NEWSESSION_TICKET		4
-#define SSL3_MT_CERTIFICATE			11
-#define SSL3_MT_SERVER_KEY_EXCHANGE		12
-#define SSL3_MT_CERTIFICATE_REQUEST		13
-#define SSL3_MT_SERVER_DONE			14
-#define SSL3_MT_CERTIFICATE_VERIFY		15
-#define SSL3_MT_CLIENT_KEY_EXCHANGE		16
-#define SSL3_MT_FINISHED			20
-#define SSL3_MT_CERTIFICATE_STATUS		22
-#define DTLS1_MT_HELLO_VERIFY_REQUEST    3
-
-
-#define SSL3_MT_CCS				1
-
-/* These are used when changing over to a new cipher */
-#define SSL3_CC_READ		0x01
-#define SSL3_CC_WRITE		0x02
-#define SSL3_CC_CLIENT		0x10
-#define SSL3_CC_SERVER		0x20
-#define SSL3_CHANGE_CIPHER_CLIENT_WRITE	(SSL3_CC_CLIENT|SSL3_CC_WRITE)	
-#define SSL3_CHANGE_CIPHER_SERVER_READ	(SSL3_CC_SERVER|SSL3_CC_READ)
-#define SSL3_CHANGE_CIPHER_CLIENT_READ	(SSL3_CC_CLIENT|SSL3_CC_READ)
-#define SSL3_CHANGE_CIPHER_SERVER_WRITE	(SSL3_CC_SERVER|SSL3_CC_WRITE)
-
-#ifdef  __cplusplus
-}
-#endif
-#endif
-
diff --git a/extra_lib/include/openssl/stack.h b/extra_lib/include/openssl/stack.h
deleted file mode 100644
index ce35e55..0000000
--- a/extra_lib/include/openssl/stack.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/* crypto/stack/stack.h */
-/* Copyright (C) 1995-1998 Eric Young (eay at cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay at cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh at cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay at cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh at cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef HEADER_STACK_H
-#define HEADER_STACK_H
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-typedef struct stack_st
-	{
-	int num;
-	char **data;
-	int sorted;
-
-	int num_alloc;
-	int (*comp)(const void *, const void *);
-	} _STACK;  /* Use STACK_OF(...) instead */
-
-#define M_sk_num(sk)		((sk) ? (sk)->num:-1)
-#define M_sk_value(sk,n)	((sk) ? (sk)->data[n] : NULL)
-
-int sk_num(const _STACK *);
-void *sk_value(const _STACK *, int);
-
-void *sk_set(_STACK *, int, void *);
-
-_STACK *sk_new(int (*cmp)(const void *, const void *));
-_STACK *sk_new_null(void);
-void sk_free(_STACK *);
-void sk_pop_free(_STACK *st, void (*func)(void *));
-int sk_insert(_STACK *sk, void *data, int where);
-void *sk_delete(_STACK *st, int loc);
-void *sk_delete_ptr(_STACK *st, void *p);
-int sk_find(_STACK *st, void *data);
-int sk_find_ex(_STACK *st, void *data);
-int sk_push(_STACK *st, void *data);
-int sk_unshift(_STACK *st, void *data);
-void *sk_shift(_STACK *st);
-void *sk_pop(_STACK *st);
-void sk_zero(_STACK *st);
-int (*sk_set_cmp_func(_STACK *sk, int (*c)(const void *, const void *)))
-	(const void *, const void *);
-_STACK *sk_dup(_STACK *st);
-void sk_sort(_STACK *st);
-int sk_is_sorted(const _STACK *st);
-
-#ifdef  __cplusplus
-}
-#endif
-
-#endif
diff --git a/extra_lib/include/openssl/symhacks.h b/extra_lib/include/openssl/symhacks.h
deleted file mode 100644
index 3fd4a81..0000000
--- a/extra_lib/include/openssl/symhacks.h
+++ /dev/null
@@ -1,449 +0,0 @@
-/* ====================================================================
- * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. 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.
- *
- * 3. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
- *
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
- *    endorse or promote products derived from this software without
- *    prior written permission. For written permission, please contact
- *    openssl-core at openssl.org.
- *
- * 5. Products derived from this software may not be called "OpenSSL"
- *    nor may "OpenSSL" appear in their names without prior written
- *    permission of the OpenSSL Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- *    acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
- *
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
- * EXPRESSED 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 OpenSSL PROJECT OR
- * ITS 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.
- * ====================================================================
- *
- * This product includes cryptographic software written by Eric Young
- * (eay at cryptsoft.com).  This product includes software written by Tim
- * Hudson (tjh at cryptsoft.com).
- *
- */
-
-#ifndef HEADER_SYMHACKS_H
-#define HEADER_SYMHACKS_H
-
-#include <openssl/e_os2.h>
-
-/* Hacks to solve the problem with linkers incapable of handling very long
-   symbol names.  In the case of VMS, the limit is 31 characters on VMS for
-   VAX. */
-/* Note that this affects util/libeay.num and util/ssleay.num...  you may
-   change those manually, but that's not recommended, as those files are
-   controlled centrally and updated on Unix, and the central definition
-   may disagree with yours, which in turn may come with shareable library
-   incompatibilities. */
-#ifdef OPENSSL_SYS_VMS
-
-/* Hack a long name in crypto/ex_data.c */
-#undef CRYPTO_get_ex_data_implementation
-#define CRYPTO_get_ex_data_implementation	CRYPTO_get_ex_data_impl
-#undef CRYPTO_set_ex_data_implementation
-#define CRYPTO_set_ex_data_implementation	CRYPTO_set_ex_data_impl
-
-/* Hack a long name in crypto/asn1/a_mbstr.c */
-#undef ASN1_STRING_set_default_mask_asc
-#define ASN1_STRING_set_default_mask_asc	ASN1_STRING_set_def_mask_asc
-
-#if 0 /* No longer needed, since safestack macro magic does the job */
-/* Hack the names created with DECLARE_ASN1_SET_OF(PKCS7_SIGNER_INFO) */
-#undef i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO
-#define i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO	i2d_ASN1_SET_OF_PKCS7_SIGINF
-#undef d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO
-#define d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO	d2i_ASN1_SET_OF_PKCS7_SIGINF
-#endif
-
-#if 0 /* No longer needed, since safestack macro magic does the job */
-/* Hack the names created with DECLARE_ASN1_SET_OF(PKCS7_RECIP_INFO) */
-#undef i2d_ASN1_SET_OF_PKCS7_RECIP_INFO
-#define i2d_ASN1_SET_OF_PKCS7_RECIP_INFO	i2d_ASN1_SET_OF_PKCS7_RECINF
-#undef d2i_ASN1_SET_OF_PKCS7_RECIP_INFO
-#define d2i_ASN1_SET_OF_PKCS7_RECIP_INFO	d2i_ASN1_SET_OF_PKCS7_RECINF
-#endif
-
-#if 0 /* No longer needed, since safestack macro magic does the job */
-/* Hack the names created with DECLARE_ASN1_SET_OF(ACCESS_DESCRIPTION) */
-#undef i2d_ASN1_SET_OF_ACCESS_DESCRIPTION
-#define i2d_ASN1_SET_OF_ACCESS_DESCRIPTION	i2d_ASN1_SET_OF_ACC_DESC
-#undef d2i_ASN1_SET_OF_ACCESS_DESCRIPTION
-#define d2i_ASN1_SET_OF_ACCESS_DESCRIPTION	d2i_ASN1_SET_OF_ACC_DESC
-#endif
-
-/* Hack the names created with DECLARE_PEM_rw(NETSCAPE_CERT_SEQUENCE) */
-#undef PEM_read_NETSCAPE_CERT_SEQUENCE
-#define PEM_read_NETSCAPE_CERT_SEQUENCE		PEM_read_NS_CERT_SEQ
-#undef PEM_write_NETSCAPE_CERT_SEQUENCE
-#define PEM_write_NETSCAPE_CERT_SEQUENCE	PEM_write_NS_CERT_SEQ
-#undef PEM_read_bio_NETSCAPE_CERT_SEQUENCE
-#define PEM_read_bio_NETSCAPE_CERT_SEQUENCE	PEM_read_bio_NS_CERT_SEQ
-#undef PEM_write_bio_NETSCAPE_CERT_SEQUENCE
-#define PEM_write_bio_NETSCAPE_CERT_SEQUENCE	PEM_write_bio_NS_CERT_SEQ
-#undef PEM_write_cb_bio_NETSCAPE_CERT_SEQUENCE
-#define PEM_write_cb_bio_NETSCAPE_CERT_SEQUENCE	PEM_write_cb_bio_NS_CERT_SEQ
-
-/* Hack the names created with DECLARE_PEM_rw(PKCS8_PRIV_KEY_INFO) */
-#undef PEM_read_PKCS8_PRIV_KEY_INFO
-#define PEM_read_PKCS8_PRIV_KEY_INFO		PEM_read_P8_PRIV_KEY_INFO
-#undef PEM_write_PKCS8_PRIV_KEY_INFO
-#define PEM_write_PKCS8_PRIV_KEY_INFO		PEM_write_P8_PRIV_KEY_INFO
-#undef PEM_read_bio_PKCS8_PRIV_KEY_INFO
-#define PEM_read_bio_PKCS8_PRIV_KEY_INFO	PEM_read_bio_P8_PRIV_KEY_INFO
-#undef PEM_write_bio_PKCS8_PRIV_KEY_INFO
-#define PEM_write_bio_PKCS8_PRIV_KEY_INFO	PEM_write_bio_P8_PRIV_KEY_INFO
-#undef PEM_write_cb_bio_PKCS8_PRIV_KEY_INFO
-#define PEM_write_cb_bio_PKCS8_PRIV_KEY_INFO	PEM_wrt_cb_bio_P8_PRIV_KEY_INFO
-
-/* Hack other PEM names */
-#undef PEM_write_bio_PKCS8PrivateKey_nid
-#define PEM_write_bio_PKCS8PrivateKey_nid	PEM_write_bio_PKCS8PrivKey_nid
-
-/* Hack some long X509 names */
-#undef X509_REVOKED_get_ext_by_critical
-#define X509_REVOKED_get_ext_by_critical	X509_REVOKED_get_ext_by_critic
-#undef X509_policy_tree_get0_user_policies
-#define X509_policy_tree_get0_user_policies	X509_pcy_tree_get0_usr_policies
-#undef X509_policy_node_get0_qualifiers
-#define X509_policy_node_get0_qualifiers	X509_pcy_node_get0_qualifiers
-#undef X509_STORE_CTX_get_explicit_policy
-#define X509_STORE_CTX_get_explicit_policy	X509_STORE_CTX_get_expl_policy
-#undef X509_STORE_CTX_get0_current_issuer
-#define X509_STORE_CTX_get0_current_issuer	X509_STORE_CTX_get0_cur_issuer
-
-/* Hack some long CRYPTO names */
-#undef CRYPTO_set_dynlock_destroy_callback
-#define CRYPTO_set_dynlock_destroy_callback     CRYPTO_set_dynlock_destroy_cb
-#undef CRYPTO_set_dynlock_create_callback
-#define CRYPTO_set_dynlock_create_callback      CRYPTO_set_dynlock_create_cb
-#undef CRYPTO_set_dynlock_lock_callback
-#define CRYPTO_set_dynlock_lock_callback	CRYPTO_set_dynlock_lock_cb
-#undef CRYPTO_get_dynlock_lock_callback
-#define CRYPTO_get_dynlock_lock_callback	CRYPTO_get_dynlock_lock_cb
-#undef CRYPTO_get_dynlock_destroy_callback
-#define CRYPTO_get_dynlock_destroy_callback     CRYPTO_get_dynlock_destroy_cb
-#undef CRYPTO_get_dynlock_create_callback
-#define CRYPTO_get_dynlock_create_callback      CRYPTO_get_dynlock_create_cb
-#undef CRYPTO_set_locked_mem_ex_functions
-#define CRYPTO_set_locked_mem_ex_functions      CRYPTO_set_locked_mem_ex_funcs
-#undef CRYPTO_get_locked_mem_ex_functions
-#define CRYPTO_get_locked_mem_ex_functions      CRYPTO_get_locked_mem_ex_funcs
-
-/* Hack some long SSL names */
-#undef SSL_CTX_set_default_verify_paths
-#define SSL_CTX_set_default_verify_paths	SSL_CTX_set_def_verify_paths
-#undef SSL_get_ex_data_X509_STORE_CTX_idx
-#define SSL_get_ex_data_X509_STORE_CTX_idx      SSL_get_ex_d_X509_STORE_CTX_idx
-#undef SSL_add_file_cert_subjects_to_stack
-#define SSL_add_file_cert_subjects_to_stack     SSL_add_file_cert_subjs_to_stk
-#undef SSL_add_dir_cert_subjects_to_stack
-#define SSL_add_dir_cert_subjects_to_stack      SSL_add_dir_cert_subjs_to_stk
-#undef SSL_CTX_use_certificate_chain_file
-#define SSL_CTX_use_certificate_chain_file      SSL_CTX_use_cert_chain_file
-#undef SSL_CTX_set_cert_verify_callback
-#define SSL_CTX_set_cert_verify_callback	SSL_CTX_set_cert_verify_cb
-#undef SSL_CTX_set_default_passwd_cb_userdata
-#define SSL_CTX_set_default_passwd_cb_userdata  SSL_CTX_set_def_passwd_cb_ud
-#undef SSL_COMP_get_compression_methods
-#define SSL_COMP_get_compression_methods	SSL_COMP_get_compress_methods
-
-#undef ssl_add_clienthello_renegotiate_ext
-#define ssl_add_clienthello_renegotiate_ext	ssl_add_clienthello_reneg_ext
-#undef ssl_add_serverhello_renegotiate_ext
-#define ssl_add_serverhello_renegotiate_ext	ssl_add_serverhello_reneg_ext
-#undef ssl_parse_clienthello_renegotiate_ext
-#define ssl_parse_clienthello_renegotiate_ext	ssl_parse_clienthello_reneg_ext
-#undef ssl_parse_serverhello_renegotiate_ext
-#define ssl_parse_serverhello_renegotiate_ext	ssl_parse_serverhello_reneg_ext
-
-/* Hack some long ENGINE names */
-#undef ENGINE_get_default_BN_mod_exp_crt
-#define ENGINE_get_default_BN_mod_exp_crt	ENGINE_get_def_BN_mod_exp_crt
-#undef ENGINE_set_default_BN_mod_exp_crt
-#define ENGINE_set_default_BN_mod_exp_crt	ENGINE_set_def_BN_mod_exp_crt
-#undef ENGINE_set_load_privkey_function
-#define ENGINE_set_load_privkey_function	ENGINE_set_load_privkey_fn
-#undef ENGINE_get_load_privkey_function
-#define ENGINE_get_load_privkey_function	ENGINE_get_load_privkey_fn
-#undef ENGINE_unregister_pkey_asn1_meths
-#define ENGINE_unregister_pkey_asn1_meths	ENGINE_unreg_pkey_asn1_meths
-#undef ENGINE_register_all_pkey_asn1_meths
-#define ENGINE_register_all_pkey_asn1_meths	ENGINE_reg_all_pkey_asn1_meths
-#undef ENGINE_set_default_pkey_asn1_meths
-#define ENGINE_set_default_pkey_asn1_meths	ENGINE_set_def_pkey_asn1_meths
-#undef ENGINE_get_pkey_asn1_meth_engine
-#define ENGINE_get_pkey_asn1_meth_engine	ENGINE_get_pkey_asn1_meth_eng
-#undef ENGINE_set_load_ssl_client_cert_function
-#define ENGINE_set_load_ssl_client_cert_function \
-						ENGINE_set_ld_ssl_clnt_cert_fn
-#undef ENGINE_get_ssl_client_cert_function
-#define ENGINE_get_ssl_client_cert_function	ENGINE_get_ssl_client_cert_fn
-
-/* Hack some long OCSP names */
-#undef OCSP_REQUEST_get_ext_by_critical
-#define OCSP_REQUEST_get_ext_by_critical	OCSP_REQUEST_get_ext_by_crit
-#undef OCSP_BASICRESP_get_ext_by_critical
-#define OCSP_BASICRESP_get_ext_by_critical      OCSP_BASICRESP_get_ext_by_crit
-#undef OCSP_SINGLERESP_get_ext_by_critical
-#define OCSP_SINGLERESP_get_ext_by_critical     OCSP_SINGLERESP_get_ext_by_crit
-
-/* Hack some long DES names */
-#undef _ossl_old_des_ede3_cfb64_encrypt
-#define _ossl_old_des_ede3_cfb64_encrypt	_ossl_odes_ede3_cfb64_encrypt
-#undef _ossl_old_des_ede3_ofb64_encrypt
-#define _ossl_old_des_ede3_ofb64_encrypt	_ossl_odes_ede3_ofb64_encrypt
-
-/* Hack some long EVP names */
-#undef OPENSSL_add_all_algorithms_noconf
-#define OPENSSL_add_all_algorithms_noconf	OPENSSL_add_all_algo_noconf
-#undef OPENSSL_add_all_algorithms_conf
-#define OPENSSL_add_all_algorithms_conf		OPENSSL_add_all_algo_conf
-#undef EVP_PKEY_meth_set_verify_recover
-#define EVP_PKEY_meth_set_verify_recover	EVP_PKEY_meth_set_vrfy_recover
-
-/* Hack some long EC names */
-#undef EC_GROUP_set_point_conversion_form
-#define EC_GROUP_set_point_conversion_form	EC_GROUP_set_point_conv_form
-#undef EC_GROUP_get_point_conversion_form
-#define EC_GROUP_get_point_conversion_form	EC_GROUP_get_point_conv_form
-#undef EC_GROUP_clear_free_all_extra_data
-#define EC_GROUP_clear_free_all_extra_data	EC_GROUP_clr_free_all_xtra_data
-#undef EC_POINT_set_Jprojective_coordinates_GFp
-#define EC_POINT_set_Jprojective_coordinates_GFp \
-                                                EC_POINT_set_Jproj_coords_GFp
-#undef EC_POINT_get_Jprojective_coordinates_GFp
-#define EC_POINT_get_Jprojective_coordinates_GFp \
-                                                EC_POINT_get_Jproj_coords_GFp
-#undef EC_POINT_set_affine_coordinates_GFp
-#define EC_POINT_set_affine_coordinates_GFp     EC_POINT_set_affine_coords_GFp
-#undef EC_POINT_get_affine_coordinates_GFp
-#define EC_POINT_get_affine_coordinates_GFp     EC_POINT_get_affine_coords_GFp
-#undef EC_POINT_set_compressed_coordinates_GFp
-#define EC_POINT_set_compressed_coordinates_GFp EC_POINT_set_compr_coords_GFp
-#undef EC_POINT_set_affine_coordinates_GF2m
-#define EC_POINT_set_affine_coordinates_GF2m    EC_POINT_set_affine_coords_GF2m
-#undef EC_POINT_get_affine_coordinates_GF2m
-#define EC_POINT_get_affine_coordinates_GF2m    EC_POINT_get_affine_coords_GF2m
-#undef EC_POINT_set_compressed_coordinates_GF2m
-#define EC_POINT_set_compressed_coordinates_GF2m \
-                                                EC_POINT_set_compr_coords_GF2m
-#undef ec_GF2m_simple_group_clear_finish
-#define ec_GF2m_simple_group_clear_finish	ec_GF2m_simple_grp_clr_finish
-#undef ec_GF2m_simple_group_check_discriminant
-#define ec_GF2m_simple_group_check_discriminant	ec_GF2m_simple_grp_chk_discrim
-#undef ec_GF2m_simple_point_clear_finish
-#define ec_GF2m_simple_point_clear_finish	ec_GF2m_simple_pt_clr_finish
-#undef ec_GF2m_simple_point_set_to_infinity
-#define ec_GF2m_simple_point_set_to_infinity	ec_GF2m_simple_pt_set_to_inf
-#undef ec_GF2m_simple_points_make_affine
-#define ec_GF2m_simple_points_make_affine	ec_GF2m_simple_pts_make_affine
-#undef ec_GF2m_simple_point_set_affine_coordinates
-#define ec_GF2m_simple_point_set_affine_coordinates \
-                                                ec_GF2m_smp_pt_set_af_coords
-#undef ec_GF2m_simple_point_get_affine_coordinates
-#define ec_GF2m_simple_point_get_affine_coordinates \
-                                                ec_GF2m_smp_pt_get_af_coords
-#undef ec_GF2m_simple_set_compressed_coordinates
-#define ec_GF2m_simple_set_compressed_coordinates \
-                                                ec_GF2m_smp_set_compr_coords
-#undef ec_GFp_simple_group_set_curve_GFp
-#define ec_GFp_simple_group_set_curve_GFp       ec_GFp_simple_grp_set_curve_GFp
-#undef ec_GFp_simple_group_get_curve_GFp
-#define ec_GFp_simple_group_get_curve_GFp       ec_GFp_simple_grp_get_curve_GFp
-#undef ec_GFp_simple_group_clear_finish
-#define ec_GFp_simple_group_clear_finish	ec_GFp_simple_grp_clear_finish
-#undef ec_GFp_simple_group_set_generator
-#define ec_GFp_simple_group_set_generator       ec_GFp_simple_grp_set_generator
-#undef ec_GFp_simple_group_get0_generator
-#define ec_GFp_simple_group_get0_generator      ec_GFp_simple_grp_gt0_generator
-#undef ec_GFp_simple_group_get_cofactor
-#define ec_GFp_simple_group_get_cofactor	ec_GFp_simple_grp_get_cofactor
-#undef ec_GFp_simple_point_clear_finish
-#define ec_GFp_simple_point_clear_finish	ec_GFp_simple_pt_clear_finish
-#undef ec_GFp_simple_point_set_to_infinity
-#define ec_GFp_simple_point_set_to_infinity     ec_GFp_simple_pt_set_to_inf
-#undef ec_GFp_simple_points_make_affine
-#define ec_GFp_simple_points_make_affine	ec_GFp_simple_pts_make_affine
-#undef ec_GFp_simple_group_get_curve_GFp
-#define ec_GFp_simple_group_get_curve_GFp       ec_GFp_simple_grp_get_curve_GFp
-#undef ec_GFp_simple_set_Jprojective_coordinates_GFp
-#define ec_GFp_simple_set_Jprojective_coordinates_GFp \
-                                                ec_GFp_smp_set_Jproj_coords_GFp
-#undef ec_GFp_simple_get_Jprojective_coordinates_GFp
-#define ec_GFp_simple_get_Jprojective_coordinates_GFp \
-                                                ec_GFp_smp_get_Jproj_coords_GFp
-#undef ec_GFp_simple_point_set_affine_coordinates_GFp
-#define ec_GFp_simple_point_set_affine_coordinates_GFp \
-                                                ec_GFp_smp_pt_set_af_coords_GFp
-#undef ec_GFp_simple_point_get_affine_coordinates_GFp
-#define ec_GFp_simple_point_get_affine_coordinates_GFp \
-                                                ec_GFp_smp_pt_get_af_coords_GFp
-#undef ec_GFp_simple_set_compressed_coordinates_GFp
-#define ec_GFp_simple_set_compressed_coordinates_GFp \
-                                                ec_GFp_smp_set_compr_coords_GFp
-#undef ec_GFp_simple_point_set_affine_coordinates
-#define ec_GFp_simple_point_set_affine_coordinates \
-                                                ec_GFp_smp_pt_set_af_coords
-#undef ec_GFp_simple_point_get_affine_coordinates
-#define ec_GFp_simple_point_get_affine_coordinates \
-                                                ec_GFp_smp_pt_get_af_coords
-#undef ec_GFp_simple_set_compressed_coordinates
-#define ec_GFp_simple_set_compressed_coordinates \
-                                                ec_GFp_smp_set_compr_coords
-#undef ec_GFp_simple_group_check_discriminant
-#define ec_GFp_simple_group_check_discriminant	ec_GFp_simple_grp_chk_discrim
-
-/* Hack som long STORE names */
-#undef STORE_method_set_initialise_function
-#define STORE_method_set_initialise_function	STORE_meth_set_initialise_fn
-#undef STORE_method_set_cleanup_function
-#define STORE_method_set_cleanup_function	STORE_meth_set_cleanup_fn
-#undef STORE_method_set_generate_function
-#define STORE_method_set_generate_function	STORE_meth_set_generate_fn
-#undef STORE_method_set_modify_function
-#define STORE_method_set_modify_function	STORE_meth_set_modify_fn
-#undef STORE_method_set_revoke_function
-#define STORE_method_set_revoke_function	STORE_meth_set_revoke_fn
-#undef STORE_method_set_delete_function
-#define STORE_method_set_delete_function	STORE_meth_set_delete_fn
-#undef STORE_method_set_list_start_function
-#define STORE_method_set_list_start_function	STORE_meth_set_list_start_fn
-#undef STORE_method_set_list_next_function
-#define STORE_method_set_list_next_function	STORE_meth_set_list_next_fn
-#undef STORE_method_set_list_end_function
-#define STORE_method_set_list_end_function	STORE_meth_set_list_end_fn
-#undef STORE_method_set_update_store_function
-#define STORE_method_set_update_store_function	STORE_meth_set_update_store_fn
-#undef STORE_method_set_lock_store_function
-#define STORE_method_set_lock_store_function	STORE_meth_set_lock_store_fn
-#undef STORE_method_set_unlock_store_function
-#define STORE_method_set_unlock_store_function	STORE_meth_set_unlock_store_fn
-#undef STORE_method_get_initialise_function
-#define STORE_method_get_initialise_function	STORE_meth_get_initialise_fn
-#undef STORE_method_get_cleanup_function
-#define STORE_method_get_cleanup_function	STORE_meth_get_cleanup_fn
-#undef STORE_method_get_generate_function
-#define STORE_method_get_generate_function	STORE_meth_get_generate_fn
-#undef STORE_method_get_modify_function
-#define STORE_method_get_modify_function	STORE_meth_get_modify_fn
-#undef STORE_method_get_revoke_function
-#define STORE_method_get_revoke_function	STORE_meth_get_revoke_fn
-#undef STORE_method_get_delete_function
-#define STORE_method_get_delete_function	STORE_meth_get_delete_fn
-#undef STORE_method_get_list_start_function
-#define STORE_method_get_list_start_function	STORE_meth_get_list_start_fn
-#undef STORE_method_get_list_next_function
-#define STORE_method_get_list_next_function	STORE_meth_get_list_next_fn
-#undef STORE_method_get_list_end_function
-#define STORE_method_get_list_end_function	STORE_meth_get_list_end_fn
-#undef STORE_method_get_update_store_function
-#define STORE_method_get_update_store_function	STORE_meth_get_update_store_fn
-#undef STORE_method_get_lock_store_function
-#define STORE_method_get_lock_store_function	STORE_meth_get_lock_store_fn
-#undef STORE_method_get_unlock_store_function
-#define STORE_method_get_unlock_store_function	STORE_meth_get_unlock_store_fn
-
-/* Hack some long TS names */
-#undef TS_RESP_CTX_set_status_info_cond
-#define TS_RESP_CTX_set_status_info_cond	TS_RESP_CTX_set_stat_info_cond
-#undef TS_RESP_CTX_set_clock_precision_digits
-#define TS_RESP_CTX_set_clock_precision_digits	TS_RESP_CTX_set_clk_prec_digits
-#undef TS_CONF_set_clock_precision_digits
-#define TS_CONF_set_clock_precision_digits	TS_CONF_set_clk_prec_digits
-
-/* Hack some long CMS names */
-#undef CMS_RecipientInfo_ktri_get0_algs
-#define CMS_RecipientInfo_ktri_get0_algs	CMS_RecipInfo_ktri_get0_algs
-#undef CMS_RecipientInfo_ktri_get0_signer_id
-#define CMS_RecipientInfo_ktri_get0_signer_id	CMS_RecipInfo_ktri_get0_sigr_id
-#undef CMS_OtherRevocationInfoFormat_it
-#define CMS_OtherRevocationInfoFormat_it	CMS_OtherRevocInfoFormat_it
-#undef CMS_KeyAgreeRecipientIdentifier_it
-#define CMS_KeyAgreeRecipientIdentifier_it	CMS_KeyAgreeRecipIdentifier_it
-#undef CMS_OriginatorIdentifierOrKey_it
-#define CMS_OriginatorIdentifierOrKey_it	CMS_OriginatorIdOrKey_it
-#undef cms_SignerIdentifier_get0_signer_id
-#define cms_SignerIdentifier_get0_signer_id	cms_SignerId_get0_signer_id
-
-/* Hack some long DTLS1 names */
-#undef dtls1_retransmit_buffered_messages
-#define dtls1_retransmit_buffered_messages	dtls1_retransmit_buffered_msgs
-
-/* Hack some long UI names */
-#undef UI_method_get_prompt_constructor
-#define UI_method_get_prompt_constructor	UI_method_get_prompt_constructr
-#undef UI_method_set_prompt_constructor
-#define UI_method_set_prompt_constructor	UI_method_set_prompt_constructr
-
-#endif /* defined OPENSSL_SYS_VMS */
-
-
-/* Case insensitive linking causes problems.... */
-#if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_OS2)
-#undef ERR_load_CRYPTO_strings
-#define ERR_load_CRYPTO_strings			ERR_load_CRYPTOlib_strings
-#undef OCSP_crlID_new
-#define OCSP_crlID_new				OCSP_crlID2_new
-
-#undef d2i_ECPARAMETERS
-#define d2i_ECPARAMETERS			d2i_UC_ECPARAMETERS
-#undef i2d_ECPARAMETERS
-#define i2d_ECPARAMETERS			i2d_UC_ECPARAMETERS
-#undef d2i_ECPKPARAMETERS
-#define d2i_ECPKPARAMETERS			d2i_UC_ECPKPARAMETERS
-#undef i2d_ECPKPARAMETERS
-#define i2d_ECPKPARAMETERS			i2d_UC_ECPKPARAMETERS
-
-/* These functions do not seem to exist!  However, I'm paranoid...
-   Original command in x509v3.h:
-   These functions are being redefined in another directory,
-   and clash when the linker is case-insensitive, so let's
-   hide them a little, by giving them an extra 'o' at the
-   beginning of the name... */
-#undef X509v3_cleanup_extensions
-#define X509v3_cleanup_extensions		oX509v3_cleanup_extensions
-#undef X509v3_add_extension
-#define X509v3_add_extension			oX509v3_add_extension
-#undef X509v3_add_netscape_extensions
-#define X509v3_add_netscape_extensions		oX509v3_add_netscape_extensions
-#undef X509v3_add_standard_extensions
-#define X509v3_add_standard_extensions		oX509v3_add_standard_extensions
-
-/* This one clashes with CMS_data_create */
-#undef cms_Data_create
-#define cms_Data_create				priv_cms_Data_create
-
-#endif
-
-
-#endif /* ! defined HEADER_VMS_IDHACKS_H */
diff --git a/extra_lib/include/openssl/tls1.h b/extra_lib/include/openssl/tls1.h
deleted file mode 100644
index b3cc8f0..0000000
--- a/extra_lib/include/openssl/tls1.h
+++ /dev/null
@@ -1,532 +0,0 @@
-/* ssl/tls1.h */
-/* Copyright (C) 1995-1998 Eric Young (eay at cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay at cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh at cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay at cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh at cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-/* ====================================================================
- * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. 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.
- *
- * 3. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
- *
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
- *    endorse or promote products derived from this software without
- *    prior written permission. For written permission, please contact
- *    openssl-core at openssl.org.
- *
- * 5. Products derived from this software may not be called "OpenSSL"
- *    nor may "OpenSSL" appear in their names without prior written
- *    permission of the OpenSSL Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- *    acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
- *
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
- * EXPRESSED 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 OpenSSL PROJECT OR
- * ITS 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.
- * ====================================================================
- *
- * This product includes cryptographic software written by Eric Young
- * (eay at cryptsoft.com).  This product includes software written by Tim
- * Hudson (tjh at cryptsoft.com).
- *
- */
-/* ====================================================================
- * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
- *
- * Portions of the attached software ("Contribution") are developed by 
- * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
- *
- * The Contribution is licensed pursuant to the OpenSSL open source
- * license provided above.
- *
- * ECC cipher suite support in OpenSSL originally written by
- * Vipul Gupta and Sumit Gupta of Sun Microsystems Laboratories.
- *
- */
-/* ====================================================================
- * Copyright 2005 Nokia. All rights reserved.
- *
- * The portions of the attached software ("Contribution") is developed by
- * Nokia Corporation and is licensed pursuant to the OpenSSL open source
- * license.
- *
- * The Contribution, originally written by Mika Kousa and Pasi Eronen of
- * Nokia Corporation, consists of the "PSK" (Pre-Shared Key) ciphersuites
- * support (see RFC 4279) to OpenSSL.
- *
- * No patent licenses or other rights except those expressly stated in
- * the OpenSSL open source license shall be deemed granted or received
- * expressly, by implication, estoppel, or otherwise.
- *
- * No assurances are provided by Nokia that the Contribution does not
- * infringe the patent or other intellectual property rights of any third
- * party or that the license provides you with all the necessary rights
- * to make use of the Contribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. IN
- * ADDITION TO THE DISCLAIMERS INCLUDED IN THE LICENSE, NOKIA
- * SPECIFICALLY DISCLAIMS ANY LIABILITY FOR CLAIMS BROUGHT BY YOU OR ANY
- * OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OR
- * OTHERWISE.
- */
-
-#ifndef HEADER_TLS1_H 
-#define HEADER_TLS1_H 
-
-#include <openssl/buffer.h>
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-#define TLS1_ALLOW_EXPERIMENTAL_CIPHERSUITES	0
-
-#define TLS1_VERSION			0x0301
-#define TLS1_VERSION_MAJOR		0x03
-#define TLS1_VERSION_MINOR		0x01
-
-#define TLS1_AD_DECRYPTION_FAILED	21
-#define TLS1_AD_RECORD_OVERFLOW		22
-#define TLS1_AD_UNKNOWN_CA		48	/* fatal */
-#define TLS1_AD_ACCESS_DENIED		49	/* fatal */
-#define TLS1_AD_DECODE_ERROR		50	/* fatal */
-#define TLS1_AD_DECRYPT_ERROR		51
-#define TLS1_AD_EXPORT_RESTRICTION	60	/* fatal */
-#define TLS1_AD_PROTOCOL_VERSION	70	/* fatal */
-#define TLS1_AD_INSUFFICIENT_SECURITY	71	/* fatal */
-#define TLS1_AD_INTERNAL_ERROR		80	/* fatal */
-#define TLS1_AD_USER_CANCELLED		90
-#define TLS1_AD_NO_RENEGOTIATION	100
-/* codes 110-114 are from RFC3546 */
-#define TLS1_AD_UNSUPPORTED_EXTENSION	110
-#define TLS1_AD_CERTIFICATE_UNOBTAINABLE 111
-#define TLS1_AD_UNRECOGNIZED_NAME 	112
-#define TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE 113
-#define TLS1_AD_BAD_CERTIFICATE_HASH_VALUE 114
-#define TLS1_AD_UNKNOWN_PSK_IDENTITY	115	/* fatal */
-
-/* ExtensionType values from RFC3546 / RFC4366 */
-#define TLSEXT_TYPE_server_name			0
-#define TLSEXT_TYPE_max_fragment_length		1
-#define TLSEXT_TYPE_client_certificate_url	2
-#define TLSEXT_TYPE_trusted_ca_keys		3
-#define TLSEXT_TYPE_truncated_hmac		4
-#define TLSEXT_TYPE_status_request		5
-/* ExtensionType values from RFC4492 */
-#define TLSEXT_TYPE_elliptic_curves		10
-#define TLSEXT_TYPE_ec_point_formats		11
-#define TLSEXT_TYPE_session_ticket		35
-/* ExtensionType value from draft-rescorla-tls-opaque-prf-input-00.txt */
-#if 0 /* will have to be provided externally for now ,
-       * i.e. build with -DTLSEXT_TYPE_opaque_prf_input=38183
-       * using whatever extension number you'd like to try */
-# define TLSEXT_TYPE_opaque_prf_input		?? */
-#endif
-
-/* Temporary extension type */
-#define TLSEXT_TYPE_renegotiate                 0xff01
-
-/* NameType value from RFC 3546 */
-#define TLSEXT_NAMETYPE_host_name 0
-/* status request value from RFC 3546 */
-#define TLSEXT_STATUSTYPE_ocsp 1
-
-/* ECPointFormat values from draft-ietf-tls-ecc-12 */
-#define TLSEXT_ECPOINTFORMAT_first			0
-#define TLSEXT_ECPOINTFORMAT_uncompressed		0
-#define TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime	1
-#define TLSEXT_ECPOINTFORMAT_ansiX962_compressed_char2	2
-#define TLSEXT_ECPOINTFORMAT_last			2
-
-#ifndef OPENSSL_NO_TLSEXT
-
-#define TLSEXT_MAXLEN_host_name 255
-
-const char *SSL_get_servername(const SSL *s, const int type) ;
-int SSL_get_servername_type(const SSL *s) ;
-
-#define SSL_set_tlsext_host_name(s,name) \
-SSL_ctrl(s,SSL_CTRL_SET_TLSEXT_HOSTNAME,TLSEXT_NAMETYPE_host_name,(char *)name)
-
-#define SSL_set_tlsext_debug_callback(ssl, cb) \
-SSL_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_DEBUG_CB,(void (*)(void))cb)
-
-#define SSL_set_tlsext_debug_arg(ssl, arg) \
-SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_DEBUG_ARG,0, (void *)arg)
-
-#define SSL_set_tlsext_status_type(ssl, type) \
-SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE,type, NULL)
-
-#define SSL_get_tlsext_status_exts(ssl, arg) \
-SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS,0, (void *)arg)
-
-#define SSL_set_tlsext_status_exts(ssl, arg) \
-SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS,0, (void *)arg)
-
-#define SSL_get_tlsext_status_ids(ssl, arg) \
-SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS,0, (void *)arg)
-
-#define SSL_set_tlsext_status_ids(ssl, arg) \
-SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS,0, (void *)arg)
-
-#define SSL_get_tlsext_status_ocsp_resp(ssl, arg) \
-SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP,0, (void *)arg)
-
-#define SSL_set_tlsext_status_ocsp_resp(ssl, arg, arglen) \
-SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP,arglen, (void *)arg)
-
-#define SSL_CTX_set_tlsext_servername_callback(ctx, cb) \
-SSL_CTX_callback_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_CB,(void (*)(void))cb)
-
-#define SSL_TLSEXT_ERR_OK 0
-#define SSL_TLSEXT_ERR_ALERT_WARNING 1
-#define SSL_TLSEXT_ERR_ALERT_FATAL 2
-#define SSL_TLSEXT_ERR_NOACK 3
-
-#define SSL_CTX_set_tlsext_servername_arg(ctx, arg) \
-SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG,0, (void *)arg)
-
-#define SSL_CTX_get_tlsext_ticket_keys(ctx, keys, keylen) \
-	SSL_CTX_ctrl((ctx),SSL_CTRL_GET_TLSEXT_TICKET_KEYS,(keylen),(keys))
-#define SSL_CTX_set_tlsext_ticket_keys(ctx, keys, keylen) \
-	SSL_CTX_ctrl((ctx),SSL_CTRL_SET_TLSEXT_TICKET_KEYS,(keylen),(keys))
-
-#define SSL_CTX_set_tlsext_status_cb(ssl, cb) \
-SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB,(void (*)(void))cb)
-
-#define SSL_CTX_set_tlsext_status_arg(ssl, arg) \
-SSL_CTX_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG,0, (void *)arg)
-
-#define SSL_set_tlsext_opaque_prf_input(s, src, len) \
-SSL_ctrl(s,SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT, len, src)
-#define SSL_CTX_set_tlsext_opaque_prf_input_callback(ctx, cb) \
-SSL_CTX_callback_ctrl(ctx,SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT_CB, (void (*)(void))cb)
-#define SSL_CTX_set_tlsext_opaque_prf_input_callback_arg(ctx, arg) \
-SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT_CB_ARG, 0, arg)
-
-#define SSL_CTX_set_tlsext_ticket_key_cb(ssl, cb) \
-SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,(void (*)(void))cb)
-
-#endif
-
-/* PSK ciphersuites from 4279 */
-#define TLS1_CK_PSK_WITH_RC4_128_SHA                    0x0300008A
-#define TLS1_CK_PSK_WITH_3DES_EDE_CBC_SHA               0x0300008B
-#define TLS1_CK_PSK_WITH_AES_128_CBC_SHA                0x0300008C
-#define TLS1_CK_PSK_WITH_AES_256_CBC_SHA                0x0300008D
-
-/* Additional TLS ciphersuites from expired Internet Draft
- * draft-ietf-tls-56-bit-ciphersuites-01.txt
- * (available if TLS1_ALLOW_EXPERIMENTAL_CIPHERSUITES is defined, see
- * s3_lib.c).  We actually treat them like SSL 3.0 ciphers, which we probably
- * shouldn't.  Note that the first two are actually not in the IDs. */
-#define TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_MD5		0x03000060 /* not in ID */
-#define TLS1_CK_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5	0x03000061 /* not in ID */
-#define TLS1_CK_RSA_EXPORT1024_WITH_DES_CBC_SHA		0x03000062
-#define TLS1_CK_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA	0x03000063
-#define TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_SHA		0x03000064
-#define TLS1_CK_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA	0x03000065
-#define TLS1_CK_DHE_DSS_WITH_RC4_128_SHA		0x03000066
-
-/* AES ciphersuites from RFC3268 */
-
-#define TLS1_CK_RSA_WITH_AES_128_SHA			0x0300002F
-#define TLS1_CK_DH_DSS_WITH_AES_128_SHA			0x03000030
-#define TLS1_CK_DH_RSA_WITH_AES_128_SHA			0x03000031
-#define TLS1_CK_DHE_DSS_WITH_AES_128_SHA		0x03000032
-#define TLS1_CK_DHE_RSA_WITH_AES_128_SHA		0x03000033
-#define TLS1_CK_ADH_WITH_AES_128_SHA			0x03000034
-
-#define TLS1_CK_RSA_WITH_AES_256_SHA			0x03000035
-#define TLS1_CK_DH_DSS_WITH_AES_256_SHA			0x03000036
-#define TLS1_CK_DH_RSA_WITH_AES_256_SHA			0x03000037
-#define TLS1_CK_DHE_DSS_WITH_AES_256_SHA		0x03000038
-#define TLS1_CK_DHE_RSA_WITH_AES_256_SHA		0x03000039
-#define TLS1_CK_ADH_WITH_AES_256_SHA			0x0300003A
-
-/* Camellia ciphersuites from RFC4132 */
-#define TLS1_CK_RSA_WITH_CAMELLIA_128_CBC_SHA		0x03000041
-#define TLS1_CK_DH_DSS_WITH_CAMELLIA_128_CBC_SHA	0x03000042
-#define TLS1_CK_DH_RSA_WITH_CAMELLIA_128_CBC_SHA	0x03000043
-#define TLS1_CK_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA	0x03000044
-#define TLS1_CK_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA	0x03000045
-#define TLS1_CK_ADH_WITH_CAMELLIA_128_CBC_SHA		0x03000046
-
-#define TLS1_CK_RSA_WITH_CAMELLIA_256_CBC_SHA		0x03000084
-#define TLS1_CK_DH_DSS_WITH_CAMELLIA_256_CBC_SHA	0x03000085
-#define TLS1_CK_DH_RSA_WITH_CAMELLIA_256_CBC_SHA	0x03000086
-#define TLS1_CK_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA	0x03000087
-#define TLS1_CK_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA	0x03000088
-#define TLS1_CK_ADH_WITH_CAMELLIA_256_CBC_SHA		0x03000089
-
-/* SEED ciphersuites from RFC4162 */
-#define TLS1_CK_RSA_WITH_SEED_SHA                       0x03000096
-#define TLS1_CK_DH_DSS_WITH_SEED_SHA                    0x03000097
-#define TLS1_CK_DH_RSA_WITH_SEED_SHA                    0x03000098
-#define TLS1_CK_DHE_DSS_WITH_SEED_SHA                   0x03000099
-#define TLS1_CK_DHE_RSA_WITH_SEED_SHA                   0x0300009A
-#define TLS1_CK_ADH_WITH_SEED_SHA                	0x0300009B
-
-/* ECC ciphersuites from draft-ietf-tls-ecc-12.txt with changes soon to be in draft 13 */
-#define TLS1_CK_ECDH_ECDSA_WITH_NULL_SHA                0x0300C001
-#define TLS1_CK_ECDH_ECDSA_WITH_RC4_128_SHA             0x0300C002
-#define TLS1_CK_ECDH_ECDSA_WITH_DES_192_CBC3_SHA        0x0300C003
-#define TLS1_CK_ECDH_ECDSA_WITH_AES_128_CBC_SHA         0x0300C004
-#define TLS1_CK_ECDH_ECDSA_WITH_AES_256_CBC_SHA         0x0300C005
-
-#define TLS1_CK_ECDHE_ECDSA_WITH_NULL_SHA               0x0300C006
-#define TLS1_CK_ECDHE_ECDSA_WITH_RC4_128_SHA            0x0300C007
-#define TLS1_CK_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA       0x0300C008
-#define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA        0x0300C009
-#define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA        0x0300C00A
-
-#define TLS1_CK_ECDH_RSA_WITH_NULL_SHA                  0x0300C00B
-#define TLS1_CK_ECDH_RSA_WITH_RC4_128_SHA               0x0300C00C
-#define TLS1_CK_ECDH_RSA_WITH_DES_192_CBC3_SHA          0x0300C00D
-#define TLS1_CK_ECDH_RSA_WITH_AES_128_CBC_SHA           0x0300C00E
-#define TLS1_CK_ECDH_RSA_WITH_AES_256_CBC_SHA           0x0300C00F
-
-#define TLS1_CK_ECDHE_RSA_WITH_NULL_SHA                 0x0300C010
-#define TLS1_CK_ECDHE_RSA_WITH_RC4_128_SHA              0x0300C011
-#define TLS1_CK_ECDHE_RSA_WITH_DES_192_CBC3_SHA         0x0300C012
-#define TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA          0x0300C013
-#define TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA          0x0300C014
-
-#define TLS1_CK_ECDH_anon_WITH_NULL_SHA                 0x0300C015
-#define TLS1_CK_ECDH_anon_WITH_RC4_128_SHA              0x0300C016
-#define TLS1_CK_ECDH_anon_WITH_DES_192_CBC3_SHA         0x0300C017
-#define TLS1_CK_ECDH_anon_WITH_AES_128_CBC_SHA          0x0300C018
-#define TLS1_CK_ECDH_anon_WITH_AES_256_CBC_SHA          0x0300C019
-
-/* XXX
- * Inconsistency alert:
- * The OpenSSL names of ciphers with ephemeral DH here include the string
- * "DHE", while elsewhere it has always been "EDH".
- * (The alias for the list of all such ciphers also is "EDH".)
- * The specifications speak of "EDH"; maybe we should allow both forms
- * for everything. */
-#define TLS1_TXT_RSA_EXPORT1024_WITH_RC4_56_MD5		"EXP1024-RC4-MD5"
-#define TLS1_TXT_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5	"EXP1024-RC2-CBC-MD5"
-#define TLS1_TXT_RSA_EXPORT1024_WITH_DES_CBC_SHA	"EXP1024-DES-CBC-SHA"
-#define TLS1_TXT_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA	"EXP1024-DHE-DSS-DES-CBC-SHA"
-#define TLS1_TXT_RSA_EXPORT1024_WITH_RC4_56_SHA		"EXP1024-RC4-SHA"
-#define TLS1_TXT_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA	"EXP1024-DHE-DSS-RC4-SHA"
-#define TLS1_TXT_DHE_DSS_WITH_RC4_128_SHA		"DHE-DSS-RC4-SHA"
-
-/* AES ciphersuites from RFC3268 */
-#define TLS1_TXT_RSA_WITH_AES_128_SHA			"AES128-SHA"
-#define TLS1_TXT_DH_DSS_WITH_AES_128_SHA		"DH-DSS-AES128-SHA"
-#define TLS1_TXT_DH_RSA_WITH_AES_128_SHA		"DH-RSA-AES128-SHA"
-#define TLS1_TXT_DHE_DSS_WITH_AES_128_SHA		"DHE-DSS-AES128-SHA"
-#define TLS1_TXT_DHE_RSA_WITH_AES_128_SHA		"DHE-RSA-AES128-SHA"
-#define TLS1_TXT_ADH_WITH_AES_128_SHA			"ADH-AES128-SHA"
-
-#define TLS1_TXT_RSA_WITH_AES_256_SHA			"AES256-SHA"
-#define TLS1_TXT_DH_DSS_WITH_AES_256_SHA		"DH-DSS-AES256-SHA"
-#define TLS1_TXT_DH_RSA_WITH_AES_256_SHA		"DH-RSA-AES256-SHA"
-#define TLS1_TXT_DHE_DSS_WITH_AES_256_SHA		"DHE-DSS-AES256-SHA"
-#define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA		"DHE-RSA-AES256-SHA"
-#define TLS1_TXT_ADH_WITH_AES_256_SHA			"ADH-AES256-SHA"
-
-/* ECC ciphersuites from draft-ietf-tls-ecc-01.txt (Mar 15, 2001) */
-#define TLS1_TXT_ECDH_ECDSA_WITH_NULL_SHA               "ECDH-ECDSA-NULL-SHA"
-#define TLS1_TXT_ECDH_ECDSA_WITH_RC4_128_SHA            "ECDH-ECDSA-RC4-SHA"
-#define TLS1_TXT_ECDH_ECDSA_WITH_DES_192_CBC3_SHA       "ECDH-ECDSA-DES-CBC3-SHA"
-#define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_CBC_SHA        "ECDH-ECDSA-AES128-SHA"
-#define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_CBC_SHA        "ECDH-ECDSA-AES256-SHA"
-
-#define TLS1_TXT_ECDHE_ECDSA_WITH_NULL_SHA              "ECDHE-ECDSA-NULL-SHA"
-#define TLS1_TXT_ECDHE_ECDSA_WITH_RC4_128_SHA           "ECDHE-ECDSA-RC4-SHA"
-#define TLS1_TXT_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA      "ECDHE-ECDSA-DES-CBC3-SHA"
-#define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA       "ECDHE-ECDSA-AES128-SHA"
-#define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CBC_SHA       "ECDHE-ECDSA-AES256-SHA"
-
-#define TLS1_TXT_ECDH_RSA_WITH_NULL_SHA                 "ECDH-RSA-NULL-SHA"
-#define TLS1_TXT_ECDH_RSA_WITH_RC4_128_SHA              "ECDH-RSA-RC4-SHA"
-#define TLS1_TXT_ECDH_RSA_WITH_DES_192_CBC3_SHA         "ECDH-RSA-DES-CBC3-SHA"
-#define TLS1_TXT_ECDH_RSA_WITH_AES_128_CBC_SHA          "ECDH-RSA-AES128-SHA"
-#define TLS1_TXT_ECDH_RSA_WITH_AES_256_CBC_SHA          "ECDH-RSA-AES256-SHA"
-
-#define TLS1_TXT_ECDHE_RSA_WITH_NULL_SHA                "ECDHE-RSA-NULL-SHA"
-#define TLS1_TXT_ECDHE_RSA_WITH_RC4_128_SHA             "ECDHE-RSA-RC4-SHA"
-#define TLS1_TXT_ECDHE_RSA_WITH_DES_192_CBC3_SHA        "ECDHE-RSA-DES-CBC3-SHA"
-#define TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA         "ECDHE-RSA-AES128-SHA"
-#define TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA         "ECDHE-RSA-AES256-SHA"
-
-#define TLS1_TXT_ECDH_anon_WITH_NULL_SHA                "AECDH-NULL-SHA"
-#define TLS1_TXT_ECDH_anon_WITH_RC4_128_SHA             "AECDH-RC4-SHA"
-#define TLS1_TXT_ECDH_anon_WITH_DES_192_CBC3_SHA        "AECDH-DES-CBC3-SHA"
-#define TLS1_TXT_ECDH_anon_WITH_AES_128_CBC_SHA         "AECDH-AES128-SHA"
-#define TLS1_TXT_ECDH_anon_WITH_AES_256_CBC_SHA         "AECDH-AES256-SHA"
-
-/* PSK ciphersuites from RFC 4279 */
-#define TLS1_TXT_PSK_WITH_RC4_128_SHA			"PSK-RC4-SHA"
-#define TLS1_TXT_PSK_WITH_3DES_EDE_CBC_SHA		"PSK-3DES-EDE-CBC-SHA"
-#define TLS1_TXT_PSK_WITH_AES_128_CBC_SHA		"PSK-AES128-CBC-SHA"
-#define TLS1_TXT_PSK_WITH_AES_256_CBC_SHA		"PSK-AES256-CBC-SHA"
-
-/* Camellia ciphersuites from RFC4132 */
-#define TLS1_TXT_RSA_WITH_CAMELLIA_128_CBC_SHA		"CAMELLIA128-SHA"
-#define TLS1_TXT_DH_DSS_WITH_CAMELLIA_128_CBC_SHA	"DH-DSS-CAMELLIA128-SHA"
-#define TLS1_TXT_DH_RSA_WITH_CAMELLIA_128_CBC_SHA	"DH-RSA-CAMELLIA128-SHA"
-#define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA	"DHE-DSS-CAMELLIA128-SHA"
-#define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA	"DHE-RSA-CAMELLIA128-SHA"
-#define TLS1_TXT_ADH_WITH_CAMELLIA_128_CBC_SHA		"ADH-CAMELLIA128-SHA"
-
-#define TLS1_TXT_RSA_WITH_CAMELLIA_256_CBC_SHA		"CAMELLIA256-SHA"
-#define TLS1_TXT_DH_DSS_WITH_CAMELLIA_256_CBC_SHA	"DH-DSS-CAMELLIA256-SHA"
-#define TLS1_TXT_DH_RSA_WITH_CAMELLIA_256_CBC_SHA	"DH-RSA-CAMELLIA256-SHA"
-#define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA	"DHE-DSS-CAMELLIA256-SHA"
-#define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA	"DHE-RSA-CAMELLIA256-SHA"
-#define TLS1_TXT_ADH_WITH_CAMELLIA_256_CBC_SHA		"ADH-CAMELLIA256-SHA"
-
-/* SEED ciphersuites from RFC4162 */
-#define TLS1_TXT_RSA_WITH_SEED_SHA                      "SEED-SHA"
-#define TLS1_TXT_DH_DSS_WITH_SEED_SHA                   "DH-DSS-SEED-SHA"
-#define TLS1_TXT_DH_RSA_WITH_SEED_SHA                   "DH-RSA-SEED-SHA"
-#define TLS1_TXT_DHE_DSS_WITH_SEED_SHA                  "DHE-DSS-SEED-SHA"
-#define TLS1_TXT_DHE_RSA_WITH_SEED_SHA                  "DHE-RSA-SEED-SHA"
-#define TLS1_TXT_ADH_WITH_SEED_SHA                      "ADH-SEED-SHA"
-
-
-#define TLS_CT_RSA_SIGN			1
-#define TLS_CT_DSS_SIGN			2
-#define TLS_CT_RSA_FIXED_DH		3
-#define TLS_CT_DSS_FIXED_DH		4
-#define TLS_CT_ECDSA_SIGN		64
-#define TLS_CT_RSA_FIXED_ECDH		65
-#define TLS_CT_ECDSA_FIXED_ECDH 	66
-#define TLS_CT_GOST94_SIGN		21
-#define TLS_CT_GOST01_SIGN		22
-/* when correcting this number, correct also SSL3_CT_NUMBER in ssl3.h (see
- * comment there) */
-#define TLS_CT_NUMBER			9
-
-#define TLS1_FINISH_MAC_LENGTH		12
-
-#define TLS_MD_MAX_CONST_SIZE			20
-#define TLS_MD_CLIENT_FINISH_CONST		"client finished"
-#define TLS_MD_CLIENT_FINISH_CONST_SIZE		15
-#define TLS_MD_SERVER_FINISH_CONST		"server finished"
-#define TLS_MD_SERVER_FINISH_CONST_SIZE		15
-#define TLS_MD_SERVER_WRITE_KEY_CONST		"server write key"
-#define TLS_MD_SERVER_WRITE_KEY_CONST_SIZE	16
-#define TLS_MD_KEY_EXPANSION_CONST		"key expansion"
-#define TLS_MD_KEY_EXPANSION_CONST_SIZE		13
-#define TLS_MD_CLIENT_WRITE_KEY_CONST		"client write key"
-#define TLS_MD_CLIENT_WRITE_KEY_CONST_SIZE	16
-#define TLS_MD_SERVER_WRITE_KEY_CONST		"server write key"
-#define TLS_MD_SERVER_WRITE_KEY_CONST_SIZE	16
-#define TLS_MD_IV_BLOCK_CONST			"IV block"
-#define TLS_MD_IV_BLOCK_CONST_SIZE		8
-#define TLS_MD_MASTER_SECRET_CONST		"master secret"
-#define TLS_MD_MASTER_SECRET_CONST_SIZE		13
-
-#ifdef CHARSET_EBCDIC
-#undef TLS_MD_CLIENT_FINISH_CONST
-#define TLS_MD_CLIENT_FINISH_CONST    "\x63\x6c\x69\x65\x6e\x74\x20\x66\x69\x6e\x69\x73\x68\x65\x64"  /*client finished*/
-#undef TLS_MD_SERVER_FINISH_CONST
-#define TLS_MD_SERVER_FINISH_CONST    "\x73\x65\x72\x76\x65\x72\x20\x66\x69\x6e\x69\x73\x68\x65\x64"  /*server finished*/
-#undef TLS_MD_SERVER_WRITE_KEY_CONST
-#define TLS_MD_SERVER_WRITE_KEY_CONST "\x73\x65\x72\x76\x65\x72\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79"  /*server write key*/
-#undef TLS_MD_KEY_EXPANSION_CONST
-#define TLS_MD_KEY_EXPANSION_CONST    "\x6b\x65\x79\x20\x65\x78\x70\x61\x6e\x73\x69\x6f\x6e"  /*key expansion*/
-#undef TLS_MD_CLIENT_WRITE_KEY_CONST
-#define TLS_MD_CLIENT_WRITE_KEY_CONST "\x63\x6c\x69\x65\x6e\x74\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79"  /*client write key*/
-#undef TLS_MD_SERVER_WRITE_KEY_CONST
-#define TLS_MD_SERVER_WRITE_KEY_CONST "\x73\x65\x72\x76\x65\x72\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79"  /*server write key*/
-#undef TLS_MD_IV_BLOCK_CONST
-#define TLS_MD_IV_BLOCK_CONST         "\x49\x56\x20\x62\x6c\x6f\x63\x6b"  /*IV block*/
-#undef TLS_MD_MASTER_SECRET_CONST
-#define TLS_MD_MASTER_SECRET_CONST    "\x6d\x61\x73\x74\x65\x72\x20\x73\x65\x63\x72\x65\x74"  /*master secret*/
-#endif
-
-/* TLS Session Ticket extension struct */
-struct tls_session_ticket_ext_st
-	{
-	unsigned short length;
-	void *data;
-	};
-
-#ifdef  __cplusplus
-}
-#endif
-#endif
diff --git a/extra_lib/include/openssl/x509.h b/extra_lib/include/openssl/x509.h
deleted file mode 100644
index e6f8a40..0000000
--- a/extra_lib/include/openssl/x509.h
+++ /dev/null
@@ -1,1286 +0,0 @@
-/* crypto/x509/x509.h */
-/* Copyright (C) 1995-1998 Eric Young (eay at cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay at cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh at cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay at cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh at cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-/* ====================================================================
- * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
- * ECDH support in OpenSSL originally developed by 
- * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
- */
-
-#ifndef HEADER_X509_H
-#define HEADER_X509_H
-
-#include <openssl/e_os2.h>
-#include <openssl/symhacks.h>
-#ifndef OPENSSL_NO_BUFFER
-#include <openssl/buffer.h>
-#endif
-#ifndef OPENSSL_NO_EVP
-#include <openssl/evp.h>
-#endif
-#ifndef OPENSSL_NO_BIO
-#include <openssl/bio.h>
-#endif
-#include <openssl/stack.h>
-#include <openssl/asn1.h>
-#include <openssl/safestack.h>
-
-#ifndef OPENSSL_NO_EC
-#include <openssl/ec.h>
-#endif
-
-#ifndef OPENSSL_NO_ECDSA
-#include <openssl/ecdsa.h>
-#endif
-
-#ifndef OPENSSL_NO_ECDH
-#include <openssl/ecdh.h>
-#endif
-
-#ifndef OPENSSL_NO_DEPRECATED
-#ifndef OPENSSL_NO_RSA
-#include <openssl/rsa.h>
-#endif
-#ifndef OPENSSL_NO_DSA
-#include <openssl/dsa.h>
-#endif
-#ifndef OPENSSL_NO_DH
-#include <openssl/dh.h>
-#endif
-#endif
-
-#ifndef OPENSSL_NO_SHA
-#include <openssl/sha.h>
-#endif
-#include <openssl/ossl_typ.h>
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-#ifdef OPENSSL_SYS_WIN32
-/* Under Win32 these are defined in wincrypt.h */
-#undef X509_NAME
-#undef X509_CERT_PAIR
-#undef X509_EXTENSIONS
-#endif
-
-#define X509_FILETYPE_PEM	1
-#define X509_FILETYPE_ASN1	2
-#define X509_FILETYPE_DEFAULT	3
-
-#define X509v3_KU_DIGITAL_SIGNATURE	0x0080
-#define X509v3_KU_NON_REPUDIATION	0x0040
-#define X509v3_KU_KEY_ENCIPHERMENT	0x0020
-#define X509v3_KU_DATA_ENCIPHERMENT	0x0010
-#define X509v3_KU_KEY_AGREEMENT		0x0008
-#define X509v3_KU_KEY_CERT_SIGN		0x0004
-#define X509v3_KU_CRL_SIGN		0x0002
-#define X509v3_KU_ENCIPHER_ONLY		0x0001
-#define X509v3_KU_DECIPHER_ONLY		0x8000
-#define X509v3_KU_UNDEF			0xffff
-
-typedef struct X509_objects_st
-	{
-	int nid;
-	int (*a2i)(void);
-	int (*i2a)(void);
-	} X509_OBJECTS;
-
-struct X509_algor_st
-	{
-	ASN1_OBJECT *algorithm;
-	ASN1_TYPE *parameter;
-	} /* X509_ALGOR */;
-
-DECLARE_ASN1_SET_OF(X509_ALGOR)
-
-typedef STACK_OF(X509_ALGOR) X509_ALGORS;
-
-typedef struct X509_val_st
-	{
-	ASN1_TIME *notBefore;
-	ASN1_TIME *notAfter;
-	} X509_VAL;
-
-struct X509_pubkey_st
-	{
-	X509_ALGOR *algor;
-	ASN1_BIT_STRING *public_key;
-	EVP_PKEY *pkey;
-	};
-
-typedef struct X509_sig_st
-	{
-	X509_ALGOR *algor;
-	ASN1_OCTET_STRING *digest;
-	} X509_SIG;
-
-typedef struct X509_name_entry_st
-	{
-	ASN1_OBJECT *object;
-	ASN1_STRING *value;
-	int set;
-	int size; 	/* temp variable */
-	} X509_NAME_ENTRY;
-
-DECLARE_STACK_OF(X509_NAME_ENTRY)
-DECLARE_ASN1_SET_OF(X509_NAME_ENTRY)
-
-/* we always keep X509_NAMEs in 2 forms. */
-struct X509_name_st
-	{
-	STACK_OF(X509_NAME_ENTRY) *entries;
-	int modified;	/* true if 'bytes' needs to be built */
-#ifndef OPENSSL_NO_BUFFER
-	BUF_MEM *bytes;
-#else
-	char *bytes;
-#endif
-/*	unsigned long hash; Keep the hash around for lookups */
-	unsigned char *canon_enc;
-	int canon_enclen;
-	} /* X509_NAME */;
-
-DECLARE_STACK_OF(X509_NAME)
-
-#define X509_EX_V_NETSCAPE_HACK		0x8000
-#define X509_EX_V_INIT			0x0001
-typedef struct X509_extension_st
-	{
-	ASN1_OBJECT *object;
-	ASN1_BOOLEAN critical;
-	ASN1_OCTET_STRING *value;
-	} X509_EXTENSION;
-
-typedef STACK_OF(X509_EXTENSION) X509_EXTENSIONS;
-
-DECLARE_STACK_OF(X509_EXTENSION)
-DECLARE_ASN1_SET_OF(X509_EXTENSION)
-
-/* a sequence of these are used */
-typedef struct x509_attributes_st
-	{
-	ASN1_OBJECT *object;
-	int single; /* 0 for a set, 1 for a single item (which is wrong) */
-	union	{
-		char		*ptr;
-/* 0 */		STACK_OF(ASN1_TYPE) *set;
-/* 1 */		ASN1_TYPE	*single;
-		} value;
-	} X509_ATTRIBUTE;
-
-DECLARE_STACK_OF(X509_ATTRIBUTE)
-DECLARE_ASN1_SET_OF(X509_ATTRIBUTE)
-
-
-typedef struct X509_req_info_st
-	{
-	ASN1_ENCODING enc;
-	ASN1_INTEGER *version;
-	X509_NAME *subject;
-	X509_PUBKEY *pubkey;
-	/*  d=2 hl=2 l=  0 cons: cont: 00 */
-	STACK_OF(X509_ATTRIBUTE) *attributes; /* [ 0 ] */
-	} X509_REQ_INFO;
-
-typedef struct X509_req_st
-	{
-	X509_REQ_INFO *req_info;
-	X509_ALGOR *sig_alg;
-	ASN1_BIT_STRING *signature;
-	int references;
-	} X509_REQ;
-
-typedef struct x509_cinf_st
-	{
-	ASN1_INTEGER *version;		/* [ 0 ] default of v1 */
-	ASN1_INTEGER *serialNumber;
-	X509_ALGOR *signature;
-	X509_NAME *issuer;
-	X509_VAL *validity;
-	X509_NAME *subject;
-	X509_PUBKEY *key;
-	ASN1_BIT_STRING *issuerUID;		/* [ 1 ] optional in v2 */
-	ASN1_BIT_STRING *subjectUID;		/* [ 2 ] optional in v2 */
-	STACK_OF(X509_EXTENSION) *extensions;	/* [ 3 ] optional in v3 */
-	ASN1_ENCODING enc;
-	} X509_CINF;
-
-/* This stuff is certificate "auxiliary info"
- * it contains details which are useful in certificate
- * stores and databases. When used this is tagged onto
- * the end of the certificate itself
- */
-
-typedef struct x509_cert_aux_st
-	{
-	STACK_OF(ASN1_OBJECT) *trust;		/* trusted uses */
-	STACK_OF(ASN1_OBJECT) *reject;		/* rejected uses */
-	ASN1_UTF8STRING *alias;			/* "friendly name" */
-	ASN1_OCTET_STRING *keyid;		/* key id of private key */
-	STACK_OF(X509_ALGOR) *other;		/* other unspecified info */
-	} X509_CERT_AUX;
-
-struct x509_st
-	{
-	X509_CINF *cert_info;
-	X509_ALGOR *sig_alg;
-	ASN1_BIT_STRING *signature;
-	int valid;
-	int references;
-	char *name;
-	CRYPTO_EX_DATA ex_data;
-	/* These contain copies of various extension values */
-	long ex_pathlen;
-	long ex_pcpathlen;
-	unsigned long ex_flags;
-	unsigned long ex_kusage;
-	unsigned long ex_xkusage;
-	unsigned long ex_nscert;
-	ASN1_OCTET_STRING *skid;
-	AUTHORITY_KEYID *akid;
-	X509_POLICY_CACHE *policy_cache;
-	STACK_OF(DIST_POINT) *crldp;
-	STACK_OF(GENERAL_NAME) *altname;
-	NAME_CONSTRAINTS *nc;
-#ifndef OPENSSL_NO_RFC3779
-	STACK_OF(IPAddressFamily) *rfc3779_addr;
-	struct ASIdentifiers_st *rfc3779_asid;
-#endif
-#ifndef OPENSSL_NO_SHA
-	unsigned char sha1_hash[SHA_DIGEST_LENGTH];
-#endif
-	X509_CERT_AUX *aux;
-	} /* X509 */;
-
-DECLARE_STACK_OF(X509)
-DECLARE_ASN1_SET_OF(X509)
-
-/* This is used for a table of trust checking functions */
-
-typedef struct x509_trust_st {
-	int trust;
-	int flags;
-	int (*check_trust)(struct x509_trust_st *, X509 *, int);
-	char *name;
-	int arg1;
-	void *arg2;
-} X509_TRUST;
-
-DECLARE_STACK_OF(X509_TRUST)
-
-typedef struct x509_cert_pair_st {
-	X509 *forward;
-	X509 *reverse;
-} X509_CERT_PAIR;
-
-/* standard trust ids */
-
-#define X509_TRUST_DEFAULT	-1	/* Only valid in purpose settings */
-
-#define X509_TRUST_COMPAT	1
-#define X509_TRUST_SSL_CLIENT	2
-#define X509_TRUST_SSL_SERVER	3
-#define X509_TRUST_EMAIL	4
-#define X509_TRUST_OBJECT_SIGN	5
-#define X509_TRUST_OCSP_SIGN	6
-#define X509_TRUST_OCSP_REQUEST	7
-#define X509_TRUST_TSA		8
-
-/* Keep these up to date! */
-#define X509_TRUST_MIN		1
-#define X509_TRUST_MAX		8
-
-
-/* trust_flags values */
-#define	X509_TRUST_DYNAMIC 	1
-#define	X509_TRUST_DYNAMIC_NAME	2
-
-/* check_trust return codes */
-
-#define X509_TRUST_TRUSTED	1
-#define X509_TRUST_REJECTED	2
-#define X509_TRUST_UNTRUSTED	3
-
-/* Flags for X509_print_ex() */
-
-#define	X509_FLAG_COMPAT		0
-#define	X509_FLAG_NO_HEADER		1L
-#define	X509_FLAG_NO_VERSION		(1L << 1)
-#define	X509_FLAG_NO_SERIAL		(1L << 2)
-#define	X509_FLAG_NO_SIGNAME		(1L << 3)
-#define	X509_FLAG_NO_ISSUER		(1L << 4)
-#define	X509_FLAG_NO_VALIDITY		(1L << 5)
-#define	X509_FLAG_NO_SUBJECT		(1L << 6)
-#define	X509_FLAG_NO_PUBKEY		(1L << 7)
-#define	X509_FLAG_NO_EXTENSIONS		(1L << 8)
-#define	X509_FLAG_NO_SIGDUMP		(1L << 9)
-#define	X509_FLAG_NO_AUX		(1L << 10)
-#define	X509_FLAG_NO_ATTRIBUTES		(1L << 11)
-
-/* Flags specific to X509_NAME_print_ex() */	
-
-/* The field separator information */
-
-#define XN_FLAG_SEP_MASK	(0xf << 16)
-
-#define XN_FLAG_COMPAT		0		/* Traditional SSLeay: use old X509_NAME_print */
-#define XN_FLAG_SEP_COMMA_PLUS	(1 << 16)	/* RFC2253 ,+ */
-#define XN_FLAG_SEP_CPLUS_SPC	(2 << 16)	/* ,+ spaced: more readable */
-#define XN_FLAG_SEP_SPLUS_SPC	(3 << 16)	/* ;+ spaced */
-#define XN_FLAG_SEP_MULTILINE	(4 << 16)	/* One line per field */
-
-#define XN_FLAG_DN_REV		(1 << 20)	/* Reverse DN order */
-
-/* How the field name is shown */
-
-#define XN_FLAG_FN_MASK		(0x3 << 21)
-
-#define XN_FLAG_FN_SN		0		/* Object short name */
-#define XN_FLAG_FN_LN		(1 << 21)	/* Object long name */
-#define XN_FLAG_FN_OID		(2 << 21)	/* Always use OIDs */
-#define XN_FLAG_FN_NONE		(3 << 21)	/* No field names */
-
-#define XN_FLAG_SPC_EQ		(1 << 23)	/* Put spaces round '=' */
-
-/* This determines if we dump fields we don't recognise:
- * RFC2253 requires this.
- */
-
-#define XN_FLAG_DUMP_UNKNOWN_FIELDS (1 << 24)
-
-#define XN_FLAG_FN_ALIGN	(1 << 25)	/* Align field names to 20 characters */
-
-/* Complete set of RFC2253 flags */
-
-#define XN_FLAG_RFC2253 (ASN1_STRFLGS_RFC2253 | \
-			XN_FLAG_SEP_COMMA_PLUS | \
-			XN_FLAG_DN_REV | \
-			XN_FLAG_FN_SN | \
-			XN_FLAG_DUMP_UNKNOWN_FIELDS)
-
-/* readable oneline form */
-
-#define XN_FLAG_ONELINE (ASN1_STRFLGS_RFC2253 | \
-			ASN1_STRFLGS_ESC_QUOTE | \
-			XN_FLAG_SEP_CPLUS_SPC | \
-			XN_FLAG_SPC_EQ | \
-			XN_FLAG_FN_SN)
-
-/* readable multiline form */
-
-#define XN_FLAG_MULTILINE (ASN1_STRFLGS_ESC_CTRL | \
-			ASN1_STRFLGS_ESC_MSB | \
-			XN_FLAG_SEP_MULTILINE | \
-			XN_FLAG_SPC_EQ | \
-			XN_FLAG_FN_LN | \
-			XN_FLAG_FN_ALIGN)
-
-struct x509_revoked_st
-	{
-	ASN1_INTEGER *serialNumber;
-	ASN1_TIME *revocationDate;
-	STACK_OF(X509_EXTENSION) /* optional */ *extensions;
-	/* Set up if indirect CRL */
-	STACK_OF(GENERAL_NAME) *issuer;
-	/* Revocation reason */
-	int reason;
-	int sequence; /* load sequence */
-	};
-
-DECLARE_STACK_OF(X509_REVOKED)
-DECLARE_ASN1_SET_OF(X509_REVOKED)
-
-typedef struct X509_crl_info_st
-	{
-	ASN1_INTEGER *version;
-	X509_ALGOR *sig_alg;
-	X509_NAME *issuer;
-	ASN1_TIME *lastUpdate;
-	ASN1_TIME *nextUpdate;
-	STACK_OF(X509_REVOKED) *revoked;
-	STACK_OF(X509_EXTENSION) /* [0] */ *extensions;
-	ASN1_ENCODING enc;
-	} X509_CRL_INFO;
-
-struct X509_crl_st
-	{
-	/* actual signature */
-	X509_CRL_INFO *crl;
-	X509_ALGOR *sig_alg;
-	ASN1_BIT_STRING *signature;
-	int references;
-	int flags;
-	/* Copies of various extensions */
-	AUTHORITY_KEYID *akid;
-	ISSUING_DIST_POINT *idp;
-	/* Convenient breakdown of IDP */
-	int idp_flags;
-	int idp_reasons;
-	/* CRL and base CRL numbers for delta processing */
-	ASN1_INTEGER *crl_number;
-	ASN1_INTEGER *base_crl_number;
-#ifndef OPENSSL_NO_SHA
-	unsigned char sha1_hash[SHA_DIGEST_LENGTH];
-#endif
-	STACK_OF(GENERAL_NAMES) *issuers;
-	const X509_CRL_METHOD *meth;
-	void *meth_data;
-	} /* X509_CRL */;
-
-DECLARE_STACK_OF(X509_CRL)
-DECLARE_ASN1_SET_OF(X509_CRL)
-
-typedef struct private_key_st
-	{
-	int version;
-	/* The PKCS#8 data types */
-	X509_ALGOR *enc_algor;
-	ASN1_OCTET_STRING *enc_pkey;	/* encrypted pub key */
-
-	/* When decrypted, the following will not be NULL */
-	EVP_PKEY *dec_pkey;
-
-	/* used to encrypt and decrypt */
-	int key_length;
-	char *key_data;
-	int key_free;	/* true if we should auto free key_data */
-
-	/* expanded version of 'enc_algor' */
-	EVP_CIPHER_INFO cipher;
-
-	int references;
-	} X509_PKEY;
-
-#ifndef OPENSSL_NO_EVP
-typedef struct X509_info_st
-	{
-	X509 *x509;
-	X509_CRL *crl;
-	X509_PKEY *x_pkey;
-
-	EVP_CIPHER_INFO enc_cipher;
-	int enc_len;
-	char *enc_data;
-
-	int references;
-	} X509_INFO;
-
-DECLARE_STACK_OF(X509_INFO)
-#endif
-
-/* The next 2 structures and their 8 routines were sent to me by
- * Pat Richard <patr at x509.com> and are used to manipulate
- * Netscapes spki structures - useful if you are writing a CA web page
- */
-typedef struct Netscape_spkac_st
-	{
-	X509_PUBKEY *pubkey;
-	ASN1_IA5STRING *challenge;	/* challenge sent in atlas >= PR2 */
-	} NETSCAPE_SPKAC;
-
-typedef struct Netscape_spki_st
-	{
-	NETSCAPE_SPKAC *spkac;	/* signed public key and challenge */
-	X509_ALGOR *sig_algor;
-	ASN1_BIT_STRING *signature;
-	} NETSCAPE_SPKI;
-
-/* Netscape certificate sequence structure */
-typedef struct Netscape_certificate_sequence
-	{
-	ASN1_OBJECT *type;
-	STACK_OF(X509) *certs;
-	} NETSCAPE_CERT_SEQUENCE;
-
-/* Unused (and iv length is wrong)
-typedef struct CBCParameter_st
-	{
-	unsigned char iv[8];
-	} CBC_PARAM;
-*/
-
-/* Password based encryption structure */
-
-typedef struct PBEPARAM_st {
-ASN1_OCTET_STRING *salt;
-ASN1_INTEGER *iter;
-} PBEPARAM;
-
-/* Password based encryption V2 structures */
-
-typedef struct PBE2PARAM_st {
-X509_ALGOR *keyfunc;
-X509_ALGOR *encryption;
-} PBE2PARAM;
-
-typedef struct PBKDF2PARAM_st {
-ASN1_TYPE *salt;	/* Usually OCTET STRING but could be anything */
-ASN1_INTEGER *iter;
-ASN1_INTEGER *keylength;
-X509_ALGOR *prf;
-} PBKDF2PARAM;
-
-
-/* PKCS#8 private key info structure */
-
-struct pkcs8_priv_key_info_st
-        {
-        int broken;     /* Flag for various broken formats */
-#define PKCS8_OK		0
-#define PKCS8_NO_OCTET		1
-#define PKCS8_EMBEDDED_PARAM	2
-#define PKCS8_NS_DB		3
-#define PKCS8_NEG_PRIVKEY	4
-        ASN1_INTEGER *version;
-        X509_ALGOR *pkeyalg;
-        ASN1_TYPE *pkey; /* Should be OCTET STRING but some are broken */
-        STACK_OF(X509_ATTRIBUTE) *attributes;
-        };
-
-#ifdef  __cplusplus
-}
-#endif
-
-#include <openssl/x509_vfy.h>
-#include <openssl/pkcs7.h>
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-#define X509_EXT_PACK_UNKNOWN	1
-#define X509_EXT_PACK_STRING	2
-
-#define		X509_get_version(x) ASN1_INTEGER_get((x)->cert_info->version)
-/* #define	X509_get_serialNumber(x) ((x)->cert_info->serialNumber) */
-#define		X509_get_notBefore(x) ((x)->cert_info->validity->notBefore)
-#define		X509_get_notAfter(x) ((x)->cert_info->validity->notAfter)
-#define		X509_extract_key(x)	X509_get_pubkey(x) /*****/
-#define		X509_REQ_get_version(x) ASN1_INTEGER_get((x)->req_info->version)
-#define		X509_REQ_get_subject_name(x) ((x)->req_info->subject)
-#define		X509_REQ_extract_key(a)	X509_REQ_get_pubkey(a)
-#define		X509_name_cmp(a,b)	X509_NAME_cmp((a),(b))
-#define		X509_get_signature_type(x) EVP_PKEY_type(OBJ_obj2nid((x)->sig_alg->algorithm))
-
-#define		X509_CRL_get_version(x) ASN1_INTEGER_get((x)->crl->version)
-#define 	X509_CRL_get_lastUpdate(x) ((x)->crl->lastUpdate)
-#define 	X509_CRL_get_nextUpdate(x) ((x)->crl->nextUpdate)
-#define		X509_CRL_get_issuer(x) ((x)->crl->issuer)
-#define		X509_CRL_get_REVOKED(x) ((x)->crl->revoked)
-
-void X509_CRL_set_default_method(const X509_CRL_METHOD *meth);
-X509_CRL_METHOD *X509_CRL_METHOD_new(
-	int (*crl_init)(X509_CRL *crl),
-	int (*crl_free)(X509_CRL *crl),
-	int (*crl_lookup)(X509_CRL *crl, X509_REVOKED **ret,
-				ASN1_INTEGER *ser, X509_NAME *issuer),
-	int (*crl_verify)(X509_CRL *crl, EVP_PKEY *pk));
-void X509_CRL_METHOD_free(X509_CRL_METHOD *m);
-
-void X509_CRL_set_meth_data(X509_CRL *crl, void *dat);
-void *X509_CRL_get_meth_data(X509_CRL *crl);
-
-/* This one is only used so that a binary form can output, as in
- * i2d_X509_NAME(X509_get_X509_PUBKEY(x),&buf) */
-#define 	X509_get_X509_PUBKEY(x) ((x)->cert_info->key)
-
-
-const char *X509_verify_cert_error_string(long n);
-
-#ifndef OPENSSL_NO_EVP
-int X509_verify(X509 *a, EVP_PKEY *r);
-
-int X509_REQ_verify(X509_REQ *a, EVP_PKEY *r);
-int X509_CRL_verify(X509_CRL *a, EVP_PKEY *r);
-int NETSCAPE_SPKI_verify(NETSCAPE_SPKI *a, EVP_PKEY *r);
-
-NETSCAPE_SPKI * NETSCAPE_SPKI_b64_decode(const char *str, int len);
-char * NETSCAPE_SPKI_b64_encode(NETSCAPE_SPKI *x);
-EVP_PKEY *NETSCAPE_SPKI_get_pubkey(NETSCAPE_SPKI *x);
-int NETSCAPE_SPKI_set_pubkey(NETSCAPE_SPKI *x, EVP_PKEY *pkey);
-
-int NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki);
-
-int X509_signature_print(BIO *bp,X509_ALGOR *alg, ASN1_STRING *sig);
-
-int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
-int X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md);
-int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md);
-int NETSCAPE_SPKI_sign(NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md);
-
-int X509_pubkey_digest(const X509 *data,const EVP_MD *type,
-		unsigned char *md, unsigned int *len);
-int X509_digest(const X509 *data,const EVP_MD *type,
-		unsigned char *md, unsigned int *len);
-int X509_CRL_digest(const X509_CRL *data,const EVP_MD *type,
-		unsigned char *md, unsigned int *len);
-int X509_REQ_digest(const X509_REQ *data,const EVP_MD *type,
-		unsigned char *md, unsigned int *len);
-int X509_NAME_digest(const X509_NAME *data,const EVP_MD *type,
-		unsigned char *md, unsigned int *len);
-#endif
-
-#ifndef OPENSSL_NO_FP_API
-X509 *d2i_X509_fp(FILE *fp, X509 **x509);
-int i2d_X509_fp(FILE *fp,X509 *x509);
-X509_CRL *d2i_X509_CRL_fp(FILE *fp,X509_CRL **crl);
-int i2d_X509_CRL_fp(FILE *fp,X509_CRL *crl);
-X509_REQ *d2i_X509_REQ_fp(FILE *fp,X509_REQ **req);
-int i2d_X509_REQ_fp(FILE *fp,X509_REQ *req);
-#ifndef OPENSSL_NO_RSA
-RSA *d2i_RSAPrivateKey_fp(FILE *fp,RSA **rsa);
-int i2d_RSAPrivateKey_fp(FILE *fp,RSA *rsa);
-RSA *d2i_RSAPublicKey_fp(FILE *fp,RSA **rsa);
-int i2d_RSAPublicKey_fp(FILE *fp,RSA *rsa);
-RSA *d2i_RSA_PUBKEY_fp(FILE *fp,RSA **rsa);
-int i2d_RSA_PUBKEY_fp(FILE *fp,RSA *rsa);
-#endif
-#ifndef OPENSSL_NO_DSA
-DSA *d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa);
-int i2d_DSA_PUBKEY_fp(FILE *fp, DSA *dsa);
-DSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa);
-int i2d_DSAPrivateKey_fp(FILE *fp, DSA *dsa);
-#endif
-#ifndef OPENSSL_NO_EC
-EC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey);
-int   i2d_EC_PUBKEY_fp(FILE *fp, EC_KEY *eckey);
-EC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey);
-int   i2d_ECPrivateKey_fp(FILE *fp, EC_KEY *eckey);
-#endif
-X509_SIG *d2i_PKCS8_fp(FILE *fp,X509_SIG **p8);
-int i2d_PKCS8_fp(FILE *fp,X509_SIG *p8);
-PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp,
-						PKCS8_PRIV_KEY_INFO **p8inf);
-int i2d_PKCS8_PRIV_KEY_INFO_fp(FILE *fp,PKCS8_PRIV_KEY_INFO *p8inf);
-int i2d_PKCS8PrivateKeyInfo_fp(FILE *fp, EVP_PKEY *key);
-int i2d_PrivateKey_fp(FILE *fp, EVP_PKEY *pkey);
-EVP_PKEY *d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a);
-int i2d_PUBKEY_fp(FILE *fp, EVP_PKEY *pkey);
-EVP_PKEY *d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a);
-#endif
-
-#ifndef OPENSSL_NO_BIO
-X509 *d2i_X509_bio(BIO *bp,X509 **x509);
-int i2d_X509_bio(BIO *bp,X509 *x509);
-X509_CRL *d2i_X509_CRL_bio(BIO *bp,X509_CRL **crl);
-int i2d_X509_CRL_bio(BIO *bp,X509_CRL *crl);
-X509_REQ *d2i_X509_REQ_bio(BIO *bp,X509_REQ **req);
-int i2d_X509_REQ_bio(BIO *bp,X509_REQ *req);
-#ifndef OPENSSL_NO_RSA
-RSA *d2i_RSAPrivateKey_bio(BIO *bp,RSA **rsa);
-int i2d_RSAPrivateKey_bio(BIO *bp,RSA *rsa);
-RSA *d2i_RSAPublicKey_bio(BIO *bp,RSA **rsa);
-int i2d_RSAPublicKey_bio(BIO *bp,RSA *rsa);
-RSA *d2i_RSA_PUBKEY_bio(BIO *bp,RSA **rsa);
-int i2d_RSA_PUBKEY_bio(BIO *bp,RSA *rsa);
-#endif
-#ifndef OPENSSL_NO_DSA
-DSA *d2i_DSA_PUBKEY_bio(BIO *bp, DSA **dsa);
-int i2d_DSA_PUBKEY_bio(BIO *bp, DSA *dsa);
-DSA *d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa);
-int i2d_DSAPrivateKey_bio(BIO *bp, DSA *dsa);
-#endif
-#ifndef OPENSSL_NO_EC
-EC_KEY *d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey);
-int   i2d_EC_PUBKEY_bio(BIO *bp, EC_KEY *eckey);
-EC_KEY *d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey);
-int   i2d_ECPrivateKey_bio(BIO *bp, EC_KEY *eckey);
-#endif
-X509_SIG *d2i_PKCS8_bio(BIO *bp,X509_SIG **p8);
-int i2d_PKCS8_bio(BIO *bp,X509_SIG *p8);
-PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp,
-						PKCS8_PRIV_KEY_INFO **p8inf);
-int i2d_PKCS8_PRIV_KEY_INFO_bio(BIO *bp,PKCS8_PRIV_KEY_INFO *p8inf);
-int i2d_PKCS8PrivateKeyInfo_bio(BIO *bp, EVP_PKEY *key);
-int i2d_PrivateKey_bio(BIO *bp, EVP_PKEY *pkey);
-EVP_PKEY *d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a);
-int i2d_PUBKEY_bio(BIO *bp, EVP_PKEY *pkey);
-EVP_PKEY *d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a);
-#endif
-
-X509 *X509_dup(X509 *x509);
-X509_ATTRIBUTE *X509_ATTRIBUTE_dup(X509_ATTRIBUTE *xa);
-X509_EXTENSION *X509_EXTENSION_dup(X509_EXTENSION *ex);
-X509_CRL *X509_CRL_dup(X509_CRL *crl);
-X509_REQ *X509_REQ_dup(X509_REQ *req);
-X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *xn);
-int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype, void *pval);
-void X509_ALGOR_get0(ASN1_OBJECT **paobj, int *pptype, void **ppval,
-						X509_ALGOR *algor);
-
-X509_NAME *X509_NAME_dup(X509_NAME *xn);
-X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne);
-
-int		X509_cmp_time(const ASN1_TIME *s, time_t *t);
-int		X509_cmp_current_time(const ASN1_TIME *s);
-ASN1_TIME *	X509_time_adj(ASN1_TIME *s, long adj, time_t *t);
-ASN1_TIME *	X509_time_adj_ex(ASN1_TIME *s,
-				int offset_day, long offset_sec, time_t *t);
-ASN1_TIME *	X509_gmtime_adj(ASN1_TIME *s, long adj);
-
-const char *	X509_get_default_cert_area(void );
-const char *	X509_get_default_cert_dir(void );
-const char *	X509_get_default_cert_file(void );
-const char *	X509_get_default_cert_dir_env(void );
-const char *	X509_get_default_cert_file_env(void );
-const char *	X509_get_default_private_dir(void );
-
-X509_REQ *	X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
-X509 *		X509_REQ_to_X509(X509_REQ *r, int days,EVP_PKEY *pkey);
-
-DECLARE_ASN1_FUNCTIONS(X509_ALGOR)
-DECLARE_ASN1_ENCODE_FUNCTIONS(X509_ALGORS, X509_ALGORS, X509_ALGORS)
-DECLARE_ASN1_FUNCTIONS(X509_VAL)
-
-DECLARE_ASN1_FUNCTIONS(X509_PUBKEY)
-
-int		X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey);
-EVP_PKEY *	X509_PUBKEY_get(X509_PUBKEY *key);
-int		X509_get_pubkey_parameters(EVP_PKEY *pkey,
-					   STACK_OF(X509) *chain);
-int		i2d_PUBKEY(EVP_PKEY *a,unsigned char **pp);
-EVP_PKEY *	d2i_PUBKEY(EVP_PKEY **a,const unsigned char **pp,
-			long length);
-#ifndef OPENSSL_NO_RSA
-int		i2d_RSA_PUBKEY(RSA *a,unsigned char **pp);
-RSA *		d2i_RSA_PUBKEY(RSA **a,const unsigned char **pp,
-			long length);
-#endif
-#ifndef OPENSSL_NO_DSA
-int		i2d_DSA_PUBKEY(DSA *a,unsigned char **pp);
-DSA *		d2i_DSA_PUBKEY(DSA **a,const unsigned char **pp,
-			long length);
-#endif
-#ifndef OPENSSL_NO_EC
-int		i2d_EC_PUBKEY(EC_KEY *a, unsigned char **pp);
-EC_KEY 		*d2i_EC_PUBKEY(EC_KEY **a, const unsigned char **pp,
-			long length);
-#endif
-
-DECLARE_ASN1_FUNCTIONS(X509_SIG)
-DECLARE_ASN1_FUNCTIONS(X509_REQ_INFO)
-DECLARE_ASN1_FUNCTIONS(X509_REQ)
-
-DECLARE_ASN1_FUNCTIONS(X509_ATTRIBUTE)
-X509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, void *value);
-
-DECLARE_ASN1_FUNCTIONS(X509_EXTENSION)
-DECLARE_ASN1_ENCODE_FUNCTIONS(X509_EXTENSIONS, X509_EXTENSIONS, X509_EXTENSIONS)
-
-DECLARE_ASN1_FUNCTIONS(X509_NAME_ENTRY)
-
-DECLARE_ASN1_FUNCTIONS(X509_NAME)
-
-int		X509_NAME_set(X509_NAME **xn, X509_NAME *name);
-
-DECLARE_ASN1_FUNCTIONS(X509_CINF)
-
-DECLARE_ASN1_FUNCTIONS(X509)
-DECLARE_ASN1_FUNCTIONS(X509_CERT_AUX)
-
-DECLARE_ASN1_FUNCTIONS(X509_CERT_PAIR)
-
-int X509_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
-	     CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
-int X509_set_ex_data(X509 *r, int idx, void *arg);
-void *X509_get_ex_data(X509 *r, int idx);
-int		i2d_X509_AUX(X509 *a,unsigned char **pp);
-X509 *		d2i_X509_AUX(X509 **a,const unsigned char **pp,long length);
-
-int X509_alias_set1(X509 *x, unsigned char *name, int len);
-int X509_keyid_set1(X509 *x, unsigned char *id, int len);
-unsigned char * X509_alias_get0(X509 *x, int *len);
-unsigned char * X509_keyid_get0(X509 *x, int *len);
-int (*X509_TRUST_set_default(int (*trust)(int , X509 *, int)))(int, X509 *, int);
-int X509_TRUST_set(int *t, int trust);
-int X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj);
-int X509_add1_reject_object(X509 *x, ASN1_OBJECT *obj);
-void X509_trust_clear(X509 *x);
-void X509_reject_clear(X509 *x);
-
-DECLARE_ASN1_FUNCTIONS(X509_REVOKED)
-DECLARE_ASN1_FUNCTIONS(X509_CRL_INFO)
-DECLARE_ASN1_FUNCTIONS(X509_CRL)
-
-int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev);
-int X509_CRL_get0_by_serial(X509_CRL *crl,
-		X509_REVOKED **ret, ASN1_INTEGER *serial);
-int X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, X509 *x);
-
-X509_PKEY *	X509_PKEY_new(void );
-void		X509_PKEY_free(X509_PKEY *a);
-int		i2d_X509_PKEY(X509_PKEY *a,unsigned char **pp);
-X509_PKEY *	d2i_X509_PKEY(X509_PKEY **a,const unsigned char **pp,long length);
-
-DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKI)
-DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKAC)
-DECLARE_ASN1_FUNCTIONS(NETSCAPE_CERT_SEQUENCE)
-
-#ifndef OPENSSL_NO_EVP
-X509_INFO *	X509_INFO_new(void);
-void		X509_INFO_free(X509_INFO *a);
-char *		X509_NAME_oneline(X509_NAME *a,char *buf,int size);
-
-int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *algor1,
-		ASN1_BIT_STRING *signature,char *data,EVP_PKEY *pkey);
-
-int ASN1_digest(i2d_of_void *i2d,const EVP_MD *type,char *data,
-		unsigned char *md,unsigned int *len);
-
-int ASN1_sign(i2d_of_void *i2d, X509_ALGOR *algor1,
-	      X509_ALGOR *algor2, ASN1_BIT_STRING *signature,
-	      char *data,EVP_PKEY *pkey, const EVP_MD *type);
-
-int ASN1_item_digest(const ASN1_ITEM *it,const EVP_MD *type,void *data,
-	unsigned char *md,unsigned int *len);
-
-int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *algor1,
-	ASN1_BIT_STRING *signature,void *data,EVP_PKEY *pkey);
-
-int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2,
-	ASN1_BIT_STRING *signature,
-	void *data, EVP_PKEY *pkey, const EVP_MD *type);
-#endif
-
-int 		X509_set_version(X509 *x,long version);
-int 		X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial);
-ASN1_INTEGER *	X509_get_serialNumber(X509 *x);
-int 		X509_set_issuer_name(X509 *x, X509_NAME *name);
-X509_NAME *	X509_get_issuer_name(X509 *a);
-int 		X509_set_subject_name(X509 *x, X509_NAME *name);
-X509_NAME *	X509_get_subject_name(X509 *a);
-int 		X509_set_notBefore(X509 *x, const ASN1_TIME *tm);
-int 		X509_set_notAfter(X509 *x, const ASN1_TIME *tm);
-int 		X509_set_pubkey(X509 *x, EVP_PKEY *pkey);
-EVP_PKEY *	X509_get_pubkey(X509 *x);
-ASN1_BIT_STRING * X509_get0_pubkey_bitstr(const X509 *x);
-int		X509_certificate_type(X509 *x,EVP_PKEY *pubkey /* optional */);
-
-int		X509_REQ_set_version(X509_REQ *x,long version);
-int		X509_REQ_set_subject_name(X509_REQ *req,X509_NAME *name);
-int		X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey);
-EVP_PKEY *	X509_REQ_get_pubkey(X509_REQ *req);
-int		X509_REQ_extension_nid(int nid);
-int *		X509_REQ_get_extension_nids(void);
-void		X509_REQ_set_extension_nids(int *nids);
-STACK_OF(X509_EXTENSION) *X509_REQ_get_extensions(X509_REQ *req);
-int X509_REQ_add_extensions_nid(X509_REQ *req, STACK_OF(X509_EXTENSION) *exts,
-				int nid);
-int X509_REQ_add_extensions(X509_REQ *req, STACK_OF(X509_EXTENSION) *exts);
-int X509_REQ_get_attr_count(const X509_REQ *req);
-int X509_REQ_get_attr_by_NID(const X509_REQ *req, int nid,
-			  int lastpos);
-int X509_REQ_get_attr_by_OBJ(const X509_REQ *req, ASN1_OBJECT *obj,
-			  int lastpos);
-X509_ATTRIBUTE *X509_REQ_get_attr(const X509_REQ *req, int loc);
-X509_ATTRIBUTE *X509_REQ_delete_attr(X509_REQ *req, int loc);
-int X509_REQ_add1_attr(X509_REQ *req, X509_ATTRIBUTE *attr);
-int X509_REQ_add1_attr_by_OBJ(X509_REQ *req,
-			const ASN1_OBJECT *obj, int type,
-			const unsigned char *bytes, int len);
-int X509_REQ_add1_attr_by_NID(X509_REQ *req,
-			int nid, int type,
-			const unsigned char *bytes, int len);
-int X509_REQ_add1_attr_by_txt(X509_REQ *req,
-			const char *attrname, int type,
-			const unsigned char *bytes, int len);
-
-int X509_CRL_set_version(X509_CRL *x, long version);
-int X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name);
-int X509_CRL_set_lastUpdate(X509_CRL *x, const ASN1_TIME *tm);
-int X509_CRL_set_nextUpdate(X509_CRL *x, const ASN1_TIME *tm);
-int X509_CRL_sort(X509_CRL *crl);
-
-int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial);
-int X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm);
-
-int		X509_REQ_check_private_key(X509_REQ *x509,EVP_PKEY *pkey);
-
-int		X509_check_private_key(X509 *x509,EVP_PKEY *pkey);
-
-int		X509_issuer_and_serial_cmp(const X509 *a, const X509 *b);
-unsigned long	X509_issuer_and_serial_hash(X509 *a);
-
-int		X509_issuer_name_cmp(const X509 *a, const X509 *b);
-unsigned long	X509_issuer_name_hash(X509 *a);
-
-int		X509_subject_name_cmp(const X509 *a, const X509 *b);
-unsigned long	X509_subject_name_hash(X509 *x);
-
-#ifndef OPENSSL_NO_MD5
-unsigned long	X509_issuer_name_hash_old(X509 *a);
-unsigned long	X509_subject_name_hash_old(X509 *x);
-#endif
-
-int		X509_cmp(const X509 *a, const X509 *b);
-int		X509_NAME_cmp(const X509_NAME *a, const X509_NAME *b);
-unsigned long	X509_NAME_hash(X509_NAME *x);
-unsigned long	X509_NAME_hash_old(X509_NAME *x);
-
-int		X509_CRL_cmp(const X509_CRL *a, const X509_CRL *b);
-int		X509_CRL_match(const X509_CRL *a, const X509_CRL *b);
-#ifndef OPENSSL_NO_FP_API
-int		X509_print_ex_fp(FILE *bp,X509 *x, unsigned long nmflag, unsigned long cflag);
-int		X509_print_fp(FILE *bp,X509 *x);
-int		X509_CRL_print_fp(FILE *bp,X509_CRL *x);
-int		X509_REQ_print_fp(FILE *bp,X509_REQ *req);
-int X509_NAME_print_ex_fp(FILE *fp, X509_NAME *nm, int indent, unsigned long flags);
-#endif
-
-#ifndef OPENSSL_NO_BIO
-int		X509_NAME_print(BIO *bp, X509_NAME *name, int obase);
-int X509_NAME_print_ex(BIO *out, X509_NAME *nm, int indent, unsigned long flags);
-int		X509_print_ex(BIO *bp,X509 *x, unsigned long nmflag, unsigned long cflag);
-int		X509_print(BIO *bp,X509 *x);
-int		X509_ocspid_print(BIO *bp,X509 *x);
-int		X509_CERT_AUX_print(BIO *bp,X509_CERT_AUX *x, int indent);
-int		X509_CRL_print(BIO *bp,X509_CRL *x);
-int		X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflag, unsigned long cflag);
-int		X509_REQ_print(BIO *bp,X509_REQ *req);
-#endif
-
-int 		X509_NAME_entry_count(X509_NAME *name);
-int 		X509_NAME_get_text_by_NID(X509_NAME *name, int nid,
-			char *buf,int len);
-int		X509_NAME_get_text_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj,
-			char *buf,int len);
-
-/* NOTE: you should be passsing -1, not 0 as lastpos.  The functions that use
- * lastpos, search after that position on. */
-int 		X509_NAME_get_index_by_NID(X509_NAME *name,int nid,int lastpos);
-int 		X509_NAME_get_index_by_OBJ(X509_NAME *name,ASN1_OBJECT *obj,
-			int lastpos);
-X509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc);
-X509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc);
-int 		X509_NAME_add_entry(X509_NAME *name,X509_NAME_ENTRY *ne,
-			int loc, int set);
-int X509_NAME_add_entry_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, int type,
-			unsigned char *bytes, int len, int loc, int set);
-int X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type,
-			unsigned char *bytes, int len, int loc, int set);
-X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne,
-		const char *field, int type, const unsigned char *bytes, int len);
-X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid,
-			int type,unsigned char *bytes, int len);
-int X509_NAME_add_entry_by_txt(X509_NAME *name, const char *field, int type,
-			const unsigned char *bytes, int len, int loc, int set);
-X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne,
-			ASN1_OBJECT *obj, int type,const unsigned char *bytes,
-			int len);
-int 		X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne,
-			ASN1_OBJECT *obj);
-int 		X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type,
-			const unsigned char *bytes, int len);
-ASN1_OBJECT *	X509_NAME_ENTRY_get_object(X509_NAME_ENTRY *ne);
-ASN1_STRING *	X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *ne);
-
-int		X509v3_get_ext_count(const STACK_OF(X509_EXTENSION) *x);
-int		X509v3_get_ext_by_NID(const STACK_OF(X509_EXTENSION) *x,
-				      int nid, int lastpos);
-int		X509v3_get_ext_by_OBJ(const STACK_OF(X509_EXTENSION) *x,
-				      ASN1_OBJECT *obj,int lastpos);
-int		X509v3_get_ext_by_critical(const STACK_OF(X509_EXTENSION) *x,
-					   int crit, int lastpos);
-X509_EXTENSION *X509v3_get_ext(const STACK_OF(X509_EXTENSION) *x, int loc);
-X509_EXTENSION *X509v3_delete_ext(STACK_OF(X509_EXTENSION) *x, int loc);
-STACK_OF(X509_EXTENSION) *X509v3_add_ext(STACK_OF(X509_EXTENSION) **x,
-					 X509_EXTENSION *ex, int loc);
-
-int		X509_get_ext_count(X509 *x);
-int		X509_get_ext_by_NID(X509 *x, int nid, int lastpos);
-int		X509_get_ext_by_OBJ(X509 *x,ASN1_OBJECT *obj,int lastpos);
-int		X509_get_ext_by_critical(X509 *x, int crit, int lastpos);
-X509_EXTENSION *X509_get_ext(X509 *x, int loc);
-X509_EXTENSION *X509_delete_ext(X509 *x, int loc);
-int		X509_add_ext(X509 *x, X509_EXTENSION *ex, int loc);
-void	*	X509_get_ext_d2i(X509 *x, int nid, int *crit, int *idx);
-int		X509_add1_ext_i2d(X509 *x, int nid, void *value, int crit,
-							unsigned long flags);
-
-int		X509_CRL_get_ext_count(X509_CRL *x);
-int		X509_CRL_get_ext_by_NID(X509_CRL *x, int nid, int lastpos);
-int		X509_CRL_get_ext_by_OBJ(X509_CRL *x,ASN1_OBJECT *obj,int lastpos);
-int		X509_CRL_get_ext_by_critical(X509_CRL *x, int crit, int lastpos);
-X509_EXTENSION *X509_CRL_get_ext(X509_CRL *x, int loc);
-X509_EXTENSION *X509_CRL_delete_ext(X509_CRL *x, int loc);
-int		X509_CRL_add_ext(X509_CRL *x, X509_EXTENSION *ex, int loc);
-void	*	X509_CRL_get_ext_d2i(X509_CRL *x, int nid, int *crit, int *idx);
-int		X509_CRL_add1_ext_i2d(X509_CRL *x, int nid, void *value, int crit,
-							unsigned long flags);
-
-int		X509_REVOKED_get_ext_count(X509_REVOKED *x);
-int		X509_REVOKED_get_ext_by_NID(X509_REVOKED *x, int nid, int lastpos);
-int		X509_REVOKED_get_ext_by_OBJ(X509_REVOKED *x,ASN1_OBJECT *obj,int lastpos);
-int		X509_REVOKED_get_ext_by_critical(X509_REVOKED *x, int crit, int lastpos);
-X509_EXTENSION *X509_REVOKED_get_ext(X509_REVOKED *x, int loc);
-X509_EXTENSION *X509_REVOKED_delete_ext(X509_REVOKED *x, int loc);
-int		X509_REVOKED_add_ext(X509_REVOKED *x, X509_EXTENSION *ex, int loc);
-void	*	X509_REVOKED_get_ext_d2i(X509_REVOKED *x, int nid, int *crit, int *idx);
-int		X509_REVOKED_add1_ext_i2d(X509_REVOKED *x, int nid, void *value, int crit,
-							unsigned long flags);
-
-X509_EXTENSION *X509_EXTENSION_create_by_NID(X509_EXTENSION **ex,
-			int nid, int crit, ASN1_OCTET_STRING *data);
-X509_EXTENSION *X509_EXTENSION_create_by_OBJ(X509_EXTENSION **ex,
-			ASN1_OBJECT *obj,int crit,ASN1_OCTET_STRING *data);
-int		X509_EXTENSION_set_object(X509_EXTENSION *ex,ASN1_OBJECT *obj);
-int		X509_EXTENSION_set_critical(X509_EXTENSION *ex, int crit);
-int		X509_EXTENSION_set_data(X509_EXTENSION *ex,
-			ASN1_OCTET_STRING *data);
-ASN1_OBJECT *	X509_EXTENSION_get_object(X509_EXTENSION *ex);
-ASN1_OCTET_STRING *X509_EXTENSION_get_data(X509_EXTENSION *ne);
-int		X509_EXTENSION_get_critical(X509_EXTENSION *ex);
-
-int X509at_get_attr_count(const STACK_OF(X509_ATTRIBUTE) *x);
-int X509at_get_attr_by_NID(const STACK_OF(X509_ATTRIBUTE) *x, int nid,
-			  int lastpos);
-int X509at_get_attr_by_OBJ(const STACK_OF(X509_ATTRIBUTE) *sk, ASN1_OBJECT *obj,
-			  int lastpos);
-X509_ATTRIBUTE *X509at_get_attr(const STACK_OF(X509_ATTRIBUTE) *x, int loc);
-X509_ATTRIBUTE *X509at_delete_attr(STACK_OF(X509_ATTRIBUTE) *x, int loc);
-STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr(STACK_OF(X509_ATTRIBUTE) **x,
-					 X509_ATTRIBUTE *attr);
-STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_OBJ(STACK_OF(X509_ATTRIBUTE) **x,
-			const ASN1_OBJECT *obj, int type,
-			const unsigned char *bytes, int len);
-STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_NID(STACK_OF(X509_ATTRIBUTE) **x,
-			int nid, int type,
-			const unsigned char *bytes, int len);
-STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_txt(STACK_OF(X509_ATTRIBUTE) **x,
-			const char *attrname, int type,
-			const unsigned char *bytes, int len);
-void *X509at_get0_data_by_OBJ(STACK_OF(X509_ATTRIBUTE) *x,
-				ASN1_OBJECT *obj, int lastpos, int type);
-X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid,
-	     int atrtype, const void *data, int len);
-X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_OBJ(X509_ATTRIBUTE **attr,
-	     const ASN1_OBJECT *obj, int atrtype, const void *data, int len);
-X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_txt(X509_ATTRIBUTE **attr,
-		const char *atrname, int type, const unsigned char *bytes, int len);
-int X509_ATTRIBUTE_set1_object(X509_ATTRIBUTE *attr, const ASN1_OBJECT *obj);
-int X509_ATTRIBUTE_set1_data(X509_ATTRIBUTE *attr, int attrtype, const void *data, int len);
-void *X509_ATTRIBUTE_get0_data(X509_ATTRIBUTE *attr, int idx,
-					int atrtype, void *data);
-int X509_ATTRIBUTE_count(X509_ATTRIBUTE *attr);
-ASN1_OBJECT *X509_ATTRIBUTE_get0_object(X509_ATTRIBUTE *attr);
-ASN1_TYPE *X509_ATTRIBUTE_get0_type(X509_ATTRIBUTE *attr, int idx);
-
-int EVP_PKEY_get_attr_count(const EVP_PKEY *key);
-int EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid,
-			  int lastpos);
-int EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, ASN1_OBJECT *obj,
-			  int lastpos);
-X509_ATTRIBUTE *EVP_PKEY_get_attr(const EVP_PKEY *key, int loc);
-X509_ATTRIBUTE *EVP_PKEY_delete_attr(EVP_PKEY *key, int loc);
-int EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr);
-int EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key,
-			const ASN1_OBJECT *obj, int type,
-			const unsigned char *bytes, int len);
-int EVP_PKEY_add1_attr_by_NID(EVP_PKEY *key,
-			int nid, int type,
-			const unsigned char *bytes, int len);
-int EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key,
-			const char *attrname, int type,
-			const unsigned char *bytes, int len);
-
-int		X509_verify_cert(X509_STORE_CTX *ctx);
-
-/* lookup a cert from a X509 STACK */
-X509 *X509_find_by_issuer_and_serial(STACK_OF(X509) *sk,X509_NAME *name,
-				     ASN1_INTEGER *serial);
-X509 *X509_find_by_subject(STACK_OF(X509) *sk,X509_NAME *name);
-
-DECLARE_ASN1_FUNCTIONS(PBEPARAM)
-DECLARE_ASN1_FUNCTIONS(PBE2PARAM)
-DECLARE_ASN1_FUNCTIONS(PBKDF2PARAM)
-
-int PKCS5_pbe_set0_algor(X509_ALGOR *algor, int alg, int iter,
-				const unsigned char *salt, int saltlen);
-
-X509_ALGOR *PKCS5_pbe_set(int alg, int iter,
-				const unsigned char *salt, int saltlen);
-X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter,
-					 unsigned char *salt, int saltlen);
-X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter,
-				 unsigned char *salt, int saltlen,
-				 unsigned char *aiv, int prf_nid);
-
-/* PKCS#8 utilities */
-
-DECLARE_ASN1_FUNCTIONS(PKCS8_PRIV_KEY_INFO)
-
-EVP_PKEY *EVP_PKCS82PKEY(PKCS8_PRIV_KEY_INFO *p8);
-PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8(EVP_PKEY *pkey);
-PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8_broken(EVP_PKEY *pkey, int broken);
-PKCS8_PRIV_KEY_INFO *PKCS8_set_broken(PKCS8_PRIV_KEY_INFO *p8, int broken);
-
-int PKCS8_pkey_set0(PKCS8_PRIV_KEY_INFO *priv, ASN1_OBJECT *aobj,
-			int version, int ptype, void *pval,
-				unsigned char *penc, int penclen);
-int PKCS8_pkey_get0(ASN1_OBJECT **ppkalg,
-		const unsigned char **pk, int *ppklen,
-		X509_ALGOR **pa,
-		PKCS8_PRIV_KEY_INFO *p8);
-
-int X509_PUBKEY_set0_param(X509_PUBKEY *pub, ASN1_OBJECT *aobj,
-					int ptype, void *pval,
-					unsigned char *penc, int penclen);
-int X509_PUBKEY_get0_param(ASN1_OBJECT **ppkalg,
-		const unsigned char **pk, int *ppklen,
-		X509_ALGOR **pa,
-		X509_PUBKEY *pub);
-
-int X509_check_trust(X509 *x, int id, int flags);
-int X509_TRUST_get_count(void);
-X509_TRUST * X509_TRUST_get0(int idx);
-int X509_TRUST_get_by_id(int id);
-int X509_TRUST_add(int id, int flags, int (*ck)(X509_TRUST *, X509 *, int),
-					char *name, int arg1, void *arg2);
-void X509_TRUST_cleanup(void);
-int X509_TRUST_get_flags(X509_TRUST *xp);
-char *X509_TRUST_get0_name(X509_TRUST *xp);
-int X509_TRUST_get_trust(X509_TRUST *xp);
-
-/* BEGIN ERROR CODES */
-/* The following lines are auto generated by the script mkerr.pl. Any changes
- * made after this point may be overwritten when the script is next run.
- */
-void ERR_load_X509_strings(void);
-
-/* Error codes for the X509 functions. */
-
-/* Function codes. */
-#define X509_F_ADD_CERT_DIR				 100
-#define X509_F_BY_FILE_CTRL				 101
-#define X509_F_CHECK_POLICY				 145
-#define X509_F_DIR_CTRL					 102
-#define X509_F_GET_CERT_BY_SUBJECT			 103
-#define X509_F_NETSCAPE_SPKI_B64_DECODE			 129
-#define X509_F_NETSCAPE_SPKI_B64_ENCODE			 130
-#define X509_F_X509AT_ADD1_ATTR				 135
-#define X509_F_X509V3_ADD_EXT				 104
-#define X509_F_X509_ATTRIBUTE_CREATE_BY_NID		 136
-#define X509_F_X509_ATTRIBUTE_CREATE_BY_OBJ		 137
-#define X509_F_X509_ATTRIBUTE_CREATE_BY_TXT		 140
-#define X509_F_X509_ATTRIBUTE_GET0_DATA			 139
-#define X509_F_X509_ATTRIBUTE_SET1_DATA			 138
-#define X509_F_X509_CHECK_PRIVATE_KEY			 128
-#define X509_F_X509_CRL_PRINT_FP			 147
-#define X509_F_X509_EXTENSION_CREATE_BY_NID		 108
-#define X509_F_X509_EXTENSION_CREATE_BY_OBJ		 109
-#define X509_F_X509_GET_PUBKEY_PARAMETERS		 110
-#define X509_F_X509_LOAD_CERT_CRL_FILE			 132
-#define X509_F_X509_LOAD_CERT_FILE			 111
-#define X509_F_X509_LOAD_CRL_FILE			 112
-#define X509_F_X509_NAME_ADD_ENTRY			 113
-#define X509_F_X509_NAME_ENTRY_CREATE_BY_NID		 114
-#define X509_F_X509_NAME_ENTRY_CREATE_BY_TXT		 131
-#define X509_F_X509_NAME_ENTRY_SET_OBJECT		 115
-#define X509_F_X509_NAME_ONELINE			 116
-#define X509_F_X509_NAME_PRINT				 117
-#define X509_F_X509_PRINT_EX_FP				 118
-#define X509_F_X509_PUBKEY_GET				 119
-#define X509_F_X509_PUBKEY_SET				 120
-#define X509_F_X509_REQ_CHECK_PRIVATE_KEY		 144
-#define X509_F_X509_REQ_PRINT_EX			 121
-#define X509_F_X509_REQ_PRINT_FP			 122
-#define X509_F_X509_REQ_TO_X509				 123
-#define X509_F_X509_STORE_ADD_CERT			 124
-#define X509_F_X509_STORE_ADD_CRL			 125
-#define X509_F_X509_STORE_CTX_GET1_ISSUER		 146
-#define X509_F_X509_STORE_CTX_INIT			 143
-#define X509_F_X509_STORE_CTX_NEW			 142
-#define X509_F_X509_STORE_CTX_PURPOSE_INHERIT		 134
-#define X509_F_X509_TO_X509_REQ				 126
-#define X509_F_X509_TRUST_ADD				 133
-#define X509_F_X509_TRUST_SET				 141
-#define X509_F_X509_VERIFY_CERT				 127
-
-/* Reason codes. */
-#define X509_R_BAD_X509_FILETYPE			 100
-#define X509_R_BASE64_DECODE_ERROR			 118
-#define X509_R_CANT_CHECK_DH_KEY			 114
-#define X509_R_CERT_ALREADY_IN_HASH_TABLE		 101
-#define X509_R_ERR_ASN1_LIB				 102
-#define X509_R_INVALID_DIRECTORY			 113
-#define X509_R_INVALID_FIELD_NAME			 119
-#define X509_R_INVALID_TRUST				 123
-#define X509_R_KEY_TYPE_MISMATCH			 115
-#define X509_R_KEY_VALUES_MISMATCH			 116
-#define X509_R_LOADING_CERT_DIR				 103
-#define X509_R_LOADING_DEFAULTS				 104
-#define X509_R_METHOD_NOT_SUPPORTED			 124
-#define X509_R_NO_CERT_SET_FOR_US_TO_VERIFY		 105
-#define X509_R_PUBLIC_KEY_DECODE_ERROR			 125
-#define X509_R_PUBLIC_KEY_ENCODE_ERROR			 126
-#define X509_R_SHOULD_RETRY				 106
-#define X509_R_UNABLE_TO_FIND_PARAMETERS_IN_CHAIN	 107
-#define X509_R_UNABLE_TO_GET_CERTS_PUBLIC_KEY		 108
-#define X509_R_UNKNOWN_KEY_TYPE				 117
-#define X509_R_UNKNOWN_NID				 109
-#define X509_R_UNKNOWN_PURPOSE_ID			 121
-#define X509_R_UNKNOWN_TRUST_ID				 120
-#define X509_R_UNSUPPORTED_ALGORITHM			 111
-#define X509_R_WRONG_LOOKUP_TYPE			 112
-#define X509_R_WRONG_TYPE				 122
-
-#ifdef  __cplusplus
-}
-#endif
-#endif
diff --git a/extra_lib/include/openssl/x509_vfy.h b/extra_lib/include/openssl/x509_vfy.h
deleted file mode 100644
index fe09b30..0000000
--- a/extra_lib/include/openssl/x509_vfy.h
+++ /dev/null
@@ -1,567 +0,0 @@
-/* crypto/x509/x509_vfy.h */
-/* Copyright (C) 1995-1998 Eric Young (eay at cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay at cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh at cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay at cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh at cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef HEADER_X509_H
-#include <openssl/x509.h>
-/* openssl/x509.h ends up #include-ing this file at about the only
- * appropriate moment. */
-#endif
-
-#ifndef HEADER_X509_VFY_H
-#define HEADER_X509_VFY_H
-
-#include <openssl/opensslconf.h>
-#ifndef OPENSSL_NO_LHASH
-#include <openssl/lhash.h>
-#endif
-#include <openssl/bio.h>
-#include <openssl/crypto.h>
-#include <openssl/symhacks.h>
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-#if 0
-/* Outer object */
-typedef struct x509_hash_dir_st
-	{
-	int num_dirs;
-	char **dirs;
-	int *dirs_type;
-	int num_dirs_alloced;
-	} X509_HASH_DIR_CTX;
-#endif
-
-typedef struct x509_file_st
-	{
-	int num_paths;	/* number of paths to files or directories */
-	int num_alloced;
-	char **paths;	/* the list of paths or directories */
-	int *path_type;
-	} X509_CERT_FILE_CTX;
-
-/*******************************/
-/*
-SSL_CTX -> X509_STORE    
-		-> X509_LOOKUP
-			->X509_LOOKUP_METHOD
-		-> X509_LOOKUP
-			->X509_LOOKUP_METHOD
- 
-SSL	-> X509_STORE_CTX
-		->X509_STORE    
-
-The X509_STORE holds the tables etc for verification stuff.
-A X509_STORE_CTX is used while validating a single certificate.
-The X509_STORE has X509_LOOKUPs for looking up certs.
-The X509_STORE then calls a function to actually verify the
-certificate chain.
-*/
-
-#define X509_LU_RETRY		-1
-#define X509_LU_FAIL		0
-#define X509_LU_X509		1
-#define X509_LU_CRL		2
-#define X509_LU_PKEY		3
-
-typedef struct x509_object_st
-	{
-	/* one of the above types */
-	int type;
-	union	{
-		char *ptr;
-		X509 *x509;
-		X509_CRL *crl;
-		EVP_PKEY *pkey;
-		} data;
-	} X509_OBJECT;
-
-typedef struct x509_lookup_st X509_LOOKUP;
-
-DECLARE_STACK_OF(X509_LOOKUP)
-DECLARE_STACK_OF(X509_OBJECT)
-
-/* This is a static that defines the function interface */
-typedef struct x509_lookup_method_st
-	{
-	const char *name;
-	int (*new_item)(X509_LOOKUP *ctx);
-	void (*free)(X509_LOOKUP *ctx);
-	int (*init)(X509_LOOKUP *ctx);
-	int (*shutdown)(X509_LOOKUP *ctx);
-	int (*ctrl)(X509_LOOKUP *ctx,int cmd,const char *argc,long argl,
-			char **ret);
-	int (*get_by_subject)(X509_LOOKUP *ctx,int type,X509_NAME *name,
-			      X509_OBJECT *ret);
-	int (*get_by_issuer_serial)(X509_LOOKUP *ctx,int type,X509_NAME *name,
-				    ASN1_INTEGER *serial,X509_OBJECT *ret);
-	int (*get_by_fingerprint)(X509_LOOKUP *ctx,int type,
-				  unsigned char *bytes,int len,
-				  X509_OBJECT *ret);
-	int (*get_by_alias)(X509_LOOKUP *ctx,int type,char *str,int len,
-			    X509_OBJECT *ret);
-	} X509_LOOKUP_METHOD;
-
-/* This structure hold all parameters associated with a verify operation
- * by including an X509_VERIFY_PARAM structure in related structures the
- * parameters used can be customized
- */
-
-typedef struct X509_VERIFY_PARAM_st
-	{
-	char *name;
-	time_t check_time;	/* Time to use */
-	unsigned long inh_flags; /* Inheritance flags */
-	unsigned long flags;	/* Various verify flags */
-	int purpose;		/* purpose to check untrusted certificates */
-	int trust;		/* trust setting to check */
-	int depth;		/* Verify depth */
-	STACK_OF(ASN1_OBJECT) *policies;	/* Permissible policies */
-	} X509_VERIFY_PARAM;
-
-DECLARE_STACK_OF(X509_VERIFY_PARAM)
-
-/* This is used to hold everything.  It is used for all certificate
- * validation.  Once we have a certificate chain, the 'verify'
- * function is then called to actually check the cert chain. */
-struct x509_store_st
-	{
-	/* The following is a cache of trusted certs */
-	int cache; 	/* if true, stash any hits */
-	STACK_OF(X509_OBJECT) *objs;	/* Cache of all objects */
-
-	/* These are external lookup methods */
-	STACK_OF(X509_LOOKUP) *get_cert_methods;
-
-	X509_VERIFY_PARAM *param;
-
-	/* Callbacks for various operations */
-	int (*verify)(X509_STORE_CTX *ctx);	/* called to verify a certificate */
-	int (*verify_cb)(int ok,X509_STORE_CTX *ctx);	/* error callback */
-	int (*get_issuer)(X509 **issuer, X509_STORE_CTX *ctx, X509 *x);	/* get issuers cert from ctx */
-	int (*check_issued)(X509_STORE_CTX *ctx, X509 *x, X509 *issuer); /* check issued */
-	int (*check_revocation)(X509_STORE_CTX *ctx); /* Check revocation status of chain */
-	int (*get_crl)(X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x); /* retrieve CRL */
-	int (*check_crl)(X509_STORE_CTX *ctx, X509_CRL *crl); /* Check CRL validity */
-	int (*cert_crl)(X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x); /* Check certificate against CRL */
-	STACK_OF(X509) * (*lookup_certs)(X509_STORE_CTX *ctx, X509_NAME *nm);
-	STACK_OF(X509_CRL) * (*lookup_crls)(X509_STORE_CTX *ctx, X509_NAME *nm);
-	int (*cleanup)(X509_STORE_CTX *ctx);
-
-	CRYPTO_EX_DATA ex_data;
-	int references;
-	} /* X509_STORE */;
-
-int X509_STORE_set_depth(X509_STORE *store, int depth);
-
-#define X509_STORE_set_verify_cb_func(ctx,func) ((ctx)->verify_cb=(func))
-#define X509_STORE_set_verify_func(ctx,func)	((ctx)->verify=(func))
-
-/* This is the functions plus an instance of the local variables. */
-struct x509_lookup_st
-	{
-	int init;			/* have we been started */
-	int skip;			/* don't use us. */
-	X509_LOOKUP_METHOD *method;	/* the functions */
-	char *method_data;		/* method data */
-
-	X509_STORE *store_ctx;	/* who owns us */
-	} /* X509_LOOKUP */;
-
-/* This is a used when verifying cert chains.  Since the
- * gathering of the cert chain can take some time (and have to be
- * 'retried', this needs to be kept and passed around. */
-struct x509_store_ctx_st      /* X509_STORE_CTX */
-	{
-	X509_STORE *ctx;
-	int current_method;	/* used when looking up certs */
-
-	/* The following are set by the caller */
-	X509 *cert;		/* The cert to check */
-	STACK_OF(X509) *untrusted;	/* chain of X509s - untrusted - passed in */
-	STACK_OF(X509_CRL) *crls;	/* set of CRLs passed in */
-
-	X509_VERIFY_PARAM *param;
-	void *other_ctx;	/* Other info for use with get_issuer() */
-
-	/* Callbacks for various operations */
-	int (*verify)(X509_STORE_CTX *ctx);	/* called to verify a certificate */
-	int (*verify_cb)(int ok,X509_STORE_CTX *ctx);		/* error callback */
-	int (*get_issuer)(X509 **issuer, X509_STORE_CTX *ctx, X509 *x);	/* get issuers cert from ctx */
-	int (*check_issued)(X509_STORE_CTX *ctx, X509 *x, X509 *issuer); /* check issued */
-	int (*check_revocation)(X509_STORE_CTX *ctx); /* Check revocation status of chain */
-	int (*get_crl)(X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x); /* retrieve CRL */
-	int (*check_crl)(X509_STORE_CTX *ctx, X509_CRL *crl); /* Check CRL validity */
-	int (*cert_crl)(X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x); /* Check certificate against CRL */
-	int (*check_policy)(X509_STORE_CTX *ctx);
-	STACK_OF(X509) * (*lookup_certs)(X509_STORE_CTX *ctx, X509_NAME *nm);
-	STACK_OF(X509_CRL) * (*lookup_crls)(X509_STORE_CTX *ctx, X509_NAME *nm);
-	int (*cleanup)(X509_STORE_CTX *ctx);
-
-	/* The following is built up */
-	int valid;		/* if 0, rebuild chain */
-	int last_untrusted;	/* index of last untrusted cert */
-	STACK_OF(X509) *chain; 		/* chain of X509s - built up and trusted */
-	X509_POLICY_TREE *tree;	/* Valid policy tree */
-
-	int explicit_policy;	/* Require explicit policy value */
-
-	/* When something goes wrong, this is why */
-	int error_depth;
-	int error;
-	X509 *current_cert;
-	X509 *current_issuer;	/* cert currently being tested as valid issuer */
-	X509_CRL *current_crl;	/* current CRL */
-
-	int current_crl_score;  /* score of current CRL */
-	unsigned int current_reasons;  /* Reason mask */
-
-	X509_STORE_CTX *parent; /* For CRL path validation: parent context */
-
-	CRYPTO_EX_DATA ex_data;
-	} /* X509_STORE_CTX */;
-
-void X509_STORE_CTX_set_depth(X509_STORE_CTX *ctx, int depth);
-
-#define X509_STORE_CTX_set_app_data(ctx,data) \
-	X509_STORE_CTX_set_ex_data(ctx,0,data)
-#define X509_STORE_CTX_get_app_data(ctx) \
-	X509_STORE_CTX_get_ex_data(ctx,0)
-
-#define X509_L_FILE_LOAD	1
-#define X509_L_ADD_DIR		2
-
-#define X509_LOOKUP_load_file(x,name,type) \
-		X509_LOOKUP_ctrl((x),X509_L_FILE_LOAD,(name),(long)(type),NULL)
-
-#define X509_LOOKUP_add_dir(x,name,type) \
-		X509_LOOKUP_ctrl((x),X509_L_ADD_DIR,(name),(long)(type),NULL)
-
-#define		X509_V_OK					0
-/* illegal error (for uninitialized values, to avoid X509_V_OK): 1 */
-
-#define		X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT		2
-#define		X509_V_ERR_UNABLE_TO_GET_CRL			3
-#define		X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE	4
-#define		X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE	5
-#define		X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY	6
-#define		X509_V_ERR_CERT_SIGNATURE_FAILURE		7
-#define		X509_V_ERR_CRL_SIGNATURE_FAILURE		8
-#define		X509_V_ERR_CERT_NOT_YET_VALID			9
-#define		X509_V_ERR_CERT_HAS_EXPIRED			10
-#define		X509_V_ERR_CRL_NOT_YET_VALID			11
-#define		X509_V_ERR_CRL_HAS_EXPIRED			12
-#define		X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD	13
-#define		X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD	14
-#define		X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD	15
-#define		X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD	16
-#define		X509_V_ERR_OUT_OF_MEM				17
-#define		X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT		18
-#define		X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN		19
-#define		X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY	20
-#define		X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE	21
-#define		X509_V_ERR_CERT_CHAIN_TOO_LONG			22
-#define		X509_V_ERR_CERT_REVOKED				23
-#define		X509_V_ERR_INVALID_CA				24
-#define		X509_V_ERR_PATH_LENGTH_EXCEEDED			25
-#define		X509_V_ERR_INVALID_PURPOSE			26
-#define		X509_V_ERR_CERT_UNTRUSTED			27
-#define		X509_V_ERR_CERT_REJECTED			28
-/* These are 'informational' when looking for issuer cert */
-#define		X509_V_ERR_SUBJECT_ISSUER_MISMATCH		29
-#define		X509_V_ERR_AKID_SKID_MISMATCH			30
-#define		X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH		31
-#define		X509_V_ERR_KEYUSAGE_NO_CERTSIGN			32
-
-#define		X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER		33
-#define		X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION		34
-#define		X509_V_ERR_KEYUSAGE_NO_CRL_SIGN			35
-#define		X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION	36
-#define		X509_V_ERR_INVALID_NON_CA			37
-#define		X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED		38
-#define		X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE	39
-#define		X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED	40
-
-#define		X509_V_ERR_INVALID_EXTENSION			41
-#define		X509_V_ERR_INVALID_POLICY_EXTENSION		42
-#define		X509_V_ERR_NO_EXPLICIT_POLICY			43
-#define		X509_V_ERR_DIFFERENT_CRL_SCOPE			44
-#define		X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE	45
-
-#define		X509_V_ERR_UNNESTED_RESOURCE			46
-
-#define		X509_V_ERR_PERMITTED_VIOLATION			47
-#define		X509_V_ERR_EXCLUDED_VIOLATION			48
-#define		X509_V_ERR_SUBTREE_MINMAX			49
-#define		X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE		51
-#define		X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX	52
-#define		X509_V_ERR_UNSUPPORTED_NAME_SYNTAX		53
-#define		X509_V_ERR_CRL_PATH_VALIDATION_ERROR		54
-
-/* The application is not happy */
-#define		X509_V_ERR_APPLICATION_VERIFICATION		50
-
-/* Certificate verify flags */
-
-/* Send issuer+subject checks to verify_cb */
-#define	X509_V_FLAG_CB_ISSUER_CHECK		0x1
-/* Use check time instead of current time */
-#define	X509_V_FLAG_USE_CHECK_TIME		0x2
-/* Lookup CRLs */
-#define	X509_V_FLAG_CRL_CHECK			0x4
-/* Lookup CRLs for whole chain */
-#define	X509_V_FLAG_CRL_CHECK_ALL		0x8
-/* Ignore unhandled critical extensions */
-#define	X509_V_FLAG_IGNORE_CRITICAL		0x10
-/* Disable workarounds for broken certificates */
-#define	X509_V_FLAG_X509_STRICT			0x20
-/* Enable proxy certificate validation */
-#define	X509_V_FLAG_ALLOW_PROXY_CERTS		0x40
-/* Enable policy checking */
-#define X509_V_FLAG_POLICY_CHECK		0x80
-/* Policy variable require-explicit-policy */
-#define X509_V_FLAG_EXPLICIT_POLICY		0x100
-/* Policy variable inhibit-any-policy */
-#define	X509_V_FLAG_INHIBIT_ANY			0x200
-/* Policy variable inhibit-policy-mapping */
-#define X509_V_FLAG_INHIBIT_MAP			0x400
-/* Notify callback that policy is OK */
-#define X509_V_FLAG_NOTIFY_POLICY		0x800
-/* Extended CRL features such as indirect CRLs, alternate CRL signing keys */
-#define X509_V_FLAG_EXTENDED_CRL_SUPPORT	0x1000
-/* Delta CRL support */
-#define X509_V_FLAG_USE_DELTAS			0x2000
-/* Check selfsigned CA signature */
-#define X509_V_FLAG_CHECK_SS_SIGNATURE		0x4000
-
-
-#define X509_VP_FLAG_DEFAULT			0x1
-#define X509_VP_FLAG_OVERWRITE			0x2
-#define X509_VP_FLAG_RESET_FLAGS		0x4
-#define X509_VP_FLAG_LOCKED			0x8
-#define X509_VP_FLAG_ONCE			0x10
-
-/* Internal use: mask of policy related options */
-#define X509_V_FLAG_POLICY_MASK (X509_V_FLAG_POLICY_CHECK \
-				| X509_V_FLAG_EXPLICIT_POLICY \
-				| X509_V_FLAG_INHIBIT_ANY \
-				| X509_V_FLAG_INHIBIT_MAP)
-
-int X509_OBJECT_idx_by_subject(STACK_OF(X509_OBJECT) *h, int type,
-	     X509_NAME *name);
-X509_OBJECT *X509_OBJECT_retrieve_by_subject(STACK_OF(X509_OBJECT) *h,int type,X509_NAME *name);
-X509_OBJECT *X509_OBJECT_retrieve_match(STACK_OF(X509_OBJECT) *h, X509_OBJECT *x);
-void X509_OBJECT_up_ref_count(X509_OBJECT *a);
-void X509_OBJECT_free_contents(X509_OBJECT *a);
-X509_STORE *X509_STORE_new(void );
-void X509_STORE_free(X509_STORE *v);
-
-STACK_OF(X509)* X509_STORE_get1_certs(X509_STORE_CTX *st, X509_NAME *nm);
-STACK_OF(X509_CRL)* X509_STORE_get1_crls(X509_STORE_CTX *st, X509_NAME *nm);
-int X509_STORE_set_flags(X509_STORE *ctx, unsigned long flags);
-int X509_STORE_set_purpose(X509_STORE *ctx, int purpose);
-int X509_STORE_set_trust(X509_STORE *ctx, int trust);
-int X509_STORE_set1_param(X509_STORE *ctx, X509_VERIFY_PARAM *pm);
-
-void X509_STORE_set_verify_cb(X509_STORE *ctx,
-				  int (*verify_cb)(int, X509_STORE_CTX *));
-
-X509_STORE_CTX *X509_STORE_CTX_new(void);
-
-int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
-
-void X509_STORE_CTX_free(X509_STORE_CTX *ctx);
-int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store,
-			 X509 *x509, STACK_OF(X509) *chain);
-void X509_STORE_CTX_trusted_stack(X509_STORE_CTX *ctx, STACK_OF(X509) *sk);
-void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx);
-
-X509_LOOKUP *X509_STORE_add_lookup(X509_STORE *v, X509_LOOKUP_METHOD *m);
-
-X509_LOOKUP_METHOD *X509_LOOKUP_hash_dir(void);
-X509_LOOKUP_METHOD *X509_LOOKUP_file(void);
-
-int X509_STORE_add_cert(X509_STORE *ctx, X509 *x);
-int X509_STORE_add_crl(X509_STORE *ctx, X509_CRL *x);
-
-int X509_STORE_get_by_subject(X509_STORE_CTX *vs,int type,X509_NAME *name,
-	X509_OBJECT *ret);
-
-int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc,
-	long argl, char **ret);
-
-#ifndef OPENSSL_NO_STDIO
-int X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type);
-int X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type);
-int X509_load_cert_crl_file(X509_LOOKUP *ctx, const char *file, int type);
-#endif
-
-
-X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method);
-void X509_LOOKUP_free(X509_LOOKUP *ctx);
-int X509_LOOKUP_init(X509_LOOKUP *ctx);
-int X509_LOOKUP_by_subject(X509_LOOKUP *ctx, int type, X509_NAME *name,
-	X509_OBJECT *ret);
-int X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, int type, X509_NAME *name,
-	ASN1_INTEGER *serial, X509_OBJECT *ret);
-int X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, int type,
-	unsigned char *bytes, int len, X509_OBJECT *ret);
-int X509_LOOKUP_by_alias(X509_LOOKUP *ctx, int type, char *str,
-	int len, X509_OBJECT *ret);
-int X509_LOOKUP_shutdown(X509_LOOKUP *ctx);
-
-#ifndef OPENSSL_NO_STDIO
-int	X509_STORE_load_locations (X509_STORE *ctx,
-		const char *file, const char *dir);
-int	X509_STORE_set_default_paths(X509_STORE *ctx);
-#endif
-
-int X509_STORE_CTX_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
-	CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
-int	X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx,int idx,void *data);
-void *	X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx,int idx);
-int	X509_STORE_CTX_get_error(X509_STORE_CTX *ctx);
-void	X509_STORE_CTX_set_error(X509_STORE_CTX *ctx,int s);
-int	X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx);
-X509 *	X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx);
-X509 *X509_STORE_CTX_get0_current_issuer(X509_STORE_CTX *ctx);
-X509_CRL *X509_STORE_CTX_get0_current_crl(X509_STORE_CTX *ctx);
-X509_STORE_CTX *X509_STORE_CTX_get0_parent_ctx(X509_STORE_CTX *ctx);
-STACK_OF(X509) *X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx);
-STACK_OF(X509) *X509_STORE_CTX_get1_chain(X509_STORE_CTX *ctx);
-void	X509_STORE_CTX_set_cert(X509_STORE_CTX *c,X509 *x);
-void	X509_STORE_CTX_set_chain(X509_STORE_CTX *c,STACK_OF(X509) *sk);
-void	X509_STORE_CTX_set0_crls(X509_STORE_CTX *c,STACK_OF(X509_CRL) *sk);
-int X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, int purpose);
-int X509_STORE_CTX_set_trust(X509_STORE_CTX *ctx, int trust);
-int X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose,
-				int purpose, int trust);
-void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, unsigned long flags);
-void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, unsigned long flags,
-								time_t t);
-void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx,
-				  int (*verify_cb)(int, X509_STORE_CTX *));
-  
-X509_POLICY_TREE *X509_STORE_CTX_get0_policy_tree(X509_STORE_CTX *ctx);
-int X509_STORE_CTX_get_explicit_policy(X509_STORE_CTX *ctx);
-
-X509_VERIFY_PARAM *X509_STORE_CTX_get0_param(X509_STORE_CTX *ctx);
-void X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param);
-int X509_STORE_CTX_set_default(X509_STORE_CTX *ctx, const char *name);
-
-/* X509_VERIFY_PARAM functions */
-
-X509_VERIFY_PARAM *X509_VERIFY_PARAM_new(void);
-void X509_VERIFY_PARAM_free(X509_VERIFY_PARAM *param);
-int X509_VERIFY_PARAM_inherit(X509_VERIFY_PARAM *to,
-						const X509_VERIFY_PARAM *from);
-int X509_VERIFY_PARAM_set1(X509_VERIFY_PARAM *to, 
-						const X509_VERIFY_PARAM *from);
-int X509_VERIFY_PARAM_set1_name(X509_VERIFY_PARAM *param, const char *name);
-int X509_VERIFY_PARAM_set_flags(X509_VERIFY_PARAM *param, unsigned long flags);
-int X509_VERIFY_PARAM_clear_flags(X509_VERIFY_PARAM *param,
-							unsigned long flags);
-unsigned long X509_VERIFY_PARAM_get_flags(X509_VERIFY_PARAM *param);
-int X509_VERIFY_PARAM_set_purpose(X509_VERIFY_PARAM *param, int purpose);
-int X509_VERIFY_PARAM_set_trust(X509_VERIFY_PARAM *param, int trust);
-void X509_VERIFY_PARAM_set_depth(X509_VERIFY_PARAM *param, int depth);
-void X509_VERIFY_PARAM_set_time(X509_VERIFY_PARAM *param, time_t t);
-int X509_VERIFY_PARAM_add0_policy(X509_VERIFY_PARAM *param,
-						ASN1_OBJECT *policy);
-int X509_VERIFY_PARAM_set1_policies(X509_VERIFY_PARAM *param, 
-					STACK_OF(ASN1_OBJECT) *policies);
-int X509_VERIFY_PARAM_get_depth(const X509_VERIFY_PARAM *param);
-
-int X509_VERIFY_PARAM_add0_table(X509_VERIFY_PARAM *param);
-const X509_VERIFY_PARAM *X509_VERIFY_PARAM_lookup(const char *name);
-void X509_VERIFY_PARAM_table_cleanup(void);
-
-int X509_policy_check(X509_POLICY_TREE **ptree, int *pexplicit_policy,
-			STACK_OF(X509) *certs,
-			STACK_OF(ASN1_OBJECT) *policy_oids,
-			unsigned int flags);
-
-void X509_policy_tree_free(X509_POLICY_TREE *tree);
-
-int X509_policy_tree_level_count(const X509_POLICY_TREE *tree);
-X509_POLICY_LEVEL *
-	X509_policy_tree_get0_level(const X509_POLICY_TREE *tree, int i);
-
-STACK_OF(X509_POLICY_NODE) *
-	X509_policy_tree_get0_policies(const X509_POLICY_TREE *tree);
-
-STACK_OF(X509_POLICY_NODE) *
-	X509_policy_tree_get0_user_policies(const X509_POLICY_TREE *tree);
-
-int X509_policy_level_node_count(X509_POLICY_LEVEL *level);
-
-X509_POLICY_NODE *X509_policy_level_get0_node(X509_POLICY_LEVEL *level, int i);
-
-const ASN1_OBJECT *X509_policy_node_get0_policy(const X509_POLICY_NODE *node);
-
-STACK_OF(POLICYQUALINFO) *
-	X509_policy_node_get0_qualifiers(const X509_POLICY_NODE *node);
-const X509_POLICY_NODE *
-	X509_policy_node_get0_parent(const X509_POLICY_NODE *node);
-
-#ifdef  __cplusplus
-}
-#endif
-#endif
-
diff --git a/extra_lib/include/platinum/Neptune.h b/extra_lib/include/platinum/Neptune.h
deleted file mode 100644
index 8ea4fa1..0000000
--- a/extra_lib/include/platinum/Neptune.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Toplevel Include
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NEPTUNE_H_
-#define _NEPTUNE_H_
-
-/*----------------------------------------------------------------------
-|   flags
-+---------------------------------------------------------------------*/
-#define NPT_EXTERNAL_USE /* do not expose internal definitions */
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptConfig.h"
-#include "NptCommon.h"
-#include "NptResults.h"
-#include "NptTypes.h"
-#include "NptConstants.h"
-#include "NptReferences.h"
-#include "NptStreams.h"
-#include "NptBufferedStreams.h"
-#include "NptFile.h"
-#include "NptNetwork.h"
-#include "NptSockets.h"
-#include "NptTime.h"
-#include "NptThreads.h"
-#include "NptSystem.h"
-#include "NptMessaging.h"
-#include "NptQueue.h"
-#include "NptSimpleMessageQueue.h"
-#include "NptSelectableMessageQueue.h"
-#include "NptXml.h"
-#include "NptStrings.h"
-#include "NptArray.h"
-#include "NptList.h"
-#include "NptMap.h"
-#include "NptStack.h"
-#include "NptUri.h"
-#include "NptHttp.h"
-#include "NptDataBuffer.h"
-#include "NptUtils.h"
-#include "NptRingBuffer.h"
-#include "NptBase64.h"
-#include "NptConsole.h"
-#include "NptLogging.h"
-#include "NptSerialPort.h"
-#include "NptVersion.h"
-#include "NptDynamicLibraries.h"
-#include "NptDynamicCast.h"
-#include "NptDigest.h"
-#include "NptCrypto.h"
-
-// optional modules
-#include "NptZip.h"
-#include "NptTls.h"
-
-#endif // _NEPTUNE_H_
diff --git a/extra_lib/include/platinum/NptArray.h b/extra_lib/include/platinum/NptArray.h
deleted file mode 100644
index 721bac8..0000000
--- a/extra_lib/include/platinum/NptArray.h
+++ /dev/null
@@ -1,522 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Arrays
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
-****************************************************************/
-
-#ifndef _NPT_ARRAY_H_
-#define _NPT_ARRAY_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptConfig.h"
-#if defined(NPT_CONFIG_HAVE_NEW_H)
-#include <new>
-#endif
-#include "NptTypes.h"
-#include "NptResults.h"
-
-/*----------------------------------------------------------------------
-|   constants
-+---------------------------------------------------------------------*/
-const int NPT_ARRAY_INITIAL_MAX_SIZE = 128; // bytes
-
-/*----------------------------------------------------------------------
-|   NPT_Array
-+---------------------------------------------------------------------*/
-template <typename T> 
-class NPT_Array 
-{
-public:
-    // types
-    typedef T Element;
-    typedef T* Iterator;
-
-    // methods
-    NPT_Array<T>(): m_Capacity(0), m_ItemCount(0), m_Items(0) {}
-    explicit NPT_Array<T>(NPT_Cardinal count);
-    NPT_Array<T>(NPT_Cardinal count, const T& item);
-    NPT_Array<T>(const T* items, NPT_Cardinal item_count);
-   ~NPT_Array<T>();
-    NPT_Array<T>(const NPT_Array<T>& copy);
-    NPT_Array<T>& operator=(const NPT_Array<T>& copy);
-    bool          operator==(const NPT_Array<T>& other) const;
-    bool          operator!=(const NPT_Array<T>& other) const;
-    NPT_Cardinal GetItemCount() const { return m_ItemCount; }
-    NPT_Result   Add(const T& item);
-    T& operator[](NPT_Ordinal pos)             { return m_Items[pos]; }
-    const T& operator[](NPT_Ordinal pos) const { return m_Items[pos]; }
-    NPT_Result   Erase(Iterator which);
-    NPT_Result   Erase(NPT_Ordinal which) { return Erase(&m_Items[which]); }
-    NPT_Result   Erase(Iterator first, Iterator last);
-    NPT_Result   Erase(NPT_Ordinal first, NPT_Ordinal last) { return Erase(&m_Items[first], &m_Items[last]); }
-    NPT_Result   Insert(Iterator where, const T& item, NPT_Cardinal count = 1);
-    NPT_Result   Reserve(NPT_Cardinal count);
-    NPT_Cardinal GetCapacity() const { return m_Capacity; }
-    NPT_Result   Resize(NPT_Cardinal count);
-    NPT_Result   Resize(NPT_Cardinal count, const T& fill);
-    NPT_Result   Clear();
-    bool         Contains(const T& data) const;
-    Iterator     GetFirstItem() const { return m_ItemCount?&m_Items[0]:NULL; }
-    Iterator     GetLastItem() const  { return m_ItemCount?&m_Items[m_ItemCount-1]:NULL; }
-    Iterator     GetItem(NPT_Ordinal n) { return n<m_ItemCount?&m_Items[n]:NULL; }
-
-    // template list operations
-    // keep these template members defined here because MSV6 does not let
-    // us define them later
-    template <typename X> 
-    NPT_Result Apply(const X& function) const
-    {                                  
-        for (unsigned int i=0; i<m_ItemCount; i++) function(m_Items[i]);
-        return NPT_SUCCESS;
-    }
-
-    template <typename X, typename P>
-    NPT_Result ApplyUntil(const X& function, const P& predicate, bool* match = NULL) const
-    {                                  
-        for (unsigned int i=0; i<m_ItemCount; i++) {
-            NPT_Result return_value;
-            if (predicate(function(m_Items[i]), return_value)) {
-                if (match) *match = true;
-                return return_value;
-            }
-        }
-        if (match) *match = false;
-        return NPT_SUCCESS;
-    }
-
-    template <typename X> 
-    T* Find(const X& predicate, NPT_Ordinal n=0, NPT_Ordinal* pos = NULL) const
-    {
-        if (pos) *pos = -1;
-
-        for (unsigned int i=0; i<m_ItemCount; i++) {
-            if (predicate(m_Items[i])) {
-                if (pos) *pos = i;
-                if (n == 0) return &m_Items[i];
-                --n;
-            }
-        }
-        return NULL;
-    }
-
-protected:
-    // methods
-    T* Allocate(NPT_Cardinal count, NPT_Cardinal& allocated);
-
-    // members
-    NPT_Cardinal m_Capacity;
-    NPT_Cardinal m_ItemCount;
-    T*           m_Items;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_Array<T>::NPT_Array<T>
-+---------------------------------------------------------------------*/
-template <typename T>
-inline
-NPT_Array<T>::NPT_Array(NPT_Cardinal count) :
-    m_Capacity(0),
-    m_ItemCount(0),
-    m_Items(0)
-{
-    Reserve(count);
-}
-
-/*----------------------------------------------------------------------
-|   NPT_Array<T>::NPT_Array<T>
-+---------------------------------------------------------------------*/
-template <typename T>
-inline
-NPT_Array<T>::NPT_Array(const NPT_Array<T>& copy) :
-    m_Capacity(0),
-    m_ItemCount(0),
-    m_Items(0)
-{
-    Reserve(copy.GetItemCount());
-    for (NPT_Ordinal i=0; i<copy.m_ItemCount; i++) {
-        new ((void*)&m_Items[i]) T(copy.m_Items[i]);
-    }
-    m_ItemCount = copy.m_ItemCount;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_Array<T>::NPT_Array<T>
-+---------------------------------------------------------------------*/
-template <typename T>
-inline
-NPT_Array<T>::NPT_Array(NPT_Cardinal count, const T& item) :
-    m_Capacity(0),
-    m_ItemCount(count),
-    m_Items(0)    
-{
-    Reserve(count);
-    for (NPT_Ordinal i=0; i<count; i++) {
-        new ((void*)&m_Items[i]) T(item);
-    }
-}
-
-/*----------------------------------------------------------------------
-|   NPT_Array<T>::NPT_Array<T>
-+---------------------------------------------------------------------*/
-template <typename T>
-inline
-NPT_Array<T>::NPT_Array(const T* items, NPT_Cardinal item_count) :
-    m_Capacity(0),
-    m_ItemCount(item_count),
-    m_Items(0)    
-{
-    Reserve(item_count);
-    for (NPT_Ordinal i=0; i<item_count; i++) {
-        new ((void*)&m_Items[i]) T(items[i]);
-    }
-}
-
-/*----------------------------------------------------------------------
-|   NPT_Array<T>::~NPT_Array<T>
-+---------------------------------------------------------------------*/
-template <typename T>
-inline
-NPT_Array<T>::~NPT_Array()
-{
-    // remove all items
-    Clear();
-
-    // free the memory
-    ::operator delete((void*)m_Items);
-}
-
-/*----------------------------------------------------------------------
-|   NPT_Array<T>::operator=
-+---------------------------------------------------------------------*/
-template <typename T>
-NPT_Array<T>&
-NPT_Array<T>::operator=(const NPT_Array<T>& copy)
-{
-    // do nothing if we're assigning to ourselves
-    if (this == &copy) return *this;
-
-    // destroy all elements
-    Clear();
-
-    // copy all elements from the other object
-    Reserve(copy.GetItemCount());
-    m_ItemCount = copy.m_ItemCount;
-    for (NPT_Ordinal i=0; i<copy.m_ItemCount; i++) {
-        new ((void*)&m_Items[i]) T(copy.m_Items[i]);
-    }
-
-    return *this;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_Array<T>::Clear
-+---------------------------------------------------------------------*/
-template <typename T>
-NPT_Result
-NPT_Array<T>::Clear()
-{
-    // destroy all items
-    for (NPT_Ordinal i=0; i<m_ItemCount; i++) {
-        m_Items[i].~T();
-    }
-
-    m_ItemCount = 0;
-
-    return NPT_SUCCESS;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_Array<T>::Allocate
-+---------------------------------------------------------------------*/
-template <typename T>
-T*
-NPT_Array<T>::Allocate(NPT_Cardinal count, NPT_Cardinal& allocated) 
-{
-    if (m_Capacity) {
-        allocated = 2*m_Capacity;
-    } else {
-        // start with just enough elements to fill 
-        // NPT_ARRAY_INITIAL_MAX_SIZE worth of memory
-        allocated = NPT_ARRAY_INITIAL_MAX_SIZE/sizeof(T);
-        if (allocated == 0) allocated = 1;
-    }
-    if (allocated < count) allocated = count;
-
-    // allocate the items
-    return (T*)::operator new(allocated*sizeof(T));
-}
-
-/*----------------------------------------------------------------------
-|   NPT_Array<T>::Reserve
-+---------------------------------------------------------------------*/
-template <typename T>
-NPT_Result
-NPT_Array<T>::Reserve(NPT_Cardinal count)
-{
-    if (count <= m_Capacity) return NPT_SUCCESS;
-
-    // (re)allocate the items
-    NPT_Cardinal new_capacity;
-    T* new_items = Allocate(count, new_capacity);
-    if (new_items == NULL) {
-        return NPT_ERROR_OUT_OF_MEMORY;
-    }
-    if (m_ItemCount && m_Items) {
-        for (unsigned int i=0; i<m_ItemCount; i++) {
-            // construct the copy
-            new ((void*)&new_items[i])T(m_Items[i]);
-
-            // destroy the item
-            m_Items[i].~T();
-        }
-    }
-    ::operator delete((void*)m_Items);
-    m_Items = new_items;
-    m_Capacity = new_capacity;
-
-    return NPT_SUCCESS;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_Array<T>::Add
-+---------------------------------------------------------------------*/
-template <typename T>
-inline
-NPT_Result
-NPT_Array<T>::Add(const T& item)
-{
-    // ensure capacity
-    NPT_Result result = Reserve(m_ItemCount+1);
-    if (result != NPT_SUCCESS) return result;
-
-    // store the item
-    new ((void*)&m_Items[m_ItemCount++]) T(item);
-
-    return NPT_SUCCESS;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_Array<T>::Erase
-+---------------------------------------------------------------------*/
-template <typename T>
-inline
-NPT_Result
-NPT_Array<T>::Erase(Iterator which)
-{
-    return Erase(which, which);
-}
-
-/*----------------------------------------------------------------------
-|   NPT_Array<T>::Erase
-+---------------------------------------------------------------------*/
-template <typename T>
-NPT_Result
-NPT_Array<T>::Erase(Iterator first, Iterator last)
-{
-    // check parameters
-    if (first == NULL || last == NULL) return NPT_ERROR_INVALID_PARAMETERS;
-
-    // check the bounds
-    NPT_Ordinal first_index = (NPT_Ordinal)(NPT_POINTER_TO_LONG(first-m_Items));
-    NPT_Ordinal last_index  = (NPT_Ordinal)(NPT_POINTER_TO_LONG(last-m_Items));
-    if (first_index >= m_ItemCount ||
-        last_index  >= m_ItemCount ||
-        first_index > last_index) {
-        return NPT_ERROR_INVALID_PARAMETERS;
-    }
-
-    // shift items to the left
-    NPT_Cardinal interval = last_index-first_index+1;
-    NPT_Cardinal shifted = m_ItemCount-last_index-1;
-    for (NPT_Ordinal i=first_index; i<first_index+shifted; i++) {
-        m_Items[i] = m_Items[i+interval];
-    }
-
-    // destruct the remaining items
-    for (NPT_Ordinal i=first_index+shifted; i<m_ItemCount; i++) {
-        m_Items[i].~T();
-    }
-
-    // update the item count
-    m_ItemCount -= interval;
-
-    return NPT_SUCCESS;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_Array<T>::Insert
-+---------------------------------------------------------------------*/
-template <typename T>
-NPT_Result
-NPT_Array<T>::Insert(Iterator where, const T& item, NPT_Cardinal repeat)
-{
-    // check bounds
-    NPT_Ordinal where_index = where?((NPT_Ordinal)NPT_POINTER_TO_LONG(where-m_Items)):m_ItemCount;
-    if (where > &m_Items[m_ItemCount] || repeat == 0) return NPT_ERROR_INVALID_PARAMETERS;
-
-    NPT_Cardinal needed = m_ItemCount+repeat;
-    if (needed > m_Capacity) {
-        // allocate more memory
-        NPT_Cardinal new_capacity;
-        T* new_items = Allocate(needed, new_capacity);
-        if (new_items == NULL) return NPT_ERROR_OUT_OF_MEMORY;
-        m_Capacity = new_capacity;
-
-        // move the items before the insertion point
-        for (NPT_Ordinal i=0; i<where_index; i++) {
-            new((void*)&new_items[i])T(m_Items[i]);
-            m_Items[i].~T();
-        }
-
-        // move the items after the insertion point
-        for (NPT_Ordinal i=where_index; i<m_ItemCount; i++) {
-            new((void*)&new_items[i+repeat])T(m_Items[i]);
-            m_Items[i].~T();
-        }
-
-        // use the new items instead of the current ones
-        ::operator delete((void*)m_Items);
-        m_Items = new_items;
-    } else {
-        // shift items after the insertion point to the right
-        for (NPT_Ordinal i=m_ItemCount; i>where_index; i--) {
-            new((void*)&m_Items[i+repeat-1])T(m_Items[i-1]);
-            m_Items[i-1].~T();
-        }
-    }
-
-    // insert the new items
-    for (NPT_Cardinal i=where_index; i<where_index+repeat; i++) {
-        new((void*)&m_Items[i])T(item);
-    }
-
-    // update the item count
-    m_ItemCount += repeat;
-
-    return NPT_SUCCESS;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_Array<T>::Resize
-+---------------------------------------------------------------------*/
-template <typename T>
-NPT_Result
-NPT_Array<T>::Resize(NPT_Cardinal size)
-{
-    if (size < m_ItemCount) {
-        // shrink
-        for (NPT_Ordinal i=size; i<m_ItemCount; i++) {
-            m_Items[i].~T();
-        }
-        m_ItemCount = size;
-    } else if (size > m_ItemCount) {
-        return Resize(size, T());
-    }
-
-    return NPT_SUCCESS;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_Array<T>::Resize
-+---------------------------------------------------------------------*/
-template <typename T>
-NPT_Result
-NPT_Array<T>::Resize(NPT_Cardinal size, const T& fill)
-{
-    if (size < m_ItemCount) {
-        return Resize(size);
-    } else if (size > m_ItemCount) {
-        Reserve(size);
-        for (NPT_Ordinal i=m_ItemCount; i<size; i++) {
-            new ((void*)&m_Items[i]) T(fill);
-        }
-        m_ItemCount = size;
-    }
-
-    return NPT_SUCCESS;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_Array<T>::Contains
-+---------------------------------------------------------------------*/
-template <typename T>
-bool
-NPT_Array<T>::Contains(const T& data) const
-{
-    for (NPT_Ordinal i=0; i<m_ItemCount; i++) {
-        if (m_Items[i] == data) return true;
-    }
-
-    return false;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_Array<T>::operator==
-+---------------------------------------------------------------------*/
-template <typename T>
-bool
-NPT_Array<T>::operator==(const NPT_Array<T>& other) const
-{
-    // we need the same number of items
-    if (other.m_ItemCount != m_ItemCount) return false;
-
-    // compare all items
-    for (NPT_Ordinal i=0; i<m_ItemCount; i++) {
-        if (!(m_Items[i] == other.m_Items[i])) return false;
-    }
-
-    return true;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_Array<T>::operator!=
-+---------------------------------------------------------------------*/
-template <typename T>
-inline
-bool
-NPT_Array<T>::operator!=(const NPT_Array<T>& other) const
-{
-    return !(*this == other);
-}
-
-#endif // _NPT_ARRAY_H_
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/extra_lib/include/platinum/NptAutomaticCleaner.h b/extra_lib/include/platinum/NptAutomaticCleaner.h
deleted file mode 100644
index 5700846..0000000
--- a/extra_lib/include/platinum/NptAutomaticCleaner.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Automatic Cleaner
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
-****************************************************************/
-
-#ifndef _NPT_AUTOMATIC_CLEANER_H_
-#define _NPT_AUTOMATIC_CLEANER_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptList.h"
-
-/*----------------------------------------------------------------------
-|   NPT_AutomaticCleaner
-+---------------------------------------------------------------------*/
-class NPT_AutomaticCleaner
-{
-public:
-    class Singleton {
-    public:
-        virtual ~Singleton() {}
-    };
-    
-    // singleton management
-    class Cleaner {
-        static Cleaner AutomaticCleaner;
-        ~Cleaner() {
-            if (Instance) {
-                delete Instance;
-                Instance = NULL;
-            }
-        }
-    };
-    static NPT_AutomaticCleaner* GetInstance();
-    static void Shutdown() {
-        if (Instance) {
-            delete Instance;
-            Instance = NULL;
-        }
-	}
-    
-    // destructor
-    ~NPT_AutomaticCleaner();
-    
-    // methods
-    NPT_Result Register(Singleton* singleton);
-    NPT_Result RegisterTlsContext(Singleton* singleton);
-    NPT_Result RegisterHttpConnectionManager(Singleton* singleton);
-    
-private:
-    // class members
-    static NPT_AutomaticCleaner* Instance;
-    
-    // constructor
-    NPT_AutomaticCleaner();
-    
-    // members
-    NPT_List<Singleton*> m_Singletons;
-    Singleton* m_TlsContext;
-    Singleton* m_HttpConnectionManager;
-};
-
-#endif // _NPT_AUTOMATIC_CLEANER_H_
diff --git a/extra_lib/include/platinum/NptAutoreleasePool.h b/extra_lib/include/platinum/NptAutoreleasePool.h
deleted file mode 100644
index cc63664..0000000
--- a/extra_lib/include/platinum/NptAutoreleasePool.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - AutoreleasePool
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_AUTORELEASE_POOL_H_
-#define _NPT_AUTORELEASE_POOL_H_
-
-/*----------------------------------------------------------------------
-|   NPT_AutoreleasePoolInterface
-+---------------------------------------------------------------------*/
-class NPT_AutoreleasePoolInterface 
-{
-public:
-    virtual ~NPT_AutoreleasePoolInterface() {}
-};
-
-/*----------------------------------------------------------------------
-|   NPT_AutoreleasePool
-+---------------------------------------------------------------------*/
-class NPT_AutoreleasePool : public NPT_AutoreleasePoolInterface 
-{
-public:
-    NPT_AutoreleasePool();
-    virtual ~NPT_AutoreleasePool();
-
-private:
-    NPT_AutoreleasePoolInterface* m_Delegate;
-};
-
-#endif // _NPT_AUTORELEASE_POOL_H_
diff --git a/extra_lib/include/platinum/NptBase64.h b/extra_lib/include/platinum/NptBase64.h
deleted file mode 100644
index 89950de..0000000
--- a/extra_lib/include/platinum/NptBase64.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Base64
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
-****************************************************************/
-
-#ifndef _NPT_BASE64_H_
-#define _NPT_BASE64_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptDataBuffer.h"
-#include "NptStrings.h"
-
-/*----------------------------------------------------------------------
-|   constants
-+---------------------------------------------------------------------*/
-const NPT_Cardinal NPT_BASE64_MIME_BLOCKS_PER_LINE = 19;
-const NPT_Cardinal NPT_BASE64_PEM_BLOCKS_PER_LINE  = 16;
-
-/*----------------------------------------------------------------------
-|   NPT_Base64
-+---------------------------------------------------------------------*/
-class NPT_Base64 {
-public:
-    // class methods
-    static NPT_Result Decode(const char*     base64, 
-                             NPT_Size        size,
-                             NPT_DataBuffer& data,
-                             bool            url_safe = false);
-    static NPT_Result Encode(const NPT_Byte* data, 
-                             NPT_Size        size, 
-                             NPT_String&     base64, 
-                             NPT_Cardinal    max_blocks_per_line = 0, 
-                             bool            url_safe = false);
-
-private: 
-    // this class is purely static
-    NPT_Base64();
-};
-
-#endif // _NPT_BASE64_H_
diff --git a/extra_lib/include/platinum/NptBufferedStreams.h b/extra_lib/include/platinum/NptBufferedStreams.h
deleted file mode 100644
index a03f572..0000000
--- a/extra_lib/include/platinum/NptBufferedStreams.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Buffered Byte Stream
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_BUFFERED_STREAMS_H_
-#define _NPT_BUFFERED_STREAMS_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptStreams.h"
-#include "NptTypes.h"
-#include "NptConstants.h"
-#include "NptStrings.h"
-#include "NptDebug.h"
-
-/*----------------------------------------------------------------------
-|   NPT_BufferedStream
-+---------------------------------------------------------------------*/
-const NPT_Size NPT_BUFFERED_BYTE_STREAM_DEFAULT_SIZE = 4096;
-
-/*----------------------------------------------------------------------
-|   NPT_BufferedInputStream
-+---------------------------------------------------------------------*/
-class NPT_BufferedInputStream : public NPT_InputStream
-{
-public:
-    // constructors and destructor
-    NPT_BufferedInputStream(NPT_InputStreamReference& stream,
-                            NPT_Size buffer_size = NPT_BUFFERED_BYTE_STREAM_DEFAULT_SIZE);
-    virtual ~NPT_BufferedInputStream();
-
-    // methods
-    virtual NPT_Result ReadLine(NPT_String& line,
-                                NPT_Size    max_chars = 4096,
-                                bool        break_on_cr = false);
-    virtual NPT_Result ReadLine(char*     buffer, 
-                                NPT_Size  buffer_size,
-                                NPT_Size* chars_read = NULL,
-                                bool      break_on_cr = false);
-    virtual NPT_Result SetBufferSize(NPT_Size size, bool force = false);
-    virtual NPT_Result Peek(void*     buffer, 
-                            NPT_Size  bytes_to_read, 
-                            NPT_Size* bytes_read);
-                              
-    // NPT_InputStream methods
-    NPT_Result Read(void*     buffer, 
-                    NPT_Size  bytes_to_read, 
-                    NPT_Size* bytes_read = NULL);
-    NPT_Result Seek(NPT_Position offset);
-    NPT_Result Tell(NPT_Position& offset);
-    NPT_Result GetSize(NPT_LargeSize& size);
-    NPT_Result GetAvailable(NPT_LargeSize& available);
-
-protected:
-    // members
-    NPT_InputStreamReference m_Source;
-    bool                     m_SkipNewline;
-    bool                     m_Eos;
-    struct {
-        NPT_Byte* data;
-        NPT_Size  offset;
-        NPT_Size  valid;
-        NPT_Size  size;
-    } m_Buffer;
-
-    // methods
-    virtual NPT_Result FillBuffer();
-    virtual NPT_Result ReleaseBuffer();
-};
-
-typedef NPT_Reference<NPT_BufferedInputStream> NPT_BufferedInputStreamReference;
-
-#endif // _NPT_BUFFERED_STREAMS_H_
diff --git a/extra_lib/include/platinum/NptCommon.h b/extra_lib/include/platinum/NptCommon.h
deleted file mode 100644
index 9137d31..0000000
--- a/extra_lib/include/platinum/NptCommon.h
+++ /dev/null
@@ -1,169 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Common Definitions
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_COMMON_H_
-#define _NPT_COMMON_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptTypes.h"
-#include "NptResults.h"
-
-/*----------------------------------------------------------------------
-|   NPT_ObjectDeleter
-+---------------------------------------------------------------------*/
-template <class T>
-class NPT_ObjectDeleter {
-public:
-    void operator()(T* object) const {
-        delete object;
-    }
-};
-
-/*----------------------------------------------------------------------
-|   NPT_ObjectComparator
-+---------------------------------------------------------------------*/
-template <class T>
-class NPT_ObjectComparator {
-public:
-    NPT_ObjectComparator(T& object) : m_Object(object) {}
-    bool operator()(const T& object) const {
-        return object == m_Object;
-    }
-private:
-    T& m_Object;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_ContainerFind
-+---------------------------------------------------------------------*/
-template <typename T, typename P>
-NPT_Result NPT_ContainerFind(T&                   container, 
-                             const P&             predicate, 
-                             typename T::Element& item, 
-                             NPT_Ordinal          n=0) 
-{
-    typename T::Iterator found = container.Find(predicate, n);
-    if (found) {
-        item = *found;
-        return NPT_SUCCESS;
-    } else {
-        return NPT_ERROR_NO_SUCH_ITEM;
-    }
-}
-
-/*----------------------------------------------------------------------
-|   NPT_ContainerFind
-+---------------------------------------------------------------------*/
-template <typename T, typename P>
-NPT_Result NPT_ContainerFind(T&                    container, 
-                             const P&              predicate, 
-                             typename T::Iterator& iter, 
-                             NPT_Ordinal           n=0) 
-{
-    iter = container.Find(predicate, n);
-    return iter?NPT_SUCCESS:NPT_ERROR_NO_SUCH_ITEM;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_UntilResultEquals
-+---------------------------------------------------------------------*/
-class NPT_UntilResultEquals
-{
-public:
-    // methods
-    NPT_UntilResultEquals(NPT_Result condition_result, 
-                          NPT_Result return_value = NPT_SUCCESS) :
-      m_ConditionResult(condition_result),
-      m_ReturnValue(return_value) {}
-    bool operator()(NPT_Result result, NPT_Result& return_value) const {
-        if (result == m_ConditionResult) {
-            return_value = m_ReturnValue;
-            return true;
-        } else {
-            return false;
-        }
-    }
-
-private:
-    // members
-    NPT_Result m_ConditionResult;
-    NPT_Result m_ReturnValue;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_UntilResultNotEquals
-+---------------------------------------------------------------------*/
-class NPT_UntilResultNotEquals
-{
-public:
-    // methods
-    NPT_UntilResultNotEquals(NPT_Result condition_result) :
-      m_ConditionResult(condition_result) {}
-    bool operator()(NPT_Result result, NPT_Result& return_value) const {
-        if (result != m_ConditionResult) {
-            return_value = result;
-            return true;
-        } else {
-            return false;
-        }
-    }
-
-private:
-    // members
-    NPT_Result m_ConditionResult;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_PropertyValue
-+---------------------------------------------------------------------*/
-class NPT_PropertyValue
-{
- public:
-    // typedefs
-    typedef enum {UNKNOWN, INTEGER, STRING} Type;
-
-    // methods
-    NPT_PropertyValue() : m_Type(UNKNOWN), m_Integer(0) {}
-    NPT_PropertyValue(int value)         : m_Type(INTEGER), m_Integer(value) {}
-    NPT_PropertyValue(const char* value) : m_Type(STRING),  m_String(value)  {}
-
-    // members
-    Type m_Type;
-    union {
-        int         m_Integer;
-        const char* m_String;
-    };
-};
-
-#endif // _NPT_COMMON_H_
-
diff --git a/extra_lib/include/platinum/NptConfig.h b/extra_lib/include/platinum/NptConfig.h
deleted file mode 100644
index 7d5625f..0000000
--- a/extra_lib/include/platinum/NptConfig.h
+++ /dev/null
@@ -1,351 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Configuration
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_CONFIG_H_
-#define _NPT_CONFIG_H_
-
-/*----------------------------------------------------------------------
-|   defaults
-+---------------------------------------------------------------------*/
-#define NPT_CONFIG_HAVE_ASSERT_H
-#define NPT_CONFIG_HAVE_STD_C
-#define NPT_CONFIG_HAVE_POSIX_TIME
-#define NPT_CONFIG_HAVE_ASSERT_H
-#define NPT_CONFIG_HAVE_STDLIB_H
-#define NPT_CONFIG_HAVE_STDIO_H
-#define NPT_CONFIG_HAVE_STDARG_H
-#define NPT_CONFIG_HAVE_STDINT_H
-#define NPT_CONFIG_HAVE_STRING_H
-#define NPT_CONFIG_HAVE_LIMITS_H
-
-/*----------------------------------------------------------------------
-|   standard C runtime
-+---------------------------------------------------------------------*/
-#if defined(NPT_CONFIG_HAVE_STD_C)
-#define NPT_CONFIG_HAVE_MALLOC
-#define NPT_CONFIG_HAVE_CALLOC
-#define NPT_CONFIG_HAVE_REALLOC
-#define NPT_CONFIG_HAVE_FREE
-#define NPT_CONFIG_HAVE_MEMCPY
-#define NPT_CONFIG_HAVE_MEMSET
-#define NPT_CONFIG_HAVE_MEMCMP
-#define NPT_CONFIG_HAVE_GETENV
-#define NPT_CONFIG_HAVE_SETENV
-#define NPT_CONFIG_HAVE_UNSETENV
-#define NPT_CONFIG_HAVE_READDIR_R
-#endif /* NPT_CONFIG_HAS_STD_C */
-
-#if defined(NPT_CONFIG_HAVE_POSIX_TIME)
-#define NPT_CONFIG_HAVE_GMTIME
-#define NPT_CONFIG_HAVE_GMTIME_R
-#define NPT_CONFIG_HAVE_LOCALTIME
-#define NPT_CONFIG_HAVE_LOCALTIME_R
-#endif
-
-#if defined(NPT_CONFIG_HAVE_STRING_H)
-#define NPT_CONFIG_HAVE_STRCMP
-#define NPT_CONFIG_HAVE_STRNCMP
-#define NPT_CONFIG_HAVE_STRDUP
-#define NPT_CONFIG_HAVE_STRLEN
-#define NPT_CONFIG_HAVE_STRCPY
-#define NPT_CONFIG_HAVE_STRNCPY
-#endif /* NPT_CONFIG_HAVE_STRING_H */
-
-#if defined(NPT_CONFIG_HAVE_STDIO_H)
-#define NPT_CONFIG_HAVE_SPRINTF
-#define NPT_CONFIG_HAVE_SNPRINTF
-#define NPT_CONFIG_HAVE_VSPRINTF
-#define NPT_CONFIG_HAVE_VSNPRINTF
-#endif /* NPT_CONFIG_HAVE_STDIO_H */
-
-#if defined(NPT_CONFIG_HAVE_LIMITS_H)
-#define NPT_CONFIG_HAVE_INT_MIN
-#define NPT_CONFIG_HAVE_INT_MAX
-#define NPT_CONFIG_HAVE_UINT_MAX
-#define NPT_CONFIG_HAVE_LONG_MIN
-#define NPT_CONFIG_HAVE_LONG_MAX
-#define NPT_CONFIG_HAVE_ULONG_MAX
-#endif
-
-/*----------------------------------------------------------------------
-|   standard C++ runtime
-+---------------------------------------------------------------------*/
-#define NPT_CONFIG_HAVE_NEW_H
-
-/*----------------------------------------------------------------------
-|   sockets
-+---------------------------------------------------------------------*/
-#define NPT_CONFIG_HAVE_SOCKADDR_SA_LEN
-
-/*----------------------------------------------------------------------
-|   platform specifics
-+---------------------------------------------------------------------*/
-/* Windows 32 */
-#if defined(_WIN32) || defined(_XBOX)
-#if !defined(STRICT)
-#define STRICT
-#endif
-#endif
-
-/* XBox */
-#if defined(_XBOX)
-#define NPT_CONFIG_THREAD_STACK_SIZE 0x10000
-#endif
-
-/* QNX */
-#if defined(__QNX__)
-#endif
-
-/* cygwin */
-#if defined(__CYGWIN__)
-#undef NPT_CONFIG_HAVE_SOCKADDR_SA_LEN
-#endif
-
-/* linux */
-#if defined(__linux__)
-#define NPT_CONFIG_HAVE_GETADDRINFO
-#undef NPT_CONFIG_HAVE_SOCKADDR_SA_LEN
-#endif
-
-/* symbian */
-#if defined(__SYMBIAN32__)
-/* If defined, specify the stack size of each NPT_Thread. */
-#define NPT_CONFIG_THREAD_STACK_SIZE   0x14000
-#endif
-
-/* android */
-#if defined(ANDROID)
-#define NPT_CONFIG_HAVE_GETADDRINFO
-#undef NPT_CONFIG_HAVE_SOCKADDR_SA_LEN
-#endif
-
-/* OSX and iOS */
-#if defined(__APPLE__)
-#define NPT_CONFIG_HAVE_GETADDRINFO
-#define NPT_CONFIG_HAVE_AUTORELEASE_POOL
-#define NPT_CONFIG_HAVE_SYSTEM_LOG_CONFIG
-#endif
-
-/*----------------------------------------------------------------------
-|   compiler specifics
-+---------------------------------------------------------------------*/
-/* GCC */
-#if defined(__GNUC__)
-#define NPT_LocalFunctionName __FUNCTION__
-#define NPT_COMPILER_UNUSED(p) (void)p
-#else
-#define NPT_COMPILER_UNUSED(p) 
-#endif
-
-/* TriMedia C/C++ Compiler */
-#if defined(__TCS__)
-#undef NPT_CONFIG_HAVE_ASSERT_H
-#undef NPT_CONFIG_HAVE_SNPRINTF
-#undef NPT_CONFIG_HAVE_VSNPRINTF
-#endif
-
-/* palmos compiler */
-#if defined(__PALMOS__)
-#if __PALMOS__ <= 0x05000000
-#undef NPT_CONFIG_HAVE_ASSERT_H
-#undef NPT_CONFIG_HAVE_SNPRINTF
-#undef NPT_CONFIG_HAVE_VSNPRINTF
-#endif
-#endif
-
-/* Microsoft C/C++ Compiler */
-#if defined(_MSC_VER)
-#undef NPT_CONFIG_HAVE_STDINT_H
-#define NPT_CONFIG_HAVE_GETADDRINFO
-#define NPT_CONFIG_STAT_ST_CTIME_IS_ST_BIRTHTIME
-#define NPT_FORMAT_64 "I64"
-#define NPT_CONFIG_INT64_TYPE __int64
-#define NPT_INT64_MIN _I64_MIN
-#define NPT_INT64_MAX _I64_MAX
-#define NPT_UINT64_MAX _UI64_MAX
-#define NPT_INT64_C(_x) _x##i64
-#define NPT_UINT64_C(_x) _x##ui64
-#define NPT_LocalFunctionName __FUNCTION__
-#if !defined(_WIN32_WCE)
-#define NPT_fseek _fseeki64
-#define NPT_ftell _ftelli64
-#else
-#define NPT_fseek(a,b,c) fseek((a),(long)(b), (c))
-#define NPT_ftell ftell
-#endif
-#define NPT_stat  NPT_stat_utf8
-#define NPT_stat_struct struct __stat64
-#if defined(_WIN64)
-typedef __int64 NPT_PointerLong;
-#else
-#if _MSC_VER >= 1400
-typedef __w64 long NPT_PointerLong;
-#else
-typedef long NPT_PointerLong;
-#endif
-#endif
-#define NPT_POINTER_TO_LONG(_p) ((NPT_PointerLong) (_p) )
-#if _MSC_VER >= 1400 && !defined(_WIN32_WCE)
-#define gmtime_r(a,b) gmtime_s(a,b)
-#define localtime_r(a,b) localtime_s(b,a)
-#define NPT_CONFIG_HAVE_FOPEN_S
-#define NPT_CONFIG_HAVE_FSOPEN
-#define NPT_CONFIG_HAVE_SHARE_H
-#define NPT_vsnprintf(s,c,f,a)  _vsnprintf_s(s,c,_TRUNCATE,f,a)
-#define NPT_snprintf(s,c,f,...) _snprintf_s(s,c,_TRUNCATE,f,__VA_ARGS__)
-#define NPT_strncpy(d,s,c)       strncpy_s(d,c+1,s,c)
-#define NPT_strcpy(d,s)          strcpy_s(d,strlen(s)+1,s)
-#undef NPT_CONFIG_HAVE_GETENV
-#define NPT_CONFIG_HAVE_DUPENV_S
-#define dupenv_s _dupenv_s
-#undef NPT_CONFIG_HAVE_SETENV
-#undef NPT_CONFIG_HAVE_UNSETENV
-#define NPT_CONFIG_HAVE_PUTENV_S
-#define putenv_s _putenv_s
-#else
-#undef NPT_CONFIG_HAVE_GMTIME_R
-#undef NPT_CONFIG_HAVE_LOCALTIME_R
-#define NPT_vsnprintf  _vsnprintf
-#define NPT_snprintf   _snprintf
-#endif
-#if defined(_DEBUG)
-#define _CRTDBG_MAP_ALLOC
-#endif
-#endif
-
-/* Windows CE */
-#if defined(_WIN32_WCE)
-#if defined(NPT_CONFIG_HAVE_FOPEN_S)
-#undef NPT_CONFIG_HAVE_FOPEN_S
-#endif
-#endif
-
-/* Symbian */
-#if defined(__SYMBIAN32__)
-#undef NPT_CONFIG_HAVE_NEW_H
-#include "e32std.h"
-#define explicit
-#define NPT_fseek fseek  // no fseeko ?
-#define NPT_ftell ftell  // no ftello ?
-#endif
-
-/* Android */
-#if defined(ANDROID)
-#if !defined(NPT_CONFIG_NO_RTTI)
-#define NPT_CONFIG_NO_RTTI
-#endif
-#endif
-
-/* OSX and iOS */
-#if defined(__APPLE__)
-#include <TargetConditionals.h>
-#include <AvailabilityMacros.h>
-#define NPT_CONFIG_HAVE_NET_IF_DL_H
-#define NPT_CONFIG_HAVE_SOCKADDR_DL
-#if !defined(TARGET_OS_IPHONE) || !TARGET_OS_IPHONE
-#define NPT_CONFIG_HAVE_NET_IF_TYPES_H
-#if defined(MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6)
-#define NPT_CONFIG_HAVE_STAT_ST_BIRTHTIME
-#endif
-#endif
-#endif
-
-/*----------------------------------------------------------------------
-|   defaults
-+---------------------------------------------------------------------*/
-#if !defined(NPT_FORMAT_64)
-#define NPT_FORMAT_64 "ll"
-#endif
-
-#if !defined(NPT_POINTER_TO_LONG)
-#define NPT_POINTER_TO_LONG(_p) ((long)(_p))
-#endif
-
-#if !defined(NPT_CONFIG_INT64_TYPE)
-#define NPT_CONFIG_INT64_TYPE long long
-#endif
-
-#if !defined(NPT_INT64_C)
-#define NPT_INT64_C(_x) _x##LL
-#endif
-
-#if !defined(NPT_UINT64_C)
-#define NPT_UINT64_C(_x) _x##ULL
-#endif
-
-#if !defined(NPT_snprintf)
-#define NPT_snprintf snprintf
-#endif
-
-#if !defined(NPT_strcpy)
-#define NPT_strcpy strcpy
-#endif
-
-#if !defined(NPT_strncpy)
-#define NPT_strncpy strncpy
-#endif
-
-#if !defined(NPT_vsnprintf)
-#define NPT_vsnprintf vsnprintf
-#endif
-
-#if !defined(NPT_LocalFunctionName)
-#define NPT_LocalFunctionName (NULL)
-#endif
-
-#if !defined(NPT_CONFIG_THREAD_STACK_SIZE)
-#define NPT_CONFIG_THREAD_STACK_SIZE 0
-#endif
-
-#if !defined(NPT_fseek)
-#define NPT_fseek fseeko
-#endif
-
-#if !defined(NPT_ftell)
-#define NPT_ftell ftello
-#endif
-
-#if !defined(NPT_stat)
-#define NPT_stat stat
-#endif
-
-#if !defined(NPT_stat_struct)
-#define NPT_stat_struct struct stat
-#endif
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#if defined(DMALLOC)
-#include <dmalloc.h>
-#endif
-
-#endif // _NPT_CONFIG_H_ 
diff --git a/extra_lib/include/platinum/NptConsole.h b/extra_lib/include/platinum/NptConsole.h
deleted file mode 100644
index 6502a79..0000000
--- a/extra_lib/include/platinum/NptConsole.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Console
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
-****************************************************************/
-/** @file
-* Header file for console support
-*/
-
-#ifndef _NPT_CONSOLE_H_
-#define _NPT_CONSOLE_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptTypes.h"
-#include "NptResults.h"
-
-/*----------------------------------------------------------------------
-|   prototypes
-+---------------------------------------------------------------------*/
-class NPT_Console {
-public:
-    // class methods
-    static void Output(const char* message);
-    static void OutputF(const char* format, ...);
-};
-
-
-#endif /* _NPT_CONSOLE_H_ */
diff --git a/extra_lib/include/platinum/NptConstants.h b/extra_lib/include/platinum/NptConstants.h
deleted file mode 100644
index 6618bf8..0000000
--- a/extra_lib/include/platinum/NptConstants.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Constants
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_CONSTANTS_H_
-#define _NPT_CONSTANTS_H_
-
-/*----------------------------------------------------------------------
-|   constants       
-+---------------------------------------------------------------------*/
-#ifndef NULL
-#define NULL 0
-#endif
-
-const int NPT_TIMEOUT_INFINITE = -1;
-
-#endif // _NPT_CONSTANTS_H_
diff --git a/extra_lib/include/platinum/NptCrypto.h b/extra_lib/include/platinum/NptCrypto.h
deleted file mode 100644
index 04eb58f..0000000
--- a/extra_lib/include/platinum/NptCrypto.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Crypto
-|
-| Copyright (c) 2002-2010, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_CRYPTO_H_
-#define _NPT_CRYPTO_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptTypes.h"
-#include "NptDataBuffer.h"
-
-/*----------------------------------------------------------------------
-|   NPT_BlockCipher
-+---------------------------------------------------------------------*/
-class NPT_BlockCipher {
-public:
-    // types
-    typedef enum {
-        AES_128
-    } Algorithm;
-    
-    typedef enum {
-        ENCRYPT,
-        DECRYPT
-    } Direction;
-    
-    // factory
-    static NPT_Result Create(Algorithm         algorithm, 
-                             Direction         direction,
-                             const NPT_UInt8*  key,
-                             NPT_Size          key_size,
-                             NPT_BlockCipher*& cipher);
-    
-    // methods
-    virtual           ~NPT_BlockCipher() {}
-    virtual NPT_Size   GetBlockSize() = 0;
-    virtual Direction  GetDirection() = 0;
-    virtual Algorithm  GetAlgorithm() = 0;
-    virtual NPT_Result ProcessBlock(const NPT_UInt8* input, NPT_UInt8* output) = 0;
-    /**
-     * @param iv Initial vector (same size as cipher block size), or NULL for an IV made up of all zeros.
-     */
-    virtual NPT_Result ProcessCbc(const NPT_UInt8* input, NPT_Size input_size, const NPT_UInt8* iv, NPT_DataBuffer& output);
-    
-protected:
-    NPT_BlockCipher() {} // don't instantiate directly
-};
-
-#endif // _NPT_CRYPTO_H_
diff --git a/extra_lib/include/platinum/NptDataBuffer.h b/extra_lib/include/platinum/NptDataBuffer.h
deleted file mode 100644
index 7e57c01..0000000
--- a/extra_lib/include/platinum/NptDataBuffer.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Datagram Packets
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_DATA_BUFFER_H_
-#define _NPT_DATA_BUFFER_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptTypes.h"
-#include "NptConstants.h"
-
-/*----------------------------------------------------------------------
-|   NPT_DataBuffer
-+---------------------------------------------------------------------*/
-class NPT_DataBuffer 
-{
- public:
-    // constructors & destructor
-    NPT_DataBuffer();              // size unknown until first set 
-    NPT_DataBuffer(NPT_Size size); // initial size specified
-    NPT_DataBuffer(const void* data, NPT_Size size, bool copy = true); // initial data and size specified
-    NPT_DataBuffer(const NPT_DataBuffer& other);
-    virtual ~NPT_DataBuffer();
-
-    // operators
-    NPT_DataBuffer& operator=(const NPT_DataBuffer& copy);
-    bool            operator==(const NPT_DataBuffer& other) const;
-
-    // data buffer handling methods
-    virtual NPT_Result SetBuffer(NPT_Byte* buffer, NPT_Size bufferSize);
-    virtual NPT_Result SetBufferSize(NPT_Size bufferSize);
-    virtual NPT_Size   GetBufferSize() const { return m_BufferSize; }
-    virtual NPT_Result Reserve(NPT_Size size);
-    virtual NPT_Result Clear();
-
-    // data handling methods
-    virtual const NPT_Byte* GetData() const { return m_Buffer; }
-    virtual NPT_Byte*       UseData() { return m_Buffer; };
-    virtual NPT_Size        GetDataSize() const { return m_DataSize; }
-    virtual NPT_Result      SetDataSize(NPT_Size size);
-    virtual NPT_Result      SetData(const NPT_Byte* data, NPT_Size dataSize);
-
- protected:
-    // members
-    bool      m_BufferIsLocal;
-    NPT_Byte* m_Buffer;
-    NPT_Size  m_BufferSize;
-    NPT_Size  m_DataSize;
-
-    // methods
-    NPT_Result ReallocateBuffer(NPT_Size size);
-};
-
-#endif // _NPT_DATA_BUFFER_H_
diff --git a/extra_lib/include/platinum/NptDebug.h b/extra_lib/include/platinum/NptDebug.h
deleted file mode 100644
index d4973a2..0000000
--- a/extra_lib/include/platinum/NptDebug.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Debug Utilities
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_DEBUG_H_
-#define _NPT_DEBUG_H_
-
-/*----------------------------------------------------------------------
-|    includes
-+---------------------------------------------------------------------*/
-#include "NptConfig.h"
-
-/*----------------------------------------------------------------------
-|    standard macros
-+---------------------------------------------------------------------*/
-#if defined(NPT_CONFIG_HAVE_ASSERT_H) && defined(NPT_DEBUG)
-#include <assert.h>
-#define NPT_ASSERT(x) assert(x)
-#else
-#define NPT_ASSERT(x) ((void)0)
-#endif
-
-/*----------------------------------------------------------------------
-|   NPT_Debug
-+---------------------------------------------------------------------*/
-extern void NPT_Debug(const char* format, ...);
-extern void NPT_DebugOutput(const char* message);
-
-#endif // _NPT_DEBUG_H_
diff --git a/extra_lib/include/platinum/NptDefs.h b/extra_lib/include/platinum/NptDefs.h
deleted file mode 100644
index e69de29..0000000
diff --git a/extra_lib/include/platinum/NptDigest.h b/extra_lib/include/platinum/NptDigest.h
deleted file mode 100644
index 85b744c..0000000
--- a/extra_lib/include/platinum/NptDigest.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Message Digests
-|
-| Copyright (c) 2002-2010, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_DIGEST_H_
-#define _NPT_DIGEST_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptTypes.h"
-#include "NptDataBuffer.h"
-
-/*----------------------------------------------------------------------
-|   NPT_Digest
-+---------------------------------------------------------------------*/
-class NPT_Digest {
-public:
-    // types
-    typedef enum {
-        ALGORITHM_SHA1,
-        ALGORITHM_SHA256,
-        ALGORITHM_MD5
-    } Algorithm;
-    
-    // factory
-    static NPT_Result Create(Algorithm algorithm, NPT_Digest*& digest);
-    
-    // methods
-    virtual             ~NPT_Digest() {}
-    virtual unsigned int GetSize() = 0;
-    virtual NPT_Result   Update(const NPT_UInt8* data, NPT_Size data_size) = 0;
-    virtual NPT_Result   GetDigest(NPT_DataBuffer& digest) = 0;
-
-protected:
-    NPT_Digest() {} // don't instantiate directly
-};
-
-class NPT_Hmac {
-public:
-    static NPT_Result Create(NPT_Digest::Algorithm algorithm,
-                             const NPT_UInt8*      key,
-                             NPT_Size              key_size, 
-                             NPT_Digest*&          digest);
-
-private:
-    // methods
-    NPT_Hmac() {} // don't instantiate
-};
-
-#endif // _NPT_DIGEST_H_
diff --git a/extra_lib/include/platinum/NptDynamicCast.h b/extra_lib/include/platinum/NptDynamicCast.h
deleted file mode 100644
index 0acab88..0000000
--- a/extra_lib/include/platinum/NptDynamicCast.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Dynamic Cast Support
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_DYNAMIC_CAST_H_
-#define _NPT_DYNAMIC_CAST_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptTypes.h"
-#include "NptCommon.h"
-#include "NptResults.h"
-#include "NptConfig.h"
-
-/*----------------------------------------------------------------------
-|   macros
-+---------------------------------------------------------------------*/
-#if defined(NPT_CONFIG_NO_RTTI)
-#define NPT_DYNAMIC_CAST(_class,_object) \
-( ((_object)==0) ? 0 : reinterpret_cast<_class*>((_object)->DynamicCast(&_class::_class_##_class)) )
-#define NPT_IMPLEMENT_DYNAMIC_CAST(_class)              \
-static int _class_##_class;                             \
-virtual void* DynamicCast(const void* class_anchor) {   \
-    if (class_anchor ==  &_class::_class_##_class) {    \
-        return static_cast<_class*>(this);              \
-    }                                                   \
-    return NULL;                                        \
-}
-#define NPT_IMPLEMENT_DYNAMIC_CAST_D(_class,_superclass)\
-static int _class_##_class;                             \
-virtual void* DynamicCast(const void* class_anchor) {   \
-    if (class_anchor ==  &_class::_class_##_class) {    \
-        return static_cast<_class*>(this);              \
-    } else {                                            \
-        return _superclass::DynamicCast(class_anchor);  \
-    }                                                   \
-}
-#define NPT_IMPLEMENT_DYNAMIC_CAST_D2(_class,_superclass,_mixin)\
-static int _class_##_class;                                     \
-virtual void* DynamicCast(const void* class_anchor) {           \
-    if (class_anchor ==  &_class::_class_##_class) {            \
-        return static_cast<_class*>(this);                      \
-    } else {                                                    \
-        void* sup = _superclass::DynamicCast(class_anchor);     \
-        if (sup) return sup;                                    \
-        return _mixin::DynamicCast(class_anchor);               \
-    }                                                           \
-}
-#define NPT_DEFINE_DYNAMIC_CAST_ANCHOR(_class) int _class::_class_##_class = 0;
-
-#else
-
-#define NPT_DYNAMIC_CAST(_class,_object) dynamic_cast<_class*>(_object)
-#define NPT_IMPLEMENT_DYNAMIC_CAST(_class)
-#define NPT_IMPLEMENT_DYNAMIC_CAST_D(_class,_superclass)
-#define NPT_IMPLEMENT_DYNAMIC_CAST_D2(_class,_superclass,_mixin)
-#define NPT_DEFINE_DYNAMIC_CAST_ANCHOR(_class)
-
-#endif
-
-#endif // _NPT_DYNAMIC_CAST_H_
diff --git a/extra_lib/include/platinum/NptDynamicLibraries.h b/extra_lib/include/platinum/NptDynamicLibraries.h
deleted file mode 100644
index 4a2751e..0000000
--- a/extra_lib/include/platinum/NptDynamicLibraries.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Dynamic Libraries
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_DYNAMIC_LIBRARIES_H_
-#define _NPT_DYNAMIC_LIBRARIES_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptTypes.h"
-
-/*----------------------------------------------------------------------
-|   constants
-+---------------------------------------------------------------------*/
-#define NPT_DYANMIC_LIBRARY_LOAD_FLAG_NOW 1
-
-/*----------------------------------------------------------------------
-|   NPT_DynamicLibraryInterface
-+---------------------------------------------------------------------*/
-class NPT_DynamicLibraryInterface
-{
-public:
-    virtual ~NPT_DynamicLibraryInterface() {}
-    virtual NPT_Result FindSymbol(const char* name, void*& symbol) = 0;
-    virtual NPT_Result Unload() = 0;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_DynamicLibrary
-+---------------------------------------------------------------------*/
-class NPT_DynamicLibrary : public NPT_DynamicLibraryInterface
-{
-public:
-    // class methods
-    static NPT_Result Load(const char* name, NPT_Flags flags, NPT_DynamicLibrary*& library);
-    
-    // destructor
-    ~NPT_DynamicLibrary() { delete m_Delegate; }
-    
-    // NPT_DynamicLibraryInterface methods
-    virtual NPT_Result FindSymbol(const char* name, void*& symbol) {
-        return m_Delegate->FindSymbol(name, symbol);
-    }
-    virtual NPT_Result Unload() {
-        return m_Delegate->Unload();
-    }
-    
-private:
-    // methods
-    NPT_DynamicLibrary(NPT_DynamicLibraryInterface* delegate) : m_Delegate(delegate) {}
-    
-    // members
-    NPT_DynamicLibraryInterface* m_Delegate;
-};
-
-#endif // _NPT_DYNAMIC_LIBRARIES_H_
diff --git a/extra_lib/include/platinum/NptFile.h b/extra_lib/include/platinum/NptFile.h
deleted file mode 100644
index e93bb2b..0000000
--- a/extra_lib/include/platinum/NptFile.h
+++ /dev/null
@@ -1,229 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Files
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_FILE_H_
-#define _NPT_FILE_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptTypes.h"
-#include "NptStreams.h"
-#include "NptTime.h"
-
-/*----------------------------------------------------------------------
-|   constants
-+---------------------------------------------------------------------*/
-const int NPT_ERROR_NO_SUCH_FILE          = NPT_ERROR_BASE_FILE - 0;
-const int NPT_ERROR_FILE_NOT_OPEN         = NPT_ERROR_BASE_FILE - 1;
-const int NPT_ERROR_FILE_BUSY             = NPT_ERROR_BASE_FILE - 2;
-const int NPT_ERROR_FILE_ALREADY_OPEN     = NPT_ERROR_BASE_FILE - 3;
-const int NPT_ERROR_FILE_NOT_READABLE     = NPT_ERROR_BASE_FILE - 4;
-const int NPT_ERROR_FILE_NOT_WRITABLE     = NPT_ERROR_BASE_FILE - 5;
-const int NPT_ERROR_FILE_NOT_DIRECTORY    = NPT_ERROR_BASE_FILE - 6;
-const int NPT_ERROR_FILE_ALREADY_EXISTS   = NPT_ERROR_BASE_FILE - 7;
-const int NPT_ERROR_FILE_NOT_ENOUGH_SPACE = NPT_ERROR_BASE_FILE - 8;
-const int NPT_ERROR_DIRECTORY_NOT_EMPTY   = NPT_ERROR_BASE_FILE - 9;
-
-/**
- * File open modes.
- * Use a combination of these flags to indicate how a file should be opened 
- * Note all combinations of flags are valid or meaningful:
- * If NPT_FILE_OPEN_MODE_WRITE is not set, then NPT_FILE_OPEN_MODE_CREATE, 
- * NPT_FILE_OPEN_MODE_TRUNCATE and NPT_FILE_OPEN_MODE_APPEND are ignored.
- * If NPT_FILE_OPEN_MODE_APPEND is set, then NPT_FILE_OPEN_MODE_CREATE is
- * automatically implied whether it is set or not.
- * NPT_FILE_OPEN_MODE_CREATE and NPT_FILE_OPEN_MODE_TRUNCATE imply each
- * other (if one is set, the other one is automatically implied)
- */
-const unsigned int NPT_FILE_OPEN_MODE_READ       = 0x01;
-const unsigned int NPT_FILE_OPEN_MODE_WRITE      = 0x02;
-const unsigned int NPT_FILE_OPEN_MODE_CREATE     = 0x04;
-const unsigned int NPT_FILE_OPEN_MODE_TRUNCATE   = 0x08;
-const unsigned int NPT_FILE_OPEN_MODE_UNBUFFERED = 0x10;
-const unsigned int NPT_FILE_OPEN_MODE_APPEND     = 0x20;
-
-const unsigned int NPT_FILE_ATTRIBUTE_READ_ONLY = 0x01;
-const unsigned int NPT_FILE_ATTRIBUTE_LINK      = 0x02;
-
-#define NPT_FILE_STANDARD_INPUT  "@STDIN"
-#define NPT_FILE_STANDARD_OUTPUT "@STDOUT"
-#define NPT_FILE_STANDARD_ERROR  "@STDERR"
-
-/*----------------------------------------------------------------------
-|   class references
-+---------------------------------------------------------------------*/
-class NPT_DataBuffer;
-
-/*----------------------------------------------------------------------
-|   NPT_FileInfo
-+---------------------------------------------------------------------*/
-struct NPT_FileInfo
-{
-    // types
-    typedef enum {
-        FILE_TYPE_NONE,
-        FILE_TYPE_REGULAR,
-        FILE_TYPE_DIRECTORY,
-        FILE_TYPE_SPECIAL,
-        FILE_TYPE_OTHER
-    } FileType;
-    
-    // constructor
-    NPT_FileInfo() : m_Type(FILE_TYPE_NONE), m_Size(0), m_AttributesMask(0), m_Attributes(0) {}
-    
-    // members
-    FileType      m_Type;
-    NPT_UInt64    m_Size;
-    NPT_Flags     m_AttributesMask;
-    NPT_Flags     m_Attributes;
-    NPT_TimeStamp m_CreationTime;
-    NPT_TimeStamp m_ModificationTime;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_FilePath
-+---------------------------------------------------------------------*/
-class NPT_FilePath
-{
-public:
-    // class members
-    static const char* const Separator;
-
-    // class methods
-    static NPT_String BaseName(const char* path, bool with_extension = true);
-    static NPT_String DirName(const char* path);
-    static NPT_String FileExtension(const char* path);
-    static NPT_String Create(const char* directory, const char* base);
-    
-private:
-    NPT_FilePath() {} // this class can't have instances
-};
-
-/*----------------------------------------------------------------------
-|   NPT_FileInterface
-+---------------------------------------------------------------------*/
-class NPT_FileInterface
-{
-public:
-    // types
-    typedef unsigned int OpenMode;
-
-    // constructors and destructor
-    virtual ~NPT_FileInterface() {}
-
-    // methods
-    virtual NPT_Result Open(OpenMode mode) = 0;
-    virtual NPT_Result Close() = 0;
-    virtual NPT_Result GetInputStream(NPT_InputStreamReference& stream) = 0;
-    virtual NPT_Result GetOutputStream(NPT_OutputStreamReference& stream) = 0;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_File
-+---------------------------------------------------------------------*/
-class NPT_File : public NPT_FileInterface
-{
-public:
-    // class methods
-    static NPT_Result GetRoots(NPT_List<NPT_String>& roots);
-    static NPT_Result GetSize(const char* path, NPT_LargeSize &size);
-    static NPT_Result GetInfo(const char* path, NPT_FileInfo* info = NULL);
-    static bool       Exists(const char* path) { return NPT_SUCCEEDED(GetInfo(path)); }
-    static NPT_Result Remove(const char* path, bool recurse = false);
-    static NPT_Result RemoveFile(const char* path);
-    static NPT_Result RemoveDir(const char* path);
-    static NPT_Result RemoveDir(const char* path, bool force_if_not_empty);
-    static NPT_Result Rename(const char* from_path, const char* to_path);
-    static NPT_Result ListDir(const char* path, NPT_List<NPT_String>& entries, NPT_Ordinal start = 0, NPT_Cardinal count = 0);
-    static NPT_Result CreateDir(const char* path);
-    static NPT_Result CreateDir(const char* path, bool create_intermediate_dirs);
-    static NPT_Result GetWorkingDir(NPT_String& path);
-    static NPT_Result Load(const char* path, NPT_DataBuffer& buffer, NPT_FileInterface::OpenMode mode = NPT_FILE_OPEN_MODE_READ);
-    static NPT_Result Load(const char* path, NPT_String& data, NPT_FileInterface::OpenMode mode = NPT_FILE_OPEN_MODE_READ);
-    static NPT_Result Save(const char* path, NPT_String& data);
-    static NPT_Result Save(const char* path, const NPT_DataBuffer& buffer);
-    
-    // constructors and destructor
-    NPT_File(const char* path);
-   ~NPT_File() { delete m_Delegate; }
-
-    // methods
-    NPT_Result          Load(NPT_DataBuffer& buffer);
-    NPT_Result          Save(const NPT_DataBuffer& buffer);
-    const NPT_String&   GetPath() { return m_Path; }
-    NPT_Result          GetSize(NPT_LargeSize &size);
-    NPT_Result          GetInfo(NPT_FileInfo& info);
-    NPT_Result          ListDir(NPT_List<NPT_String>& entries);
-    NPT_Result          Rename(const char* path);
-    
-    // NPT_FileInterface methods
-    NPT_Result Open(OpenMode mode) {
-        return m_Delegate->Open(mode);
-    }
-    NPT_Result Close() {
-        return m_Delegate->Close();
-    }
-    NPT_Result GetInputStream(NPT_InputStreamReference& stream) {
-        return m_Delegate->GetInputStream(stream);
-    }
-    NPT_Result GetOutputStream(NPT_OutputStreamReference& stream) {
-        return m_Delegate->GetOutputStream(stream);
-    }
-
-    // operators
-    NPT_File& operator=(const NPT_File& file);
-
-protected:
-    // members
-    NPT_FileInterface* m_Delegate;
-    NPT_String         m_Path;
-    bool               m_IsSpecial;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_FileDateComparator
-+---------------------------------------------------------------------*/
-class NPT_FileDateComparator {
-public: 
-    NPT_FileDateComparator(const char* directory) : m_Directory(directory) {}
-    NPT_Int32 operator()(const NPT_String& file1, const NPT_String& file2) const {
-        NPT_FileInfo info1, info2;
-        if (NPT_FAILED(NPT_File::GetInfo(NPT_FilePath::Create(m_Directory, file1), &info1))) return -1;
-        if (NPT_FAILED(NPT_File::GetInfo(NPT_FilePath::Create(m_Directory, file2), &info2))) return -1;
-        return (info1.m_ModificationTime == info2.m_ModificationTime) ? 0 : (info1.m_ModificationTime < info2.m_ModificationTime ? -1 : 1);
-    }
-    
-private:
-    NPT_String m_Directory;
-};
-
-#endif // _NPT_FILE_H_ 
diff --git a/extra_lib/include/platinum/NptHash.h b/extra_lib/include/platinum/NptHash.h
deleted file mode 100644
index d7b8776..0000000
--- a/extra_lib/include/platinum/NptHash.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Hashing
-|
-| Copyright (c) 2002-2010, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
-****************************************************************/
-
-#ifndef _NPT_HASH_H_
-#define _NPT_HASH_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptTypes.h"
-#include "NptResults.h"
-
-/*----------------------------------------------------------------------
-|    Fowler/Noll/Vo FNV-1a hash functions
-+---------------------------------------------------------------------*/
-const NPT_UInt32 NPT_FNV1A_32_INIT = ((NPT_UInt32)0x811c9dc5);
-NPT_UInt32 NPT_Fnv1aHash32(const NPT_UInt8* data, NPT_Size data_size, NPT_UInt32 hash_init=NPT_FNV1A_32_INIT);
-NPT_UInt32 NPT_Fnv1aHashStr32(const char* data, NPT_UInt32 hash_init=NPT_FNV1A_32_INIT);
-const NPT_UInt64 NPT_FNV1A_64_INIT = ((NPT_UInt64)0xcbf29ce484222325ULL);
-NPT_UInt64 NPT_Fnv1aHash64(const NPT_UInt8* data, NPT_Size data_size, NPT_UInt64 hash_init=NPT_FNV1A_64_INIT);
-NPT_UInt64 NPT_Fnv1aHashStr64(const char* data, NPT_UInt64 hash_init=NPT_FNV1A_64_INIT);
-
-/*----------------------------------------------------------------------
-|   NPT_Hash
-+---------------------------------------------------------------------*/
-template <typename K>
-struct NPT_Hash
-{
-};
-
-template <>
-struct NPT_Hash<const char*>
-{
-    NPT_UInt32 operator()(const char* s) const { return NPT_Fnv1aHashStr32(s); }
-};
-
-template <>
-struct NPT_Hash<char*>
-{
-    NPT_UInt32 operator()(char* s) const { return NPT_Fnv1aHashStr32(s); }
-};
-
-template <>
-struct NPT_Hash<int>
-{
-    NPT_UInt32 operator()(int i) const { return NPT_Fnv1aHash32(reinterpret_cast<const NPT_UInt8*>(&i), sizeof(int)); }
-};
-
-template <>
-struct NPT_Hash<unsigned int>
-{
-    NPT_UInt32 operator()(unsigned int i) const { return NPT_Fnv1aHash32(reinterpret_cast<const NPT_UInt8*>(&i), sizeof(int)); }
-};
-
-#endif // _NPT_HASH_H_
diff --git a/extra_lib/include/platinum/NptHttp.h b/extra_lib/include/platinum/NptHttp.h
deleted file mode 100644
index 402d515..0000000
--- a/extra_lib/include/platinum/NptHttp.h
+++ /dev/null
@@ -1,861 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - HTTP Protocol
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_HTTP_H_
-#define _NPT_HTTP_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptUri.h"
-#include "NptTypes.h"
-#include "NptList.h"
-#include "NptBufferedStreams.h"
-#include "NptSockets.h"
-#include "NptMap.h"
-#include "NptDynamicCast.h"
-#include "NptVersion.h"
-#include "NptTime.h"
-#include "NptThreads.h"
-#include "NptAutomaticCleaner.h"
-
-/*----------------------------------------------------------------------
-|   constants
-+---------------------------------------------------------------------*/
-const unsigned int NPT_HTTP_DEFAULT_PORT  = 80;
-const unsigned int NPT_HTTPS_DEFAULT_PORT = 443;
-const unsigned int NPT_HTTP_INVALID_PORT  = 0;
-
-const NPT_Timeout  NPT_HTTP_CLIENT_DEFAULT_CONNECTION_TIMEOUT    = 30000;
-const NPT_Timeout  NPT_HTTP_CLIENT_DEFAULT_IO_TIMEOUT            = 30000;
-const NPT_Timeout  NPT_HTTP_CLIENT_DEFAULT_NAME_RESOLVER_TIMEOUT = 60000;
-const unsigned int NPT_HTTP_CLIENT_DEFAULT_MAX_REDIRECTS         = 20;
-
-const NPT_Timeout NPT_HTTP_SERVER_DEFAULT_CONNECTION_TIMEOUT    = NPT_TIMEOUT_INFINITE;
-const NPT_Timeout NPT_HTTP_SERVER_DEFAULT_IO_TIMEOUT            = 60000;
-
-const unsigned int NPT_HTTP_CONNECTION_MANAGER_MAX_CONNECTION_POOL_SIZE = 5;
-const unsigned int NPT_HTTP_CONNECTION_MANAGER_MAX_CONNECTION_AGE       = 50; // seconds
-const unsigned int NPT_HTTP_MAX_RECONNECTS                              = 10;
-const unsigned int NPT_HTTP_MAX_100_RESPONSES                           = 10;
-
-const int NPT_HTTP_PROTOCOL_MAX_LINE_LENGTH  = 8192;
-const int NPT_HTTP_PROTOCOL_MAX_HEADER_COUNT = 100;
-
-#define NPT_HTTP_PROTOCOL_1_0   "HTTP/1.0"
-#define NPT_HTTP_PROTOCOL_1_1   "HTTP/1.1"
-#define NPT_HTTP_METHOD_GET     "GET"
-#define NPT_HTTP_METHOD_HEAD    "HEAD"
-#define NPT_HTTP_METHOD_POST    "POST"
-#define NPT_HTTP_METHOD_PUT     "PUT"
-#define NPT_HTTP_METHOD_OPTIONS "OPTIONS"
-#define NPT_HTTP_METHOD_DELETE  "DELETE"
-#define NPT_HTTP_METHOD_TRACE   "TRACE"
-
-#define NPT_HTTP_HEADER_HOST                "Host"
-#define NPT_HTTP_HEADER_CONNECTION          "Connection"
-#define NPT_HTTP_HEADER_USER_AGENT          "User-Agent"
-#define NPT_HTTP_HEADER_SERVER              "Server"
-#define NPT_HTTP_HEADER_CONTENT_LENGTH      "Content-Length"
-#define NPT_HTTP_HEADER_CONTENT_TYPE        "Content-Type"
-#define NPT_HTTP_HEADER_CONTENT_ENCODING    "Content-Encoding"
-#define NPT_HTTP_HEADER_TRANSFER_ENCODING   "Transfer-Encoding"
-#define NPT_HTTP_HEADER_LOCATION            "Location"
-#define NPT_HTTP_HEADER_RANGE               "Range"
-#define NPT_HTTP_HEADER_CONTENT_RANGE       "Content-Range"
-#define NPT_HTTP_HEADER_COOKIE              "Cookie"
-#define NPT_HTTP_HEADER_ACCEPT_RANGES       "Accept-Ranges"
-#define NPT_HTTP_HEADER_CONTENT_RANGE       "Content-Range"
-#define NPT_HTTP_HEADER_AUTHORIZATION       "Authorization"
-
-#define NPT_HTTP_TRANSFER_ENCODING_CHUNKED  "chunked"
-
-
-const int NPT_ERROR_HTTP_INVALID_RESPONSE_LINE = NPT_ERROR_BASE_HTTP - 0;
-const int NPT_ERROR_HTTP_INVALID_REQUEST_LINE  = NPT_ERROR_BASE_HTTP - 1;
-const int NPT_ERROR_HTTP_NO_PROXY              = NPT_ERROR_BASE_HTTP - 2;
-const int NPT_ERROR_HTTP_INVALID_REQUEST       = NPT_ERROR_BASE_HTTP - 3;
-const int NPT_ERROR_HTTP_METHOD_NOT_SUPPORTED  = NPT_ERROR_BASE_HTTP - 4;
-const int NPT_ERROR_HTTP_TOO_MANY_REDIRECTS    = NPT_ERROR_BASE_HTTP - 5;
-const int NPT_ERROR_HTTP_TOO_MANY_RECONNECTS   = NPT_ERROR_BASE_HTTP - 6;
-const int NPT_ERROR_HTTP_CANNOT_RESEND_BODY    = NPT_ERROR_BASE_HTTP - 7;
-
-#define NPT_HTTP_LINE_TERMINATOR "\r\n"
-
-#if !defined(NPT_CONFIG_HTTP_DEFAULT_USER_AGENT)
-#define NPT_CONFIG_HTTP_DEFAULT_USER_AGENT "Neptune/" NPT_NEPTUNE_VERSION_STRING
-#endif
-
-/*----------------------------------------------------------------------
-|   types
-+---------------------------------------------------------------------*/
-typedef unsigned int NPT_HttpStatusCode;
-typedef NPT_UrlQuery NPT_HttpUrlQuery; // for backward compatibility
-
-/*----------------------------------------------------------------------
-|   NPT_HttpUrl
-+---------------------------------------------------------------------*/
-class NPT_HttpUrl : public NPT_Url {
-public:
-    // constructors
-    NPT_HttpUrl() {}
-    NPT_HttpUrl(const char* host, 
-                NPT_UInt16  port, 
-                const char* path,
-                const char* query = NULL,
-                const char* fragment = NULL);
-    NPT_HttpUrl(const char* url, bool ignore_scheme = false);
-
-    // methods
-    virtual NPT_String ToString(bool with_fragment = true) const;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_HttpProtocol
-+---------------------------------------------------------------------*/
-class NPT_HttpProtocol
-{
-public:
-    // class methods
-    const char* GetStatusCodeString(NPT_HttpStatusCode status_code);
-};
-
-/*----------------------------------------------------------------------
-|   NPT_HttpHeader
-+---------------------------------------------------------------------*/
-class NPT_HttpHeader {
-public:
-    // constructors and destructor
-    NPT_HttpHeader(const char* name, const char* value);
-    ~NPT_HttpHeader();
-
-    // methods
-    NPT_Result        Emit(NPT_OutputStream& stream) const;
-    const NPT_String& GetName()  const { return m_Name;  }
-    const NPT_String& GetValue() const { return m_Value; }
-    NPT_Result        SetName(const char* name);
-    NPT_Result        SetValue(const char* value);
-
-private:
-    // members
-    NPT_String m_Name;
-    NPT_String m_Value;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_HttpHeaders
-+---------------------------------------------------------------------*/
-class NPT_HttpHeaders {
-public:
-    // constructors and destructor
-     NPT_HttpHeaders();
-    ~NPT_HttpHeaders();
-
-    // methods
-    NPT_Result Parse(NPT_BufferedInputStream& stream);
-    NPT_Result Emit(NPT_OutputStream& stream) const;
-    const NPT_List<NPT_HttpHeader*>& GetHeaders() const { return m_Headers; }
-    NPT_HttpHeader*   GetHeader(const char* name) const;
-    const NPT_String* GetHeaderValue(const char* name) const;
-    NPT_Result        SetHeader(const char* name, const char* value, bool replace=true);
-    NPT_Result        AddHeader(const char* name, const char* value);
-    NPT_Result        RemoveHeader(const char* name);
-
-private:
-    // members
-    NPT_List<NPT_HttpHeader*> m_Headers;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_HttpEntity
-+---------------------------------------------------------------------*/
-class NPT_HttpEntity {
-public:
-    // constructors and destructor
-             NPT_HttpEntity();
-             NPT_HttpEntity(const NPT_HttpHeaders& headers);
-    virtual ~NPT_HttpEntity();
-
-    // methods
-    NPT_Result SetInputStream(const NPT_InputStreamReference& stream,
-                              bool update_content_length = false);
-    NPT_Result SetInputStream(const void* data, NPT_Size size);
-    NPT_Result SetInputStream(const NPT_String& string);
-    NPT_Result SetInputStream(const char* string);
-    NPT_Result GetInputStream(NPT_InputStreamReference& stream);
-    NPT_Result Load(NPT_DataBuffer& buffer);
-    NPT_Result SetHeaders(const NPT_HttpHeaders& headers);
-
-    // field access
-    NPT_Result        SetContentLength(NPT_LargeSize length);
-    NPT_Result        SetContentType(const char* type);
-    NPT_Result        SetContentEncoding(const char* encoding);
-    NPT_Result        SetTransferEncoding(const char* encoding);
-    NPT_LargeSize     GetContentLength()     { return m_ContentLength;   }
-    const NPT_String& GetContentType()       { return m_ContentType;     }
-    const NPT_String& GetContentEncoding()   { return m_ContentEncoding; }
-    const NPT_String& GetTransferEncoding()  { return m_TransferEncoding;}
-    bool              ContentLengthIsKnown() { return m_ContentLengthIsKnown; }
-
-private:
-    // members
-    NPT_InputStreamReference m_InputStream;
-    NPT_LargeSize            m_ContentLength;
-    NPT_String               m_ContentType;
-    NPT_String               m_ContentEncoding;
-    NPT_String               m_TransferEncoding;
-    bool                     m_ContentLengthIsKnown;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_HttpMessage
-+---------------------------------------------------------------------*/
-class NPT_HttpMessage {
-public:
-    // constructors and destructor
-    virtual ~NPT_HttpMessage();
-
-    // methods
-    const NPT_String& GetProtocol() const { 
-        return m_Protocol; 
-    }
-    NPT_Result SetProtocol(const char* protocol) {
-        m_Protocol = protocol;
-        return NPT_SUCCESS;
-    }
-    NPT_HttpHeaders& GetHeaders() { 
-        return m_Headers;  
-    }
-    const NPT_HttpHeaders& GetHeaders() const { 
-        return m_Headers;  
-    }
-    NPT_Result SetEntity(NPT_HttpEntity* entity);
-    NPT_HttpEntity* GetEntity() {
-        return m_Entity;
-    }
-    NPT_HttpEntity* GetEntity() const {
-        return m_Entity;
-    }
-    virtual NPT_Result ParseHeaders(NPT_BufferedInputStream& stream);
-
-protected:
-    // constructors
-    NPT_HttpMessage(const char* protocol);
-
-    // members
-    NPT_String      m_Protocol;
-    NPT_HttpHeaders m_Headers;
-    NPT_HttpEntity* m_Entity;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_HttpRequest
-+---------------------------------------------------------------------*/
-class NPT_HttpRequest : public NPT_HttpMessage {
-public:
-    // class methods
-    static NPT_Result Parse(NPT_BufferedInputStream& stream, 
-                            const NPT_SocketAddress* endpoint,
-                            NPT_HttpRequest*&        request);
-
-    // constructors and destructor
-    NPT_HttpRequest(const NPT_HttpUrl& url,
-                    const char*        method,
-                    const char*        protocol = NPT_HTTP_PROTOCOL_1_0);
-    NPT_HttpRequest(const char*        url,
-                    const char*        method,
-                    const char*        protocol = NPT_HTTP_PROTOCOL_1_0);
-    virtual ~NPT_HttpRequest();
-
-    // methods
-    const NPT_HttpUrl& GetUrl() const { return m_Url; }
-    NPT_HttpUrl&       GetUrl()       { return m_Url; }
-    NPT_Result         SetUrl(const char* url);
-    NPT_Result         SetUrl(const NPT_HttpUrl& url);
-    const NPT_String&  GetMethod() const { return m_Method; }
-    virtual NPT_Result Emit(NPT_OutputStream& stream, bool use_proxy=false) const;
-    
-protected:
-    // members
-    NPT_HttpUrl m_Url;
-    NPT_String  m_Method;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_HttpResponse
-+---------------------------------------------------------------------*/
-class NPT_HttpResponse : public NPT_HttpMessage {
-public:
-    // class methods
-    static NPT_Result Parse(NPT_BufferedInputStream& stream, 
-                            NPT_HttpResponse*&       response);
-
-    // constructors and destructor
-             NPT_HttpResponse(NPT_HttpStatusCode status_code,
-                              const char*        reason_phrase,
-                              const char*        protocol = NPT_HTTP_PROTOCOL_1_0);
-    virtual ~NPT_HttpResponse();
-
-    // methods
-    NPT_Result         SetStatus(NPT_HttpStatusCode status_code,
-                                 const char*        reason_phrase,
-                                 const char*        protocol = NULL);
-    NPT_Result         SetProtocol(const char* protocol);
-    NPT_HttpStatusCode GetStatusCode() const { return m_StatusCode;   }
-    const NPT_String&  GetReasonPhrase() const { return m_ReasonPhrase; }
-    virtual NPT_Result Emit(NPT_OutputStream& stream) const;
-
-protected:
-    // members
-    NPT_HttpStatusCode m_StatusCode;
-    NPT_String         m_ReasonPhrase;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_HttpProxyAddress
-+---------------------------------------------------------------------*/
-class NPT_HttpProxyAddress
-{
-public:
-    NPT_HttpProxyAddress() : m_Port(NPT_HTTP_INVALID_PORT) {}
-    NPT_HttpProxyAddress(const char* hostname, NPT_UInt16 port) :
-        m_HostName(hostname), m_Port(port) {}
-
-    const NPT_String& GetHostName() const { return m_HostName; } 
-    void              SetHostName(const char* hostname) { m_HostName = hostname; }
-    NPT_UInt16        GetPort() const { return m_Port; }
-    void              SetPort(NPT_UInt16 port) { m_Port = port; }
-
-private:
-    NPT_String m_HostName;
-    NPT_UInt16 m_Port;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_HttpProxySelector
-+---------------------------------------------------------------------*/
-class NPT_HttpProxySelector
-{
-public:
-    // class methods
-    static NPT_HttpProxySelector* GetDefault();
-    static NPT_HttpProxySelector* GetSystemSelector();
-    
-    // methods
-    virtual ~NPT_HttpProxySelector() {};
-    virtual NPT_Result GetProxyForUrl(const NPT_HttpUrl& url, NPT_HttpProxyAddress& proxy) = 0;
-    
-private:
-    // class members
-    static NPT_HttpProxySelector* m_SystemDefault;
-};
-
-class NPT_HttpRequestContext;
-
-/*----------------------------------------------------------------------
-|   NPT_HttpClient
-+---------------------------------------------------------------------*/
-class NPT_HttpClient {
-public:
-    // types
-    struct Config {
-        Config() : m_ConnectionTimeout(  NPT_HTTP_CLIENT_DEFAULT_CONNECTION_TIMEOUT),
-                   m_IoTimeout(          NPT_HTTP_CLIENT_DEFAULT_CONNECTION_TIMEOUT),
-                   m_NameResolverTimeout(NPT_HTTP_CLIENT_DEFAULT_NAME_RESOLVER_TIMEOUT),
-                   m_MaxRedirects(       NPT_HTTP_CLIENT_DEFAULT_MAX_REDIRECTS),
-                   m_UserAgent(          NPT_CONFIG_HTTP_DEFAULT_USER_AGENT) {}
-        NPT_Timeout  m_ConnectionTimeout;
-        NPT_Timeout  m_IoTimeout;
-        NPT_Timeout  m_NameResolverTimeout;
-        NPT_Cardinal m_MaxRedirects;
-        NPT_String   m_UserAgent;
-    };
-    
-    class Connection {
-    public:
-        virtual ~Connection() {}
-        virtual NPT_InputStreamReference&  GetInputStream()  = 0;
-        virtual NPT_OutputStreamReference& GetOutputStream() = 0;
-        virtual NPT_Result                 GetInfo(NPT_SocketInfo& info) = 0;
-        virtual bool                       SupportsPersistence() { return false;                    }
-        virtual bool                       IsRecycled()          { return false;                    }
-        virtual NPT_Result                 Recycle()             { delete this; return NPT_SUCCESS; }
-        virtual NPT_Result                 Abort()               { return NPT_ERROR_NOT_IMPLEMENTED; }
-    };
-    
-    class Connector {
-    public:
-        virtual ~Connector() {}
-
-        virtual NPT_Result Connect(const NPT_HttpUrl&          url,
-                                   NPT_HttpClient&             client,
-                                   const NPT_HttpProxyAddress* proxy,
-                                   bool                        reuse, // whether we can reuse a connection or not
-                                   Connection*&                connection) = 0;
-        
-    protected:
-        NPT_Result TrackConnection(NPT_HttpClient& client,
-                                   Connection*     connection) { return client.TrackConnection(connection); }
-        Connector() {} // don't instantiate directly
-    };
-
-    // class methods
-    static NPT_Result WriteRequest(NPT_OutputStream& output_stream, 
-                                   NPT_HttpRequest&  request,
-                                   bool              should_persist,
-                                   bool			     use_proxy = false);
-    static NPT_Result ReadResponse(NPT_InputStreamReference&  input_stream,
-                                   bool                       should_persist,
-                                   bool                       expect_entity,
-                                   NPT_HttpResponse*&         response,
-                                   NPT_Reference<Connection>* cref = NULL);
-
-    /**
-     * @param connector Pointer to a connector instance, or NULL to use 
-     * the default (TCP) connector.
-     * @param transfer_ownership Boolean flag. If true, the NPT_HttpClient object
-     * becomes the owner of the passed Connector and will delete it when it is 
-     * itself deleted. If false, the caller keeps the ownership of the connector. 
-     * This flag is ignored if the connector parameter is NULL.
-     */
-    NPT_HttpClient(Connector* connector = NULL, bool transfer_ownership = true);
-
-    virtual ~NPT_HttpClient();
-
-    // methods
-    NPT_Result SendRequest(NPT_HttpRequest&        request,
-                           NPT_HttpResponse*&      response,
-                           NPT_HttpRequestContext* context = NULL);
-    NPT_Result Abort();
-    const Config& GetConfig() const { return m_Config; }
-    NPT_Result SetConfig(const Config& config);
-    NPT_Result SetProxy(const char* http_proxy_hostname, 
-                        NPT_UInt16  http_proxy_port,
-                        const char* https_proxy_hostname = NULL,
-                        NPT_UInt16  https_proxy_port = 0);
-    NPT_Result SetProxySelector(NPT_HttpProxySelector* selector);
-    NPT_Result SetConnector(Connector* connector);
-    NPT_Result SetTimeouts(NPT_Timeout connection_timeout,
-                           NPT_Timeout io_timeout,
-                           NPT_Timeout name_resolver_timeout);
-    NPT_Result SetUserAgent(const char* user_agent);
-    NPT_Result SetOptions(NPT_Flags options, bool on);
-    
-protected:
-    // methods
-    NPT_Result TrackConnection(Connection* connection);
-    NPT_Result SendRequestOnce(NPT_HttpRequest&        request,
-                               NPT_HttpResponse*&      response,
-                               NPT_HttpRequestContext* context = NULL);
-
-    // members
-    Config                 m_Config;
-    NPT_HttpProxySelector* m_ProxySelector;
-    bool                   m_ProxySelectorIsOwned;
-    Connector*             m_Connector;
-    bool                   m_ConnectorIsOwned;
-    NPT_Mutex              m_AbortLock;
-    bool                   m_Aborted;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_HttpConnectionManager
-+---------------------------------------------------------------------*/
-class NPT_HttpConnectionManager : public NPT_Thread,
-                                  public NPT_AutomaticCleaner::Singleton
-{
-public:
-    // singleton management
-    static NPT_HttpConnectionManager* GetInstance();
-    
-    class Connection : public NPT_HttpClient::Connection 
-    {
-    public:
-        Connection(NPT_HttpConnectionManager& manager,
-                   NPT_SocketReference&       socket,
-                   NPT_InputStreamReference   input_stream,
-                   NPT_OutputStreamReference  output_stream);
-        virtual ~Connection();
-                   
-        // NPT_HttpClient::Connection methods
-        virtual NPT_InputStreamReference&  GetInputStream()      { return m_InputStream;           }
-        virtual NPT_OutputStreamReference& GetOutputStream()     { return m_OutputStream;          }
-        virtual NPT_Result                 GetInfo(NPT_SocketInfo& info) { return m_Socket->GetInfo(info); }
-        virtual bool                       SupportsPersistence() { return true;                    }
-        virtual bool                       IsRecycled()          { return m_IsRecycled;            }
-        virtual NPT_Result                 Recycle();
-        virtual NPT_Result                 Abort()               { return m_Socket->Cancel(); }
-
-        // members
-        NPT_HttpConnectionManager& m_Manager;
-        bool                       m_IsRecycled;
-        NPT_TimeStamp              m_TimeStamp;
-        NPT_SocketReference        m_Socket;
-        NPT_InputStreamReference   m_InputStream;
-        NPT_OutputStreamReference  m_OutputStream;
-    };
-    
-    // destructor
-    ~NPT_HttpConnectionManager();
-    
-    // methods
-    Connection* FindConnection(NPT_SocketAddress& address);
-    NPT_Result  Recycle(Connection* connection);
-    NPT_Result  Track(NPT_HttpClient* client, NPT_HttpClient::Connection* connection);
-    NPT_Result  AbortConnections(NPT_HttpClient* client);
-    
-    // class methods
-    static NPT_Result  Untrack(NPT_HttpClient::Connection* connection);
-    
-private:
-    typedef NPT_List<NPT_HttpClient::Connection*> ConnectionList;
-    
-    // class members
-    static NPT_HttpConnectionManager* Instance;
-    
-    // constructor
-    NPT_HttpConnectionManager();
-    
-    // NPT_Thread methods
-    void Run();
-    
-    // methods
-    NPT_Result      UntrackConnection(NPT_HttpClient::Connection* connection);
-    NPT_Result      Cleanup();
-
-    // members
-    NPT_Mutex             m_Lock;
-    NPT_Cardinal          m_MaxConnections;
-    NPT_Cardinal          m_MaxConnectionAge;
-    NPT_SharedVariable    m_Aborted;
-    NPT_List<Connection*> m_Connections;
-    NPT_Map<NPT_HttpClient*, ConnectionList> m_ClientConnections;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_HttpRequestContext
-+---------------------------------------------------------------------*/
-class NPT_HttpRequestContext
-{
-public:
-    // constructor
-    NPT_HttpRequestContext() {}
-    NPT_HttpRequestContext(const NPT_SocketAddress* local_address,
-                           const NPT_SocketAddress* remote_address);
-                  
-    // methods
-    const NPT_SocketAddress& GetLocalAddress()  const { return m_LocalAddress;  }
-    const NPT_SocketAddress& GetRemoteAddress() const { return m_RemoteAddress; }
-    void SetLocalAddress(const NPT_SocketAddress& address) {
-        m_LocalAddress = address;
-    }
-    void SetRemoteAddress(const NPT_SocketAddress& address) {
-        m_RemoteAddress = address;
-    }
-    
-private:
-    // members
-    NPT_SocketAddress m_LocalAddress;
-    NPT_SocketAddress m_RemoteAddress;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_HttpRequestHandler
-+---------------------------------------------------------------------*/
-class NPT_HttpRequestHandler 
-{
-public:
-    NPT_IMPLEMENT_DYNAMIC_CAST(NPT_HttpRequestHandler)
-
-    // destructor
-    virtual ~NPT_HttpRequestHandler() {}
-
-    // methods
-    virtual NPT_Result SetupResponse(NPT_HttpRequest&              request,
-                                     const NPT_HttpRequestContext& context,
-                                     NPT_HttpResponse&             response) = 0;
-                                     
-    /**
-     * Override this method if you want to write the body yourself.
-     * The default implementation will simply write out the entity's
-     * input stream.
-     */
-    virtual NPT_Result SendResponseBody(const NPT_HttpRequestContext& context,
-                                        NPT_HttpResponse&             response,
-                                        NPT_OutputStream&             output);
-};
-
-/*----------------------------------------------------------------------
-|   NPT_HttpStaticRequestHandler
-+---------------------------------------------------------------------*/
-class NPT_HttpStaticRequestHandler : public NPT_HttpRequestHandler
-{
-public:
-    // constructors
-    NPT_HttpStaticRequestHandler(const char* document, 
-                                 const char* mime_type = "text/html",
-                                 bool        copy = true);
-    NPT_HttpStaticRequestHandler(const void* data,
-                                 NPT_Size    size,
-                                 const char* mime_type = "text/html",
-                                 bool        copy = true);
-
-    // NPT_HttpRequestHandler methods
-    virtual NPT_Result SetupResponse(NPT_HttpRequest&              request, 
-                                     const NPT_HttpRequestContext& context,
-                                     NPT_HttpResponse&             response);
-
-private:
-    NPT_String     m_MimeType;
-    NPT_DataBuffer m_Buffer;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_HttpFileRequestHandler_FileTypeMap
-+---------------------------------------------------------------------*/
-typedef struct NPT_HttpFileRequestHandler_DefaultFileTypeMapEntry {
-    const char* extension;
-    const char* mime_type;
-} NPT_HttpFileRequestHandler_FileTypeMapEntry;
-
-/*----------------------------------------------------------------------
-|   NPT_HttpFileRequestHandler
-+---------------------------------------------------------------------*/
-class NPT_HttpFileRequestHandler : public NPT_HttpRequestHandler
-{
-public:
-    // constructors
-    NPT_HttpFileRequestHandler(const char* url_root,
-                               const char* file_root,
-                               bool        auto_dir = false,
-                               const char* auto_index = NULL);
-
-    // NPT_HttpRequestHandler methods
-    virtual NPT_Result SetupResponse(NPT_HttpRequest&              request, 
-                                     const NPT_HttpRequestContext& context,
-                                     NPT_HttpResponse&             response);
-    
-    // class methods
-    static const char* GetDefaultContentType(const char* extension);
-    
-    // accessors
-    NPT_Map<NPT_String,NPT_String>& GetFileTypeMap() { return m_FileTypeMap; }
-    void SetDefaultMimeType(const char* mime_type) {
-        m_DefaultMimeType = mime_type;
-    }
-    void SetUseDefaultFileTypeMap(bool use_default) {
-        m_UseDefaultFileTypeMap = use_default;
-    }
-    
-    static NPT_Result SetupResponseBody(NPT_HttpResponse&         response,
-                                        NPT_InputStreamReference& stream,
-                                        const NPT_String*         range_spec = NULL);
-
-protected:
-    // methods
-    const char* GetContentType(const NPT_String& filename);
-
-private:
-    NPT_String                      m_UrlRoot;
-    NPT_String                      m_FileRoot;
-    NPT_Map<NPT_String, NPT_String> m_FileTypeMap;
-    NPT_String                      m_DefaultMimeType;
-    bool                            m_UseDefaultFileTypeMap;
-    bool                            m_AutoDir;
-    NPT_String                      m_AutoIndex;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_HttpServer
-+---------------------------------------------------------------------*/
-class NPT_HttpServer {
-public:
-    // types
-    struct Config {
-        NPT_Timeout   m_ConnectionTimeout;
-        NPT_Timeout   m_IoTimeout;
-        NPT_IpAddress m_ListenAddress;
-        NPT_UInt16    m_ListenPort;
-        bool          m_ReuseAddress;
-    };
-
-    // constructors and destructor
-    NPT_HttpServer(NPT_UInt16 listen_port = NPT_HTTP_DEFAULT_PORT,
-                   bool       reuse_address = true);
-    NPT_HttpServer(NPT_IpAddress listen_address, 
-                   NPT_UInt16    listen_port = NPT_HTTP_DEFAULT_PORT,
-                   bool          reuse_address = true);
-    virtual ~NPT_HttpServer();
-
-    // methods
-    NPT_Result SetConfig(const Config& config);
-    const Config& GetConfig() const { return m_Config; }
-    NPT_Result SetListenPort(NPT_UInt16 port, bool reuse_address = true);
-    NPT_Result SetTimeouts(NPT_Timeout connection_timeout, NPT_Timeout io_timeout);
-    NPT_Result SetServerHeader(const char* server_header);
-    NPT_Result Abort();
-    NPT_Result WaitForNewClient(NPT_InputStreamReference&  input,
-                                NPT_OutputStreamReference& output,
-                                NPT_HttpRequestContext*    context,
-                                NPT_Flags                  socket_flags = 0);
-    NPT_Result Loop(bool cancellable_sockets=true);
-    NPT_UInt16 GetPort() { return m_BoundPort; }
-    void Terminate();
-    
-    /**
-     * Add a request handler. By default the ownership of the handler is NOT transfered to this object,
-     * so the caller is responsible for the lifetime management of the handler object.
-     */
-    virtual NPT_Result AddRequestHandler(NPT_HttpRequestHandler* handler, 
-                                         const char*             path, 
-                                         bool                    include_children = false,
-                                         bool                    transfer_ownership = false);
-    virtual NPT_HttpRequestHandler* FindRequestHandler(NPT_HttpRequest& request);
-    virtual NPT_List<NPT_HttpRequestHandler*> FindRequestHandlers(NPT_HttpRequest& request);
-
-    /**
-     * Parse the request from a new client, form a response, and send it back. 
-     */
-    virtual NPT_Result RespondToClient(NPT_InputStreamReference&     input,
-                                       NPT_OutputStreamReference&    output,
-                                       const NPT_HttpRequestContext& context);
-
-protected:
-    // types
-    struct HandlerConfig {
-        HandlerConfig(NPT_HttpRequestHandler* handler,
-                      const char*             path,
-                      bool                    include_children,
-                      bool                    transfer_ownership = false);
-        ~HandlerConfig();
-
-        // methods
-        bool WillHandle(NPT_HttpRequest& request);
-
-        // members
-        NPT_HttpRequestHandler* m_Handler;
-        NPT_String              m_Path;
-        bool                    m_IncludeChildren;
-        bool                    m_HandlerIsOwned;
-    };
-
-    // methods
-    NPT_Result Bind();
-
-    // members
-    NPT_TcpServerSocket      m_Socket;
-    NPT_UInt16               m_BoundPort;
-    Config                   m_Config;
-    NPT_List<HandlerConfig*> m_RequestHandlers;
-    NPT_String               m_ServerHeader;
-    bool                     m_Run;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_HttpResponder
-+---------------------------------------------------------------------*/
-class NPT_HttpResponder {
-public:
-    // types
-    struct Config {
-        NPT_Timeout m_IoTimeout;
-    };
-
-    // constructors and destructor
-    NPT_HttpResponder(NPT_InputStreamReference&  input,
-                      NPT_OutputStreamReference& output);
-    virtual ~NPT_HttpResponder();
-
-    // methods
-    NPT_Result SetConfig(const Config& config);
-    NPT_Result SetTimeout(NPT_Timeout io_timeout);
-    NPT_Result ParseRequest(NPT_HttpRequest*&        request,
-                            const NPT_SocketAddress* local_address = NULL);
-    NPT_Result SendResponseHeaders(NPT_HttpResponse& response);
-
-protected:
-    // members
-    Config                           m_Config;
-    NPT_BufferedInputStreamReference m_Input;
-    NPT_OutputStreamReference        m_Output;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_HttpChunkedInputStream
-+---------------------------------------------------------------------*/
-class NPT_HttpChunkedInputStream : public NPT_InputStream
-{
-public:
-    // constructors and destructor
-    NPT_HttpChunkedInputStream(NPT_BufferedInputStreamReference& stream);
-    virtual ~NPT_HttpChunkedInputStream();
-
-    // NPT_InputStream methods
-    NPT_Result Read(void*     buffer, 
-                    NPT_Size  bytes_to_read, 
-                    NPT_Size* bytes_read = NULL);
-    NPT_Result Seek(NPT_Position offset);
-    NPT_Result Tell(NPT_Position& offset);
-    NPT_Result GetSize(NPT_LargeSize& size);
-    NPT_Result GetAvailable(NPT_LargeSize& available);
-
-protected:
-    // members
-    NPT_BufferedInputStreamReference m_Source;
-    NPT_UInt32                       m_CurrentChunkSize;
-    bool                             m_Eos;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_HttpChunkedOutputStream
-+---------------------------------------------------------------------*/
-class NPT_HttpChunkedOutputStream : public NPT_OutputStream
-{
-public:
-    // constructors and destructor
-    NPT_HttpChunkedOutputStream(NPT_OutputStream& stream);
-    virtual ~NPT_HttpChunkedOutputStream();
-
-    // NPT_OutputStream methods
-    NPT_Result Write(const void* buffer, 
-                     NPT_Size    bytes_to_write, 
-                     NPT_Size*   bytes_written = NULL);
-    NPT_Result Seek(NPT_Position /*offset*/) { return NPT_ERROR_NOT_SUPPORTED;}
-    NPT_Result Tell(NPT_Position& offset)    { return m_Stream.Tell(offset);  }
-    NPT_Result Flush()                       { return m_Stream.Flush();       }
-
-protected:
-    // members
-    NPT_OutputStream& m_Stream;
-};
-
-#endif // _NPT_HTTP_H_
-
diff --git a/extra_lib/include/platinum/NptInterfaces.h b/extra_lib/include/platinum/NptInterfaces.h
deleted file mode 100644
index b0bb264..0000000
--- a/extra_lib/include/platinum/NptInterfaces.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Interfaces
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_INTERFACES_H_
-#define _NPT_INTERFACES_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptTypes.h"
-#include "NptCommon.h"
-#include "NptResults.h"
-#include "NptConfig.h"
-
-/*----------------------------------------------------------------------
-|   constants
-+---------------------------------------------------------------------*/
-const int NPT_ERROR_NO_SUCH_INTERFACE = NPT_ERROR_BASE_INTERFACES - 0;
-
-/*----------------------------------------------------------------------
-|   NPT_InterfaceId
-+---------------------------------------------------------------------*/
-class NPT_InterfaceId
-{
- public:
-    // methods
-    bool operator==(const NPT_InterfaceId& id) const {
-        return ((id.m_Id == m_Id) && (id.m_Version == m_Version));
-    }
-
-    // members
-    unsigned long m_Id;
-    unsigned long m_Version;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_Polymorphic
-+---------------------------------------------------------------------*/
-class NPT_Polymorphic
-{
-public:
-    // destructor
-    virtual ~NPT_Polymorphic() {}
-     
-    // methods
-    virtual NPT_Result GetInterface(const NPT_InterfaceId& id, 
-                                    NPT_Interface*&        iface) = 0;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_Interruptible
-+---------------------------------------------------------------------*/
-class NPT_Interruptible
-{
-public:
-    // destructor
-    virtual ~NPT_Interruptible() {}
-
-    // methods
-    virtual NPT_Result Interrupt() = 0;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_Configurable
-+---------------------------------------------------------------------*/
-class NPT_Configurable
-{
-public:
-    // destructor
-    virtual ~NPT_Configurable() {}
-     
-    // methods
-    virtual NPT_Result SetProperty(const char* /*name*/, 
-                                   const char* /*value*/) { 
-        return NPT_ERROR_NO_SUCH_PROPERTY;
-    }
-    virtual NPT_Result SetProperty(const char* /*name*/, 
-                                   int         /*value*/) { 
-        return NPT_ERROR_NO_SUCH_PROPERTY;
-    }
-    virtual NPT_Result GetProperty(const char*        /*name*/, 
-                                   NPT_PropertyValue& /*value*/) {
-        return NPT_ERROR_NO_SUCH_PROPERTY;
-    }
-};
-
-#endif // _NPT_INTERFACES_H_
diff --git a/extra_lib/include/platinum/NptJson.h b/extra_lib/include/platinum/NptJson.h
deleted file mode 100644
index 699feef..0000000
--- a/extra_lib/include/platinum/NptJson.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - JSON
-|
-| Copyright (c) 2002-2012, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_JSON_H_
-#define _NPT_JSON_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptTypes.h"
-#include "NptStrings.h"
-
-
-#endif // _NPT_JSON_H_
diff --git a/extra_lib/include/platinum/NptList.h b/extra_lib/include/platinum/NptList.h
deleted file mode 100644
index e1712c5..0000000
--- a/extra_lib/include/platinum/NptList.h
+++ /dev/null
@@ -1,705 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Lists
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_LIST_H_
-#define _NPT_LIST_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptResults.h"
-#include "NptTypes.h"
-#include "NptConstants.h"
-#include "NptCommon.h"
-
-/*----------------------------------------------------------------------
-|   constants
-+---------------------------------------------------------------------*/
-const int NPT_ERROR_LIST_EMPTY              = NPT_ERROR_BASE_LIST - 0;
-const int NPT_ERROR_LIST_OPERATION_ABORTED  = NPT_ERROR_BASE_LIST - 1;
-const int NPT_ERROR_LIST_OPERATION_CONTINUE = NPT_ERROR_BASE_LIST - 2;
-
-/*----------------------------------------------------------------------
-|   NPT_List
-+---------------------------------------------------------------------*/
-template <typename T> 
-class NPT_List 
-{
-protected:
-    class Item;
-
-public:
-    // types
-    typedef T Element;
-
-    class Iterator {
-    public:
-        Iterator() : m_Item(NULL) {}
-        explicit Iterator(Item* item) : m_Item(item) {}
-        Iterator(const Iterator& copy) : m_Item(copy.m_Item) {}
-        T&  operator*()  const { return m_Item->m_Data; }
-        T*  operator->() const { return &m_Item->m_Data;}
-        Iterator& operator++()  { // prefix
-            m_Item = m_Item->m_Next;
-            return (*this); 
-        }
-        Iterator operator++(int) { // postfix
-            Iterator saved_this = *this;
-            m_Item = m_Item->m_Next;
-            return saved_this;
-        }
-        Iterator& operator--() { // prefix
-            m_Item = m_Item->m_Prev;
-            return (*this); 
-        }
-        Iterator operator--(int) { // postfix
-            Iterator saved_this = *this;
-            m_Item = m_Item->m_Prev;
-            return saved_this;
-        }
-        operator bool() const {
-            return m_Item != NULL;
-        }
-        bool operator==(const Iterator& other) const {
-            return m_Item == other.m_Item;
-        }
-        bool operator!=(const Iterator& other) const {
-            return m_Item != other.m_Item;
-        }
-        void operator=(const Iterator& other) {
-            m_Item = other.m_Item;
-        }
-        void operator=(Item* item) {
-            m_Item = item;
-        }
-
-    private:
-        Item* m_Item;
-
-        // friends
-        friend class NPT_List<T>;
-    };
-
-    // methods
-                 NPT_List<T>();
-                 NPT_List<T>(const NPT_List<T>& list);
-                ~NPT_List<T>();
-    NPT_Result   Add(const T& data);
-    NPT_Result   Insert(const Iterator where, const T& data);
-    NPT_Result   Remove(const T& data, bool all=false);
-    NPT_Result   Erase(const Iterator position);
-    NPT_Result   PopHead(T& data);
-    bool         Contains(const T& data) const;
-    NPT_Result   Clear();
-    NPT_Result   Get(NPT_Ordinal index, T& data) const;
-    NPT_Result   Get(NPT_Ordinal index, T*& data) const;
-    NPT_Cardinal GetItemCount() const { return m_ItemCount; }
-    Iterator     GetFirstItem() const { return Iterator(m_Head); }
-    Iterator     GetLastItem() const  { return Iterator(m_Tail); }
-    Iterator     GetItem(NPT_Ordinal index) const;
-
-    // list manipulation
-    NPT_Result   Add(NPT_List<T>& list);
-    NPT_Result   Remove(const NPT_List<T>& list, bool all=false);
-    NPT_Result   Cut(NPT_Cardinal keep, NPT_List<T>& cut);
-    
-    // item manipulation
-    NPT_Result   Add(Item& item);
-    NPT_Result   Detach(Item& item);
-    NPT_Result   Insert(const Iterator where, Item& item);
-
-    // list operations
-    // keep these template members defined here because MSV6 does not let
-    // us define them later
-    template <typename X> 
-    NPT_Result Apply(const X& function) const
-    {                          
-        Item* item = m_Head;
-        while (item) {
-            function(item->m_Data);
-            item = item->m_Next;
-        }
-
-        return NPT_SUCCESS;
-    }
-
-    template <typename X, typename P> 
-    NPT_Result ApplyUntil(const X& function, const P& predicate, bool* match = NULL) const
-    {                          
-        Item* item = m_Head;
-        while (item) {
-            NPT_Result return_value;
-            if (predicate(function(item->m_Data), return_value)) {
-                if (match) *match = true;
-                return return_value;
-            }
-            item = item->m_Next;
-        }
-        
-        if (match) *match = false;
-        return NPT_SUCCESS;
-    }
-
-    template <typename P> 
-    Iterator Find(const P& predicate, NPT_Ordinal n=0) const
-    {
-        Item* item = m_Head;
-        while (item) {
-            if (predicate(item->m_Data)) {
-                if (n == 0) {
-                    return Iterator(item);
-                }
-                --n;
-            }
-            item = item->m_Next;
-        }
-
-        return Iterator(NULL);
-    }
-
-    // Merge sort algorithm
-    // http://en.wikipedia.org/wiki/Mergesort
-    template <typename X> 
-    NPT_Result Sort(const X& function)
-    {   
-        if (GetItemCount() <= 1) return NPT_SUCCESS;
-        
-        NPT_List<T> right;
-        NPT_CHECK(Cut(GetItemCount() >> 1, right));
-        
-        // Sort ourselves again
-        Sort(function);
-        
-        // sort the right side
-        right.Sort(function);
-        
-        // merge the two back inline
-        if (function(m_Tail->m_Data, right.m_Head->m_Data) > 0) {
-            Merge(right, function);
-        } else {
-            // append right
-            right.m_Head->m_Prev = m_Tail;
-            if (m_Tail) m_Tail->m_Next = right.m_Head;
-            if (!m_Head) m_Head = right.m_Head;
-            m_Tail = right.m_Tail;
-            m_ItemCount += right.m_ItemCount;
-            
-            right.m_ItemCount = 0;
-            right.m_Head = right.m_Tail = NULL;
-        }
-        
-        return NPT_SUCCESS;
-    }
-
-    template <typename X> 
-    NPT_Result Merge(NPT_List<T>& other, const X& function) 
-    {
-        Iterator left = GetFirstItem();
-        Iterator right;
-        while (left && other.m_Head) {
-            if (function(*left, other.m_Head->m_Data) <= 0) {
-                ++left;
-            } else {
-                // remove head and insert it
-                Item* head = other.m_Head;
-                other.Detach(*head);
-                Insert(left, *head);
-            }
-        }
-        
-        // add what's left of other if any
-        if (other.m_Head) {
-            other.m_Head->m_Prev = m_Tail;
-            if (m_Tail) m_Tail->m_Next = other.m_Head;
-            m_Tail = other.m_Tail;
-            if (!m_Head) m_Head = other.m_Head;
-            other.m_Head = other.m_Tail = NULL;
-        }
-        m_ItemCount += other.m_ItemCount;
-        other.m_ItemCount = 0;
-        return NPT_SUCCESS;
-    }
-
-    // operators
-    void operator=(const NPT_List<T>& other);
-    bool operator==(const NPT_List<T>& other) const;
-    bool operator!=(const NPT_List<T>& other) const;
-
-protected:
-    // types
-    class Item 
-    {
-    public:
-        // methods
-        Item(const T& data) : m_Next(0), m_Prev(0), m_Data(data) {}
-
-        // members
-        Item* m_Next;
-        Item* m_Prev;
-        T     m_Data;
-
-        // friends
-        //friend class NPT_List<T>;
-        //friend class NPT_List<T>::Iterator;
-    };
-
-    // members
-    NPT_Cardinal m_ItemCount;
-    Item*        m_Head;
-    Item*        m_Tail;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_List<T>::NPT_List
-+---------------------------------------------------------------------*/
-template <typename T>
-inline
-NPT_List<T>::NPT_List() : m_ItemCount(0), m_Head(0), m_Tail(0) 
-{
-}
-
-/*----------------------------------------------------------------------
-|   NPT_List<T>::NPT_List
-+---------------------------------------------------------------------*/
-template <typename T>
-inline
-NPT_List<T>::NPT_List(const NPT_List<T>& list) : m_ItemCount(0), m_Head(0), m_Tail(0) 
-{
-    *this = list;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_List<T>::~NPT_List<T>
-+---------------------------------------------------------------------*/
-template <typename T>
-inline
-NPT_List<T>::~NPT_List()
-{
-    Clear();
-}
- 
-/*----------------------------------------------------------------------
-|   NPT_List<T>::operator=
-+---------------------------------------------------------------------*/
-template <typename T>
-void
-NPT_List<T>::operator=(const NPT_List<T>& list)
-{
-    // cleanup
-    Clear();
-
-    // copy the new list
-    Item* item = list.m_Head;
-    while (item) {
-        Add(item->m_Data);
-        item = item->m_Next;
-    }
-}
-
-/*----------------------------------------------------------------------
-|   NPT_List<T>::operator==
-+---------------------------------------------------------------------*/
-template <typename T>
-bool
-NPT_List<T>::operator==(const NPT_List<T>& other) const
-{
-    // quick test
-    if (m_ItemCount != other.m_ItemCount) return false;
-
-    // compare all elements one by one
-    Item* our_item = m_Head;
-    Item* their_item = other.m_Head;
-    while (our_item && their_item) {
-        if (our_item->m_Data != their_item->m_Data) return false;
-        our_item   = our_item->m_Next;
-        their_item = their_item->m_Next;
-    }
-    
-    return our_item == NULL && their_item == NULL;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_List<T>::operator!=
-+---------------------------------------------------------------------*/
-template <typename T>
-inline
-bool
-NPT_List<T>::operator!=(const NPT_List<T>& other) const
-{
-    return !(*this == other);
-}
-
-/*----------------------------------------------------------------------
-|   NPT_List<T>::Clear
-+---------------------------------------------------------------------*/
-template <typename T>
-NPT_Result
-NPT_List<T>::Clear()
-{
-    // delete all items
-    Item* item = m_Head;
-    while (item) {
-        Item* next = item->m_Next;
-        delete item;
-        item = next;
-    }
-
-    m_ItemCount = 0;
-    m_Head      = NULL;
-    m_Tail      = NULL;
-
-    return NPT_SUCCESS;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_List<T>::Add
-+---------------------------------------------------------------------*/
-template <typename T>
-NPT_Result
-NPT_List<T>::Add(Item& item)
-{
-    // add element at the tail
-    if (m_Tail) {
-        item.m_Prev = m_Tail;
-        item.m_Next = NULL;
-        m_Tail->m_Next = &item;
-        m_Tail = &item;
-    } else {
-        m_Head = &item;
-        m_Tail = &item;
-        item.m_Next = NULL;
-        item.m_Prev = NULL;
-    }
-
-    // one more item in the list now
-    ++m_ItemCount;
- 
-    return NPT_SUCCESS;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_List<T>::Add
-+---------------------------------------------------------------------*/
-template <typename T>
-NPT_Result
-NPT_List<T>::Add(NPT_List<T>& list)
-{
-    // copy the new list
-    Item* item = list.m_Head;
-    while (item) {
-        Add(item->m_Data);
-        item = item->m_Next;
-    }
-
-    return NPT_SUCCESS;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_List<T>::Add
-+---------------------------------------------------------------------*/
-template <typename T>
-inline
-NPT_Result
-NPT_List<T>::Add(const T& data)
-{
-    return Add(*new Item(data));
-}
-
-/*----------------------------------------------------------------------
-|   NPT_List<T>::GetItem
-+---------------------------------------------------------------------*/
-template <typename T>
-typename NPT_List<T>::Iterator
-NPT_List<T>::GetItem(NPT_Ordinal n) const
-{
-    Iterator result;
-    if (n >= m_ItemCount) return result;
-    
-    result = m_Head;
-    for (unsigned int i=0; i<n; i++) {
-        ++result;
-    }
-
-    return result;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_List<T>::Insert
-+---------------------------------------------------------------------*/
-template <typename T>
-inline 
-NPT_Result
-NPT_List<T>::Insert(Iterator where, const T&data)
-{
-    return Insert(where, *new Item(data));
-}
-
-/*----------------------------------------------------------------------
-|   NPT_List<T>::Insert
-+---------------------------------------------------------------------*/
-template <typename T>
-NPT_Result
-NPT_List<T>::Insert(Iterator where, Item& item)
-{
-    // insert the item in the list
-    Item* position = where.m_Item;
-    if (position) {
-        // insert at position
-        item.m_Next = position;
-        item.m_Prev = position->m_Prev;
-        position->m_Prev = &item;
-        if (item.m_Prev) {
-            item.m_Prev->m_Next = &item;
-        } else {
-            // this is the new head
-            m_Head = &item;
-        }
-
-        // one more item in the list now
-        ++m_ItemCount;
-    } else {
-        // insert at tail
-        return Add(item);
-    }
- 
-    return NPT_SUCCESS;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_List<T>::Erase
-+---------------------------------------------------------------------*/
-template <typename T>
-NPT_Result
-NPT_List<T>::Erase(Iterator position) 
-{
-    if (!position) return NPT_ERROR_NO_SUCH_ITEM;
-    Detach(*position.m_Item);
-    delete position.m_Item;
-
-    return NPT_SUCCESS;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_List<T>::Remove
-+---------------------------------------------------------------------*/
-template <typename T>
-NPT_Result
-NPT_List<T>::Remove(const T& data, bool all)
-{
-    Item* item = m_Head;
-    NPT_Cardinal matches = 0;
-
-    while (item) {
-        Item* next = item->m_Next;
-        if (item->m_Data == data) {
-            // we found a match
-            ++matches;
-
-            // detach item
-            Detach(*item);
-            
-            // destroy the item
-            delete item;
-
-            if (!all) return NPT_SUCCESS;
-        }
-        item = next;
-    }
- 
-    return matches?NPT_SUCCESS:NPT_ERROR_NO_SUCH_ITEM;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_List<T>::Remove
-+---------------------------------------------------------------------*/
-template <typename T>
-NPT_Result
-NPT_List<T>::Remove(const NPT_List<T>& list, bool all)
-{
-    Item* item = list.m_Head;
-    while (item) {
-        Remove(item->m_Data, all);
-        item = item->m_Next;
-    }
-
-    return NPT_SUCCESS;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_List<T>::Detach
-+---------------------------------------------------------------------*/
-template <typename T>
-NPT_Result
-NPT_List<T>::Detach(Item& item)
-{
-    // remove item
-    if (item.m_Prev) {
-        // item is not the head
-        if (item.m_Next) {
-            // item is not the tail
-            item.m_Next->m_Prev = item.m_Prev;
-            item.m_Prev->m_Next = item.m_Next;
-        } else {
-            // item is the tail
-            m_Tail = item.m_Prev;
-            m_Tail->m_Next = NULL;
-        }
-    } else {
-        // item is the head
-        m_Head = item.m_Next;
-        if (m_Head) {
-            // item is not the tail
-            m_Head->m_Prev = NULL;
-        } else {
-            // item is also the tail
-            m_Tail = NULL;
-        }
-    }
-
-    // one less item in the list now
-    --m_ItemCount;
-
-    return NPT_SUCCESS;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_List<T>::Get
-+---------------------------------------------------------------------*/
-template <typename T>
-NPT_Result
-NPT_List<T>::Get(NPT_Ordinal index, T& data) const
-{
-    T* data_pointer;
-    NPT_CHECK(Get(index, data_pointer));
-    data = *data_pointer;
-    return NPT_SUCCESS;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_List<T>::Get
-+---------------------------------------------------------------------*/
-template <typename T>
-NPT_Result
-NPT_List<T>::Get(NPT_Ordinal index, T*& data) const
-{
-    Item* item = m_Head;
-
-    if (index < m_ItemCount) {
-        while (index--) item = item->m_Next;
-        data = &item->m_Data;
-        return NPT_SUCCESS;
-    } else {
-        data = NULL;
-        return NPT_ERROR_NO_SUCH_ITEM;
-    }
-}
-
-/*----------------------------------------------------------------------
-|   NPT_List<T>::PopHead
-+---------------------------------------------------------------------*/
-template <typename T>
-NPT_Result
-NPT_List<T>::PopHead(T& data)
-{
-    // check that we have an element
-    if (m_Head == NULL) return NPT_ERROR_LIST_EMPTY;
-
-    // copy the head item's data
-    data = m_Head->m_Data;
-
-    // discard the head item
-    Item* head = m_Head;
-    m_Head = m_Head->m_Next;
-    if (m_Head) {
-        m_Head->m_Prev = NULL;
-    } else {
-        m_Tail = NULL;
-    }
-    delete head;
-
-    // update the count
-    --m_ItemCount;
-
-    return NPT_SUCCESS;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_List<T>::Contains
-+---------------------------------------------------------------------*/
-template <typename T>
-bool
-NPT_List<T>::Contains(const T& data) const
-{
-    Item* item = m_Head;
-    while (item) {
-        if (item->m_Data == data) return true;
-        item = item->m_Next;
-    }
-
-    return false;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_List<T>::Cut
-+---------------------------------------------------------------------*/
-template <typename T> 
-NPT_Result 
-NPT_List<T>::Cut(NPT_Cardinal keep, NPT_List<T>& cut) 
-{
-    cut.Clear();
-    
-    // shortcut
-    if (keep >= GetItemCount()) return NPT_SUCCESS;
-    
-    // update new counts first
-    cut.m_ItemCount = m_ItemCount-keep;
-    m_ItemCount = keep;
-    
-    // look for the cut-point item
-    Item* item = m_Head;
-    while (keep--) { item = item->m_Next;}
-    
-    // the cut list goes from the cut-point item to the tail
-    cut.m_Head = item;
-    cut.m_Tail = m_Tail;
-    
-    // update the portion of the list we keep
-    if (item == m_Head) m_Head = NULL;
-    m_Tail = item->m_Prev;
-    
-    // update the cut list
-    if (item->m_Prev) item->m_Prev->m_Next = NULL;
-    item->m_Prev = NULL;
-    
-    return NPT_SUCCESS;
-}
-
-#endif // _NPT_LIST_H_
diff --git a/extra_lib/include/platinum/NptLogging.h b/extra_lib/include/platinum/NptLogging.h
deleted file mode 100644
index 3168424..0000000
--- a/extra_lib/include/platinum/NptLogging.h
+++ /dev/null
@@ -1,520 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Logging Support
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
-****************************************************************/
-/** @file
-* Header file for logging
-*/
-
-#ifndef _NPT_LOGGING_H_
-#define _NPT_LOGGING_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptConfig.h"
-#include "NptTypes.h"
-#include "NptTime.h"
-#include "NptStrings.h"
-#include "NptList.h"
-#include "NptStreams.h"
-#include "NptThreads.h"
-#include "NptHttp.h"
-
-/*----------------------------------------------------------------------
-|   class references
-+---------------------------------------------------------------------*/
-class NPT_LogManager;
-
-/*----------------------------------------------------------------------
-|   types
-+---------------------------------------------------------------------*/
-class NPT_LogRecord {
-public:
-    const char*   m_LoggerName;
-    int           m_Level;
-    const char*   m_Message;
-    NPT_TimeStamp m_TimeStamp;
-    const char*   m_SourceFile;
-    unsigned int  m_SourceLine;
-    const char*   m_SourceFunction;
-    unsigned long m_ThreadId;
-};
-
-class NPT_LogHandler {
-public:
-    typedef void(*CustomHandlerExternalFunction)(const NPT_LogRecord* record);
-    
-    // class methods
-    static NPT_Result SetCustomHandlerFunction(CustomHandlerExternalFunction function);
-    static NPT_Result Create(const char*      logger_name,
-                             const char*      handler_name,
-                             NPT_LogHandler*& handler);
-
-    // methods
-    virtual ~NPT_LogHandler() {}
-    virtual void       Log(const NPT_LogRecord& record) = 0;
-    virtual NPT_String ToString() { return ""; }
-};
-
-class NPT_Logger {
-public:
-    // methods
-    NPT_Logger(const char* name, NPT_LogManager& manager);
-    ~NPT_Logger();
-    void Log(int          level, 
-             const char*  source_file,
-             unsigned int source_line,
-             const char*  source_function,
-             const char*  msg, 
-                          ...);
-
-    NPT_Result AddHandler(NPT_LogHandler* handler, bool transfer_ownership = true);
-    NPT_Result DeleteHandlers();
-    NPT_Result SetParent(NPT_Logger* parent);
-    const NPT_String& GetName()  const { return m_Name;  }
-    int               GetLevel() const { return m_Level; }
-    bool              GetForwardToParent() const { return m_ForwardToParent; }
-    NPT_List<NPT_LogHandler*>& GetHandlers() { return m_Handlers; }
-
-private:
-    // members
-    NPT_LogManager&           m_Manager;
-    NPT_String                m_Name;
-    int                       m_Level;
-    bool                      m_LevelIsInherited;
-    bool                      m_ForwardToParent;
-    NPT_Logger*               m_Parent;
-    NPT_List<NPT_LogHandler*> m_Handlers;
-    NPT_List<NPT_LogHandler*> m_ExternalHandlers;
-
-    // friends
-    friend class NPT_LogManager;
-};
-
-typedef struct {
-    NPT_Logger* logger;
-    const char* name;
-} NPT_LoggerReference;
-
-class NPT_Log {
-public:
-    // class methods
-    static int         GetLogLevel(const char* name);
-    static const char* GetLogLevelName(int level);
-    static const char* GetLogLevelAnsiColor(int level);
-    static void        FormatRecordToStream(const NPT_LogRecord& record,
-                                            NPT_OutputStream&    stream,
-                                            bool                 use_colors,
-                                            NPT_Flags            format_filter);
-};
-
-class NPT_LogConfigEntry {
-public:
-    NPT_LogConfigEntry(const char* key, const char* value) :
-      m_Key(key), m_Value(value) {}
-    NPT_String m_Key;
-    NPT_String m_Value;
-};
-
-class NPT_LogManager {
-public:
-    // class methods
-    static NPT_LogManager& GetDefault();
-    static bool ConfigValueIsBooleanTrue(NPT_String& value);
-    static bool ConfigValueIsBooleanFalse(NPT_String& value);
-    static NPT_Logger* GetLogger(const char* name);
-
-    // methods
-    NPT_LogManager();
-    ~NPT_LogManager();
-    NPT_Result                    Configure(const char* config_sources = NULL);
-    NPT_String*                   GetConfigValue(const char* prefix, const char* suffix);
-    NPT_List<NPT_Logger*>&        GetLoggers() { return m_Loggers; }
-    NPT_List<NPT_LogConfigEntry>& GetConfig()  { return m_Config;  }
-    void                          SetEnabled(bool enabled) { m_Enabled = enabled; }
-    bool                          IsEnabled()              { return m_Enabled;    }
-    void                          Lock();
-    void                          Unlock();
-
-private:
-    // methods
-    NPT_Result  SetConfigValue(const char* key, const char* value);
-    NPT_Result  ParseConfig(const char* config, NPT_Size config_size);
-    NPT_Result  ParseConfigSource(NPT_String& source);
-    NPT_Result  ParseConfigFile(const char* filename);
-    bool        HaveLoggerConfig(const char* name);
-    NPT_Logger* FindLogger(const char* name);
-    NPT_Result  ConfigureLogger(NPT_Logger* logger);
-
-    // members
-    NPT_Mutex                    m_Lock;
-    NPT_Thread::ThreadId         m_LockOwner;
-    bool                         m_Enabled;
-    bool                         m_Configured;
-    NPT_List<NPT_LogConfigEntry> m_Config;
-    NPT_List<NPT_Logger*>        m_Loggers;
-    NPT_Logger*                  m_Root;
-};
-
-const unsigned short NPT_HTTP_LOGGER_CONFIGURATOR_DEFAULT_PORT = 6378;
-class NPT_HttpLoggerConfigurator : NPT_HttpRequestHandler, public NPT_Thread {
-public:
-    // constructor and destructor
-    NPT_HttpLoggerConfigurator(NPT_UInt16 port = NPT_HTTP_LOGGER_CONFIGURATOR_DEFAULT_PORT,
-                               bool       detached = true);
-    virtual ~NPT_HttpLoggerConfigurator();
-
-    // NPT_Runnable (NPT_Thread) methods
-    virtual void Run();
-
-private:
-    // NPT_HttpRequestHandler methods
-    virtual NPT_Result SetupResponse(NPT_HttpRequest&              request,
-                                     const NPT_HttpRequestContext& context,
-                                     NPT_HttpResponse&             response);
-
-    // members
-    NPT_HttpServer* m_Server;
-};
-
-NPT_Result NPT_GetSystemLogConfig(NPT_String& config);
-
-/*----------------------------------------------------------------------
-|   constants
-+---------------------------------------------------------------------*/
-#define NPT_LOG_LEVEL_FATAL   700
-#define NPT_LOG_LEVEL_SEVERE  600 
-#define NPT_LOG_LEVEL_WARNING 500
-#define NPT_LOG_LEVEL_INFO    400
-#define NPT_LOG_LEVEL_FINE    300
-#define NPT_LOG_LEVEL_FINER   200
-#define NPT_LOG_LEVEL_FINEST  100 
-
-#define NPT_LOG_LEVEL_OFF     32767
-#define NPT_LOG_LEVEL_ALL     0
-
-/*----------------------------------------------------------------------
-|   macros
-+---------------------------------------------------------------------*/
-#define NPT_LOG_GET_LOGGER(_logger)                                   \
-    if ((_logger).logger == NULL) {                                   \
-        (_logger).logger = NPT_LogManager::GetLogger((_logger).name); \
-    }
-
-#if defined(NPT_CONFIG_ENABLE_LOGGING)
-//TODO: volatile makes tons of errors for me
-//#define NPT_DEFINE_LOGGER(_logger, _name) static volatile NPT_LoggerReference _logger = { NULL, (_name) };
-#define NPT_DEFINE_LOGGER(_logger, _name) static NPT_LoggerReference _logger = { NULL, (_name) };
-
-#define NPT_LOG_X(_logger, _level, _argsx)                              \
-do {                                                                    \
-    NPT_LOG_GET_LOGGER((_logger))                                       \
-    if ((_logger).logger && (_level) >= (_logger).logger->GetLevel()) { \
-        (_logger).logger->Log _argsx;                                   \
-    }                                                                   \
-} while(0)
-
-#define NPT_CHECK_LL(_logger, _level, _result) do {                                    \
-    NPT_Result _x = (_result);                                                         \
-    if (_x != NPT_SUCCESS) {                                                           \
-        NPT_LOG_X((_logger),(_level),((_level),__FILE__,__LINE__,(NPT_LocalFunctionName),"NPT_CHECK failed, result=%d (%s) [%s]", _x, NPT_ResultText(_x), #_result)); \
-        return _x;                                                                     \
-    }                                                                                  \
-} while(0)
-
-#define NPT_CHECK_LABEL_LL(_logger, _level, _result, _label) do {                      \
-    NPT_Result _x = (_result);                                                         \
-    if (_x != NPT_SUCCESS) {                                                           \
-        NPT_LOG_X((_logger),(_level),((_level),__FILE__,__LINE__,(NPT_LocalFunctionName),"NPT_CHECK failed, result=%d (%s) [%s]", _x, NPT_ResultText(_x), #_result)); \
-        goto _label;                                                                   \
-    }                                                                                  \
-} while(0)
-#define NPT_CHECK_POINTER_LL(_logger, _level, _p) do {                                 \
-    if ((_p) == NULL) {                                                                  \
-        NPT_LOG_X((_logger),(_level),((_level),__FILE__,__LINE__,(NPT_LocalFunctionName),"@@@ NULL pointer parameter"));                     \
-        return NPT_ERROR_INVALID_PARAMETERS;                                                     \
-    }                                                                                  \
-} while(0)
-#define NPT_CHECK_POINTER_LABEL_LL(_logger, _level, _p, _label) do {                   \
-    if ((_p) == NULL) {                                                                  \
-        NPT_LOG_X((_logger),(_level),((_level),__FILE__,__LINE__,(NPT_LocalFunctionName),"@@@ NULL pointer parameter"));                     \
-        goto _label;                                                                   \
-    }                                                                                  \
-} while(0)
-
-#else /* NPT_CONFIG_ENABLE_LOGGING */
-
-#define NPT_DEFINE_LOGGER(_logger, _name)
-#define NPT_LOG_X(_logger, _level, _argsx)
-#define NPT_CHECK_LL(_logger, _level, _result) NPT_CHECK(_result)
-#define NPT_CHECK_LABEL_LL(_logger, _level, _result, _label) NPT_CHECK_LABEL((_result), _label)
-#define NPT_CHECK_POINTER_LL(_logger, _level, _p) NPT_CHECK_POINTER((_p))
-#define NPT_CHECK_POINTER_LABEL_LL(_logger, _level, _p, _label) NPT_CHECK_POINTER_LABEL((_p), _label)
-
-#endif /* NPT_CONFIG_ENABLE_LOGGING */
-
-#define NPT_SET_LOCAL_LOGGER(_name) NPT_DEFINE_LOGGER(_NPT_LocalLogger, (_name))
-#define NPT_CHECK_L(_level, _result) NPT_CHECK_LL(_NPT_LocalLogger, (_level), (_result))
-#define NPT_CHECK_LABEL_L(_level, _result, _label) NPT_CHECK_LABEL_LL(_NPT_LocalLogger, (_level), NULL, (_result), _label)
-
-/* NOTE: the following are machine-generated, do not edit */
-#define NPT_LOG_LL(_logger,_level,_msg) NPT_LOG_X((_logger),(_level),((_level),__FILE__,__LINE__,(NPT_LocalFunctionName),(_msg)))
-#define NPT_LOG(_level,_msg) NPT_LOG_LL((_NPT_LocalLogger),(_level),(_msg))
-#define NPT_LOG_L(_logger,_level,_msg) NPT_LOG_LL((_logger),(_level),(_msg))
-#define NPT_LOG_LL1(_logger,_level,_msg,_arg1) NPT_LOG_X((_logger),(_level),((_level),__FILE__,__LINE__,(NPT_LocalFunctionName),(_msg),(_arg1)))
-#define NPT_LOG_1(_level,_msg,_arg1) NPT_LOG_LL1((_NPT_LocalLogger),(_level),(_msg),(_arg1))
-#define NPT_LOG_L1(_logger,_level,_msg,_arg1) NPT_LOG_LL1((_logger),(_level),(_msg),(_arg1))
-#define NPT_LOG_LL2(_logger,_level,_msg,_arg1,_arg2) NPT_LOG_X((_logger),(_level),((_level),__FILE__,__LINE__,(NPT_LocalFunctionName),(_msg),(_arg1),(_arg2)))
-#define NPT_LOG_2(_level,_msg,_arg1,_arg2) NPT_LOG_LL2((_NPT_LocalLogger),(_level),(_msg),(_arg1),(_arg2))
-#define NPT_LOG_L2(_logger,_level,_msg,_arg1,_arg2) NPT_LOG_LL2((_logger),(_level),(_msg),(_arg1),(_arg2))
-#define NPT_LOG_LL3(_logger,_level,_msg,_arg1,_arg2,_arg3) NPT_LOG_X((_logger),(_level),((_level),__FILE__,__LINE__,(NPT_LocalFunctionName),(_msg),(_arg1),(_arg2),(_arg3)))
-#define NPT_LOG_3(_level,_msg,_arg1,_arg2,_arg3) NPT_LOG_LL3((_NPT_LocalLogger),(_level),(_msg),(_arg1),(_arg2),(_arg3))
-#define NPT_LOG_L3(_logger,_level,_msg,_arg1,_arg2,_arg3) NPT_LOG_LL3((_logger),(_level),(_msg),(_arg1),(_arg2),(_arg3))
-#define NPT_LOG_LL4(_logger,_level,_msg,_arg1,_arg2,_arg3,_arg4) NPT_LOG_X((_logger),(_level),((_level),__FILE__,__LINE__,(NPT_LocalFunctionName),(_msg),(_arg1),(_arg2),(_arg3),(_arg4)))
-#define NPT_LOG_4(_level,_msg,_arg1,_arg2,_arg3,_arg4) NPT_LOG_LL4((_NPT_LocalLogger),(_level),(_msg),(_arg1),(_arg2),(_arg3),(_arg4))
-#define NPT_LOG_L4(_logger,_level,_msg,_arg1,_arg2,_arg3,_arg4) NPT_LOG_LL4((_logger),(_level),(_msg),(_arg1),(_arg2),(_arg3),(_arg4))
-#define NPT_LOG_LL5(_logger,_level,_msg,_arg1,_arg2,_arg3,_arg4,_arg5) NPT_LOG_X((_logger),(_level),((_level),__FILE__,__LINE__,(NPT_LocalFunctionName),(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5)))
-#define NPT_LOG_5(_level,_msg,_arg1,_arg2,_arg3,_arg4,_arg5) NPT_LOG_LL5((_NPT_LocalLogger),(_level),(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5))
-#define NPT_LOG_L5(_logger,_level,_msg,_arg1,_arg2,_arg3,_arg4,_arg5) NPT_LOG_LL5((_logger),(_level),(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5))
-#define NPT_LOG_LL6(_logger,_level,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6) NPT_LOG_X((_logger),(_level),((_level),__FILE__,__LINE__,(NPT_LocalFunctionName),(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6)))
-#define NPT_LOG_6(_level,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6) NPT_LOG_LL6((_NPT_LocalLogger),(_level),(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6))
-#define NPT_LOG_L6(_logger,_level,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6) NPT_LOG_LL6((_logger),(_level),(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6))
-#define NPT_LOG_LL7(_logger,_level,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7) NPT_LOG_X((_logger),(_level),((_level),__FILE__,__LINE__,(NPT_LocalFunctionName),(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7)))
-#define NPT_LOG_7(_level,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7) NPT_LOG_LL7((_NPT_LocalLogger),(_level),(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7))
-#define NPT_LOG_L7(_logger,_level,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7) NPT_LOG_LL7((_logger),(_level),(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7))
-#define NPT_LOG_LL8(_logger,_level,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8) NPT_LOG_X((_logger),(_level),((_level),__FILE__,__LINE__,(NPT_LocalFunctionName),(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8)))
-#define NPT_LOG_8(_level,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8) NPT_LOG_LL8((_NPT_LocalLogger),(_level),(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8))
-#define NPT_LOG_L8(_logger,_level,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8) NPT_LOG_LL8((_logger),(_level),(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8))
-#define NPT_LOG_LL9(_logger,_level,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9) NPT_LOG_X((_logger),(_level),((_level),__FILE__,__LINE__,(NPT_LocalFunctionName),(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8),(_arg9)))
-#define NPT_LOG_9(_level,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9) NPT_LOG_LL9((_NPT_LocalLogger),(_level),(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8),(_arg9))
-#define NPT_LOG_L9(_logger,_level,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9) NPT_LOG_LL9((_logger),(_level),(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8),(_arg9))
-
-#define NPT_LOG_FATAL(_msg) NPT_LOG_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_FATAL,(_msg))
-#define NPT_LOG_FATAL_L(_logger,_msg) NPT_LOG_LL((_logger),NPT_LOG_LEVEL_FATAL,(_msg))
-#define NPT_LOG_FATAL_1(_msg,_arg1) NPT_LOG_LL1((_NPT_LocalLogger),NPT_LOG_LEVEL_FATAL,(_msg),(_arg1))
-#define NPT_LOG_FATAL_L1(_logger,_msg,_arg1) NPT_LOG_LL1((_logger),NPT_LOG_LEVEL_FATAL,(_msg),(_arg1))
-#define NPT_LOG_FATAL_2(_msg,_arg1,_arg2) NPT_LOG_LL2((_NPT_LocalLogger),NPT_LOG_LEVEL_FATAL,(_msg),(_arg1),(_arg2))
-#define NPT_LOG_FATAL_L2(_logger,_msg,_arg1,_arg2) NPT_LOG_LL2((_logger),NPT_LOG_LEVEL_FATAL,(_msg),(_arg1),(_arg2))
-#define NPT_LOG_FATAL_3(_msg,_arg1,_arg2,_arg3) NPT_LOG_LL3((_NPT_LocalLogger),NPT_LOG_LEVEL_FATAL,(_msg),(_arg1),(_arg2),(_arg3))
-#define NPT_LOG_FATAL_L3(_logger,_msg,_arg1,_arg2,_arg3) NPT_LOG_LL3((_logger),NPT_LOG_LEVEL_FATAL,(_msg),(_arg1),(_arg2),(_arg3))
-#define NPT_LOG_FATAL_4(_msg,_arg1,_arg2,_arg3,_arg4) NPT_LOG_LL4((_NPT_LocalLogger),NPT_LOG_LEVEL_FATAL,(_msg),(_arg1),(_arg2),(_arg3),(_arg4))
-#define NPT_LOG_FATAL_L4(_logger,_msg,_arg1,_arg2,_arg3,_arg4) NPT_LOG_LL4((_logger),NPT_LOG_LEVEL_FATAL,(_msg),(_arg1),(_arg2),(_arg3),(_arg4))
-#define NPT_LOG_FATAL_5(_msg,_arg1,_arg2,_arg3,_arg4,_arg5) NPT_LOG_LL5((_NPT_LocalLogger),NPT_LOG_LEVEL_FATAL,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5))
-#define NPT_LOG_FATAL_L5(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5) NPT_LOG_LL5((_logger),NPT_LOG_LEVEL_FATAL,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5))
-#define NPT_LOG_FATAL_6(_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6) NPT_LOG_LL6((_NPT_LocalLogger),NPT_LOG_LEVEL_FATAL,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6))
-#define NPT_LOG_FATAL_L6(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6) NPT_LOG_LL6((_logger),NPT_LOG_LEVEL_FATAL,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6))
-#define NPT_LOG_FATAL_7(_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7) NPT_LOG_LL7((_NPT_LocalLogger),NPT_LOG_LEVEL_FATAL,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7))
-#define NPT_LOG_FATAL_L7(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7) NPT_LOG_LL7((_logger),NPT_LOG_LEVEL_FATAL,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7))
-#define NPT_LOG_FATAL_8(_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8) NPT_LOG_LL8((_NPT_LocalLogger),NPT_LOG_LEVEL_FATAL,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8))
-#define NPT_LOG_FATAL_L8(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8) NPT_LOG_LL8((_logger),NPT_LOG_LEVEL_FATAL,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8))
-#define NPT_LOG_FATAL_9(_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9) NPT_LOG_LL9((_NPT_LocalLogger),NPT_LOG_LEVEL_FATAL,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8),(_arg9))
-#define NPT_LOG_FATAL_L9(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9) NPT_LOG_LL9((_logger),NPT_LOG_LEVEL_FATAL,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8),(_arg9))
-#define NPT_LOG_SEVERE(_msg) NPT_LOG_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_SEVERE,(_msg))
-#define NPT_LOG_SEVERE_L(_logger,_msg) NPT_LOG_LL((_logger),NPT_LOG_LEVEL_SEVERE,(_msg))
-#define NPT_LOG_SEVERE_1(_msg,_arg1) NPT_LOG_LL1((_NPT_LocalLogger),NPT_LOG_LEVEL_SEVERE,(_msg),(_arg1))
-#define NPT_LOG_SEVERE_L1(_logger,_msg,_arg1) NPT_LOG_LL1((_logger),NPT_LOG_LEVEL_SEVERE,(_msg),(_arg1))
-#define NPT_LOG_SEVERE_2(_msg,_arg1,_arg2) NPT_LOG_LL2((_NPT_LocalLogger),NPT_LOG_LEVEL_SEVERE,(_msg),(_arg1),(_arg2))
-#define NPT_LOG_SEVERE_L2(_logger,_msg,_arg1,_arg2) NPT_LOG_LL2((_logger),NPT_LOG_LEVEL_SEVERE,(_msg),(_arg1),(_arg2))
-#define NPT_LOG_SEVERE_3(_msg,_arg1,_arg2,_arg3) NPT_LOG_LL3((_NPT_LocalLogger),NPT_LOG_LEVEL_SEVERE,(_msg),(_arg1),(_arg2),(_arg3))
-#define NPT_LOG_SEVERE_L3(_logger,_msg,_arg1,_arg2,_arg3) NPT_LOG_LL3((_logger),NPT_LOG_LEVEL_SEVERE,(_msg),(_arg1),(_arg2),(_arg3))
-#define NPT_LOG_SEVERE_4(_msg,_arg1,_arg2,_arg3,_arg4) NPT_LOG_LL4((_NPT_LocalLogger),NPT_LOG_LEVEL_SEVERE,(_msg),(_arg1),(_arg2),(_arg3),(_arg4))
-#define NPT_LOG_SEVERE_L4(_logger,_msg,_arg1,_arg2,_arg3,_arg4) NPT_LOG_LL4((_logger),NPT_LOG_LEVEL_SEVERE,(_msg),(_arg1),(_arg2),(_arg3),(_arg4))
-#define NPT_LOG_SEVERE_5(_msg,_arg1,_arg2,_arg3,_arg4,_arg5) NPT_LOG_LL5((_NPT_LocalLogger),NPT_LOG_LEVEL_SEVERE,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5))
-#define NPT_LOG_SEVERE_L5(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5) NPT_LOG_LL5((_logger),NPT_LOG_LEVEL_SEVERE,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5))
-#define NPT_LOG_SEVERE_6(_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6) NPT_LOG_LL6((_NPT_LocalLogger),NPT_LOG_LEVEL_SEVERE,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6))
-#define NPT_LOG_SEVERE_L6(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6) NPT_LOG_LL6((_logger),NPT_LOG_LEVEL_SEVERE,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6))
-#define NPT_LOG_SEVERE_7(_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7) NPT_LOG_LL7((_NPT_LocalLogger),NPT_LOG_LEVEL_SEVERE,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7))
-#define NPT_LOG_SEVERE_L7(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7) NPT_LOG_LL7((_logger),NPT_LOG_LEVEL_SEVERE,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7))
-#define NPT_LOG_SEVERE_8(_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8) NPT_LOG_LL8((_NPT_LocalLogger),NPT_LOG_LEVEL_SEVERE,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8))
-#define NPT_LOG_SEVERE_L8(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8) NPT_LOG_LL8((_logger),NPT_LOG_LEVEL_SEVERE,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8))
-#define NPT_LOG_SEVERE_9(_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9) NPT_LOG_LL9((_NPT_LocalLogger),NPT_LOG_LEVEL_SEVERE,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8),(_arg9))
-#define NPT_LOG_SEVERE_L9(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9) NPT_LOG_LL9((_logger),NPT_LOG_LEVEL_SEVERE,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8),(_arg9))
-#define NPT_LOG_WARNING(_msg) NPT_LOG_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_WARNING,(_msg))
-#define NPT_LOG_WARNING_L(_logger,_msg) NPT_LOG_LL((_logger),NPT_LOG_LEVEL_WARNING,(_msg))
-#define NPT_LOG_WARNING_1(_msg,_arg1) NPT_LOG_LL1((_NPT_LocalLogger),NPT_LOG_LEVEL_WARNING,(_msg),(_arg1))
-#define NPT_LOG_WARNING_L1(_logger,_msg,_arg1) NPT_LOG_LL1((_logger),NPT_LOG_LEVEL_WARNING,(_msg),(_arg1))
-#define NPT_LOG_WARNING_2(_msg,_arg1,_arg2) NPT_LOG_LL2((_NPT_LocalLogger),NPT_LOG_LEVEL_WARNING,(_msg),(_arg1),(_arg2))
-#define NPT_LOG_WARNING_L2(_logger,_msg,_arg1,_arg2) NPT_LOG_LL2((_logger),NPT_LOG_LEVEL_WARNING,(_msg),(_arg1),(_arg2))
-#define NPT_LOG_WARNING_3(_msg,_arg1,_arg2,_arg3) NPT_LOG_LL3((_NPT_LocalLogger),NPT_LOG_LEVEL_WARNING,(_msg),(_arg1),(_arg2),(_arg3))
-#define NPT_LOG_WARNING_L3(_logger,_msg,_arg1,_arg2,_arg3) NPT_LOG_LL3((_logger),NPT_LOG_LEVEL_WARNING,(_msg),(_arg1),(_arg2),(_arg3))
-#define NPT_LOG_WARNING_4(_msg,_arg1,_arg2,_arg3,_arg4) NPT_LOG_LL4((_NPT_LocalLogger),NPT_LOG_LEVEL_WARNING,(_msg),(_arg1),(_arg2),(_arg3),(_arg4))
-#define NPT_LOG_WARNING_L4(_logger,_msg,_arg1,_arg2,_arg3,_arg4) NPT_LOG_LL4((_logger),NPT_LOG_LEVEL_WARNING,(_msg),(_arg1),(_arg2),(_arg3),(_arg4))
-#define NPT_LOG_WARNING_5(_msg,_arg1,_arg2,_arg3,_arg4,_arg5) NPT_LOG_LL5((_NPT_LocalLogger),NPT_LOG_LEVEL_WARNING,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5))
-#define NPT_LOG_WARNING_L5(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5) NPT_LOG_LL5((_logger),NPT_LOG_LEVEL_WARNING,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5))
-#define NPT_LOG_WARNING_6(_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6) NPT_LOG_LL6((_NPT_LocalLogger),NPT_LOG_LEVEL_WARNING,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6))
-#define NPT_LOG_WARNING_L6(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6) NPT_LOG_LL6((_logger),NPT_LOG_LEVEL_WARNING,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6))
-#define NPT_LOG_WARNING_7(_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7) NPT_LOG_LL7((_NPT_LocalLogger),NPT_LOG_LEVEL_WARNING,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7))
-#define NPT_LOG_WARNING_L7(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7) NPT_LOG_LL7((_logger),NPT_LOG_LEVEL_WARNING,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7))
-#define NPT_LOG_WARNING_8(_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8) NPT_LOG_LL8((_NPT_LocalLogger),NPT_LOG_LEVEL_WARNING,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8))
-#define NPT_LOG_WARNING_L8(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8) NPT_LOG_LL8((_logger),NPT_LOG_LEVEL_WARNING,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8))
-#define NPT_LOG_WARNING_9(_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9) NPT_LOG_LL9((_NPT_LocalLogger),NPT_LOG_LEVEL_WARNING,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8),(_arg9))
-#define NPT_LOG_WARNING_L9(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9) NPT_LOG_LL9((_logger),NPT_LOG_LEVEL_WARNING,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8),(_arg9))
-#define NPT_LOG_INFO(_msg) NPT_LOG_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_INFO,(_msg))
-#define NPT_LOG_INFO_L(_logger,_msg) NPT_LOG_LL((_logger),NPT_LOG_LEVEL_INFO,(_msg))
-#define NPT_LOG_INFO_1(_msg,_arg1) NPT_LOG_LL1((_NPT_LocalLogger),NPT_LOG_LEVEL_INFO,(_msg),(_arg1))
-#define NPT_LOG_INFO_L1(_logger,_msg,_arg1) NPT_LOG_LL1((_logger),NPT_LOG_LEVEL_INFO,(_msg),(_arg1))
-#define NPT_LOG_INFO_2(_msg,_arg1,_arg2) NPT_LOG_LL2((_NPT_LocalLogger),NPT_LOG_LEVEL_INFO,(_msg),(_arg1),(_arg2))
-#define NPT_LOG_INFO_L2(_logger,_msg,_arg1,_arg2) NPT_LOG_LL2((_logger),NPT_LOG_LEVEL_INFO,(_msg),(_arg1),(_arg2))
-#define NPT_LOG_INFO_3(_msg,_arg1,_arg2,_arg3) NPT_LOG_LL3((_NPT_LocalLogger),NPT_LOG_LEVEL_INFO,(_msg),(_arg1),(_arg2),(_arg3))
-#define NPT_LOG_INFO_L3(_logger,_msg,_arg1,_arg2,_arg3) NPT_LOG_LL3((_logger),NPT_LOG_LEVEL_INFO,(_msg),(_arg1),(_arg2),(_arg3))
-#define NPT_LOG_INFO_4(_msg,_arg1,_arg2,_arg3,_arg4) NPT_LOG_LL4((_NPT_LocalLogger),NPT_LOG_LEVEL_INFO,(_msg),(_arg1),(_arg2),(_arg3),(_arg4))
-#define NPT_LOG_INFO_L4(_logger,_msg,_arg1,_arg2,_arg3,_arg4) NPT_LOG_LL4((_logger),NPT_LOG_LEVEL_INFO,(_msg),(_arg1),(_arg2),(_arg3),(_arg4))
-#define NPT_LOG_INFO_5(_msg,_arg1,_arg2,_arg3,_arg4,_arg5) NPT_LOG_LL5((_NPT_LocalLogger),NPT_LOG_LEVEL_INFO,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5))
-#define NPT_LOG_INFO_L5(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5) NPT_LOG_LL5((_logger),NPT_LOG_LEVEL_INFO,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5))
-#define NPT_LOG_INFO_6(_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6) NPT_LOG_LL6((_NPT_LocalLogger),NPT_LOG_LEVEL_INFO,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6))
-#define NPT_LOG_INFO_L6(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6) NPT_LOG_LL6((_logger),NPT_LOG_LEVEL_INFO,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6))
-#define NPT_LOG_INFO_7(_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7) NPT_LOG_LL7((_NPT_LocalLogger),NPT_LOG_LEVEL_INFO,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7))
-#define NPT_LOG_INFO_L7(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7) NPT_LOG_LL7((_logger),NPT_LOG_LEVEL_INFO,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7))
-#define NPT_LOG_INFO_8(_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8) NPT_LOG_LL8((_NPT_LocalLogger),NPT_LOG_LEVEL_INFO,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8))
-#define NPT_LOG_INFO_L8(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8) NPT_LOG_LL8((_logger),NPT_LOG_LEVEL_INFO,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8))
-#define NPT_LOG_INFO_9(_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9) NPT_LOG_LL9((_NPT_LocalLogger),NPT_LOG_LEVEL_INFO,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8),(_arg9))
-#define NPT_LOG_INFO_L9(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9) NPT_LOG_LL9((_logger),NPT_LOG_LEVEL_INFO,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8),(_arg9))
-#define NPT_LOG_FINE(_msg) NPT_LOG_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_FINE,(_msg))
-#define NPT_LOG_FINE_L(_logger,_msg) NPT_LOG_LL((_logger),NPT_LOG_LEVEL_FINE,(_msg))
-#define NPT_LOG_FINE_1(_msg,_arg1) NPT_LOG_LL1((_NPT_LocalLogger),NPT_LOG_LEVEL_FINE,(_msg),(_arg1))
-#define NPT_LOG_FINE_L1(_logger,_msg,_arg1) NPT_LOG_LL1((_logger),NPT_LOG_LEVEL_FINE,(_msg),(_arg1))
-#define NPT_LOG_FINE_2(_msg,_arg1,_arg2) NPT_LOG_LL2((_NPT_LocalLogger),NPT_LOG_LEVEL_FINE,(_msg),(_arg1),(_arg2))
-#define NPT_LOG_FINE_L2(_logger,_msg,_arg1,_arg2) NPT_LOG_LL2((_logger),NPT_LOG_LEVEL_FINE,(_msg),(_arg1),(_arg2))
-#define NPT_LOG_FINE_3(_msg,_arg1,_arg2,_arg3) NPT_LOG_LL3((_NPT_LocalLogger),NPT_LOG_LEVEL_FINE,(_msg),(_arg1),(_arg2),(_arg3))
-#define NPT_LOG_FINE_L3(_logger,_msg,_arg1,_arg2,_arg3) NPT_LOG_LL3((_logger),NPT_LOG_LEVEL_FINE,(_msg),(_arg1),(_arg2),(_arg3))
-#define NPT_LOG_FINE_4(_msg,_arg1,_arg2,_arg3,_arg4) NPT_LOG_LL4((_NPT_LocalLogger),NPT_LOG_LEVEL_FINE,(_msg),(_arg1),(_arg2),(_arg3),(_arg4))
-#define NPT_LOG_FINE_L4(_logger,_msg,_arg1,_arg2,_arg3,_arg4) NPT_LOG_LL4((_logger),NPT_LOG_LEVEL_FINE,(_msg),(_arg1),(_arg2),(_arg3),(_arg4))
-#define NPT_LOG_FINE_5(_msg,_arg1,_arg2,_arg3,_arg4,_arg5) NPT_LOG_LL5((_NPT_LocalLogger),NPT_LOG_LEVEL_FINE,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5))
-#define NPT_LOG_FINE_L5(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5) NPT_LOG_LL5((_logger),NPT_LOG_LEVEL_FINE,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5))
-#define NPT_LOG_FINE_6(_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6) NPT_LOG_LL6((_NPT_LocalLogger),NPT_LOG_LEVEL_FINE,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6))
-#define NPT_LOG_FINE_L6(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6) NPT_LOG_LL6((_logger),NPT_LOG_LEVEL_FINE,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6))
-#define NPT_LOG_FINE_7(_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7) NPT_LOG_LL7((_NPT_LocalLogger),NPT_LOG_LEVEL_FINE,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7))
-#define NPT_LOG_FINE_L7(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7) NPT_LOG_LL7((_logger),NPT_LOG_LEVEL_FINE,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7))
-#define NPT_LOG_FINE_8(_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8) NPT_LOG_LL8((_NPT_LocalLogger),NPT_LOG_LEVEL_FINE,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8))
-#define NPT_LOG_FINE_L8(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8) NPT_LOG_LL8((_logger),NPT_LOG_LEVEL_FINE,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8))
-#define NPT_LOG_FINE_9(_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9) NPT_LOG_LL9((_NPT_LocalLogger),NPT_LOG_LEVEL_FINE,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8),(_arg9))
-#define NPT_LOG_FINE_L9(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9) NPT_LOG_LL9((_logger),NPT_LOG_LEVEL_FINE,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8),(_arg9))
-#define NPT_LOG_FINER(_msg) NPT_LOG_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_FINER,(_msg))
-#define NPT_LOG_FINER_L(_logger,_msg) NPT_LOG_LL((_logger),NPT_LOG_LEVEL_FINER,(_msg))
-#define NPT_LOG_FINER_1(_msg,_arg1) NPT_LOG_LL1((_NPT_LocalLogger),NPT_LOG_LEVEL_FINER,(_msg),(_arg1))
-#define NPT_LOG_FINER_L1(_logger,_msg,_arg1) NPT_LOG_LL1((_logger),NPT_LOG_LEVEL_FINER,(_msg),(_arg1))
-#define NPT_LOG_FINER_2(_msg,_arg1,_arg2) NPT_LOG_LL2((_NPT_LocalLogger),NPT_LOG_LEVEL_FINER,(_msg),(_arg1),(_arg2))
-#define NPT_LOG_FINER_L2(_logger,_msg,_arg1,_arg2) NPT_LOG_LL2((_logger),NPT_LOG_LEVEL_FINER,(_msg),(_arg1),(_arg2))
-#define NPT_LOG_FINER_3(_msg,_arg1,_arg2,_arg3) NPT_LOG_LL3((_NPT_LocalLogger),NPT_LOG_LEVEL_FINER,(_msg),(_arg1),(_arg2),(_arg3))
-#define NPT_LOG_FINER_L3(_logger,_msg,_arg1,_arg2,_arg3) NPT_LOG_LL3((_logger),NPT_LOG_LEVEL_FINER,(_msg),(_arg1),(_arg2),(_arg3))
-#define NPT_LOG_FINER_4(_msg,_arg1,_arg2,_arg3,_arg4) NPT_LOG_LL4((_NPT_LocalLogger),NPT_LOG_LEVEL_FINER,(_msg),(_arg1),(_arg2),(_arg3),(_arg4))
-#define NPT_LOG_FINER_L4(_logger,_msg,_arg1,_arg2,_arg3,_arg4) NPT_LOG_LL4((_logger),NPT_LOG_LEVEL_FINER,(_msg),(_arg1),(_arg2),(_arg3),(_arg4))
-#define NPT_LOG_FINER_5(_msg,_arg1,_arg2,_arg3,_arg4,_arg5) NPT_LOG_LL5((_NPT_LocalLogger),NPT_LOG_LEVEL_FINER,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5))
-#define NPT_LOG_FINER_L5(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5) NPT_LOG_LL5((_logger),NPT_LOG_LEVEL_FINER,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5))
-#define NPT_LOG_FINER_6(_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6) NPT_LOG_LL6((_NPT_LocalLogger),NPT_LOG_LEVEL_FINER,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6))
-#define NPT_LOG_FINER_L6(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6) NPT_LOG_LL6((_logger),NPT_LOG_LEVEL_FINER,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6))
-#define NPT_LOG_FINER_7(_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7) NPT_LOG_LL7((_NPT_LocalLogger),NPT_LOG_LEVEL_FINER,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7))
-#define NPT_LOG_FINER_L7(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7) NPT_LOG_LL7((_logger),NPT_LOG_LEVEL_FINER,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7))
-#define NPT_LOG_FINER_8(_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8) NPT_LOG_LL8((_NPT_LocalLogger),NPT_LOG_LEVEL_FINER,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8))
-#define NPT_LOG_FINER_L8(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8) NPT_LOG_LL8((_logger),NPT_LOG_LEVEL_FINER,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8))
-#define NPT_LOG_FINER_9(_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9) NPT_LOG_LL9((_NPT_LocalLogger),NPT_LOG_LEVEL_FINER,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8),(_arg9))
-#define NPT_LOG_FINER_L9(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9) NPT_LOG_LL9((_logger),NPT_LOG_LEVEL_FINER,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8),(_arg9))
-#define NPT_LOG_FINEST(_msg) NPT_LOG_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_FINEST,(_msg))
-#define NPT_LOG_FINEST_L(_logger,_msg) NPT_LOG_LL((_logger),NPT_LOG_LEVEL_FINEST,(_msg))
-#define NPT_LOG_FINEST_1(_msg,_arg1) NPT_LOG_LL1((_NPT_LocalLogger),NPT_LOG_LEVEL_FINEST,(_msg),(_arg1))
-#define NPT_LOG_FINEST_L1(_logger,_msg,_arg1) NPT_LOG_LL1((_logger),NPT_LOG_LEVEL_FINEST,(_msg),(_arg1))
-#define NPT_LOG_FINEST_2(_msg,_arg1,_arg2) NPT_LOG_LL2((_NPT_LocalLogger),NPT_LOG_LEVEL_FINEST,(_msg),(_arg1),(_arg2))
-#define NPT_LOG_FINEST_L2(_logger,_msg,_arg1,_arg2) NPT_LOG_LL2((_logger),NPT_LOG_LEVEL_FINEST,(_msg),(_arg1),(_arg2))
-#define NPT_LOG_FINEST_3(_msg,_arg1,_arg2,_arg3) NPT_LOG_LL3((_NPT_LocalLogger),NPT_LOG_LEVEL_FINEST,(_msg),(_arg1),(_arg2),(_arg3))
-#define NPT_LOG_FINEST_L3(_logger,_msg,_arg1,_arg2,_arg3) NPT_LOG_LL3((_logger),NPT_LOG_LEVEL_FINEST,(_msg),(_arg1),(_arg2),(_arg3))
-#define NPT_LOG_FINEST_4(_msg,_arg1,_arg2,_arg3,_arg4) NPT_LOG_LL4((_NPT_LocalLogger),NPT_LOG_LEVEL_FINEST,(_msg),(_arg1),(_arg2),(_arg3),(_arg4))
-#define NPT_LOG_FINEST_L4(_logger,_msg,_arg1,_arg2,_arg3,_arg4) NPT_LOG_LL4((_logger),NPT_LOG_LEVEL_FINEST,(_msg),(_arg1),(_arg2),(_arg3),(_arg4))
-#define NPT_LOG_FINEST_5(_msg,_arg1,_arg2,_arg3,_arg4,_arg5) NPT_LOG_LL5((_NPT_LocalLogger),NPT_LOG_LEVEL_FINEST,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5))
-#define NPT_LOG_FINEST_L5(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5) NPT_LOG_LL5((_logger),NPT_LOG_LEVEL_FINEST,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5))
-#define NPT_LOG_FINEST_6(_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6) NPT_LOG_LL6((_NPT_LocalLogger),NPT_LOG_LEVEL_FINEST,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6))
-#define NPT_LOG_FINEST_L6(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6) NPT_LOG_LL6((_logger),NPT_LOG_LEVEL_FINEST,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6))
-#define NPT_LOG_FINEST_7(_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7) NPT_LOG_LL7((_NPT_LocalLogger),NPT_LOG_LEVEL_FINEST,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7))
-#define NPT_LOG_FINEST_L7(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7) NPT_LOG_LL7((_logger),NPT_LOG_LEVEL_FINEST,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7))
-#define NPT_LOG_FINEST_8(_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8) NPT_LOG_LL8((_NPT_LocalLogger),NPT_LOG_LEVEL_FINEST,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8))
-#define NPT_LOG_FINEST_L8(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8) NPT_LOG_LL8((_logger),NPT_LOG_LEVEL_FINEST,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8))
-#define NPT_LOG_FINEST_9(_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9) NPT_LOG_LL9((_NPT_LocalLogger),NPT_LOG_LEVEL_FINEST,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8),(_arg9))
-#define NPT_LOG_FINEST_L9(_logger,_msg,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9) NPT_LOG_LL9((_logger),NPT_LOG_LEVEL_FINEST,(_msg),(_arg1),(_arg2),(_arg3),(_arg4),(_arg5),(_arg6),(_arg7),(_arg8),(_arg9))
-
-#define NPT_CHECK_FATAL(_result) NPT_CHECK_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_FATAL,(_result))
-#define NPT_CHECK_FATAL_L(_logger,_result) NPT_CHECK_LL((_logger),NPT_LOG_LEVEL_FATAL,(_result))
-#define NPT_CHECK_SEVERE(_result) NPT_CHECK_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_SEVERE,(_result))
-#define NPT_CHECK_SEVERE_L(_logger,_result) NPT_CHECK_LL((_logger),NPT_LOG_LEVEL_SEVERE,(_result))
-#define NPT_CHECK_WARNING(_result) NPT_CHECK_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_WARNING,(_result))
-#define NPT_CHECK_WARNING_L(_logger,_result) NPT_CHECK_LL((_logger),NPT_LOG_LEVEL_WARNING,(_result))
-#define NPT_CHECK_INFO(_result) NPT_CHECK_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_INFO,(_result))
-#define NPT_CHECK_INFO_L(_logger,_result) NPT_CHECK_LL((_logger),NPT_LOG_LEVEL_INFO,(_result))
-#define NPT_CHECK_FINE(_result) NPT_CHECK_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_FINE,(_result))
-#define NPT_CHECK_FINE_L(_logger,_result) NPT_CHECK_LL((_logger),NPT_LOG_LEVEL_FINE,(_result))
-#define NPT_CHECK_FINER(_result) NPT_CHECK_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_FINER,(_result))
-#define NPT_CHECK_FINER_L(_logger,_result) NPT_CHECK_LL((_logger),NPT_LOG_LEVEL_FINER,(_result))
-#define NPT_CHECK_FINEST(_result) NPT_CHECK_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_FINEST,(_result))
-#define NPT_CHECK_FINEST_L(_logger,_result) NPT_CHECK_LL((_logger),NPT_LOG_LEVEL_FINEST,(_result))
-
-#define NPT_CHECK_LABEL_FATAL(_result,_label) NPT_CHECK_LABEL_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_FATAL,(_result),_label)
-#define NPT_CHECK_LABEL_FATAL_L(_logger,_result,_label) NPT_CHECK_LABEL_LL((_logger),NPT_LOG_LEVEL_FATAL,(_result),_label)
-#define NPT_CHECK_LABEL_SEVERE(_result,_label) NPT_CHECK_LABEL_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_SEVERE,(_result),_label)
-#define NPT_CHECK_LABEL_SEVERE_L(_logger,_result,_label) NPT_CHECK_LABEL_LL((_logger),NPT_LOG_LEVEL_SEVERE,(_result),_label)
-#define NPT_CHECK_LABEL_WARNING(_result,_label) NPT_CHECK_LABEL_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_WARNING,(_result),_label)
-#define NPT_CHECK_LABEL_WARNING_L(_logger,_result,_label) NPT_CHECK_LABEL_LL((_logger),NPT_LOG_LEVEL_WARNING,(_result),_label)
-#define NPT_CHECK_LABEL_INFO(_result,_label) NPT_CHECK_LABEL_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_INFO,(_result),_label)
-#define NPT_CHECK_LABEL_INFO_L(_logger,_result,_label) NPT_CHECK_LABEL_LL((_logger),NPT_LOG_LEVEL_INFO,(_result),_label)
-#define NPT_CHECK_LABEL_FINE(_result,_label) NPT_CHECK_LABEL_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_FINE,(_result),_label)
-#define NPT_CHECK_LABEL_FINE_L(_logger,_result,_label) NPT_CHECK_LABEL_LL((_logger),NPT_LOG_LEVEL_FINE,(_result),_label)
-#define NPT_CHECK_LABEL_FINER(_result,_label) NPT_CHECK_LABEL_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_FINER,(_result),_label)
-#define NPT_CHECK_LABEL_FINER_L(_logger,_result,_label) NPT_CHECK_LABEL_LL((_logger),NPT_LOG_LEVEL_FINER,(_result),_label)
-#define NPT_CHECK_LABEL_FINEST(_result,_label) NPT_CHECK_LABEL_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_FINEST,(_result),_label)
-#define NPT_CHECK_LABEL_FINEST_L(_logger,_result,_label) NPT_CHECK_LABEL_LL((_logger),NPT_LOG_LEVEL_FINEST,(_result),_label)
-
-#define NPT_CHECK_POINTER_FATAL(_p) NPT_CHECK_POINTER_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_FATAL,(_p))
-#define NPT_CHECK_POINTER_FATAL_L(_logger,_p) NPT_CHECK_POINTER_LL(_logger,NPT_LOG_LEVEL_FATAL,(_p))
-#define NPT_CHECK_POINTER_SEVERE(_p) NPT_CHECK_POINTER_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_SEVERE,(_p))
-#define NPT_CHECK_POINTER_SEVERE_L(_logger,_p) NPT_CHECK_POINTER_LL(_logger,NPT_LOG_LEVEL_SEVERE,(_p))
-#define NPT_CHECK_POINTER_WARNING(_p) NPT_CHECK_POINTER_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_WARNING,(_p))
-#define NPT_CHECK_POINTER_WARNING_L(_logger,_p) NPT_CHECK_POINTER_LL(_logger,NPT_LOG_LEVEL_WARNING,(_p))
-#define NPT_CHECK_POINTER_INFO(_p) NPT_CHECK_POINTER_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_INFO,(_p))
-#define NPT_CHECK_POINTER_INFO_L(_logger,_p) NPT_CHECK_POINTER_LL(_logger,NPT_LOG_LEVEL_INFO,(_p))
-#define NPT_CHECK_POINTER_FINE(_p) NPT_CHECK_POINTER_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_FINE,(_p))
-#define NPT_CHECK_POINTER_FINE_L(_logger,_p) NPT_CHECK_POINTER_LL(_logger,NPT_LOG_LEVEL_FINE,(_p))
-#define NPT_CHECK_POINTER_FINER(_p) NPT_CHECK_POINTER_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_FINER,(_p))
-#define NPT_CHECK_POINTER_FINER_L(_logger,_p) NPT_CHECK_POINTER_LL(_logger,NPT_LOG_LEVEL_FINER,(_p))
-#define NPT_CHECK_POINTER_FINEST(_p) NPT_CHECK_POINTER_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_FINEST,(_p))
-#define NPT_CHECK_POINTER_FINEST_L(_logger,_p) NPT_CHECK_POINTER_LL(_logger,NPT_LOG_LEVEL_FINEST,(_p))
-
-#define NPT_CHECK_POINTER_LABEL_FATAL(_p,_label) NPT_CHECK_POINTER_LABEL_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_FATAL,(_p),_label)
-#define NPT_CHECK_POINTER_LABEL_FATAL_L(_logger,_p,_label) NPT_CHECK_POINTER_LABEL_LL(_logger,NPT_LOG_LEVEL_FATAL,(_p),_label)
-#define NPT_CHECK_POINTER_LABEL_SEVERE(_p,_label) NPT_CHECK_POINTER_LABEL_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_SEVERE,(_p),_label)
-#define NPT_CHECK_POINTER_LABEL_SEVERE_L(_logger,_p,_label) NPT_CHECK_POINTER_LABEL_LL(_logger,NPT_LOG_LEVEL_SEVERE,(_p),_label)
-#define NPT_CHECK_POINTER_LABEL_WARNING(_p,_label) NPT_CHECK_POINTER_LABEL_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_WARNING,(_p),_label)
-#define NPT_CHECK_POINTER_LABEL_WARNING_L(_logger,_p,_label) NPT_CHECK_POINTER_LABEL_LL(_logger,NPT_LOG_LEVEL_WARNING,(_p),_label)
-#define NPT_CHECK_POINTER_LABEL_INFO(_p,_label) NPT_CHECK_POINTER_LABEL_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_INFO,(_p),_label)
-#define NPT_CHECK_POINTER_LABEL_INFO_L(_logger,_p,_label) NPT_CHECK_POINTER_LABEL_LL(_logger,NPT_LOG_LEVEL_INFO,(_p),_label)
-#define NPT_CHECK_POINTER_LABEL_FINE(_p, _label) NPT_CHECK_POINTER_LABEL_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_FINE,(_p),_label)
-#define NPT_CHECK_POINTER_LABEL_FINE_L(_logger,_p,_label) NPT_CHECK_POINTER_LABEL_LL(_logger,NPT_LOG_LEVEL_FINE,(_p),_label)
-#define NPT_CHECK_POINTER_LABEL_FINER(_p,_label) NPT_CHECK_POINTER_LABEL_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_FINER,(_p),_label)
-#define NPT_CHECK_POINTER_LABEL_FINER_L(_logger,_p,_label) NPT_CHECK_POINTER_LABEL_LL(_logger,NPT_LOG_LEVEL_FINER,(_p),_label)
-#define NPT_CHECK_POINTER_LABEL_FINEST(_p,_label) NNPT_CHECK_POINTER_LABEL_LL((_NPT_LocalLogger),NPT_LOG_LEVEL_FINEST,(_p),_label)
-#define NPT_CHECK_POINTER_LABEL_FINEST_L(_logger,_p,_label) NPT_CHECK_POINTER_LABEL_LL(_logger,NPT_LOG_LEVEL_FINEST,(_p),_label)
-
-#endif /* _NPT_LOGGING_H_ */
diff --git a/extra_lib/include/platinum/NptMap.h b/extra_lib/include/platinum/NptMap.h
deleted file mode 100644
index fc12b87..0000000
--- a/extra_lib/include/platinum/NptMap.h
+++ /dev/null
@@ -1,807 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Maps
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
-****************************************************************/
-
-#ifndef _NPT_MAP_H_
-#define _NPT_MAP_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptTypes.h"
-#include "NptResults.h"
-#include "NptList.h"
-#include "NptHash.h"
-
-/*----------------------------------------------------------------------
-|   NPT_Map
-+---------------------------------------------------------------------*/
-template <typename K, typename V> 
-class NPT_Map 
-{
-public:
-    // types
-    class Entry {
-    public:
-        // constructor
-        Entry(const K& key, const V& value) : m_Key(key), m_Value(value) {}
-        Entry(const K& key) : m_Key(key) {}
-        
-        // accessors
-        const K& GetKey()   const { return m_Key;   }
-        const V& GetValue() const { return m_Value; }
-
-        // operators 
-        bool operator==(const Entry& other) const {
-            return m_Key == other.m_Key && m_Value == other.m_Value;
-        }
-
-    protected:
-        // methods
-        void SetValue(const V& value) { m_Value = value; }
-
-        // members
-        K m_Key;
-        V m_Value;
-
-        // friends
-        friend class NPT_Map<K,V>;
-    };
-
-    // constructors
-    NPT_Map<K,V>() {}
-    NPT_Map<K,V>(const NPT_Map<K,V>& copy);
-
-    // destructor
-    ~NPT_Map<K,V>();
-
-    // methods
-    NPT_Result   Put(const K& key, const V& value);
-    NPT_Result   Get(const K& key, V*& value) const; // WARNING: the second parameter is a POINTER on the value type!!!
-    bool         HasKey(const K& key) const { return GetEntry(key) != NULL; }
-    bool         HasValue(const V& value) const;
-    NPT_Result   Erase(const K& key);
-    NPT_Cardinal GetEntryCount() const         { return m_Entries.GetItemCount(); }
-    const NPT_List<Entry*>& GetEntries() const { return m_Entries; }
-    NPT_Result   Clear();
-
-    // operators
-    V&                  operator[](const K& key);
-    const NPT_Map<K,V>& operator=(const NPT_Map<K,V>& copy);
-    bool                operator==(const NPT_Map<K,V>& other) const;
-    bool                operator!=(const NPT_Map<K,V>& other) const;
-
-private:
-    // types
-    typedef typename NPT_List<Entry*>::Iterator ListIterator;
-
-    // methods
-    Entry* GetEntry(const K& key) const;
-
-    // members
-    NPT_List<Entry*> m_Entries;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_Map<K,V>::NPT_Map<K,V>
-+---------------------------------------------------------------------*/
-template <typename K, typename V>
-NPT_Map<K,V>::NPT_Map(const NPT_Map<K,V>& copy)
-{
-    *this = copy;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_Map<K,V>::~NPT_Map<K,V>
-+---------------------------------------------------------------------*/
-template <typename K, typename V>
-NPT_Map<K,V>::~NPT_Map()
-{
-    // call Clear to ensure we delete all entry objects
-    Clear();
-}
-
-/*----------------------------------------------------------------------
-|   NPT_Map<K,V>::Clear
-+---------------------------------------------------------------------*/
-template <typename K, typename V>
-NPT_Result
-NPT_Map<K,V>::Clear()
-{
-    m_Entries.Apply(NPT_ObjectDeleter<Entry>());
-    m_Entries.Clear();
-
-    return NPT_SUCCESS;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_Map<K,V>::GetEntry
-+---------------------------------------------------------------------*/
-template <typename K, typename V>
-typename NPT_Map<K,V>::Entry*
-NPT_Map<K,V>::GetEntry(const K& key) const
-{
-    typename NPT_List<Entry*>::Iterator entry = m_Entries.GetFirstItem();
-    while (entry) {
-        if ((*entry)->GetKey() == key) {
-            return *entry;
-        }
-        ++entry;
-    }
-
-    return NULL;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_Map<K,V>::Put
-+---------------------------------------------------------------------*/
-template <typename K, typename V>
-NPT_Result
-NPT_Map<K,V>::Put(const K& key, const V& value)
-{
-    Entry* entry = GetEntry(key);
-    if (entry == NULL) {
-        // no existing entry for that key, create one
-        m_Entries.Add(new Entry(key, value));
-    } else {
-        // replace the existing entry for that key
-        entry->SetValue(value);
-    }
-
-    return NPT_SUCCESS;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_Map<K,V>::Get
-+---------------------------------------------------------------------*/
-template <typename K, typename V>
-NPT_Result
-NPT_Map<K,V>::Get(const K& key, V*& value) const
-{
-    Entry* entry = GetEntry(key);
-    if (entry == NULL) {
-        // no existing entry for that key
-        value = NULL;
-        return NPT_ERROR_NO_SUCH_ITEM;
-    } else {
-        // found an entry with that key
-        value = &entry->m_Value;
-        return NPT_SUCCESS;
-    }
-}
-
-/*----------------------------------------------------------------------
-|   NPT_Map<K,V>::HasValue
-+---------------------------------------------------------------------*/
-template <typename K, typename V>
-bool
-NPT_Map<K,V>::HasValue(const V& value) const
-{
-    ListIterator entry = m_Entries.GetFirstItem();
-    while (entry) {
-        if (value == (*entry)->m_Value) {
-            return true;
-        }
-        ++entry;
-    }
-
-    return false;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_Map<K,V>::operator=
-+---------------------------------------------------------------------*/
-template <typename K, typename V>
-const NPT_Map<K,V>&
-NPT_Map<K,V>::operator=(const NPT_Map<K,V>& copy)
-{
-    // do nothing if we're assigning to ourselves
-    if (this == &copy) return copy;
-
-    // destroy all entries
-    Clear();
-
-    // copy all entries one by one
-    ListIterator entry = copy.m_Entries.GetFirstItem();
-    while (entry) {
-        m_Entries.Add(new Entry((*entry)->GetKey(), (*entry)->GetValue()));
-        ++entry;
-    }
-
-    return *this;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_Map<K,V>::Erase
-+---------------------------------------------------------------------*/
-template <typename K, typename V>
-NPT_Result
-NPT_Map<K,V>::Erase(const K& key)
-{
-    ListIterator entry = m_Entries.GetFirstItem();
-    while (entry) {
-        if ((*entry)->GetKey() == key) {
-            delete *entry; // do this before removing the entry from the
-                           // list, because Erase() will invalidate the
-                           // iterator item
-            m_Entries.Erase(entry);
-            return NPT_SUCCESS;
-        }
-        ++entry;
-    }
-
-    return NPT_ERROR_NO_SUCH_ITEM;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_Map<K,V>::operator==
-+---------------------------------------------------------------------*/
-template <typename K, typename V>
-bool
-NPT_Map<K,V>::operator==(const NPT_Map<K,V>& other) const
-{
-    // quick test
-    if (m_Entries.GetItemCount() != other.m_Entries.GetItemCount()) return false;
-
-    // compare all entries to all other entries
-    ListIterator entry = m_Entries.GetFirstItem();
-    while (entry) {
-        V* value;
-        if (NPT_SUCCEEDED(other.Get((*entry)->m_Key, value))) {
-            // the other map has an entry for this key, check the value
-            if (!(*value == (*entry)->m_Value)) return false;
-        } else {
-            // the other map does not have an entry for this key
-            return false;
-        }
-        ++entry;
-    }
-
-    return true;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_Map<K,V>::operator!=
-+---------------------------------------------------------------------*/
-template <typename K, typename V>
-bool
-NPT_Map<K,V>::operator!=(const NPT_Map<K,V>& other) const
-{
-    return !(*this == other);
-}
-
-/*----------------------------------------------------------------------
-|   NPT_Map<K,V>::operator[]
-+---------------------------------------------------------------------*/
-template <typename K, typename V>
-V&
-NPT_Map<K,V>::operator[](const K& key)
-{
-    Entry* entry = GetEntry(key);
-    if (entry == NULL) {
-        // create a new "default" entry for this key
-        entry = new Entry(key);
-        m_Entries.Add(entry);
-    }
-     
-    return entry->m_Value;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_HashMap
-+---------------------------------------------------------------------*/
-template <typename K, typename V, typename HF = NPT_Hash<K> > 
-class NPT_HashMap 
-{
-public:
-    // types
-    class Entry {
-    public:
-        // constructor
-        Entry(NPT_UInt32 hash_value, const K& key, const V& value) : m_HashValue(hash_value), m_Key(key), m_Value(value) {}
-        Entry(NPT_UInt32 hash_value, const K& key)                 : m_HashValue(hash_value), m_Key(key) {}
-        
-        // accessors
-        const K&   GetKey()       const { return m_Key;   }
-        const V&   GetValue()     const { return m_Value; }
-        NPT_UInt32 GetHashValue() const { return m_HashValue; }
-        
-        // operators 
-        bool operator==(const Entry& other) const {
-            return m_HashValue == other.m_HashValue && m_Key == other.m_Key && m_Value == other.m_Value;
-        }
-
-    protected:
-        // methods
-        void SetValue(const V& value) { m_Value = value; }
-
-        // members
-        NPT_UInt32 m_HashValue;
-        K          m_Key;
-        V          m_Value;
-
-        // friends
-        friend class NPT_HashMap<K,V,HF>;
-    };
-
-    class Iterator {
-    public:
-        Iterator() : m_Entry(NULL), m_Map(NULL) {}
-        Iterator(Entry** entry, const NPT_HashMap<K,V,HF>* map) : m_Entry(entry), m_Map(map) {}
-        Iterator(const Iterator& copy) : m_Entry(copy.m_Entry), m_Map(copy.m_Map) {}
-        const Entry&  operator*()  const { return **m_Entry; }
-        Iterator& operator++()  { // prefix
-            if (m_Map && m_Entry) {
-                do {
-                    ++m_Entry;
-                    if (m_Entry >= &m_Map->m_Buckets[1<<m_Map->m_BucketCountLog]) {
-                        m_Entry = NULL;
-                    } else {
-                        if (*m_Entry) break;
-                    }
-                } while (m_Entry);
-            }
-            return (*this); 
-        }
-        Iterator operator++(int) { // postfix
-            Iterator saved_this = *this;
-            ++(*this);
-            return saved_this;
-        }
-        operator bool() const {
-            return m_Entry != NULL;
-        }
-        bool operator==(const Iterator& other) const {
-            return m_Map == other.m_Map && m_Entry == other.m_Entry;
-        }
-        bool operator!=(const Iterator& other) const {
-            return !(*this == other);
-        }
-        void operator=(const Iterator& other) {
-            m_Entry = other.m_Entry;
-            m_Map   = other.m_Map;
-        }
-
-    private:
-        // friends
-        friend class NPT_HashMap<K,V,HF>;
-
-        // members
-        Entry**                    m_Entry;
-        const NPT_HashMap<K,V,HF>* m_Map;
-    };
-
-    // constructors
-    NPT_HashMap<K,V,HF>();
-    NPT_HashMap<K,V,HF>(const HF& hasher);
-    NPT_HashMap<K,V,HF>(const NPT_HashMap<K,V,HF>& copy);
-
-    // destructor
-    ~NPT_HashMap<K,V,HF>();
-
-    // methods
-    NPT_Result   Put(const K& key, const V& value);
-    NPT_Result   Get(const K& key, V*& value) const; // WARNING: the second parameter is a POINTER on the value type!!!
-    bool         HasKey(const K& key) const { return GetEntry(key) != NULL; }
-    bool         HasValue(const V& value) const;
-    NPT_Result   Erase(const K& key);
-    NPT_Cardinal GetEntryCount() const { return m_EntryCount; }
-    Iterator     GetEntries() const;
-    NPT_Result   Clear();
-    
-    // list operations
-    // keep these template members defined here because MSV6 does not let
-    // us define them later
-    template <typename X> 
-    NPT_Result Apply(const X& function) const
-    {                          
-        for (int i=0; i<(1<<m_BucketCountLog); i++) {
-            if (m_Buckets[i]) {
-                function(m_Buckets[i]);
-            }
-        }
-        return NPT_SUCCESS;
-    }
-
-    // operators
-    V&                         operator[](const K& key);
-    const NPT_HashMap<K,V,HF>& operator=(const NPT_HashMap<K,V,HF>& copy);
-    bool                       operator==(const NPT_HashMap<K,V,HF>& other) const;
-    bool                       operator!=(const NPT_HashMap<K,V,HF>& other) const;
-
-private:
-    // methods
-    Entry*     GetEntry(const K& key, NPT_UInt32* position=NULL) const;
-    NPT_Result AddEntry(Entry* entry);
-    void       AllocateBuckets(unsigned int count_log);
-    void       AdjustBuckets(NPT_Cardinal entry_count, bool allow_shrink=false);
-    
-    // members
-    HF           m_Hasher;
-    Entry**      m_Buckets;
-    NPT_Cardinal m_BucketCountLog;
-    NPT_Cardinal m_EntryCount;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_HashMap<K,V>::NPT_HashMap
-+---------------------------------------------------------------------*/
-template <typename K, typename V, typename HF>
-NPT_HashMap<K,V,HF>::NPT_HashMap() :
-    m_Buckets(NULL),
-    m_EntryCount(0)
-{
-    AllocateBuckets(4);
-}
-
-/*----------------------------------------------------------------------
-|   NPT_HashMap<K,V>::NPT_HashMap
-+---------------------------------------------------------------------*/
-template <typename K, typename V, typename HF>
-NPT_HashMap<K,V,HF>::NPT_HashMap(const HF& hasher) :
-    m_Hasher(hasher),
-    m_Buckets(NULL),
-    m_EntryCount(0)
-{
-    AllocateBuckets(4);
-}
-
-/*----------------------------------------------------------------------
-|   NPT_HashMap<K,V>::NPT_HashMap
-+---------------------------------------------------------------------*/
-template <typename K, typename V, typename HF>
-NPT_HashMap<K,V,HF>::NPT_HashMap(const NPT_HashMap<K,V,HF>& copy) :
-    m_Buckets(NULL),
-    m_BucketCountLog(0),
-    m_EntryCount(0)
-{
-    *this = copy;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_MapMap<K,V,HF>::NPT_HashMap
-+---------------------------------------------------------------------*/
-template <typename K, typename V, typename HF>
-NPT_HashMap<K,V,HF>::~NPT_HashMap()
-{
-    for (int i=0; i<(1<<m_BucketCountLog); i++) {
-        delete m_Buckets[i];
-    }
-    delete[] m_Buckets;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_HashMap<K,V,HF>::AllocateBuckets
-+---------------------------------------------------------------------*/
-template <typename K, typename V, typename HF>
-void
-NPT_HashMap<K,V,HF>::AllocateBuckets(unsigned int count_log)
-{
-    m_Buckets = new Entry*[1<<count_log];
-    m_BucketCountLog = count_log;
-    for (int i=0; i<(1<<count_log); i++) {
-        m_Buckets[i] = NULL;
-    }
-}
-
-/*----------------------------------------------------------------------
-|   NPT_HashMap<K,V,HF>::AdjustBuckets
-+---------------------------------------------------------------------*/
-template <typename K, typename V, typename HF>
-void
-NPT_HashMap<K,V,HF>::AdjustBuckets(NPT_Cardinal entry_count, bool allow_shrink)
-{
-    Entry** buckets = NULL;
-    unsigned int bucket_count = 1<<m_BucketCountLog;
-    if (2*entry_count >= bucket_count) {
-        // we need to grow
-        buckets = m_Buckets;
-        AllocateBuckets(m_BucketCountLog+1);
-    } else if (allow_shrink && (5*entry_count < bucket_count) && m_BucketCountLog > 4) {
-        // we need to shrink
-        buckets = m_Buckets;
-        AllocateBuckets(m_BucketCountLog-1);
-    }
-    if (buckets) {
-        m_EntryCount = 0;
-        for (unsigned int i=0; i<bucket_count; i++) {
-            if (buckets[i]) AddEntry(buckets[i]);
-        }
-        delete[] buckets;
-    }
-}
-
-/*----------------------------------------------------------------------
-|   NPT_HashMap<K,V,HF>::Clear
-+---------------------------------------------------------------------*/
-template <typename K, typename V, typename HF>
-NPT_Result
-NPT_HashMap<K,V,HF>::Clear()
-{
-    if (m_Buckets) {
-        for (int i=0; i<(1<<m_BucketCountLog); i++) {
-            delete m_Buckets[i];
-        }
-        delete[] m_Buckets;
-    }
-    m_EntryCount = 0;
-    AllocateBuckets(4);
-    
-    return NPT_SUCCESS;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_HashMap<K,V,HF>::GetEntries
-+---------------------------------------------------------------------*/
-template <typename K, typename V, typename HF>
-typename NPT_HashMap<K,V,HF>::Iterator
-NPT_HashMap<K,V,HF>::GetEntries() const
-{
-    for (int i=0; i<(1<<m_BucketCountLog); i++) {
-        if (m_Buckets[i]) {
-            return Iterator(&m_Buckets[i], this);
-        }
-    }
-    return Iterator(NULL, this);
-}
-
-/*----------------------------------------------------------------------
-|   NPT_HashMap<K,V,HF>::GetEntry
-+---------------------------------------------------------------------*/
-template <typename K, typename V, typename HF>
-typename NPT_HashMap<K,V,HF>::Entry*
-NPT_HashMap<K,V,HF>::GetEntry(const K& key, NPT_UInt32* position) const
-{
-    NPT_UInt32 hash_value = m_Hasher(key);
-    NPT_UInt32 mask       = (1<<m_BucketCountLog)-1;
-    NPT_UInt32 cursor     = hash_value & mask;
-    while (m_Buckets[cursor]) {
-        Entry* entry = m_Buckets[cursor];
-        if (entry->m_HashValue == hash_value &&
-            entry->m_Key       == key) {
-            if (position) *position = cursor;
-            return entry;
-        }
-        cursor = (cursor + 1) & mask;
-    }
-    
-    return NULL;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_HashMap<K,V,HF>::AddEntry
-+---------------------------------------------------------------------*/
-template <typename K, typename V, typename HF>
-NPT_Result
-NPT_HashMap<K,V,HF>::AddEntry(Entry* entry)
-{
-    AdjustBuckets(m_EntryCount+1);
-
-    NPT_UInt32 hash_value = entry->m_HashValue;
-    NPT_UInt32 mask       = (1<<m_BucketCountLog)-1;
-    NPT_UInt32 cursor     = hash_value & mask;
-    while (m_Buckets[cursor]) {
-        cursor = (cursor + 1) & mask;
-    }
-    m_Buckets[cursor] = entry;
-    ++m_EntryCount;
-    
-    return NPT_SUCCESS;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_HashMap<K,V,HF>::Put
-+---------------------------------------------------------------------*/
-template <typename K, typename V, typename HF>
-NPT_Result
-NPT_HashMap<K,V,HF>::Put(const K& key, const V& value)
-{
-    Entry* entry = GetEntry(key);
-    if (entry == NULL) {
-        // no existing entry for that key, create one
-        return AddEntry(new Entry(m_Hasher(key), key, value));
-    } else {
-        // replace the existing entry for that key
-        entry->SetValue(value);
-    }
-
-    return NPT_SUCCESS;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_HashMap<K,V,HF>::Get
-+---------------------------------------------------------------------*/
-template <typename K, typename V, typename HF>
-NPT_Result
-NPT_HashMap<K,V,HF>::Get(const K& key, V*& value) const
-{
-    Entry* entry = GetEntry(key);
-    if (entry == NULL) {
-        // no existing entry for that key
-        value = NULL;
-        return NPT_ERROR_NO_SUCH_ITEM;
-    } else {
-        // found an entry with that key
-        value = &entry->m_Value;
-        return NPT_SUCCESS;
-    }
-}
-
-/*----------------------------------------------------------------------
-|   NPT_HashMap<K,V,HF>::HasValue
-+---------------------------------------------------------------------*/
-template <typename K, typename V, typename HF>
-bool
-NPT_HashMap<K,V,HF>::HasValue(const V& value) const
-{
-    for (int i=0; i<(1<<m_BucketCountLog); i++) {
-        if (m_Buckets[i] && m_Buckets[i]->m_Value == value) {
-            return true;
-        }
-    }
-
-    return false;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_HashMap<K,V,HF>::Erase
-+---------------------------------------------------------------------*/
-template <typename K, typename V, typename HF>
-NPT_Result
-NPT_HashMap<K,V,HF>::Erase(const K& key)
-{
-    NPT_UInt32 position;
-    Entry* entry = GetEntry(key, &position);
-    if (entry == NULL) {
-        return NPT_ERROR_NO_SUCH_ITEM;
-    }
-    
-    // mark the bucket as unoccupied
-    m_Buckets[position] = NULL;
-    
-    // look for buckets that need to be relocated:
-    // there should be no empty bucket between an entry's ideal hash bucket
-    // and its actual bucket.
-    NPT_UInt32 mask = (1<<m_BucketCountLog)-1;
-    for (NPT_UInt32 cursor = (position+1) & mask; m_Buckets[cursor]; cursor = (cursor + 1) & mask) {
-        NPT_UInt32 target = m_Buckets[cursor]->m_HashValue & mask;
-        // check if target is between position and cursor (modulo the bucket array size)
-        // |    position.target.cursor |
-        // |....cursor position.target.| or |.target..cursor position...|
-        if ( (position <= cursor) ?
-             ((position < target) && (target <= cursor)) :
-             ((position < target) || (target <= cursor)) ) {
-             continue;
-        }
-        
-        // move the bucket back
-        m_Buckets[position] = m_Buckets[cursor];
-        m_Buckets[cursor] = NULL;
-        position = cursor;
-    }
-        
-    // cleanup and adjust the counter and buckets
-    delete entry;
-    --m_EntryCount;
-    AdjustBuckets(m_EntryCount, true);
-
-    return NPT_SUCCESS;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_HashMap<K,V,HF>::operator=
-+---------------------------------------------------------------------*/
-template <typename K, typename V, typename HF>
-const NPT_HashMap<K,V,HF>&
-NPT_HashMap<K,V,HF>::operator=(const NPT_HashMap<K,V,HF>& copy)
-{
-    // do nothing if we're assigning to ourselves
-    if (this == &copy) return copy;
-
-    // destroy all entries
-    Clear();
-
-    // prepare to receive all the entries
-    AdjustBuckets(copy.m_EntryCount);
-    
-    // copy all entries
-    for (int i=0; i<1<<copy.m_BucketCountLog; i++) {
-        if (copy.m_Buckets[i]) {
-            AddEntry(new Entry(m_Hasher(copy.m_Buckets[i]->GetKey()),
-                               copy.m_Buckets[i]->GetKey(), 
-                               copy.m_Buckets[i]->GetValue()));
-        }
-    }
-    
-    return *this;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_HashMap<K,V,HF>::operator==
-+---------------------------------------------------------------------*/
-template <typename K, typename V, typename HF>
-bool
-NPT_HashMap<K,V,HF>::operator==(const NPT_HashMap<K,V,HF>& other) const
-{
-    // quick check
-    if (m_EntryCount != other.m_EntryCount) return false;
-    
-    // compare all entries to all other entries
-    for (int i=0; i<(1<<m_BucketCountLog); i++) {
-        Entry* entry = m_Buckets[i];
-        if (entry == NULL) continue;
-        Entry* other_entry = other.GetEntry(entry->m_Key);
-        if (other_entry == NULL || !(other_entry->m_Value == entry->m_Value)) {
-            return false;
-        }
-    }
-    
-    return true;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_HashMap<K,V,HF>::operator!=
-+---------------------------------------------------------------------*/
-template <typename K, typename V, typename HF>
-bool
-NPT_HashMap<K,V,HF>::operator!=(const NPT_HashMap<K,V,HF>& other) const
-{
-    return !(*this == other);
-}
-
-/*----------------------------------------------------------------------
-|   NPT_HashMap<K,V>::operator[]
-+---------------------------------------------------------------------*/
-template <typename K, typename V, typename HF>
-V&
-NPT_HashMap<K,V,HF>::operator[](const K& key)
-{
-    Entry* entry = GetEntry(key);
-    if (entry == NULL) {
-        // create a new "default" entry for this key
-        entry = new Entry(m_Hasher(key), key);
-        AddEntry(entry);
-    }
-     
-    return entry->m_Value;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_MapEntryValueDeleter
-+---------------------------------------------------------------------*/
-template <class T>
-class NPT_MapEntryValueDeleter {
-public:
-    void operator()(T* entry) const {
-        delete entry->GetValue();
-    }
-};
-
-#endif // _NPT_MAP_H_
diff --git a/extra_lib/include/platinum/NptMessaging.h b/extra_lib/include/platinum/NptMessaging.h
deleted file mode 100644
index 3e61919..0000000
--- a/extra_lib/include/platinum/NptMessaging.h
+++ /dev/null
@@ -1,230 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Messaging System
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_MESSAGING_H_
-#define _NPT_MESSAGING_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptConstants.h"
-#include "NptTypes.h"
-#include "NptResults.h"
-#include "NptList.h"
-#include "NptThreads.h"
-#include "NptDynamicCast.h"
-
-/*----------------------------------------------------------------------
-|   forward references
-+---------------------------------------------------------------------*/
-class NPT_Message;
-
-/*----------------------------------------------------------------------
-|   NPT_MessageHandler
-+---------------------------------------------------------------------*/
-class NPT_MessageHandler
-{
-public:
-    NPT_IMPLEMENT_DYNAMIC_CAST(NPT_MessageHandler)
-    
-    // methods
-    virtual ~NPT_MessageHandler() {}
-
-    // default message handler
-    virtual void OnMessage(NPT_Message*) {}
-
-    // this method is a central point of handling for received messages.
-    // it can be overloaded by subclasses that wish to process all 
-    // incoming messages
-    virtual NPT_Result HandleMessage(NPT_Message* message);
-};
-
-/*----------------------------------------------------------------------
-|   NPT_MessageHandlerProxy
-+---------------------------------------------------------------------*/
-class NPT_MessageHandlerProxy : public NPT_MessageHandler
-{
-public:
-    NPT_IMPLEMENT_DYNAMIC_CAST_D(NPT_MessageHandlerProxy, NPT_MessageHandler)
-
-    /**
-     * Create a proxy for a message handler.
-     * All calls to HandleMessage() and OnMessage() on the proxy
-     * are automatically forwarded to the handler.
-     * This class is useful in cases where a handler is passed
-     * asynchronously (for example in a message queue) and one wishes
-     * to guarantee right away that no more calls to the handler will be 
-     * made (because, for example, the handler needs to be deleted).
-     *
-     * The proxy object keeps a pointer to the handler, but does not own it.
-     */
-    NPT_MessageHandlerProxy(NPT_MessageHandler* handler);
-    
-    // destructor
-    virtual ~NPT_MessageHandlerProxy();
-
-    // NPT_MessageHandler methods
-    virtual void OnMessage(NPT_Message*);
-    virtual NPT_Result HandleMessage(NPT_Message* message);
-    
-    /**
-     * Detach the proxy from the handler implementation.
-     * After this call returns, calls will no longer be
-     * forwarded to the handler object. It is then safe, for example,
-     * to delete the handler.
-     */
-    void DetachHandler();
-    
-    /**
-     * Increment the reference count
-     */
-    void AddReference();
-
-    /**
-     * Decrement the reference count and delete if 0
-     */
-    void Release();
-    
-private:
-    // members
-    NPT_MessageHandler* m_Handler;
-    NPT_Cardinal        m_ReferenceCount;
-    NPT_Mutex           m_Lock;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_Messsage
-+---------------------------------------------------------------------*/
-class NPT_Message
-{
-public:
-    // types
-    typedef const char* Type;
-
-    // static members
-    static Type const MessageType;
-
-    // methods
-    virtual           ~NPT_Message() {}
-    virtual Type       GetType() { return MessageType; }
-    virtual NPT_Result Dispatch(NPT_MessageHandler* handler) {
-        return DefaultDeliver(handler);
-    }
-    // this method should really be called 'Deliver', but this would
-    // cause a problem when subclasses overload it 
-    virtual NPT_Result DefaultDeliver(NPT_MessageHandler* handler) {
-        handler->OnMessage(this);
-        return NPT_SUCCESS;
-    }
-};
-
-/*----------------------------------------------------------------------
-|   NPT_TerminateMesssage
-+---------------------------------------------------------------------*/
-class NPT_TerminateMessage : public NPT_Message
-{
-public:
-    // methods
-    NPT_Result Dispatch(NPT_MessageHandler* /*handler*/) {
-        return NPT_ERROR_TERMINATED;
-    }
-};
-
-/*----------------------------------------------------------------------
-|   NPT_MessageQueue
-+---------------------------------------------------------------------*/
-class NPT_MessageQueue
-{
-public:
-    // methods
-    virtual           ~NPT_MessageQueue() {}
-    virtual NPT_Result PumpMessage(NPT_Timeout timeout = NPT_TIMEOUT_INFINITE) = 0;
-    virtual NPT_Result QueueMessage(NPT_Message*        message, 
-                                    NPT_MessageHandler* handler) = 0;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_MessageReceiver
-+---------------------------------------------------------------------*/
-class NPT_MessageReceiver
-{
-public:
-    // methods
-    NPT_MessageReceiver() : m_Queue(NULL), m_Handler(NULL) {}
-    NPT_MessageReceiver(NPT_MessageHandler* handler) : 
-        m_Queue(NULL), m_Handler(handler) {}
-    NPT_MessageReceiver(NPT_MessageQueue* queue) : 
-        m_Queue(queue), m_Handler(NULL) {}
-    NPT_MessageReceiver(NPT_MessageHandler* handler, 
-                        NPT_MessageQueue*   queue) : 
-        m_Queue(queue), m_Handler(handler) {}
-    virtual ~NPT_MessageReceiver() {}
-    NPT_Result SetQueue(NPT_MessageQueue* queue) {
-        m_Queue = queue;
-        return NPT_SUCCESS;
-    }
-    NPT_Result SetHandler(NPT_MessageHandler* handler) {
-        m_Handler = handler;
-        return NPT_SUCCESS;
-    }
-    virtual NPT_Result PostMessage(NPT_Message* message) {
-        if (m_Queue) {
-            return m_Queue->QueueMessage(message, m_Handler);
-        } else {
-            return NPT_FAILURE;
-        }
-    }
-
-protected:
-    // members
-    NPT_MessageQueue*   m_Queue;
-    NPT_MessageHandler* m_Handler;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_MessageBroadcaster
-+---------------------------------------------------------------------*/
-class NPT_MessageBroadcaster
-{
-public:
-    // methods
-    NPT_MessageBroadcaster(NPT_Message* message) : m_Message(message) {}
-    NPT_Result operator()(NPT_MessageReceiver*& receiver) const {
-        receiver->PostMessage(m_Message);
-        return NPT_SUCCESS;
-    }
-
-private:
-    // members
-    NPT_Message* m_Message;
-};
-
-#endif // _NPT_MESSAGING_H_
diff --git a/extra_lib/include/platinum/NptNetwork.h b/extra_lib/include/platinum/NptNetwork.h
deleted file mode 100644
index 6486f03..0000000
--- a/extra_lib/include/platinum/NptNetwork.h
+++ /dev/null
@@ -1,250 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Network
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_NETWORK_H_
-#define _NPT_NETWORK_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptTypes.h"
-#include "NptConstants.h"
-#include "NptStrings.h"
-#include "NptList.h"
-
-/*----------------------------------------------------------------------
-|   constants
-+---------------------------------------------------------------------*/
-const unsigned int NPT_NETWORK_MAX_MAC_ADDRESS_LENGTH  = 8;
-
-/*----------------------------------------------------------------------
-|   flags
-+---------------------------------------------------------------------*/
-#define NPT_NETWORK_INTERFACE_FLAG_LOOPBACK       0x01
-#define NPT_NETWORK_INTERFACE_FLAG_PROMISCUOUS    0x02
-#define NPT_NETWORK_INTERFACE_FLAG_BROADCAST      0x04
-#define NPT_NETWORK_INTERFACE_FLAG_MULTICAST      0x08
-#define NPT_NETWORK_INTERFACE_FLAG_POINT_TO_POINT 0x10
-
-/*----------------------------------------------------------------------
-|   workarounds
-+---------------------------------------------------------------------*/
-#if defined(_WIN32)
-#if defined(SetPort)
-#undef SetPort
-#endif
-#endif
-
-/*----------------------------------------------------------------------
-|   types
-+---------------------------------------------------------------------*/
-typedef unsigned int NPT_IpPort;
-
-/*----------------------------------------------------------------------
-|   NPT_IpAddress
-+---------------------------------------------------------------------*/
-class NPT_IpAddress
-{
-public:
-    // class members
-    static const NPT_IpAddress Any;
-
-    // constructors and destructor
-    NPT_IpAddress();
-    NPT_IpAddress(unsigned long address);
-    NPT_IpAddress(unsigned char a, unsigned char b, unsigned char c, unsigned char d);
-
-    // methods
-    NPT_Result       ResolveName(const char* name, 
-                                 NPT_Timeout timeout = NPT_TIMEOUT_INFINITE);
-    NPT_Result       Parse(const char* name);
-    NPT_Result       Set(unsigned long address);
-    NPT_Result       Set(const unsigned char bytes[4]);
-    const unsigned char* AsBytes() const;
-    unsigned long    AsLong() const;
-    NPT_String       ToString() const;
-    
-    // operators
-    bool             operator==(const NPT_IpAddress& other) const;
-    
-    // FIXME: temporary
-    NPT_String       m_HostName;
-
-private:
-    // members
-    unsigned char m_Address[4];
-};
-
-/*----------------------------------------------------------------------
-|   NPT_MacAddress
-+---------------------------------------------------------------------*/
-class NPT_MacAddress
-{
-public:
-    // typedef enum
-    typedef enum {
-        TYPE_UNKNOWN,
-        TYPE_LOOPBACK,
-        TYPE_ETHERNET,
-        TYPE_PPP,
-        TYPE_IEEE_802_11
-    } Type;
-    
-    // constructors and destructor
-    NPT_MacAddress() : m_Type(TYPE_UNKNOWN), m_Length(0) {}
-    NPT_MacAddress(Type           type,
-                   const unsigned char* addr, 
-                   unsigned int   length);
-    
-    // methods
-    void                 SetAddress(Type type, const unsigned char* addr,
-                                    unsigned int length);
-    Type                 GetType() const    { return m_Type; }
-    const unsigned char* GetAddress() const { return m_Address; }
-    unsigned int         GetLength() const  { return m_Length; }
-    NPT_String           ToString() const;
-    
-private:
-    // members
-    Type          m_Type;
-    unsigned char m_Address[NPT_NETWORK_MAX_MAC_ADDRESS_LENGTH];
-    unsigned int  m_Length;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_NetworkInterfaceAddress
-+---------------------------------------------------------------------*/
-class NPT_NetworkInterfaceAddress
-{
-public:
-    // constructors and destructor
-    NPT_NetworkInterfaceAddress(const NPT_IpAddress& primary,
-                                const NPT_IpAddress& broadcast,
-                                const NPT_IpAddress& destination,
-                                const NPT_IpAddress& netmask) :
-        m_PrimaryAddress(primary),
-        m_BroadcastAddress(broadcast),
-        m_DestinationAddress(destination),
-        m_NetMask(netmask) {}
-
-    // methods
-    const NPT_IpAddress& GetPrimaryAddress() const {
-        return m_PrimaryAddress;
-    }
-    const NPT_IpAddress& GetBroadcastAddress() const {
-        return m_BroadcastAddress;
-    }
-    const NPT_IpAddress& GetDestinationAddress() const {
-        return m_DestinationAddress;
-    }
-    const NPT_IpAddress& GetNetMask() const {
-        return m_NetMask;
-    }
-    
-    bool IsAddressInNetwork(const NPT_IpAddress& address) {
-        if (m_PrimaryAddress.AsLong() == address.AsLong()) return true;
-        if (m_NetMask.AsLong() == 0) return false;
-        return (m_PrimaryAddress.AsLong() & m_NetMask.AsLong()) == (address.AsLong() & m_NetMask.AsLong());
-    }
-
-private:
-    // members
-    NPT_IpAddress m_PrimaryAddress;
-    NPT_IpAddress m_BroadcastAddress;
-    NPT_IpAddress m_DestinationAddress;
-    NPT_IpAddress m_NetMask;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_NetworkInterface
-+---------------------------------------------------------------------*/
-class NPT_NetworkInterface
-{
-public:
-    // class methods
-    static NPT_Result GetNetworkInterfaces(NPT_List<NPT_NetworkInterface*>& interfaces);
-
-    // constructors and destructor
-    NPT_NetworkInterface(const char*           name,
-                         const NPT_MacAddress& mac,
-                         NPT_Flags             flags);
-    NPT_NetworkInterface(const char*           name,
-                         NPT_Flags             flags);
-   ~NPT_NetworkInterface() {}
-
-    // methods
-    NPT_Result AddAddress(const NPT_NetworkInterfaceAddress& address);
-    const NPT_String& GetName() const {
-        return m_Name;
-    }
-    const NPT_MacAddress& GetMacAddress() const {
-        return m_MacAddress;
-    }
-    void SetMacAddress(NPT_MacAddress::Type type,
-                       const unsigned char* addr, 
-                       unsigned int         length) {
-        m_MacAddress.SetAddress(type, addr, length);
-    }
-    NPT_Flags GetFlags() const { return m_Flags; }
-    const NPT_List<NPT_NetworkInterfaceAddress>& GetAddresses() const {
-        return m_Addresses;
-    }    
-    
-    bool IsAddressInNetwork(const NPT_IpAddress& address) {
-        NPT_List<NPT_NetworkInterfaceAddress>::Iterator iter = m_Addresses.GetFirstItem();
-        while (iter) {
-            if ((*iter).IsAddressInNetwork(address)) return true;
-           ++iter;
-        }
-        return false;
-    }
-    
-private:
-    // members
-    NPT_String                            m_Name;
-    NPT_MacAddress                        m_MacAddress;
-    NPT_Flags                             m_Flags;
-    NPT_List<NPT_NetworkInterfaceAddress> m_Addresses;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_NetworkNameResolver
-+---------------------------------------------------------------------*/
-class NPT_NetworkNameResolver
-{
-public:
-    // class methods
-    static NPT_Result Resolve(const char*              name, 
-                              NPT_List<NPT_IpAddress>& addresses,
-                              NPT_Timeout              timeout = NPT_TIMEOUT_INFINITE);
-};
-
-#endif // _NPT_NETWORK_H_
diff --git a/extra_lib/include/platinum/NptQueue.h b/extra_lib/include/platinum/NptQueue.h
deleted file mode 100644
index ecfe1a9..0000000
--- a/extra_lib/include/platinum/NptQueue.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Queue
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_QUEUE_H_
-#define _NPT_QUEUE_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptTypes.h"
-#include "NptConstants.h"
-
-/*----------------------------------------------------------------------
-|   NPT_QueueItem
-+---------------------------------------------------------------------*/
-class NPT_QueueItem;
-
-/*----------------------------------------------------------------------
-|   NPT_GenericQueue
-+---------------------------------------------------------------------*/
-class NPT_GenericQueue
-{
- public:
-    // class methods
-    static NPT_GenericQueue* CreateInstance(NPT_Cardinal max_items = 0);
-
-    // methods
-    virtual           ~NPT_GenericQueue() {}
-    virtual NPT_Result Push(NPT_QueueItem* item, 
-                           NPT_Timeout     timeout = NPT_TIMEOUT_INFINITE) = 0; 
-    virtual NPT_Result Pop(NPT_QueueItem*& item, 
-                           NPT_Timeout     timeout = NPT_TIMEOUT_INFINITE) = 0;
-    virtual NPT_Result Peek(NPT_QueueItem*& item, 
-                           NPT_Timeout     timeout = NPT_TIMEOUT_INFINITE) = 0;
- protected:
-    // methods
-    NPT_GenericQueue() {}
-};
-
-/*----------------------------------------------------------------------
-|   NPT_Queue
-+---------------------------------------------------------------------*/
-template <class T>
-class NPT_Queue
-{
- public:
-    // methods
-    NPT_Queue(NPT_Cardinal max_items = 0) :
-        m_Delegate(NPT_GenericQueue::CreateInstance(max_items)) {}
-    virtual ~NPT_Queue<T>() { delete m_Delegate; }
-    virtual NPT_Result Push(T* item, NPT_Timeout timeout = NPT_TIMEOUT_INFINITE) {
-        return m_Delegate->Push(reinterpret_cast<NPT_QueueItem*>(item), timeout);
-    }
-    virtual NPT_Result Pop(T*& item, NPT_Timeout timeout = NPT_TIMEOUT_INFINITE) {
-        return m_Delegate->Pop(reinterpret_cast<NPT_QueueItem*&>(item), timeout);
-    }
-    virtual NPT_Result Peek(T*& item, NPT_Timeout timeout = NPT_TIMEOUT_INFINITE) {
-        return m_Delegate->Peek(reinterpret_cast<NPT_QueueItem*&>(item), timeout);
-    }
-
- protected:
-    // members
-    NPT_GenericQueue* m_Delegate;
-};
-
-#endif // _NPT_QUEUE_H_
diff --git a/extra_lib/include/platinum/NptReferences.h b/extra_lib/include/platinum/NptReferences.h
deleted file mode 100644
index 3f86779..0000000
--- a/extra_lib/include/platinum/NptReferences.h
+++ /dev/null
@@ -1,173 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - References
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
-****************************************************************/
-
-#ifndef _NPT_REFERENCES_H_
-#define _NPT_REFERENCES_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptConstants.h"
-#include "NptThreads.h"
-
-/*----------------------------------------------------------------------
-|   NPT_Reference
-+---------------------------------------------------------------------*/
-template <typename T>
-class NPT_Reference
-{
-public:
-    // constructors and destructor
-    NPT_Reference() : m_Object(NULL), m_Counter(NULL), m_Mutex(NULL), m_ThreadSafe(true) {}
-    explicit NPT_Reference(T* object, bool thread_safe = true) : 
-        m_Object(object), 
-        m_Counter(object?new NPT_Cardinal(1):NULL),
-        m_Mutex((object && thread_safe)?new NPT_Mutex():NULL),
-        m_ThreadSafe(thread_safe) {}
-
-    NPT_Reference(const NPT_Reference<T>& ref) :
-        m_Object(ref.m_Object), m_Counter(ref.m_Counter), m_Mutex(ref.m_Mutex), m_ThreadSafe(ref.m_ThreadSafe) {
-        if (m_Mutex) m_Mutex->Lock();
-        if (m_Counter) ++(*m_Counter);
-        if (m_Mutex) m_Mutex->Unlock();
-    }
-
-    // this methods should be private, but this causes a problem on some
-    // compilers, because we need this function in order to implement
-    // the cast operator operator NPT_Reference<U>() below, which would
-    // have to be marked as a friend, and friend declarations with the 
-    // same class name confuses some compilers
-    NPT_Reference(T* object, NPT_Cardinal* counter, NPT_Mutex* mutex, bool thread_safe) : 
-        m_Object(object), m_Counter(counter), m_Mutex(mutex), m_ThreadSafe(thread_safe) {
-        if (m_Mutex) m_Mutex->Lock();
-        if (m_Counter) ++(*m_Counter);
-        if (m_Mutex) m_Mutex->Unlock();
-    }
-
-    ~NPT_Reference() {
-        Release();
-    }
-
-    // overloaded operators
-    NPT_Reference<T>& operator=(const NPT_Reference<T>& ref) {
-        if (this != &ref) {
-            Release();
-            m_Object = ref.m_Object;
-            m_Counter = ref.m_Counter;
-            m_Mutex = ref.m_Mutex;
-            m_ThreadSafe = ref.m_ThreadSafe;
-            
-            if (m_Mutex) m_Mutex->Lock();
-            if (m_Counter) ++(*m_Counter);
-            if (m_Mutex) m_Mutex->Unlock();
-        }
-        return *this;
-    }
-    NPT_Reference<T>& operator=(T* object) {
-        Release();
-        m_Object  = object;
-        m_Counter = object?new NPT_Cardinal(1):NULL;
-        m_Mutex   = (object && m_ThreadSafe)?new NPT_Mutex():NULL;
-        return *this;
-    }
-    T& operator*() const { return *m_Object; }
-    T* operator->() const { return m_Object; }
-
-    bool operator==(const NPT_Reference<T>& ref) const {
-        return m_Object == ref.m_Object;
-    } 
-    bool operator!=(const NPT_Reference<T>& ref) const {
-        return m_Object != ref.m_Object;
-    }
-
-    // overloaded cast operators
-    template <typename U> operator NPT_Reference<U>() {
-        return NPT_Reference<U>(m_Object, m_Counter, m_Mutex, m_ThreadSafe);
-    }
-
-    // methods
-    /**
-     * Returns the naked pointer value.
-     */
-    T* AsPointer() const { return m_Object; }
-    
-    /**
-     * Returns the reference counter value.
-     */
-    NPT_Cardinal GetCounter() const { return *m_Counter; }
-    
-    /**
-     * Returns whether this references a NULL object.
-     */
-    bool IsNull()  const { return m_Object == NULL; }
-    
-    /**
-     * Detach the reference from the shared object.
-     * The reference count is decremented, but the object is not deleted if the
-     * reference count becomes 0.
-     * After the method returns, this reference does not point to any shared object.
-     */
-    void Detach() {
-        Release(true);        
-    }
-    
-private:
-    // methods
-    void Release(bool detach_only = false) {
-        bool last_reference = false;
-        if (m_Mutex) m_Mutex->Lock();
-            
-        if (m_Counter && --(*m_Counter) == 0) {
-            delete m_Counter;
-            if (!detach_only) delete m_Object;
-            last_reference = true;
-        }
-        
-        m_Counter = NULL;
-        m_Object  = NULL;
-        
-        if (m_Mutex) {
-            NPT_Mutex* mutex = m_Mutex;
-            m_Mutex = NULL;
-            mutex->Unlock();
-            if (last_reference) delete mutex;
-        }
-        
-    }
-
-    // members
-    T*            m_Object;
-    NPT_Cardinal* m_Counter;
-    NPT_Mutex*    m_Mutex;
-    bool          m_ThreadSafe;
-};
-
-#endif // _NPT_REFERENCES_H_
diff --git a/extra_lib/include/platinum/NptResults.h b/extra_lib/include/platinum/NptResults.h
deleted file mode 100644
index 88025f7..0000000
--- a/extra_lib/include/platinum/NptResults.h
+++ /dev/null
@@ -1,163 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Result Codes
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_RESULTS_H_
-#define _NPT_RESULTS_H_
-
-/*----------------------------------------------------------------------
-|   macros
-+---------------------------------------------------------------------*/
-#if defined(NPT_DEBUG)
-#include "NptDebug.h"
-#define NPT_CHECK(_x)               \
-do {                                \
-    NPT_Result _result = (_x);      \
-    if (_result != NPT_SUCCESS) {   \
-        NPT_Debug("%s(%d): @@@ NPT_CHECK failed, result=%d (%s)\n", __FILE__, __LINE__, _result, NPT_ResultText(_result)); \
-        return _result;             \
-    }                               \
-} while(0)
-#define NPT_CHECK_POINTER(_p)                 \
-do {                                          \
-    if ((_p) == NULL) {                       \
-        NPT_Debug("%s(%d): @@@ NULL pointer parameter\n", __FILE__, __LINE__); \
-        return NPT_ERROR_INVALID_PARAMETERS;  \
-    }                                         \
-} while(0)
-#define NPT_CHECK_LABEL(_x, label)  \
-do {                                \
-    NPT_Result _result = (_x);      \
-    if (_result != NPT_SUCCESS) {   \
-        NPT_Debug("%s(%d): @@@ NPT_CHECK failed, result=%d (%s)\n", __FILE__, __LINE__, _result, NPT_ResultText(_result)); \
-        goto label;                 \
-    }                               \
-} while(0)
-#define NPT_CHECK_POINTER_LABEL(_p, label)   \
-do {                                         \
-    if (_p == NULL) {                        \
-        NPT_Debug("%s(%d): @@@ NULL pointer parameter\n", __FILE__, __LINE__); \
-        goto label;                          \
-    }                                        \
-} while(0)
-#else
-#define NPT_CHECK(_x)               \
-do {                                \
-    NPT_Result _result = (_x);      \
-    if (_result != NPT_SUCCESS) {   \
-        return _result;             \
-    }                               \
-} while(0)
-#define NPT_CHECK_POINTER(_p)                               \
-do {                                                        \
-    if ((_p) == NULL) return NPT_ERROR_INVALID_PARAMETERS;  \
-} while(0)
-#define NPT_CHECK_LABEL(_x, label)  \
-do {                                \
-    NPT_Result _result = (_x);      \
-    if (_result != NPT_SUCCESS) {   \
-        goto label;                 \
-    }                               \
-} while(0)
-#define NPT_CHECK_POINTER_LABEL(_p, label)   \
-do {                                         \
-    if ((_p) == NULL) {                      \
-        goto label;                          \
-    }                                        \
-} while(0)
-#endif
-
-#define NPT_FAILED(result)              ((result) != NPT_SUCCESS)
-#define NPT_SUCCEEDED(result)           ((result) == NPT_SUCCESS)
-
-/*----------------------------------------------------------------------
-|   result codes
-+---------------------------------------------------------------------*/
-/** Result indicating that the operation or call succeeded */
-#define NPT_SUCCESS                     0
-
-/** Result indicating an unspecififed failure condition */
-#define NPT_FAILURE                     (-1)
-
-#if !defined(NPT_ERROR_BASE)
-#define NPT_ERROR_BASE -20000
-#endif
-
-// error bases
-#define NPT_ERROR_BASE_GENERAL        (NPT_ERROR_BASE-0)
-#define NPT_ERROR_BASE_LIST           (NPT_ERROR_BASE-100)
-#define NPT_ERROR_BASE_FILE           (NPT_ERROR_BASE-200)
-#define NPT_ERROR_BASE_IO             (NPT_ERROR_BASE-300)
-#define NPT_ERROR_BASE_SOCKET         (NPT_ERROR_BASE-400)
-#define NPT_ERROR_BASE_INTERFACES     (NPT_ERROR_BASE-500)
-#define NPT_ERROR_BASE_XML            (NPT_ERROR_BASE-600)
-#define NPT_ERROR_BASE_UNIX           (NPT_ERROR_BASE-700)
-#define NPT_ERROR_BASE_HTTP           (NPT_ERROR_BASE-800)
-#define NPT_ERROR_BASE_THREADS        (NPT_ERROR_BASE-900)
-#define NPT_ERROR_BASE_SERIAL_PORT    (NPT_ERROR_BASE-1000)
-#define NPT_ERROR_BASE_TLS            (NPT_ERROR_BASE-1100)
-
-// general errors
-#define NPT_ERROR_INVALID_PARAMETERS  (NPT_ERROR_BASE_GENERAL - 0)
-#define NPT_ERROR_PERMISSION_DENIED   (NPT_ERROR_BASE_GENERAL - 1)
-#define NPT_ERROR_OUT_OF_MEMORY       (NPT_ERROR_BASE_GENERAL - 2)
-#define NPT_ERROR_NO_SUCH_NAME        (NPT_ERROR_BASE_GENERAL - 3)
-#define NPT_ERROR_NO_SUCH_PROPERTY    (NPT_ERROR_BASE_GENERAL - 4)
-#define NPT_ERROR_NO_SUCH_ITEM        (NPT_ERROR_BASE_GENERAL - 5)
-#define NPT_ERROR_NO_SUCH_CLASS       (NPT_ERROR_BASE_GENERAL - 6)
-#define NPT_ERROR_OVERFLOW            (NPT_ERROR_BASE_GENERAL - 7)
-#define NPT_ERROR_INTERNAL            (NPT_ERROR_BASE_GENERAL - 8)
-#define NPT_ERROR_INVALID_STATE       (NPT_ERROR_BASE_GENERAL - 9)
-#define NPT_ERROR_INVALID_FORMAT      (NPT_ERROR_BASE_GENERAL - 10)
-#define NPT_ERROR_INVALID_SYNTAX      (NPT_ERROR_BASE_GENERAL - 11)
-#define NPT_ERROR_NOT_IMPLEMENTED     (NPT_ERROR_BASE_GENERAL - 12)
-#define NPT_ERROR_NOT_SUPPORTED       (NPT_ERROR_BASE_GENERAL - 13)
-#define NPT_ERROR_TIMEOUT             (NPT_ERROR_BASE_GENERAL - 14)
-#define NPT_ERROR_WOULD_BLOCK         (NPT_ERROR_BASE_GENERAL - 15)
-#define NPT_ERROR_TERMINATED          (NPT_ERROR_BASE_GENERAL - 16)
-#define NPT_ERROR_OUT_OF_RANGE        (NPT_ERROR_BASE_GENERAL - 17)
-#define NPT_ERROR_OUT_OF_RESOURCES    (NPT_ERROR_BASE_GENERAL - 18)
-#define NPT_ERROR_NOT_ENOUGH_SPACE    (NPT_ERROR_BASE_GENERAL - 19)
-#define NPT_ERROR_INTERRUPTED         (NPT_ERROR_BASE_GENERAL - 20)
-#define NPT_ERROR_CANCELLED           (NPT_ERROR_BASE_GENERAL - 21)
-
-/* standard error codes                                  */
-/* these are special codes to convey an errno            */
-/* the error code is (SHI_ERROR_BASE_ERRNO - errno)      */
-/* where errno is the positive integer from errno.h      */
-#define NPT_ERROR_BASE_ERRNO          (NPT_ERROR_BASE-2000)
-#define NPT_ERROR_ERRNO(e)            (NPT_ERROR_BASE_ERRNO - (e))
-
-/*----------------------------------------------------------------------
-|   functions
-+---------------------------------------------------------------------*/
-const char* NPT_ResultText(int result);
-
-#endif // _NPT_RESULTS_H_
diff --git a/extra_lib/include/platinum/NptRingBuffer.h b/extra_lib/include/platinum/NptRingBuffer.h
deleted file mode 100644
index 990b4a6..0000000
--- a/extra_lib/include/platinum/NptRingBuffer.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Ring Buffer
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_RING_BUFFER_H_
-#define _NPT_RING_BUFFER_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptTypes.h"
-#include "NptReferences.h"
-
-/*----------------------------------------------------------------------
-|   NPT_RingBuffer
-+---------------------------------------------------------------------*/
-class NPT_RingBuffer
-{
- public:
-    // methods
-                  NPT_RingBuffer(NPT_Size size);
-                  NPT_RingBuffer(void* buffer, NPT_Size size);
-    virtual      ~NPT_RingBuffer();
-    NPT_Size      GetSpace() const;
-    NPT_Size      GetContiguousSpace() const;
-    NPT_Result    Write(const void* buffer, NPT_Size byte_count);
-    NPT_Size      GetAvailable() const;
-    NPT_Size      GetContiguousAvailable() const;
-    NPT_Result    Read(void* buffer, NPT_Size byte_count);
-    unsigned char ReadByte();
-    unsigned char PeekByte(NPT_Position offset);
-    NPT_Result    MoveIn(NPT_Position offset);
-    NPT_Result    MoveOut(NPT_Position offset);
-    NPT_Result    Flush();
-    NPT_Result    Close();
-    bool          IsClosed() { return m_Closed; }
-
-    // accessors
-    unsigned char* GetWritePointer()  { return m_In; }
-    unsigned char* GetReadPointer()   { return m_Out;}
-
- private:
-    // members
-    struct {
-        unsigned char* start;
-        unsigned char* end;
-    }              m_Data;
-    unsigned char* m_In;
-    unsigned char* m_Out;
-//    NPT_Size       m_Size;
-    bool           m_BufferIsLocal;
-    bool           m_Closed;
-};
-
-typedef NPT_Reference<NPT_RingBuffer> NPT_RingBufferReference;
-
-#endif // _NPT_RING_BUFFER_H_
diff --git a/extra_lib/include/platinum/NptSelectableMessageQueue.h b/extra_lib/include/platinum/NptSelectableMessageQueue.h
deleted file mode 100644
index 23dd499..0000000
--- a/extra_lib/include/platinum/NptSelectableMessageQueue.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Selectable Message Queue
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_SELECTABLE_MESSAGE_QUEUE_H_
-#define _NPT_SELECTABLE_MESSAGE_QUEUE_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptMessaging.h"
-#include "NptSimpleMessageQueue.h"
-
-/*----------------------------------------------------------------------
-|   NPT_SelectableMessageQueue
-+---------------------------------------------------------------------*/
-class NPT_SelectableMessageQueue : public NPT_SimpleMessageQueue
-{
-public:
-    // methods
-             NPT_SelectableMessageQueue();
-    virtual ~NPT_SelectableMessageQueue();
-    
-    // NPT_MessageQueue methods
-    virtual NPT_Result PumpMessage(NPT_Timeout timeout = NPT_TIMEOUT_INFINITE);
-    virtual NPT_Result QueueMessage(NPT_Message*        message,
-                                    NPT_MessageHandler* handler);
-
-    // methods
-    int  GetEventFd() { return m_Pipe[0]; }
- 
-private:
-    // methods
-    NPT_Result FlushEvent();
-
-    // members
-    int m_Pipe[2];
-};
-
-
-#endif /* _NPT_SELECTABLE_MESSAGE_QUEUE_H_ */
diff --git a/extra_lib/include/platinum/NptSerialPort.h b/extra_lib/include/platinum/NptSerialPort.h
deleted file mode 100644
index 1e23a3d..0000000
--- a/extra_lib/include/platinum/NptSerialPort.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Serial Ports
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_SERIAL_PORT_H_
-#define _NPT_SERIAL_PORT_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptTypes.h"
-#include "NptStreams.h"
-
-/*----------------------------------------------------------------------
-|   constants
-+---------------------------------------------------------------------*/
-const int NPT_ERROR_NO_SUCH_SERIAL_PORT      = NPT_ERROR_BASE_SERIAL_PORT - 0;
-const int NPT_ERROR_SERIAL_PORT_NOT_OPEN     = NPT_ERROR_BASE_SERIAL_PORT - 1;
-const int NPT_ERROR_SERIAL_PORT_ALREADY_OPEN = NPT_ERROR_BASE_SERIAL_PORT - 2;
-const int NPT_ERROR_SERIAL_PORT_BUSY         = NPT_ERROR_BASE_SERIAL_PORT - 3;
-
-typedef enum {
-    NPT_SERIAL_PORT_PARITY_NONE,
-    NPT_SERIAL_PORT_PARITY_EVEN,
-    NPT_SERIAL_PORT_PARITY_ODD,
-    NPT_SERIAL_PORT_PARITY_MARK
-} NPT_SerialPortParity;
-
-typedef enum {
-    NPT_SERIAL_PORT_STOP_BITS_1,
-    NPT_SERIAL_PORT_STOP_BITS_1_5,
-    NPT_SERIAL_PORT_STOP_BITS_2
-} NPT_SerialPortStopBits;
-
-typedef enum {
-    NPT_SERIAL_PORT_FLOW_CONTROL_NONE,
-    NPT_SERIAL_PORT_FLOW_CONTROL_HARDWARE,
-    NPT_SERIAL_PORT_FLOW_CONTROL_XON_XOFF
-} NPT_SerialPortFlowControl;
-
-/*----------------------------------------------------------------------
-|   NPT_SerialPortInterface
-+---------------------------------------------------------------------*/
-class NPT_SerialPortInterface
-{
-public:
-    // constructors and destructor
-    virtual ~NPT_SerialPortInterface() {}
-
-    // methods
-    virtual NPT_Result Open(unsigned int              speed, 
-                            NPT_SerialPortStopBits    stop_bits,
-                            NPT_SerialPortFlowControl flow_control,
-                            NPT_SerialPortParity      parity) = 0;
-    virtual NPT_Result Close() = 0;
-    virtual NPT_Result GetInputStream(NPT_InputStreamReference& stream) = 0;
-    virtual NPT_Result GetOutputStream(NPT_OutputStreamReference& stream) = 0;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_SerialPort
-+---------------------------------------------------------------------*/
-class NPT_SerialPort : public NPT_SerialPortInterface
-{
-public:
-    // constructors and destructor
-    NPT_SerialPort(const char* name);
-   ~NPT_SerialPort() { delete m_Delegate; }
-
-    // NPT_SerialPortInterface methods
-    NPT_Result Open(unsigned int              speed, 
-                    NPT_SerialPortStopBits    stop_bits = NPT_SERIAL_PORT_STOP_BITS_1,
-                    NPT_SerialPortFlowControl flow_control = NPT_SERIAL_PORT_FLOW_CONTROL_NONE,
-                    NPT_SerialPortParity      parity = NPT_SERIAL_PORT_PARITY_NONE) {
-        return m_Delegate->Open(speed, stop_bits, flow_control, parity);
-    }
-    NPT_Result Close() {
-        return m_Delegate->Close();
-    }
-    NPT_Result GetInputStream(NPT_InputStreamReference& stream) {
-        return m_Delegate->GetInputStream(stream);
-    }
-    NPT_Result GetOutputStream(NPT_OutputStreamReference& stream) {
-        return m_Delegate->GetOutputStream(stream);
-    }
-
-protected:
-    // members
-    NPT_SerialPortInterface* m_Delegate;
-};
-
-#endif // _NPT_SERIAL_PORT_H_ 
diff --git a/extra_lib/include/platinum/NptSimpleMessageQueue.h b/extra_lib/include/platinum/NptSimpleMessageQueue.h
deleted file mode 100644
index 158b6ff..0000000
--- a/extra_lib/include/platinum/NptSimpleMessageQueue.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Simple Message Queue
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_SIMPLE_MESSAGE_QUEUE_H_
-#define _NPT_SIMPLE_MESSAGE_QUEUE_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptTypes.h"
-#include "NptThreads.h"
-#include "NptMessaging.h"
-#include "NptQueue.h"
-
-/*----------------------------------------------------------------------
-|   class references
-+---------------------------------------------------------------------*/
-class NPT_SimpleMessageCapsule;
-
-/*----------------------------------------------------------------------
-|   NPT_SimpleMessageQueue
-+---------------------------------------------------------------------*/
-class NPT_SimpleMessageQueue : public NPT_MessageQueue
-{
- public:
-    // members
-    NPT_SimpleMessageQueue();
-    virtual ~NPT_SimpleMessageQueue();
-
-    // NPT_MessageQueue methods
-    virtual NPT_Result QueueMessage(NPT_Message*        message, 
-                                    NPT_MessageHandler* handler);
-    virtual NPT_Result PumpMessage(NPT_Timeout timeout = NPT_TIMEOUT_INFINITE);
-
- private:
-    // members
-    NPT_Queue<NPT_SimpleMessageCapsule> m_Queue;
-};
-
-#endif // _NPT_SIMPLE_MESSAGE_QUEUE_H_
diff --git a/extra_lib/include/platinum/NptSockets.h b/extra_lib/include/platinum/NptSockets.h
deleted file mode 100644
index 789939a..0000000
--- a/extra_lib/include/platinum/NptSockets.h
+++ /dev/null
@@ -1,335 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Network Sockets
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_SOCKETS_H_
-#define _NPT_SOCKETS_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptTypes.h"
-#include "NptConstants.h"
-#include "NptStreams.h"
-#include "NptStrings.h"
-#include "NptDataBuffer.h"
-#include "NptNetwork.h"
-
-/*----------------------------------------------------------------------
-|   constants
-+---------------------------------------------------------------------*/
-const int NPT_ERROR_CONNECTION_RESET      = NPT_ERROR_BASE_SOCKET - 0;
-const int NPT_ERROR_CONNECTION_ABORTED    = NPT_ERROR_BASE_SOCKET - 1;
-const int NPT_ERROR_CONNECTION_REFUSED    = NPT_ERROR_BASE_SOCKET - 2;
-const int NPT_ERROR_CONNECTION_FAILED     = NPT_ERROR_BASE_SOCKET - 3;
-const int NPT_ERROR_HOST_UNKNOWN          = NPT_ERROR_BASE_SOCKET - 4;
-const int NPT_ERROR_SOCKET_FAILED         = NPT_ERROR_BASE_SOCKET - 5;
-const int NPT_ERROR_GETSOCKOPT_FAILED     = NPT_ERROR_BASE_SOCKET - 6;
-const int NPT_ERROR_SETSOCKOPT_FAILED     = NPT_ERROR_BASE_SOCKET - 7;
-const int NPT_ERROR_SOCKET_CONTROL_FAILED = NPT_ERROR_BASE_SOCKET - 8;
-const int NPT_ERROR_BIND_FAILED           = NPT_ERROR_BASE_SOCKET - 9;
-const int NPT_ERROR_LISTEN_FAILED         = NPT_ERROR_BASE_SOCKET - 10;
-const int NPT_ERROR_ACCEPT_FAILED         = NPT_ERROR_BASE_SOCKET - 11;
-const int NPT_ERROR_ADDRESS_IN_USE        = NPT_ERROR_BASE_SOCKET - 12;
-const int NPT_ERROR_NETWORK_DOWN          = NPT_ERROR_BASE_SOCKET - 13;
-const int NPT_ERROR_NETWORK_UNREACHABLE   = NPT_ERROR_BASE_SOCKET - 14;
-const int NPT_ERROR_NOT_CONNECTED         = NPT_ERROR_BASE_SOCKET - 15;
-
-const unsigned int NPT_SOCKET_FLAG_CANCELLABLE = 1; // make the socket cancellable
-
-/*----------------------------------------------------------------------
-|   forward references
-+---------------------------------------------------------------------*/
-class NPT_Socket;
-
-/*----------------------------------------------------------------------
-|   NPT_SocketAddress
-+---------------------------------------------------------------------*/
-class NPT_SocketAddress 
-{
-public:
-    // constructors and destructor
-    NPT_SocketAddress() : m_Port(0) {}
-    NPT_SocketAddress(const NPT_IpAddress& address, NPT_IpPort port) :
-        m_IpAddress(address),
-        m_Port(port) {}
-
-    // methods
-    NPT_Result SetIpAddress(const NPT_IpAddress& address) {
-        m_IpAddress = address;
-        return NPT_SUCCESS;
-    }
-    const NPT_IpAddress& GetIpAddress() const { 
-        return m_IpAddress; 
-    }
-    NPT_Result SetPort(NPT_IpPort port) { 
-        m_Port = port; 
-        return NPT_SUCCESS; 
-    }
-    NPT_IpPort GetPort() const { 
-        return m_Port; 
-    }
-    NPT_String ToString() const;
-
-    // operators
-    bool operator==(const NPT_SocketAddress& other) const;
-
-private:
-    // members
-    NPT_IpAddress m_IpAddress;
-    NPT_IpPort    m_Port;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_SocketInfo
-+---------------------------------------------------------------------*/
-typedef struct {
-    NPT_SocketAddress local_address;
-    NPT_SocketAddress remote_address;
-} NPT_SocketInfo;
-
-/*----------------------------------------------------------------------
-|   NPT_SocketInterface
-+---------------------------------------------------------------------*/
-class NPT_SocketInterface
-{
- public:
-    virtual ~NPT_SocketInterface() {}
-
-    // interface methods
-    virtual NPT_Result Bind(const NPT_SocketAddress& address, bool reuse_address = true) = 0;
-    virtual NPT_Result Connect(const NPT_SocketAddress& address, NPT_Timeout timeout) = 0;
-    virtual NPT_Result WaitForConnection(NPT_Timeout timeout) = 0;
-    virtual NPT_Result GetInputStream(NPT_InputStreamReference& stream) = 0;
-    virtual NPT_Result GetOutputStream(NPT_OutputStreamReference& stream) = 0;
-    virtual NPT_Result GetInfo(NPT_SocketInfo& info) = 0;
-    virtual NPT_Result SetReadTimeout(NPT_Timeout timeout) = 0;
-    virtual NPT_Result SetWriteTimeout(NPT_Timeout timeout) = 0;
-    virtual NPT_Result Cancel(bool shutdown=true) = 0;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_UdpSocketInterface
-+---------------------------------------------------------------------*/
-class NPT_UdpSocketInterface
-{
- public:
-    virtual ~NPT_UdpSocketInterface() {}
-
-    // methods
-    virtual NPT_Result Send(const NPT_DataBuffer&    packet, 
-                            const NPT_SocketAddress* address = NULL) = 0;
-    virtual NPT_Result Receive(NPT_DataBuffer&    packet, 
-                               NPT_SocketAddress* address = NULL) = 0;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_UdpMulticastSocketInterface
-+---------------------------------------------------------------------*/
-class NPT_UdpMulticastSocketInterface
-{
- public:
-    virtual ~NPT_UdpMulticastSocketInterface() {}
-
-    // methods
-    virtual NPT_Result JoinGroup(const NPT_IpAddress& group, 
-                                 const NPT_IpAddress& iface) = 0;
-    virtual NPT_Result LeaveGroup(const NPT_IpAddress& group,
-                                  const NPT_IpAddress& iface) = 0;
-    virtual NPT_Result SetTimeToLive(unsigned char ttl) = 0;
-    virtual NPT_Result SetInterface(const NPT_IpAddress& iface) = 0;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_TcpServerSocketInterface
-+---------------------------------------------------------------------*/
-class NPT_TcpServerSocketInterface
-{
- public:
-    virtual ~NPT_TcpServerSocketInterface() {}
-
-    // interface methods
-    virtual NPT_Result Listen(unsigned int max_clients) = 0;
-    virtual NPT_Result WaitForNewClient(NPT_Socket*& client, 
-                                        NPT_Timeout  timeout,
-                                        NPT_Flags    flags) = 0;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_Socket
-+---------------------------------------------------------------------*/
-class NPT_Socket : public NPT_SocketInterface
-{
-public:
-    // constructor and destructor
-    explicit NPT_Socket(NPT_SocketInterface* delegate) : m_SocketDelegate(delegate) {}
-    virtual ~NPT_Socket();
-
-    // delegate NPT_SocketInterface methods
-    NPT_Result Bind(const NPT_SocketAddress& address, bool reuse_address = true) {             
-        return m_SocketDelegate->Bind(address, reuse_address);                            
-    }                                                               
-    NPT_Result Connect(const NPT_SocketAddress& address,            
-                       NPT_Timeout timeout = NPT_TIMEOUT_INFINITE) {
-       return m_SocketDelegate->Connect(address, timeout);                 
-    }                                                               
-    NPT_Result WaitForConnection(NPT_Timeout timeout = NPT_TIMEOUT_INFINITE) {
-        return m_SocketDelegate->WaitForConnection(timeout);                 
-    } 
-    NPT_Result GetInputStream(NPT_InputStreamReference& stream) {   
-        return m_SocketDelegate->GetInputStream(stream);                   
-    }                                                               
-    NPT_Result GetOutputStream(NPT_OutputStreamReference& stream) { 
-    return m_SocketDelegate->GetOutputStream(stream);                      
-    }                                                               
-    NPT_Result GetInfo(NPT_SocketInfo& info) {                      
-        return m_SocketDelegate->GetInfo(info);                            
-    }                                                               
-    NPT_Result SetReadTimeout(NPT_Timeout timeout) {                      
-        return m_SocketDelegate->SetReadTimeout(timeout);                            
-    }                                                          
-    NPT_Result SetWriteTimeout(NPT_Timeout timeout) {                      
-        return m_SocketDelegate->SetWriteTimeout(timeout);                            
-    }                                                          
-    NPT_Result Cancel(bool shutdown=true) {                      
-        return m_SocketDelegate->Cancel(shutdown);                            
-    }                                                          
-
-protected:
-    // constructor
-    NPT_Socket() {}
-
-    // members
-    NPT_SocketInterface* m_SocketDelegate;
-};
-
-typedef NPT_Reference<NPT_Socket> NPT_SocketReference;
-
-/*----------------------------------------------------------------------
-|   NPT_UdpSocket
-+---------------------------------------------------------------------*/
-class NPT_UdpSocket : public NPT_Socket,
-                      public NPT_UdpSocketInterface
-{
- public:
-    // constructor and destructor
-             NPT_UdpSocket(NPT_Flags flags=NPT_SOCKET_FLAG_CANCELLABLE);
-    virtual ~NPT_UdpSocket();
-
-    // delegate NPT_UdpSocketInterface methods
-    NPT_Result Send(const NPT_DataBuffer&    packet,           
-                    const NPT_SocketAddress* address = NULL) {
-        return m_UdpSocketDelegate->Send(packet, address);              
-    }                                                         
-    NPT_Result Receive(NPT_DataBuffer&     packet,            
-                       NPT_SocketAddress*  address = NULL) {  
-        return m_UdpSocketDelegate->Receive(packet, address);           
-    }
-
-protected:
-    // constructor
-    NPT_UdpSocket(NPT_UdpSocketInterface* delegate);
-
-    // members
-    NPT_UdpSocketInterface* m_UdpSocketDelegate;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_UdpMulticastSocket
-+---------------------------------------------------------------------*/
-class NPT_UdpMulticastSocket : public NPT_UdpSocket, 
-                               public NPT_UdpMulticastSocketInterface
-{
-public:
-    // constructor and destructor
-             NPT_UdpMulticastSocket(NPT_Flags flags=NPT_SOCKET_FLAG_CANCELLABLE);
-    virtual ~NPT_UdpMulticastSocket();
-
-    // delegate NPT_UdpMulticastSocketInterface methods
-    NPT_Result JoinGroup(const NPT_IpAddress& group,            
-                         const NPT_IpAddress& iface =           
-                         NPT_IpAddress::Any) {                  
-        return m_UdpMulticastSocketDelegate->JoinGroup(group, iface);
-    }                                                           
-    NPT_Result LeaveGroup(const NPT_IpAddress& group,           
-                          const NPT_IpAddress& iface =          
-                          NPT_IpAddress::Any) {                 
-        return m_UdpMulticastSocketDelegate->LeaveGroup(group, iface);
-    }                                                          
-    NPT_Result SetTimeToLive(unsigned char ttl) {     
-        return m_UdpMulticastSocketDelegate->SetTimeToLive(ttl); 
-    }
-    NPT_Result SetInterface(const NPT_IpAddress& iface) {
-        return m_UdpMulticastSocketDelegate->SetInterface(iface);
-    }
-
-protected:
-    // members
-    NPT_UdpMulticastSocketInterface* m_UdpMulticastSocketDelegate;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_TcpClientSocket
-+---------------------------------------------------------------------*/
-class NPT_TcpClientSocket : public NPT_Socket
-{
-public:
-    // constructors and destructor
-             NPT_TcpClientSocket(NPT_Flags flags=NPT_SOCKET_FLAG_CANCELLABLE);
-    virtual ~NPT_TcpClientSocket();
-};
-
-/*----------------------------------------------------------------------
-|   NPT_TcpServerSocket
-+---------------------------------------------------------------------*/
-class NPT_TcpServerSocket : public NPT_Socket,
-                            public NPT_TcpServerSocketInterface
-{
-public:
-    // constructors and destructor
-             NPT_TcpServerSocket(NPT_Flags flags=NPT_SOCKET_FLAG_CANCELLABLE);
-    virtual ~NPT_TcpServerSocket();
-
-    // delegate NPT_TcpServerSocketInterface methods
-    NPT_Result Listen(unsigned int max_clients) {   
-        return m_TcpServerSocketDelegate->Listen(max_clients);
-    }
-    NPT_Result WaitForNewClient(NPT_Socket*& client, 
-                                NPT_Timeout  timeout = NPT_TIMEOUT_INFINITE,
-                                NPT_Flags    flags = 0) {
-        return m_TcpServerSocketDelegate->WaitForNewClient(client, timeout, flags);
-    }
-
-protected:
-    // members
-    NPT_TcpServerSocketInterface* m_TcpServerSocketDelegate;
-};
-
-#endif // _NPT_SOCKETS_H_
diff --git a/extra_lib/include/platinum/NptStack.h b/extra_lib/include/platinum/NptStack.h
deleted file mode 100644
index 5078805..0000000
--- a/extra_lib/include/platinum/NptStack.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Stack
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
-****************************************************************/
-
-#ifndef _NPT_STACK_H_
-#define _NPT_STACK_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptResults.h"
-#include "NptTypes.h"
-#include "NptList.h"
-
-/*----------------------------------------------------------------------
-|   NPT_Stack
-+---------------------------------------------------------------------*/
-template <typename T> 
-class NPT_Stack : public NPT_List<T>
-{
-public:
-    // methods
-    NPT_Result Push(const T& value) {
-        // NOTE: we must use the this-> accessor here because the standard
-        // requires it when the member to look up is in a parent template
-        return this->Add(value);
-    }
-
-    NPT_Result Peek(T& value) {
-        // NOTE: we must use the this-> accessor here because the standard
-        // requires it when the member to look up is in a parent template
-        if (this->m_ItemCount == 0) return NPT_ERROR_NO_SUCH_ITEM;
-        value = this->m_Tail->m_Data;
-        return NPT_SUCCESS;
-    }
-
-    NPT_Result Pop(T& value) {
-        // NOTE: we must use the this-> accessor here because the standard
-        // requires it when the member to look up is in a parent template
-        if (this->m_ItemCount == 0) return NPT_ERROR_NO_SUCH_ITEM;
-        typename NPT_List<T>::Iterator tail = this->GetLastItem();
-        value = *tail;
-        return this->Erase(tail);
-    }
-};
-
-#endif // _NPT_STACK_H_
diff --git a/extra_lib/include/platinum/NptStreams.h b/extra_lib/include/platinum/NptStreams.h
deleted file mode 100644
index 6d9ecc5..0000000
--- a/extra_lib/include/platinum/NptStreams.h
+++ /dev/null
@@ -1,321 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Byte Streams
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_STREAMS_H_
-#define _NPT_STREAMS_H_
-
-/*----------------------------------------------------------------------
-|    includes
-+---------------------------------------------------------------------*/
-#include "NptTypes.h"
-#include "NptReferences.h"
-#include "NptConstants.h"
-#include "NptResults.h"
-#include "NptDataBuffer.h"
-#include "NptStrings.h"
-
-/*----------------------------------------------------------------------
-|    class references
-+---------------------------------------------------------------------*/
-class NPT_String;
-
-/*----------------------------------------------------------------------
-|    constants
-+---------------------------------------------------------------------*/
-const int NPT_ERROR_READ_FAILED  = NPT_ERROR_BASE_IO - 0;
-const int NPT_ERROR_WRITE_FAILED = NPT_ERROR_BASE_IO - 1;
-const int NPT_ERROR_EOS          = NPT_ERROR_BASE_IO - 2;
-
-/*----------------------------------------------------------------------
-|    NPT_InputStream
-+---------------------------------------------------------------------*/
-class NPT_InputStream
-{
- public:
-    // constructor and destructor
-    virtual ~NPT_InputStream() {};
-
-    // methods
-    virtual NPT_Result Load(NPT_DataBuffer& buffer, NPT_Size max_read = 0);
-    virtual NPT_Result Read(void*     buffer, 
-                            NPT_Size  bytes_to_read, 
-                            NPT_Size* bytes_read = NULL) = 0;
-    virtual NPT_Result ReadFully(void*     buffer, 
-                                 NPT_Size  bytes_to_read);
-    virtual NPT_Result Seek(NPT_Position offset) = 0;
-    virtual NPT_Result Skip(NPT_Size offset);
-    virtual NPT_Result Tell(NPT_Position& offset) = 0;
-    virtual NPT_Result GetSize(NPT_LargeSize& size) = 0;
-    virtual NPT_Result GetAvailable(NPT_LargeSize& available) = 0;
-    
-    // data access methods
-    NPT_Result ReadUI64(NPT_UInt64& value);
-    NPT_Result ReadUI32(NPT_UInt32& value);
-    NPT_Result ReadUI24(NPT_UInt32& value);
-    NPT_Result ReadUI16(NPT_UInt16& value);
-    NPT_Result ReadUI08(NPT_UInt8&  value);    
-};
-
-typedef NPT_Reference<NPT_InputStream> NPT_InputStreamReference;
-
-/*----------------------------------------------------------------------
-|    NPT_OutputStream
-+---------------------------------------------------------------------*/
-class NPT_OutputStream
-{
-public:
-    // constructor and destructor
-    virtual ~NPT_OutputStream() {};
-
-    // methods
-    virtual NPT_Result Write(const void* buffer, 
-                             NPT_Size    bytes_to_write, 
-                             NPT_Size*   bytes_written = NULL) = 0;
-    virtual NPT_Result WriteFully(const void* buffer, 
-                                  NPT_Size    bytes_to_write);
-    virtual NPT_Result WriteString(const char* string_buffer);
-    virtual NPT_Result WriteLine(const char* line_buffer);
-    virtual NPT_Result Seek(NPT_Position offset) = 0;
-    virtual NPT_Result Tell(NPT_Position& offset) = 0;
-    virtual NPT_Result Flush() { return NPT_SUCCESS; }
-    
-    // data access methods
-    NPT_Result WriteUI64(NPT_UInt64 value);
-    NPT_Result WriteUI32(NPT_UInt32 value);
-    NPT_Result WriteUI24(NPT_UInt32 value);
-    NPT_Result WriteUI16(NPT_UInt16 value);
-    NPT_Result WriteUI08(NPT_UInt8  value);    
-};
-
-typedef NPT_Reference<NPT_OutputStream> NPT_OutputStreamReference;
-
-/*----------------------------------------------------------------------
-|    NPT_StreamToStreamCopy
-+---------------------------------------------------------------------*/
-NPT_Result NPT_StreamToStreamCopy(NPT_InputStream&  from, 
-                                  NPT_OutputStream& to,
-                                  NPT_Position      offset = 0,
-                                  NPT_LargeSize     size   = 0, /* 0 means the entire stream */
-                                  NPT_LargeSize*    bytes_written = NULL);
-
-/*----------------------------------------------------------------------
-|    NPT_DelegatingInputStream
-|
-|    Use this class as a base class if you need to inherit both from
-|    NPT_InputStream and NPT_OutputStream which share the Seek and Tell
-|    method. In this case, you override the  base-specific version of 
-|    those methods, InputSeek, InputTell, instead of the Seek and Tell 
-|    methods.
-+---------------------------------------------------------------------*/
-class NPT_DelegatingInputStream : public NPT_InputStream
-{
-public:
-    // NPT_InputStream methods
-    NPT_Result Seek(NPT_Position offset) {
-        return InputSeek(offset);
-    }
-    NPT_Result Tell(NPT_Position& offset) {
-        return InputTell(offset);
-    }
-
-private:
-    // methods
-    virtual NPT_Result InputSeek(NPT_Position  offset) = 0;
-    virtual NPT_Result InputTell(NPT_Position& offset) = 0;
-};
-
-/*----------------------------------------------------------------------
-|    NPT_DelegatingOutputStream
-|
-|    Use this class as a base class if you need to inherit both from
-|    NPT_InputStream and NPT_OutputStream which share the Seek and Tell
-|    method. In this case, you override the  base-specific version of 
-|    those methods, OutputSeek and OutputTell, instead of the Seek and 
-|    Tell methods.
-+---------------------------------------------------------------------*/
-class NPT_DelegatingOutputStream : public NPT_OutputStream
-{
-public:
-    // NPT_OutputStream methods
-    NPT_Result Seek(NPT_Position offset) {
-        return OutputSeek(offset);
-    }
-    NPT_Result Tell(NPT_Position& offset) {
-        return OutputTell(offset);
-    }
-
-private:
-    // methods
-    virtual NPT_Result OutputSeek(NPT_Position  offset) = 0;
-    virtual NPT_Result OutputTell(NPT_Position& offset) = 0;
-};
-
-/*----------------------------------------------------------------------
-|    NPT_MemoryStream
-+---------------------------------------------------------------------*/
-class NPT_MemoryStream : 
-    public NPT_DelegatingInputStream,
-    public NPT_DelegatingOutputStream
-{
-public:
-    // constructor and destructor
-    NPT_MemoryStream(NPT_Size initial_capacity = 0);
-    NPT_MemoryStream(const void* data, NPT_Size size);
-    virtual ~NPT_MemoryStream() {}
-
-    // accessors
-    const NPT_DataBuffer& GetBuffer() const { return m_Buffer; }
-
-    // NPT_InputStream methods
-    NPT_Result Read(void*     buffer, 
-                    NPT_Size  bytes_to_read, 
-                    NPT_Size* bytes_read = NULL);
-    NPT_Result GetSize(NPT_LargeSize& size)  { 
-        size = m_Buffer.GetDataSize();    
-        return NPT_SUCCESS;
-    }
-    NPT_Result GetAvailable(NPT_LargeSize& available) { 
-        available = (NPT_LargeSize)m_Buffer.GetDataSize()-m_ReadOffset; 
-        return NPT_SUCCESS;
-    }
-
-    // NPT_OutputStream methods
-    NPT_Result Write(const void* buffer, 
-                     NPT_Size    bytes_to_write, 
-                     NPT_Size*   bytes_written = NULL);
-
-    // methods delegated to m_Buffer
-    const NPT_Byte* GetData() const { return m_Buffer.GetData(); }
-    NPT_Byte*       UseData()       { return m_Buffer.UseData(); }
-    NPT_Size        GetDataSize() const   { return m_Buffer.GetDataSize(); }
-    NPT_Size        GetBufferSize() const { return m_Buffer.GetBufferSize();}
-
-    // methods
-    NPT_Result SetDataSize(NPT_Size size);
-
-private:
-    // NPT_DelegatingInputStream methods
-    NPT_Result InputSeek(NPT_Position offset);
-    NPT_Result InputTell(NPT_Position& offset) { 
-        offset = m_ReadOffset; 
-        return NPT_SUCCESS;
-    }
-
-    // NPT_DelegatingOutputStream methods
-    NPT_Result OutputSeek(NPT_Position offset);
-    NPT_Result OutputTell(NPT_Position& offset) {
-        offset = m_WriteOffset; 
-        return NPT_SUCCESS;
-    }
-
-protected:
-    // members
-    NPT_DataBuffer m_Buffer;
-    NPT_Size       m_ReadOffset;
-    NPT_Size       m_WriteOffset;
-};
-
-typedef NPT_Reference<NPT_MemoryStream> NPT_MemoryStreamReference;
-
-/*----------------------------------------------------------------------
-|   NPT_StringOutputStream
-+---------------------------------------------------------------------*/
-class NPT_StringOutputStream : public NPT_OutputStream
-{
-public:
-    // methods
-    NPT_StringOutputStream(NPT_Size size = 4096);
-    NPT_StringOutputStream(NPT_String* storage);
-    virtual ~NPT_StringOutputStream() ;
-
-    const NPT_String& GetString() const { return *m_String; }
-    NPT_Result Reset() { if (m_String) m_String->SetLength(0); return NPT_SUCCESS; }
-
-    // NPT_OutputStream methods
-    NPT_Result Write(const void* buffer, NPT_Size bytes_to_write, NPT_Size* bytes_written = NULL);
-
-    NPT_Result Seek(NPT_Position /*offset*/)  { return NPT_ERROR_NOT_SUPPORTED;   }
-    NPT_Result Tell(NPT_Position& offset) { offset = m_String->GetLength(); return NPT_SUCCESS; }
-
-protected:
-    NPT_String* m_String;
-    bool        m_StringIsOwned;
-};
-
-typedef NPT_Reference<NPT_StringOutputStream> NPT_StringOutputStreamReference;
-
-/*----------------------------------------------------------------------
-|   NPT_SubInputStream
-+---------------------------------------------------------------------*/
-class NPT_SubInputStream : public NPT_InputStream
-{
-public:
-    // constructor and destructor
-    NPT_SubInputStream(NPT_InputStreamReference& source, 
-                       NPT_Position              start,
-                       NPT_LargeSize             size); 
-
-    // methods
-    virtual NPT_Result Read(void*     buffer, 
-                            NPT_Size  bytes_to_read, 
-                            NPT_Size* bytes_read = NULL) = 0;
-    virtual NPT_Result Seek(NPT_Position offset) = 0;
-    virtual NPT_Result Tell(NPT_Position& offset) = 0;
-    virtual NPT_Result GetSize(NPT_LargeSize& size) = 0;
-    virtual NPT_Result GetAvailable(NPT_LargeSize& available) = 0;
-
-private:
-    NPT_InputStreamReference m_Source;
-    NPT_Position             m_Position;
-    NPT_Position             m_Start;
-    NPT_LargeSize            m_Size;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_NullOutputStream
-+---------------------------------------------------------------------*/
-class NPT_NullOutputStream : public NPT_OutputStream
-{
-public:
-    // methods
-    NPT_NullOutputStream() {}
-    virtual ~NPT_NullOutputStream() {}
-
-    // NPT_OutputStream methods
-    NPT_Result Write(const void* buffer, NPT_Size bytes_to_write, NPT_Size* bytes_written = NULL);
-
-    NPT_Result Seek(NPT_Position /*offset*/)  { return NPT_ERROR_NOT_SUPPORTED;   }
-    NPT_Result Tell(NPT_Position& /*offset*/)  { return NPT_ERROR_NOT_SUPPORTED;   }
-};
-
-typedef NPT_Reference<NPT_NullOutputStream> NPT_NullOutputStreamReference;
-
-#endif // _NPT_STREAMS_H_
diff --git a/extra_lib/include/platinum/NptStrings.h b/extra_lib/include/platinum/NptStrings.h
deleted file mode 100644
index c445b33..0000000
--- a/extra_lib/include/platinum/NptStrings.h
+++ /dev/null
@@ -1,358 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - String Objects
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_STRINGS_H_
-#define _NPT_STRINGS_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptConfig.h"
-#if defined(NPT_CONFIG_HAVE_NEW_H)
-#include <new>
-#endif
-#include "NptTypes.h"
-#include "NptConstants.h"
-#include "NptList.h"
-#include "NptArray.h"
-#include "NptDebug.h"
-#include "NptHash.h"
-
-/*----------------------------------------------------------------------
-|   constants
-+---------------------------------------------------------------------*/
-const int NPT_STRING_SEARCH_FAILED = -1;
-
-/*----------------------------------------------------------------------
-|   NPT_String
-+---------------------------------------------------------------------*/
-class NPT_String
-{
-public:
-    // factories
-    static NPT_String FromInteger(NPT_Int64 value);
-    static NPT_String FromIntegerU(NPT_UInt64 value);
-    static NPT_String Format(const char* format, ...);
-    
-    // constructors
-    NPT_String(const NPT_String& str);
-    NPT_String(const char* str);
-    NPT_String(const char* str, NPT_Size length);
-    NPT_String(char c, NPT_Cardinal repeat = 1);
-    NPT_String() : m_Chars(NULL) {}
-   ~NPT_String() { if (m_Chars) GetBuffer()->Destroy(); }
-
-    // string info and manipulations
-    bool       IsEmpty() const { return m_Chars == NULL || GetBuffer()->GetLength() == 0; }
-    NPT_Size   GetLength()   const { return m_Chars ? GetBuffer()->GetLength() : 0;    }
-    NPT_Size   GetCapacity() const { return m_Chars ? GetBuffer()->GetAllocated() : 0; }
-    NPT_Result SetLength(NPT_Size length, bool pad = false);
-    void       Assign(const char* chars, NPT_Size size);
-    void       Append(const char* chars, NPT_Size size);
-    void       Append(const char* s) { Append(s, StringLength(s)); }
-    int        Compare(const char* s, bool ignore_case = false) const;
-    static int Compare(const char* s1, const char* s2, bool ignore_case = false);
-    int        CompareN(const char* s, NPT_Size count, bool ignore_case = false) const;
-    static int CompareN(const char* s1, const char* s2, NPT_Size count, bool ignore_case = false);
-
-    // substrings
-    NPT_String SubString(NPT_Ordinal first, NPT_Size length) const;
-    NPT_String SubString(NPT_Ordinal first) const {
-        return SubString(first, GetLength());
-    }
-    NPT_String Left(NPT_Size length) const {
-        return SubString(0, length);
-    }
-    NPT_String Right(NPT_Size length) const {
-        return length >= GetLength() ? 
-               *this : 
-               SubString(GetLength()-length, length);
-    }
-    NPT_List<NPT_String> Split(const char* separator) const;
-    NPT_Array<NPT_String> SplitAny(const char* separator) const;
-    static NPT_String Join(NPT_List<NPT_String>& args, const char* separator);
-    
-    // buffer management
-    void       Reserve(NPT_Size length);
-
-    // hashing
-    NPT_UInt32 GetHash32() const;
-    NPT_UInt64 GetHash64() const;
-
-    // conversions
-    NPT_String ToLowercase() const;
-    NPT_String ToUppercase() const;
-    NPT_Result ToInteger(int& value, bool relaxed = true) const;
-    NPT_Result ToInteger(unsigned int& value, bool relaxed = true) const;
-    NPT_Result ToInteger(long& value, bool relaxed = true) const;
-    NPT_Result ToInteger(unsigned long& value, bool relaxed = true) const;
-    NPT_Result ToInteger32(NPT_Int32& value, bool relaxed = true) const;
-    NPT_Result ToInteger32(NPT_UInt32& value, bool relaxed = true) const;
-    NPT_Result ToInteger64(NPT_Int64& value, bool relaxed = true) const;
-    NPT_Result ToInteger64(NPT_UInt64& value, bool relaxed = true) const;
-    NPT_Result ToFloat(float& value, bool relaxed = true) const;
-    
-    // processing
-    void MakeLowercase();
-    void MakeUppercase();
-    const NPT_String& Replace(char a, char b);
-    const NPT_String& Replace(char a, const char* b);
-
-    // search
-    int  Find(char c, NPT_Ordinal start = 0, bool ignore_case = false) const;
-    int  Find(const char* s, NPT_Ordinal start = 0, bool ignore_case = false) const;
-    int  FindAny(const char* s, NPT_Ordinal start, bool ignore_case = false) const;
-    int  ReverseFind(char c, NPT_Ordinal start = 0, bool ignore_case = false) const;
-    int  ReverseFind(const char* s, NPT_Ordinal start = 0, bool ignore_case = false) const;
-    bool StartsWith(const char* s, bool ignore_case = false) const;
-    bool EndsWith(const char* s, bool ignore_case = false) const;
-
-    // editing
-    const NPT_String& Insert(const char* s, NPT_Ordinal where = 0);
-    const NPT_String& Erase(NPT_Ordinal start, NPT_Cardinal count = 1);
-    const NPT_String& Replace(const char* before, const char* after);
-    // void Replace(NPT_Ordinal start, NPT_Cardinal count, const char* s);
-    const NPT_String& TrimLeft();
-    const NPT_String& TrimLeft(char c);
-    const NPT_String& TrimLeft(const char* chars);
-    const NPT_String& TrimRight();
-    const NPT_String& TrimRight(char c);
-    const NPT_String& TrimRight(const char* chars);
-    const NPT_String& Trim();
-    const NPT_String& Trim(char c);
-    const NPT_String& Trim(const char* chars);
-
-    // type casting
-    operator char*() const        { return m_Chars ? m_Chars: &EmptyString; }
-    operator const char* () const { return m_Chars ? m_Chars: &EmptyString; }
-    const char* GetChars() const  { return m_Chars ? m_Chars: &EmptyString; }
-    char*       UseChars()        { return m_Chars ? m_Chars: &EmptyString; }
-
-    // operator overloading
-    NPT_String& operator=(const char* str);
-    NPT_String& operator=(const NPT_String& str);
-    NPT_String& operator=(char c);
-    const NPT_String& operator+=(const NPT_String& s) {
-        Append(s.GetChars(), s.GetLength());
-        return *this;
-    }
-    const NPT_String& operator+=(const char* s) {
-        Append(s);
-        return *this;
-    }
-    const NPT_String& operator+=(char c) {
-        Append(&c, 1);
-        return *this;
-    }
-    char operator[](int index) const {
-        NPT_ASSERT((unsigned int)index < GetLength());
-        return GetChars()[index];
-    }
-    char& operator[](int index) {
-        NPT_ASSERT((unsigned int)index < GetLength());
-        return UseChars()[index];
-    }
-
-    // friend operators
-    friend NPT_String operator+(const NPT_String& s1, const NPT_String& s2) {
-        return s1+s2.GetChars();
-    }
-    friend NPT_String operator+(const NPT_String& s1, const char* s2);
-    friend NPT_String operator+(const char* s1, const NPT_String& s2);
-    friend NPT_String operator+(const NPT_String& s, char c);
-    friend NPT_String operator+(char c, const NPT_String& s);
-
-protected:
-    // inner classes
-    class Buffer {
-    public:
-        // class methods
-        static Buffer* Allocate(NPT_Size allocated, NPT_Size length) {
-            void* mem = ::operator new(sizeof(Buffer)+allocated+1);
-            return new(mem) Buffer(allocated, length);
-        }
-        static char* Create(NPT_Size allocated, NPT_Size length=0) {
-            Buffer* shared = Allocate(allocated, length);
-            return shared->GetChars();
-        }
-        static char* Create(const char* copy) {
-            NPT_Size length = StringLength(copy);
-            Buffer* shared = Allocate(length, length);
-            CopyString(shared->GetChars(), copy);
-            return shared->GetChars();
-        }
-        static char* Create(const char* copy, NPT_Size length) {
-            Buffer* shared = Allocate(length, length);
-            CopyBuffer(shared->GetChars(), copy, length);
-            shared->GetChars()[length] = '\0';
-            return shared->GetChars();
-        }
-        static char* Create(char c, NPT_Cardinal repeat) {
-            Buffer* shared = Allocate(repeat, repeat);
-            char* s = shared->GetChars();
-            while (repeat--) {
-                *s++ = c;
-            }
-            *s = '\0';
-            return shared->GetChars();
-        }
-
-        // methods
-        char* GetChars() { 
-            // return a pointer to the first char
-            return reinterpret_cast<char*>(this+1); 
-        }
-        NPT_Size GetLength() const      { return m_Length; }
-        void SetLength(NPT_Size length) { m_Length = length; }
-        NPT_Size GetAllocated() const   { return m_Allocated; }
-        void Destroy() { ::operator delete((void*)this); }
-        
-    private:
-        // methods
-        Buffer(NPT_Size allocated, NPT_Size length = 0) : 
-            m_Length(length),
-            m_Allocated(allocated) {}
-        
-        // members
-        NPT_Cardinal m_Length;
-        NPT_Cardinal m_Allocated;
-        // the actual string data follows
-
-    };
-    
-    // members
-    char* m_Chars;
-
-private:
-    // friends
-    friend class Buffer;
-
-    // static members
-    static char EmptyString;
-
-    // methods
-    Buffer* GetBuffer() const { 
-        return reinterpret_cast<Buffer*>(m_Chars)-1;
-    }
-    void Reset() { 
-        if (m_Chars != NULL) {
-            delete GetBuffer(); 
-            m_Chars = NULL;
-        }
-    }
-    char* PrepareToWrite(NPT_Size length);
-    void PrepareToAppend(NPT_Size length, NPT_Size allocate);
-
-    // static methods
-    static void CopyString(char* dst, const char* src) {
-        while ((*dst++ = *src++)){}
-    }
-    
-    static void CopyBuffer(char* dst, const char* src, NPT_Size size) {
-        while (size--) *dst++ = *src++;
-    }
-    
-    static NPT_Size StringLength(const char* str) {
-        NPT_Size length = 0;
-        while (*str++) length++;
-        return length;
-    }
-};
-
-/*----------------------------------------------------------------------
-|   external operators
-+---------------------------------------------------------------------*/
-inline bool operator==(const NPT_String& s1, const NPT_String& s2) { 
-    return s1.Compare(s2) == 0; 
-}
-inline bool operator==(const NPT_String& s1, const char* s2) {
-    return s1.Compare(s2) == 0; 
-}
-inline bool operator==(const char* s1, const NPT_String& s2) {
-    return s2.Compare(s1) == 0; 
-}
-inline bool operator!=(const NPT_String& s1, const NPT_String& s2) {
-    return s1.Compare(s2) != 0; 
-}
-inline bool operator!=(const NPT_String& s1, const char* s2) {
-    return s1.Compare(s2) != 0; 
-}
-inline bool operator!=(const char* s1, const NPT_String& s2) {
-    return s2.Compare(s1) != 0; 
-}
-inline bool operator<(const NPT_String& s1, const NPT_String& s2) {
-    return s1.Compare(s2) < 0; 
-}
-inline bool operator<(const NPT_String& s1, const char* s2) {
-    return s1.Compare(s2) < 0; 
-}
-inline bool operator<(const char* s1, const NPT_String& s2) {
-    return s2.Compare(s1) > 0; 
-}
-inline bool operator>(const NPT_String& s1, const NPT_String& s2) {
-    return s1.Compare(s2) > 0; 
-}
-inline bool operator>(const NPT_String& s1, const char* s2) {
-    return s1.Compare(s2) > 0; 
-}
-inline bool operator>(const char* s1, const NPT_String& s2) {
-    return s2.Compare(s1) < 0; 
-}
-inline bool operator<=(const NPT_String& s1, const NPT_String& s2) {
-    return s1.Compare(s2) <= 0; 
-}
-inline bool operator<=(const NPT_String& s1, const char* s2) {
-    return s1.Compare(s2) <= 0; 
-}
-inline bool operator<=(const char* s1, const NPT_String& s2) {
-    return s2.Compare(s1) >= 0; 
-}
-inline bool operator>=(const NPT_String& s1, const NPT_String& s2) {
-    return s1.Compare(s2) >= 0; 
-}
-inline bool operator>=(const NPT_String& s1, const char* s2) {
-    return s1.Compare(s2) >= 0; 
-}
-inline bool operator>=(const char* s1, const NPT_String& s2) {
-    return s2.Compare(s1) <= 0; 
-}
-
-/*----------------------------------------------------------------------
-|   hashing
-+---------------------------------------------------------------------*/
-template <>
-struct NPT_Hash<NPT_String>
-{
-    NPT_UInt32 operator()(const NPT_String& s) const { return s.GetHash32(); }
-};
-
-
-#endif // _NPT_STRINGS_H_
diff --git a/extra_lib/include/platinum/NptSystem.h b/extra_lib/include/platinum/NptSystem.h
deleted file mode 100644
index 224a058..0000000
--- a/extra_lib/include/platinum/NptSystem.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - System
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_SYSTEM_H_
-#define _NPT_SYSTEM_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptTypes.h"
-#include "NptTime.h"
-
-/*----------------------------------------------------------------------
-|   NPT_System
-+---------------------------------------------------------------------*/
-class NPT_System
-{
-public:
-    // methods
-    static NPT_Result GetProcessId(NPT_UInt32& id);
-    static NPT_Result GetMachineName(NPT_String& name);
-    static NPT_Result GetCurrentTimeStamp(NPT_TimeStamp& now);
-    static NPT_Result Sleep(const NPT_TimeInterval& duration);
-    static NPT_Result SleepUntil(const NPT_TimeStamp& when);
-    static NPT_Result SetRandomSeed(unsigned int seed);
-    static NPT_UInt32 GetRandomInteger();
-    
-protected:
-    // constructor
-    NPT_System() {}
-};
-
-NPT_Result NPT_GetSystemMachineName(NPT_String& name);
-
-#endif // _NPT_SYSTEM_H_
diff --git a/extra_lib/include/platinum/NptThreads.h b/extra_lib/include/platinum/NptThreads.h
deleted file mode 100644
index 9a7455f..0000000
--- a/extra_lib/include/platinum/NptThreads.h
+++ /dev/null
@@ -1,318 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Threads
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_THREADS_H_
-#define _NPT_THREADS_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptTypes.h"
-#include "NptConstants.h"
-#include "NptInterfaces.h"
-
-/*----------------------------------------------------------------------
-|   error codes
-+---------------------------------------------------------------------*/
-const int NPT_ERROR_CALLBACK_HANDLER_SHUTDOWN = NPT_ERROR_BASE_THREADS-0;
-const int NPT_ERROR_CALLBACK_NOTHING_PENDING  = NPT_ERROR_BASE_THREADS-1;
-
-/*----------------------------------------------------------------------
-|   constants
-+---------------------------------------------------------------------*/
-const int NPT_THREAD_PRIORITY_MIN           = -15;
-const int NPT_THREAD_PRIORITY_IDLE          = -15;
-const int NPT_THREAD_PRIORITY_LOWEST        =  -2;
-const int NPT_THREAD_PRIORITY_BELOW_NORMAL  =  -1;
-const int NPT_THREAD_PRIORITY_NORMAL        =   0;
-const int NPT_THREAD_PRIORITY_ABOVE_NORMAL  =   1;
-const int NPT_THREAD_PRIORITY_HIGHEST       =   2;
-const int NPT_THREAD_PRIORITY_TIME_CRITICAL =  15;
-const int NPT_THREAD_PRIORITY_MAX           =  15;
-
-/*----------------------------------------------------------------------
-|   NPT_MutexInterface
-+---------------------------------------------------------------------*/
-class NPT_MutexInterface
-{
- public:
-    // methods
-    virtual           ~NPT_MutexInterface() {}
-    virtual NPT_Result Lock()   = 0;
-    virtual NPT_Result Unlock() = 0;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_Mutex
-+---------------------------------------------------------------------*/
-class NPT_Mutex : public NPT_MutexInterface
-{
- public:
-    // methods
-               NPT_Mutex();
-              ~NPT_Mutex() { delete m_Delegate; }
-    NPT_Result Lock()   { return m_Delegate->Lock();   }
-    NPT_Result Unlock() { return m_Delegate->Unlock(); }
-
- private:
-    // members
-    NPT_MutexInterface* m_Delegate;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_AutoLock
-+---------------------------------------------------------------------*/
-class NPT_AutoLock
-{
- public:
-    // methods
-     NPT_AutoLock(NPT_Mutex &mutex) : m_Mutex(mutex)   {
-        m_Mutex.Lock();
-    }
-    ~NPT_AutoLock() {
-        m_Mutex.Unlock(); 
-    }
-        
- private:
-    // members
-    NPT_Mutex& m_Mutex;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_Lock
-+---------------------------------------------------------------------*/
-template <typename T> 
-class NPT_Lock : public T,
-                 public NPT_Mutex
-{
-};
-
-/*----------------------------------------------------------------------
-|   NPT_SingletonLock
-+---------------------------------------------------------------------*/
-class NPT_SingletonLock
-{
-public:
-    static NPT_Mutex& GetInstance() {
-        return Instance;
-    }
-    
-private:
-    static NPT_Mutex Instance;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_SharedVariableInterface
-+---------------------------------------------------------------------*/
-class NPT_SharedVariableInterface
-{
- public:
-    // methods
-    virtual           ~NPT_SharedVariableInterface() {}
-    virtual void       SetValue(int value)= 0;
-    virtual int        GetValue()         = 0;
-    virtual NPT_Result WaitUntilEquals(int value, NPT_Timeout timeout = NPT_TIMEOUT_INFINITE) = 0;
-    virtual NPT_Result WaitWhileEquals(int value, NPT_Timeout timeout = NPT_TIMEOUT_INFINITE) = 0;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_SharedVariable
-+---------------------------------------------------------------------*/
-class NPT_SharedVariable : public NPT_SharedVariableInterface
-{
- public:
-    // methods
-               NPT_SharedVariable(int value = 0);
-              ~NPT_SharedVariable() { delete m_Delegate; }
-    void SetValue(int value) { 
-        m_Delegate->SetValue(value); 
-    }
-    int GetValue() { 
-        return m_Delegate->GetValue(); 
-    }
-    NPT_Result WaitUntilEquals(int value, NPT_Timeout timeout = NPT_TIMEOUT_INFINITE) { 
-        return m_Delegate->WaitUntilEquals(value, timeout); 
-    }
-    NPT_Result WaitWhileEquals(int value, NPT_Timeout timeout = NPT_TIMEOUT_INFINITE) { 
-        return m_Delegate->WaitWhileEquals(value, timeout); 
-    }
-
- private:
-    // members
-    NPT_SharedVariableInterface* m_Delegate;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_AtomicVariableInterface
-+---------------------------------------------------------------------*/
-class NPT_AtomicVariableInterface
-{
- public:
-    // methods
-    virtual      ~NPT_AtomicVariableInterface() {}
-    virtual  int  Increment() = 0;
-    virtual  int  Decrement() = 0;
-    virtual  int  GetValue()  = 0;
-    virtual  void SetValue(int value)  = 0;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_AtomicVariable
-+---------------------------------------------------------------------*/
-class NPT_AtomicVariable : public NPT_AtomicVariableInterface
-{
- public:
-    // methods
-         NPT_AtomicVariable(int value = 0);
-        ~NPT_AtomicVariable() { delete m_Delegate;             }
-    int  Increment()          { return m_Delegate->Increment();}
-    int  Decrement()          { return m_Delegate->Decrement();}
-    void SetValue(int value)  { m_Delegate->SetValue(value);   }
-    int  GetValue()           { return m_Delegate->GetValue(); }
-
- private:
-    // members
-    NPT_AtomicVariableInterface* m_Delegate;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_Runnable
-+---------------------------------------------------------------------*/
-class NPT_Runnable
-{
-public:
-    virtual ~NPT_Runnable() {}  
-    virtual void Run() = 0;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_ThreadInterface
-+---------------------------------------------------------------------*/
-class NPT_ThreadInterface: public NPT_Runnable, public NPT_Interruptible
-{
- public:
-    // methods
-    virtual           ~NPT_ThreadInterface() {}
-    virtual NPT_Result Start() = 0;
-    virtual NPT_Result Wait(NPT_Timeout timeout = NPT_TIMEOUT_INFINITE) = 0;
-    virtual NPT_Result SetPriority(int /*priority*/) { return NPT_SUCCESS; } 
-    virtual NPT_Result GetPriority(int& priority) = 0;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_Thread
-+---------------------------------------------------------------------*/
-class NPT_Thread : public NPT_ThreadInterface
-{
- public:
-    // types
-    typedef unsigned long ThreadId;
-
-    // class methods
-    static ThreadId GetCurrentThreadId();
-    static NPT_Result SetCurrentThreadPriority(int priority);
-    static NPT_Result GetCurrentThreadPriority(int& priority);
-
-    // methods
-    explicit NPT_Thread(bool detached = false);
-    explicit NPT_Thread(NPT_Runnable& target, bool detached = false);
-   ~NPT_Thread() { delete m_Delegate; }
-
-    // NPT_ThreadInterface methods
-    NPT_Result Start() { 
-        return m_Delegate->Start(); 
-    } 
-    NPT_Result Wait(NPT_Timeout timeout = NPT_TIMEOUT_INFINITE)  { 
-        return m_Delegate->Wait(timeout);  
-    }
-    NPT_Result SetPriority(int priority) {
-        return m_Delegate->SetPriority(priority);
-    }    
-    NPT_Result GetPriority(int& priority) {
-        return m_Delegate->GetPriority(priority);
-    }
-
-    // NPT_Runnable methods
-    virtual void Run() {}
-
-    // NPT_Interruptible methods
-    virtual NPT_Result Interrupt() { return m_Delegate->Interrupt(); }
-
- private:
-    // members
-    NPT_ThreadInterface* m_Delegate;
-};
-
-
-/*----------------------------------------------------------------------
-|   NPT_ThreadCallbackReceiver
-+---------------------------------------------------------------------*/
-class NPT_ThreadCallbackReceiver
-{
-public:
-    virtual ~NPT_ThreadCallbackReceiver() {}
-    virtual void OnCallback(void* args) = 0;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_ThreadCallbackSlot
-+---------------------------------------------------------------------*/
-class NPT_ThreadCallbackSlot
-{
-public:
-    // types
-    class NotificationHelper {
-    public:
-        virtual ~NotificationHelper() {};
-        virtual void Notify(void) = 0;
-    };
-
-    // constructor
-    NPT_ThreadCallbackSlot();
-
-    // methods
-    NPT_Result ReceiveCallback(NPT_ThreadCallbackReceiver& receiver, NPT_Timeout timeout = 0);
-    NPT_Result SendCallback(void* args);
-    NPT_Result SetNotificationHelper(NotificationHelper* helper);
-    NPT_Result Shutdown();
-
-protected:
-    // members
-    volatile void*      m_CallbackArgs;
-    volatile bool       m_Shutdown;
-    NPT_SharedVariable  m_Pending;
-    NPT_SharedVariable  m_Ack;
-    NPT_Mutex           m_ReadLock;
-    NPT_Mutex           m_WriteLock;
-    NotificationHelper* m_NotificationHelper;
-};
-
-#endif // _NPT_THREADS_H_
diff --git a/extra_lib/include/platinum/NptTime.h b/extra_lib/include/platinum/NptTime.h
deleted file mode 100644
index ae02a48..0000000
--- a/extra_lib/include/platinum/NptTime.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Time
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_TIME_H_
-#define _NPT_TIME_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptTypes.h"
-#include "NptStrings.h"
-
-/*----------------------------------------------------------------------
-|   constants
-+---------------------------------------------------------------------*/
-#define NPT_DATETIME_YEAR_MIN 1901
-#define NPT_DATETIME_YEAR_MAX 2262
-
-/*----------------------------------------------------------------------
-|   NPT_TimeStamp
-+---------------------------------------------------------------------*/
-class NPT_TimeStamp
-{
- public:
-    // methods
-    NPT_TimeStamp(const NPT_TimeStamp& timestamp);
-    NPT_TimeStamp() : m_NanoSeconds(0) {}
-    NPT_TimeStamp(NPT_Int64 nanoseconds) : m_NanoSeconds(nanoseconds) {}
-    NPT_TimeStamp(double seconds);
-    NPT_TimeStamp& operator+=(const NPT_TimeStamp& time_stamp);
-    NPT_TimeStamp& operator-=(const NPT_TimeStamp& time_stamp);
-    bool operator==(const NPT_TimeStamp& t) const { return m_NanoSeconds == t.m_NanoSeconds; }
-    bool operator!=(const NPT_TimeStamp& t) const { return m_NanoSeconds != t.m_NanoSeconds; }
-    bool operator> (const NPT_TimeStamp& t) const { return m_NanoSeconds >  t.m_NanoSeconds; }
-    bool operator< (const NPT_TimeStamp& t) const { return m_NanoSeconds <  t.m_NanoSeconds; }
-    bool operator>=(const NPT_TimeStamp& t) const { return m_NanoSeconds >= t.m_NanoSeconds; }
-    bool operator<=(const NPT_TimeStamp& t) const { return m_NanoSeconds <= t.m_NanoSeconds; }
-
-    // accessors
-    void SetNanos(NPT_Int64 nanoseconds) { m_NanoSeconds = nanoseconds;          }
-    void SetMicros(NPT_Int64 micros)     { m_NanoSeconds = micros  * 1000;       }
-    void SetMillis(NPT_Int64 millis)     { m_NanoSeconds = millis  * 1000000;    }
-    void SetSeconds(NPT_Int64 seconds)   { m_NanoSeconds = seconds * 1000000000; }
-        
-    // conversion
-    operator double() const               { return (double)m_NanoSeconds/1E9; }
-    void FromNanos(NPT_Int64 nanoseconds) { m_NanoSeconds = nanoseconds;      }
-    NPT_Int64 ToNanos() const             { return m_NanoSeconds;             }
-    NPT_Int64 ToMicros() const            { return m_NanoSeconds/1000;        }
-    NPT_Int64 ToMillis() const            { return m_NanoSeconds/1000000;     }
-    NPT_Int64 ToSeconds() const           { return m_NanoSeconds/1000000000;  }
-    
-private:
-    // members
-    NPT_Int64 m_NanoSeconds;
-};
-
-/*----------------------------------------------------------------------
-|   operator+
-+---------------------------------------------------------------------*/
-inline 
-NPT_TimeStamp 
-operator+(const NPT_TimeStamp& t1, const NPT_TimeStamp& t2) 
-{
-    NPT_TimeStamp t = t1;
-    return t += t2;
-}
-
-/*----------------------------------------------------------------------
-|   operator-
-+---------------------------------------------------------------------*/
-inline 
-NPT_TimeStamp 
-operator-(const NPT_TimeStamp& t1, const NPT_TimeStamp& t2) 
-{
-    NPT_TimeStamp t = t1;
-    return t -= t2;
-}
-
-/*----------------------------------------------------------------------
-|   NPT_TimeInterval
-+---------------------------------------------------------------------*/
-typedef NPT_TimeStamp NPT_TimeInterval;
-
-/*----------------------------------------------------------------------
-|   NPT_DateTime
-+---------------------------------------------------------------------*/
-class NPT_DateTime {
-public:
-    // types
-    enum Format {
-        FORMAT_ANSI,
-        FORMAT_W3C,
-        FORMAT_RFC_1123,  // RFC 822 updated by RFC 1123
-        FORMAT_RFC_1036   // RFC 850 updated by RFC 1036
-    };
-    
-    enum FormatFlags {
-        FLAG_EMIT_FRACTION      = 1,
-        FLAG_EXTENDED_PRECISION = 2
-    };
-    
-    // class methods
-    NPT_Int32 GetLocalTimeZone();
-    
-    // constructors
-    NPT_DateTime();
-    NPT_DateTime(const NPT_TimeStamp& timestamp, bool local=false);
-    
-    // methods
-    NPT_Result ChangeTimeZone(NPT_Int32 timezone);
-    NPT_Result FromTimeStamp(const NPT_TimeStamp& timestamp, bool local=false);
-    NPT_Result ToTimeStamp(NPT_TimeStamp& timestamp) const;
-    NPT_Result FromString(const char* date, Format format = FORMAT_ANSI);
-    NPT_String ToString(Format format = FORMAT_ANSI, NPT_Flags flags=0) const;
-    
-    // members
-    NPT_Int32 m_Year;        // year
-    NPT_Int32 m_Month;       // month of the year (1-12)
-    NPT_Int32 m_Day;         // day of the month (1-31)
-    NPT_Int32 m_Hours;       // hours (0-23)
-    NPT_Int32 m_Minutes;     // minutes (0-59)
-    NPT_Int32 m_Seconds;     // seconds (0-59)
-    NPT_Int32 m_NanoSeconds; // nanoseconds (0-999999999)
-    NPT_Int32 m_TimeZone;    // minutes offset from GMT
-};
-
-#endif // _NPT_TIME_H_
diff --git a/extra_lib/include/platinum/NptTls.h b/extra_lib/include/platinum/NptTls.h
deleted file mode 100644
index 4a392fd..0000000
--- a/extra_lib/include/platinum/NptTls.h
+++ /dev/null
@@ -1,306 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - TLS/SSL Support
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_TLS_H_
-#define _NPT_TLS_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptConfig.h"
-#include "NptStreams.h"
-#include "NptTime.h"
-#include "NptHttp.h"
-
-/*----------------------------------------------------------------------
-|   error codes
-+---------------------------------------------------------------------*/
-const NPT_Result NPT_ERROR_INVALID_PASSWORD                     = (NPT_ERROR_BASE_TLS-1);
-const NPT_Result NPT_ERROR_TLS_INVALID_HANDSHAKE                = (NPT_ERROR_BASE_TLS-2);
-const NPT_Result NPT_ERROR_TLS_INVALID_PROTOCOL_MESSAGE         = (NPT_ERROR_BASE_TLS-3);
-const NPT_Result NPT_ERROR_TLS_INVALID_HMAC                     = (NPT_ERROR_BASE_TLS-4);
-const NPT_Result NPT_ERROR_TLS_INVALID_VERSION                  = (NPT_ERROR_BASE_TLS-5);
-const NPT_Result NPT_ERROR_TLS_INVALID_SESSION                  = (NPT_ERROR_BASE_TLS-6);
-const NPT_Result NPT_ERROR_TLS_NO_CIPHER                        = (NPT_ERROR_BASE_TLS-7);
-const NPT_Result NPT_ERROR_TLS_BAD_CERTIFICATE                  = (NPT_ERROR_BASE_TLS-8);
-const NPT_Result NPT_ERROR_TLS_INVALID_KEY                      = (NPT_ERROR_BASE_TLS-9);
-const NPT_Result NPT_ERROR_TLS_NO_CLIENT_RENEGOTIATION          = (NPT_ERROR_BASE_TLS-10);
-const NPT_Result NPT_ERROR_TLS_INVALID_FINISHED_MESSAGE         = (NPT_ERROR_BASE_TLS-11);
-const NPT_Result NPT_ERROR_TLS_NO_CERTIFICATE_DEFINED           = (NPT_ERROR_BASE_TLS-12);
-const NPT_Result NPT_ERROR_TLS_ALERT_HANDSHAKE_FAILED           = (NPT_ERROR_BASE_TLS-13); 
-const NPT_Result NPT_ERROR_TLS_ALERT_BAD_CERTIFICATE            = (NPT_ERROR_BASE_TLS-14);
-const NPT_Result NPT_ERROR_TLS_ALERT_INVALID_VERSION            = (NPT_ERROR_BASE_TLS-15);
-const NPT_Result NPT_ERROR_TLS_ALERT_BAD_RECORD_MAC             = (NPT_ERROR_BASE_TLS-16);
-const NPT_Result NPT_ERROR_TLS_ALERT_DECODE_ERROR               = (NPT_ERROR_BASE_TLS-17);
-const NPT_Result NPT_ERROR_TLS_ALERT_DECRYPT_ERROR              = (NPT_ERROR_BASE_TLS-18);
-const NPT_Result NPT_ERROR_TLS_ALERT_ILLEGAL_PARAMETER          = (NPT_ERROR_BASE_TLS-19);
-const NPT_Result NPT_ERROR_TLS_ALERT_UNEXPECTED_MESSAGE         = (NPT_ERROR_BASE_TLS-20);
-const NPT_Result NPT_ERROR_TLS_CERTIFICATE_FAILURE              = (NPT_ERROR_BASE_TLS-21);
-const NPT_Result NPT_ERROR_TLS_CERTIFICATE_NO_TRUST_ANCHOR      = (NPT_ERROR_BASE_TLS-22);
-const NPT_Result NPT_ERROR_TLS_CERTIFICATE_BAD_SIGNATURE        = (NPT_ERROR_BASE_TLS-23);      
-const NPT_Result NPT_ERROR_TLS_CERTIFICATE_NOT_YET_VALID        = (NPT_ERROR_BASE_TLS-24);
-const NPT_Result NPT_ERROR_TLS_CERTIFICATE_EXPIRED              = (NPT_ERROR_BASE_TLS-25);
-const NPT_Result NPT_ERROR_TLS_CERTIFICATE_SELF_SIGNED          = (NPT_ERROR_BASE_TLS-26);
-const NPT_Result NPT_ERROR_TLS_CERTIFICATE_INVALID_CHAIN        = (NPT_ERROR_BASE_TLS-27);
-const NPT_Result NPT_ERROR_TLS_CERTIFICATE_UNSUPPORTED_DIGEST   = (NPT_ERROR_BASE_TLS-28);
-const NPT_Result NPT_ERROR_TLS_CERTIFICATE_INVALID_PRIVATE_KEY  = (NPT_ERROR_BASE_TLS-29);
-const NPT_Result NPT_ERROR_TLS_DNS_NAME_MISMATCH                = (NPT_ERROR_BASE_TLS-30);
-
-/*----------------------------------------------------------------------
-|   constants
-+---------------------------------------------------------------------*/
-const unsigned int NPT_TLS_NULL_WITH_NULL_NULL      = 0x00;
-const unsigned int NPT_TLS_RSA_WITH_RC4_128_MD5     = 0x04;
-const unsigned int NPT_TLS_RSA_WITH_RC4_128_SHA     = 0x05;
-const unsigned int NPT_TLS_RSA_WITH_AES_128_CBC_SHA = 0x2F;
-const unsigned int NPT_TLS_RSA_WITH_AES_256_CBC_SHA = 0x35;
-
-/*----------------------------------------------------------------------
-|   class references
-+---------------------------------------------------------------------*/
-class NPT_TlsContextImpl;
-class NPT_TlsSessionImpl;
-
-/*----------------------------------------------------------------------
-|   types
-+---------------------------------------------------------------------*/
-typedef enum {
-    NPT_TLS_KEY_FORMAT_RSA_PRIVATE,
-    NPT_TLS_KEY_FORMAT_PKCS8,
-    NPT_TLS_KEY_FORMAT_PKCS12
-} NPT_TlsKeyFormat;
-
-struct NPT_TlsTrustAnchorData {
-    const unsigned char* cert_data;
-    unsigned int         cert_size;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_Tls
-+---------------------------------------------------------------------*/
-class NPT_Tls
-{
-public:
-    static const NPT_TlsTrustAnchorData* GetDefaultTrustAnchors(NPT_Ordinal indx=0);
-    static bool MatchDnsNames(const char*                 hostname,
-                              const NPT_List<NPT_String>& dns_names);
-    static bool MatchDnsName(const char* hostname, const char* dns_name);
-                              
-private:
-    NPT_Tls() {}; // don't instantiate 
-};
-
-/*----------------------------------------------------------------------
-|   NPT_TlsContext
-+---------------------------------------------------------------------*/
-class NPT_TlsContext : public NPT_AutomaticCleaner::Singleton
-{
-public:
-    enum {
-        OPTION_VERIFY_LATER               = 1,
-        OPTION_REQUIRE_CLIENT_CERTIFICATE = 2,
-        OPTION_ADD_DEFAULT_TRUST_ANCHORS  = 4,
-        OPTION_NO_SESSION_CACHE           = 8
-    };
-    NPT_TlsContext(NPT_Flags options=0);
-   ~NPT_TlsContext();
-   
-    // methods
-    NPT_Result LoadKey(NPT_TlsKeyFormat     key_format, 
-                       const unsigned char* key_data,
-                       NPT_Size             key_data_size,
-                       const char*          password);
-      
-    NPT_Result SelfSignCertificate(const char* common_name,
-                                   const char* organization,
-                                   const char* organizational_name);
-                                   
-    /** 
-     * Add one trust anchor
-     */
-    NPT_Result AddTrustAnchor(const unsigned char* ta_data,
-                              NPT_Size             ta_data_size);
-    /**
-     * Add one or more trust anchors, from a list
-     * @param anchors Array of trust anchor data
-     * @param anchor_count Number of anchors in the array, or 0 if the array
-     * is terminated by a 'sentinel' (an anchor data with the field cert_data set
-     * to NULL and the field cert_size set to 0).
-     */
-    NPT_Result AddTrustAnchors(const NPT_TlsTrustAnchorData* anchors, 
-                               NPT_Cardinal                  anchor_count = 0);
-
-protected:
-    NPT_TlsContextImpl* m_Impl;
-    
-    // friends
-    friend class NPT_TlsSession;
-    friend class NPT_TlsClientSession;
-    friend class NPT_TlsServerSession;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_TlsCertificateInfo
-+---------------------------------------------------------------------*/
-struct NPT_TlsCertificateInfo
-{
-    struct _subject {
-        NPT_String common_name;
-        NPT_String organization;
-        NPT_String organizational_name;
-    } subject;
-    struct _issuer {
-        NPT_String common_name;
-        NPT_String organization;
-        NPT_String organizational_name;
-    } issuer;
-    struct _fingerprint {
-        unsigned char sha1[20];
-        unsigned char md5[16];
-    } fingerprint;
-    NPT_DateTime issue_date;
-    NPT_DateTime expiration_date;
-    NPT_List<NPT_String> alternate_names;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_TlsSession
-+---------------------------------------------------------------------*/
-class NPT_TlsSession
-{
-public:
-    virtual ~NPT_TlsSession();
-    virtual NPT_Result Handshake();
-    virtual NPT_Result GetHandshakeStatus();
-    virtual NPT_Result GetPeerCertificateInfo(NPT_TlsCertificateInfo& info, NPT_Ordinal position=0);
-    virtual NPT_Result VerifyPeerCertificate();
-    virtual NPT_Result VerifyDnsNameMatch(const char* hostname);
-    virtual NPT_Result GetSessionId(NPT_DataBuffer& session_id);
-    virtual NPT_UInt32 GetCipherSuiteId();
-    virtual NPT_Result GetInputStream(NPT_InputStreamReference& stream);
-    virtual NPT_Result GetOutputStream(NPT_OutputStreamReference& stream);
-    
-protected:
-    NPT_TlsSession(NPT_TlsContext&     context, 
-                   NPT_TlsSessionImpl* impl);
-
-    NPT_TlsContext&                   m_Context;
-    NPT_Reference<NPT_TlsSessionImpl> m_Impl;
-    NPT_InputStreamReference          m_InputStream;
-    NPT_OutputStreamReference         m_OutputStream;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_TlsClientSession
-+---------------------------------------------------------------------*/
-class NPT_TlsClientSession : public NPT_TlsSession
-{
-public:
-    NPT_TlsClientSession(NPT_TlsContext&            context,
-                         NPT_InputStreamReference&  input,
-                         NPT_OutputStreamReference& output);
-};
-
-/*----------------------------------------------------------------------
-|   NPT_TlsServerSession
-+---------------------------------------------------------------------*/
-class NPT_TlsServerSession : public NPT_TlsSession
-{
-public:
-    NPT_TlsServerSession(NPT_TlsContext&            context,
-                         NPT_InputStreamReference&  input,
-                         NPT_OutputStreamReference& output);
-};
-
-/*----------------------------------------------------------------------
-|   NPT_HttpTlsConnector
-+---------------------------------------------------------------------*/
-#if defined(NPT_CONFIG_ENABLE_TLS)
-class NPT_HttpTlsConnector : public NPT_HttpClient::Connector
-{
-public:
-    enum {
-        OPTION_ACCEPT_SELF_SIGNED_CERTS = 1,
-        OPTION_ACCEPT_HOSTNAME_MISMATCH = 2
-    };
-    NPT_HttpTlsConnector(NPT_Flags options = 0);
-    NPT_HttpTlsConnector(NPT_TlsContext& tls_context, NPT_Flags options = 0);
-    virtual ~NPT_HttpTlsConnector() {}
-    NPT_TlsContext& GetTlsContext() { return m_TlsContext; }
-    
-    virtual NPT_Result VerifyPeer(NPT_TlsClientSession& session,
-                                  const char*           hostname);
-    
-    //  NPT_HttpClient::Connector methods
-    virtual NPT_Result Connect(const NPT_HttpUrl&           url,
-                               NPT_HttpClient&              client,
-                               const NPT_HttpProxyAddress*  proxy,
-                               bool                         reuse,
-                               NPT_HttpClient::Connection*& connection);
-
-private:
-    // class methods
-    static NPT_TlsContext& GetDefaultTlsContext();
-    
-    // class members
-    static NPT_TlsContext* DefaultTlsContext;
-    
-    // members
-    NPT_TlsContext& m_TlsContext;
-    NPT_Flags       m_Options;
-};
-#else
-class NPT_HttpTlsConnector : public NPT_HttpClient::Connector
-{
-public:
-    virtual ~NPT_HttpTlsConnector() {}
-    virtual NPT_Result Connect(const NPT_HttpUrl&           url,
-                               NPT_HttpClient&              client,
-                               const NPT_HttpProxyAddress*  proxy,
-                               bool                         reuse,
-                               NPT_HttpClient::Connection*& connection);
-};
-#endif
-
-/*----------------------------------------------------------------------
-|   Trust Anchors
-+-----------------------------------------------------------------*/
-/** 
- * Arrays of trust anchors (each array element is of type NPT_TlsTrustAnchorData
- * and the last element is a terminator element: the cert_data field is NULL
- * and the cert_size field is 0
- */ 
-#if defined(NPT_CONFIG_ENABLE_TLS)
-#include "NptTlsDefaultTrustAnchorsBase.h"
-#include "NptTlsDefaultTrustAnchorsExtended.h"
-#endif
-
-#endif // _NPT_TLS_H_
diff --git a/extra_lib/include/platinum/NptTlsDefaultTrustAnchorsBase.h b/extra_lib/include/platinum/NptTlsDefaultTrustAnchorsBase.h
deleted file mode 100644
index 170cdb2..0000000
--- a/extra_lib/include/platinum/NptTlsDefaultTrustAnchorsBase.h
+++ /dev/null
@@ -1,583 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Trust Anchors
-|
-|   This file is automatically generated by a script, do not edit!
-|
-| Copyright (c) 2002-2010, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
- /* This file is automatically generated by GenTrustAnchorsTables.py, do not edit */
-
-#include "NptTls.h"
-
-extern const NPT_TlsTrustAnchorData NptTlsDefaultTrustAnchorsBase[137];
-
-/* Verisign/RSA Secure Server CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0000_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0000_Data[];
-
-/* GTE CyberTrust Root CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0001_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0001_Data[];
-
-/* GTE CyberTrust Global Root */
-extern const unsigned int NptTlsTrustAnchor_Base_0002_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0002_Data[];
-
-/* Thawte Personal Basic CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0003_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0003_Data[];
-
-/* Thawte Personal Premium CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0004_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0004_Data[];
-
-/* Thawte Personal Freemail CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0005_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0005_Data[];
-
-/* Thawte Server CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0006_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0006_Data[];
-
-/* Thawte Premium Server CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0007_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0007_Data[];
-
-/* Equifax Secure CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0008_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0008_Data[];
-
-/* Digital Signature Trust Co. Global CA 1 */
-extern const unsigned int NptTlsTrustAnchor_Base_0009_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0009_Data[];
-
-/* Digital Signature Trust Co. Global CA 3 */
-extern const unsigned int NptTlsTrustAnchor_Base_0010_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0010_Data[];
-
-/* Digital Signature Trust Co. Global CA 2 */
-extern const unsigned int NptTlsTrustAnchor_Base_0011_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0011_Data[];
-
-/* Digital Signature Trust Co. Global CA 4 */
-extern const unsigned int NptTlsTrustAnchor_Base_0012_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0012_Data[];
-
-/* Verisign Class 1 Public Primary Certification Authority */
-extern const unsigned int NptTlsTrustAnchor_Base_0013_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0013_Data[];
-
-/* Verisign Class 2 Public Primary Certification Authority */
-extern const unsigned int NptTlsTrustAnchor_Base_0014_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0014_Data[];
-
-/* Verisign Class 3 Public Primary Certification Authority */
-extern const unsigned int NptTlsTrustAnchor_Base_0015_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0015_Data[];
-
-/* Verisign Class 1 Public Primary Certification Authority - G2 */
-extern const unsigned int NptTlsTrustAnchor_Base_0016_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0016_Data[];
-
-/* Verisign Class 2 Public Primary Certification Authority - G2 */
-extern const unsigned int NptTlsTrustAnchor_Base_0017_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0017_Data[];
-
-/* Verisign Class 3 Public Primary Certification Authority - G2 */
-extern const unsigned int NptTlsTrustAnchor_Base_0018_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0018_Data[];
-
-/* Verisign Class 4 Public Primary Certification Authority - G2 */
-extern const unsigned int NptTlsTrustAnchor_Base_0019_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0019_Data[];
-
-/* GlobalSign Root CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0020_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0020_Data[];
-
-/* GlobalSign Root CA - R2 */
-extern const unsigned int NptTlsTrustAnchor_Base_0021_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0021_Data[];
-
-/* ValiCert Class 1 VA */
-extern const unsigned int NptTlsTrustAnchor_Base_0022_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0022_Data[];
-
-/* ValiCert Class 2 VA */
-extern const unsigned int NptTlsTrustAnchor_Base_0023_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0023_Data[];
-
-/* RSA Root Certificate 1 */
-extern const unsigned int NptTlsTrustAnchor_Base_0024_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0024_Data[];
-
-/* Verisign Class 1 Public Primary Certification Authority - G3 */
-extern const unsigned int NptTlsTrustAnchor_Base_0025_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0025_Data[];
-
-/* Verisign Class 2 Public Primary Certification Authority - G3 */
-extern const unsigned int NptTlsTrustAnchor_Base_0026_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0026_Data[];
-
-/* Verisign Class 3 Public Primary Certification Authority - G3 */
-extern const unsigned int NptTlsTrustAnchor_Base_0027_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0027_Data[];
-
-/* Verisign Class 4 Public Primary Certification Authority - G3 */
-extern const unsigned int NptTlsTrustAnchor_Base_0028_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0028_Data[];
-
-/* Entrust.net Secure Server CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0029_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0029_Data[];
-
-/* Entrust.net Secure Personal CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0030_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0030_Data[];
-
-/* Entrust.net Premium 2048 Secure Server CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0031_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0031_Data[];
-
-/* Baltimore CyberTrust Root */
-extern const unsigned int NptTlsTrustAnchor_Base_0032_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0032_Data[];
-
-/* Equifax Secure Global eBusiness CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0033_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0033_Data[];
-
-/* Equifax Secure eBusiness CA 1 */
-extern const unsigned int NptTlsTrustAnchor_Base_0034_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0034_Data[];
-
-/* Equifax Secure eBusiness CA 2 */
-extern const unsigned int NptTlsTrustAnchor_Base_0035_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0035_Data[];
-
-/* Visa International Global Root 2 */
-extern const unsigned int NptTlsTrustAnchor_Base_0036_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0036_Data[];
-
-/* AddTrust Low-Value Services Root */
-extern const unsigned int NptTlsTrustAnchor_Base_0037_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0037_Data[];
-
-/* AddTrust External Root */
-extern const unsigned int NptTlsTrustAnchor_Base_0038_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0038_Data[];
-
-/* AddTrust Public Services Root */
-extern const unsigned int NptTlsTrustAnchor_Base_0039_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0039_Data[];
-
-/* AddTrust Qualified Certificates Root */
-extern const unsigned int NptTlsTrustAnchor_Base_0040_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0040_Data[];
-
-/* Verisign Time Stamping Authority CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0041_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0041_Data[];
-
-/* Thawte Time Stamping CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0042_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0042_Data[];
-
-/* Entrust.net Global Secure Server CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0043_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0043_Data[];
-
-/* Entrust.net Global Secure Personal CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0044_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0044_Data[];
-
-/* Entrust Root Certification Authority */
-extern const unsigned int NptTlsTrustAnchor_Base_0045_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0045_Data[];
-
-/* AOL Time Warner Root Certification Authority 1 */
-extern const unsigned int NptTlsTrustAnchor_Base_0046_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0046_Data[];
-
-/* AOL Time Warner Root Certification Authority 2 */
-extern const unsigned int NptTlsTrustAnchor_Base_0047_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0047_Data[];
-
-/* beTRUSTed Root CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0048_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0048_Data[];
-
-/* beTRUSTed Root CA-Baltimore Implementation */
-extern const unsigned int NptTlsTrustAnchor_Base_0049_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0049_Data[];
-
-/* beTRUSTed Root CA - Entrust Implementation */
-extern const unsigned int NptTlsTrustAnchor_Base_0050_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0050_Data[];
-
-/* beTRUSTed Root CA - RSA Implementation */
-extern const unsigned int NptTlsTrustAnchor_Base_0051_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0051_Data[];
-
-/* RSA Security 2048 v3 */
-extern const unsigned int NptTlsTrustAnchor_Base_0052_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0052_Data[];
-
-/* RSA Security 1024 v3 */
-extern const unsigned int NptTlsTrustAnchor_Base_0053_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0053_Data[];
-
-/* GeoTrust Global CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0054_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0054_Data[];
-
-/* GeoTrust Global CA 2 */
-extern const unsigned int NptTlsTrustAnchor_Base_0055_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0055_Data[];
-
-/* GeoTrust Universal CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0056_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0056_Data[];
-
-/* GeoTrust Universal CA 2 */
-extern const unsigned int NptTlsTrustAnchor_Base_0057_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0057_Data[];
-
-/* UTN-USER First-Network Applications */
-extern const unsigned int NptTlsTrustAnchor_Base_0058_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0058_Data[];
-
-/* America Online Root Certification Authority 1 */
-extern const unsigned int NptTlsTrustAnchor_Base_0059_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0059_Data[];
-
-/* America Online Root Certification Authority 2 */
-extern const unsigned int NptTlsTrustAnchor_Base_0060_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0060_Data[];
-
-/* Visa eCommerce Root */
-extern const unsigned int NptTlsTrustAnchor_Base_0061_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0061_Data[];
-
-/* TC TrustCenter, Germany, Class 2 CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0062_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0062_Data[];
-
-/* TC TrustCenter, Germany, Class 3 CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0063_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0063_Data[];
-
-/* Certum Root CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0064_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0064_Data[];
-
-/* Comodo AAA Services root */
-extern const unsigned int NptTlsTrustAnchor_Base_0065_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0065_Data[];
-
-/* Comodo Secure Services root */
-extern const unsigned int NptTlsTrustAnchor_Base_0066_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0066_Data[];
-
-/* Comodo Trusted Services root */
-extern const unsigned int NptTlsTrustAnchor_Base_0067_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0067_Data[];
-
-/* IPS Chained CAs root */
-extern const unsigned int NptTlsTrustAnchor_Base_0068_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0068_Data[];
-
-/* IPS CLASE1 root */
-extern const unsigned int NptTlsTrustAnchor_Base_0069_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0069_Data[];
-
-/* IPS CLASE3 root */
-extern const unsigned int NptTlsTrustAnchor_Base_0070_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0070_Data[];
-
-/* IPS CLASEA1 root */
-extern const unsigned int NptTlsTrustAnchor_Base_0071_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0071_Data[];
-
-/* IPS CLASEA3 root */
-extern const unsigned int NptTlsTrustAnchor_Base_0072_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0072_Data[];
-
-/* IPS Servidores root */
-extern const unsigned int NptTlsTrustAnchor_Base_0073_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0073_Data[];
-
-/* IPS Timestamping root */
-extern const unsigned int NptTlsTrustAnchor_Base_0074_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0074_Data[];
-
-/* QuoVadis Root CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0075_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0075_Data[];
-
-/* QuoVadis Root CA 2 */
-extern const unsigned int NptTlsTrustAnchor_Base_0076_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0076_Data[];
-
-/* QuoVadis Root CA 3 */
-extern const unsigned int NptTlsTrustAnchor_Base_0077_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0077_Data[];
-
-/* Security Communication Root CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0078_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0078_Data[];
-
-/* Sonera Class 1 Root CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0079_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0079_Data[];
-
-/* Sonera Class 2 Root CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0080_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0080_Data[];
-
-/* Staat der Nederlanden Root CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0081_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0081_Data[];
-
-/* TDC Internet Root CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0082_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0082_Data[];
-
-/* TDC OCES Root CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0083_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0083_Data[];
-
-/* UTN DATACorp SGC Root CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0084_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0084_Data[];
-
-/* UTN USERFirst Email Root CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0085_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0085_Data[];
-
-/* UTN USERFirst Hardware Root CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0086_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0086_Data[];
-
-/* UTN USERFirst Object Root CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0087_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0087_Data[];
-
-/* Camerfirma Chambers of Commerce Root */
-extern const unsigned int NptTlsTrustAnchor_Base_0088_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0088_Data[];
-
-/* Camerfirma Global Chambersign Root */
-extern const unsigned int NptTlsTrustAnchor_Base_0089_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0089_Data[];
-
-/* NetLock Qualified (Class QA) Root */
-extern const unsigned int NptTlsTrustAnchor_Base_0090_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0090_Data[];
-
-/* NetLock Notary (Class A) Root */
-extern const unsigned int NptTlsTrustAnchor_Base_0091_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0091_Data[];
-
-/* NetLock Business (Class B) Root */
-extern const unsigned int NptTlsTrustAnchor_Base_0092_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0092_Data[];
-
-/* NetLock Express (Class C) Root */
-extern const unsigned int NptTlsTrustAnchor_Base_0093_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0093_Data[];
-
-/* XRamp Global CA Root */
-extern const unsigned int NptTlsTrustAnchor_Base_0094_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0094_Data[];
-
-/* Go Daddy Class 2 CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0095_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0095_Data[];
-
-/* Starfield Class 2 CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0096_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0096_Data[];
-
-/* StartCom Ltd. */
-extern const unsigned int NptTlsTrustAnchor_Base_0097_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0097_Data[];
-
-/* StartCom Certification Authority */
-extern const unsigned int NptTlsTrustAnchor_Base_0098_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0098_Data[];
-
-/* Firmaprofesional Root CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0099_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0099_Data[];
-
-/* Wells Fargo Root CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0100_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0100_Data[];
-
-/* Swisscom Root CA 1 */
-extern const unsigned int NptTlsTrustAnchor_Base_0101_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0101_Data[];
-
-/* DigiCert Assured ID Root CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0102_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0102_Data[];
-
-/* DigiCert Global Root CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0103_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0103_Data[];
-
-/* DigiCert High Assurance EV Root CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0104_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0104_Data[];
-
-/* Certplus Class 2 Primary CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0105_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0105_Data[];
-
-/* DST Root CA X3 */
-extern const unsigned int NptTlsTrustAnchor_Base_0106_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0106_Data[];
-
-/* DST ACES CA X6 */
-extern const unsigned int NptTlsTrustAnchor_Base_0107_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0107_Data[];
-
-/* SwissSign Platinum CA - G2 */
-extern const unsigned int NptTlsTrustAnchor_Base_0108_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0108_Data[];
-
-/* SwissSign Gold CA - G2 */
-extern const unsigned int NptTlsTrustAnchor_Base_0109_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0109_Data[];
-
-/* SwissSign Silver CA - G2 */
-extern const unsigned int NptTlsTrustAnchor_Base_0110_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0110_Data[];
-
-/* GeoTrust Primary Certification Authority */
-extern const unsigned int NptTlsTrustAnchor_Base_0111_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0111_Data[];
-
-/* thawte Primary Root CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0112_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0112_Data[];
-
-/* VeriSign Class 3 Public Primary Certification Authority - G5 */
-extern const unsigned int NptTlsTrustAnchor_Base_0113_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0113_Data[];
-
-/* SecureTrust CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0114_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0114_Data[];
-
-/* Secure Global CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0115_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0115_Data[];
-
-/* COMODO Certification Authority */
-extern const unsigned int NptTlsTrustAnchor_Base_0116_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0116_Data[];
-
-/* DigiNotar Root CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0117_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0117_Data[];
-
-/* Network Solutions Certificate Authority */
-extern const unsigned int NptTlsTrustAnchor_Base_0118_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0118_Data[];
-
-/* WellsSecure Public Root Certificate Authority */
-extern const unsigned int NptTlsTrustAnchor_Base_0119_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0119_Data[];
-
-/* IGC/A */
-extern const unsigned int NptTlsTrustAnchor_Base_0120_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0120_Data[];
-
-/* Security Communication EV RootCA1 */
-extern const unsigned int NptTlsTrustAnchor_Base_0121_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0121_Data[];
-
-/* TC TrustCenter Class 2 CA II */
-extern const unsigned int NptTlsTrustAnchor_Base_0122_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0122_Data[];
-
-/* TC TrustCenter Class 3 CA II */
-extern const unsigned int NptTlsTrustAnchor_Base_0123_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0123_Data[];
-
-/* TC TrustCenter Universal CA I */
-extern const unsigned int NptTlsTrustAnchor_Base_0124_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0124_Data[];
-
-/* Deutsche Telekom Root CA 2 */
-extern const unsigned int NptTlsTrustAnchor_Base_0125_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0125_Data[];
-
-/* ComSign CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0126_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0126_Data[];
-
-/* ComSign Secured CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0127_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0127_Data[];
-
-/* Cybertrust Global Root */
-extern const unsigned int NptTlsTrustAnchor_Base_0128_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0128_Data[];
-
-/* Buypass Class 2 CA 1 */
-extern const unsigned int NptTlsTrustAnchor_Base_0129_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0129_Data[];
-
-/* Buypass Class 3 CA 1 */
-extern const unsigned int NptTlsTrustAnchor_Base_0130_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0130_Data[];
-
-/* certSIGN ROOT CA */
-extern const unsigned int NptTlsTrustAnchor_Base_0131_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0131_Data[];
-
-/* ApplicationCA - Japanese Government */
-extern const unsigned int NptTlsTrustAnchor_Base_0132_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0132_Data[];
-
-/* GeoTrust Primary Certification Authority - G3 */
-extern const unsigned int NptTlsTrustAnchor_Base_0133_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0133_Data[];
-
-/* thawte Primary Root CA - G2 */
-extern const unsigned int NptTlsTrustAnchor_Base_0134_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0134_Data[];
-
-/* GeoTrust Primary Certification Authority - G2 */
-extern const unsigned int NptTlsTrustAnchor_Base_0135_Size;
-extern const unsigned char NptTlsTrustAnchor_Base_0135_Data[];
-
diff --git a/extra_lib/include/platinum/NptTlsDefaultTrustAnchorsExtended.h b/extra_lib/include/platinum/NptTlsDefaultTrustAnchorsExtended.h
deleted file mode 100644
index 005a6f0..0000000
--- a/extra_lib/include/platinum/NptTlsDefaultTrustAnchorsExtended.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Trust Anchors
-|
-|   This file is automatically generated by a script, do not edit!
-|
-| Copyright (c) 2002-2010, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
- /* This file is automatically generated by GenTrustAnchorsTables.py, do not edit */
-
-#include "NptTls.h"
-
-extern const NPT_TlsTrustAnchorData NptTlsDefaultTrustAnchorsExtended[14];
-
-/* ABAecom (sub., Am. Bankers Assn.) Root CA */
-extern const unsigned int NptTlsTrustAnchor_Extended_0000_Size;
-extern const unsigned char NptTlsTrustAnchor_Extended_0000_Data[];
-
-/* Taiwan GRCA */
-extern const unsigned int NptTlsTrustAnchor_Extended_0001_Size;
-extern const unsigned char NptTlsTrustAnchor_Extended_0001_Data[];
-
-/* TURKTRUST Certificate Services Provider Root 1 */
-extern const unsigned int NptTlsTrustAnchor_Extended_0002_Size;
-extern const unsigned char NptTlsTrustAnchor_Extended_0002_Data[];
-
-/* TURKTRUST Certificate Services Provider Root 2 */
-extern const unsigned int NptTlsTrustAnchor_Extended_0003_Size;
-extern const unsigned char NptTlsTrustAnchor_Extended_0003_Data[];
-
-/* OISTE WISeKey Global Root GA CA */
-extern const unsigned int NptTlsTrustAnchor_Extended_0004_Size;
-extern const unsigned char NptTlsTrustAnchor_Extended_0004_Data[];
-
-/* S-TRUST Authentication and Encryption Root CA 2005 PN */
-extern const unsigned int NptTlsTrustAnchor_Extended_0005_Size;
-extern const unsigned char NptTlsTrustAnchor_Extended_0005_Data[];
-
-/* Microsec e-Szigno Root CA */
-extern const unsigned int NptTlsTrustAnchor_Extended_0006_Size;
-extern const unsigned char NptTlsTrustAnchor_Extended_0006_Data[];
-
-/* Certigna */
-extern const unsigned int NptTlsTrustAnchor_Extended_0007_Size;
-extern const unsigned char NptTlsTrustAnchor_Extended_0007_Data[];
-
-/* AC Ra\xC3\xADz Certic\xC3\xA1mara S.A. */
-extern const unsigned int NptTlsTrustAnchor_Extended_0008_Size;
-extern const unsigned char NptTlsTrustAnchor_Extended_0008_Data[];
-
-/* ePKI Root Certification Authority */
-extern const unsigned int NptTlsTrustAnchor_Extended_0009_Size;
-extern const unsigned char NptTlsTrustAnchor_Extended_0009_Data[];
-
-/* TUBITAK UEKAE Kok Sertifika Hizmet Saglayicisi - Surum 3 */
-extern const unsigned int NptTlsTrustAnchor_Extended_0010_Size;
-extern const unsigned char NptTlsTrustAnchor_Extended_0010_Data[];
-
-/* CNNIC ROOT */
-extern const unsigned int NptTlsTrustAnchor_Extended_0011_Size;
-extern const unsigned char NptTlsTrustAnchor_Extended_0011_Data[];
-
-/* EBG Elektronik Sertifika Hizmet Saglayicisi */
-extern const unsigned int NptTlsTrustAnchor_Extended_0012_Size;
-extern const unsigned char NptTlsTrustAnchor_Extended_0012_Data[];
-
diff --git a/extra_lib/include/platinum/NptTypes.h b/extra_lib/include/platinum/NptTypes.h
deleted file mode 100644
index 4c82174..0000000
--- a/extra_lib/include/platinum/NptTypes.h
+++ /dev/null
@@ -1,149 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Types
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_TYPES_H_
-#define _NPT_TYPES_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptConfig.h"
-
-/*----------------------------------------------------------------------
-|   sized types (this assumes that ints are 32 bits)
-+---------------------------------------------------------------------*/
-typedef NPT_CONFIG_INT64_TYPE          NPT_Int64;
-typedef unsigned NPT_CONFIG_INT64_TYPE NPT_UInt64;
-typedef unsigned int                   NPT_UInt32;
-typedef int                            NPT_Int32;
-typedef unsigned short                 NPT_UInt16;
-typedef short                          NPT_Int16;
-typedef unsigned char                  NPT_UInt8;
-typedef char                           NPT_Int8;
-typedef float                          NPT_Float;
-
-/*----------------------------------------------------------------------
-|   named types       
-+---------------------------------------------------------------------*/
-typedef int           NPT_Result;
-typedef unsigned int  NPT_Cardinal;
-typedef unsigned int  NPT_Ordinal;
-typedef NPT_UInt32    NPT_Size;
-typedef NPT_UInt64    NPT_LargeSize;
-typedef NPT_Int32     NPT_Offset;
-typedef NPT_UInt64    NPT_Position;
-typedef NPT_Int32     NPT_Timeout;
-typedef void          NPT_Interface;
-typedef NPT_UInt8     NPT_Byte;
-typedef NPT_UInt32    NPT_Flags;
-typedef void*         NPT_Any;
-typedef const void*   NPT_AnyConst;
-
-/*----------------------------------------------------------------------
-|   limits       
-+---------------------------------------------------------------------*/
-#if defined(NPT_CONFIG_HAVE_LIMITS_H)
-#include <limits.h>
-#endif
-
-#if !defined(NPT_INT_MIN)
-#if defined(NPT_CONFIG_HAVE_INT_MIN)
-#define NPT_INT_MIN INT_MIN
-#endif
-#endif
-
-#if !defined(NPT_INT_MAX)
-#if defined(NPT_CONFIG_HAVE_INT_MAX)
-#define NPT_INT_MAX INT_MAX
-#endif
-#endif
-
-#if !defined(NPT_UINT_MAX)
-#if defined(NPT_CONFIG_HAVE_UINT_MAX)
-#define NPT_UINT_MAX UINT_MAX
-#endif
-#endif
-
-#if !defined(NPT_LONG_MIN)
-#if defined(NPT_CONFIG_HAVE_LONG_MIN)
-#define NPT_LONG_MIN LONG_MIN
-#endif
-#endif
-
-#if !defined(NPT_LONG_MAX)
-#if defined(NPT_CONFIG_HAVE_LONG_MAX)
-#define NPT_LONG_MAX LONG_MAX
-#endif
-#endif
-
-#if !defined(NPT_ULONG_MAX)
-#if defined(NPT_CONFIG_HAVE_ULONG_MAX)
-#define NPT_ULONG_MAX ULONG_MAX
-#endif
-#endif
-
-#if !defined(NPT_INT32_MAX)
-#define NPT_INT32_MAX 0x7FFFFFFF
-#endif
-
-#if !defined(NPT_INT32_MIN)
-#define NPT_INT32_MIN (-NPT_INT32_MAX - 1) 
-#endif
-
-#if !defined(NPT_UINT32_MAX)
-#define NPT_UINT32_MAX 0xFFFFFFFF
-#endif
-
-#if !defined(NPT_INT64_MAX)
-#if defined(NPT_CONFIG_HAVE_LLONG_MAX)
-#define NPT_INT64_MAX LLONG_MAX
-#else
-#define NPT_INT64_MAX 0x7FFFFFFFFFFFFFFFLL
-#endif
-#endif
-
-#if !defined(NPT_INT64_MIN)
-#if defined(NPT_CONFIG_HAVE_LLONG_MIN)
-#define NPT_INT64_MIN LLONG_MIN
-#else
-#define NPT_INT64_MIN (-NPT_INT64_MAX - 1LL) 
-#endif
-#endif
-
-#if !defined(NPT_UINT64_MAX)
-#if defined(NPT_CONFIG_HAVE_ULLONG_MAX)
-#define NPT_UINT64_MAX ULLONG_MAX
-#else
-#define NPT_UINT64_MAX 0xFFFFFFFFFFFFFFFFULL
-#endif
-#endif
-
-#endif // _NPT_TYPES_H_
diff --git a/extra_lib/include/platinum/NptUri.h b/extra_lib/include/platinum/NptUri.h
deleted file mode 100644
index 8ef46cb..0000000
--- a/extra_lib/include/platinum/NptUri.h
+++ /dev/null
@@ -1,320 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - URI
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_URI_H_
-#define _NPT_URI_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptStrings.h"
-#include "NptList.h"
-
-/*----------------------------------------------------------------------
-|   constants
-+---------------------------------------------------------------------*/
-const NPT_UInt16 NPT_URL_INVALID_PORT       = 0;
-const NPT_UInt16 NPT_URL_DEFAULT_HTTP_PORT  = 80;
-const NPT_UInt16 NPT_URL_DEFAULT_HTTPS_PORT = 443;
-
-/*----------------------------------------------------------------------
-|   NPT_Uri
-+---------------------------------------------------------------------*/
-class NPT_Uri {
-public:
-    // types
-    typedef enum {
-        SCHEME_ID_UNKNOWN,
-        SCHEME_ID_HTTP,
-        SCHEME_ID_HTTPS
-    } SchemeId;
-
-    // constants. use as a parameter to Encode()
-    static const char* const PathCharsToEncode;
-    static const char* const QueryCharsToEncode;
-    static const char* const FragmentCharsToEncode;
-    static const char* const UnsafeCharsToEncode;
-
-    // class methods
-    static NPT_String PercentEncode(const char* str, const char* chars, bool encode_percents=true);
-    static NPT_String PercentDecode(const char* str);
-    static SchemeId   ParseScheme(const NPT_String& scheme);
-
-    // methods
-    NPT_Uri() : m_SchemeId(SCHEME_ID_UNKNOWN) {}
-    virtual ~NPT_Uri() {}
-    const NPT_String& GetScheme() const {
-        return m_Scheme;
-    }
-    void SetScheme(const char* scheme);
-    NPT_Result SetSchemeFromUri(const char* uri);
-    SchemeId GetSchemeId() const {
-        return m_SchemeId;
-    }
-
-protected:
-    // members
-    NPT_String m_Scheme;
-    SchemeId   m_SchemeId;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_UrlQuery
-+---------------------------------------------------------------------*/
-class NPT_UrlQuery
-{
-public:
-    // class methods
-    static NPT_String UrlEncode(const char* str, bool encode_percents=true);
-    static NPT_String UrlDecode(const char* str);
-    
-    // types
-    struct Field {
-        Field(const char* name, const char* value, bool encoded);
-        NPT_String m_Name;
-        NPT_String m_Value;
-    };
-
-    // constructor
-    NPT_UrlQuery() {}
-    NPT_UrlQuery(const char* query);
-
-    // accessors
-    NPT_List<Field>& GetFields() { return m_Fields; }
-
-    // methods
-    NPT_Result  Parse(const char* query);
-    NPT_Result  SetField(const char* name, const char* value, bool encoded=false);
-    NPT_Result  AddField(const char* name, const char* value, bool encoded=false);
-    const char* GetField(const char* name);
-    NPT_String  ToString();
-
-private:
-    // members
-    NPT_List<Field> m_Fields;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_Url
-+---------------------------------------------------------------------*/
-class NPT_Url : public NPT_Uri {
-public:
-    /**
-     * Default constructor. This does not construct a valid URL, but an
-     * uninitialized one that can later be initialized to a valid URL by
-     * parsing or setting some of its fields.
-     */
-    NPT_Url();
-    
-    /**
-     * Construct a URL by parsing an input string in its fully encoded form.
-     * If an error occurs during parsing (such as an invalid syntax), the
-     * URL will be in an invalid state (a call to IsValid() will return false).
-     *
-     * @param url The URL string in its encoded form
-     * @param default_port The default port number, or 0 if not specified
-     */
-    NPT_Url(const char* url, NPT_UInt16  default_port = 0);
-    
-    /**
-     * Construct a URL from its components. When constructing a URL from
-     * components, the components are assumed to be passed in their non-encoded
-     * form, and will thus be encoded automatically.
-     *
-     * @param scheme The URL scheme
-     * @param port The port number
-     * @param path The path
-     * @param query The query, if any, or NULL
-     * @param fragment The fragment, if any, or NULL
-     */
-    NPT_Url(const char* scheme,
-            const char* host, 
-            NPT_UInt16  port, 
-            const char* path,
-            const char* query = NULL,
-            const char* fragment = NULL);
-
-    /**
-     * Parse a URL from its fully encoded form.
-     *
-     * @param url The URL string in its encoded form
-     * @param default port The defautl port number, or 0 if not specified
-     */
-    NPT_Result Parse(const char* url, NPT_UInt16  default_port = 0);
-    
-    /**
-     * Parse just the path plus optional query and fragment from a fully encoded form.
-     *
-     * @param path_plus The URL path plus optional query and fragment
-     */
-    NPT_Result ParsePathPlus(const char* path_plus);
-    
-    /**
-     * Returns the host part of the URL, in its encoded form
-     */
-    const NPT_String& GetHost() const { return m_Host;     }
-    
-    /**
-     * Returns the port number of the URL.
-     */
-    NPT_UInt16 GetPort() const { return m_Port;     }
-
-    /**
-     * Returns the path part of the URL, in its encoded form
-     */
-    const NPT_String& GetPath() const { return m_Path; }
-    
-    /**
-     * Returns the path part of the URL, in its encoded or decoded form
-     */
-    NPT_String GetPath(bool decoded) const { return decoded?NPT_Uri::PercentDecode(m_Path):m_Path;}
-
-    /**
-     * Returns the query part of the URL, in its encoded form
-     */
-    const NPT_String& GetQuery() const { return m_Query; }
-    
-    /**
-     * Returns the fragment part of the URL, in its encoded form
-     */
-    const NPT_String& GetFragment() const { return m_Fragment; }
-    
-    /**
-     * Returns whether the URL is valid or not. Invalid URLs are uninitialized or
-     * not fully initialized URLs.
-     *
-     * @return true if the URL is valid, false if it is not.
-     */
-    virtual bool IsValid() const;
-    
-    /**
-     * Resets a URL to an uninitialized state.
-     */
-    void Reset();
-    
-    /**
-     * Returns whether the URL has a query part or not.
-     *
-     * @return true if the URL has a query part, false if it does not.
-     */
-    bool HasQuery() const { return m_HasQuery; } 
-
-    /**
-     * Returns whether the URL has a fragment part or not.
-     *
-     * @return true if the URL has a fragment part, false if it does not.
-     */
-    bool HasFragment() const { return m_HasFragment; }
-
-    /**
-     * Sets the host part of the URL.
-     *
-     * @param host The host part of the URL
-     */
-    NPT_Result SetHost(const char* host);
-    
-    /**
-     * Sets the port number of the URL.
-     *
-     * @param port The port number of the URL
-     */
-    NPT_Result SetPort(NPT_UInt16 port);
-    
-    /**
-     * Sets the path part of the URL.
-     *
-     * @param path The path part of the URL
-     * @param encoded Boolean flag indicating whether the path parameter is
-     * already encoded or not. If it is not already encoded, it will be
-     * automatically encoded.
-     */
-    NPT_Result SetPath(const char* path, bool encoded=false);
-    
-    /**
-     * Sets the query part of the URL.
-     * 
-     * @param query The query part of the URL
-     * @param encoded Boolean flag indicating whether the query parameter is
-     * already encoded or not. If it is not already encoded, it will be
-     * automatically encoded.
-     */     
-    NPT_Result SetQuery(const char* query, bool encoded=false);
-
-    /**
-     * Sets the fragment part of the URL.
-     * 
-     * @param query The fragment part of the URL
-     * @param encoded Boolean flag indicating whether the fragment parameter is
-     * already encoded or not. If it is not already encoded, it will be
-     * automatically encoded.
-     */     
-    NPT_Result SetFragment(const char* fragment, bool encoded=false);
-
-    /**
-     * Return the string representation of the URL in a way that can be used in 
-     * an HTTP request (i.e just the portion of the URL starting with the path)
-     *
-     * @param with_fragment Boolean flag specifiying whether the fragment part of 
-     * the URL should be included in the returned string or not.
-     */
-    virtual NPT_String ToRequestString(bool with_fragment = false) const;
-
-    /**
-     * Return the string representation of the URL.
-     *
-     * @param default_port default port number for the scheme. If the port number of
-     * the URL is not equal to the default port, then port number is explicitely 
-     * included in the string representation of the URL. 
-     * @param with_fragment Boolean flag specifiying whether the fragment part of 
-     * the URL should be included in the returned string or not.
-     */
-    virtual NPT_String ToStringWithDefaultPort(NPT_UInt16 default_port, bool with_fragment = true) const;
-
-    /**
-     * Return the string representation of the URL.
-     *
-     * @param with_fragment Boolean flag specifiying whether the fragment part of 
-     * the URL should be included in the returned string or not.
-     */
-    virtual NPT_String ToString(bool with_fragment = true) const;
-
-protected:
-    // members
-    NPT_String m_Host;
-    NPT_UInt16 m_Port;
-    NPT_String m_Path;
-    bool       m_HasQuery;
-    NPT_String m_Query;
-    bool       m_HasFragment;
-    NPT_String m_Fragment;
-};
-
-#endif // _NPT_URI_H_
diff --git a/extra_lib/include/platinum/NptUtils.h b/extra_lib/include/platinum/NptUtils.h
deleted file mode 100644
index 3a06d49..0000000
--- a/extra_lib/include/platinum/NptUtils.h
+++ /dev/null
@@ -1,228 +0,0 @@
-/*****************************************************************
-|
-|   Neptune Utils
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_UTILS_H_
-#define _NPT_UTILS_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptConfig.h"
-#include "NptTypes.h"
-#include "NptStrings.h"
-#include "NptMap.h"
-#include "NptDataBuffer.h"
-#include "NptHash.h"
-
-#if defined (NPT_CONFIG_HAVE_STDIO_H)
-#include <stdio.h>
-#endif
-
-#if defined (NPT_CONFIG_HAVE_STRING_H)
-#include <string.h>
-#endif
-
-#if defined(NPT_CONFIG_HAVE_STDARG_H)
-#include <stdarg.h>
-#endif
-
-/*----------------------------------------------------------------------
-|   macros
-+---------------------------------------------------------------------*/
-#define NPT_ARRAY_SIZE(_a) (sizeof(_a)/sizeof((_a)[0]))
-
-/*----------------------------------------------------------------------
-|   byte I/O
-+---------------------------------------------------------------------*/
-extern void NPT_BytesFromInt64Be(unsigned char* buffer, NPT_UInt64 value);
-extern void NPT_BytesFromInt32Be(unsigned char* buffer, NPT_UInt32 value);
-extern void NPT_BytesFromInt24Be(unsigned char* buffer, NPT_UInt32 value);
-extern void NPT_BytesFromInt16Be(unsigned char* buffer, NPT_UInt16 value);
-extern NPT_UInt64 NPT_BytesToInt64Be(const unsigned char* buffer);
-extern NPT_UInt32 NPT_BytesToInt32Be(const unsigned char* buffer);
-extern NPT_UInt32 NPT_BytesToInt24Be(const unsigned char* buffer);
-extern NPT_UInt16 NPT_BytesToInt16Be(const unsigned char* buffer);
-
-extern void NPT_BytesFromInt64Le(unsigned char* buffer, NPT_UInt64 value);
-extern void NPT_BytesFromInt32Le(unsigned char* buffer, NPT_UInt32 value);
-extern void NPT_BytesFromInt24Le(unsigned char* buffer, NPT_UInt32 value);
-extern void NPT_BytesFromInt16Le(unsigned char* buffer, NPT_UInt16 value);
-extern NPT_UInt64 NPT_BytesToInt64Le(const unsigned char* buffer);
-extern NPT_UInt32 NPT_BytesToInt32Le(const unsigned char* buffer);
-extern NPT_UInt32 NPT_BytesToInt24Le(const unsigned char* buffer);
-extern NPT_UInt16 NPT_BytesToInt16Le(const unsigned char* buffer);
-
-/*----------------------------------------------------------------------
-|    conversion utilities
-+---------------------------------------------------------------------*/
-extern NPT_Result 
-NPT_ParseFloat(const char* str, float& result, bool relaxed = true);
-
-extern NPT_Result 
-NPT_ParseInteger(const char* str, long& result, bool relaxed = true, NPT_Cardinal* chars_used = 0);
-
-extern NPT_Result 
-NPT_ParseInteger(const char* str, unsigned long& result, bool relaxed = true, NPT_Cardinal* chars_used = 0);
-
-extern NPT_Result 
-NPT_ParseInteger(const char* str, int& result, bool relaxed = true, NPT_Cardinal* chars_used = 0);
-
-extern NPT_Result 
-NPT_ParseInteger(const char* str, unsigned int& result, bool relaxed = true, NPT_Cardinal* chars_used = 0);
-
-extern NPT_Result 
-NPT_ParseInteger32(const char* str, NPT_Int32& result, bool relaxed = true, NPT_Cardinal* chars_used = 0);
-
-extern NPT_Result 
-NPT_ParseInteger32(const char* str, NPT_UInt32& result, bool relaxed = true, NPT_Cardinal* chars_used = 0);
-
-extern NPT_Result 
-NPT_ParseInteger64(const char* str, NPT_Int64& result, bool relaxed = true, NPT_Cardinal* chars_used = 0);
-
-extern NPT_Result 
-NPT_ParseInteger64(const char* str, NPT_UInt64& result, bool relaxed = true, NPT_Cardinal* chars_used = 0);
-
-/*----------------------------------------------------------------------
-|    formatting
-+---------------------------------------------------------------------*/
-void
-NPT_FormatOutput(void        (*function)(void* parameter, const char* message),
-                 void*       function_parameter,
-                 const char* format, 
-                 va_list     args);
-
-void NPT_ByteToHex(NPT_Byte b, char* buffer, bool uppercase=false);
-NPT_Result NPT_HexToByte(const char* buffer, NPT_Byte& b);
-NPT_Result NPT_HexToBytes(const char* hex, NPT_DataBuffer& bytes);
-NPT_String NPT_HexString(const unsigned char* data, 
-                         NPT_Size             data_size,
-                         const char*          separator = NULL,
-                         bool                 uppercase=false);
-char NPT_NibbleToHex(unsigned int nibble, bool uppercase = true);
-int NPT_HexToNibble(char hex);
-
-/*----------------------------------------------------------------------
-|    parsing
-+---------------------------------------------------------------------*/
-NPT_Result 
-NPT_ParseMimeParameters(const char*                      encoded,
-                        NPT_Map<NPT_String, NPT_String>& parameters);
-
-/*----------------------------------------------------------------------
-|    environment variables
-+---------------------------------------------------------------------*/
-class NPT_Environment {
-public:
-    static NPT_Result Get(const char* name, NPT_String& value);
-    static NPT_Result Set(const char* name, const char* value);
-};
-// compat for older APIs
-#define NPT_GetEnvironment(_x,_y) NPT_Environment::Get(_x,_y)
-
-/*----------------------------------------------------------------------
-|   string utils
-+---------------------------------------------------------------------*/
-#if defined (NPT_CONFIG_HAVE_STDIO_H)
-#include <stdio.h>
-#endif
-
-#if defined (NPT_CONFIG_HAVE_STRING_H)
-#include <string.h>
-#endif
-
-#if defined (NPT_CONFIG_HAVE_SNPRINTF)
-#define NPT_FormatString NPT_snprintf
-#else
-int NPT_FormatString(char* str, NPT_Size size, const char* format, ...);
-#endif
-
-#if defined(NPT_CONFIG_HAVE_VSNPRINTF)
-#define NPT_FormatStringVN(s,c,f,a) NPT_vsnprintf(s,c,f,a)
-#else
-extern int NPT_FormatStringVN(char *buffer, size_t count, const char *format, va_list argptr);
-#endif
-
-#if defined(NPT_CONFIG_HAVE_MEMCPY)
-#define NPT_CopyMemory memcpy
-#else
-extern void NPT_CopyMemory(void* dest, void* src, NPT_Size size);
-#endif
-
-#if defined(NPT_CONFIG_HAVE_STRCMP)
-#define NPT_StringsEqual(s1, s2) (strcmp((s1), (s2)) == 0)
-#else
-extern int NPT_StringsEqual(const char* s1, const char* s2);
-#endif
-
-#if defined(NPT_CONFIG_HAVE_STRNCMP)
-#define NPT_StringsEqualN(s1, s2, n) (strncmp((s1), (s2), (n)) == 0)
-#else
-extern int NPT_StringsEqualN(const char* s1, const char* s2, unsigned long size);
-#endif
-
-#if defined(NPT_CONFIG_HAVE_STRLEN)
-#define NPT_StringLength(s) (NPT_Size)(strlen(s))
-#else
-extern unsigned long NPT_StringLength(const char* s);
-#endif
-
-#if defined(NPT_CONFIG_HAVE_STRCPY)
-#define NPT_CopyString(dst, src) ((void)NPT_strcpy((dst), (src)))
-#else
-extern void NPT_CopyString(char* dst, const char* src);
-#endif
-
-/**
- * Copy up to n characters from src to dst.
- * The destination buffer will be null-terminated, so it must
- * have enough space for n+1 characters (n from the source plus
- * the null terminator).
- */
-#if defined(NPT_CONFIG_HAVE_STRNCPY)
-#define NPT_CopyStringN(dst, src, n) \
-do { ((void)NPT_strncpy((dst), (src), n)); (dst)[(n)] = '\0'; } while(0)
-#else
-extern int NPT_CopyStringN(char* dst, const char* src, unsigned long n);
-#endif
-
-#if defined(NPT_CONFIG_HAVE_MEMSET)
-#define NPT_SetMemory memset
-#else
-extern void NPT_SetMemory(void* dest, int c, NPT_Size size);
-#endif
-
-#if defined(NPT_CONFIG_HAVE_MEMCMP)
-#define NPT_MemoryEqual(s1, s2, n) (memcmp((s1), (s2), (n)) == 0) 
-#else 
-extern int NPT_MemoryEqual(const void* s1, const void* s2, unsigned long n); 
-#endif
-
-#endif // _NPT_UTILS_H_
diff --git a/extra_lib/include/platinum/NptVersion.h b/extra_lib/include/platinum/NptVersion.h
deleted file mode 100644
index ad34d90..0000000
--- a/extra_lib/include/platinum/NptVersion.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Version Info
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_VERSION_H_
-#define _NPT_VERSION_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#define NPT_NEPTUNE_VERSION        0x01010300
-#define NPT_NEPTUNE_VERSION_STRING "1.1.3"
-
-#endif // _NPT_VERSION_H_
diff --git a/extra_lib/include/platinum/NptXml.h b/extra_lib/include/platinum/NptXml.h
deleted file mode 100644
index bde9c3e..0000000
--- a/extra_lib/include/platinum/NptXml.h
+++ /dev/null
@@ -1,390 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Xml Support
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_XML_H_
-#define _NPT_XML_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptTypes.h"
-#include "NptList.h"
-#include "NptStrings.h"
-#include "NptStreams.h"
-
-/*----------------------------------------------------------------------
-|   constants
-+---------------------------------------------------------------------*/
-const int NPT_ERROR_XML_INVALID_NESTING = NPT_ERROR_BASE_XML - 0;
-const int NPT_ERROR_XML_TAG_MISMATCH    = NPT_ERROR_BASE_XML - 1;
-const int NPT_ERROR_XML_NO_ROOT         = NPT_ERROR_BASE_XML - 2;
-const int NPT_ERROR_XML_MULTIPLE_ROOTS  = NPT_ERROR_BASE_XML - 3;
-
-#define NPT_XML_ANY_NAMESPACE "*"
-#define NPT_XML_NO_NAMESPACE  NULL
-
-/*----------------------------------------------------------------------
-|   forward declarations
-+---------------------------------------------------------------------*/
-class NPT_XmlProcessor;
-
-/*----------------------------------------------------------------------
-|   NPT_XmlAttribute
-+---------------------------------------------------------------------*/
-class NPT_XmlAttribute
-{
- public:
-    // methods
-    NPT_XmlAttribute(const char* name, const char* value);
-    NPT_XmlAttribute(const char* prefix, const char* name, const char* value) :
-        m_Prefix(prefix), m_Name(name), m_Value(value) {}
-    const NPT_String& GetPrefix() const { return m_Prefix; }
-    const NPT_String& GetName()   const { return m_Name;   }
-    const NPT_String& GetValue()  const { return m_Value;  }
-    void              SetValue(const char* value) { m_Value = value; }
-
- private:
-    // members
-    NPT_String m_Prefix;
-    NPT_String m_Name;
-    NPT_String m_Value;
-
-    NPT_XmlAttribute(const NPT_XmlAttribute& attribute) :
-        m_Prefix(attribute.m_Prefix), 
-        m_Name(attribute.m_Name), 
-        m_Value(attribute.m_Value) {}
-    NPT_XmlAttribute& operator=(const NPT_XmlAttribute& a);
-
-    // friends
-    friend class NPT_XmlAttributeFinder;
-    friend class NPT_XmlAttributeFinderWithPrefix;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_XmlNamespaceMap
-+---------------------------------------------------------------------*/
-class NPT_XmlNamespaceMap
-{
-public:
-    // destructor
-    ~NPT_XmlNamespaceMap();
-
-    // methods   
-    NPT_Result        SetNamespaceUri(const char* prefix, const char* uri);
-    const NPT_String* GetNamespaceUri(const char* prefix);
-    const NPT_String* GetNamespacePrefix(const char* uri);
-
-private:
-    // types
-    class Entry {
-    public:
-        // constructor
-        Entry(const char* prefix, const char* uri) : 
-            m_Prefix(prefix), m_Uri(uri) {}
-
-        // members
-        NPT_String m_Prefix;
-        NPT_String m_Uri;
-    };
-
-    // members
-    NPT_List<Entry*> m_Entries;
-
-    // friends
-    friend class NPT_XmlWriter;
-    friend class NPT_XmlNodeWriter;
-    friend class NPT_XmlNodeCanonicalWriter;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_XmlNode
-+---------------------------------------------------------------------*/
-class NPT_XmlElementNode;
-class NPT_XmlTextNode;
-class NPT_XmlNode
-{
- public:
-    // types
-    typedef enum {
-        DOCUMENT,
-        ELEMENT,
-        TEXT
-    } Type;
-
-    // methods
-    NPT_XmlNode(Type type) : m_Type(type), m_Parent(NULL) {}
-    virtual     ~NPT_XmlNode() {}
-    Type         GetType() const { return m_Type; }
-    NPT_XmlNode* GetParent() const { return m_Parent; }
-
-    // type casting
-    virtual NPT_XmlElementNode*       AsElementNode()       { return NULL; }
-    virtual const NPT_XmlElementNode* AsElementNode() const { return NULL; }
-    virtual NPT_XmlTextNode*          AsTextNode()          { return NULL; }
-    virtual const NPT_XmlTextNode*    AsTextNode() const    { return NULL; }
-
- protected:
-    // methods
-    virtual void SetParent(NPT_XmlNode* parent) { m_Parent = parent; }
-
-    // members  
-    Type         m_Type;
-    NPT_XmlNode* m_Parent;
-
-    // friends
-    friend class NPT_XmlNodeFinder;
-    friend class NPT_XmlSerializer;
-    friend class NPT_XmlWriter;
-    friend class NPT_XmlElementNode; // to allow access to SetParent()
-};
-
-/*----------------------------------------------------------------------
-|   NPT_XmlElementNode
-+---------------------------------------------------------------------*/
-class NPT_XmlElementNode : public NPT_XmlNode
-{
- public:
-    // methods
-                            NPT_XmlElementNode(const char* tag);
-                            NPT_XmlElementNode(const char* prefix, const char* tag);
-    virtual                ~NPT_XmlElementNode();
-    NPT_List<NPT_XmlNode*>& GetChildren() { return m_Children; }
-    const NPT_List<NPT_XmlNode*>& 
-                            GetChildren() const { return m_Children; }
-    NPT_XmlElementNode*     GetChild(const char* tag, 
-                                     const char* namespc = NPT_XML_NO_NAMESPACE,
-                                     NPT_Ordinal n=0) const;
-    NPT_Result              AddChild(NPT_XmlNode* child);
-    NPT_Result              SetAttribute(const char* prefix,
-                                         const char* name, 
-                                         const char* value);
-    NPT_Result              SetAttribute(const char* name, 
-                                         const char* value);
-    NPT_Result              AddText(const char* text); 
-    NPT_List<NPT_XmlAttribute*>& 
-                            GetAttributes() { return m_Attributes; }
-    const NPT_List<NPT_XmlAttribute*>&
-                            GetAttributes() const { return m_Attributes; }
-    const NPT_String*       GetAttribute(const char* name,
-                                         const char* namespc = NPT_XML_NO_NAMESPACE) const;
-    const NPT_String&       GetPrefix() const { return m_Prefix; }
-    const NPT_String&       GetTag()    const { return m_Tag;    }
-    const NPT_String*       GetText(NPT_Ordinal n=0) const;
-
-    // bring all the namespace definitions used in this element of one of its descendants
-    // into the namespace map of this element so that it may be serialized as a
-    // standalone element without any prefixes with undefined namespace uris
-    NPT_Result              MakeStandalone();
-
-    // namespace methods   
-    const NPT_String* GetNamespace() const;
-    NPT_Result        SetNamespaceUri(const char* prefix, const char* uri);
-    const NPT_String* GetNamespaceUri(const char* prefix) const;
-    const NPT_String* GetNamespacePrefix(const char* uri) const;
-
-    // type casting
-    NPT_XmlElementNode*       AsElementNode()       { return this; }
-    const NPT_XmlElementNode* AsElementNode() const { return this; }
-
-protected:
-    // methods
-    void SetParent(NPT_XmlNode* parent);
-    void SetNamespaceParent(NPT_XmlElementNode* parent);
-    void RelinkNamespaceMaps();
-
-    NPT_Result AddAttribute(const char* name, const char* value);
-
-    // members  
-    NPT_String                  m_Prefix;
-    NPT_String                  m_Tag;
-    NPT_List<NPT_XmlNode*>      m_Children;
-    NPT_List<NPT_XmlAttribute*> m_Attributes;
-    NPT_XmlNamespaceMap*        m_NamespaceMap;
-    NPT_XmlElementNode*         m_NamespaceParent;
-
-    // friends
-    friend class NPT_XmlTagFinder;
-    friend class NPT_XmlSerializer;
-    friend class NPT_XmlWriter;
-    friend class NPT_XmlNodeWriter;
-    friend class NPT_XmlNodeCanonicalWriter;
-    friend class NPT_XmlParser;
-    friend class NPT_XmlProcessor;
-    friend class NPT_XmlNamespaceCollapser;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_XmlTextNode
-+---------------------------------------------------------------------*/
-class NPT_XmlTextNode : public NPT_XmlNode
-{
- public:
-    // types
-    typedef enum {
-        CHARACTER_DATA,
-        IGNORABLE_WHITESPACE,
-        CDATA_SECTION,
-        ENTITY_REFERENCE,
-        COMMENT
-    } TokenType;
-
-    // constructor
-    NPT_XmlTextNode(TokenType token_type, const char* text);
-
-    // methods
-    const NPT_String& GetString() const { return m_Text; }
-
-    // type casting
-    NPT_XmlTextNode*       AsTextNode()       { return this; }
-    const NPT_XmlTextNode* AsTextNode() const { return this; }
-
- private:
-    // members  
-//    TokenType  m_TokenType;
-    NPT_String m_Text;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_XmlParser
-+---------------------------------------------------------------------*/
-class NPT_XmlParser
-{
- public:
-    // methods
-             NPT_XmlParser(bool keep_whitespace = true);
-    virtual ~NPT_XmlParser();
-    virtual  NPT_Result Parse(const char*   xml, 
-                              NPT_XmlNode*& tree,
-                              bool          incremental=false);
-    virtual  NPT_Result Parse(const char*   xml, 
-                              NPT_Size      size,
-                              NPT_XmlNode*& tree,
-                              bool          incremental=false);
-    virtual  NPT_Result Parse(NPT_InputStream& stream, 
-                              NPT_XmlNode*&    tree,
-                              bool             incremental=false);
-    virtual  NPT_Result Parse(NPT_InputStream& stream, 
-                              NPT_Size&        size,
-                              NPT_XmlNode*&    tree,
-                              bool             incremental=false);
-    
- protected:
-    // NPT_XmlHandler methods
-    NPT_Result OnStartElement(const char* name);
-    NPT_Result OnElementAttribute(const char* name, const char* value);
-    NPT_Result OnEndElement(const char* name);
-    NPT_Result OnCharacterData(const char* data, unsigned long size);
-    void       RemoveIgnorableWhitespace();
-
-    // members
-    NPT_XmlProcessor*   m_Processor;
-    NPT_XmlElementNode* m_Root;
-    NPT_XmlElementNode* m_CurrentElement;
-    bool                m_KeepWhitespace;
-
-private:
-    void Reset();
-    
-    // friends
-    friend class NPT_XmlProcessor;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_XmlSerializer
-+---------------------------------------------------------------------*/
-class NPT_XmlSerializer
-{
-public:
-    // methods
-                       NPT_XmlSerializer(NPT_OutputStream* output,
-                                         NPT_Cardinal      indentation = 0,
-                                         bool              shrink_empty_elements = true,
-                                         bool              add_xml_decl = false);
-    virtual           ~NPT_XmlSerializer();
-    virtual NPT_Result StartDocument();
-    virtual NPT_Result EndDocument();
-    virtual NPT_Result StartElement(const char* prefix, const char* name);
-    virtual NPT_Result EndElement(const char* prefix, const char* name);
-    virtual NPT_Result Attribute(const char* prefix, const char* name, const char* value);
-    virtual NPT_Result Text(const char* text);
-    virtual NPT_Result CdataSection(const char* data);
-    virtual NPT_Result Comment(const char* comment);
-
-protected:
-    // methods
-    void       EscapeChar(unsigned char c, char* text);
-    NPT_Result ProcessPending();
-    NPT_Result OutputEscapedString(const char* text, bool attribute);
-    void       OutputIndentation(bool start);
-
-    // members
-    NPT_OutputStream* m_Output;
-    bool              m_ElementPending;
-    NPT_Cardinal      m_Depth;
-    NPT_Cardinal      m_Indentation;
-    NPT_String        m_IndentationPrefix;
-    bool              m_ElementHasText;
-    bool              m_ShrinkEmptyElements;
-    bool              m_AddXmlDecl;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_XmlWriter
-+---------------------------------------------------------------------*/
-class NPT_XmlWriter
-{
-public:
-    // constructor
-    explicit NPT_XmlWriter(NPT_Cardinal indentation = 0) : m_Indentation(indentation) {}
-
-    // methods
-    NPT_Result Serialize(NPT_XmlNode&      node, 
-                         NPT_OutputStream& stream, 
-                         bool              add_xml_decl = false);
-
-private:
-    // members
-    NPT_Cardinal m_Indentation;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_XmlCanonicalizer
-+---------------------------------------------------------------------*/
-class NPT_XmlCanonicalizer
-{
-public:
-    // methods
-    NPT_Result Serialize(NPT_XmlNode&      node, 
-                         NPT_OutputStream& stream, 
-                         bool              add_xml_decl = false);
-};
-
-#endif // _NPT_XML_H_
diff --git a/extra_lib/include/platinum/NptZip.h b/extra_lib/include/platinum/NptZip.h
deleted file mode 100644
index 384783b..0000000
--- a/extra_lib/include/platinum/NptZip.h
+++ /dev/null
@@ -1,176 +0,0 @@
-/*****************************************************************
-|
-|   Neptune - Zip Support
-|
-| Copyright (c) 2002-2008, Axiomatic Systems, LLC.
-| 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 Axiomatic Systems 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 AXIOMATIC SYSTEMS ''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 AXIOMATIC SYSTEMS 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.
-|
- ****************************************************************/
-
-#ifndef _NPT_ZIP_H_
-#define _NPT_ZIP_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptConfig.h"
-#include "NptStreams.h"
-#include "NptFile.h"
-
-/*----------------------------------------------------------------------
-|   class references
-+---------------------------------------------------------------------*/
-class NPT_ZipInflateState;
-class NPT_ZipDeflateState;
-
-/*----------------------------------------------------------------------
-|   NPT_Zip
-+---------------------------------------------------------------------*/
-const int NPT_ZIP_COMPRESSION_LEVEL_DEFAULT = -1;
-const int NPT_ZIP_COMPRESSION_LEVEL_MIN     = 0;
-const int NPT_ZIP_COMPRESSION_LEVEL_MAX     = 9;
-const int NPT_ZIP_COMPRESSION_LEVEL_NONE    = 0;
-class NPT_Zip 
-{
-public:
-    // class methods
-    static NPT_Result MapError(int err);
-
-    /** 
-     * Compressed data format
-     */
-    typedef enum {
-        ZLIB,
-        GZIP
-    } Format;
-        
-    /**
-     * Deflate (i.e compress) a buffer
-     */
-    static NPT_Result Deflate(const NPT_DataBuffer& in,
-                              NPT_DataBuffer&       out,
-                              int                   compression_level = NPT_ZIP_COMPRESSION_LEVEL_DEFAULT,
-                              Format                format = ZLIB);
-                              
-    /**
-     * Inflate (i.e decompress) a buffer
-     */
-    static NPT_Result Inflate(const NPT_DataBuffer& in,
-                              NPT_DataBuffer&       out);   
-    
-    /**
-     * Deflate (i.e compress) a file
-     */
-    static NPT_Result Deflate(NPT_File& in,
-                              NPT_File& out,
-                              int       compression_level = NPT_ZIP_COMPRESSION_LEVEL_DEFAULT,
-                              Format    format = GZIP);
-    
-};
-
-/*----------------------------------------------------------------------
-|   NPT_ZipInflatingInputStream
-+---------------------------------------------------------------------*/
-class NPT_ZipInflatingInputStream : public NPT_InputStream 
-{
-public:
-    NPT_ZipInflatingInputStream(NPT_InputStreamReference& source);
-   ~NPT_ZipInflatingInputStream();
-   
-    // NPT_InputStream methods
-    virtual NPT_Result Read(void*     buffer, 
-                            NPT_Size  bytes_to_read, 
-                            NPT_Size* bytes_read = NULL);
-    virtual NPT_Result Seek(NPT_Position offset);
-    virtual NPT_Result Tell(NPT_Position& offset);
-    virtual NPT_Result GetSize(NPT_LargeSize& size);
-    virtual NPT_Result GetAvailable(NPT_LargeSize& available);
-
-private:
-    NPT_InputStreamReference m_Source;
-    NPT_Position             m_Position;
-    NPT_ZipInflateState*     m_State;
-    NPT_DataBuffer           m_Buffer;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_ZipInflatingOutputStream
-+---------------------------------------------------------------------*/
-
-/*----------------------------------------------------------------------
-|   NPT_ZipDeflatingInputStream
-+---------------------------------------------------------------------*/
-class NPT_ZipDeflatingInputStream : public NPT_InputStream 
-{
-public:
-    NPT_ZipDeflatingInputStream(NPT_InputStreamReference& source,
-                                int                       compression_level = NPT_ZIP_COMPRESSION_LEVEL_DEFAULT,
-                                NPT_Zip::Format           format = NPT_Zip::ZLIB);
-   ~NPT_ZipDeflatingInputStream();
-   
-    // NPT_InputStream methods
-    virtual NPT_Result Read(void*     buffer, 
-                            NPT_Size  bytes_to_read, 
-                            NPT_Size* bytes_read = NULL);
-    virtual NPT_Result Seek(NPT_Position offset);
-    virtual NPT_Result Tell(NPT_Position& offset);
-    virtual NPT_Result GetSize(NPT_LargeSize& size);
-    virtual NPT_Result GetAvailable(NPT_LargeSize& available);
-
-private:
-    NPT_InputStreamReference m_Source;
-    NPT_Position             m_Position;
-    bool                     m_Eos;
-    NPT_ZipDeflateState*     m_State;
-    NPT_DataBuffer           m_Buffer;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_ZipDeflatingOutputStream
-+---------------------------------------------------------------------*/
-/*class NPT_ZipDeflatingOutputStream : public NPT_OutputStream 
-{
-public:
-    NPT_ZipDeflatingOutputStream(NPT_OutputStreamReference& source,
-                                 int                        compression_level = NPT_ZIP_COMPRESSION_LEVEL_DEFAULT,
-                                 NPT_Zip::Format            format = NPT_Zip::ZLIB);
-   NPT_ZipDeflatingOutputStream();
-   
-    // NPT_OutputStream methods
-    virtual NPT_Result Write(void*     buffer, 
-                             NPT_Size  bytes_to_write, 
-                             NPT_Size* bytes_written = NULL);
-    virtual NPT_Result Seek(NPT_Position offset);
-    virtual NPT_Result Tell(NPT_Position& offset);
-
-private:
-    NPT_OutputStreamReference m_Output;
-    NPT_Position              m_Position;
-    bool                      m_Eos;
-    NPT_ZipDeflateState*      m_State;
-    NPT_DataBuffer            m_Buffer;
-}; */
-
-#endif // _NPT_ZIP_H_
diff --git a/extra_lib/include/platinum/Platinum.h b/extra_lib/include/platinum/Platinum.h
deleted file mode 100644
index a7f47a6..0000000
--- a/extra_lib/include/platinum/Platinum.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - Top Level Include
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-| 
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
- ****************************************************************/
-/** @file
- Master Header file included by Platinum client applications.
- 
- Client Applications should only need to include this file, as it 
- includes all the more specific include files required to use the API
- */
-
-/** 
- at mainpage Platinum UPnP SDK
-
- at section intro Introduction
-
-The Platinum SDK contains all the software components necessary to 
-build and use the Platinum UPnP Framework. This includes
-the Platinum framework and the Neptune C++ runtime
-library.
-
- at section architecture Architecture
-
-The Platinum framework consists of a core framework that implements the UPnP
-core specifications including GENA, SOAP and SSDP. Building on top of that, the 
-Platinum framework provides the foundation for UPnP AV Media Server and 
-Media Renderer compliant implementations.
- 
-The Platinum framework leverages the Neptune C++ runtime library which offers an 
-elegant platform abstraction layer for multithreading, file system and 
-network operations. Additionally, it provides support for XML parsing, string and time
-manipulation, template based linked-lists, stacks and arrays, and a configurable 
-cross-platform logging system.
- 
-*/
-
-#ifndef _PLATINUM_H_
-#define _PLATINUM_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "PltUPnP.h"
-#include "PltCtrlPoint.h"
-#include "PltDeviceData.h"
-#include "PltHttpServer.h"
-#include "PltVersion.h"
-
-#include "PltMimeType.h"
-#include "PltProtocolInfo.h"
-#include "PltAction.h"
-#include "PltArgument.h"
-#include "PltConstants.h"
-#include "PltCtrlPointTask.h"
-#include "PltDatagramStream.h"
-#include "PltDeviceHost.h"
-#include "PltEvent.h"
-#include "PltHttp.h"
-#include "PltHttpClientTask.h"
-#include "PltHttpServer.h"
-#include "PltHttpServerTask.h"
-#include "PltService.h"
-#include "PltSsdp.h"
-#include "PltStateVariable.h"
-#include "PltTaskManager.h"
-#include "PltThreadTask.h"
-#include "PltUtilities.h"
-
-#include "PltMediaServer.h"
-#include "PltMediaBrowser.h"
-#include "PltMediaRenderer.h"
-#include "PltMediaController.h"
-#include "PltDidl.h"
-#include "PltFileMediaServer.h"
-#include "PltMediaCache.h"
-#include "PltMediaItem.h"
-#include "PltSyncMediaBrowser.h"
-
-#include "PltXbox360.h"
-#include "PltMediaConnect.h"
-
-#include "PltDownloader.h"
-#include "PltStreamPump.h"
-#include "PltFrameBuffer.h"
-#include "PltFrameServer.h"
-#include "PltFrameStream.h"
-#include "PltRingBufferStream.h"
-
-#endif /* _PLATINUM_H_ */
diff --git a/extra_lib/include/platinum/PltAction.h b/extra_lib/include/platinum/PltAction.h
deleted file mode 100644
index f457f3d..0000000
--- a/extra_lib/include/platinum/PltAction.h
+++ /dev/null
@@ -1,321 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - Service Action
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-/** @file
-   UPnP Service Action
- */
-
-#ifndef _PLT_ACTION_H_
-#define _PLT_ACTION_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-#include "PltArgument.h"
-#include "PltDeviceData.h"
-
-/*----------------------------------------------------------------------
-|   forward declarations
-+---------------------------------------------------------------------*/
-class PLT_Service;
-
-/*----------------------------------------------------------------------
-|   PLT_ActionDesc
-+---------------------------------------------------------------------*/
-/**
- The PLT_ActionDesc class provides information about a UPnP Service given action.
- This description has a name, a set of arguments and is associated to a service.
- */
-class PLT_ActionDesc
-{
-public:
-    /**
-     Constructor
-     @param name the action name
-     @param service the UPnP service the action is associated with
-     */
-    PLT_ActionDesc(const char* name, PLT_Service* service);
-   ~PLT_ActionDesc();
-
-    /**
-     Return an array of arguments
-     @return array of arguments
-     */
-    NPT_Array<PLT_ArgumentDesc*>& GetArgumentDescs() { 
-        return m_ArgumentDescs; 
-    }
-
-    /**
-     Return the action name.
-     @return action name.
-     */
-    const NPT_String& GetName() const { return m_Name;}
-    
-    /**
-     Look for an argument given a name.
-     @param name argument name
-     @return PLT_ArgumentDesc pointer
-     */
-    PLT_ArgumentDesc* GetArgumentDesc(const char* name);
-    
-    /**
-     Serialize action information to xml into an existing xml tree
-     @param node the xml Element to serialize action information
-     */
-    NPT_Result        GetSCPDXML(NPT_XmlElementNode* node);
-    
-    /**
-     Return the service the action is associated with
-     */
-    PLT_Service*      GetService();
-
-protected:
-    //members
-    NPT_String                   m_Name;
-    PLT_Service*                 m_Service;
-    NPT_Array<PLT_ArgumentDesc*> m_ArgumentDescs;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_Action
-+---------------------------------------------------------------------*/
-/** 
- The PLT_Action class provides a mechanism to call or verify the validity of a
- specific UPNP service action.
- Given a service, a UPnP Control Point would use this class to serialize a soap
- request. On the other side, a UPnP Device would use this class to verify
- a soap request and the validity of the action arguments.
- */
-class PLT_Action
-{
-public:
-    /**
-     Constructor
-     @param action_desc the action description
-     If you intend to send an action, you need to use the second constructor
-     and pass the root device of the device you wish to control.
-     */
-    PLT_Action(PLT_ActionDesc& action_desc);
-    
-    /**
-     Constructor
-     @param action_desc the action description
-     @param root_device a reference to the root device of the service the action
-     is associated with. This insures that the device won't be deleted if it goes 
-     away while we're waiting for a response for this action. This is important because
-     we only keep a reference to the PLT_ActionDesc which is own by the service operated
-     by the device (or embedded device).
-     */
-    PLT_Action(PLT_ActionDesc& action_desc, PLT_DeviceDataReference& root_device);
-    ~PLT_Action();
-
-    /**
-     Return the action description
-     @return the action description
-     */
-    PLT_ActionDesc& GetActionDesc() { return m_ActionDesc; }
-    
-    /**
-     Retrieve the string value of an argument given an argument name.
-     @param name the argument name
-     @param value the string value to retrieve
-     @return error if the argument is not found or if the type does not correspond.
-     */
-    NPT_Result GetArgumentValue(const char* name, NPT_String& value);
-    
-    /**
-     Retrieve the value of an argument given an argument name.
-     @param name the argument name
-     @param value the unsigned int value to retrieve
-     @return error if the argument is not found or if the type does not correspond.
-     */
-    NPT_Result GetArgumentValue(const char* name, NPT_UInt32& value);
-    
-    /**
-     Retrieve the value of an argument given an argument name.
-     @param name the argument name
-     @param value the int value to retrieve
-     @return error if the argument is not found or if the type does not correspond.
-     */
-    NPT_Result GetArgumentValue(const char* name, NPT_Int32& value);
-    
-    /**
-     Retrieve the value of an argument given an argument name.
-     @param name the argument name
-     @param value the bool value to retrieve
-     @return error if the argument is not found or if the type does not correspond.
-     */
-	NPT_Result GetArgumentValue(const char* name, bool& value);
-    
-    /**
-     Verify a value is valid for a given argument.
-     @param name the argument name
-     @param value the value to verify
-     */
-    NPT_Result VerifyArgumentValue(const char* name, const char* value);
-    
-    /**
-     Verify that all required arguments are set.
-     @param input boolean indicating whether input or output parameters 
-     should be verified
-     */
-    NPT_Result VerifyArguments(bool input);
-    
-    /**
-     Set the output argument value from the associated current state variable value.
-     @param name the state variable name
-     */
-    NPT_Result SetArgumentOutFromStateVariable(const char* name);
-    
-    /**
-     Set all the output argument values associated with state variables.
-     */
-    NPT_Result SetArgumentsOutFromStateVariable();
-    
-    /**
-     Set an argument value
-     @param name the argument name
-     @param value the argument value
-     */
-    NPT_Result SetArgumentValue(const char* name, const char* value);
-
-    /** 
-     Set the error code and description in case of failure.
-     @param code the code for the error
-     @param description a short description
-     */
-    NPT_Result SetError(unsigned int code, const char* description);
-    
-    /**
-     Return the error description and code for the failed action.
-     @param code optional pointer to receive the code
-     @return the error short description
-     */
-    const char* GetError(unsigned int* code = NULL);
-    
-    /**
-     Return the error code for the failed action.
-     @return the error code.
-     */
-    unsigned int GetErrorCode();
-    
-    /**
-     Called by a control point when serializing an action.
-     @param stream the stream to serialize the action to
-     */
-    NPT_Result    FormatSoapRequest(NPT_OutputStream& stream);
-    
-    /**
-     Called by a device when serializing a response to an action.
-     @param stream the stream to serialize the action to
-     */
-    NPT_Result    FormatSoapResponse(NPT_OutputStream& stream);
-
-    /**
-     Helper method for a device to serialize an action invocation error.
-     @param code optional pointer to receive the code
-     @param desc the error short description
-     @param stream the stream to serialize to
-     */
-    static NPT_Result FormatSoapError(unsigned int      code, 
-                                      NPT_String        desc, 
-                                      NPT_OutputStream& stream);
-
-private:
-    // methods
-    NPT_Result    SetArgumentOutFromStateVariable(PLT_ArgumentDesc* arg_desc);
-    PLT_Argument* GetArgument(const char* name);
-
-protected:
-    // members
-    PLT_ActionDesc&         m_ActionDesc;
-    PLT_Arguments           m_Arguments;
-    unsigned int            m_ErrorCode;
-    NPT_String              m_ErrorDescription;
-    
-    // keep reference of service root device to prevent it 
-    // from being released during action lifetime
-	PLT_DeviceDataReference m_RootDevice;
-};
-
-typedef NPT_Reference<PLT_Action> PLT_ActionReference;
-
-/*----------------------------------------------------------------------
-|   PLT_GetSCPDXMLIterator
-+---------------------------------------------------------------------*/
-/**
- The PLT_GetSCPDXMLIterator class provides a recursive way to serialize 
- an SCPD into an xml tree.
- */
-template <class T>
-class PLT_GetSCPDXMLIterator
-{
-public:
-    PLT_GetSCPDXMLIterator<T>(NPT_XmlElementNode* node) :
-        m_Node(node) {}
-      
-    NPT_Result operator()(T* const & data) const {
-        return data->GetSCPDXML(m_Node);
-    }
-
-private:
-    NPT_XmlElementNode* m_Node;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_ActionDescNameFinder
-+---------------------------------------------------------------------*/
-/** 
- The PLT_ActionDescNameFinder class provides a mechanism to find a PLT_ActionDesc 
- given an action name.
- */
-class PLT_ActionDescNameFinder
-{
-public:
-    // methods
-    PLT_ActionDescNameFinder(const char* name) : 
-        m_Name(name) {}
-    virtual ~PLT_ActionDescNameFinder() {}
-
-    bool operator()(const PLT_ActionDesc* const & action_desc) const {
-        return action_desc->GetName().Compare(m_Name, true) ? false : true;
-    }
-
-private:
-    // members
-    NPT_String   m_Name;
-};
-
-#endif /* _PLT_ACTION_H_ */
diff --git a/extra_lib/include/platinum/PltArgument.h b/extra_lib/include/platinum/PltArgument.h
deleted file mode 100644
index 4730e28..0000000
--- a/extra_lib/include/platinum/PltArgument.h
+++ /dev/null
@@ -1,168 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - Action Argument
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-/** @file
- UPnP Service Action Argument
- */
-
-#ifndef _PLT_ARGUMENT_H_
-#define _PLT_ARGUMENT_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-
-/*----------------------------------------------------------------------
-|   forward declarations
-+---------------------------------------------------------------------*/
-class PLT_StateVariable;
-class PLT_Argument;
-class PLT_ActionDesc;
-typedef NPT_Array<PLT_Argument*> PLT_Arguments;
-
-/*----------------------------------------------------------------------
-|   PLT_ArgumentDesc
-+---------------------------------------------------------------------*/
-/**
- The PLT_ArgumentDesc class provides information about a given argument of a 
- UPnP Service given action.
- It has a name, a position, a direction (in/out), a PLT_StateVariable state 
- variable association and whether it is the return value of the action or not.
- */
-class PLT_ArgumentDesc
-{
-public:
-    PLT_ArgumentDesc(const char*        name,
-                     NPT_Ordinal        position,
-                     const char*        direction = "in",
-                     PLT_StateVariable* variable = NULL, 
-                     bool               has_ret = false);
-
-    // accessor methods
-    NPT_Result         GetSCPDXML(NPT_XmlElementNode* node);
-    const NPT_String&  GetName() const { return m_Name; }
-    const NPT_String&  GetDirection() const { return m_Direction; }
-    NPT_Ordinal        GetPosition() { return m_Position; }
-    PLT_StateVariable* GetRelatedStateVariable() { return m_RelatedStateVariable; }
-    bool               HasReturnValue() { return m_HasReturnValue; }
-
-protected:
-    NPT_String         m_Name;
-    NPT_Ordinal        m_Position;
-    NPT_String         m_Direction;
-    PLT_StateVariable* m_RelatedStateVariable;
-    bool               m_HasReturnValue;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_Argument
-+---------------------------------------------------------------------*/
-/** 
- The PLT_Argument class provides a mechanism to set or verify the validity of a
- specific UPNP service action argument.
- Typically, only a PLT_Action uses this class. Since an argument can be
- associated to a state variable, the argument is automatically updated when
- the associated state variable is changed 
- */
-class PLT_Argument
-{
-public:
-    PLT_Argument(PLT_ArgumentDesc& arg_desc);
-
-    // class methods
-    static NPT_Result CreateArgument(PLT_ActionDesc& action_desc, 
-                                     const char*     arg_name, 
-                                     const char*     arg_value,
-                                     PLT_Argument*&  arg);
-
-    // accessor methods
-    PLT_ArgumentDesc&  GetDesc() { return m_ArgDesc; }
-    NPT_Ordinal        GetPosition() { return m_ArgDesc.GetPosition(); }
-    NPT_Result         SetValue(const char* value);
-    const NPT_String&  GetValue();
-
-private:
-    NPT_Result         ValidateValue(const char* value);
-    
-protected:
-    PLT_ArgumentDesc&  m_ArgDesc;
-    NPT_String         m_Value;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_ArgumentNameFinder
-+---------------------------------------------------------------------*/
-/** 
- The PLT_ArgumentNameFinder class provides a mechanism to find a PLT_Argument given
- an argument name.
- */
-class PLT_ArgumentNameFinder
-{
-public:
-    // methods
-    PLT_ArgumentNameFinder(const char* name) : m_Name(name) {}
-
-    bool operator()(PLT_Argument* const & argument) const {
-        return argument->GetDesc().GetName().Compare(m_Name, true) ? false : true;
-    }
-
-private:
-    // members
-    NPT_String m_Name;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_ArgumentDescNameFinder
-+---------------------------------------------------------------------*/
-/** 
- The PLT_ArgumentDescNameFinder class provides a mechanism to find a PLT_ArgumentDesc given
- an argument name.
- */
-class PLT_ArgumentDescNameFinder
-{
-public:
-    // methods
-    PLT_ArgumentDescNameFinder(const char* name) : m_Name(name) {}
-
-    bool operator()(PLT_ArgumentDesc* const & arg_desc) const {
-        return arg_desc->GetName().Compare(m_Name, true) ? false : true;
-    }
-
-private:
-    // members
-    NPT_String m_Name;
-};
-
-#endif /* _PLT_ARGUMENT_H_ */
diff --git a/extra_lib/include/platinum/PltConstants.h b/extra_lib/include/platinum/PltConstants.h
deleted file mode 100644
index d674ea8..0000000
--- a/extra_lib/include/platinum/PltConstants.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - UPnP Constants
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-/** @file
- UPnP Constants
- */
-
-#ifndef _PLT_UPNP_CONSTANTS_H_
-#define _PLT_UPNP_CONSTANTS_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-
-/*----------------------------------------------------------------------
-|   PLT_Constants
-+---------------------------------------------------------------------*/
-/**
- The PLT_Constants class provides a way to globally set or get certain 
- UPnP constants.
- */
-class PLT_Constants
-{
-public:
-    // class methods
-    static PLT_Constants& GetInstance();
-    
-    PLT_Constants();
-    ~PLT_Constants() {};
-    
-    void SetDefaultDeviceLease(NPT_TimeInterval lease) { m_DefaultDeviceLease = new NPT_TimeInterval(lease); }
-    NPT_Reference<NPT_TimeInterval> GetDefaultDeviceLease() { return m_DefaultDeviceLease; }
-  
-    void SetDefaultSubscribeLease(NPT_TimeInterval lease) { m_DefaultSubscribeLease = new NPT_TimeInterval(lease); }
-    NPT_Reference<NPT_TimeInterval> GetDefaultSubscribeLease() { return m_DefaultSubscribeLease; }
-    
-    void SetDefaultUserAgent(const char* agent) { m_DefaultUserAgent = new NPT_String(agent); }
-    NPT_Reference<NPT_String> GetDefaultUserAgent() { return m_DefaultUserAgent; }
-    
-    void SetSearchMulticastTimeToLive(NPT_UInt32 ttl) { m_SearchMulticastTimeToLive = ttl; }
-    NPT_UInt32 GetSearchMulticastTimeToLive() { return m_SearchMulticastTimeToLive; }
-
-    void SetAnnounceMulticastTimeToLive(NPT_UInt32 ttl) { m_AnnounceMulticastTimeToLive = ttl; }
-    NPT_UInt32 GetAnnounceMulticastTimeToLive() { return m_AnnounceMulticastTimeToLive; }
-
-private:
-    // members
-    NPT_Reference<NPT_TimeInterval> m_DefaultDeviceLease;
-    NPT_Reference<NPT_TimeInterval> m_DefaultSubscribeLease;
-    NPT_Reference<NPT_String>       m_DefaultUserAgent;
-    NPT_UInt32                      m_SearchMulticastTimeToLive;
-    NPT_UInt32                      m_AnnounceMulticastTimeToLive;
-};
-
-#endif /* _PLT_UPNP_CONSTANTS_H_ */
diff --git a/extra_lib/include/platinum/PltCtrlPoint.h b/extra_lib/include/platinum/PltCtrlPoint.h
deleted file mode 100644
index 8666ea1..0000000
--- a/extra_lib/include/platinum/PltCtrlPoint.h
+++ /dev/null
@@ -1,255 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - Control Point
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-/** @file
- UPnP ControlPoint
- */
-
-#ifndef _PLT_CONTROL_POINT_H_
-#define _PLT_CONTROL_POINT_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-#include "PltService.h"
-#include "PltSsdp.h"
-#include "PltDeviceData.h"
-
-/*----------------------------------------------------------------------
-|   forward declarations
-+---------------------------------------------------------------------*/
-class PLT_HttpServer;
-class PLT_CtrlPointHouseKeepingTask;
-class PLT_SsdpSearchTask;
-class PLT_SsdpListenTask;
-class PLT_CtrlPointGetSCPDsTask;
-class PLT_CtrlPointGetSCPDRequest;
-
-/*----------------------------------------------------------------------
-|   PLT_CtrlPointListener class
-+---------------------------------------------------------------------*/
-/**
- The PLT_CtrlPointListener class is an interface used to receive notifications when
- devices are found or removed from the network, actions responses and events
- are being received.
- */
-class PLT_CtrlPointListener
-{
-public:
-    virtual ~PLT_CtrlPointListener() {}
-
-    virtual NPT_Result OnDeviceAdded(PLT_DeviceDataReference& device) = 0;
-    virtual NPT_Result OnDeviceRemoved(PLT_DeviceDataReference& device) = 0;
-    virtual NPT_Result OnActionResponse(NPT_Result res, PLT_ActionReference& action, void* userdata) = 0;
-    virtual NPT_Result OnEventNotify(PLT_Service* service, NPT_List<PLT_StateVariable*>* vars) = 0;
-};
-
-typedef NPT_List<PLT_CtrlPointListener*> PLT_CtrlPointListenerList;
-
-/*----------------------------------------------------------------------
-|   PLT_CtrlPoint class
-+---------------------------------------------------------------------*/
-/**
- The PLT_CtrlPoint class implements the base functionality of a UPnP ControlPoint.
- It searches and inpects devices, invoke actions on services and subscribes to 
- events. 
- */
-class PLT_CtrlPoint : public PLT_SsdpPacketListener,
-                      public PLT_SsdpSearchResponseListener,
-                      public NPT_HttpRequestHandler
-{
-public:
-    PLT_CtrlPoint(const char* search_criteria = "upnp:rootdevice"); // pass NULL to prevent repeated automatic search
-    virtual ~PLT_CtrlPoint();
-    
-    /**
-     Returns the port used by the internal HTTP server for all incoming event notifications.
-     @return port
-     */
-    virtual NPT_Result GetPort(NPT_UInt16& port);
-    
-    // delegation
-    virtual NPT_Result AddListener(PLT_CtrlPointListener* listener);
-    virtual NPT_Result RemoveListener(PLT_CtrlPointListener* listener);
-
-    // discovery
-    virtual void IgnoreUUID(const char* uuid);
-    virtual NPT_Result Search(const NPT_HttpUrl& url = NPT_HttpUrl("239.255.255.250", 1900, "*"), 
-                              const char*        target = "upnp:rootdevice", 
-                              NPT_Cardinal       mx = 5,
-                              NPT_TimeInterval   frequency = NPT_TimeInterval(50.), // pass NPT_TimeInterval(0.) for one time only
-                              NPT_TimeInterval   initial_delay = NPT_TimeInterval(0.));
-    virtual NPT_Result Discover(const NPT_HttpUrl& url = NPT_HttpUrl("239.255.255.250", 1900, "*"),
-                                const char*        target = "ssdp:all", 
-                                NPT_Cardinal       mx = 5,
-                                NPT_TimeInterval   frequency = NPT_TimeInterval(50.), // pass NPT_TimeInterval(0.) for one time only
-                                NPT_TimeInterval   initial_delay = NPT_TimeInterval(0.));
-    virtual NPT_Result InspectDevice(const NPT_HttpUrl& location,
-                                     const char*        uuid,
-                                     NPT_TimeInterval   leasetime = *PLT_Constants::GetInstance().GetDefaultDeviceLease());
-
-    // actions
-    virtual NPT_Result FindActionDesc(PLT_DeviceDataReference& device, 
-                                  const char*              service_type,
-                                  const char*              action_name,
-                                  PLT_ActionDesc*&         action_desc);
-    virtual NPT_Result CreateAction(PLT_DeviceDataReference& device,
-                                const char*              service_type,
-                                const char*              action_name,
-                                PLT_ActionReference&     action);
-    virtual NPT_Result InvokeAction(PLT_ActionReference& action,
-                                    void*                userdata = NULL);
-
-    // events
-    virtual NPT_Result Subscribe(PLT_Service* service, 
-                                 bool         cancel = false, 
-                                 void*        userdata = NULL);
-
-    // NPT_HttpRequestHandler methods
-    virtual NPT_Result SetupResponse(NPT_HttpRequest&              request,
-                                     const NPT_HttpRequestContext& context,
-                                     NPT_HttpResponse&             response);
-
-    // PLT_SsdpSearchResponseListener methods
-    virtual NPT_Result ProcessSsdpSearchResponse(NPT_Result                    res, 
-                                                 const NPT_HttpRequestContext& context,
-                                                 NPT_HttpResponse*             response);
-    // PLT_SsdpPacketListener method
-    virtual NPT_Result OnSsdpPacket(const NPT_HttpRequest&        request, 
-                                    const NPT_HttpRequestContext& context);
-
-protected:
-
-    // State Variable Handling
-    virtual NPT_Result DecomposeLastChangeVar(NPT_List<PLT_StateVariable*>& vars);
-
-    // methods
-    virtual NPT_Result Start(PLT_SsdpListenTask* task);
-    virtual NPT_Result Stop(PLT_SsdpListenTask* task);
-
-    // SSDP & HTTP Notifications handling
-    virtual NPT_Result ProcessSsdpNotify(const NPT_HttpRequest&        request,
-                                         const NPT_HttpRequestContext& context);
-    virtual NPT_Result ProcessSsdpMessage(const NPT_HttpMessage&        message,
-                                          const NPT_HttpRequestContext& context,  
-                                          NPT_String&                   uuid);
-    virtual NPT_Result ProcessGetDescriptionResponse(NPT_Result                    res,
-                                                     const NPT_HttpRequest&        request, 
-                                                     const NPT_HttpRequestContext& context,
-                                                     NPT_HttpResponse*             response,
-                                                     NPT_TimeInterval              leasetime,
-                                                     NPT_String                    uuid);
-    virtual NPT_Result ProcessGetSCPDResponse(NPT_Result                    res,
-                                              const NPT_HttpRequest&        request,
-                                              const NPT_HttpRequestContext& context,
-                                              NPT_HttpResponse*             response,
-                                              PLT_DeviceDataReference&      device);
-    virtual NPT_Result ProcessActionResponse(NPT_Result                    res,
-                                             const NPT_HttpRequest&        request,
-                                             const NPT_HttpRequestContext& context,
-                                             NPT_HttpResponse*             response,
-                                             PLT_ActionReference&          action,
-                                             void*                         userdata);
-    virtual NPT_Result ProcessSubscribeResponse(NPT_Result                    res,
-                                                const NPT_HttpRequest&        request, 
-                                                const NPT_HttpRequestContext& context, 
-                                                NPT_HttpResponse*             response,
-                                                PLT_Service*                  service,
-                                                void*                         userdata);
-    virtual NPT_Result ProcessHttpNotify(const NPT_HttpRequest&        request,
-                                         const NPT_HttpRequestContext& context,
-                                         NPT_HttpResponse&             response);
-
-    // Device management
-    virtual NPT_Result AddDevice(PLT_DeviceDataReference& data);
-    virtual NPT_Result RemoveDevice(PLT_DeviceDataReference& data);
-    
-private:
-    // methods
-    NPT_Result      RenewSubscribers();
-    PLT_ThreadTask* RenewSubscriber(PLT_EventSubscriberReference subscriber);
-    
-    NPT_Result AddPendingEventNotification(PLT_EventNotification *notification);
-    NPT_Result ProcessPendingEventNotifications();
-    NPT_Result ProcessEventNotification(PLT_EventSubscriberReference subscriber,
-                                        PLT_EventNotification*       notification,
-                                        NPT_List<PLT_StateVariable*> &vars);
-    
-    NPT_Result DoHouseKeeping();
-    NPT_Result FetchDeviceSCPDs(PLT_CtrlPointGetSCPDsTask* task,
-                                PLT_DeviceDataReference&   device, 
-                                NPT_Cardinal               level);
-
-    // Device management
-    NPT_Result FindDevice(const char* uuid, PLT_DeviceDataReference& device, bool return_root = false);
-    NPT_Result NotifyDeviceReady(PLT_DeviceDataReference& data);
-    NPT_Result NotifyDeviceRemoved(PLT_DeviceDataReference& data);
-    NPT_Result CleanupDevice(PLT_DeviceDataReference& data);
-    
-    NPT_Result ParseFault(PLT_ActionReference& action, NPT_XmlElementNode* fault);
-    PLT_SsdpSearchTask* CreateSearchTask(const NPT_HttpUrl&   url, 
-                                         const char*          target, 
-                                         NPT_Cardinal         mx, 
-                                         NPT_TimeInterval     frequency,
-                                         const NPT_IpAddress& address);
-    
-private:
-    friend class NPT_Reference<PLT_CtrlPoint>;
-    friend class PLT_UPnP;
-    friend class PLT_UPnP_CtrlPointStartIterator;
-    friend class PLT_UPnP_CtrlPointStopIterator;
-    friend class PLT_EventSubscriberRemoverIterator;
-    friend class PLT_CtrlPointGetDescriptionTask;
-    friend class PLT_CtrlPointGetSCPDsTask;
-    friend class PLT_CtrlPointInvokeActionTask;
-    friend class PLT_CtrlPointHouseKeepingTask;
-    friend class PLT_CtrlPointSubscribeEventTask;
-
-    NPT_List<NPT_String>                         m_UUIDsToIgnore;
-    PLT_CtrlPointListenerList                    m_ListenerList;
-    PLT_HttpServer*                              m_EventHttpServer;
-    PLT_TaskManager                              m_TaskManager;
-    NPT_Mutex                                    m_Lock;
-    NPT_List<PLT_DeviceDataReference>            m_RootDevices;
-    NPT_List<PLT_EventSubscriberReference>       m_Subscribers;
-    NPT_String                                   m_SearchCriteria;
-    bool                                         m_Aborted;
-    NPT_List<PLT_EventNotification *>            m_PendingNotifications;
-    NPT_List<NPT_String>                         m_PendingInspections;
-};
-
-typedef NPT_Reference<PLT_CtrlPoint> PLT_CtrlPointReference;
-
-#endif /* _PLT_CONTROL_POINT_H_ */
diff --git a/extra_lib/include/platinum/PltCtrlPointTask.h b/extra_lib/include/platinum/PltCtrlPointTask.h
deleted file mode 100644
index 48e2044..0000000
--- a/extra_lib/include/platinum/PltCtrlPointTask.h
+++ /dev/null
@@ -1,225 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - Control Point Tasks
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-/** @file
- UPnP ControlPoint Tasks
- */
-
-#ifndef _PLT_CONTROL_POINT_TASK_H_
-#define _PLT_CONTROL_POINT_TASK_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-#include "PltHttpClientTask.h"
-#include "PltDatagramStream.h"
-#include "PltDeviceData.h"
-#include "PltCtrlPoint.h"
-
-/*----------------------------------------------------------------------
-|   forward declarations
-+---------------------------------------------------------------------*/
-class PLT_Action;
-
-/*----------------------------------------------------------------------
-|   PLT_CtrlPointGetDescriptionTask class
-+---------------------------------------------------------------------*/
-/**
- The PLT_CtrlPointGetDescriptionTask class fetches the description xml document
- from a UPnP device
- */
-class PLT_CtrlPointGetDescriptionTask : public PLT_HttpClientSocketTask
-{
-public:
-    PLT_CtrlPointGetDescriptionTask(const NPT_HttpUrl& url,
-                                    PLT_CtrlPoint*     ctrl_point,
-                                    NPT_TimeInterval   leasetime,
-                                    NPT_String         uuid);
-    virtual ~PLT_CtrlPointGetDescriptionTask();
-
-protected:
-    // PLT_HttpClientSocketTask methods
-    NPT_Result ProcessResponse(NPT_Result                    res, 
-                               const NPT_HttpRequest&        request, 
-                               const NPT_HttpRequestContext& context, 
-                               NPT_HttpResponse*             response);
-
-protected:
-    PLT_CtrlPoint*   m_CtrlPoint;
-    NPT_TimeInterval m_LeaseTime;
-    NPT_String       m_UUID;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_CtrlPointGetSCPDRequest class
-+---------------------------------------------------------------------*/
-/**
- The PLT_CtrlPointGetSCPDRequest class is used by a PLT_CtrlPointGetSCPDsTask task
- to fetch a specific SCPD xml document for a given service of a given device.
- */
-class PLT_CtrlPointGetSCPDRequest : public NPT_HttpRequest
-{
-public:
-    PLT_CtrlPointGetSCPDRequest(PLT_DeviceDataReference& device,
-                                const char*              url,
-                                const char*              method = "GET",
-                                const char*              protocol = NPT_HTTP_PROTOCOL_1_1) : // 1.1 for pipelining
-        NPT_HttpRequest(url, method, protocol), m_Device(device) {}
-    virtual ~PLT_CtrlPointGetSCPDRequest() {}
-
-    // members
-    PLT_DeviceDataReference m_Device;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_CtrlPointGetSCPDsTask class
-+---------------------------------------------------------------------*/
-/**
- The PLT_CtrlPointGetSCPDsTask class fetches the SCPD xml document of one or more
- services for a given device. 
- */
-class PLT_CtrlPointGetSCPDsTask : public PLT_HttpClientSocketTask
-{
-public:
-    PLT_CtrlPointGetSCPDsTask(PLT_CtrlPoint* ctrl_point, PLT_DeviceDataReference& root_device);
-    virtual ~PLT_CtrlPointGetSCPDsTask() {}
-
-    NPT_Result AddSCPDRequest(PLT_CtrlPointGetSCPDRequest* request) {
-        return PLT_HttpClientSocketTask::AddRequest((NPT_HttpRequest*)request);
-    }
-
-    // override to prevent calling this directly
-    NPT_Result AddRequest(NPT_HttpRequest*) {
-        // only queuing PLT_CtrlPointGetSCPDRequest allowed
-        return NPT_ERROR_NOT_SUPPORTED;
-    }
-
-protected:
-    // PLT_HttpClientSocketTask methods
-    NPT_Result ProcessResponse(NPT_Result                    res, 
-                               const NPT_HttpRequest&        request, 
-                               const NPT_HttpRequestContext& context, 
-                               NPT_HttpResponse*             response);   
-
-protected:
-    PLT_CtrlPoint*          m_CtrlPoint;
-    PLT_DeviceDataReference m_RootDevice;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_CtrlPointInvokeActionTask class
-+---------------------------------------------------------------------*/
-/**
- The PLT_CtrlPointInvokeActionTask class is used by a PLT_CtrlPoint to invoke
- a specific action of a given service for a given device.
- */
-class PLT_CtrlPointInvokeActionTask : public PLT_HttpClientSocketTask
-{
-public:
-    PLT_CtrlPointInvokeActionTask(NPT_HttpRequest*     request,
-                                  PLT_CtrlPoint*       ctrl_point, 
-                                  PLT_ActionReference& action,
-                                  void*                userdata);
-    virtual ~PLT_CtrlPointInvokeActionTask();
-
-protected:
-    // PLT_HttpClientSocketTask methods
-    NPT_Result ProcessResponse(NPT_Result                    res, 
-                               const NPT_HttpRequest&        request, 
-                               const NPT_HttpRequestContext& context, 
-                               NPT_HttpResponse*             response);   
-
-protected:
-    PLT_CtrlPoint*      m_CtrlPoint;
-    PLT_ActionReference m_Action;
-    void*               m_Userdata;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_CtrlPointHouseKeepingTask class
-+---------------------------------------------------------------------*/
-/**
- The PLT_CtrlPointHouseKeepingTask class is used by a PLT_CtrlPoint to keep 
- track of expired devices and autmatically renew event subscribers. 
- */
-class PLT_CtrlPointHouseKeepingTask : public PLT_ThreadTask
-{
-public:
-    PLT_CtrlPointHouseKeepingTask(PLT_CtrlPoint*   ctrl_point, 
-                                  NPT_TimeInterval timer = NPT_TimeInterval(5.));
-
-protected:
-    ~PLT_CtrlPointHouseKeepingTask() {}
-
-    // PLT_ThreadTask methods
-    virtual void DoRun();
-
-protected:
-    PLT_CtrlPoint*   m_CtrlPoint;
-    NPT_TimeInterval m_Timer;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_CtrlPointSubscribeEventTask class
-+---------------------------------------------------------------------*/
-/**
- The PLT_CtrlPointSubscribeEventTask class is used to subscribe, renew or cancel
- a subscription for a given service of a given device.
- */
-class PLT_CtrlPointSubscribeEventTask : public PLT_HttpClientSocketTask
-{
-public:
-    PLT_CtrlPointSubscribeEventTask(NPT_HttpRequest*         request,
-                                    PLT_CtrlPoint*           ctrl_point, 
-									PLT_DeviceDataReference& device,
-                                    PLT_Service*             service,
-                                    void*                    userdata = NULL);
-    virtual ~PLT_CtrlPointSubscribeEventTask();
-    
-protected:
-    // PLT_HttpClientSocketTask methods
-    NPT_Result ProcessResponse(NPT_Result                    res, 
-                               const NPT_HttpRequest&        request, 
-                               const NPT_HttpRequestContext& context, 
-                               NPT_HttpResponse*             response);
-
-protected:
-    PLT_CtrlPoint*          m_CtrlPoint;
-    PLT_Service*            m_Service;
-	PLT_DeviceDataReference m_Device; // force to keep a reference to device owning m_Service
-    void*                   m_Userdata;
-};
-
-#endif /* _PLT_CONTROL_POINT_TASK_H_ */
diff --git a/extra_lib/include/platinum/PltDatagramStream.h b/extra_lib/include/platinum/PltDatagramStream.h
deleted file mode 100644
index 0e132b9..0000000
--- a/extra_lib/include/platinum/PltDatagramStream.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - Datagram Stream
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-/** @file
- Datagram Input/Output Neptune streams
- */
-
-#ifndef _PLT_DATAGRAM_H_
-#define _PLT_DATAGRAM_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-
-/*----------------------------------------------------------------------
-|   PLT_InputDatagramStream
-+---------------------------------------------------------------------*/
-/**
- The PLT_InputDatagramStream class is a simple buffered input stream 
- used when reading SSDP packets on a UDP socket. It allows to use Neptune
- HTTP parsing as if reading on a TCP socket.
- */
-class PLT_InputDatagramStream : public NPT_InputStream
-{
-public:
-    // methods
-    PLT_InputDatagramStream(NPT_UdpSocket* socket,
-                            NPT_Size       buffer_size = 2000);
-    virtual ~PLT_InputDatagramStream();
-    
-    NPT_Result GetInfo(NPT_SocketInfo& info);
-
-    // NPT_InputStream methods
-    NPT_Result Read(void*     buffer, 
-                    NPT_Size  bytes_to_read, 
-                    NPT_Size* bytes_read = 0);
-
-    NPT_Result Seek(NPT_Position offset) { NPT_COMPILER_UNUSED(offset); return NPT_FAILURE; }
-    NPT_Result Skip(NPT_Size offset) { NPT_COMPILER_UNUSED(offset); return NPT_FAILURE; }
-    NPT_Result Tell(NPT_Position& offset){ NPT_COMPILER_UNUSED(offset); return NPT_FAILURE; }
-    NPT_Result GetSize(NPT_LargeSize& size)   { NPT_COMPILER_UNUSED(size); return NPT_FAILURE; }
-    NPT_Result GetAvailable(NPT_LargeSize& available) { NPT_COMPILER_UNUSED(available); return NPT_FAILURE; }
-        
-protected:
-    NPT_UdpSocket*      m_Socket;
-    NPT_SocketInfo      m_Info;
-    NPT_DataBuffer      m_Buffer;
-    NPT_Position        m_BufferOffset;
-};
-
-typedef NPT_Reference<PLT_InputDatagramStream> PLT_InputDatagramStreamReference;
-
-/*----------------------------------------------------------------------
-|   PLT_OutputDatagramStream
-+---------------------------------------------------------------------*/
-/**
- The PLT_OutputDatagramStream class is a simple buffered output stream 
- used when writing SSDP packets on a UDP socket. It allows to use Neptune
- HTTP client as if writing on a TCP socket.
- */
-class PLT_OutputDatagramStream : public NPT_OutputStream
-{
-public:
-    // methods
-    PLT_OutputDatagramStream(NPT_UdpSocket*           socket, 
-                             NPT_Size                 size = 4096,
-                             const NPT_SocketAddress* address = NULL);
-    virtual ~PLT_OutputDatagramStream();
-
-    // NPT_OutputStream methods
-    NPT_Result Write(const void* buffer, NPT_Size bytes_to_write, NPT_Size* bytes_written = NULL);
-    NPT_Result Flush();
-
-    NPT_Result Seek(NPT_Position offset)  { NPT_COMPILER_UNUSED(offset); return NPT_FAILURE; }
-    NPT_Result Tell(NPT_Position& offset) { NPT_COMPILER_UNUSED(offset); return NPT_FAILURE; }
-
-protected:
-    NPT_UdpSocket*     m_Socket;
-    NPT_DataBuffer     m_Buffer;
-    NPT_SocketAddress* m_Address;
-};
-
-typedef NPT_Reference<PLT_OutputDatagramStream> PLT_OutputDatagramStreamReference;
-
-#endif /* _PLT_DATAGRAM_H_ */
diff --git a/extra_lib/include/platinum/PltDeviceData.h b/extra_lib/include/platinum/PltDeviceData.h
deleted file mode 100644
index 54d5ca8..0000000
--- a/extra_lib/include/platinum/PltDeviceData.h
+++ /dev/null
@@ -1,248 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - Device Data
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-/** @file
- UPnP Device information
- */
-
-#ifndef _PLT_DEVICE_DATA_H_
-#define _PLT_DEVICE_DATA_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-#include "PltConstants.h"
-
-/*----------------------------------------------------------------------
-|   forward declarations
-+---------------------------------------------------------------------*/
-class PLT_Service;
-class PLT_DeviceData;
-
-typedef NPT_Reference<PLT_DeviceData> PLT_DeviceDataReference;
-typedef NPT_List<PLT_DeviceDataReference> PLT_DeviceDataReferenceList;
-
-/*----------------------------------------------------------------------
-|   PLT_DeviceIcon class
-+---------------------------------------------------------------------*/
-/** 
- The PLT_DeviceIcon class represents a given instance of a UPnP device icon.
- */
-class PLT_DeviceIcon
-{
-public:
-    PLT_DeviceIcon(const char* mimetype = "", 
-                   NPT_Int32   width = 0, 
-                   NPT_Int32   height = 0,
-                   NPT_Int32   depth = 0,
-                   const char* urlpath = "") :
-        m_MimeType(mimetype),
-        m_Width(width),
-        m_Height(height),
-        m_Depth(depth),
-        m_UrlPath(urlpath) {}
-    virtual ~PLT_DeviceIcon() {}
-   
-    NPT_String  m_MimeType;
-    NPT_Int32   m_Width;
-    NPT_Int32   m_Height;
-    NPT_Int32   m_Depth;
-    NPT_String  m_UrlPath;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_DeviceData class
-+---------------------------------------------------------------------*/
-/**
- The PLT_DeviceData class holds information about a device being advertised or
- found by a control point. It maintains a list of services and 
- embedded devices if any.
- */
-class PLT_DeviceData
-{
-public:
-    PLT_DeviceData(
-        NPT_HttpUrl      description_url = NPT_HttpUrl(NULL, 0, "/description.xml"), 
-        const char*      uuid = "",
-        NPT_TimeInterval lease_time = *PLT_Constants::GetInstance().GetDefaultDeviceLease(),
-        const char*      device_type = "",
-        const char*      friendly_name = "");
-
-    /* methods */
-    virtual NPT_Result  GetDescription(NPT_String& desc);
-    virtual NPT_String  GetDescriptionUrl(const char* ip_address = NULL);
-    virtual NPT_HttpUrl GetURLBase();
-    virtual NPT_HttpUrl NormalizeURL(const NPT_String& url);
-    virtual NPT_Result  GetDescription(NPT_XmlElementNode* parent, NPT_XmlElementNode** device = NULL);
-    virtual NPT_String  GetIconUrl(const char* mimetype = NULL, NPT_Int32 maxsize = 0, NPT_Int32 maxdepth = 0);
-
-    const NPT_TimeInterval& GetLeaseTime()    const { return m_LeaseTime;        }
-    const NPT_String&   GetUUID()             const { return m_UUID;             }
-    const NPT_String&   GetFriendlyName()     const { return m_FriendlyName;     }
-    const NPT_String&   GetType()             const { return m_DeviceType;       }
-    const NPT_String&   GetModelDescription() const { return m_ModelDescription; }
-    const NPT_String&   GetParentUUID()       const { return m_ParentUUID;       }
-    bool                IsRoot()              { return m_ParentUUID.IsEmpty();   }
-    const NPT_IpAddress& GetLocalIP()          const { return m_LocalIfaceIp;     }
-
-    const NPT_Array<PLT_Service*>&            GetServices()        const { return m_Services; }
-    const NPT_Array<PLT_DeviceDataReference>& GetEmbeddedDevices() const { return m_EmbeddedDevices; }
-
-    NPT_Result FindEmbeddedDevice(const char* uuid, PLT_DeviceDataReference& device);
-    NPT_Result FindEmbeddedDeviceByType(const char* type, PLT_DeviceDataReference& device);
-    NPT_Result FindServiceById(const char* id, PLT_Service*& service);
-    NPT_Result FindServiceByType(const char* type, PLT_Service*& service);
-	NPT_Result FindServiceByName(const char* name, PLT_Service*& service);
-    NPT_Result FindServiceBySCPDURL(const char* url, PLT_Service*& service, bool recursive = false);
-    NPT_Result FindServiceByControlURL(const char* url, PLT_Service*& service, bool recursive = false);
-    NPT_Result FindServiceByEventSubURL(const char* url, PLT_Service*& service, bool recursive = false);
-
-    /* called by PLT_Device subclasses */
-    NPT_Result AddEmbeddedDevice(PLT_DeviceDataReference& device);
-    NPT_Result RemoveEmbeddedDevice(PLT_DeviceDataReference& device);
-    NPT_Result AddService(PLT_Service* service);
-	NPT_Result RemoveService(PLT_Service* service);
-
-    operator const char* ();
-
-protected:
-    virtual ~PLT_DeviceData();
-    virtual void       Cleanup();
-    virtual NPT_Result OnAddExtraInfo(NPT_XmlElementNode* /*device_node*/) { return NPT_SUCCESS; }
-    NPT_Result         SetLeaseTime(NPT_TimeInterval lease_time, NPT_TimeStamp lease_time_last_update = 0.);
-
-private:
-    /* called by PLT_CtrlPoint when an existing device location is updated */
-    NPT_Result    SetDescriptionUrl(NPT_HttpUrl& url);
-
-    NPT_Result    SetURLBase(NPT_HttpUrl& url_base);
-    NPT_TimeStamp GetLeaseTimeLastUpdate();
-    
-    /* class methods */
-    static NPT_Result SetDescription(PLT_DeviceDataReference&      root_device,
-                                     NPT_TimeInterval              leasetime,
-                                     NPT_HttpUrl                   description_url,
-                                     const char*                   description, 
-                                     const NPT_HttpRequestContext& context);
-    static NPT_Result SetDescriptionDevice(PLT_DeviceDataReference&      device,
-                                           NPT_XmlElementNode*           device_node, 
-                                           const NPT_HttpRequestContext& context);
-
-public:
-    NPT_String m_Manufacturer;
-    NPT_String m_ManufacturerURL;
-    NPT_String m_ModelDescription;
-    NPT_String m_ModelName;
-    NPT_String m_ModelNumber;
-    NPT_String m_ModelURL;
-    NPT_String m_SerialNumber;
-    NPT_String m_UPC;
-    NPT_String m_PresentationURL;
-    NPT_String m_DlnaDoc;
-    NPT_String m_DlnaCap;
-    NPT_String m_AggregationFlags;
-
-protected:
-    friend class NPT_Reference<PLT_DeviceData>;
-    friend class PLT_CtrlPoint;
-    friend class PLT_DeviceReadyIterator;
-    friend class PLT_DeviceHost;
-
-    //members
-    NPT_String                         m_ParentUUID;
-    NPT_String                         m_UUID;
-    NPT_HttpUrl                        m_URLDescription;
-    NPT_HttpUrl                        m_URLBase;
-    NPT_String                         m_DeviceType;
-    NPT_String                         m_FriendlyName;
-    NPT_TimeInterval                   m_LeaseTime;
-    NPT_TimeStamp                      m_LeaseTimeLastUpdate;
-    NPT_Array<PLT_Service*>            m_Services;
-    NPT_Array<PLT_DeviceDataReference> m_EmbeddedDevices;
-    NPT_Array<PLT_DeviceIcon>          m_Icons;
-
-    /* IP address of interface used when retrieving device description.
-       We need the info for the control point subscription callback */
-    NPT_IpAddress                      m_LocalIfaceIp; 
-    NPT_String                         m_Representation;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_DeviceDataFinder
-+---------------------------------------------------------------------*/
-/**
- The PLT_DeviceDataFinder class returns a PLT_DeviceData instance given
- a device UUID.
- */
-class PLT_DeviceDataFinder
-{
-public:
-    // methods
-    PLT_DeviceDataFinder(const char* uuid) : m_UUID(uuid) {}
-    virtual ~PLT_DeviceDataFinder() {}
-
-    bool operator()(const PLT_DeviceDataReference& data) const {
-        return data->GetUUID().Compare(m_UUID, true) ? false : true;
-    }
-
-private:
-    // members
-    NPT_String m_UUID;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_DeviceDataFinderByType
-+---------------------------------------------------------------------*/
-/**
- The PLT_DeviceDataFinderByType class returns a PLT_DeviceData instance 
- given a device type.
- */
-class PLT_DeviceDataFinderByType
-{
-public:
-    // methods
-    PLT_DeviceDataFinderByType(const char* type) : m_Type(type) {}
-    virtual ~PLT_DeviceDataFinderByType() {}
-
-    bool operator()(const PLT_DeviceDataReference& data) const {
-        return data->GetType().Compare(m_Type, true) ? false : true;
-    }
-
-private:
-    // members
-    NPT_String m_Type;
-};
-
-#endif /* _PLT_DEVICE_DATA_H_ */
diff --git a/extra_lib/include/platinum/PltDeviceHost.h b/extra_lib/include/platinum/PltDeviceHost.h
deleted file mode 100644
index 22768b6..0000000
--- a/extra_lib/include/platinum/PltDeviceHost.h
+++ /dev/null
@@ -1,341 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - Device Host
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-/** @file
- UPnP Device
- */
-
-#ifndef _PLT_DEVICE_HOST_H_
-#define _PLT_DEVICE_HOST_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-#include "PltDeviceData.h"
-#include "PltSsdp.h"
-#include "PltTaskManager.h"
-#include "PltAction.h"
-#include "PltHttp.h"
-
-/*----------------------------------------------------------------------
-|   forward declarations
-+---------------------------------------------------------------------*/
-class PLT_HttpServer;
-class PLT_HttpServerHandler;
-class PLT_SsdpDeviceAnnounceTask;
-class PLT_SsdpListenTask;
-
-/*----------------------------------------------------------------------
-|   PLT_DeviceHost class
-+---------------------------------------------------------------------*/
-/**
- UPnP Device Host.
- The PLT_DeviceHost class is a base class for implementing a UPnP Device. It handles 
- network announcements and responses to searches from ControlPoints. ControlPoint
- action invocations are also received and delegated to derived classes. A 
- PLT_DeviceHost also takes care of eventing when services state variables change.
- */
-class PLT_DeviceHost : public PLT_DeviceData,
-                       public PLT_SsdpPacketListener,
-                       public NPT_HttpRequestHandler
-{
-public:
-    /**
-     Creates a new instance of UPnP Device Host.
-     @param description_path Relative path for description url
-     @param uuid UPnP device unique id
-     @param device_type UPnP device type
-     @param friendly_name Name advertised for UPnP device
-     @param show_ip Flag to indicate if device IP should be appended to friendly name
-     @param port local port for the device host internal HTTP server, 0 for randomly
-     selected.
-     @param port_rebind Flag to indicate if device host should automatically try to look 
-     for another port if failing to choose the one passed.
-     */
-    PLT_DeviceHost(const char*  description_path = "/",
-                   const char*  uuid = "",
-                   const char*  device_type = "",
-                   const char*  friendly_name = "",
-                   bool         show_ip = false,
-                   NPT_UInt16   port = 0,
-                   bool         port_rebind = false);
-    virtual ~PLT_DeviceHost();
-    
-    virtual void SetBroadcast(bool broadcast) { m_Broadcast = broadcast; }
-     
-    /**
-     When a UPnP device comes up, the specifications require that a SSDP bye-bye
-     sequence is sent to force the removal of the device in case it wasn't sent
-     properly during the last shutdown.
-     @param bye_bye_first Boolean to indicate that SSDP bye-bye sequence should 
-     be sent first or not.
-     */
-    virtual void SetByeByeFirst(bool bye_bye_first) { m_ByeByeFirst = bye_bye_first; }
-    
-    /**
-     Returns the port used by the internal HTTP server for all incoming requests.
-     @return port
-     */
-    virtual NPT_UInt16 GetPort() { return m_Port; };
-    
-    /**
-     Sets the lease time.
-     @param lease_time Lease Time
-     */
-    NPT_Result SetLeaseTime(NPT_TimeInterval lease_time) { return PLT_DeviceData::SetLeaseTime(lease_time); }
-
-protected:
-    /**
-     NPT_HttpRequestHandler method for setting up the response of an incoming
-     HTTP request.
-     @param request the request received
-     @param context the context of the request
-     @param response the response to set up
-     */
-    virtual NPT_Result SetupResponse(NPT_HttpRequest&              request,
-                                     const NPT_HttpRequestContext& context,
-                                     NPT_HttpResponse&             response);
-
-    /**
-     Static method similar to Announce.
-     @param device the device to announce
-     @param request the SSDP pre formatted request
-     @param socket the network socket to use to send the request
-     @param byebye boolean indicating if the announce is a SSDP bye-bye or alive.
-     */
-    static NPT_Result Announce(PLT_DeviceData*  device, 
-                                NPT_HttpRequest& request, 
-                                NPT_UdpSocket&   socket, 
-                                bool             byebye);
-    /**
-     Called during SSDP announce. The HTTP request is already configured with
-     the right method and host.
-     @param request the SSDP pre formatted request
-     @param socket the network socket to use to send the request
-     @param byebye boolean indicating if the announce is a SSDP bye-bye or alive.
-     */
-    NPT_Result Announce(NPT_HttpRequest& request, 
-                        NPT_UdpSocket&   socket, 
-                        bool             byebye) {
-        return Announce(this, request, socket, byebye);
-    }
-
-    /**
-     PLT_SsdpPacketListener method called when a M-SEARCH SSDP packet is received.
-     @param request SSDP packet
-     @param context the context of the request
-     */
-    virtual NPT_Result OnSsdpPacket(const NPT_HttpRequest&        request, 
-                                    const NPT_HttpRequestContext& context);
-
-    /**
-     Static method similar to SendSsdpSearchResponse.
-     @param device the device to announce
-     @param response the SSDP pre formatted response
-     @param socket the network socket to use to send the request
-     @param st the original request search target
-     @param addr the remote address to send the response back to in case the socket
-     is not already connected.
-     */
-    static NPT_Result SendSsdpSearchResponse(PLT_DeviceData*          device, 
-                                             NPT_HttpResponse&        response, 
-                                             NPT_UdpSocket&           socket, 
-                                             const char*              st,
-                                             const NPT_SocketAddress* addr  = NULL);
-    /**
-     Called by PLT_SsdpDeviceSearchResponseTask when responding to a M-SEARCH
-     SSDP request.
-     @param response the SSDP pre formatted response
-     @param socket the network socket to use to send the request
-     @param st the original request search target
-     @param addr the remote address to send the response back to in case the socket
-     is not already connected.
-     */
-    virtual NPT_Result SendSsdpSearchResponse(NPT_HttpResponse&        response, 
-                                              NPT_UdpSocket&           socket, 
-                                              const char*              st,
-                                              const NPT_SocketAddress* addr = NULL) {
-        return SendSsdpSearchResponse(this, response, socket, st, addr);
-    }
-    
-public:
-    /**
-     Add UPnP icon information to serve from file system.
-     @param icon the icon information including url path
-     @param fileroot the file system root path 
-     @param urlroot the url root path of the icon url to match to fileroot
-     Note: As an exemple, if the icon url path is "/images/icon1.jpg", the fileroot
-     is "/Users/joe/www" and the urlroot is "/", when a request is made for
-     "/images/icon1.jpg", the file is expected to be found at 
-     "/Users/joe/www/images/icon1.jpg". If the urlroot were "/images", the file 
-     would be expected to be found at "/Users/joe/www/icon1.jpg".
-     */
-    virtual NPT_Result AddIcon(const PLT_DeviceIcon& icon, 
-                               const char*           fileroot,
-                               const char*           urlroot = "/");
-    
-    /**
-     Add UPnP icon information to serve using static image.
-     @param icon the icon information including url path
-     @param data the image data
-     @param size the image data size
-     @param copy boolean to indicate the data should be copied internally
-     */
-    virtual NPT_Result AddIcon(const PLT_DeviceIcon& icon, 
-                               const void*           data, 
-                               NPT_Size              size, 
-                               bool                  copy = true);
-
-protected:
-    /**
-     Required method for setting up UPnP services of device host 
-     (and any embedded). Called when device starts.
-     */
-    virtual NPT_Result SetupServices() = 0;
-    
-    /**
-     Default implementation for registering device icon resources. Override to 
-     use different ones. Called when device starts.
-     */
-    virtual NPT_Result SetupIcons();
-    
-    /** 
-     Default implementation for setting up device host. This calls SetupServices
-     and SetupIcons when device starts.
-     */
-    virtual NPT_Result SetupDevice();
-    
-    /**
-     Called by PLT_TaskManager when the device is started.
-     @param task the SSDP listening task to attach to for receiving 
-     SSDP M-SEARCH messages.
-     */
-    virtual NPT_Result Start(PLT_SsdpListenTask* task);
-    
-    /**
-     Called by PLT_TaskManager when the device is stoped.
-     @param task the SSDP listening task to detach from to stop receiving 
-     SSDP M-SEARCH messages.
-     */
-    virtual NPT_Result Stop(PLT_SsdpListenTask* task);
-    
-    /**
-     This mehod is called when an action performed by a control point has been 
-     received and needs to be answered.
-     @param action the action information to answer
-     @param context the context information including the HTTP request and
-     local and remote socket information (IP & port).
-     */
-    virtual NPT_Result OnAction(PLT_ActionReference&          action, 
-                                const PLT_HttpRequestContext& context);
-    
-    /**
-     This method is called when a control point is requesting the device
-     description.
-     @param request the HTTP request
-     @param context the context information including local and remote socket information.
-     @param response the response to setup.
-     */
-    virtual NPT_Result ProcessGetDescription(NPT_HttpRequest&              request,
-                                             const NPT_HttpRequestContext& context,
-                                             NPT_HttpResponse&             response);
-    
-    /**
-     This method is called when a control point is requesting a service SCPD.
-     @param service the service
-     @param request the HTTP request
-     @param context the context information including local and remote socket information.
-     @param response the response to setup.
-     */
-    virtual NPT_Result ProcessGetSCPD(PLT_Service*                  service,
-                                      NPT_HttpRequest&              request,
-                                      const NPT_HttpRequestContext& context,
-                                      NPT_HttpResponse&             response);
-    
-    /**
-     This method is called when a "GET" request for a resource other than the device
-     description, SCPD, or icons has been received.
-     @param request the HTTP request
-     @param context the context information including local and remote socket information.
-     @param response the response to setup.
-     */
-    virtual NPT_Result ProcessHttpGetRequest(NPT_HttpRequest&              request,
-                                             const NPT_HttpRequestContext& context,
-                                             NPT_HttpResponse&             response);
-    
-    /**
-     This method is called when a "POST" request has been received. This is usually
-     an UPnP service action invocation. This will deserialize the request and call
-     the OnAction method.
-     @param request the HTTP request
-     @param context the context information including local and remote socket information.
-     @param response the response to setup.
-     */
-    virtual NPT_Result ProcessHttpPostRequest(NPT_HttpRequest&              request,
-                                              const NPT_HttpRequestContext& context,
-                                              NPT_HttpResponse&             response);
-    
-    /**
-     This method is called when a request from a subscriber has been received. This is
-     for any new subscritions, existing subscrition renewal or cancellation.
-     @param request the HTTP request
-     @param context the context information including local and remote socket information.
-     @param response the response to setup.
-     */
-    virtual NPT_Result ProcessHttpSubscriberRequest(NPT_HttpRequest&              request,
-                                                    const NPT_HttpRequestContext& context,
-                                                    NPT_HttpResponse&             response);
-
-protected:
-    friend class PLT_UPnP;
-    friend class PLT_UPnP_DeviceStartIterator;
-    friend class PLT_UPnP_DeviceStopIterator;
-    friend class PLT_Service;
-    friend class NPT_Reference<PLT_DeviceHost>;
-    friend class PLT_SsdpDeviceSearchResponseInterfaceIterator;
-    friend class PLT_SsdpDeviceSearchResponseTask;
-    friend class PLT_SsdpAnnounceInterfaceIterator;
-
-    PLT_TaskManager m_TaskManager;
-    PLT_HttpServer* m_HttpServer;
-    bool            m_Broadcast;
-    NPT_UInt16      m_Port;
-    bool            m_PortRebind;
-    bool            m_ByeByeFirst;
-};
-
-typedef NPT_Reference<PLT_DeviceHost> PLT_DeviceHostReference;
-
-#endif /* _PLT_DEVICE_HOST_H_ */
diff --git a/extra_lib/include/platinum/PltDidl.h b/extra_lib/include/platinum/PltDidl.h
deleted file mode 100644
index f6eaf14..0000000
--- a/extra_lib/include/platinum/PltDidl.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - DIDL handling
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-/** @file
- UPnP AV Didl
- */
-
-#ifndef _PLT_DIDL_H_
-#define _PLT_DIDL_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-#include "PltMediaItem.h"
-
-/*----------------------------------------------------------------------
-|   constants
-+---------------------------------------------------------------------*/
-#define PLT_FILTER_MASK_ALL                         0xFFFFFFFF
-
-#define PLT_FILTER_MASK_CREATOR                     0x00000001
-#define PLT_FILTER_MASK_ARTIST                      0x00000002
-#define PLT_FILTER_MASK_ALBUM                       0x00000004
-#define PLT_FILTER_MASK_GENRE                       0x00000008
-#define PLT_FILTER_MASK_ALBUMARTURI                 0x00000010
-#define PLT_FILTER_MASK_DESCRIPTION                 0x00000020
-#define PLT_FILTER_MASK_SEARCHABLE                  0x00000040
-#define PLT_FILTER_MASK_CHILDCOUNT                  0x00000080
-#define PLT_FILTER_MASK_ORIGINALTRACK               0x00000100
-#define PLT_FILTER_MASK_ACTOR                       0x00000200
-#define PLT_FILTER_MASK_AUTHOR                      0x00000400
-#define PLT_FILTER_MASK_DATE                        0x00000800
-#define PLT_FILTER_MASK_PROGRAMTITLE                0x00001000
-#define PLT_FILTER_MASK_SERIESTITLE                 0x00002000
-#define PLT_FILTER_MASK_EPISODE                     0x00004000
-#define PLT_FILTER_MASK_TITLE                       0x00008000
-
-#define PLT_FILTER_MASK_RES                         0x00010000
-#define PLT_FILTER_MASK_RES_DURATION                0x00020000
-#define PLT_FILTER_MASK_RES_SIZE                    0x00040000
-#define PLT_FILTER_MASK_RES_PROTECTION              0x00080000
-#define PLT_FILTER_MASK_RES_RESOLUTION              0x00100000
-#define PLT_FILTER_MASK_RES_BITRATE                 0x00200000
-#define PLT_FILTER_MASK_RES_BITSPERSAMPLE           0x00400000
-#define PLT_FILTER_MASK_RES_NRAUDIOCHANNELS			0x00800000
-#define PLT_FILTER_MASK_RES_SAMPLEFREQUENCY			0x01000000
-
-#define PLT_FILTER_MASK_LONGDESCRIPTION             0x02000000
-#define PLT_FILTER_MASK_ICON                        0x04000000
-
-#define PLT_FILTER_MASK_TOC							0x02000000
-#define PLT_FILTER_MASK_SEARCHCLASS					0x04000000
-#define PLT_FILTER_MASK_REFID                       0x08000000
-
-#define PLT_FILTER_FIELD_TITLE                      "dc:title"
-#define PLT_FILTER_FIELD_CREATOR                    "dc:creator"
-#define PLT_FILTER_FIELD_DATE                       "dc:date"
-#define PLT_FILTER_FIELD_ARTIST                     "upnp:artist"
-#define PLT_FILTER_FIELD_ACTOR                      "upnp:actor"
-#define PLT_FILTER_FIELD_AUTHOR                     "upnp:author"
-#define PLT_FILTER_FIELD_ALBUM                      "upnp:album"
-#define PLT_FILTER_FIELD_GENRE                      "upnp:genre"
-#define PLT_FILTER_FIELD_ALBUMARTURI                "upnp:albumArtURI"
-#define PLT_FILTER_FIELD_ALBUMARTURI_DLNAPROFILEID  "upnp:albumArtURI at dlna:profileID"
-#define PLT_FILTER_FIELD_DESCRIPTION                "dc:description"
-#define PLT_FILTER_FIELD_LONGDESCRIPTION            "upnp:longDescription"
-#define PLT_FILTER_FIELD_ICON                       "upnp:icon"
-#define PLT_FILTER_FIELD_ORIGINALTRACK              "upnp:originalTrackNumber"
-#define PLT_FILTER_FIELD_PROGRAMTITLE               "upnp:programTitle"
-#define PLT_FILTER_FIELD_SERIESTITLE                "upnp:seriesTitle"
-#define PLT_FILTER_FIELD_EPISODE                    "upnp:episodeNumber"
-#define PLT_FILTER_FIELD_SEARCHCLASS				"upnp:searchClass"
-#define PLT_FILTER_FIELD_SEARCHABLE                 "@searchable"
-#define PLT_FILTER_FIELD_CHILDCOUNT                 "@childcount"
-#define PLT_FILTER_FIELD_CONTAINER_CHILDCOUNT       "container at childCount"
-#define PLT_FILTER_FIELD_CONTAINER_SEARCHABLE       "container at searchable"
-#define PLT_FILTER_FIELD_REFID                      "@refID"
-
-#define PLT_FILTER_FIELD_RES                        "res"
-#define PLT_FILTER_FIELD_RES_DURATION               "res at duration"
-#define PLT_FILTER_FIELD_RES_DURATION_SHORT         "@duration"
-#define PLT_FILTER_FIELD_RES_SIZE                   "res at size"
-#define PLT_FILTER_FIELD_RES_PROTECTION             "res at protection"
-#define PLT_FILTER_FIELD_RES_RESOLUTION             "res at resolution"
-#define PLT_FILTER_FIELD_RES_BITRATE                "res at bitrate"
-#define PLT_FILTER_FIELD_RES_BITSPERSAMPLE          "res at bitsPerSample"
-#define PLT_FILTER_FIELD_RES_NRAUDIOCHANNELS        "res at nrAudioChannels"
-#define PLT_FILTER_FIELD_RES_SAMPLEFREQUENCY        "res at sampleFrequency"
-
-extern const char* didl_header;
-extern const char* didl_footer;
-extern const char* didl_namespace_dc;
-extern const char* didl_namespace_upnp;
-extern const char* didl_namespace_dlna;
-
-/*----------------------------------------------------------------------
-|   PLT_Didl
-+---------------------------------------------------------------------*/
-/**
- DIDL manipulation.
- The PLT_Didl class provides a mechanism to (de)serialize a PLT_MediaObject or
- list of PLT_MediaObject (PLT_MediaObjectList).
- */
-class PLT_Didl
-{
-public:
-    static NPT_Result  ToDidl(PLT_MediaObject&  object, 
-                              const NPT_String& filter, 
-                              NPT_String&       didl);
-    static NPT_Result  FromDidl(const char* didl, 
-                                PLT_MediaObjectListReference& objects);
-    static void        AppendXmlEscape(NPT_String& out, const char* in);
-    static void        AppendXmlUnEscape(NPT_String& out, const char* in);
-    static NPT_Result  ParseTimeStamp(const NPT_String& timestamp, NPT_UInt32& seconds);
-    static NPT_String  FormatTimeStamp(NPT_UInt32 seconds);
-    static NPT_Result  ParseTimeStamp(const NPT_String& in, NPT_TimeStamp& timestamp) {
-        NPT_UInt32 seconds;
-        NPT_Result res = ParseTimeStamp(in, seconds);
-        timestamp = NPT_TimeStamp((double)seconds);
-        return res;
-    }
-
-    static NPT_UInt32  ConvertFilterToMask(const NPT_String& filter);
-};
-
-#endif /* _PLT_DIDL_H_ */
diff --git a/extra_lib/include/platinum/PltDownloader.h b/extra_lib/include/platinum/PltDownloader.h
deleted file mode 100644
index 9581ec2..0000000
--- a/extra_lib/include/platinum/PltDownloader.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - Downloader
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-#ifndef _PLT_DOWNLOADER_H_
-#define _PLT_DOWNLOADER_H_
-
-/*----------------------------------------------------------------------
-|   Includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-#include "PltHttpClientTask.h"
-
-/*----------------------------------------------------------------------
-|   forward declarations
-+---------------------------------------------------------------------*/
-class PLT_Downloader;
-
-/*----------------------------------------------------------------------
-|   types
-+---------------------------------------------------------------------*/
-typedef enum {
-    PLT_DOWNLOADER_IDLE,
-    PLT_DOWNLOADER_STARTED,
-    PLT_DOWNLOADER_DOWNLOADING,
-    PLT_DOWNLOADER_ERROR,
-    PLT_DOWNLOADER_SUCCESS
-} Plt_DowloaderState;
-
-/*----------------------------------------------------------------------
-|   PLT_Downloader class
-+---------------------------------------------------------------------*/
-class PLT_Downloader : public PLT_HttpClientSocketTask
-{
-public:
-    PLT_Downloader(NPT_HttpUrl&               url, 
-                   NPT_OutputStreamReference& output);
-    virtual ~PLT_Downloader();
-    
-    Plt_DowloaderState GetState() { return m_State; }
-
-    // PLT_HttpClientTask method
-    NPT_Result ProcessResponse(NPT_Result                    res, 
-                               const NPT_HttpRequest&        request, 
-                               const NPT_HttpRequestContext& context, 
-                               NPT_HttpResponse*             response);
-
-protected:
-    virtual void DoRun();
-    virtual void DoAbort();
-    
-private:
-    // members
-    NPT_HttpUrl               m_URL;
-    NPT_OutputStreamReference m_Output;
-    Plt_DowloaderState        m_State;
-};
-
-#endif /* _PLT_DOWNLOADER_H_ */
diff --git a/extra_lib/include/platinum/PltEvent.h b/extra_lib/include/platinum/PltEvent.h
deleted file mode 100644
index 03c95ea..0000000
--- a/extra_lib/include/platinum/PltEvent.h
+++ /dev/null
@@ -1,191 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - Event
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-/** @file
- UPnP Eventing
- */
-
-#ifndef _PLT_EVENT_H_
-#define _PLT_EVENT_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-#include "PltHttpClientTask.h"
-
-/*----------------------------------------------------------------------
-|   forward declarations
-+---------------------------------------------------------------------*/
-class PLT_StateVariable;
-class PLT_DeviceData;
-class PLT_Service;
-class PLT_TaskManager;
-class PLT_CtrlPoint;
-
-/*----------------------------------------------------------------------
-|   PLT_EventNotification class
-+---------------------------------------------------------------------*/
-/**
- The PLT_EventNotification class represents an event notification for a given
- service to a given subscriber 
- */
-class PLT_EventNotification
-{
-public:
-    ~PLT_EventNotification() {}
-
-    static PLT_EventNotification* Parse(const NPT_HttpRequest&        request,
-                                        const NPT_HttpRequestContext& context,
-                                        NPT_HttpResponse&             response);
-
-
-    NPT_TimeStamp                 m_ReceptionTime;
-    NPT_HttpUrl                   m_RequestUrl;
-    NPT_String                    m_SID;
-    NPT_Ordinal                   m_EventKey;
-    NPT_String                    m_XmlBody;
-    
-protected:
-    PLT_EventNotification() {}
-};
-
-/*----------------------------------------------------------------------
-|   PLT_EventSubscriber class
-+---------------------------------------------------------------------*/
-/**
- The PLT_EventSubscriber class represents an event subscription for a given service
- from a UPnP ControlPoint.
- */
-class PLT_EventSubscriber
-{
-public:
-    PLT_EventSubscriber(PLT_TaskManager* task_manager, 
-                        PLT_Service*     service,
-                        const char*      sid,
-                        NPT_Timeout      timeout_secs = -1);
-    ~PLT_EventSubscriber();
-
-    PLT_Service*      GetService();
-    NPT_Ordinal       GetEventKey();
-    NPT_Result        SetEventKey(NPT_Ordinal value);
-    NPT_SocketAddress GetLocalIf();
-    NPT_Result        SetLocalIf(NPT_SocketAddress value);
-    NPT_TimeStamp     GetExpirationTime();
-    NPT_Result        SetTimeout(NPT_Timeout seconds = -1);
-    const NPT_String& GetSID() const { return m_SID; }
-    NPT_Result        FindCallbackURL(const char* callback_url);
-    NPT_Result        AddCallbackURL(const char* callback_url);
-    NPT_Result        Notify(NPT_List<PLT_StateVariable*>& vars);
-    
-protected:
-    //members
-    PLT_TaskManager*          m_TaskManager;
-    PLT_Service*              m_Service;
-    NPT_Ordinal               m_EventKey;
-    PLT_HttpClientSocketTask* m_SubscriberTask;
-    NPT_String                m_SID;
-    NPT_SocketAddress         m_LocalIf;
-    NPT_Array<NPT_String>     m_CallbackURLs;
-    NPT_TimeStamp             m_ExpirationTime;
-};
-
-typedef NPT_Reference<PLT_EventSubscriber> PLT_EventSubscriberReference;
-
-/*----------------------------------------------------------------------
-|   PLT_EventSubscriberFinderBySID
-+---------------------------------------------------------------------*/
-/**
- The PLT_EventSubscriberFinderBySID class returns an instance of a PLT_EventSubscriber
- given its subscriber ID.
- */
-class PLT_EventSubscriberFinderBySID
-{
-public:
-    // methods
-    PLT_EventSubscriberFinderBySID(const char* sid) : m_SID(sid) {}
-
-    bool operator()(PLT_EventSubscriberReference const & sub) const {
-        return m_SID.Compare(sub->GetSID(), true) ? false : true;
-    }
-
-private:
-    // members
-    NPT_String m_SID;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_EventSubscriberFinderByCallbackURL
-+---------------------------------------------------------------------*/
-/**
- The PLT_EventSubscriberFinderByCallbackURL class returns an instance of a 
- PLT_EventSubscriber given its subscriber callback url.
- */
-class PLT_EventSubscriberFinderByCallbackURL
-{
-public:
-    // methods
-    PLT_EventSubscriberFinderByCallbackURL(const char* callback_url) : 
-      m_CallbackURL(callback_url) {}
-
-    bool operator()(PLT_EventSubscriberReference const & sub) const {
-        return NPT_SUCCEEDED(sub->FindCallbackURL(m_CallbackURL));
-    }
-
-private:
-    // members
-    NPT_String m_CallbackURL;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_EventSubscriberFinderByService
-+---------------------------------------------------------------------*/
-/**
- The PLT_EventSubscriberFinderByService class returns an instance of a 
- PLT_EventSubscriber given a UPnP service.
- */
-class PLT_EventSubscriberFinderByService
-{
-public:
-    // methods
-    PLT_EventSubscriberFinderByService(PLT_Service* service) : m_Service(service) {}
-    virtual ~PLT_EventSubscriberFinderByService() {}
-    bool operator()(PLT_EventSubscriberReference const & eventSub) const;
-
-private:
-    // members
-    PLT_Service* m_Service;
-};
-
-#endif /* _PLT_EVENT_H_ */
diff --git a/extra_lib/include/platinum/PltFileMediaServer.h b/extra_lib/include/platinum/PltFileMediaServer.h
deleted file mode 100644
index 49ff9d8..0000000
--- a/extra_lib/include/platinum/PltFileMediaServer.h
+++ /dev/null
@@ -1,151 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - File Media Server
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-/** @file
- UPnP AV Filesystem based Media Server sample implementation 
- */
-
-#ifndef _PLT_FILE_MEDIA_SERVER_H_
-#define _PLT_FILE_MEDIA_SERVER_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-#include "PltMediaServer.h"
-#include "PltMediaCache.h"
-
-/*----------------------------------------------------------------------
-|   PLT_FileMediaServerDelegate
-+---------------------------------------------------------------------*/
-/**
- File Media Server Delegate.
- The PLT_FileMediaServerDelegate class is an example of a PLT_MediaServerDelegate
- implementation for a file system backed Media Server.
- */
-class PLT_FileMediaServerDelegate : public PLT_MediaServerDelegate
-{
-public:
-    // class methods
-    static NPT_String BuildSafeResourceUri(const NPT_HttpUrl& base_uri, 
-                                           const char*        host, 
-                                           const char*        file_path);
-    // constructor & destructor
-    PLT_FileMediaServerDelegate(const char* url_root, const char* file_root, bool use_cache = false);
-    virtual ~PLT_FileMediaServerDelegate();
-    
-protected:
-    // PLT_MediaServerDelegate methods
-    virtual NPT_Result OnBrowseMetadata(PLT_ActionReference&          action, 
-                                        const char*                   object_id, 
-                                        const char*                   filter,
-                                        NPT_UInt32                    starting_index,
-                                        NPT_UInt32                    requested_count,
-                                        const char*                   sort_criteria,
-                                        const PLT_HttpRequestContext& context);
-    virtual NPT_Result OnBrowseDirectChildren(PLT_ActionReference&          action, 
-                                              const char*                   object_id, 
-                                              const char*                   filter,
-                                              NPT_UInt32                    starting_index,
-                                              NPT_UInt32                    requested_count,
-                                              const char*                   sort_criteria,
-                                              const PLT_HttpRequestContext& context);
-    virtual NPT_Result OnSearchContainer(PLT_ActionReference&          action, 
-                                         const char*                   object_id, 
-                                         const char*                   search_criteria,
-                                         const char*                   filter,
-                                         NPT_UInt32                    starting_index,
-                                         NPT_UInt32                    requested_count,
-                                         const char*                   sort_criteria, 
-                                         const PLT_HttpRequestContext& context);
-    virtual NPT_Result ProcessFileRequest(NPT_HttpRequest&              request, 
-                                          const NPT_HttpRequestContext& context,
-                                          NPT_HttpResponse&             response);
-    
-    // overridable methods
-    virtual NPT_Result ExtractResourcePath(const NPT_HttpUrl& url, NPT_String& file_path);
-    virtual NPT_String BuildResourceUri(const NPT_HttpUrl& base_uri, const char* host, const char* file_path);
-    virtual NPT_Result ServeFile(const NPT_HttpRequest&        request, 
-                                 const NPT_HttpRequestContext& context,
-                                 NPT_HttpResponse&             response,
-                                 const NPT_String&             file_path);
-    virtual NPT_Result GetFilePath(const char* object_id, NPT_String& filepath);
-    virtual bool       ProcessFile(const NPT_String&, const char* filter = NULL) { NPT_COMPILER_UNUSED(filter); return true;}
-    virtual PLT_MediaObject* BuildFromFilePath(const NPT_String&             filepath, 
-                                               const PLT_HttpRequestContext& context,
-                                               bool                          with_count = true,
-                                               bool                          keep_extension_in_title = false,
-                                               bool                          allip = false);
-    
-protected:
-    friend class PLT_MediaItem;
-    
-    NPT_String  m_UrlRoot;
-    NPT_String  m_FileRoot;
-    bool        m_FilterUnknownOut;
-    bool        m_UseCache;
-    
-    PLT_MediaCache<NPT_Reference<NPT_List<NPT_String> >, NPT_TimeStamp> m_DirCache;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_FileMediaServer
-+---------------------------------------------------------------------*/
-/**
- File Media Server.
- The PLT_FileMediaServer class is an example of a PLT_MediaServer implementation
- for a file system backed Media Server.
- */
-class PLT_FileMediaServer : public PLT_MediaServer,
-                            public PLT_FileMediaServerDelegate
-{
-public:    // constructor
-    PLT_FileMediaServer(const char*  file_root,
-                        const char*  friendly_name,
-                        bool         show_ip = false,
-                        const char*  uuid = NULL,
-                        NPT_UInt16   port = 0,
-                        bool         port_rebind = false) :
-        PLT_MediaServer(friendly_name, 
-                        show_ip,
-                        uuid, 
-                        port,
-                        port_rebind),
-        PLT_FileMediaServerDelegate("/", file_root) {SetDelegate(this);}
-
-protected:
-    virtual ~PLT_FileMediaServer() {}
-};
-
-#endif /* _PLT_FILE_MEDIA_SERVER_H_ */
diff --git a/extra_lib/include/platinum/PltFrameBuffer.h b/extra_lib/include/platinum/PltFrameBuffer.h
deleted file mode 100644
index aa270df..0000000
--- a/extra_lib/include/platinum/PltFrameBuffer.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - Frame Buffer
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-#ifndef _PLT_FRAME_BUFFER_H_
-#define _PLT_FRAME_BUFFER_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-
-/*----------------------------------------------------------------------
-|   PLT_FrameBuffer
-+---------------------------------------------------------------------*/
-class PLT_FrameBuffer 
-{
- public:
-    // constructor & destructor
-    PLT_FrameBuffer(const char* mime_type);
-    virtual ~PLT_FrameBuffer();
-    
-    void Reset();
-    void Abort();
-    void AddReader()    { m_Readers.Increment(); }
-    void RemoveReader() { m_Readers.Decrement(); }
-    int  GetNbReaders() { return m_Readers.GetValue(); }
-    const char* GetMimeType() { return m_MimeType; }
-
-    // data buffer handling methods
-    virtual NPT_Result SetNextFrame(const NPT_Byte* buffer, NPT_Size bufferSize);
-    virtual NPT_Result GetNextFrame(NPT_UInt32&     last_frame_index, 
-                                    NPT_DataBuffer& buffer, 
-                                    NPT_Timeout     timeout = NPT_TIMEOUT_INFINITE);
-
- protected:
-    // members
-    NPT_String         m_MimeType;
-    bool               m_Aborted;
-    NPT_SharedVariable m_FrameIndex;
-    NPT_DataBuffer     m_Frame;
-    NPT_Mutex          m_FrameLock;
-    NPT_AtomicVariable m_Readers;
-};
-
-#endif // _PLT_FRAME_BUFFER_H_
diff --git a/extra_lib/include/platinum/PltFrameServer.h b/extra_lib/include/platinum/PltFrameServer.h
deleted file mode 100644
index 62a730a..0000000
--- a/extra_lib/include/platinum/PltFrameServer.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - Frame Server
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-#ifndef _PLT_FRAME_SERVER_H_
-#define _PLT_FRAME_SERVER_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-#include "PltHttpServer.h"
-#include "PltFrameBuffer.h"
-
-/*----------------------------------------------------------------------
-|   forward declarations
-+---------------------------------------------------------------------*/
-class PLT_SocketPolicyServer;
-
-/*----------------------------------------------------------------------
-|   PLT_StreamValidator class
-+---------------------------------------------------------------------*/
-class PLT_StreamValidator
-{
-public:
-    virtual ~PLT_StreamValidator() {}
-    virtual bool OnNewRequestAccept(const NPT_HttpRequest&          request, 
-                                    const NPT_HttpRequestContext&   context,
-                                    NPT_HttpResponse&               response, 
-                                    NPT_Reference<PLT_FrameBuffer>& buffer) = 0;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_HttpStreamRequestHandler
-+---------------------------------------------------------------------*/
-class PLT_HttpStreamRequestHandler : public NPT_HttpRequestHandler
-{
-public:
-    // constructor
-    PLT_HttpStreamRequestHandler(PLT_StreamValidator& stream_validator) :
-        m_StreamValidator(stream_validator) {}
-
-    // NPT_HttpRequestHandler methods
-    virtual NPT_Result SetupResponse(NPT_HttpRequest&              request, 
-                                     const NPT_HttpRequestContext& context,
-                                     NPT_HttpResponse&             response);
-
-private:
-    PLT_StreamValidator& m_StreamValidator;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_FrameServer class
-+---------------------------------------------------------------------*/
-class PLT_FrameServer : public PLT_HttpServer
-{
-public:
-    PLT_FrameServer(const char*          resource_name,
-                    PLT_StreamValidator& stream_validator,
-                    NPT_IpAddress        address = NPT_IpAddress::Any,
-                    NPT_UInt16           port = 0,
-                    bool                 policy_server_enabled = false);
-    virtual ~PLT_FrameServer();
-    
-    virtual NPT_Result Start();
-
-protected:
-    PLT_SocketPolicyServer* m_PolicyServer;
-    PLT_StreamValidator&    m_StreamValidator;
-    bool                    m_PolicyServerEnabled;
-};
-
-#endif /* _PLT_FRAME_SERVER_H_ */
diff --git a/extra_lib/include/platinum/PltFrameStream.h b/extra_lib/include/platinum/PltFrameStream.h
deleted file mode 100644
index 0eda3c3..0000000
--- a/extra_lib/include/platinum/PltFrameStream.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - Frame Stream
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-#ifndef _PLT_FRAMESTREAM_H_
-#define _PLT_FRAMESTREAM_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-#include "PltFrameBuffer.h"
-
-/*----------------------------------------------------------------------
-|   PLT_InputFrameStream
-+---------------------------------------------------------------------*/
-class PLT_InputFrameStream : public NPT_InputStream
-{
-public:
-    // methods
-    PLT_InputFrameStream(NPT_Reference<PLT_FrameBuffer>& frame_buffer,
-                         const char*                     boundary);
-    virtual ~PLT_InputFrameStream();
-
-    // NPT_InputStream methods
-    NPT_Result Read(void*     buffer, 
-                    NPT_Size  bytes_to_read, 
-                    NPT_Size* bytes_read = 0);
-
-    NPT_Result Seek(NPT_Position offset)      { NPT_COMPILER_UNUSED(offset); return NPT_FAILURE; }
-    NPT_Result Skip(NPT_Size offset)          { NPT_COMPILER_UNUSED(offset); return NPT_FAILURE; }
-    NPT_Result Tell(NPT_Position& offset)     { NPT_COMPILER_UNUSED(offset); return NPT_FAILURE; }
-    NPT_Result GetSize(NPT_LargeSize& size)   { NPT_COMPILER_UNUSED(size);   return NPT_FAILURE; }
-    NPT_Result GetAvailable(NPT_LargeSize& available);
-        
-private:
-    NPT_Result FillBuffer();
-
-protected:
-    NPT_Reference<PLT_FrameBuffer> m_FrameBuffer;
-    NPT_MemoryStream               m_Part;
-    NPT_UInt32                     m_LastFrameIndex;
-    NPT_String                     m_Boundary;
-    bool                           m_Eos;
-};
-
-typedef NPT_Reference<PLT_InputFrameStream> PLT_InputFrameStreamReference;
-
-#endif /* _PLT_FRAMESTREAM_H_ */
diff --git a/extra_lib/include/platinum/PltHttp.h b/extra_lib/include/platinum/PltHttp.h
deleted file mode 100644
index fc3d1b5..0000000
--- a/extra_lib/include/platinum/PltHttp.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - HTTP Helper
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-/** @file
- HTTP utilities
- */
-
-#ifndef _PLT_HTTP_H_
-#define _PLT_HTTP_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-#include "PltVersion.h"
-
-/*----------------------------------------------------------------------
-|   constants
-+---------------------------------------------------------------------*/
-#if !defined(PLT_HTTP_DEFAULT_USER_AGENT)
-#define PLT_HTTP_DEFAULT_USER_AGENT "UPnP/1.0 DLNADOC/1.50 Platinum/" PLT_PLATINUM_SDK_VERSION_STRING
-#endif
-
-#if !defined(PLT_HTTP_DEFAULT_SERVER)
-#define PLT_HTTP_DEFAULT_SERVER "UPnP/1.0 DLNADOC/1.50 Platinum/" PLT_PLATINUM_SDK_VERSION_STRING
-#endif
-
-/*----------------------------------------------------------------------
-|   types
-+---------------------------------------------------------------------*/
-typedef enum {
-	PLT_DEVICE_UNKNOWN,
-	PLT_DEVICE_XBOX,
-	PLT_DEVICE_PS3,
-	PLT_DEVICE_WMP,
-    PLT_DEVICE_SONOS,
-    PLT_DEVICE_MAC,
-    PLT_DEVICE_WINDOWS,
-    PLT_DEVICE_VLC
-} PLT_DeviceSignature;
-
-/*----------------------------------------------------------------------
-|   PLT_HttpHelper
-+---------------------------------------------------------------------*/
-/**
- The PLT_HttpHelper class is a set of utility functions for manipulating 
- HTTP headers, entities and messages.
- */
-class PLT_HttpHelper {
-public:
-    static bool         IsConnectionKeepAlive(NPT_HttpMessage& message);
-    static bool         IsBodyStreamSeekable(NPT_HttpMessage& message);
-
-    static NPT_Result   ToLog(NPT_LoggerReference logger, int level, const char* prefix, NPT_HttpRequest* request);
-    static NPT_Result   ToLog(NPT_LoggerReference logger, int level, const char* prefix, const NPT_HttpRequest& request);
-    static NPT_Result   ToLog(NPT_LoggerReference logger, int level, const char* prefix, NPT_HttpResponse* response);
-    static NPT_Result   ToLog(NPT_LoggerReference logger, int level, const char* prefix, const NPT_HttpResponse& response);
-
-    static NPT_Result   GetContentType(const NPT_HttpMessage& message, NPT_String& type);
-    static NPT_Result   GetContentLength(const NPT_HttpMessage& message, NPT_LargeSize& len);
-
-    static NPT_Result   GetHost(const NPT_HttpRequest& request, NPT_String& value);
-    static void         SetHost(NPT_HttpRequest& request, const char* host);
-	static PLT_DeviceSignature GetDeviceSignature(const NPT_HttpRequest& request);
-
-    static NPT_Result   SetBody(NPT_HttpMessage& message, NPT_String& text, NPT_HttpEntity** entity = NULL);
-    static NPT_Result   SetBody(NPT_HttpMessage& message, const char* text, NPT_HttpEntity** entity = NULL);
-    static NPT_Result   SetBody(NPT_HttpMessage& message, const void* body, NPT_LargeSize len, NPT_HttpEntity** entity = NULL);
-    static NPT_Result   SetBody(NPT_HttpMessage& message, NPT_InputStreamReference stream, NPT_HttpEntity** entity = NULL);
-    static NPT_Result   GetBody(const NPT_HttpMessage& message, NPT_String& body);
-    static NPT_Result   ParseBody(const NPT_HttpMessage& message, NPT_XmlElementNode*& xml);
-
-	static void			SetBasicAuthorization(NPT_HttpRequest& request, const char* username, const char* password);
-};
-
-/*----------------------------------------------------------------------
-|   PLT_HttpRequestContext
-+---------------------------------------------------------------------*/
-/** 
- The PLT_HttpRequestContext class holds information about the request sent, the
- local & remote ip addresses and ports associated with a connection. It is used
- mostly when processing a HTTP response.
- */
-class PLT_HttpRequestContext : public NPT_HttpRequestContext {
-public:
-    // constructors and destructor
-    PLT_HttpRequestContext(const NPT_HttpRequest& request) : 
-        m_Request(request) {}
-    PLT_HttpRequestContext(const NPT_HttpRequest& request, const NPT_HttpRequestContext& context) :
-        NPT_HttpRequestContext(&context.GetLocalAddress(), &context.GetRemoteAddress()),
-        m_Request(request) {}
-    virtual ~PLT_HttpRequestContext() {}
-    
-    const NPT_HttpRequest& GetRequest() const { return m_Request; }
-	PLT_DeviceSignature GetDeviceSignature() { return PLT_HttpHelper::GetDeviceSignature(m_Request); }
-    
-private:
-    const NPT_HttpRequest& m_Request;
-};
-
-/*----------------------------------------------------------------------
-|   macros
-+---------------------------------------------------------------------*/
-#if defined(NPT_CONFIG_ENABLE_LOGGING)
-#define PLT_LOG_HTTP_MESSAGE_L(_logger, _level, _prefix, _msg) \
-    PLT_HttpHelper::ToLog((_logger), (_level), (_prefix), (_msg))
-#define PLT_LOG_HTTP_MESSAGE(_level, _prefix, _msg) \
-	PLT_HttpHelper::ToLog((_NPT_LocalLogger), (_level), (_prefix), (_msg))
-
-#else /* NPT_CONFIG_ENABLE_LOGGING */
-#define PLT_LOG_HTTP_MESSAGE_L(_logger, _level, _prefix, _msg)
-#define PLT_LOG_HTTP_MESSAGE(_level, _prefix, _msg)
-#endif /* NPT_CONFIG_ENABLE_LOGGING */
-
-/*----------------------------------------------------------------------
-|   PLT_HttpRequestHandler
-+---------------------------------------------------------------------*/
-/**
- The PLT_HttpRequestHandler class delegates the handling of the response of a
- received HTTP request by a HTTP Server.
- */
-class PLT_HttpRequestHandler : public NPT_HttpRequestHandler
-{
-public:
-    PLT_HttpRequestHandler(NPT_HttpRequestHandler* delegate) : 
-        m_Delegate(delegate) {}
-    virtual ~PLT_HttpRequestHandler() {}
-
-    // NPT_HttpRequestHandler methods
-    NPT_Result SetupResponse(NPT_HttpRequest&              request, 
-                             const NPT_HttpRequestContext& context,
-                             NPT_HttpResponse&             response) {
-        return m_Delegate->SetupResponse(request, context, response);
-    }
-
-private:
-    NPT_HttpRequestHandler* m_Delegate;
-};
-
-#endif /* _PLT_HTTP_H_ */
diff --git a/extra_lib/include/platinum/PltHttpClientTask.h b/extra_lib/include/platinum/PltHttpClientTask.h
deleted file mode 100644
index 780a702..0000000
--- a/extra_lib/include/platinum/PltHttpClientTask.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - HTTP Client Tasks
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-/** @file
- HTTP Client tasks
- */
-
-#ifndef _PLT_HTTP_CLIENT_TASK_H_
-#define _PLT_HTTP_CLIENT_TASK_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-#include "PltHttp.h"
-#include "PltThreadTask.h"
-
-/*----------------------------------------------------------------------
-|   PLT_HttpClientSocketTask class
-+---------------------------------------------------------------------*/
-/**
- The PLT_HttpClientSocketTask class is the base class used to send a HTTP request
- asynchronously using a task (thread). It supports persistent connections
- and HTTP pipelining with automatic fallback and reconnection when HTTP 1.0 
- is used.
- */
-class PLT_HttpClientSocketTask : public PLT_ThreadTask
-{
-friend class PLT_ThreadTask;
-
-public:
-    PLT_HttpClientSocketTask(NPT_HttpRequest* request = NULL, 
-                             bool             wait_forever = false);
-
-    virtual NPT_Result AddRequest(NPT_HttpRequest* request);
-    virtual NPT_Result SetHttpClientConfig(const NPT_HttpClient::Config& config);
-
-protected:
-    virtual ~PLT_HttpClientSocketTask();
-
-protected:
-    // PLT_ThreadTask methods
-    virtual void DoAbort();
-    virtual void DoRun();
-
-    virtual NPT_Result ProcessResponse(NPT_Result                    res, 
-                                       const NPT_HttpRequest&        request, 
-                                       const NPT_HttpRequestContext& context,
-                                       NPT_HttpResponse*             response);
-
-private:
-    NPT_Result GetNextRequest(NPT_HttpRequest*& request, NPT_Timeout timeout_ms);
-
-protected:
-    NPT_HttpClient              m_Client;
-    bool                        m_WaitForever;
-    NPT_Queue<NPT_HttpRequest>  m_Requests;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_HttpClientTask class
-+---------------------------------------------------------------------*/
-/**
- The PLT_HttpClientTask class is a templatized version of PLT_HttpClientSocketTask
- to support arbitrary delegation of HTTP response handling.
- */
-template <class T>
-class PLT_HttpClientTask : public PLT_HttpClientSocketTask
-{
-public:
-    PLT_HttpClientTask<T>(const NPT_HttpUrl& url, T* data) : 
-        PLT_HttpClientSocketTask(new NPT_HttpRequest(url, 
-                                                     "GET", 
-                                                     NPT_HTTP_PROTOCOL_1_1)), 
-                                 m_Data(data) {}
- protected:
-    virtual ~PLT_HttpClientTask<T>() {}
-
-protected:
-    // PLT_HttpClientSocketTask method
-    NPT_Result ProcessResponse(NPT_Result                    res, 
-                               const NPT_HttpRequest&        request, 
-                               const NPT_HttpRequestContext& context, 
-                               NPT_HttpResponse*             response) {
-        return m_Data->ProcessResponse(res, request, context, response);
-    }
-
-protected:
-    T* m_Data;
-};
-
-#endif /* _PLT_HTTP_CLIENT_TASK_H_ */
diff --git a/extra_lib/include/platinum/PltHttpServer.h b/extra_lib/include/platinum/PltHttpServer.h
deleted file mode 100644
index 51edee2..0000000
--- a/extra_lib/include/platinum/PltHttpServer.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - HTTP Server
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-/** @file
- HTTP Server
- */
-
-#ifndef _PLT_HTTP_SERVER_H_
-#define _PLT_HTTP_SERVER_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-#include "PltHttpServerTask.h"
-
-/*----------------------------------------------------------------------
-|   PLT_HttpServer class
-+---------------------------------------------------------------------*/
-/**
- The PLT_HttpServer class provides an asynchronous way to handle multiple HTTP requests
- concurrently. Pipelining requests and keep-alive connections are supported.
- */
-class PLT_HttpServer : public NPT_HttpRequestHandler,
-                       public NPT_HttpServer
-{
-public:
-    PLT_HttpServer(NPT_IpAddress address = NPT_IpAddress::Any,
-                   NPT_IpPort    port = 0,
-                   bool          allow_random_port_on_bind_failure = false,
-                   NPT_Cardinal  max_clients = 50,
-                   bool          reuse_address = false);
-    virtual ~PLT_HttpServer();
-    
-    // class methods
-    static NPT_Result ServeFile(const NPT_HttpRequest&        request, 
-                                const NPT_HttpRequestContext& context,
-                                NPT_HttpResponse&             response, 
-                                NPT_String                    file_path);
-    static NPT_Result ServeStream(const NPT_HttpRequest&        request, 
-                                  const NPT_HttpRequestContext& context,
-                                  NPT_HttpResponse&             response,
-                                  NPT_InputStreamReference&     stream, 
-                                  const char*                   content_type);
-
-    // NPT_HttpRequestHandler methods
-    virtual NPT_Result SetupResponse(NPT_HttpRequest&              request,
-                                     const NPT_HttpRequestContext& context,
-                                     NPT_HttpResponse&             response);
-
-    // methods
-    virtual NPT_Result   Start();
-    virtual NPT_Result   Stop();
-    virtual unsigned int GetPort() { return m_Port; }
-
-private:
-    PLT_TaskManager*    m_TaskManager;
-    NPT_IpAddress       m_Address;
-    NPT_IpPort          m_Port;
-    bool                m_AllowRandomPortOnBindFailure;
-    bool                m_ReuseAddress;
-    bool                m_Aborted;
-};
-
-#endif /* _PLT_HTTP_SERVER_H_ */
diff --git a/extra_lib/include/platinum/PltHttpServerListener.h b/extra_lib/include/platinum/PltHttpServerListener.h
deleted file mode 100644
index 264b76f..0000000
--- a/extra_lib/include/platinum/PltHttpServerListener.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - HTTP Server Listener
-|
-| Copyright (c) 2004-2008, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| 
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-#ifndef _PLT_HTTP_SERVER_LISTENER_H_
-#define _PLT_HTTP_SERVER_LISTENER_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-
-/*----------------------------------------------------------------------
-|   PLT_HttpServerListener Interface
-+---------------------------------------------------------------------*/
-class PLT_HttpServerListener
-{
- public:
-    virtual ~PLT_HttpServerListener() {}
-    
-    virtual NPT_Result ProcessHttpRequest(NPT_HttpRequest&              request, 
-                                          const NPT_HttpRequestContext& context,
-                                          NPT_HttpResponse*&            response,
-                                          bool&                         headers_only) = 0;
-};
-
-#endif /* _PLT_HTTP_SERVER_LISTENER_H_ */
diff --git a/extra_lib/include/platinum/PltHttpServerTask.h b/extra_lib/include/platinum/PltHttpServerTask.h
deleted file mode 100644
index 58b2a3f..0000000
--- a/extra_lib/include/platinum/PltHttpServerTask.h
+++ /dev/null
@@ -1,163 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - HTTP Server Tasks
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-/** @file
- HTTP Server Tasks
- */
-
-#ifndef _PLT_HTTP_SERVER_TASK_H_
-#define _PLT_HTTP_SERVER_TASK_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-#include "PltHttp.h"
-#include "PltDatagramStream.h"
-#include "PltThreadTask.h"
-
-/*----------------------------------------------------------------------
-|   PLT_HttpServerSocketTask class
-+---------------------------------------------------------------------*/
-/** 
- The PLT_HttpServerSocketTask class is a task used for handling one or more HTTP 
- requests from a client. It is created by a PLT_HttpListenTask instance upon
- receiving a connection request. A PLT_HttpServer will handle the delegation for
- setting up the HTTP response.
- */
-class PLT_HttpServerSocketTask : public PLT_ThreadTask
-{
-    friend class PLT_ThreadTask;
-
-public:
-    PLT_HttpServerSocketTask(NPT_Socket* socket, bool stay_alive_forever = false);
-
-protected:
-    virtual ~PLT_HttpServerSocketTask();
-
-protected:
-    // Request callback handler
-    virtual NPT_Result SetupResponse(NPT_HttpRequest&              request, 
-                                     const NPT_HttpRequestContext& context,
-                                     NPT_HttpResponse&             response) = 0;
-
-    // overridables
-    virtual NPT_Result GetInputStream(NPT_InputStreamReference& stream);
-    virtual NPT_Result GetInfo(NPT_SocketInfo& info);
-
-    // PLT_ThreadTask methods
-    virtual void DoAbort() { if (m_Socket) m_Socket->Cancel(); }
-    virtual void DoRun();
-
-private:
-    virtual NPT_Result Read(NPT_BufferedInputStreamReference& buffered_input_stream, 
-                            NPT_HttpRequest*&                 request,
-                            NPT_HttpRequestContext*           context = NULL);
-    virtual NPT_Result Write(NPT_HttpResponse* response, 
-                             bool&             keep_alive, 
-                             bool              headers_only = false);
-    virtual NPT_Result RespondToClient(NPT_HttpRequest&              request, 
-                                       const NPT_HttpRequestContext& context,
-                                       NPT_HttpResponse*&            response);
-    virtual NPT_Result SendResponseHeaders(NPT_HttpResponse* response,
-                                           NPT_OutputStream& output_stream,
-                                           bool&             keep_alive);
-    virtual NPT_Result SendResponseBody(NPT_HttpResponse* response,
-                                        NPT_OutputStream& output_stream);
-
-protected:
-    NPT_Socket*         m_Socket;
-    bool                m_StayAliveForever;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_HttpServerTask class
-+---------------------------------------------------------------------*/
-/**
- The PLT_HttpServerTask class is a version of PLT_HttpServerSocketTask that supports 
- delegation of HTTP request handling.
- */
-class PLT_HttpServerTask : public PLT_HttpServerSocketTask
-{
-public:
-    PLT_HttpServerTask(NPT_HttpRequestHandler* handler, 
-                       NPT_Socket*             socket, 
-                       bool                    keep_alive = false) : 
-        PLT_HttpServerSocketTask(socket, keep_alive), m_Handler(handler) {}
-
-protected:
-    virtual ~PLT_HttpServerTask() {}
-
-    NPT_Result SetupResponse(NPT_HttpRequest&              request, 
-                             const NPT_HttpRequestContext& context,
-                             NPT_HttpResponse&             response) {
-        return m_Handler->SetupResponse(request, context, response);
-    }
-
-protected:
-    NPT_HttpRequestHandler* m_Handler;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_HttpListenTask class
-+---------------------------------------------------------------------*/
-/**
- The PLT_HttpListenTask class is used by a PLT_HttpServer to listen for incoming
- connections and spawn a new task for handling each request.
- */
-class PLT_HttpListenTask : public PLT_ThreadTask
-{
-public:
-    PLT_HttpListenTask(NPT_HttpRequestHandler* handler, 
-                       NPT_TcpServerSocket*    socket, 
-                       bool                    owns_socket = true) : 
-        m_Handler(handler), m_Socket(socket), m_OwnsSocket(owns_socket) {}
-
-protected:
-    virtual ~PLT_HttpListenTask() { 
-        if (m_OwnsSocket && m_Socket) delete m_Socket;
-    }
-
-protected:
-    // PLT_ThreadTask methods
-    virtual void DoAbort() { if (m_Socket) m_Socket->Cancel(); }
-    virtual void DoRun();
-
-protected:
-    NPT_HttpRequestHandler* m_Handler;
-    NPT_TcpServerSocket*    m_Socket;
-    bool                    m_OwnsSocket;
-};
-
-#endif /* _PLT_HTTP_SERVER_TASK_H_ */
diff --git a/extra_lib/include/platinum/PltLeaks.h b/extra_lib/include/platinum/PltLeaks.h
deleted file mode 100644
index 73d1e3a..0000000
--- a/extra_lib/include/platinum/PltLeaks.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - Leaks
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-#ifndef _PLT_LEAKS_H_
-#define _PLT_LEAKS_H_ 
-
-/*----------------------------------------------------------------------
-|   functions
-+---------------------------------------------------------------------*/
-#if defined(__cplusplus)
-extern "C" {
-#endif 
-
-void PLT_Leak_Enable(void);
-
-#if defined(__cplusplus)
-}
-#endif 
-
-#endif /* _PLT_LEAKS_H_ */
diff --git a/extra_lib/include/platinum/PltMediaBrowser.h b/extra_lib/include/platinum/PltMediaBrowser.h
deleted file mode 100644
index 2ee032b..0000000
--- a/extra_lib/include/platinum/PltMediaBrowser.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - AV Media Browser (Media Server Control Point)
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-/** @file
- UPnP AV Media Controller implementation.
- */
-
-#ifndef _PLT_MEDIA_BROWSER_H_
-#define _PLT_MEDIA_BROWSER_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "PltCtrlPoint.h"
-#include "PltMediaItem.h"
-
-/*----------------------------------------------------------------------
-|   PLT_BrowseInfo
-+---------------------------------------------------------------------*/
-/**
- The PLT_BrowseInfo struct is used to marshall Browse or Search action 
- response results across different threads of execution.
- */
-typedef struct {
-    NPT_String                   object_id;
-    PLT_MediaObjectListReference items;
-    NPT_UInt32                   si;
-    NPT_UInt32                   nr;
-    NPT_UInt32                   tm;
-    NPT_UInt32                   uid;
-} PLT_BrowseInfo;
-
-/*----------------------------------------------------------------------
-|   PLT_MediaBrowserDelegate
-+---------------------------------------------------------------------*/
-/**
- The PLT_MediaBrowserDelegate class is an interface for receiving PLT_MediaBrowser
- events or action responses.
- */
-class PLT_MediaBrowserDelegate
-{
-public:
-    virtual ~PLT_MediaBrowserDelegate() {}
-    
-    virtual bool OnMSAdded(PLT_DeviceDataReference& /* device */) { return true; }
-    virtual void OnMSRemoved(PLT_DeviceDataReference& /* device */) {}
-    virtual void OnMSStateVariablesChanged(
-        PLT_Service*                  /*service*/, 
-        NPT_List<PLT_StateVariable*>* /*vars*/) {}
-
-    // ContentDirectory
-    virtual void OnBrowseResult(
-        NPT_Result               /*res*/, 
-        PLT_DeviceDataReference& /*device*/, 
-        PLT_BrowseInfo*          /*info*/, 
-        void*                    /*userdata*/) {}
-
-	virtual void OnSearchResult(
-        NPT_Result               /*res*/, 
-        PLT_DeviceDataReference& /*device*/, 
-        PLT_BrowseInfo*          /*info*/, 
-        void*                    /*userdata*/) {}
-};
-
-/*----------------------------------------------------------------------
-|   PLT_MediaBrowser
-+---------------------------------------------------------------------*/
-/**
- The PLT_MediaBrowser class implements a UPnP AV Media Server control point.
- */
-class PLT_MediaBrowser : public PLT_CtrlPointListener
-{
-public:
-    PLT_MediaBrowser(PLT_CtrlPointReference&   ctrl_point,
-                     PLT_MediaBrowserDelegate* delegate = NULL);
-    virtual ~PLT_MediaBrowser();
-
-    // ContentDirectory service
-    virtual NPT_Result Browse(PLT_DeviceDataReference& device, 
-                              const char*              object_id, 
-                              NPT_UInt32               start_index,
-                              NPT_UInt32               count = 30, // DLNA recommendations
-                              bool                     browse_metadata = false,
-                              const char*              filter = "dc:date,upnp:genre,res,res at duration,res at size,upnp:albumArtURI,upnp:originalTrackNumber,upnp:album,upnp:artist,upnp:author", // explicitely specify res otherwise WMP won't return a URL!
-                              const char*              sort_criteria = "",
-                              void*                    userdata = NULL);
-
-	virtual NPT_Result Search(PLT_DeviceDataReference& device, 
-		                      const char*              container_id,
-							  const char*              search_criteria,
-				              NPT_UInt32               start_index,
-					          NPT_UInt32               count = 30, // DLNA recommendations
-                              const char*              filter = "dc:date,upnp:genre,res,res at duration,res at size,upnp:albumArtURI,upnp:originalTrackNumber,upnp:album,upnp:artist,upnp:author", // explicitely specify res otherwise WMP won't return a URL!
-						  	  void*                    userdata = NULL);
-
-    // methods
-    virtual const NPT_Lock<PLT_DeviceDataReferenceList>& GetMediaServers() { return m_MediaServers; }
-    virtual NPT_Result FindServer(const char* uuid, PLT_DeviceDataReference& device);    
-    virtual void SetDelegate(PLT_MediaBrowserDelegate* delegate) { m_Delegate = delegate; }
-
-protected:
-    // PLT_CtrlPointListener methods
-    virtual NPT_Result OnDeviceAdded(PLT_DeviceDataReference& device);
-    virtual NPT_Result OnDeviceRemoved(PLT_DeviceDataReference& device);
-    virtual NPT_Result OnActionResponse(NPT_Result res, PLT_ActionReference& action, void* userdata);
-    virtual NPT_Result OnEventNotify(PLT_Service* service, NPT_List<PLT_StateVariable*>* vars);
-    
-    // ContentDirectory service responses
-    virtual NPT_Result OnBrowseResponse(NPT_Result               res, 
-                                        PLT_DeviceDataReference& device, 
-                                        PLT_ActionReference&     action, 
-                                        void*                    userdata);
-
-	virtual NPT_Result OnSearchResponse(NPT_Result               res, 
-                                        PLT_DeviceDataReference& device, 
-                                        PLT_ActionReference&     action, 
-                                        void*                    userdata);
-    
-protected:
-    PLT_CtrlPointReference                m_CtrlPoint;
-    PLT_MediaBrowserDelegate*             m_Delegate;
-    NPT_Lock<PLT_DeviceDataReferenceList> m_MediaServers;
-};
-
-#endif /* _PLT_MEDIA_BROWSER_H_ */
diff --git a/extra_lib/include/platinum/PltMediaBrowserListener.h b/extra_lib/include/platinum/PltMediaBrowserListener.h
deleted file mode 100644
index f0d6479..0000000
--- a/extra_lib/include/platinum/PltMediaBrowserListener.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - AV Media Browser Listener
-|
-| Copyright (c) 2004-2008, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| 
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-#ifndef _PLT_MEDIA_BROWSER_LISTENER_H_
-#define _PLT_MEDIA_BROWSER_LISTENER_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "PltMediaItem.h"
-#include "PltDeviceData.h"
-
-/*----------------------------------------------------------------------
-|   PLT_BrowseInfo
-+---------------------------------------------------------------------*/
-class PLT_BrowseInfo {
-public:
-    PLT_BrowseInfo() : nr(0), tm(0), uid(0) {}
-
-    NPT_String                   object_id;
-    PLT_MediaObjectListReference items;
-    NPT_UInt32                   nr;
-    NPT_UInt32                   tm;
-    NPT_UInt32                   uid;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_MediaBrowserListener class
-+---------------------------------------------------------------------*/
-class PLT_MediaBrowserListener
-{
-public:
-    virtual ~PLT_MediaBrowserListener() {}
-
-    virtual void OnMSAddedRemoved(
-        PLT_DeviceDataReference& /*device*/, 
-        int                      /*added*/) {}
-
-    virtual void OnMSStateVariablesChanged(
-        PLT_Service*                  /*service*/, 
-        NPT_List<PLT_StateVariable*>* /*vars*/) {}
-
-    virtual void OnMSBrowseResult(
-        NPT_Result               /*res*/, 
-        PLT_DeviceDataReference& /*device*/, 
-        PLT_BrowseInfo*          /*info*/, 
-        void*                    /*userdata*/) {}
-};
-
-#endif /* _PLT_MEDIA_BROWSER_LISTENER_H_ */
diff --git a/extra_lib/include/platinum/PltMediaCache.h b/extra_lib/include/platinum/PltMediaCache.h
deleted file mode 100644
index 8e365d8..0000000
--- a/extra_lib/include/platinum/PltMediaCache.h
+++ /dev/null
@@ -1,203 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - AV Media Cache
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-/** @file
- Simple Object Caching utility.
- */
-
-#ifndef _PLT_MEDIA_CACHE_H_
-#define _PLT_MEDIA_CACHE_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-
-/*----------------------------------------------------------------------
-|   PLT_MediaCache
-+---------------------------------------------------------------------*/
-/**
- The PLT_MediaCache template provides a way to hold references to object in 
- memory. 
- */ 
-template <typename T, typename U>
-class PLT_MediaCache
-{
-public:
-    typedef typename NPT_Map<NPT_String,T>::Entry ElementEntry;
-    typedef typename NPT_List<ElementEntry*>::Iterator ElementIterator;
-
-    PLT_MediaCache<T,U>() {}
-    virtual ~PLT_MediaCache<T,U>() {}
-
-    NPT_Result Put(const char* root, const char* key, T& value, U* tag = NULL);
-    NPT_Result Get(const char* root, const char* key, T& value, U* tag = NULL);
-    NPT_Result Clear(const char* root, const char* key);
-    NPT_Result Clear(const char* root = NULL);
-
-private:
-    // methods
-    NPT_String GenerateKey(const char* root, const char* key);
-
-private:
-    // members
-    NPT_Mutex              m_Mutex;
-    NPT_Map<NPT_String, T> m_Items;
-    NPT_Map<NPT_String, U> m_Tags;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_MediaCache::GenerateKey
-+---------------------------------------------------------------------*/
-template <typename T, typename U>
-inline
-NPT_String
-PLT_MediaCache<T,U>::GenerateKey(const char* root, const char* key)
-{
-    // TODO: There could be collision
-    NPT_String result = root;
-    result += "/";
-    result += key;
-    return result;
-}
-
-/*----------------------------------------------------------------------
-|   PLT_MediaCache::Put
-+---------------------------------------------------------------------*/
-template <typename T, typename U>
-inline
-NPT_Result
-PLT_MediaCache<T,U>::Put(const char* root,
-                         const char* key, 
-                         T&          value,
-                         U*          tag)
-{
-    NPT_AutoLock lock(m_Mutex);
-
-    NPT_String fullkey = GenerateKey(root, key);
-    if (fullkey.GetLength() == 0) return NPT_ERROR_INVALID_PARAMETERS;
-
-    m_Items.Erase(fullkey);
-    NPT_CHECK(m_Items.Put(fullkey, value));
-    
-    if (tag) NPT_CHECK(m_Tags.Put(fullkey, *tag));
-    
-    return NPT_SUCCESS;
-}
-
-/*----------------------------------------------------------------------
-|   PLT_MediaCache::Get
-+---------------------------------------------------------------------*/
-template <typename T, typename U>
-inline
-NPT_Result
-PLT_MediaCache<T,U>::Get(const char* root,
-                         const char* key,
-                         T&          value,
-                         U*          tag /* = NULL */)
-{
-    NPT_AutoLock lock(m_Mutex);
-
-    NPT_String fullkey = GenerateKey(root, key);
-    if (fullkey.GetLength() == 0) return NPT_ERROR_INVALID_PARAMETERS;
-    
-    T* _value = NULL;
-    NPT_CHECK(m_Items.Get(fullkey, _value));
-    
-    U* _tag;
-    if (tag) {
-        m_Tags.Get(fullkey, _tag);
-        if (_tag) *tag = *_tag;
-    }
-
-    value = *_value;
-    return NPT_SUCCESS;
-}
-
-/*----------------------------------------------------------------------
-|   PLT_MediaCache::Clear
-+---------------------------------------------------------------------*/
-template <typename T, typename U>
-inline
-NPT_Result 
-PLT_MediaCache<T,U>::Clear(const char* root, const char* key) 
-{
-    NPT_AutoLock lock(m_Mutex);
-
-    NPT_String fullkey = GenerateKey(root, key);
-    if (fullkey.GetLength() == 0) return NPT_ERROR_INVALID_PARAMETERS;
-
-    ElementIterator entries = m_Items.GetEntries().GetFirstItem();
-    ElementIterator entry;
-    while (entries) {
-        entry = entries++;
-        if ((*entry)->GetKey() == (fullkey)) {
-            m_Items.Erase(fullkey);
-            m_Tags.Erase(fullkey);
-            return NPT_SUCCESS;
-        }
-    }
-
-    return NPT_ERROR_NO_SUCH_ITEM;
-}
-
-/*----------------------------------------------------------------------
-|   PLT_MediaCache::Clear
-+---------------------------------------------------------------------*/
-template <typename T, typename U>
-inline
-NPT_Result
-PLT_MediaCache<T,U>::Clear(const char* root)
-{
-    NPT_AutoLock lock(m_Mutex);
-
-    if (!root || root[0]=='\0') 
-        return m_Items.Clear();
-
-    NPT_String key = GenerateKey(root, "");
-    ElementIterator entries = m_Items.GetEntries().GetFirstItem();
-    ElementIterator entry;
-    while (entries) {
-        entry = entries++;
-        NPT_String entry_key = (*entry)->GetKey();
-        if (entry_key.StartsWith(key)) {
-            m_Items.Erase(entry_key);
-            m_Tags.Erase(entry_key);
-        }
-    }
-
-    return NPT_SUCCESS;
-}
-
-#endif /* _PLT_MEDIA_CACHE_H_ */
diff --git a/extra_lib/include/platinum/PltMediaConnect.h b/extra_lib/include/platinum/PltMediaConnect.h
deleted file mode 100644
index c9ada41..0000000
--- a/extra_lib/include/platinum/PltMediaConnect.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/*****************************************************************
-|
-|      Platinum - AV Media Connect Device
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-#ifndef _PLT_MEDIA_CONNECT_H_
-#define _PLT_MEDIA_CONNECT_H_
-
-/*----------------------------------------------------------------------
-|       includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-#include "PltFileMediaServer.h"
-
-/*----------------------------------------------------------------------
-|   PLT_MediaConnect
-+---------------------------------------------------------------------*/
-class PLT_MediaConnect : public PLT_MediaServer
-{
-public:
-    // class methods
-    static NPT_Result GetMappedObjectId(const char* object_id, 
-                                        NPT_String& mapped_object_id);
-    
-    // constructor
-    PLT_MediaConnect(const char*  friendly_name,
-                     bool         add_hostname = true,
-                     const char*  udn = NULL,
-                     NPT_UInt16   port = 0,
-                     bool         port_rebind = false);
-
-protected:
-    virtual ~PLT_MediaConnect();
-    
-    // PLT_DeviceHost methods
-    virtual NPT_Result SetupServices();
-    virtual NPT_Result OnAction(PLT_ActionReference&          action, 
-                                const PLT_HttpRequestContext& context);
-    virtual NPT_Result ProcessGetDescription(NPT_HttpRequest&              request,
-                                             const NPT_HttpRequestContext& context,
-                                             NPT_HttpResponse&             response);
-    virtual NPT_Result ProcessGetSCPD(PLT_Service*                  service,
-                                      NPT_HttpRequest&              request,
-                                      const NPT_HttpRequestContext& context,
-                                      NPT_HttpResponse&             response);
-
-    // X_MS_MediaReceiverRegistrar
-    virtual NPT_Result OnIsAuthorized(PLT_ActionReference&  action);
-    virtual NPT_Result OnRegisterDevice(PLT_ActionReference&  action);
-    virtual NPT_Result OnIsValidated(PLT_ActionReference&  action);
-
-protected:
-	NPT_Mutex   m_Lock;
-    bool        m_AddHostname;
-};
-
-/*----------------------------------------------------------------------
- |   PLT_FileMediaConnectDelegate class
- +---------------------------------------------------------------------*/
-class PLT_FileMediaConnectDelegate : public PLT_FileMediaServerDelegate
-{
-public:
-    // constructor & destructor
-    PLT_FileMediaConnectDelegate(const char* url_root, const char* file_root) :
-        PLT_FileMediaServerDelegate(url_root, file_root) {}
-    virtual ~PLT_FileMediaConnectDelegate() {}
-    
-    // PLT_FileMediaServerDelegate methods
-    virtual NPT_Result GetFilePath(const char* object_id, NPT_String& filepath);
-    virtual NPT_Result OnSearchContainer(PLT_ActionReference&          action, 
-                                         const char*                   object_id, 
-                                         const char*                   search_criteria,
-                                         const char*                   filter,
-                                         NPT_UInt32                    starting_index,
-                                         NPT_UInt32                    requested_count,
-                                         const char*                   sort_criteria, 
-                                         const PLT_HttpRequestContext& context);
-};
-
-#endif /* _PLT_MEDIA_CONNECT_H_ */
diff --git a/extra_lib/include/platinum/PltMediaController.h b/extra_lib/include/platinum/PltMediaController.h
deleted file mode 100644
index 672c12a..0000000
--- a/extra_lib/include/platinum/PltMediaController.h
+++ /dev/null
@@ -1,344 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - AV Media Controller (Media Renderer Control Point)
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-| 
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-#ifndef _PLT_MEDIA_CONTROLLER_H_
-#define _PLT_MEDIA_CONTROLLER_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "PltCtrlPoint.h"
-#include "PltMediaItem.h"
-
-/*----------------------------------------------------------------------
-|   Defines
-+---------------------------------------------------------------------*/
-typedef NPT_List<NPT_String> PLT_StringList;
-
-typedef struct {
-    PLT_StringList play_media;
-    PLT_StringList rec_media;
-    PLT_StringList rec_quality_modes;
-} PLT_DeviceCapabilities;
-
-typedef struct {
-    NPT_UInt32    num_tracks;
-    NPT_TimeStamp media_duration;
-    NPT_String    cur_uri;
-    NPT_String    cur_metadata;
-    NPT_String    next_uri;
-    NPT_String    next_metadata;
-    NPT_String    play_medium;
-    NPT_String    rec_medium;
-    NPT_String    write_status;
-} PLT_MediaInfo;
-
-typedef struct {
-    NPT_UInt32    track;
-    NPT_TimeStamp track_duration;
-    NPT_String    track_metadata;
-    NPT_String    track_uri;
-    NPT_TimeStamp rel_time;
-    NPT_TimeStamp abs_time;
-    NPT_Int32     rel_count;
-    NPT_Int32     abs_count;
-} PLT_PositionInfo;
-
-typedef struct {
-    NPT_String cur_transport_state;
-    NPT_String cur_transport_status;
-    NPT_String cur_speed;
-} PLT_TransportInfo;
-
-typedef struct {
-    NPT_String play_mode;
-    NPT_String rec_quality_mode;
-} PLT_TransportSettings;
-
-typedef struct {
-    NPT_UInt32 rcs_id;
-    NPT_UInt32 avtransport_id;
-    NPT_String protocol_info;
-    NPT_String peer_connection_mgr;
-    NPT_UInt32 peer_connection_id;
-    NPT_String direction;
-    NPT_String status;
-} PLT_ConnectionInfo;
-
-/*----------------------------------------------------------------------
-|   PLT_MediaControllerDelegate
-+---------------------------------------------------------------------*/
-class PLT_MediaControllerDelegate
-{
-public:
-    virtual ~PLT_MediaControllerDelegate() {}
-
-    virtual bool OnMRAdded(PLT_DeviceDataReference& /* device */) { return true; }
-    virtual void OnMRRemoved(PLT_DeviceDataReference& /* device */) {}
-    virtual void OnMRStateVariablesChanged(PLT_Service*                  /* service */, 
-                                           NPT_List<PLT_StateVariable*>* /* vars */) {}
-
-    // AVTransport
-    virtual void OnGetCurrentTransportActionsResult(
-        NPT_Result               /* res */, 
-        PLT_DeviceDataReference& /* device */,
-        PLT_StringList*          /* actions */, 
-        void*                    /* userdata */) {}
-
-    virtual void OnGetDeviceCapabilitiesResult(
-        NPT_Result               /* res */, 
-        PLT_DeviceDataReference& /* device */,
-        PLT_DeviceCapabilities*  /* capabilities */,
-        void*                    /* userdata */) {}
-
-    virtual void OnGetMediaInfoResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        PLT_MediaInfo*           /* info */,
-        void*                    /* userdata */) {}
-
-    virtual void OnGetPositionInfoResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        PLT_PositionInfo*        /* info */,
-        void*                    /* userdata */) {}
-
-    virtual void OnGetTransportInfoResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        PLT_TransportInfo*       /* info */,
-        void*                    /* userdata */) {}
-
-    virtual void OnGetTransportSettingsResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        PLT_TransportSettings*   /* settings */,
-        void*                    /* userdata */) {}
-
-    virtual void OnNextResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        void*                    /* userdata */) {}
-
-    virtual void OnPauseResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        void*                    /* userdata */) {}  
-
-    virtual void OnPlayResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        void*                    /* userdata */) {}
-
-    virtual void OnPreviousResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        void*                    /* userdata */) {}
-
-    virtual void OnSeekResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        void*                    /* userdata */) {}
-
-    virtual void OnSetAVTransportURIResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        void*                    /* userdata */) {}
-
-    virtual void OnSetPlayModeResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        void*                    /* userdata */) {}
-
-    virtual void OnStopResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        void*                    /* userdata */) {}
-        
-    // ConnectionManager
-    virtual void OnGetCurrentConnectionIDsResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        PLT_StringList*          /* ids */,
-        void*                    /* userdata */) {}
-
-    virtual void OnGetCurrentConnectionInfoResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        PLT_ConnectionInfo*      /* info */,
-        void*                    /* userdata */) {}
-
-    virtual void OnGetProtocolInfoResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        PLT_StringList*          /* sources */,
-        PLT_StringList*          /* sinks */,
-        void*                    /* userdata */) {}
-        
-    // RenderingControl
-    virtual void OnSetMuteResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        void*                    /* userdata */) {}
-
-    virtual void OnGetMuteResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        const char*              /* channel */,
-        bool                     /* mute */,
-        void*                    /* userdata */) {}
-
-	virtual void OnSetVolumeResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        void*                    /* userdata */) {}
-
-	virtual void OnGetVolumeResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-		const char*              /* channel */,
-    	NPT_UInt32				 /* volume */,
-	    void*                    /* userdata */) {}
-};
-
-/*----------------------------------------------------------------------
-|   PLT_MediaController
-+---------------------------------------------------------------------*/
-class PLT_MediaController : public PLT_CtrlPointListener
-{
-public:
-    PLT_MediaController(PLT_CtrlPointReference&      ctrl_point, 
-                        PLT_MediaControllerDelegate* delegate = NULL);
-    virtual ~PLT_MediaController();
-
-    // public methods
-    virtual void SetDelegate(PLT_MediaControllerDelegate* delegate) {
-        m_Delegate = delegate;
-    }
-
-    // PLT_CtrlPointListener methods
-    virtual NPT_Result OnDeviceAdded(PLT_DeviceDataReference& device);
-    virtual NPT_Result OnDeviceRemoved(PLT_DeviceDataReference& device);
-    virtual NPT_Result OnActionResponse(NPT_Result res, PLT_ActionReference& action, void* userdata);
-    virtual NPT_Result OnEventNotify(PLT_Service* service, NPT_List<PLT_StateVariable*>* vars);
-
-    // AVTransport
-    NPT_Result GetCurrentTransportActions(PLT_DeviceDataReference& device, NPT_UInt32 instance_id, void* userdata);
-    NPT_Result GetDeviceCapabilities(PLT_DeviceDataReference& device, NPT_UInt32 instance_id, void* userdata);
-    NPT_Result GetMediaInfo(PLT_DeviceDataReference& device, NPT_UInt32 instance_id, void* userdata);
-    NPT_Result GetPositionInfo(PLT_DeviceDataReference& device,  NPT_UInt32 instance_id, void* userdata);
-    NPT_Result GetTransportInfo(PLT_DeviceDataReference& device, NPT_UInt32 instance_id, void* userdata);
-    NPT_Result GetTransportSettings(PLT_DeviceDataReference& device, NPT_UInt32 instance_id, void* userdata);
-    NPT_Result Next(PLT_DeviceDataReference& device, NPT_UInt32 instance_id, void* userdata);
-    NPT_Result Pause(PLT_DeviceDataReference& device, NPT_UInt32 instance_id, void* userdata);
-    NPT_Result Play(PLT_DeviceDataReference&  device, NPT_UInt32 instance_id, NPT_String speed, void* userdata);
-    NPT_Result Previous(PLT_DeviceDataReference& device, NPT_UInt32 instance_id, void* userdata);
-    NPT_Result Seek(PLT_DeviceDataReference&  device, NPT_UInt32 instance_id, NPT_String unit, NPT_String target, void* userdata);
-    bool       CanSetNextAVTransportURI(PLT_DeviceDataReference& device);
-    NPT_Result SetAVTransportURI(PLT_DeviceDataReference& device, NPT_UInt32 instance_id, const char* uri, const char* metadata, void* userdata);
-    NPT_Result SetNextAVTransportURI(PLT_DeviceDataReference& device, NPT_UInt32 instance_id, const char* next_uri, const char* next_metadata, void* userdata);
-    NPT_Result SetPlayMode(PLT_DeviceDataReference&  device, NPT_UInt32 instance_id, NPT_String new_play_mode, void* userdata);
-    NPT_Result Stop(PLT_DeviceDataReference& device, NPT_UInt32 instance_id, void* userdata);
-
-    // ConnectionManager
-    NPT_Result GetCurrentConnectionIDs(PLT_DeviceDataReference& device, void* userdata);
-    NPT_Result GetCurrentConnectionInfo(PLT_DeviceDataReference& device, NPT_UInt32 connection_id, void* userdata);
-    NPT_Result GetProtocolInfo(PLT_DeviceDataReference& device, void* userdata);
-    
-    // RenderingControl
-    NPT_Result SetMute(PLT_DeviceDataReference& device, NPT_UInt32 instance_id, const char* channel, bool mute, void* userdata);
-    NPT_Result GetMute(PLT_DeviceDataReference& device, NPT_UInt32 instance_id, const char* channel, void* userdata);
-	NPT_Result SetVolume(PLT_DeviceDataReference& device, NPT_UInt32 instance_id, const char* channel, int volume, void* userdata);
-	NPT_Result GetVolume(PLT_DeviceDataReference& device, NPT_UInt32 instance_id, const char* channel, void* userdata);	
-
-    // VariableStates    
-    virtual NPT_Result GetProtocolInfoSink(const NPT_String& device_uuid, NPT_List<NPT_String>& sinks);
-    virtual NPT_Result GetTransportState(const NPT_String&  device_uuid, NPT_String& state);
-    virtual NPT_Result GetVolumeState(const NPT_String&  device_uuid, NPT_UInt32& volume);
-    
-    // methods
-    virtual NPT_Result FindRenderer(const char* uuid, PLT_DeviceDataReference& device);
-    virtual NPT_Result FindMatchingProtocolInfo(NPT_List<NPT_String>& sinks, const char* protocol_info);
-    virtual NPT_Result FindBestResource(PLT_DeviceDataReference& device, PLT_MediaObject& item, NPT_Cardinal& resource_index);
-
-private:
-    NPT_Result InvokeActionWithInstance(PLT_ActionReference& action, NPT_UInt32 instance_id, void* userdata = NULL);
-
-    NPT_Result OnGetCurrentTransportActionsResponse(NPT_Result res, PLT_DeviceDataReference& device, PLT_ActionReference& action, void* userdata);
-    NPT_Result OnGetDeviceCapabilitiesResponse(NPT_Result res, PLT_DeviceDataReference& device, PLT_ActionReference& action, void* userdata);
-    NPT_Result OnGetMediaInfoResponse(NPT_Result res, PLT_DeviceDataReference& device, PLT_ActionReference& action, void* userdata);
-    NPT_Result OnGetPositionInfoResponse(NPT_Result res, PLT_DeviceDataReference& device, PLT_ActionReference& action, void* userdata);
-    NPT_Result OnGetTransportInfoResponse(NPT_Result res, PLT_DeviceDataReference& device, PLT_ActionReference& action, void* userdata);
-    NPT_Result OnGetTransportSettingsResponse(NPT_Result res, PLT_DeviceDataReference& device, PLT_ActionReference& action, void* userdata);
-
-    NPT_Result OnGetCurrentConnectionIDsResponse(NPT_Result res, PLT_DeviceDataReference& device, PLT_ActionReference& action, void* userdata);
-    NPT_Result OnGetCurrentConnectionInfoResponse(NPT_Result res, PLT_DeviceDataReference& device, PLT_ActionReference& action, void* userdata);
-    NPT_Result OnGetProtocolInfoResponse(NPT_Result res, PLT_DeviceDataReference& device, PLT_ActionReference& action, void* userdata);
-    
-    NPT_Result OnGetMuteResponse(NPT_Result res, PLT_DeviceDataReference& device, PLT_ActionReference& action, void* userdata);
-	NPT_Result OnGetVolumeResponse(NPT_Result res, PLT_DeviceDataReference& device, PLT_ActionReference& action, void* userdata);
-
-public:
-    static void ParseCSV(const char* csv, PLT_StringList& values) {
-        const char* start = csv;
-        const char* p = start;
-
-        // look for the , character
-        while (*p) {
-            if (*p == ',') {
-                NPT_String val(start, (int)(p-start));
-                val.Trim(' ');
-                values.Add(val);
-                start = p + 1;
-            }
-            p++;
-        }
-
-        // last one
-        NPT_String last(start, (int)(p-start));
-        last.Trim(' ');
-        if (last.GetLength()) {
-            values.Add(last);
-        }
-    }
-
-private:
-    PLT_CtrlPointReference                m_CtrlPoint;
-    PLT_MediaControllerDelegate*          m_Delegate;
-    NPT_Lock<PLT_DeviceDataReferenceList> m_MediaRenderers;
-};
-
-typedef NPT_Reference<PLT_MediaController> PLT_MediaControllerReference;
-
-#endif /* _PLT_MEDIA_CONTROLLER_H_ */
diff --git a/extra_lib/include/platinum/PltMediaControllerListener.h b/extra_lib/include/platinum/PltMediaControllerListener.h
deleted file mode 100644
index 1ab3a91..0000000
--- a/extra_lib/include/platinum/PltMediaControllerListener.h
+++ /dev/null
@@ -1,203 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - AV Media Controller Listener
-|
-| Copyright (c) 2004-2008, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| 
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-#ifndef _PLT_MEDIA_CONTROLLER_LISTENER_H_
-#define _PLT_MEDIA_CONTROLLER_LISTENER_H_
-
-/*----------------------------------------------------------------------
-|   Defines
-+---------------------------------------------------------------------*/
-typedef NPT_List<NPT_String> PLT_StringList;
-
-struct PLT_DeviceCapabilities {
-    PLT_StringList play_media;
-    PLT_StringList rec_media;
-    PLT_StringList rec_quality_modes;
-};
-
-struct PLT_MediaInfo {
-    NPT_UInt32    num_tracks;
-    NPT_TimeStamp media_duration;
-    NPT_String    cur_uri;
-    NPT_String    cur_metadata;
-    NPT_String    next_uri;
-    NPT_String    next_metadata;
-    NPT_String    play_medium;
-    NPT_String    rec_medium;
-    NPT_String    write_status;
-};
-
-struct PLT_PositionInfo {
-    NPT_UInt32    track;
-    NPT_TimeStamp track_duration;
-    NPT_String    track_metadata;
-    NPT_String    track_uri;
-    NPT_TimeStamp rel_time;
-    NPT_TimeStamp abs_time;
-    NPT_Int32     rel_count;
-    NPT_Int32     abs_count;
-};
-
-struct PLT_TransportInfo {
-    NPT_String cur_transport_state;
-    NPT_String cur_transport_status;
-    NPT_String cur_speed;
-};
-
-struct PLT_TransportSettings {
-    NPT_String play_mode;
-    NPT_String rec_quality_mode;
-};
-
-struct PLT_ConnectionInfo {
-    NPT_UInt32 rcs_id;
-    NPT_UInt32 avtransport_id;
-    NPT_String protocol_info;
-    NPT_String peer_connection_mgr;
-    NPT_UInt32 peer_connection_id;
-    NPT_String direction;
-    NPT_String status;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_MediaControllerListener class
-+---------------------------------------------------------------------*/
-class PLT_MediaControllerListener
-{
-public:
-    virtual ~PLT_MediaControllerListener() {}
-
-    virtual void OnMRAddedRemoved(PLT_DeviceDataReference& /* device */, 
-                                  int                      /* added */) {}
-    virtual void OnMRStateVariablesChanged(PLT_Service*                  /* service */, 
-                                           NPT_List<PLT_StateVariable*>* /* vars */) {}
-
-    // AVTransport
-    virtual void OnGetCurrentTransportActionsResult(
-        NPT_Result               /* res */, 
-        PLT_DeviceDataReference& /* device */,
-        PLT_StringList*          /* actions */, 
-        void*                    /* userdata */) {}
-
-    virtual void OnGetDeviceCapabilitiesResult(
-        NPT_Result               /* res */, 
-        PLT_DeviceDataReference& /* device */,
-        PLT_DeviceCapabilities*  /* capabilities */,
-        void*                    /* userdata */) {}
-
-    virtual void OnGetMediaInfoResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        PLT_MediaInfo*           /* info */,
-        void*                    /* userdata */) {}
-
-    virtual void OnGetPositionInfoResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        PLT_PositionInfo*        /* info */,
-        void*                    /* userdata */) {}
-
-    virtual void OnGetTransportInfoResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        PLT_TransportInfo*       /* info */,
-        void*                    /* userdata */) {}
-
-    virtual void OnGetTransportSettingsResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        PLT_TransportSettings*   /* settings */,
-        void*                    /* userdata */) {}
-
-    virtual void OnNextResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        void*                    /* userdata */) {}
-
-    virtual void OnPauseResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        void*                    /* userdata */) {}  
-
-    virtual void OnPlayResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        void*                    /* userdata */) {}
-
-    virtual void OnPreviousResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        void*                    /* userdata */) {}
-
-    virtual void OnSeekResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        void*                    /* userdata */) {}
-
-    virtual void OnSetAVTransportURIResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        void*                    /* userdata */) {}
-
-    virtual void OnSetPlayModeResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        void*                    /* userdata */) {}
-
-    virtual void OnStopResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        void*                    /* userdata */) {}
-
-    // ConnectionManager
-    virtual void OnGetCurrentConnectionIDsResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        PLT_StringList*          /* ids */,
-        void*                    /* userdata */) {}
-
-    virtual void OnGetCurrentConnectionInfoResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        PLT_ConnectionInfo*      /* info */,
-        void*                    /* userdata */) {}
-
-    virtual void OnGetProtocolInfoResult(
-        NPT_Result               /* res */,
-        PLT_DeviceDataReference& /* device */,
-        PLT_StringList*          /* sources */,
-        PLT_StringList*          /* sinks */,
-        void*                    /* userdata */) {}
-};
-
-#endif /* _PLT_MEDIA_CONTROLLER_LISTENER_H_ */
diff --git a/extra_lib/include/platinum/PltMediaItem.h b/extra_lib/include/platinum/PltMediaItem.h
deleted file mode 100644
index 3ebc3b0..0000000
--- a/extra_lib/include/platinum/PltMediaItem.h
+++ /dev/null
@@ -1,304 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - AV Media Item
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-/** @file
- UPnP AV Media Object reprensentation.
- */
-
-#ifndef _PLT_MEDIA_ITEM_H_
-#define _PLT_MEDIA_ITEM_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-#include "PltHttp.h"
-#include "PltProtocolInfo.h"
-
-/*----------------------------------------------------------------------
-|   typedefs
-+---------------------------------------------------------------------*/
-/**
- The PLT_ObjectClass struct is used to assign a type to a PLT_MediaObject.
- */
-typedef struct { 
-    NPT_String type;
-    NPT_String friendly_name;
-} PLT_ObjectClass;
-
-typedef struct { 
-    NPT_String type;
-    NPT_String friendly_name;
-    bool       include_derived;
-} PLT_SearchClass;
-
-typedef struct {
-    NPT_String name;
-    NPT_String role;
-} PLT_PersonRole;
-
-class PLT_PersonRoles  : public NPT_List<PLT_PersonRole>
-{
-public:
-    NPT_Result Add(const NPT_String& name, const NPT_String& role = "");
-    NPT_Result ToDidl(NPT_String& didl, const NPT_String& tag);
-    NPT_Result FromDidl(const NPT_Array<NPT_XmlElementNode*>& nodes);
-};
-
-typedef struct {
-    NPT_String allowed_use; // (CSV)
-    NPT_String validity_start;
-    NPT_String validity_end;
-    NPT_String remaining_time;
-    NPT_String usage_info;
-    NPT_String rights_info_uri;
-    NPT_String content_info_uri;
-} PLT_Constraint;
-
-typedef struct {
-    PLT_PersonRoles artists;
-    PLT_PersonRoles actors;
-    PLT_PersonRoles authors;
-    NPT_String      producer; //TODO: can be multiple
-    NPT_String      director; //TODO: can be multiple
-    NPT_String      publisher; //TODO: can be multiple
-    NPT_String      contributor; // should match m_Creator (dc:creator) //TODO: can be multiple
-} PLT_PeopleInfo;
-
-typedef struct {
-    NPT_List<NPT_String> genres;
-    NPT_String album; //TODO: can be multiple
-    NPT_String playlist; // dc:title of the playlist item the content belongs too //TODO: can be multiple
-} PLT_AffiliationInfo;
-
-typedef struct {
-    NPT_String description;
-    NPT_String long_description;
-    NPT_String icon_uri;
-    NPT_String region;
-    NPT_String rating;
-    NPT_String rights; //TODO: can be multiple
-    NPT_String date;
-    NPT_String language;
-} PLT_Description;
-
-typedef struct {
-    NPT_String uri;
-    NPT_String dlna_profile;
-} PLT_AlbumArtInfo;
-
-typedef struct {
-    NPT_List<PLT_AlbumArtInfo> album_arts;
-    NPT_String artist_discography_uri;
-    NPT_String lyrics_uri;
-    NPT_List<NPT_String> relations; // dc:relation
-} PLT_ExtraInfo;
-
-typedef struct {
-    NPT_UInt32 dvdregioncode;
-    NPT_UInt32 original_track_number;
-    NPT_String toc;
-    NPT_String user_annotation; //TODO: can be multiple
-} PLT_MiscInfo;
-
-typedef struct {
-    NPT_UInt64 total;
-    NPT_UInt64 used;
-    NPT_UInt64 free;
-    NPT_UInt64 max_partition;
-    NPT_UInt64 medium;
-} PLT_StorageInfo;
-
-typedef struct {
-    NPT_String program_title;
-    NPT_String series_title;
-    NPT_UInt32 episode_number;
-} PLT_RecordedInfo;
-
-/*----------------------------------------------------------------------
-|   PLT_MediaItemResource
-+---------------------------------------------------------------------*/
-class PLT_MediaItemResource
-{
-public:
-    PLT_MediaItemResource();
-    ~PLT_MediaItemResource() {}
-
-    NPT_String       m_Uri;
-    PLT_ProtocolInfo m_ProtocolInfo;
-    NPT_UInt32       m_Duration; /* seconds */
-    NPT_LargeSize    m_Size;
-    NPT_String       m_Protection;
-    NPT_UInt32       m_Bitrate; /* bytes/seconds */
-    NPT_UInt32       m_BitsPerSample;
-    NPT_UInt32       m_SampleFrequency;
-    NPT_UInt32       m_NbAudioChannels;
-    NPT_String       m_Resolution;
-    NPT_UInt32       m_ColorDepth;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_MediaObject
-+---------------------------------------------------------------------*/
-/**
- The PLT_MediaObject class is any data entity that can be returned by a
- ContentDirectory Service from a browsing or searching action. This is the
- base class from which PLT_MediaItem and PLT_MediaContainer derive.
- */
-class PLT_MediaObject
-{
-protected:
-    NPT_IMPLEMENT_DYNAMIC_CAST(PLT_MediaObject)
-
-    PLT_MediaObject() {}
-
-public:
-    virtual ~PLT_MediaObject() {}
-
-    bool IsContainer() { return m_ObjectClass.type.StartsWith("object.container"); }
-
-    static const char* GetUPnPClass(const char* filename, 
-                                    const PLT_HttpRequestContext* context = NULL);
-
-    virtual NPT_Result Reset();
-    virtual NPT_Result ToDidl(const NPT_String& filter, NPT_String& didl);
-    virtual NPT_Result ToDidl(NPT_UInt32 mask, NPT_String& didl);
-    virtual NPT_Result FromDidl(NPT_XmlElementNode* entry);
-
-public:
-    /* common properties */
-    PLT_ObjectClass     m_ObjectClass;
-    NPT_String          m_ObjectID;
-    NPT_String          m_ParentID;
-    NPT_String          m_ReferenceID;
-
-    /* metadata */
-    NPT_String          m_Title;
-    NPT_String          m_Creator;
-    NPT_String          m_Date;
-    PLT_PeopleInfo      m_People;
-    PLT_AffiliationInfo m_Affiliation;
-    PLT_Description     m_Description;
-    PLT_RecordedInfo    m_Recorded;
-
-    /* properties */
-    bool m_Restricted;
-
-    /* extras */
-    PLT_ExtraInfo m_ExtraInfo;
-
-    /* miscellaneous info */
-    PLT_MiscInfo m_MiscInfo;
-
-    /* resources related */
-    NPT_Array<PLT_MediaItemResource> m_Resources;
-
-    /* original DIDL for Control Points to pass to a renderer when invoking SetAVTransportURI */
-    NPT_String m_Didl;    
-};
-
-/*----------------------------------------------------------------------
-|   PLT_MediaItem
-+---------------------------------------------------------------------*/
-/**
- The PLT_MediaItem class represents a first-level class derived directly from
- PLT_MediaObject. It most often represents a single piece of AV data. 
- */
-class PLT_MediaItem : public PLT_MediaObject
-{
-public:
-    NPT_IMPLEMENT_DYNAMIC_CAST_D(PLT_MediaItem, PLT_MediaObject)
-
-    PLT_MediaItem();
-    virtual ~PLT_MediaItem();
-
-    // PLT_MediaObject methods
-    NPT_Result ToDidl(const NPT_String& filter, NPT_String& didl);
-    NPT_Result ToDidl(NPT_UInt32 mask, NPT_String& didl);
-    NPT_Result FromDidl(NPT_XmlElementNode* entry);
-};
-
-/*----------------------------------------------------------------------
-|   PLT_MediaContainer
-+---------------------------------------------------------------------*/
-/**
- The PLT_MediaContainer class represents a first-level class derived directly
- from PLT_MediaObject. A PLT_MediaContainer represents a collection of 
- PLT_MediaObject instances.
- */
-class PLT_MediaContainer : public PLT_MediaObject
-{
-public:
-    NPT_IMPLEMENT_DYNAMIC_CAST_D(PLT_MediaContainer, PLT_MediaObject)
-
-    PLT_MediaContainer();
-    virtual ~PLT_MediaContainer();
-
-    // PLT_MediaObject methods
-    NPT_Result Reset();
-    NPT_Result ToDidl(const NPT_String& filter, NPT_String& didl);
-    NPT_Result ToDidl(NPT_UInt32 mask, NPT_String& didl);
-    NPT_Result FromDidl(NPT_XmlElementNode* entry);
-
-public:
-    NPT_List<PLT_SearchClass> m_SearchClasses;
-
-    /* properties */
-    bool m_Searchable;
-
-    /* container info related */
-    NPT_Int32  m_ChildrenCount;    
-    NPT_UInt32 m_ContainerUpdateID;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_MediaObjectList
-+---------------------------------------------------------------------*/
-/**
- The PLT_MediaObjectList class is a list of PLT_MediaObject instances.
- */
-class PLT_MediaObjectList : public NPT_List<PLT_MediaObject*>
-{
-public:
-    PLT_MediaObjectList();
-
-protected:
-    virtual ~PLT_MediaObjectList(void);
-    friend class NPT_Reference<PLT_MediaObjectList>;
-};
-
-typedef NPT_Reference<PLT_MediaObjectList> PLT_MediaObjectListReference;
-typedef NPT_Reference<PLT_MediaObject> PLT_MediaObjectReference;
-
-#endif /* _PLT_MEDIA_ITEM_H_ */
diff --git a/extra_lib/include/platinum/PltMediaPlaylist.h b/extra_lib/include/platinum/PltMediaPlaylist.h
deleted file mode 100644
index a53766b..0000000
--- a/extra_lib/include/platinum/PltMediaPlaylist.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - AV Media Playlist
-|
-| Copyright (c) 2004-2008, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| 
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-#ifndef _PLT_MEDIA_PLAYLIST_H_
-#define _PLT_MEDIA_PLAYLIST_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-#include "PltMediaItem.h"
-
-/*----------------------------------------------------------------------
-|   typedefs
-+---------------------------------------------------------------------*/
-typedef NPT_List<PLT_MediaItem*> PLT_MediaItemList;
-typedef NPT_Reference<PLT_MediaItemList> PLT_MediaItemListReference;
-
-/*----------------------------------------------------------------------
-|   PLT_MediaPlaylist class
-+---------------------------------------------------------------------*/
-class PLT_MediaPlaylist
-{
-public:
-    PLT_MediaPlaylist();
-    ~PLT_MediaPlaylist(void);
-
-    NPT_Result  Clear();
-    NPT_Result  Queue(PLT_MediaItem* item);
-    NPT_Result  Queue(PLT_MediaItemList* list);
-    template <typename X> 
-    NPT_Result  Apply(const X& function) {
-        return m_List->Apply(function);
-    }
-
-private:
-    PLT_MediaItemListReference m_List;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_MediaItemQueueIterator class
-+---------------------------------------------------------------------*/
-class PLT_MediaItemQueueIterator
-{
-public:
-    PLT_MediaItemQueueIterator(PLT_MediaPlaylist* playlist) : m_Playlist(playlist) {}
-    NPT_Result operator()(PLT_MediaItem*& item) const {
-        return m_Playlist->Queue(item);
-    }
-
-private:
-    PLT_MediaPlaylist* m_Playlist;
-};
-
-#endif /* _PLT_MEDIA_PLAYLIST_H_ */
diff --git a/extra_lib/include/platinum/PltMediaRenderer.h b/extra_lib/include/platinum/PltMediaRenderer.h
deleted file mode 100644
index d596838..0000000
--- a/extra_lib/include/platinum/PltMediaRenderer.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - AV Media Renderer Device
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-| 
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-#ifndef _PLT_MEDIA_RENDERER_H_
-#define _PLT_MEDIA_RENDERER_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "PltDeviceHost.h"
-
-/*----------------------------------------------------------------------
-|   PLT_MediaRendererDelegate
-+---------------------------------------------------------------------*/
-class PLT_MediaRendererDelegate
-{
-public:
-    virtual ~PLT_MediaRendererDelegate() {}
-
-    // ConnectionManager
-    virtual NPT_Result OnGetCurrentConnectionInfo(PLT_ActionReference& action) = 0;
-
-    // AVTransport
-    virtual NPT_Result OnNext(PLT_ActionReference& action) = 0;
-    virtual NPT_Result OnPause(PLT_ActionReference& action) = 0;
-    virtual NPT_Result OnPlay(PLT_ActionReference& action) = 0;
-    virtual NPT_Result OnPrevious(PLT_ActionReference& action) = 0;
-    virtual NPT_Result OnSeek(PLT_ActionReference& action) = 0;
-    virtual NPT_Result OnStop(PLT_ActionReference& action) = 0;
-    virtual NPT_Result OnSetAVTransportURI(PLT_ActionReference& action) = 0;
-    virtual NPT_Result OnSetPlayMode(PLT_ActionReference& action) = 0;
-
-    // RenderingControl
-    virtual NPT_Result OnSetVolume(PLT_ActionReference& action) = 0;
-    virtual NPT_Result OnSetVolumeDB(PLT_ActionReference& action) = 0;
-    virtual NPT_Result OnGetVolumeDBRange(PLT_ActionReference& action) = 0;
-    virtual NPT_Result OnSetMute(PLT_ActionReference& action) = 0;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_MediaRenderer
-+---------------------------------------------------------------------*/
-class PLT_MediaRenderer : public PLT_DeviceHost
-{
-public:
-    PLT_MediaRenderer(const char*  friendly_name,
-                      bool         show_ip = false,
-                      const char*  uuid = NULL,
-                      unsigned int port = 0,
-                      bool         port_rebind = false);
-    // methods
-    virtual void SetDelegate(PLT_MediaRendererDelegate* delegate) { m_Delegate = delegate; }
-
-    // PLT_DeviceHost methods
-    virtual NPT_Result SetupServices();
-    virtual NPT_Result OnAction(PLT_ActionReference&          action, 
-                                const PLT_HttpRequestContext& context);
-
-protected:
-    virtual ~PLT_MediaRenderer();
-
-    // PLT_MediaRendererInterface methods
-    // ConnectionManager
-    virtual NPT_Result OnGetCurrentConnectionInfo(PLT_ActionReference& action);
-
-    // AVTransport
-    virtual NPT_Result OnNext(PLT_ActionReference& action);
-    virtual NPT_Result OnPause(PLT_ActionReference& action);
-    virtual NPT_Result OnPlay(PLT_ActionReference& action);
-    virtual NPT_Result OnPrevious(PLT_ActionReference& action);
-    virtual NPT_Result OnSeek(PLT_ActionReference& action);
-    virtual NPT_Result OnStop(PLT_ActionReference& action);
-    virtual NPT_Result OnSetAVTransportURI(PLT_ActionReference& action);
-    virtual NPT_Result OnSetPlayMode(PLT_ActionReference& action);
-
-    // RenderingControl
-    virtual NPT_Result OnSetVolume(PLT_ActionReference& action);
-    virtual NPT_Result OnSetVolumeDB(PLT_ActionReference &action);
-    virtual NPT_Result OnGetVolumeDBRange(PLT_ActionReference &action);
-    virtual NPT_Result OnSetMute(PLT_ActionReference& action);
-
-private:
-    PLT_MediaRendererDelegate* m_Delegate;
-};
-
-#endif /* _PLT_MEDIA_RENDERER_H_ */
diff --git a/extra_lib/include/platinum/PltMediaServer.h b/extra_lib/include/platinum/PltMediaServer.h
deleted file mode 100644
index fb4f9f3..0000000
--- a/extra_lib/include/platinum/PltMediaServer.h
+++ /dev/null
@@ -1,187 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - AV Media Server Device
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-/** @file
- UPnP AV Media Server.
- */
-
-#ifndef _PLT_MEDIA_SERVER_H_
-#define _PLT_MEDIA_SERVER_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-#include "PltDeviceHost.h"
-#include "PltMediaItem.h"
-
-/*----------------------------------------------------------------------
-|   constants
-+---------------------------------------------------------------------*/
-#define MAX_PATH_LENGTH 1024
-
-/*----------------------------------------------------------------------
-|   PLT_MediaServerDelegate
-+---------------------------------------------------------------------*/
-/** 
- The PLT_MediaServerDelegate class is an interface for delegating the handling 
- of the required UPnP AV ContentDirectory service actions. It also handles 
- resource HTTP requests (downloading).
- */
-class PLT_MediaServerDelegate
-{
-public:
-    PLT_MediaServerDelegate() {}
-    virtual ~PLT_MediaServerDelegate() {}
-    
-    virtual NPT_Result OnBrowseMetadata(PLT_ActionReference&          /*action*/, 
-                                        const char*                   /*object_id*/, 
-                                        const char*                   /*filter*/,
-                                        NPT_UInt32                    /*starting_index*/,
-                                        NPT_UInt32                    /*requested_count*/,
-                                        const char*                   /*sort_criteria*/,
-                                        const PLT_HttpRequestContext& /*context*/) = 0;
-    virtual NPT_Result OnBrowseDirectChildren(PLT_ActionReference&          /*action*/, 
-                                              const char*                   /*object_id*/, 
-                                              const char*                   /*filter*/,
-                                              NPT_UInt32                    /*starting_index*/,
-                                              NPT_UInt32                    /*requested_count*/,
-                                              const char*                   /*sort_criteria*/, 
-                                              const PLT_HttpRequestContext& /*context*/) = 0;
-    virtual NPT_Result OnSearchContainer(PLT_ActionReference&          /*action*/, 
-                                         const char*                   /*container_id*/, 
-                                         const char*                   /*search_criteria*/,
- 										 const char*                   /*filter*/,
-                                         NPT_UInt32                    /*starting_index*/,
-                                         NPT_UInt32                    /*requested_count*/,
-                                         const char*                   /*sort_criteria*/, 
-                                         const PLT_HttpRequestContext& /*context*/) = 0;
-    virtual NPT_Result ProcessFileRequest(NPT_HttpRequest&              /*request*/,
-                                          const NPT_HttpRequestContext& /*context*/,
-                                          NPT_HttpResponse&             /*response*/) = 0;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_MediaServer
-+---------------------------------------------------------------------*/
-/**
- The PLT_MediaServer class implements the base class for a UPnP AV 
- Media Server device.
- */
-class PLT_MediaServer : public PLT_DeviceHost
-{
-public:
-    /* BrowseFlags */
-    enum BrowseFlags {
-        BROWSEMETADATA,
-        BROWSEDIRECTCHILDREN
-    };
-    
-    // class methods
-    static NPT_Result ParseBrowseFlag(const char* str, BrowseFlags& flag);
-    static NPT_Result ParseSort(const NPT_String& sort, NPT_List<NPT_String>& list);
-
-    // constructor
-    PLT_MediaServer(const char*  friendly_name,
-                    bool         show_ip = false,
-                    const char*  uuid = NULL,
-                    NPT_UInt16   port = 0,
-                    bool         port_rebind = false);
-    
-    // methods
-    virtual void SetDelegate(PLT_MediaServerDelegate* delegate) { m_Delegate = delegate; }
-    PLT_MediaServerDelegate* GetDelegate() { return m_Delegate; }
-    virtual void UpdateSystemUpdateID(NPT_UInt32 update);
-    virtual void UpdateContainerUpdateID(const char* id, NPT_UInt32 update);
-    
-protected:
-    virtual ~PLT_MediaServer();
-    
-    // PLT_DeviceHost methods
-    virtual NPT_Result SetupServices();
-    virtual NPT_Result OnAction(PLT_ActionReference&          action, 
-                                const PLT_HttpRequestContext& context);
-    virtual NPT_Result ProcessHttpGetRequest(NPT_HttpRequest&              request, 
-                                             const NPT_HttpRequestContext& context,
-                                             NPT_HttpResponse&             response);
-    
-    // ConnectionManager
-    virtual NPT_Result OnGetCurrentConnectionIDs(PLT_ActionReference&          action, 
-                                                 const PLT_HttpRequestContext& context);
-    virtual NPT_Result OnGetProtocolInfo(PLT_ActionReference&          action, 
-                                         const PLT_HttpRequestContext& context);
-    virtual NPT_Result OnGetCurrentConnectionInfo(PLT_ActionReference&          action, 
-                                                  const PLT_HttpRequestContext& context);
-
-    // ContentDirectory
-    virtual NPT_Result OnGetSortCapabilities(PLT_ActionReference&          action, 
-                                             const PLT_HttpRequestContext& context);
-    virtual NPT_Result OnGetSearchCapabilities(PLT_ActionReference&          action, 
-                                               const PLT_HttpRequestContext& context);
-    virtual NPT_Result OnGetSystemUpdateID(PLT_ActionReference&          action, 
-                                           const PLT_HttpRequestContext& context);
-    virtual NPT_Result OnBrowse(PLT_ActionReference&          action, 
-                                const PLT_HttpRequestContext& context);
-    virtual NPT_Result OnSearch(PLT_ActionReference&          action, 
-                                const PLT_HttpRequestContext& context);
-
-    // overridable methods
-    virtual NPT_Result OnBrowseMetadata(PLT_ActionReference&          action, 
-                                        const char*                   object_id, 
-                                        const char*                   filter,
-                                        NPT_UInt32                    starting_index,
-                                        NPT_UInt32                    requested_count,
-                                        const char*                   sort_criteria,
-                                        const PLT_HttpRequestContext& context);
-    virtual NPT_Result OnBrowseDirectChildren(PLT_ActionReference&          action, 
-                                              const char*                   object_id, 
-                                              const char*                   filter,
-                                              NPT_UInt32                    starting_index,
-                                              NPT_UInt32                    requested_count,
-                                              const char*                   sort_criteria, 
-                                              const PLT_HttpRequestContext& context);
-    virtual NPT_Result OnSearchContainer(PLT_ActionReference&          action, 
-                                         const char*                   container_id, 
-                                         const char*                   search_criteria,
- 										 const char*                   filter,
-                                         NPT_UInt32                    starting_index,
-                                         NPT_UInt32                    requested_count,
-                                         const char*                   sort_criteria, 
-                                         const PLT_HttpRequestContext& context);
-    
-private:
-    PLT_MediaServerDelegate* m_Delegate;
-};
-
-#endif /* _PLT_MEDIA_SERVER_H_ */
diff --git a/extra_lib/include/platinum/PltMetadataHandler.h b/extra_lib/include/platinum/PltMetadataHandler.h
deleted file mode 100644
index d1709bd..0000000
--- a/extra_lib/include/platinum/PltMetadataHandler.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - Metadata Handler
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-#ifndef _PLT_METADATA_HANDLER_H_
-#define _PLT_METADATA_HANDLER_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-
-/*----------------------------------------------------------------------
-|   PLT_MetadataHandler class
-+---------------------------------------------------------------------*/
-class PLT_MetadataHandler
-{
-public:
-    virtual ~PLT_MetadataHandler() {}
-
-    // metadata overridables
-    virtual bool HandleExtension(const char* extension) = 0;
-    virtual NPT_Result  Load(NPT_InputStream&  stream, 
-                             NPT_TimeInterval  sleeptime = NPT_TimeInterval(.01), 
-                             NPT_TimeInterval  timeout = NPT_TimeInterval(30.)) = 0;
-    virtual NPT_Result  Save(NPT_OutputStream& stream,
-                             NPT_TimeInterval  sleeptime = NPT_TimeInterval(.01), 
-                             NPT_TimeInterval  timeout = NPT_TimeInterval(30.)) = 0;
-
-    virtual const char* GetLicenseData(NPT_String& licenseData) = 0;
-    virtual NPT_Result  GetCoverArtData(char*& caData, int& len) = 0;
-    virtual const char* GetContentID(NPT_String& value) = 0;
-    virtual const char* GetTitle(NPT_String& value) = 0;
-    virtual const char* GetDescription(NPT_String& value) = 0;
-    virtual NPT_Result  GetDuration(NPT_UInt32& seconds) = 0;
-    virtual const char* GetProtection(NPT_String& protection) = 0;
-    virtual NPT_Result  GetYear(NPT_Size& year) = 0;
-    
-    // helper functions
-    virtual NPT_Result  Load(const char* filename);
-    virtual NPT_Result  Save(const char* filename);
-};
-
-/*----------------------------------------------------------------------
-|   PLT_MetadataHandlerFinder
-+---------------------------------------------------------------------*/
-class PLT_MetadataHandlerFinder
-{
-public:
-    // methods
-    PLT_MetadataHandlerFinder(const char* extension) : m_Extension(extension) {}
-    bool operator()(PLT_MetadataHandler* const & handler) const {
-        return handler->HandleExtension(m_Extension) ? true : false;
-    }
-
-private:
-    // members
-    NPT_String m_Extension;
-};
-
-#endif /* _PLT_METADATA_HANDLER_H_ */
diff --git a/extra_lib/include/platinum/PltMimeType.h b/extra_lib/include/platinum/PltMimeType.h
deleted file mode 100644
index 0af0a89..0000000
--- a/extra_lib/include/platinum/PltMimeType.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - AV Media MimeType
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-/** @file
- UPnP AV Media MimeType.
- */
-
-#ifndef _PLT_MIMETYPE_H_
-#define _PLT_MIMETYPE_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-#include "PltHttp.h"
-/*----------------------------------------------------------------------
-|   forward declarations
-+---------------------------------------------------------------------*/
-class PLT_HttpRequestContext;
-
-/*----------------------------------------------------------------------
-|   PLT_MimeType
-+---------------------------------------------------------------------*/
-class PLT_MimeType
-{
-public:
-    virtual ~PLT_MimeType() {}
-
-    static const char* GetMimeType(const NPT_String&             filename, 
-                                   const PLT_HttpRequestContext* context = NULL);
-    static const char* GetMimeType(const NPT_String&   filename,
-                                   PLT_DeviceSignature signature = PLT_DEVICE_UNKNOWN);
-    
-    static const char* GetMimeTypeFromExtension(const NPT_String&             extension, 
-                                                const PLT_HttpRequestContext* context = NULL);
-    static const char* GetMimeTypeFromExtension(const NPT_String&   extension,
-                                                PLT_DeviceSignature signature = PLT_DEVICE_UNKNOWN);
-
-private:
-    PLT_MimeType() {}
-
-};
-
-#endif /* _PLT_MIMETYPE_H_ */
diff --git a/extra_lib/include/platinum/PltProtocolInfo.h b/extra_lib/include/platinum/PltProtocolInfo.h
deleted file mode 100644
index d86ef0c..0000000
--- a/extra_lib/include/platinum/PltProtocolInfo.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - AV Media Protocol Info
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-| 
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-/** @file
- UPnP AV Media Object Protocol Info.
- */
-
-#ifndef _PLT_PROTOCOL_INFO_H_
-#define _PLT_PROTOCOL_INFO_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-#include "PltHttp.h"
-
-/*----------------------------------------------------------------------
-|   forward declarations
-+---------------------------------------------------------------------*/
-class PLT_HttpRequestContext;
-
-/*----------------------------------------------------------------------
-|   typedefs
-+---------------------------------------------------------------------*/
-typedef struct PLT_HttpFileRequestHandler_DefaultDlnaExtMapEntry {
-    const char* mime_type;
-    const char* dlna_ext;
-} PLT_HttpFileRequestHandler_DefaultDlnaExtMapEntry ;
-
-/*----------------------------------------------------------------------
-|   PLT_ProtocolInfo
-+---------------------------------------------------------------------*/
-/**
- The PLT_ProtocolInfo class holds information about the protocol info of a 
- given UPnP Media Item resource.
- */
-class PLT_ProtocolInfo
-{
-public:
-    class FieldEntry {
-    public:
-        FieldEntry(const char* key, const char* value) :
-            m_Key(key), m_Value(value) {}
-        NPT_String m_Key;
-        NPT_String m_Value;
-    };
-
-    // class methods
-    static NPT_String  GetMimeTypeFromProtocolInfo(const char* protocol_info);
-    
-    static const char* GetDlnaExtension(const char* mime_type, 
-                                        const PLT_HttpRequestContext* context = NULL);
-    static const char* GetDlnaExtension(const char* mime_type, 
-                                        PLT_DeviceSignature signature = PLT_DEVICE_UNKNOWN);
-    
-    static PLT_ProtocolInfo GetProtocolInfo(const char* filename, 
-                                            bool with_dlna_extension = true, 
-                                            const PLT_HttpRequestContext* context = NULL);
-    static PLT_ProtocolInfo GetProtocolInfo(const char* filename, 
-                                            bool with_dlna_extension = true, 
-                                            PLT_DeviceSignature signature = PLT_DEVICE_UNKNOWN);
-    
-    static PLT_ProtocolInfo GetProtocolInfoFromMimeType(const char* mime_type, 
-                                                        bool with_dlna_extension = true, 
-                                                        const PLT_HttpRequestContext* context = NULL);
-    static PLT_ProtocolInfo GetProtocolInfoFromMimeType(const char* mime_type, 
-                                                        bool with_dlna_extension = true, 
-                                                        PLT_DeviceSignature signature = PLT_DEVICE_UNKNOWN);
-
-    // methods
-    PLT_ProtocolInfo();
-    //PLT_ProtocolInfo(NPT_String protocol_info);
-    PLT_ProtocolInfo(const char* protocol_info);
-    PLT_ProtocolInfo(const char* protocol,
-                     const char* mask,
-                     const char* content_type,
-                     const char* extra);
-    const NPT_String& GetProtocol()     const { return m_Protocol;  }
-    const NPT_String& GetMask()         const { return m_Mask; }
-    const NPT_String& GetContentType()  const { return m_ContentType;  }
-    const NPT_String& GetExtra()        const { return m_Extra; }
-    
-    const NPT_String& GetDLNA_PN()      const { return m_DLNA_PN; }
-
-    bool IsValid() { return m_Valid; }
-
-    NPT_String ToString() const;
-
-    bool Match(const PLT_ProtocolInfo& other) const;
-
-private:
-	typedef enum {
-		PLT_PROTINFO_PARSER_STATE_START,
-		PLT_PROTINFO_PARSER_STATE_PN,
-		PLT_PROTINFO_PARSER_STATE_OP,
-		PLT_PROTINFO_PARSER_STATE_PS,
-		PLT_PROTINFO_PARSER_STATE_CI,
-		PLT_PROTINFO_PARSER_STATE_FLAGS,
-		PLT_PROTINFO_PARSER_STATE_MAXSP,
-		PLT_PROTINFO_PARSER_STATE_OTHER
-	} PLT_ProtocolInfoParserState;
-
-    NPT_Result SetProtocolInfo(const char* protocol_info);
-    NPT_Result ValidateField(const char*  val, 
-                        const char*  valid_chars, 
-                        NPT_Cardinal num_chars = 0); // 0 means variable number of chars
-    NPT_Result ParseExtra(NPT_List<FieldEntry>& entries);
-    NPT_Result ValidateExtra();
-
-private:
-    NPT_String           m_Protocol;
-    NPT_String           m_Mask;
-    NPT_String           m_ContentType;
-    NPT_String           m_Extra;
-    
-    NPT_String           m_DLNA_PN;    // DLNA.ORG_PN Parameter (pn-param)
-    NPT_String           m_DLNA_OP;    // Operations Parameter (op-param)
-    NPT_String           m_DLNA_PS;    // Server-Side PlaySpeeds Parameter (ps-param)
-    NPT_String           m_DLNA_CI;    // Conversion Indicator Flag (ci-param)
-    NPT_String           m_DLNA_FLAGS; // Flags Parameter (flags-param)
-    NPT_String           m_DLNA_MAXSP; // Maximum RTSP Speed Header value (maxsp-param)
-    NPT_List<FieldEntry> m_DLNA_OTHER; // Vendor-defined 4th field Parameters (other-param)
-    
-    bool                 m_Valid;
-};
-
-#endif /* _PLT_PROTOCOL_INFO_H_ */
diff --git a/extra_lib/include/platinum/PltRingBufferStream.h b/extra_lib/include/platinum/PltRingBufferStream.h
deleted file mode 100644
index d8ecd11..0000000
--- a/extra_lib/include/platinum/PltRingBufferStream.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - Ring buffer stream
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-#ifndef _PLT_RING_BUFFER_STREAM_H_
-#define _PLT_RING_BUFFER_STREAM_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptStreams.h"
-#include "NptRingBuffer.h"
-#include "NptThreads.h"
-
-/*----------------------------------------------------------------------
-|   PLT_RingBufferStream class
-+---------------------------------------------------------------------*/
-class PLT_RingBufferStream : public NPT_DelegatingInputStream,   
-                             public NPT_DelegatingOutputStream
-{
-public:
-    PLT_RingBufferStream(NPT_Size buffer_size = 4096, bool blocking = true);
-    PLT_RingBufferStream(NPT_RingBufferReference& buffer, bool blocking = true);
-    virtual ~PLT_RingBufferStream();
-    
-    // methods
-    bool IsAborted() { return m_Aborted; }
-    
-    // NPT_InputStream methods
-    NPT_Result Read(void*     buffer, 
-                    NPT_Size  bytes_to_read, 
-                    NPT_Size* bytes_read = NULL);
-    NPT_Result GetSize(NPT_LargeSize& size)  {
-        NPT_COMPILER_UNUSED(size);
-        return NPT_ERROR_NOT_SUPPORTED;
-    }
-    NPT_Result GetSpace(NPT_LargeSize& space) { 
-        NPT_AutoLock autoLock(m_Lock);
-        space = m_RingBuffer->GetSpace();
-        return NPT_SUCCESS;
-    }
-    NPT_Result GetAvailable(NPT_LargeSize& available) { 
-        NPT_AutoLock autoLock(m_Lock);
-        available = m_RingBuffer->GetAvailable();
-        return NPT_SUCCESS;
-    }
-
-    // NPT_OutputStream methods
-    NPT_Result Write(const void* buffer, 
-                     NPT_Size    bytes_to_write, 
-                     NPT_Size*   bytes_written = NULL);
-    NPT_Result Flush();
-    NPT_Result SetEOS();
-    NPT_Result Abort();
-
-protected:
-    // NPT_DelegatingInputStream methods
-    NPT_Result InputSeek(NPT_Position offset) {
-        NPT_COMPILER_UNUSED(offset);
-        return NPT_ERROR_NOT_SUPPORTED;
-    }
-    NPT_Result InputTell(NPT_Position& offset) { 
-        NPT_AutoLock autoLock(m_Lock);
-        offset = m_TotalBytesRead; 
-        return NPT_SUCCESS;
-    }
-
-    // NPT_DelegatingOutputStream methods
-    NPT_Result OutputSeek(NPT_Position offset) {
-        NPT_COMPILER_UNUSED(offset);
-        return NPT_ERROR_NOT_SUPPORTED;
-    }
-    NPT_Result OutputTell(NPT_Position& offset) {
-        NPT_AutoLock autoLock(m_Lock);
-        offset = m_TotalBytesWritten; 
-        return NPT_SUCCESS;
-    }
-
-private:
-    NPT_RingBufferReference m_RingBuffer;
-    NPT_Offset              m_TotalBytesRead;
-    NPT_Offset              m_TotalBytesWritten;
-    NPT_Mutex               m_Lock;
-    bool                    m_Blocking;
-    bool                    m_Eos;
-    bool                    m_Aborted;
-};
-
-typedef NPT_Reference<PLT_RingBufferStream> PLT_RingBufferStreamReference;
-
-#endif // _PLT_RING_BUFFER_STREAM_H_ 
diff --git a/extra_lib/include/platinum/PltService.h b/extra_lib/include/platinum/PltService.h
deleted file mode 100644
index 343d53c..0000000
--- a/extra_lib/include/platinum/PltService.h
+++ /dev/null
@@ -1,521 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - Service
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-/** @file
- UPnP Service
- */
-
-#ifndef _PLT_SERVICE_H_
-#define _PLT_SERVICE_H_
-
-/*----------------------------------------------------------------------
-|    includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-#include "PltEvent.h"
-#include "PltArgument.h"
-#include "PltStateVariable.h"
-#include "PltAction.h"
-
-/*----------------------------------------------------------------------
-|    forward declarations
-+---------------------------------------------------------------------*/
-class PLT_DeviceData;
-
-/*----------------------------------------------------------------------
-|    PLT_Service class
-+---------------------------------------------------------------------*/
-/**
- UPnP Service.
- The PLT_Service class holds information about a UPnP service of a given device.
- It maintains a list of actions and state variables. A PLT_DeviceData instance can own 
- one or more PLT_Service instances. When a PLT_Service is advertised as part of a
- a UPnP Device (PLT_DeviceHost), it also maintains a list of subscribers to nofify when
- state variables change.
- */
-class PLT_Service
-{
-public:
-    // methods
-    /**
-     Create an instance of a UPnP Service either hosted or discovered.
-     @param device Pointer to the PLT_DeviceData the service is associated to
-     @param type String representing the UPnP service type
-     @param id String representing the UPnP service id
-     @param name A String to create unique service SCPD, control and eventing urls
-     @param last_change_namespace A String for the LastChange state variable namespace if any
-     */
-    PLT_Service(PLT_DeviceData* device,
-                const char*     type, 
-                const char*     id,
-                const char*     name,
-                const char*     last_change_namespace = NULL);
-    virtual ~PLT_Service();
-    
-    // methods
-    /**
-     When service is hosted by a PLT_DeviceHost, this setups the SCPD, control and event urls.
-     @param service_name the service name used to format unique urls
-     */
-    NPT_Result InitURLs(const char* service_name);
-    
-    /**
-     Verify the service has been properly initialized or is a valid discovered service.
-     @return true if valid.
-     */
-    bool IsValid() {  return (m_ActionDescs.GetItemCount() > 0); }
-    
-    /**
-     When a PLT_DeviceHost needs to change more than one state variables at a time
-     but would rather send only one event with all state variable changes, this can be 
-     used to pause and resume the automatic eventing.
-     @param pause Flag to indicate if eventing should be paused or resumed 
-     */
-    NPT_Result PauseEventing(bool pause = true);
-
-    // class methods
-    static bool IsTrue(const NPT_String& value) {
-        if (value.Compare("1", true)    && 
-            value.Compare("true", true) && 
-            value.Compare("yes", true)) {
-            return false;
-        }
-        return true;
-    }
-
-    // accessor methods
-    /**
-     Set the SCPD url for control points to be able to fetch the SCPD xml document.
-     @param url relative path of SCPD url
-     */
-    NPT_Result SetSCPDURL(const char* url)     { m_SCPDURL = url; return NPT_SUCCESS; }
-    
-    /*
-     Set the Service Control url for control points to be able to invoke actions.
-     @param url relative path of control url
-     */
-    NPT_Result SetControlURL(const char* url)  { m_ControlURL = url; return NPT_SUCCESS; };
-    
-    /**
-     Set the Service Event subscription url for control points to be able to subscribe
-     to events.
-     @param url relative path of even url
-     */
-    NPT_Result SetEventSubURL(const char* url) { m_EventSubURL = url; return NPT_SUCCESS; };
-    
-    /**
-     Return the SCPD url associated with this service.
-     @param absolute flag to indicate if absolute url including ip and port should
-     be returned
-     @return SCPD url
-     */
-    NPT_String GetSCPDURL(bool absolute = false);
-    
-    /**
-     Return the Control url associated with this service.
-     @param absolute flag to indicate if absolute url including ip and port should
-     be returned
-     @return Control url
-     */
-    NPT_String GetControlURL(bool absolute = false);
-    
-    /**
-     Return the Event subscription url associated with this service.
-     @param absolute flag to indicate if absolute url including ip and port should
-     be returned
-     @return Event url
-     */
-    NPT_String GetEventSubURL(bool absolute = false);
-    
-    /**
-     Return the service id.
-     @return service id
-     */
-    const NPT_String& GetServiceID() const { return m_ServiceID;   }
-    
-    /**
-     Return the service type.
-     @return service type
-     */
-    const NPT_String& GetServiceType() const { return m_ServiceType; }
-
-    /**
-     Return the service friendly name.
-     @return service name
-     */
-    const NPT_String& GetServiceName() const { return m_ServiceName; } 
-
-    /**
-     Return the PLT_DeviceData* the service is associated with.
-     @return PLT_DeviceData pointer
-     */
-    PLT_DeviceData* GetDevice() { return m_Device;      }
-    
-    /**
-     When a control point discover a new service with a higher version number
-     than it can work with, a lower version can be set to force backward 
-     compatibility.
-     @param version Integer specifying the version to use
-     */
-    NPT_Result ForceVersion(NPT_Cardinal version);
-
-    /**
-     Return the service SCPD xml document.
-     @param xml String to receive document
-     */
-    NPT_Result GetSCPDXML(NPT_String& xml);
-    
-    /**
-     Set the service SCPD xml document.
-     @param xml String SCPD xml document
-     */
-    NPT_Result SetSCPDXML(const char* xml);
-    
-    /**
-     Populate the UPnP Device description document with service information.
-     @param parent XML Element where to insert the service XML Element
-     @param service Pointer to service XML Element node newly created so it can be
-     extended with additional non standard information.
-     */
-    NPT_Result GetDescription(NPT_XmlElementNode* parent, NPT_XmlElementNode** service = NULL);
-
-    /**
-     Set a new value for a given state variable. The service keeps track of which
-     state variables have changed and events are being triggered by a PLT_ServiceEventTask
-     when necessary.
-     @param name state variable name
-     @param value new State Variable value.
-     */
-    NPT_Result SetStateVariable(const char* name, const char* value);
-    
-    /**
-     Certain state variables notifications must not be sent faster than a certain 
-     rate according to the UPnP specs. This sets the rate for a given state variable.
-     @param name state variable name
-     @param rate a time interval specifying the minimum interval allowed between
-     notifications.
-     */
-    NPT_Result SetStateVariableRate(const char* name, NPT_TimeInterval rate);
-    
-    /**
-     Certain state variables require extra xml attributes when serialized.
-     @param name state variable name
-     @param key the attribute name
-     @param value the attribute value
-     */
-	NPT_Result SetStateVariableExtraAttribute(const char* name, const char* key, const char* value);
-    
-    /**
-     Helper function to increment a state variable representing a number.
-     @param name state variable name
-     */
-    NPT_Result IncStateVariable(const char* name);
-    
-    /**
-     Return the PLT_StateVariable pointer given a state variable name.
-     @param name state variable name
-     @return PLT_StateVariable pointer
-     */
-    PLT_StateVariable* FindStateVariable(const char* name);
-    
-    /**
-     Return the state variable value given a state variable name.
-     @param name state variable name
-     @param value state variable value output
-     */
-    NPT_Result GetStateVariableValue(const char* name, NPT_String& value);
-    
-    /**
-     Return whether a service is capable of sending events.
-     @return true if sending events
-     */
-    bool IsSubscribable();
-    
-    /**
-     Return the list of state variables.
-     @return list of state variable pointers.
-     */
-    const NPT_List<PLT_StateVariable*>& GetStateVariables() const { return m_StateVars; }
-
-    /**
-     Return the PLT_ActionDesc given an action name
-     @param name action name
-     @return PLT_ActioDesc pointer
-     */
-    PLT_ActionDesc* FindActionDesc(const char* name);
-    
-    /**
-     Return an array of actions descriptions PLT_ActionDesc.
-     @return array of PLT_ActionDesc pointers.
-     */
-    const NPT_Array<PLT_ActionDesc*>& GetActionDescs() const { return m_ActionDescs; }
-
-private:    
-    /**
-     A task to send events.
-     The PLT_ServiceEventTask is started when receiving a first subscription. It
-     monitors if some state variables have changed and sends events to all
-     subscribers if so.
-     */
-    class PLT_ServiceEventTask : public PLT_ThreadTask {
-    public:
-        PLT_ServiceEventTask(PLT_Service* service) : m_Service(service) {}
-        
-        void DoRun() { 
-            while (!IsAborting(100)) m_Service->NotifyChanged();
-        }
-        
-    private:
-        PLT_Service* m_Service;
-    };
-    
-    // methods
-    void Cleanup();
-    
-    /**
-     Called by a PLT_StateVariable to keep track of what events need to be 
-     sent by the PLT_ServiceEventTask task.
-     @param var PLT_StateVariable pointer
-     */
-    NPT_Result AddChanged(PLT_StateVariable* var);
-    
-    /**
-     Certain UPnP services combine state variable changes into one single
-     state variable called "LastChange". This function updates the LastChange
-     state variable by looking through the list passed for state variables that
-     are not individually evented.
-     */
-    NPT_Result UpdateLastChange(NPT_List<PLT_StateVariable*>& vars);
-    
-    /**
-     Send state variable change events to all subscribers.
-     */
-    NPT_Result NotifyChanged();
-
-    // Events
-    /**
-     Called by PLT_DeviceHost when it receives a request for a new subscription.
-     */
-    NPT_Result ProcessNewSubscription(
-        PLT_TaskManager*         task_manager,
-        const NPT_SocketAddress& addr, 
-        const NPT_String&        callback_urls, 
-        int                      timeout, 
-        NPT_HttpResponse&        response);
-    
-    /**
-     Called by PLT_DeviceHost when it receives a request renewing an existing
-     subscription.
-     */
-    NPT_Result ProcessRenewSubscription(
-        const NPT_SocketAddress& addr, 
-        const NPT_String&        sid, 
-        int                      timeout,
-        NPT_HttpResponse&        response);
-    
-    /**
-     Called by PLT_DeviceHost when it receives a request to cancel an existing
-     subscription.
-     */
-    NPT_Result ProcessCancelSubscription(
-        const NPT_SocketAddress& addr, 
-        const NPT_String&        sid, 
-        NPT_HttpResponse&        response);
-
-
-protected:
-    // friends that need to call private functions
-    friend class PLT_StateVariable; // AddChanged
-    friend class PLT_DeviceHost;    // ProcessXXSubscription
-    
-    //members
-    PLT_DeviceData*                         m_Device;
-    NPT_String                              m_ServiceType;
-    NPT_String                              m_ServiceID;
-	NPT_String                              m_ServiceName;
-    NPT_String                              m_SCPDURL;
-    NPT_String                              m_ControlURL;
-    NPT_String                              m_EventSubURL;
-    PLT_ServiceEventTask*                   m_EventTask;
-    NPT_Array<PLT_ActionDesc*>              m_ActionDescs;
-    NPT_List<PLT_StateVariable*>            m_StateVars;
-    NPT_Mutex                               m_Lock;
-    NPT_List<PLT_StateVariable*>            m_StateVarsChanged;
-    NPT_List<PLT_StateVariable*>            m_StateVarsToPublish;
-    NPT_List<PLT_EventSubscriberReference>  m_Subscribers;
-    bool                                    m_EventingPaused;
-    NPT_String                              m_LastChangeNamespace;
-};
-
-/*----------------------------------------------------------------------
-|    PLT_ServiceSCPDURLFinder
-+---------------------------------------------------------------------*/
-/** 
- The PLT_ServiceSCPDURLFinder class returns an instance of a PLT_Service given a 
- service SCPD url.
- */
-class PLT_ServiceSCPDURLFinder
-{
-public:
-    // methods
-    PLT_ServiceSCPDURLFinder(const char* url) : m_URL(url) {}
-    virtual ~PLT_ServiceSCPDURLFinder() {}
-    bool operator()(PLT_Service* const & service) const;
-
-private:
-    // members
-    NPT_String m_URL;
-};
-
-/*----------------------------------------------------------------------
-|    PLT_ServiceControlURLFinder
-+---------------------------------------------------------------------*/
-/** 
- The PLT_ServiceControlURLFinder class returns an instance of a PLT_Service 
- given a service control url.
- */
-class PLT_ServiceControlURLFinder
-{
-public:
-    // methods
-    PLT_ServiceControlURLFinder(const char* url) : m_URL(url) {}
-    virtual ~PLT_ServiceControlURLFinder() {}
-    bool operator()(PLT_Service* const & service) const;
-
-private:
-    // members
-    NPT_String m_URL;
-};
-
-/*----------------------------------------------------------------------
-|    PLT_ServiceEventSubURLFinder
-+---------------------------------------------------------------------*/
-/** 
- The PLT_ServiceEventSubURLFinder class returns an instance of a PLT_Service 
- given a service event subscription url.
- */
-class PLT_ServiceEventSubURLFinder
-{
-public:
-    // methods
-    PLT_ServiceEventSubURLFinder(const char* url) : m_URL(url) {}
-    virtual ~PLT_ServiceEventSubURLFinder() {}
-    bool operator()(PLT_Service* const & service) const;
-
-private:
-    // members
-    NPT_String m_URL;
-};
-
-/*----------------------------------------------------------------------
-|    PLT_ServiceIDFinder
-+---------------------------------------------------------------------*/
-/** 
- The PLT_ServiceIDFinder class returns an instance of a PLT_Service given a 
- service id.
- */
-class PLT_ServiceIDFinder
-{
-public:
-    // methods
-    PLT_ServiceIDFinder(const char* id) : m_Id(id) {}
-    virtual ~PLT_ServiceIDFinder() {}
-    bool operator()(PLT_Service* const & service) const;
-
-private:
-    // members
-    NPT_String m_Id;
-};
-
-/*----------------------------------------------------------------------
-|    PLT_ServiceTypeFinder
-+---------------------------------------------------------------------*/
-/** 
- The PLT_ServiceTypeFinder class returns an instance of a PLT_Service given a 
- service type.
- */
-class PLT_ServiceTypeFinder
-{
-public:
-    // methods
-    PLT_ServiceTypeFinder(const char* type) : m_Type(type) {}
-    virtual ~PLT_ServiceTypeFinder() {}
-    bool operator()(PLT_Service* const & service) const;
-
-private:
-    // members
-    NPT_String m_Type;
-};
-
-/*----------------------------------------------------------------------
-|    PLT_ServiceNameFinder
-+---------------------------------------------------------------------*/
-/** 
- The PLT_ServiceNameFinder class returns an instance of a PLT_Service given a 
- service name.
- */
-class PLT_ServiceNameFinder
-{
-public:
-    // methods
-    PLT_ServiceNameFinder(const char* name) : m_Name(name) {}
-    virtual ~PLT_ServiceNameFinder() {}
-    bool operator()(PLT_Service* const & service) const;
-
-private:
-    // members
-    NPT_String m_Name;
-};
-
-/*----------------------------------------------------------------------
-|    PLT_LastChangeXMLIterator
-+---------------------------------------------------------------------*/
-/**
- The PLT_LastChangeXMLIterator class is used to serialize the LastChange variable
- changes into xml given a list of state variables.
- */
-class PLT_LastChangeXMLIterator
-{
-public:
-    // methods
-    PLT_LastChangeXMLIterator(NPT_XmlElementNode* node) : m_Node(node) {}
-    virtual ~PLT_LastChangeXMLIterator() {}
-
-    NPT_Result operator()(PLT_StateVariable* const & var) const;
-
-private:
-    NPT_XmlElementNode* m_Node;
-};
-
-#endif /* _PLT_SERVICE_H_ */
diff --git a/extra_lib/include/platinum/PltSsdp.h b/extra_lib/include/platinum/PltSsdp.h
deleted file mode 100644
index 4a258dc..0000000
--- a/extra_lib/include/platinum/PltSsdp.h
+++ /dev/null
@@ -1,379 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - SSDP
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-/** @file
- UPnP SSDP
- */
-
-#ifndef _PLT_SSDP_H_
-#define _PLT_SSDP_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-#include "PltThreadTask.h"
-#include "PltHttpServerTask.h"
-
-/*----------------------------------------------------------------------
-|   forward declarations
-+---------------------------------------------------------------------*/
-class PLT_DeviceHost;
-
-/*----------------------------------------------------------------------
-|   PLT_SsdpPacketListener class
-+---------------------------------------------------------------------*/
-/**
- The PLT_SsdpPacketListener class is an interface for handling SSDP packets
- (M-SEARCH and NOTIFY).
- */
-class PLT_SsdpPacketListener
-{
-public:
-    virtual ~PLT_SsdpPacketListener() {}
-    virtual NPT_Result OnSsdpPacket(const NPT_HttpRequest&        request, 
-                                    const NPT_HttpRequestContext& context) = 0;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_SsdpSearchResponseListener class
-+---------------------------------------------------------------------*/
-/**
- The PLT_SsdpSearchResponseListener class is an interface for handling SSDP M-SEARCH 
- responses.
- */
-class PLT_SsdpSearchResponseListener
-{
-public:
-    virtual ~PLT_SsdpSearchResponseListener() {}
-    virtual NPT_Result ProcessSsdpSearchResponse(NPT_Result                    res,  
-                                                 const NPT_HttpRequestContext& context,
-                                                 NPT_HttpResponse*             response) = 0;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_SsdpSender class
-+---------------------------------------------------------------------*/
-/**
- The PLT_SsdpSender class provides a mechanism to format and send SSDP packets.
- */
-class PLT_SsdpSender
-{
-public:
-    static NPT_Result SendSsdp(NPT_HttpRequest&   request, 
-                               const char*        usn,
-                               const char*        nt,
-                               NPT_UdpSocket&     socket,
-                               bool               notify,
-                               const NPT_SocketAddress* addr = NULL);
-     
-    static NPT_Result SendSsdp(NPT_HttpResponse&  response,
-                               const char*        usn,
-                               const char*        nt,
-                               NPT_UdpSocket&     socket,
-                               bool               notify, 
-                               const NPT_SocketAddress* addr = NULL);
-
-private:
-    static NPT_Result FormatPacket(NPT_HttpMessage&   message,
-                                   const char*        usn,
-                                   const char*        nt,
-                                   NPT_UdpSocket&     socket,
-                                   bool               notify);
-};
-
-/*----------------------------------------------------------------------
-|   PLT_SsdpDeviceSearchResponseInterfaceIterator class
-+---------------------------------------------------------------------*/
-/**
- The PLT_SsdpDeviceSearchResponseInterfaceIterator class looks for the best network
- interface to use then sends a SSDP M-SEARCH response.
- */
-class PLT_SsdpDeviceSearchResponseInterfaceIterator
-{
-public:
-    PLT_SsdpDeviceSearchResponseInterfaceIterator(PLT_DeviceHost*   device, 
-                                                  NPT_SocketAddress remote_addr,
-                                                  const char*       st) :
-        m_Device(device), m_RemoteAddr(remote_addr), m_ST(st)  {}
-    virtual ~PLT_SsdpDeviceSearchResponseInterfaceIterator() {}
-      
-    NPT_Result operator()(NPT_NetworkInterface*& if_addr) const;
-
-private:
-    PLT_DeviceHost*   m_Device;
-    NPT_SocketAddress m_RemoteAddr;
-    NPT_String        m_ST;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_SsdpDeviceSearchResponseTask class
-+---------------------------------------------------------------------*/
-/**
- The PLT_SsdpDeviceSearchResponseTask class is used by a PLT_DeviceHost to respond
- to SSDP M-SEARCH requests from UPnP ControlPoints.
- */
-class PLT_SsdpDeviceSearchResponseTask : public PLT_ThreadTask
-{
-public:
-    PLT_SsdpDeviceSearchResponseTask(PLT_DeviceHost*   device, 
-                                     NPT_SocketAddress remote_addr,
-                                     const char*       st) : 
-        m_Device(device), m_RemoteAddr(remote_addr), m_ST(st) {}
-
-protected:
-    virtual ~PLT_SsdpDeviceSearchResponseTask() {}
-
-    // PLT_ThreadTask methods
-    virtual void DoRun();
-    
-protected:
-    PLT_DeviceHost*     m_Device;
-    NPT_SocketAddress   m_RemoteAddr;
-    NPT_String          m_ST;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_SsdpAnnounceInterfaceIterator class
-+---------------------------------------------------------------------*/
-/**
- The PLT_SsdpAnnounceInterfaceIterator class is used to send SSDP announcements 
- given a list of network interaces. 
- */
-class PLT_SsdpAnnounceInterfaceIterator
-{
-public:
-    PLT_SsdpAnnounceInterfaceIterator(PLT_DeviceHost* device, bool is_byebye = false, bool broadcast = false) :
-        m_Device(device), m_IsByeBye(is_byebye), m_Broadcast(broadcast) {}
-      
-    NPT_Result operator()(NPT_NetworkInterface*& if_addr) const;
-    
-private:
-    PLT_DeviceHost* m_Device;
-    bool            m_IsByeBye;
-    bool            m_Broadcast;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_SsdpInitMulticastIterator class
-+---------------------------------------------------------------------*/
-/** 
- The PLT_SsdpInitMulticastIterator class is used to join a multicast group 
- given a list of IP addresses.
- */
-class PLT_SsdpInitMulticastIterator
-{
-public:
-    PLT_SsdpInitMulticastIterator(NPT_UdpMulticastSocket* socket) :
-        m_Socket(socket) {}
-
-    NPT_Result operator()(NPT_IpAddress& if_addr) const {
-        NPT_IpAddress addr;
-        addr.ResolveName("239.255.255.250");
-        // OSX bug, since we're reusing the socket, we need to leave group first
-        // before joining it
-        m_Socket->LeaveGroup(addr, if_addr);
-        return m_Socket->JoinGroup(addr, if_addr);
-    }
-
-private:
-    NPT_UdpMulticastSocket* m_Socket;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_SsdpDeviceAnnounceTask class
-+---------------------------------------------------------------------*/
-/**
- The PLT_SsdpDeviceAnnounceTask class is a task to send UPnP Device SSDP announcements
- (alive or byebye). It can be setup to automatically repeat after an interval.
- */
-class PLT_SsdpDeviceAnnounceTask : public PLT_ThreadTask
-{
-public:
-    PLT_SsdpDeviceAnnounceTask(PLT_DeviceHost*  device, 
-                               NPT_TimeInterval repeat,
-                               bool             is_byebye_first = false,
-                               bool             extra_broadcast = false) : 
-        m_Device(device), 
-        m_Repeat(repeat), m_IsByeByeFirst(is_byebye_first), 
-        m_ExtraBroadcast(extra_broadcast) {}
-
-protected:
-    virtual ~PLT_SsdpDeviceAnnounceTask() {}
-
-    // PLT_ThreadTask methods
-    virtual void DoRun();
-
-protected:
-    PLT_DeviceHost*             m_Device;
-    NPT_TimeInterval            m_Repeat;
-    bool                        m_IsByeByeFirst;
-    bool                        m_ExtraBroadcast;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_NetworkInterfaceAddressSearchIterator class
-+---------------------------------------------------------------------*/
-/**
- The PLT_NetworkInterfaceAddressSearchIterator class returns the network interface
- given an IP address.
- */
-class PLT_NetworkInterfaceAddressSearchIterator
-{
-public:
-    PLT_NetworkInterfaceAddressSearchIterator(NPT_String ip) : m_Ip(ip)  {}
-    virtual ~PLT_NetworkInterfaceAddressSearchIterator() {}
-
-    NPT_Result operator()(NPT_NetworkInterface*& addr) const {
-        NPT_List<NPT_NetworkInterfaceAddress>::Iterator niaddr = addr->GetAddresses().GetFirstItem();
-        if (!niaddr) return NPT_FAILURE;
-
-        return (m_Ip.Compare((*niaddr).GetPrimaryAddress().ToString(), true) == 0) ? NPT_SUCCESS : NPT_FAILURE;
-    }
-
-private:
-    NPT_String m_Ip;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_SsdpPacketListenerIterator class
-+---------------------------------------------------------------------*/
-/**
- The PLT_SsdpPacketListenerIterator class iterates through a list of 
- PLT_SsdpPacketListener instances to notify of a new SSDP incoming packet.
- */
-class PLT_SsdpPacketListenerIterator
-{
-public:
-    PLT_SsdpPacketListenerIterator(NPT_HttpRequest&              request, 
-                                   const NPT_HttpRequestContext& context) :
-      m_Request(request), m_Context(context) {}
-
-    NPT_Result operator()(PLT_SsdpPacketListener*& listener) const {
-        return listener->OnSsdpPacket(m_Request, m_Context);
-    }
-
-private:
-    NPT_HttpRequest&              m_Request;
-    const NPT_HttpRequestContext& m_Context;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_SsdpListenTask class
-+---------------------------------------------------------------------*/
-/**
- The PLT_SsdpListenTask class is used to listen for incoming SSDP packets and 
- keep track of a list of PLT_SsdpPacketListener listeners to notify when a new 
- SSDP packet has arrived.
- */
-class PLT_SsdpListenTask : public PLT_HttpServerSocketTask
-{
-public:
-    PLT_SsdpListenTask(NPT_Socket* socket) : 
-        PLT_HttpServerSocketTask(socket, true) {
-        // Change read time out for UDP because iPhone 3.0 seems to hang
-        // after reading everything from the socket even though
-        // more stuff arrived
-#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
-        m_Socket->SetReadTimeout(10000);
-#endif
-    }
-
-    NPT_Result AddListener(PLT_SsdpPacketListener* listener) {
-        NPT_AutoLock lock(m_Mutex);
-        m_Listeners.Add(listener);
-        return NPT_SUCCESS;
-    }
-
-    NPT_Result RemoveListener(PLT_SsdpPacketListener* listener) {
-        NPT_AutoLock lock(m_Mutex);
-        m_Listeners.Remove(listener);
-        return NPT_SUCCESS;
-    }
-    
-    // PLT_Task methods
-    void DoAbort();
-
-protected:
-    virtual ~PLT_SsdpListenTask() {}
-
-    // PLT_HttpServerSocketTask methods
-    NPT_Result GetInputStream(NPT_InputStreamReference& stream);
-    NPT_Result GetInfo(NPT_SocketInfo& info);
-    NPT_Result SetupResponse(NPT_HttpRequest&              request, 
-                             const NPT_HttpRequestContext& context,
-                             NPT_HttpResponse&             response);
-
-protected:
-    PLT_InputDatagramStreamReference  m_Datagram;
-    NPT_List<PLT_SsdpPacketListener*> m_Listeners;
-    NPT_Mutex                         m_Mutex;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_SsdpSearchTask class
-+---------------------------------------------------------------------*/
-/**
- The PLT_SsdpSearchTask class is a task used by a PLT_CtrlPoint to issue a SSDP
- M-SEARCH request. It can be set to repeat at a certain frequencey.
- */
-class PLT_SsdpSearchTask : public PLT_ThreadTask
-{
-public:
-    PLT_SsdpSearchTask(NPT_UdpSocket*                  socket,
-                       PLT_SsdpSearchResponseListener* listener, 
-                       NPT_HttpRequest*                request,
-                       NPT_TimeInterval                frequency = NPT_TimeInterval(0.)); // pass 0 for one time
-
-protected:
-    virtual ~PLT_SsdpSearchTask();
-
-    // PLT_ThreadTask methods
-    virtual void DoAbort();
-    virtual void DoRun();
-
-    virtual NPT_Result ProcessResponse(NPT_Result                    res, 
-                                       const NPT_HttpRequest&        request,  
-                                       const NPT_HttpRequestContext& context,
-                                       NPT_HttpResponse*             response);
-
-private:
-    PLT_SsdpSearchResponseListener* m_Listener;
-    NPT_HttpRequest*                m_Request;
-    NPT_TimeInterval                m_Frequency;
-    bool                            m_Repeat;
-    NPT_UdpSocket*                  m_Socket;
-};
-
-#endif /* _PLT_SSDP_H_ */
diff --git a/extra_lib/include/platinum/PltSsdpListener.h b/extra_lib/include/platinum/PltSsdpListener.h
deleted file mode 100644
index 00dda7c..0000000
--- a/extra_lib/include/platinum/PltSsdpListener.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - SSDP Listener
-|
-| Copyright (c) 2004-2008, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| 
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-#ifndef _PLT_SSDP_LISTENER_H_
-#define _PLT_SSDP_LISTENER_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-
-/*----------------------------------------------------------------------
-|   PLT_SsdpPacketListener class
-+---------------------------------------------------------------------*/
-class PLT_SsdpPacketListener
-{
-public:
-    virtual ~PLT_SsdpPacketListener() {}
-    virtual NPT_Result OnSsdpPacket(NPT_HttpRequest&              request, 
-                                    const NPT_HttpRequestContext& context) = 0;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_SsdpSearchResponseListener class
-+---------------------------------------------------------------------*/
-class PLT_SsdpSearchResponseListener
-{
-public:
-    virtual ~PLT_SsdpSearchResponseListener() {}
-    virtual NPT_Result ProcessSsdpSearchResponse(NPT_Result                    res,  
-                                                 const NPT_HttpRequestContext& context,
-                                                 NPT_HttpResponse*             response) = 0;
-};
-
-#endif /* _PLT_SSDP_LISTENER_H_ */
diff --git a/extra_lib/include/platinum/PltStateVariable.h b/extra_lib/include/platinum/PltStateVariable.h
deleted file mode 100644
index 46ec9e9..0000000
--- a/extra_lib/include/platinum/PltStateVariable.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - Service State Variable
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-/** @file
- UPnP State Variable
- */
-
-#ifndef _PLT_STATE_VARIABLE_H_
-#define _PLT_STATE_VARIABLE_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-
-/*----------------------------------------------------------------------
-|   forward declarations
-+---------------------------------------------------------------------*/
-class PLT_Argument;
-class PLT_Service;
-
-/*----------------------------------------------------------------------
-|   NPT_AllowedValueRange struct
-+---------------------------------------------------------------------*/
-/**
- The NPT_AllowedValueRange struct holds the min, max and step value allowed of
- a UPnP Service state variable.
- */
-typedef struct {
-    NPT_Int32 min_value;
-    NPT_Int32 max_value;
-    NPT_Int32 step;
-} NPT_AllowedValueRange;
-
-/*----------------------------------------------------------------------
-|   PLT_StateVariable class
-+---------------------------------------------------------------------*/
-/**
- The PLT_StateVariable class maintains the state of a UPnP Service state variable. 
- It is used by a PLT_DeviceHost instance to notify subscribers of a change or by a
- subscriber (PLT_CtrlPoint) when a service state variable change notification
- has been received.
- */
-class PLT_StateVariable
-{
-public:
-    PLT_StateVariable(PLT_Service* service);
-    ~PLT_StateVariable();
-
-    /**
-     Populate the SCPD xml document with state variable information.
-     @param node XML Element where to insert the state variable XML Element
-     */
-    NPT_Result GetSCPDXML(NPT_XmlElementNode* node);
-    
-    /**
-     Return the PLT_Service that this state variable is associated with.
-     @return PLT_Service pointer.
-     */
-    PLT_Service* GetService();
-    
-    /**
-     Return whether the state variable is eventable directly or indirectly. A state
-     variable sends events indirectly when part of the "LastChange" state variable.
-     @param indirectly Boolean to test if the state variable is sending events indirectly
-     @return Whether the state variable sends events according to the input flag specified.
-     */
-    bool IsSendingEvents(bool indirectly = false);
-    
-    /**
-     Force the state variable to send events directly.
-     */
-    void DisableIndirectEventing();
-    
-    /**
-     Certain state variables notifications must not be sent faster than a certain 
-     rate according to the UPnP specs. This sets the rate for a given state variable.
-     @param rate time interval to respect between notifications.
-     */
-    NPT_Result SetRate(NPT_TimeInterval rate);
-    
-    /**
-     Set the state variable value. The value is first validated to make sure
-     it is an allowed value. Once the value is validated, it is marked for eventing by
-     calling the PLT_Service AddChanged function.
-     @param value new state variable value. Can be a comma separated list of values.
-     */
-    NPT_Result SetValue(const char* value);
-    
-    /**
-     Validate the new value of the state variable.
-     @param value new state variable value. Can be a comma separated list of values.
-     */
-    NPT_Result ValidateValue(const char* value);
-    
-    /**
-     Certain state variables require extra xml attributes when serialized.
-     @param name the attribute name
-     @param value the attribute value
-     */
-	NPT_Result SetExtraAttribute(const char* name, const char* value);
-
-    /**
-     Return the state variable name.
-     @return state variable name.
-     */
-    const NPT_String& GetName()     const { return m_Name;     }
-    
-    /**
-     Return the current state variable value.
-     @return state variable current value.
-     */
-    const NPT_String& GetValue()    const { return m_Value;    }
-    
-    /**
-     Return the state variable data type.
-     @return state variable data type.
-     */
-    const NPT_String& GetDataType() const { return m_DataType; }
-    
-    /**
-     Return the state variable allowed value range if any.
-     @return state variable value range pointer or null if none.
-     */
-	const NPT_AllowedValueRange* GetAllowedValueRange() const { return m_AllowedValueRange; }
-
-    /**
-     Helper function to return a state variable given a list of state variables
-     and a state variable name.
-     @param vars list of state variables
-     @param name state variable name to look for
-     @return PLT_StateVariable pointer.
-     */
-    static PLT_StateVariable* Find(NPT_List<PLT_StateVariable*>& vars, 
-                                   const char*                   name);
-
-protected:
-    /**
-     Return whether the state variable value changed and subscribers need to
-     be notified.
-     */
-    bool IsReadyToPublish();
-    
-    /**
-     Serialize the state variable into xml.
-     */
-	NPT_Result Serialize(NPT_XmlElementNode& node);
-
-protected:
-    friend class PLT_Service;
-    friend class PLT_LastChangeXMLIterator;
-
-    //members
-    PLT_Service*            m_Service;
-    NPT_AllowedValueRange*  m_AllowedValueRange;
-    NPT_String              m_Name;
-    NPT_String              m_DataType;
-    NPT_String              m_DefaultValue;
-    bool                    m_IsSendingEvents;
-    bool                    m_IsSendingEventsIndirectly;
-    NPT_TimeInterval        m_Rate;
-    NPT_TimeStamp           m_LastEvent;
-    NPT_Array<NPT_String*>  m_AllowedValues;
-    NPT_String              m_Value;
-
-	NPT_Map<NPT_String,NPT_String> m_ExtraAttributes;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_StateVariableNameFinder
-+---------------------------------------------------------------------*/
-/**
- The PLT_StateVariableNameFinder class returns the PLT_StateVariable instance
- given a state variable name.
- */
-class PLT_StateVariableNameFinder 
-{
-public:
-    // methods
-    PLT_StateVariableNameFinder(const char* name) : m_Name(name) {}
-    virtual ~PLT_StateVariableNameFinder() {}
-
-    bool operator()(const PLT_StateVariable* const & state_variable) const {
-        return state_variable->GetName().Compare(m_Name, true) ? false : true;
-    }
-
-private:
-    // members
-    NPT_String   m_Name;
-};
-
-#endif /* _PLT_STATE_VARIABLE_H_ */
diff --git a/extra_lib/include/platinum/PltStreamPump.h b/extra_lib/include/platinum/PltStreamPump.h
deleted file mode 100644
index 58ef256..0000000
--- a/extra_lib/include/platinum/PltStreamPump.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - Stream Pump
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-#ifndef _PLT_STREAM_PUMP_H_
-#define _PLT_STREAM_PUMP_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptStreams.h"
-#include "NptRingBuffer.h"
-
-/*----------------------------------------------------------------------
-|   PLT_PipeInputStream
-+---------------------------------------------------------------------*/
-class PLT_PipeInputStream
-{
-public:
-    // constructor and destructor
-    virtual ~PLT_PipeInputStream() {};
-
-    // methods
-    virtual NPT_Result Receive(NPT_InputStream& stream, NPT_Size max_bytes_to_read, NPT_Size* bytes_read = 0) = 0;
-};
-
-typedef NPT_Reference<PLT_PipeInputStream> PLT_PipeInputStreamReference;
-
-/*----------------------------------------------------------------------
-|   PLT_PipeOutputStream
-+---------------------------------------------------------------------*/
-class PLT_PipeOutputStream
-{
-public:
-    // constructor and destructor
-    virtual ~PLT_PipeOutputStream() {};
-
-    // methods
-    virtual NPT_Result Transmit(NPT_OutputStream& stream) = 0;
-};
-
-typedef NPT_Reference<PLT_PipeOutputStream> PLT_PipeOutputStreamReference;
-
-/*----------------------------------------------------------------------
-|   PLT_StreamPump class
-+---------------------------------------------------------------------*/
-class PLT_StreamPump
-{
-public:
-    virtual ~PLT_StreamPump();
-
-protected:
-    // methods
-    PLT_StreamPump(NPT_Size size = 65535);
-    NPT_Result PullData(NPT_InputStream& input, NPT_Size max_bytes_to_read);
-    NPT_Result PushData(NPT_OutputStream& output, NPT_Size& bytes_written);
-
-    // members
-    NPT_RingBuffer*     m_RingBuffer;
-    NPT_Offset          m_TotalBytesRead;
-    NPT_Offset          m_TotalBytesWritten;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_PipeInputStreamPump class
-+---------------------------------------------------------------------*/
-class PLT_PipeInputStreamPump : public PLT_StreamPump,
-                                public PLT_PipeInputStream
-{
-public:
-    PLT_PipeInputStreamPump(NPT_OutputStreamReference& output, NPT_Size size = 65535);
-    virtual ~PLT_PipeInputStreamPump();
-
-    NPT_Result Receive(NPT_InputStream& input, NPT_Size max_bytes_to_read, NPT_Size* bytes_read);
-
-protected:
-    NPT_OutputStreamReference   m_Output;
-    NPT_Result                  m_LastRes;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_PipeInputStreamPump class
-+---------------------------------------------------------------------*/
-class PLT_PipeOutputStreamPump : public PLT_StreamPump,
-                                 public PLT_PipeOutputStream
-{
-public:
-    PLT_PipeOutputStreamPump(NPT_InputStreamReference& input, 
-                             NPT_Size                  size = 65535,
-                             NPT_Size                  max_bytes_to_read = 0);
-    virtual ~PLT_PipeOutputStreamPump();
-
-    NPT_Result Transmit(NPT_OutputStream& output);
-
-protected:
-    NPT_InputStreamReference    m_Input;
-    NPT_Size                    m_MaxBytesToRead;
-    NPT_Result                  m_LastRes;
-};
-
-
-#endif // _PLT_STREAM_PUMP_H_ 
diff --git a/extra_lib/include/platinum/PltSvnVersion.h b/extra_lib/include/platinum/PltSvnVersion.h
deleted file mode 100644
index 0aeffb3..0000000
--- a/extra_lib/include/platinum/PltSvnVersion.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* DO NOT EDIT. This file was automatically generated by GenSvnVersionHeader.py */
-#define PLT_SVN_VERSION 498
-#define PLT_SVN_VERSION_STRING "498"
diff --git a/extra_lib/include/platinum/PltSyncMediaBrowser.h b/extra_lib/include/platinum/PltSyncMediaBrowser.h
deleted file mode 100644
index e628af9..0000000
--- a/extra_lib/include/platinum/PltSyncMediaBrowser.h
+++ /dev/null
@@ -1,173 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - Synchronous Media Browser
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-/** @file
- UPnP AV Media Controller synchronous implementation.
- */
-
-#ifndef _PLT_SYNC_MEDIA_BROWSER_
-#define _PLT_SYNC_MEDIA_BROWSER_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-#include "PltCtrlPoint.h"
-#include "PltMediaBrowser.h"
-#include "PltMediaCache.h"
-
-/*----------------------------------------------------------------------
-|   types
-+---------------------------------------------------------------------*/
-typedef NPT_Map<NPT_String, PLT_DeviceDataReference>         PLT_DeviceMap;
-typedef NPT_Map<NPT_String, PLT_DeviceDataReference>::Entry  PLT_DeviceMapEntry;
-
-typedef struct PLT_BrowseData {
-    NPT_SharedVariable shared_var;
-    NPT_Result         res;
-    PLT_BrowseInfo     info;
-} PLT_BrowseData;
-
-typedef NPT_Reference<PLT_BrowseData> PLT_BrowseDataReference;
-
-/*----------------------------------------------------------------------
-|   PLT_MediaContainerListener
-+---------------------------------------------------------------------*/
-class PLT_MediaContainerChangesListener
-{
-public:
-    virtual ~PLT_MediaContainerChangesListener() {}
-    virtual void OnContainerChanged(PLT_DeviceDataReference& device, 
-                                    const char*              item_id, 
-                                    const char*              update_id) = 0;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_SyncMediaBrowser
-+---------------------------------------------------------------------*/
-class PLT_SyncMediaBrowser : public PLT_MediaBrowser,
-                             public PLT_MediaBrowserDelegate
-{
-public:
-    PLT_SyncMediaBrowser(PLT_CtrlPointReference&            ctrlPoint, 
-                         bool                               use_cache = false, 
-                         PLT_MediaContainerChangesListener* listener = NULL);
-    virtual ~PLT_SyncMediaBrowser();
-
-    // PLT_MediaBrowser methods
-    virtual NPT_Result OnDeviceAdded(PLT_DeviceDataReference& device);
-    virtual NPT_Result OnDeviceRemoved(PLT_DeviceDataReference& device);
-
-    // PLT_MediaBrowserDelegate methods
-    virtual void OnMSStateVariablesChanged(PLT_Service*                  service, 
-                                           NPT_List<PLT_StateVariable*>* vars);
-    virtual void OnBrowseResult(NPT_Result               res, 
-                                PLT_DeviceDataReference& device, 
-                                PLT_BrowseInfo*          info, 
-                                void*                    userdata);
-
-    // methods
-    void       SetContainerListener(PLT_MediaContainerChangesListener* listener) {
-        m_ContainerListener = listener;
-    }
-    NPT_Result BrowseSync(PLT_DeviceDataReference&      device, 
-                          const char*                   id, 
-                          PLT_MediaObjectListReference& list,
-                          bool                          metadata = false,
-                          NPT_Int32                     start = 0,
-                          NPT_Cardinal                  max_results = 0); // 0 means all
-
-    const NPT_Lock<PLT_DeviceMap>& GetMediaServersMap() const { return m_MediaServers; }
-    bool IsCached(const char* uuid, const char* object_id);
-
-protected:
-    NPT_Result BrowseSync(PLT_BrowseDataReference& browse_data,
-                          PLT_DeviceDataReference& device, 
-                          const char*              object_id,
-                          NPT_Int32                index, 
-                          NPT_Int32                count,
-                          bool                     browse_metadata = false,
-                          const char*              filter = "dc:date,upnp:genre,res,res at duration,res at size,upnp:albumArtURI,upnp:album,upnp:artist,upnp:author,searchable,childCount", // explicitely specify res otherwise WMP won't return a URL!
-                          const char*              sort = "");
-private:
-    NPT_Result Find(const char* ip, PLT_DeviceDataReference& device);
-    NPT_Result WaitForResponse(NPT_SharedVariable& shared_var);
-
-private:
-    NPT_Lock<PLT_DeviceMap>              m_MediaServers;
-    PLT_MediaContainerChangesListener*   m_ContainerListener;
-    bool                                 m_UseCache;
-    PLT_MediaCache<PLT_MediaObjectListReference,NPT_String> m_Cache;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_DeviceMapFinderByIp
-+---------------------------------------------------------------------*/
-class PLT_DeviceMapFinderByIp
-{
-public:
-    // methods
-    PLT_DeviceMapFinderByIp(const char* ip) : m_IP(ip) {}
-
-    bool operator()(const PLT_DeviceMapEntry* const& entry) const {
-        PLT_DeviceDataReference device = entry->GetValue();
-        return (device->GetURLBase().GetHost() == m_IP);
-    }
-
-private:
-    // members
-    NPT_String m_IP;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_DeviceFinderByUUID
-+---------------------------------------------------------------------*/
-class PLT_DeviceMapFinderByUUID
-{
-public:
-    // methods
-    PLT_DeviceMapFinderByUUID(const char* uuid) : m_UUID(uuid) {}
-
-    bool operator()(const PLT_DeviceMapEntry* const& entry) const {
-        PLT_DeviceDataReference device = entry->GetValue();
-        return device->GetUUID() == m_UUID;
-    }
-
-private:
-    // members
-    NPT_String m_UUID;
-};
-
-#endif /* _PLT_SYNC_MEDIA_BROWSER_ */
-
diff --git a/extra_lib/include/platinum/PltTaskManager.h b/extra_lib/include/platinum/PltTaskManager.h
deleted file mode 100644
index 72b6b6b..0000000
--- a/extra_lib/include/platinum/PltTaskManager.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - Task Manager
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-/** @file
- Runnable Tasks Manager
- */
-
-#ifndef _PLT_TASKMANAGER_H_
-#define _PLT_TASKMANAGER_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-
-/*----------------------------------------------------------------------
-|   forward declarations
-+---------------------------------------------------------------------*/
-class PLT_ThreadTask;
-
-/*----------------------------------------------------------------------
-|   PLT_TaskManager class
-+---------------------------------------------------------------------*/
-/**
- The PLT_TaskManager class maintains a list of runnable tasks. During shutdown, it
- can stop all running tasks. Additionally, it can limit the number of
- tasks that can run at any given time.
- */
-class PLT_TaskManager
-{
-public:
-    /**
-     Create a new Task Manager.
-     @param max_tasks Maximum number of concurrent tasks that the task manager
-     will allow. When the value is reached, a thread calling AddTask will block until
-     a task has finished.
-     */
-	PLT_TaskManager(NPT_Cardinal max_tasks = 0);
-	virtual ~PLT_TaskManager();
-
-    /**
-     Start a new new task and associates it with this task manager.
-     @param task new task
-     @param delay optional time interval to wait before launching the new task
-     @param auto_destroy a flag to indicate if the task is owned by someone else
-     and thus should not destroy itself when done.
-     */
-    virtual NPT_Result StartTask(PLT_ThreadTask*   task, 
-                                 NPT_TimeInterval* delay = NULL,
-                                 bool              auto_destroy = true);
-
-    /**
-     Stop all tasks associated with this task manager.
-     */
-    NPT_Result StopAllTasks();
-
-    /**
-     Returns the max number of concurrent tasks allowed. 0 for no limit.
-     */
-    NPT_Cardinal GetMaxTasks() { return m_MaxTasks; }
-
-private:
-    friend class PLT_ThreadTask;
-
-    // called by PLT_ThreadTask
-    NPT_Result AddTask(PLT_ThreadTask* task);
-    NPT_Result RemoveTask(PLT_ThreadTask* task);
-
-private:
-    NPT_List<PLT_ThreadTask*>  m_Tasks;
-    NPT_Mutex                  m_TasksLock;
-    NPT_Mutex                  m_CallbackLock;
-    NPT_Queue<int>*            m_Queue;
-    NPT_Cardinal               m_MaxTasks;
-    NPT_Cardinal               m_RunningTasks;
-    bool                       m_Stopping;
-};
-
-#endif /* _PLT_TASKMANAGER_H_ */
diff --git a/extra_lib/include/platinum/PltThreadTask.h b/extra_lib/include/platinum/PltThreadTask.h
deleted file mode 100644
index 8315999..0000000
--- a/extra_lib/include/platinum/PltThreadTask.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - Thread Tasks
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-/** @file
- Runnable Task
- */
-
-#ifndef _PLT_THREADTASK_H_
-#define _PLT_THREADTASK_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-#include "PltTaskManager.h"
-
-/*----------------------------------------------------------------------
-|   PLT_ThreadTask class
-+---------------------------------------------------------------------*/
-/**
- The PLT_ThreadTask class is a base class for executing a given task in a worker
- thread. A PLT_ThreadTask is usually always associated to a PLT_TaskManager 
- which maintains a list to stop and destroy tasks when finished.
- */
-class PLT_ThreadTask : public NPT_Runnable
-{
-public:
-    friend class PLT_TaskManager;
-
-    /**
-     When a task is not managed by a PLT_TaskManager, the owner must call
-     this to stop and destroy it.
-     */
-    NPT_Result Kill();
-    
-protected:
-    /**
-     Return whether this task is in the process of stopping.
-     @param timeout number of milliseconds to wait
-     @return boolean indicating if the task is stopping
-     */
-    virtual bool IsAborting(NPT_Timeout timeout) {
-        return NPT_SUCCEEDED(m_Abort.WaitUntilEquals(1, timeout));
-    }
-    
-    /**
-     Start a task by associating it with a task manager.
-     @param task_manager PLT_TaskManager pointer
-     @param delay optional time interval to wait before launching the new task
-     @param auto_destroy a flag to indicate if the task is owned by someone else
-     and thus should not destroy itself when done.
-     */
-    NPT_Result Start(PLT_TaskManager*  task_manager = NULL, 
-                     NPT_TimeInterval* delay = NULL,
-                     bool              auto_destroy = true);
-    /**
-     Stop the task. This is either called by a task manager or the Kill method.
-     @param blocking Whether the method should block until the task has finished.
-     */
-    NPT_Result Stop(bool blocking = true);
-    
-    /**
-     This method to override in derived classes is called when the task is about
-     to start. 
-     */
-    virtual void DoInit()    {}
-    
-    /**
-     This method to override in derived classes is called when the task is about
-     to stop.
-     */
-    virtual void DoAbort()   {}
-    
-    /**
-     This method to override in derived classes is the main task loop.
-     */
-    virtual void DoRun()     {}
-    
-    /**
-     A PLT_ThreadTask base class is never instantiated directly.
-     */
-    PLT_ThreadTask();
-    
-    /**
-     The task manager will destroy the task when finished if m_AutoDestroy is 
-     true otherwise the owner of this task must use the Kill method.
-     */
-    virtual ~PLT_ThreadTask();
-    
-private:    
-    NPT_Result StartThread();
-    
-    // NPT_Thread methods
-    void Run();
-
-protected:
-    // members
-    PLT_TaskManager*    m_TaskManager;
-
-private:
-    // members
-    NPT_SharedVariable  m_Started;
-    NPT_SharedVariable  m_Abort;
-    NPT_Thread*         m_Thread;
-    bool                m_AutoDestroy;
-    NPT_TimeInterval    m_Delay;
-};
-
-#endif /* _PLT_THREADTASK_H_ */
diff --git a/extra_lib/include/platinum/PltTime.h b/extra_lib/include/platinum/PltTime.h
deleted file mode 100644
index ceec181..0000000
--- a/extra_lib/include/platinum/PltTime.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - Time
-|
-| Copyright (c) 2004-2008, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| 
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-#ifndef _PLT_TIME_H_
-#define _PLT_TIME_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "NptTypes.h"
-#include "NptTime.h"
-
-/*----------------------------------------------------------------------
-|   PLT_Time
-+---------------------------------------------------------------------*/
-class PLT_Time
-{
-public:
-    // methods
-    static NPT_Result GetTimeStampFromDate(const NPT_Date& date, 
-                                           NPT_TimeStamp&  timestamp);
-
-    /* helper functions */
-    static NPT_Result SetDateTimeZone(NPT_Date& date, NPT_TimeZone tz);
-};
-
-#endif // _NPT_TIME_H_
diff --git a/extra_lib/include/platinum/PltUPnP.h b/extra_lib/include/platinum/PltUPnP.h
deleted file mode 100644
index f778cb4..0000000
--- a/extra_lib/include/platinum/PltUPnP.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - UPnP Engine
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-/** @file
- UPnP Devices and ControlPoints Manager
- */
-
-#ifndef _PLT_UPNP_H_
-#define _PLT_UPNP_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "PltTaskManager.h"
-#include "PltCtrlPoint.h"
-#include "PltDeviceHost.h"
-#include "PltUtilities.h"
-
-/*----------------------------------------------------------------------
-|   constants
-+---------------------------------------------------------------------*/
-#define PLT_DLNA_SSDP_DELAY       0.05f
-#define PLT_DLNA_SSDP_DELAY_GROUP 0.2f
-
-/*----------------------------------------------------------------------
-|   forward definitions
-+---------------------------------------------------------------------*/
-class PLT_SsdpListenTask;
-
-/*----------------------------------------------------------------------
-|   PLT_UPnP class
-+---------------------------------------------------------------------*/
-/**
- The PLT_UPnP class maintains a list of devices (PLT_DeviceHost) to advertise and/or 
- control points (PLT_CtrlPoint).
- */
-class PLT_UPnP
-{
-public:
-    /**
-     Create a UPnP instance.
-     */
-    PLT_UPnP();
-    ~PLT_UPnP();
-
-    /**
-     Add and start a device inside this UPnP context.
-     @param device device to start.
-     */
-    NPT_Result AddDevice(PLT_DeviceHostReference& device);
-    
-    /**
-     Add and start a control point inside this UPnP context.
-     @param ctrlpoint control point to start.
-     */
-    NPT_Result AddCtrlPoint(PLT_CtrlPointReference& ctrlpoint);
-
-    /**
-     Remove an existing device from this UPnP context.
-     @param device device to stop.
-     */
-    NPT_Result RemoveDevice(PLT_DeviceHostReference& device);
-    
-    /**
-     Remove an existing control point from this UPnP context.
-     @param ctrlpoint control point to stop.
-     */
-    NPT_Result RemoveCtrlPoint(PLT_CtrlPointReference& ctrlpoint);
-
-    /**
-     Start the UPnP context and all existing devices and control points
-     associated with it.
-     */
-    NPT_Result Start();
-    
-    /**
-     Stop the UPnP context and all existing devices and control points
-     associated with it.
-     */
-    NPT_Result Stop();
-    
-    /**
-     Return the UPnP Engine state.
-     @return True if the UPnP engine is running.
-     */
-    bool IsRunning() { return m_Started; }
-
-    /**
-     When a device and a control point are added to the same UPnP context, it is
-     desired that the device be not discovered by the control point. For example when
-     creating a combo UPnP Renderer/CtrlPoint. This methods tells the control point
-     to ignore devices associated with the same UPnP context.
-     @param ignore boolean to ignore devices in context
-     */
-	void SetIgnoreLocalUUIDs(bool ignore) { m_IgnoreLocalUUIDs = ignore; }
-
-private:
-    // members
-    NPT_Mutex                           m_Lock;
-    NPT_List<PLT_DeviceHostReference>   m_Devices;
-    NPT_List<PLT_CtrlPointReference>    m_CtrlPoints;
-    PLT_TaskManager                     m_TaskManager;
-
-    // Since we can only have one socket listening on port 1900, 
-    // we create it in here and we will attach every control points
-    // and devices to it when they're added
-    bool                                m_Started;
-    PLT_SsdpListenTask*                 m_SsdpListenTask; 
-	bool								m_IgnoreLocalUUIDs;
-};
-
-#endif /* _PLT_UPNP_H_ */
diff --git a/extra_lib/include/platinum/PltUPnPHelper.h b/extra_lib/include/platinum/PltUPnPHelper.h
deleted file mode 100644
index 3cfdd7b..0000000
--- a/extra_lib/include/platinum/PltUPnPHelper.h
+++ /dev/null
@@ -1,341 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - UPnP Helper
-|
-| Copyright (c) 2004-2008, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| 
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-#ifndef _PLT_UPNP_HELPER_H_
-#define _PLT_UPNP_HELPER_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-
-/*----------------------------------------------------------------------
-|   NPT_StringFinder
-+---------------------------------------------------------------------*/
-class NPT_StringFinder
-{
-public:
-    // methods
-    NPT_StringFinder(const char* value) : m_Value(value) {}
-    virtual ~NPT_StringFinder() {}
-    bool operator()(const NPT_String* const & value) const {
-        return value->Compare(m_Value) ? false : true;
-    }
-    bool operator()(const NPT_String& value) const {
-        return value.Compare(m_Value) ? false : true;
-    }
-
-private:
-    // members
-    NPT_String   m_Value;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_UPnPMessageHelper class
-+---------------------------------------------------------------------*/
-class PLT_UPnPMessageHelper
-{
-public:
-    // methods
-    static const NPT_String* GetST(NPT_HttpMessage& message) { 
-        return message.GetHeaders().GetHeaderValue("ST"); 
-    }
-    static NPT_Result SetST(NPT_HttpMessage& message, 
-                            const char*      st) { 
-        return message.GetHeaders().SetHeader("ST", st); 
-    }
-    static const NPT_String* GetNT(NPT_HttpMessage& message) { 
-        return message.GetHeaders().GetHeaderValue("NT"); 
-    }
-    static NPT_Result SetNT(NPT_HttpMessage& message, 
-                            const char*      nt) { 
-        return message.GetHeaders().SetHeader("NT", nt); 
-    }
-    static const NPT_String* GetNTS(NPT_HttpMessage& message) { 
-        return message.GetHeaders().GetHeaderValue("NTS"); 
-    }
-    static NPT_Result SetNTS(NPT_HttpMessage& message, 
-                             const char*      nts) { 
-        return message.GetHeaders().SetHeader("NTS", nts); 
-    }
-    static const NPT_String* GetMAN(NPT_HttpMessage& message) { 
-        return message.GetHeaders().GetHeaderValue("MAN"); 
-    }
-    static NPT_Result SetMAN(NPT_HttpMessage& message, 
-                             const char*      man) { 
-        return message.GetHeaders().SetHeader("MAN", man); 
-    }
-    static const NPT_String* GetLocation(NPT_HttpMessage& message) { 
-        return message.GetHeaders().GetHeaderValue("LOCATION"); 
-    }
-    static NPT_Result SetLocation(NPT_HttpMessage& message, 
-                                  const char*      location) { 
-        return message.GetHeaders().SetHeader("LOCATION", location); 
-    }
-    static const NPT_String* GetServer(NPT_HttpMessage& message) { 
-        return message.GetHeaders().GetHeaderValue(NPT_HTTP_HEADER_SERVER); 
-    }
-    static NPT_Result SetServer(NPT_HttpMessage& message, 
-                                const char*      server, 
-                                bool             replace = true) { 
-        return message.GetHeaders().SetHeader(
-            NPT_HTTP_HEADER_SERVER, 
-            server, 
-            replace); 
-    }
-    static const NPT_String* GetUSN(NPT_HttpMessage& message) { 
-        return message.GetHeaders().GetHeaderValue("USN"); 
-    }
-    static NPT_Result SetUSN(NPT_HttpMessage& message, 
-                             const char*      usn) { 
-        return message.GetHeaders().SetHeader("USN", usn); 
-    }
-    static const NPT_String* GetCallbacks(NPT_HttpMessage& message) { 
-        return message.GetHeaders().GetHeaderValue("CALLBACK"); 
-    }
-    static NPT_Result SetCallbacks(NPT_HttpMessage& message, 
-                                   const char*      callbacks) { 
-        return message.GetHeaders().SetHeader("CALLBACK", callbacks); 
-    }
-    static const NPT_String* GetSID(NPT_HttpMessage& message) { 
-        return message.GetHeaders().GetHeaderValue("SID"); 
-    }
-    static NPT_Result SetSID(NPT_HttpMessage& message, 
-                             const char*      sid) { 
-        return message.GetHeaders().SetHeader("SID", sid); 
-    }
-    static NPT_Result GetLeaseTime(NPT_HttpMessage& message, 
-                                   NPT_Timeout&     value) { 
-        value = 0;
-        const NPT_String* cc = 
-            message.GetHeaders().GetHeaderValue("CACHE-CONTROL");
-        NPT_CHECK_POINTER(cc);
-        return ExtractLeaseTime(*cc, value); 
-    }
-    static NPT_Result SetLeaseTime(NPT_HttpMessage&  message, 
-                                   const NPT_Timeout lease) { 
-        return message.GetHeaders().SetHeader(
-            "CACHE-CONTROL", 
-            "max-age="+NPT_String::FromInteger(lease)); 
-    }
-    static NPT_Result GetTimeOut(NPT_HttpMessage& message, 
-                                 NPT_Int32&       value) { 
-        value = 0;
-        const NPT_String* timeout = 
-            message.GetHeaders().GetHeaderValue("TIMEOUT"); 
-        NPT_CHECK_POINTER(timeout);
-        return ExtractTimeOut(*timeout, value); 
-    }
-    static NPT_Result SetTimeOut(NPT_HttpMessage& message, 
-                                 const NPT_Int32  timeout) { 
-        if (timeout >= 0) {
-            return message.GetHeaders().SetHeader(
-                "TIMEOUT", 
-                "Second-"+NPT_String::FromInteger(timeout)); 
-        } else {
-            return message.GetHeaders().SetHeader(
-                "TIMEOUT", "Second-infinite"); 
-        }
-    }
-    static NPT_Result GetMX(NPT_HttpMessage& message, 
-                            NPT_UInt32&      value) { 
-        value = 0;
-        const NPT_String* mx = 
-            message.GetHeaders().GetHeaderValue("MX");
-        NPT_CHECK_POINTER(mx);
-        return NPT_ParseInteger32(*mx, value);
-    }
-    static NPT_Result SetMX(NPT_HttpMessage& message, 
-                            const NPT_UInt32 mx) {
-        return message.GetHeaders().SetHeader(
-            "MX", 
-            NPT_String::FromInteger(mx)); 
-    }
-    static NPT_Result GetSeq(NPT_HttpMessage& message,  
-                             NPT_UInt32&      value) { 
-        value = 0;
-        const NPT_String* seq = 
-            message.GetHeaders().GetHeaderValue("SEQ");
-        NPT_CHECK_POINTER(seq);
-        return NPT_ParseInteger32(*seq, value);
-    }
-    static NPT_Result SetSeq(NPT_HttpMessage& message, 
-                             const NPT_UInt32 seq) {
-        return message.GetHeaders().SetHeader(
-            "SEQ", 
-            NPT_String::FromInteger(seq)); 
-    }
-    static const char* GenerateUUID(int         count, 
-                                    NPT_String& uuid) {   
-        uuid = "";
-        for (int i=0;i<(count<100?count:100);i++) {
-            int random = NPT_System::GetRandomInteger();
-            uuid += (char)((random % 25) + 66);
-        }
-        return uuid;
-    }
-    static const char* GenerateGUID(NPT_String& guid) {   
-        guid = "";
-        for (int i=0;i<32;i++) {
-            char nibble = (char)(NPT_System::GetRandomInteger() % 16);
-            guid += (nibble < 10) ? ('0' + nibble) : ('a' + (nibble-10));
-            if (i == 7 || i == 11 || i == 15 || i == 19) {
-                guid += '-';
-            }
-        }
-        return guid;
-    }
-    static NPT_Result ExtractLeaseTime(const char*  cache_control, 
-                                       NPT_Timeout& lease) {
-        int value;
-        if (cache_control && 
-            sscanf(cache_control, "max-age=%d", &value) == 1) {
-            lease = value;
-            return NPT_SUCCESS;
-        }
-        return NPT_FAILURE;
-    }
-    static NPT_Result ExtractTimeOut(const char* timeout, 
-                                     NPT_Int32&  len) {
-        NPT_String temp = timeout;
-        if (temp.CompareN("Second-", 7, true)) {
-            return NPT_ERROR_INVALID_FORMAT;
-        }
-
-        if (temp.Compare("Second-infinite", true) == 0) {
-            len = NPT_TIMEOUT_INFINITE;
-            return NPT_SUCCESS;
-        }
-        return temp.SubString(7).ToInteger(len);
-    }
-    static NPT_Result GetIPAddresses(NPT_List<NPT_IpAddress>& ips, 
-                                     bool with_localhost = false) {
-        NPT_List<NPT_NetworkInterface*> if_list;
-        NPT_CHECK(NPT_NetworkInterface::GetNetworkInterfaces(if_list));
-
-        NPT_List<NPT_NetworkInterface*>::Iterator iface = 
-            if_list.GetFirstItem();
-        while (iface) {
-            NPT_IpAddress ip = 
-                (*(*iface)->GetAddresses().GetFirstItem()).GetPrimaryAddress();
-            if (ip.ToString().Compare("0.0.0.0") && ip.ToString().Compare("127.0.0.1")) {
-                ips.Add(ip);
-            }
-            ++iface;
-        }
-
-        if (ips.GetItemCount() == 0 || with_localhost) {
-            NPT_IpAddress localhost;
-            localhost.Parse("127.0.0.1");
-            ips.Add(localhost);
-        }
-
-        if_list.Apply(NPT_ObjectDeleter<NPT_NetworkInterface>());
-        return NPT_SUCCESS;
-    }
-
-    static NPT_Result GetNetworkInterfaces(NPT_List<NPT_NetworkInterface*>& if_list, 
-                                           bool with_localhost = false) {
-        NPT_CHECK(_GetNetworkInterfaces(if_list, false));
-
-        // if no valid interfaces or if requested, add localhost capable interface
-        if (if_list.GetItemCount() == 0 || with_localhost) {
-            NPT_CHECK(_GetNetworkInterfaces(if_list, true));
-        }
-        return NPT_SUCCESS;
-    }
-
-	static NPT_Result GetMACAddresses(NPT_List<NPT_String>& addresses) {
-        NPT_List<NPT_NetworkInterface*> if_list;
-        NPT_CHECK(NPT_NetworkInterface::GetNetworkInterfaces(if_list));
-
-        NPT_List<NPT_NetworkInterface*>::Iterator iface = if_list.GetFirstItem();
-        while (iface) {
-            NPT_String ip = (*(*iface)->GetAddresses().GetFirstItem()).GetPrimaryAddress().ToString();
-            if (ip.Compare("0.0.0.0") && ip.Compare("127.0.0.1")) {
-				addresses.Add((*iface)->GetMacAddress().ToString());
-            }
-            ++iface;
-        }
-
-        if_list.Apply(NPT_ObjectDeleter<NPT_NetworkInterface>());
-        return NPT_SUCCESS;
-    }
-
-
-	static bool IsLocalNetworkAddress(const NPT_IpAddress& address) {
-		if(address.ToString() == "127.0.0.1") return true;
-
-		NPT_List<NPT_NetworkInterface*> if_list;
-        NPT_NetworkInterface::GetNetworkInterfaces(if_list);
-
-		NPT_List<NPT_NetworkInterface*>::Iterator iface = if_list.GetFirstItem();
-        while (iface) {
-			if((*iface)->IsAddressInNetwork(address)) return true;
-            ++iface;
-        }
-
-		if_list.Apply(NPT_ObjectDeleter<NPT_NetworkInterface>());
-		return false;
-	}
-
-private:
-
-    static NPT_Result _GetNetworkInterfaces(NPT_List<NPT_NetworkInterface*>& if_list, 
-                                            bool only_localhost = false) {
-        NPT_List<NPT_NetworkInterface*> _if_list;
-        NPT_CHECK(NPT_NetworkInterface::GetNetworkInterfaces(_if_list));
-
-        NPT_NetworkInterface* iface;
-        while (NPT_SUCCEEDED(_if_list.PopHead(iface))) {
-            NPT_String ip = 
-                iface->GetAddresses().GetFirstItem()->GetPrimaryAddress().ToString();
-            if (ip.Compare("0.0.0.0") && 
-                ((!only_localhost && ip.Compare("127.0.0.1")) || 
-                 (only_localhost && !ip.Compare("127.0.0.1")))) {
-                if_list.Add(iface);
-
-                // add localhost only once
-                if (only_localhost) break;
-            } else {
-                delete iface;
-            }
-        }
-
-        // cleanup any remaining items in list if we breaked early
-        _if_list.Apply(NPT_ObjectDeleter<NPT_NetworkInterface>());
-        return NPT_SUCCESS;
-    }
-};
-
-#endif /* _PLT_UPNP_HELPER_H_ */
diff --git a/extra_lib/include/platinum/PltUtilities.h b/extra_lib/include/platinum/PltUtilities.h
deleted file mode 100644
index 14619c8..0000000
--- a/extra_lib/include/platinum/PltUtilities.h
+++ /dev/null
@@ -1,724 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - Utilities
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-|  
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-#ifndef _PLT_UTILITIES_H_
-#define _PLT_UTILITIES_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-
-/*----------------------------------------------------------------------
-|   PLT_XmlAttributeFinder
-+---------------------------------------------------------------------*/
-/**
- The PLT_XmlAttributeFinder class is used to determine if an attribute 
- exists given an xml element node, an attribute name and namespace.
- */
-class PLT_XmlAttributeFinder
-{
-public:
-    // if 'namespc' is NULL, we're looking for ANY namespace
-    // if 'namespc' is '\0', we're looking for NO namespace
-    // if 'namespc' is non-empty, look for that SPECIFIC namespace
-    PLT_XmlAttributeFinder(const NPT_XmlElementNode& element, 
-                           const char*               name, 
-                           const char*               namespc) : 
-      m_Element(element), m_Name(name), m_Namespace(namespc) {}
-
-    bool operator()(const NPT_XmlAttribute* const & attribute) const {
-        if (attribute->GetName() == m_Name) {
-            if (m_Namespace) {
-                const NPT_String& prefix = attribute->GetPrefix();
-                if (m_Namespace[0] == '\0') {
-                    // match if the attribute has NO namespace
-                    return prefix.IsEmpty();
-                } else {
-                    // match if the attribute has the SPECIFIC namespace
-                    // we're looking for
-                    const NPT_String* namespc = m_Element.GetNamespaceUri(prefix);
-                    return namespc && *namespc == m_Namespace;
-                }
-            } else {
-                // ANY namespace will match
-                return true;
-            }
-        } else {
-            return false;
-        }
-    }
-
-private:
-    const NPT_XmlElementNode& m_Element;
-    const char*               m_Name;
-    const char*               m_Namespace;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_XmlHelper
-+---------------------------------------------------------------------*/
-/**
- The PLT_XmlHelper class is a set of utility functions for manipulating 
- xml documents and DOM trees.
- */
-class PLT_XmlHelper
-{
-public:
-
-    // static methods
-
-    static NPT_Result Parse(const NPT_String&    xml,
-                            NPT_XmlElementNode*& tree) {
-        // reset tree
-        tree = NULL;
-
-        // parse body
-        NPT_XmlParser parser;
-        NPT_XmlNode*  node;
-        NPT_Result result = parser.Parse(xml, node);
-        if (NPT_FAILED(result)) {
-            //NPT_LOG_FINEST_1("Failed to parse %s", xml.IsEmpty()?"(empty string)":xml.GetChars());
-            NPT_CHECK(result);
-        }
-
-        tree = node->AsElementNode();
-        if (!tree) {
-            delete node;
-            return NPT_FAILURE;
-        }
-        
-        return NPT_SUCCESS;
-    }
-
-    static NPT_Result GetChildText(NPT_XmlElementNode* node, 
-                                   const char*         tag, 
-                                   NPT_String&         value,
-                                   const char*         namespc = "",
-                                   NPT_Cardinal        max_size = 1024) {
-        value = "";
-
-        if (!node) return NPT_FAILURE;
-
-        // special case "" means we look for the same namespace as the parent
-        if (namespc && namespc[0] == '\0') namespc = node->GetNamespace()?node->GetNamespace()->GetChars():NPT_XML_NO_NAMESPACE;
-
-        NPT_XmlElementNode* child = node->GetChild(tag, namespc);
-        if (!child) return NPT_FAILURE;
-
-        const NPT_String* text = child->GetText();
-        // DLNA 7.3.17
-        value = text?text->SubString(0, max_size):"";
-        return NPT_SUCCESS;
-    }
-                                   
-    static NPT_Result RemoveAttribute(NPT_XmlElementNode* node, 
-                                      const char*         name,
-                                      const char*         namespc = "") {
-        if (!node) return NPT_FAILURE;
-
-        // special case "" means we look for the same namespace as the parent
-        if (namespc && namespc[0] == '\0') namespc = node->GetNamespace()?node->GetNamespace()->GetChars():NPT_XML_NO_NAMESPACE;
-
-        NPT_List<NPT_XmlAttribute*>::Iterator attribute;
-        attribute = node->GetAttributes().Find(PLT_XmlAttributeFinder(*node, name, namespc));
-        if (!attribute) return NPT_FAILURE;
-
-        delete *attribute;
-        NPT_CHECK(node->GetAttributes().Erase(attribute));
-
-        return NPT_SUCCESS;
-    }
-                                   
-    static NPT_Result GetAttribute(NPT_XmlElementNode* node, 
-                                   const char*         name,
-                                   NPT_XmlAttribute*&  attr,
-                                   const char*         namespc = "") {
-        attr = NULL;
-
-        if (!node) return NPT_FAILURE;
-
-        // special case "" means we look for the same namespace as the parent
-        if (namespc && namespc[0] == '\0') namespc = node->GetNamespace()?node->GetNamespace()->GetChars():NPT_XML_NO_NAMESPACE;
-
-        NPT_List<NPT_XmlAttribute*>::Iterator attribute;
-        attribute = node->GetAttributes().Find(PLT_XmlAttributeFinder(*node, name, namespc));
-        if (!attribute) {
-            //NPT_Debug("Failed to find attribute [%s]:%s", namespc, name);
-            return NPT_FAILURE;
-        }
-
-        attr = (*attribute);
-        return NPT_SUCCESS;
-    }
-
-    static NPT_Result GetAttribute(NPT_XmlElementNode* node, 
-                                   const char*         name,
-                                   NPT_String&         value,
-                                   const char*         namespc = "",
-                                   NPT_Cardinal        max_size = 1024) {
-        value = "";
-        
-        NPT_XmlAttribute* attribute = NULL;
-        NPT_Result result = GetAttribute(node, name, attribute, namespc);
-        if (NPT_FAILED(result)) return result;
-        
-        if (!attribute) return NPT_FAILURE;
-        // DLNA 7.3.17 truncate to 1024 bytes
-        value = attribute->GetValue().SubString(0, max_size);
-        return NPT_SUCCESS;
-    }
-
-    static NPT_Result SetAttribute(NPT_XmlElementNode* node, 
-                                   const char*         name,
-                                   NPT_String&         value,
-                                   const char*         namespc = "") {
-        NPT_XmlAttribute* attribute = NULL;
-        NPT_CHECK(GetAttribute(node, name, attribute, namespc));
-        if (!attribute) return NPT_FAILURE;
-
-        attribute->SetValue(value);
-        return NPT_SUCCESS;
-    }
-
-    static NPT_Result AddChildText(NPT_XmlElementNode* node,
-                                   const char*         tag,
-                                   const char*         text,
-                                   const char*         prefix = NULL) {
-        if (!node) return NPT_FAILURE;
-        NPT_XmlElementNode* child = new NPT_XmlElementNode(prefix, tag);
-        child->AddText(text);
-        return node->AddChild(child);
-    }
-
-    static bool IsMatch(const NPT_XmlNode* const & node, const char* tag, const char* namespc_mapped) {
-        // if m_Namespace is NULL, we're looking for ANY namespace
-        // if m_Namespace is '\0', we're looking for NO namespace
-        // if m_Namespace is non-empty, look for that SPECIFIC namespace
-        
-        const NPT_XmlElementNode* element = node->AsElementNode();
-        // is tag the same (case sensitive)?
-        if (element && element->GetTag() == tag) {
-            if (namespc_mapped) {
-                // look for a SPECIFIC namespace or NO namespace
-                const NPT_String* namespc = element->GetNamespace();
-                if (namespc) {
-                    // the element has a namespace, match if it is equal to
-                    // what we're looking for
-                    return *namespc == namespc_mapped;
-                } else {
-                    // the element does not have a namespace, match if we're
-                    // looking for NO namespace
-                    return namespc_mapped[0] == '\0';
-                }
-            } else {
-                // ANY namespace will match
-                return true;
-            }
-        }
-        return false;
-    } 
-
-    static NPT_Result GetChildren(NPT_XmlElementNode*              node,
-                                  NPT_Array<NPT_XmlElementNode*>&  children,
-                                  const char*                      tag,
-                                  const char*                      namespc = "") {
-        if (!node) return NPT_FAILURE;
-
-        // special case "" means we look for the same namespace as the parent
-        if (namespc && namespc[0] == '\0') namespc = node->GetNamespace()?node->GetNamespace()->GetChars():NPT_XML_NO_NAMESPACE;
-
-        const char* namespc_mapped = (namespc==NULL)?"":(namespc[0]=='*' && namespc[1]=='\0')?NULL:namespc;
-
-        // get all children first
-        NPT_List<NPT_XmlNode*>& allchildren = node->GetChildren();
-
-        // iterate through children and add only elements with matching tag
-        NPT_List<NPT_XmlNode*>::Iterator child = allchildren.GetFirstItem();
-        while  (child) {
-            if (IsMatch(*child, tag, namespc_mapped)) {
-                children.Add((*child)->AsElementNode());
-            }
-            ++child;
-        }
-        return NPT_SUCCESS;
-    }
-
-    static NPT_XmlElementNode* GetChild(NPT_XmlElementNode* node,
-                                        const char*         tag,
-                                        const char*         namespc = "") {
-        if (!node) return NULL;
-
-        // special case "" means we look for the same namespace as the parent
-        if (namespc && namespc[0] == '\0') namespc = node->GetNamespace()?node->GetNamespace()->GetChars():NPT_XML_NO_NAMESPACE;
-
-        return node->GetChild(tag, namespc);
-    }
-
-    static NPT_Result GetChild(NPT_XmlElementNode*  parent,
-                               NPT_XmlElementNode*& child,
-                               NPT_Ordinal          n = 0) {
-        if (!parent) return NPT_FAILURE;
-
-        // reset child
-        child = NULL;
-
-        // get all children first
-        NPT_List<NPT_XmlNode*>::Iterator children = parent->GetChildren().GetFirstItem();
-        while  (children) {
-            if ((*children)->AsElementNode() && n-- == 0) {
-                child = (*children)->AsElementNode();
-                return NPT_SUCCESS;
-            }
-            children++;
-        }
-
-        return NPT_FAILURE;
-    }
-
-    static NPT_Result Serialize(NPT_XmlNode& node, NPT_String& xml, bool add_header = true, NPT_Int8 indentation = 0) {
-        NPT_XmlWriter writer(indentation);
-        NPT_StringOutputStreamReference stream(new NPT_StringOutputStream(&xml));
-        NPT_CHECK(writer.Serialize(node, *stream, add_header));
-        return NPT_SUCCESS;
-    }
-
-	static NPT_String Serialize(NPT_XmlNode& node, bool add_header = true, NPT_Int8 indentation = 0) {
-		NPT_XmlWriter writer(indentation);
-		NPT_String xml;
-		NPT_StringOutputStreamReference stream(new NPT_StringOutputStream(&xml));
-		if (NPT_FAILED(writer.Serialize(node, *stream, add_header))) {
-			NPT_Debug("Failed to serialize xml node");
-			return "";
-		}
-
-		return xml;
-	}
-private:
-    // members
-};
-
-/*----------------------------------------------------------------------
-|   NPT_StringFinder
-+---------------------------------------------------------------------*/
-/**
- The NPT_StringFinder class is used to determine if a string is found 
- as part of a list of strings.
- */
-class NPT_StringFinder
-{
-public:
-    // methods
-    NPT_StringFinder(const char* value, bool ignore_case = false) : 
-        m_Value(value), m_IgnoreCase(ignore_case) {}
-    virtual ~NPT_StringFinder() {}
-    bool operator()(const NPT_String* const & value) const {
-        return value->Compare(m_Value, m_IgnoreCase) ? false : true;
-    }
-    bool operator()(const NPT_String& value) const {
-        return value.Compare(m_Value, m_IgnoreCase) ? false : true;
-    }
-    
-private:
-    // members
-    NPT_String   m_Value;
-    bool         m_IgnoreCase;
-};
-
-/*----------------------------------------------------------------------
-|   NPT_IpAddressFinder
-+---------------------------------------------------------------------*/
-/**
- The NPT_IpAddressFinder class is used to determine if a IP Address is found 
- as part of a list of IP Addresses.
- */
-class NPT_IpAddressFinder
-{
-public:
-    // methods
-    NPT_IpAddressFinder(NPT_IpAddress ip) : m_Value(ip) {}
-    virtual ~NPT_IpAddressFinder() {}
-    
-    bool operator()(const NPT_IpAddress* const & value) const {
-        return *value == m_Value;
-    }
-    bool operator()(const NPT_IpAddress& value) const {
-        return value == m_Value;
-    }
-    
-private:
-    // members
-    NPT_IpAddress m_Value;
-};
-
-
-/*----------------------------------------------------------------------
-|   PLT_UPnPMessageHelper class
-+---------------------------------------------------------------------*/
-/**
- The PLT_UPnPMessageHelper class is a set of utility functions for manipulating 
- specific UPnP HTTP headers.
- */
-class PLT_UPnPMessageHelper
-{
-public:
-    // methods
-    static const NPT_String* GetST(const NPT_HttpMessage& message) { 
-        return message.GetHeaders().GetHeaderValue("ST"); 
-    }
-    static NPT_Result SetST(NPT_HttpMessage& message, 
-                            const char*      st) { 
-        return message.GetHeaders().SetHeader("ST", st); 
-    }
-    static const NPT_String* GetNT(const NPT_HttpMessage& message) { 
-        return message.GetHeaders().GetHeaderValue("NT"); 
-    }
-    static NPT_Result SetNT(NPT_HttpMessage& message, 
-                            const char*      nt) { 
-        return message.GetHeaders().SetHeader("NT", nt); 
-    }
-    static const NPT_String* GetNTS(const NPT_HttpMessage& message) { 
-        return message.GetHeaders().GetHeaderValue("NTS"); 
-    }
-    static NPT_Result SetNTS(NPT_HttpMessage& message, 
-                             const char*      nts) { 
-        return message.GetHeaders().SetHeader("NTS", nts); 
-    }
-    static const NPT_String* GetMAN(const NPT_HttpMessage& message) { 
-        return message.GetHeaders().GetHeaderValue("MAN"); 
-    }
-    static NPT_Result SetMAN(NPT_HttpMessage& message, 
-                             const char*      man) { 
-        return message.GetHeaders().SetHeader("MAN", man); 
-    }
-    static const NPT_String* GetLocation(const NPT_HttpMessage& message) { 
-        return message.GetHeaders().GetHeaderValue("Location"); 
-    }
-    static NPT_Result SetLocation(NPT_HttpMessage& message, 
-                                  const char*      location) { 
-        return message.GetHeaders().SetHeader("Location", location); 
-    }
-    static const NPT_String* GetServer(const NPT_HttpMessage& message) { 
-        return message.GetHeaders().GetHeaderValue(NPT_HTTP_HEADER_SERVER); 
-    }
-    static NPT_Result SetServer(NPT_HttpMessage& message, 
-                                const char*      server, 
-                                bool             replace = true) { 
-        return message.GetHeaders().SetHeader(
-                                              NPT_HTTP_HEADER_SERVER, 
-                                              server, 
-                                              replace); 
-    }
-    static const NPT_String* GetUSN(const NPT_HttpMessage& message) { 
-        return message.GetHeaders().GetHeaderValue("USN"); 
-    }
-    static NPT_Result SetUSN(NPT_HttpMessage& message, 
-                             const char*      usn) { 
-        return message.GetHeaders().SetHeader("USN", usn); 
-    }
-    static const NPT_String* GetCallbacks(const NPT_HttpMessage& message) { 
-        return message.GetHeaders().GetHeaderValue("CALLBACK"); 
-    }
-    static NPT_Result SetCallbacks(NPT_HttpMessage& message, 
-                                   const char*      callbacks) { 
-        return message.GetHeaders().SetHeader("CALLBACK", callbacks); 
-    }
-    static const NPT_String* GetSID(const NPT_HttpMessage& message) { 
-        return message.GetHeaders().GetHeaderValue("SID"); 
-    }
-    static NPT_Result SetSID(NPT_HttpMessage& message, 
-                             const char*      sid) { 
-        return message.GetHeaders().SetHeader("SID", sid); 
-    }
-    static NPT_Result GetLeaseTime(const NPT_HttpMessage& message, 
-                                   NPT_TimeInterval&      lease) { 
-        const NPT_String* cc = 
-        message.GetHeaders().GetHeaderValue("Cache-Control");
-        NPT_CHECK_POINTER(cc);
-        return ExtractLeaseTime(*cc, lease);
-    }
-    static NPT_Result SetLeaseTime(NPT_HttpMessage&        message, 
-                                   const NPT_TimeInterval& lease) { 
-        return message.GetHeaders().SetHeader(
-                                              "Cache-Control", 
-                                              "max-age="+NPT_String::FromInteger(lease.ToSeconds())); 
-    }
-    static NPT_Result GetTimeOut(const NPT_HttpMessage& message, 
-                                 NPT_Int32&             seconds) { 
-        seconds = 0;
-        const NPT_String* timeout = 
-        message.GetHeaders().GetHeaderValue("TIMEOUT"); 
-        NPT_CHECK_POINTER(timeout);
-        return ExtractTimeOut(*timeout, seconds); 
-    }
-    static NPT_Result SetTimeOut(NPT_HttpMessage& message, 
-                                 const NPT_Int32  seconds) { 
-        if (seconds >= 0) {
-            return message.GetHeaders().SetHeader(
-                                                  "TIMEOUT", 
-                                                  "Second-"+NPT_String::FromInteger(seconds)); 
-        } else {
-            return message.GetHeaders().SetHeader(
-                                                  "TIMEOUT", 
-                                                  "Second-infinite"); 
-        }
-    }
-    static NPT_Result SetDate(NPT_HttpMessage& message) { 
-        NPT_TimeStamp now;
-        NPT_System::GetCurrentTimeStamp(now);
-        NPT_DateTime date(now);
-        
-        return message.GetHeaders().SetHeader("Date", date.ToString(NPT_DateTime::FORMAT_RFC_1123)); 
-    }
-    static NPT_Result GetIfModifiedSince(const NPT_HttpMessage& message,
-                                         NPT_DateTime&          date) {
-        
-        const NPT_String* value = 
-        message.GetHeaders().GetHeaderValue("If-Modified-Since");
-        if (!value) return NPT_FAILURE;
-        
-        // Try RFC 1123, RFC 1036, then ANSI
-        if (NPT_SUCCEEDED(date.FromString(*value, NPT_DateTime::FORMAT_RFC_1123))) 
-            return NPT_SUCCESS;
-        if (NPT_SUCCEEDED(date.FromString(*value, NPT_DateTime::FORMAT_RFC_1036)))
-            return NPT_SUCCESS;
-        return date.FromString(*value, NPT_DateTime::FORMAT_ANSI);
-    }            
-    static NPT_Result SetIfModifiedSince(NPT_HttpMessage&    message,
-                                         const NPT_DateTime& date) {
-        return message.GetHeaders().SetHeader(
-                                              "If-Modified-Since",
-                                              date.ToString(NPT_DateTime::FORMAT_RFC_1123));
-    }
-    static NPT_Result GetMX(const NPT_HttpMessage& message, 
-                            NPT_UInt32&            value) { 
-        value = 0;
-        const NPT_String* mx = 
-        message.GetHeaders().GetHeaderValue("MX");
-        NPT_CHECK_POINTER(mx);
-        return NPT_ParseInteger32(*mx, value, false); // no relax to be UPnP compliant
-    }
-    static NPT_Result SetMX(NPT_HttpMessage& message, 
-                            const NPT_UInt32 mx) {
-        return message.GetHeaders().SetHeader(
-                                              "MX", 
-                                              NPT_String::FromInteger(mx)); 
-    }
-    static NPT_Result GetSeq(const NPT_HttpMessage& message,  
-                             NPT_UInt32&      value) { 
-        value = 0;
-        const NPT_String* seq = 
-        message.GetHeaders().GetHeaderValue("SEQ");
-        NPT_CHECK_POINTER(seq);
-        return NPT_ParseInteger32(*seq, value);
-    }
-    static NPT_Result SetSeq(NPT_HttpMessage& message, 
-                             const NPT_UInt32 seq) {
-        return message.GetHeaders().SetHeader(
-                                              "SEQ", 
-                                              NPT_String::FromInteger(seq)); 
-    }
-    static const char* GenerateUUID(int         count, 
-                                    NPT_String& uuid) {   
-        uuid = "";
-        for (int i=0;i<(count<100?count:100);i++) {
-            int random = NPT_System::GetRandomInteger();
-            uuid += (char)((random % 25) + 66);
-        }
-        return uuid;
-    }
-    
-    static const char* GenerateSerialNumber(NPT_String& sn, int count = 40) {
-        sn = "{";
-        for (int i=0;i<count;i++) {
-            char nibble = (char)(NPT_System::GetRandomInteger() % 16);
-            sn += (nibble < 10) ? ('0' + nibble) : ('a' + (nibble-10));
-        }
-        sn += "}";
-        return sn;
-    }
-    static const char* GenerateGUID(NPT_String& guid) {   
-        guid = "";
-        for (int i=0;i<32;i++) {
-            char nibble = (char)(NPT_System::GetRandomInteger() % 16);
-            guid += (nibble < 10) ? ('0' + nibble) : ('a' + (nibble-10));
-            if (i == 7 || i == 11 || i == 15 || i == 19) {
-                guid += '-';
-            }
-        }
-        return guid;
-    }
-    static NPT_Result ExtractLeaseTime(const NPT_String& cache_control, 
-                                       NPT_TimeInterval& lease) {
-        NPT_Int32 value;
-        if (cache_control.StartsWith("max-age=", true) &&
-            NPT_SUCCEEDED(NPT_ParseInteger32(cache_control.GetChars()+8, 
-                                             value))) {
-            lease.SetSeconds(value);
-            return NPT_SUCCESS;
-        }
-        return NPT_FAILURE;
-    }
-    static NPT_Result ExtractTimeOut(const char* timeout, 
-                                     NPT_Int32&  len) {
-        NPT_String temp = timeout;
-        if (temp.CompareN("Second-", 7, true)) {
-            return NPT_ERROR_INVALID_FORMAT;
-        }
-        
-        if (temp.Compare("Second-infinite", true) == 0) {
-            len = NPT_TIMEOUT_INFINITE;
-            return NPT_SUCCESS;
-        }
-        return temp.SubString(7).ToInteger(len);
-    }
-    static NPT_Result GetIPAddresses(NPT_List<NPT_IpAddress>& ips, 
-                                     bool with_localhost = false) {
-        NPT_List<NPT_NetworkInterface*> if_list;
-        NPT_CHECK(GetNetworkInterfaces(if_list, with_localhost));
-        
-        NPT_List<NPT_NetworkInterface*>::Iterator iface = if_list.GetFirstItem();
-        while (iface) {
-            NPT_IpAddress ip = (*(*iface)->GetAddresses().GetFirstItem()).GetPrimaryAddress();
-            if (ip.ToString().Compare("0.0.0.0") && 
-                (with_localhost || ip.ToString().Compare("127.0.0.1"))) {
-                ips.Add(ip);
-            }
-            ++iface;
-        }
-        
-        if (with_localhost && !ips.Find(NPT_IpAddressFinder(NPT_IpAddress(127, 0, 0, 1)))) {
-            NPT_IpAddress localhost;
-            localhost.Parse("127.0.0.1");
-            ips.Add(localhost);
-        }
-        
-        if_list.Apply(NPT_ObjectDeleter<NPT_NetworkInterface>());
-        return NPT_SUCCESS;
-    }
-    
-    static NPT_Result GetNetworkInterfaces(NPT_List<NPT_NetworkInterface*>& if_list, 
-                                           bool with_localhost = false) {
-        NPT_CHECK(_GetNetworkInterfaces(if_list, with_localhost, false));
-        
-        // if no valid interfaces or if requested, add localhost interface
-        if (if_list.GetItemCount() == 0) {
-            NPT_CHECK(_GetNetworkInterfaces(if_list, true, true));
-        }
-        return NPT_SUCCESS;
-    }
-    
-	static NPT_Result GetMACAddresses(NPT_List<NPT_String>& addresses) {
-        NPT_List<NPT_NetworkInterface*> if_list;
-        NPT_CHECK(GetNetworkInterfaces(if_list));
-        
-        NPT_List<NPT_NetworkInterface*>::Iterator iface = if_list.GetFirstItem();
-        while (iface) {
-            NPT_String ip = (*(*iface)->GetAddresses().GetFirstItem()).GetPrimaryAddress().ToString();
-            if (ip.Compare("0.0.0.0") && ip.Compare("127.0.0.1")) {
-				addresses.Add((*iface)->GetMacAddress().ToString());
-            }
-            ++iface;
-        }
-        
-        if_list.Apply(NPT_ObjectDeleter<NPT_NetworkInterface>());
-        return NPT_SUCCESS;
-    }
-    
-    
-	static bool IsLocalNetworkAddress(const NPT_IpAddress& address) {
-		if (address.ToString() == "127.0.0.1") return true;
-        
-		NPT_List<NPT_NetworkInterface*> if_list;
-        NPT_NetworkInterface::GetNetworkInterfaces(if_list);
-        
-		NPT_List<NPT_NetworkInterface*>::Iterator iface = if_list.GetFirstItem();
-        while (iface) {
-			if((*iface)->IsAddressInNetwork(address)) return true;
-            ++iface;
-        }
-        
-		if_list.Apply(NPT_ObjectDeleter<NPT_NetworkInterface>());
-		return false;
-	}
-    
-private:
-    
-    static NPT_Result _GetNetworkInterfaces(NPT_List<NPT_NetworkInterface*>& if_list,
-                                            bool include_localhost = false,
-                                            bool only_localhost = false) {
-        NPT_List<NPT_NetworkInterface*> _if_list;
-        NPT_CHECK(NPT_NetworkInterface::GetNetworkInterfaces(_if_list));
-        
-        NPT_NetworkInterface* iface;
-        while (NPT_SUCCEEDED(_if_list.PopHead(iface))) {
-            // only interested in non PTP & multicast capable interfaces
-            if ((iface->GetAddresses().GetItemCount() == 0) ||
-                !(iface->GetFlags() & NPT_NETWORK_INTERFACE_FLAG_MULTICAST) ||
-                 (iface->GetFlags() & NPT_NETWORK_INTERFACE_FLAG_POINT_TO_POINT)) {
-                delete iface;
-                continue;
-            }
-            
-            NPT_String ip = iface->GetAddresses().GetFirstItem()->GetPrimaryAddress().ToString();
-            
-            if (iface->GetFlags() & NPT_NETWORK_INTERFACE_FLAG_LOOPBACK) {
-                if (include_localhost || only_localhost) {
-                    if_list.Add(iface);
-                    continue;
-                }
-            } else if (ip.Compare("0.0.0.0") && !only_localhost) {
-                if_list.Add(iface);
-                continue;
-            }
-            
-            delete iface;
-        }
-        
-        // cleanup any remaining items in list if we breaked early
-        _if_list.Apply(NPT_ObjectDeleter<NPT_NetworkInterface>());
-        return NPT_SUCCESS;
-    }
-};
-
-#endif // _PLT_UTILITIES_H_
-
-
-
-
-
-
-
-
-
diff --git a/extra_lib/include/platinum/PltVersion.h b/extra_lib/include/platinum/PltVersion.h
deleted file mode 100644
index 5a947cd..0000000
--- a/extra_lib/include/platinum/PltVersion.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - Version Info
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-| 
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-#ifndef _PLT_VERSION_H_
-#define _PLT_VERSION_H_
-
-/*----------------------------------------------------------------------
-|   constants
-+---------------------------------------------------------------------*/
-#define PLT_PLATINUM_SDK_VERSION            0x00010411
-#define PLT_PLATINUM_SDK_VERSION_STRING     "1.0.4.11"
-
-#endif // _PLT_VERSION_H_
diff --git a/extra_lib/include/platinum/PltXbox360.h b/extra_lib/include/platinum/PltXbox360.h
deleted file mode 100644
index 014033f..0000000
--- a/extra_lib/include/platinum/PltXbox360.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - XBox 360
-|
-| Copyright (c) 2004-2010, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| licensing at plutinosoft.com
-| 
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-#ifndef _PLT_XBOX360_H_
-#define _PLT_XBOX360_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "PltMediaRenderer.h"
-
-class PLT_Xbox360 : public PLT_MediaRenderer
-{
-public:
-    PLT_Xbox360(const char*  uuid        = NULL, 
-                unsigned int port        = 0,
-                bool         port_rebind = false);
-
-protected:
-    // PLT_DeviceHost methods
-    virtual NPT_Result SetupServices();
-    virtual NPT_Result SetupIcons();
-    virtual NPT_Result InitServiceURLs(PLT_Service* service, const char* service_name);
-    
-    virtual NPT_Result Announce(PLT_DeviceData*  device, 
-                                NPT_HttpRequest& request, 
-                                NPT_UdpSocket&   socket, 
-                                bool             byebye);
-
-    // PLT_DeviceData methods
-    virtual NPT_Result GetDescription(NPT_String& desc) { return PLT_MediaRenderer::GetDescription(desc); }
-    virtual NPT_Result GetDescription(NPT_XmlElementNode*  parent, 
-                                      NPT_XmlElementNode** device = NULL);
-
-protected:
-    virtual ~PLT_Xbox360();
-
-    virtual NPT_Result AnnouncePresence(NPT_UdpSocket& socket, 
-                                        const char*    serial_number);
-};
-
-#endif /* _PLT_XBOX360_H_ */
diff --git a/extra_lib/include/platinum/PltXmlHelper.h b/extra_lib/include/platinum/PltXmlHelper.h
deleted file mode 100644
index be71cef..0000000
--- a/extra_lib/include/platinum/PltXmlHelper.h
+++ /dev/null
@@ -1,299 +0,0 @@
-/*****************************************************************
-|
-|   Platinum - Xml Helper
-|
-| Copyright (c) 2004-2008, Plutinosoft, LLC.
-| All rights reserved.
-| http://www.plutinosoft.com
-|
-| 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.
-|
-| OEMs, ISVs, VARs and other distributors that combine and 
-| distribute commercially licensed software with Platinum software
-| and do not wish to distribute the source code for the commercially
-| licensed software under version 2, or (at your option) any later
-| version, of the GNU General Public License (the "GPL") must enter
-| into a commercial license agreement with Plutinosoft, LLC.
-| 
-| 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; see the file LICENSE.txt. If not, write to
-| the Free Software Foundation, Inc., 
-| 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-| http://www.gnu.org/licenses/gpl-2.0.html
-|
-****************************************************************/
-
-#ifndef _PLT_XML_HELPER_H_
-#define _PLT_XML_HELPER_H_
-
-/*----------------------------------------------------------------------
-|   includes
-+---------------------------------------------------------------------*/
-#include "Neptune.h"
-/*----------------------------------------------------------------------
-|   PLT_XmlAttributeFinder
-+---------------------------------------------------------------------*/
-class PLT_XmlAttributeFinder
-{
-public:
-    // if 'namespc' is NULL, we're looking for ANY namespace
-    // if 'namespc' is '\0', we're looking for NO namespace
-    // if 'namespc' is non-empty, look for that SPECIFIC namespace
-    PLT_XmlAttributeFinder(const NPT_XmlElementNode& element, 
-                           const char*               name, 
-                           const char*               namespc) : 
-      m_Element(element), m_Name(name), m_Namespace(namespc) {}
-
-    bool operator()(const NPT_XmlAttribute* const & attribute) const {
-        if (attribute->GetName() == m_Name) {
-            if (m_Namespace) {
-                const NPT_String& prefix = attribute->GetPrefix();
-                if (m_Namespace[0] == '\0') {
-                    // match if the attribute has NO namespace
-                    return prefix.IsEmpty();
-                } else {
-                    // match if the attribute has the SPECIFIC namespace
-                    // we're looking for
-                    const NPT_String* namespc = m_Element.GetNamespaceUri(prefix);
-                    return namespc && *namespc == m_Namespace;
-                }
-            } else {
-                // ANY namespace will match
-                return true;
-            }
-        } else {
-            return false;
-        }
-    }
-
-private:
-    const NPT_XmlElementNode& m_Element;
-    const char*               m_Name;
-    const char*               m_Namespace;
-};
-
-/*----------------------------------------------------------------------
-|   PLT_XmlHelper
-+---------------------------------------------------------------------*/
-class PLT_XmlHelper
-{
-public:
-
-    // static methods
-    static NPT_Result GetChildText(NPT_XmlElementNode* node, 
-                                   const char*         tag, 
-                                   NPT_String&         value,
-                                   const char*         namespc = "") {
-        value = "";
-
-        if (!node) return NPT_FAILURE;
-
-        // special case "" means we look for the same namespace as the parent
-        if (namespc && namespc[0] == '\0') namespc = node->GetNamespace()?node->GetNamespace()->GetChars():NPT_XML_NO_NAMESPACE;
-
-        NPT_XmlElementNode* child = node->GetChild(tag, namespc);
-        if (!child) return NPT_FAILURE;
-
-        const NPT_String* text = child->GetText();
-        value = text?*text:"";
-        return NPT_SUCCESS;
-    }
-                                   
-    static NPT_Result RemoveAttribute(NPT_XmlElementNode* node, 
-                                      const char*         name,
-                                      const char*         namespc = "") {
-        if (!node) return NPT_FAILURE;
-
-        // special case "" means we look for the same namespace as the parent
-        if (namespc && namespc[0] == '\0') namespc = node->GetNamespace()?node->GetNamespace()->GetChars():NPT_XML_NO_NAMESPACE;
-
-        NPT_List<NPT_XmlAttribute*>::Iterator attribute;
-        attribute = node->GetAttributes().Find(PLT_XmlAttributeFinder(*node, name, namespc));
-        if (!attribute) return NPT_FAILURE;
-
-        delete *attribute;
-        NPT_CHECK(node->GetAttributes().Erase(attribute));
-
-        return NPT_SUCCESS;
-    }
-                                   
-    static NPT_Result GetAttribute(NPT_XmlElementNode* node, 
-                                   const char*         name,
-                                   NPT_XmlAttribute*&  attr,
-                                   const char*         namespc = "") {
-        attr = NULL;
-
-        if (!node) return NPT_FAILURE;
-
-        // special case "" means we look for the same namespace as the parent
-        if (namespc && namespc[0] == '\0') namespc = node->GetNamespace()?node->GetNamespace()->GetChars():NPT_XML_NO_NAMESPACE;
-
-        NPT_List<NPT_XmlAttribute*>::Iterator attribute;
-        attribute = node->GetAttributes().Find(PLT_XmlAttributeFinder(*node, name, namespc));
-        if (!attribute) return NPT_FAILURE;
-
-        attr = (*attribute);
-        return NPT_SUCCESS;
-    }
-
-    static NPT_Result GetAttribute(NPT_XmlElementNode* node, 
-                                   const char*         name,
-                                   NPT_String&         value,
-                                   const char*         namespc = "") {
-        value = "";
-        
-        NPT_XmlAttribute* attribute = NULL;
-        NPT_CHECK(GetAttribute(node, name, attribute, namespc));
-        if (!attribute) return NPT_FAILURE;
-
-        value = attribute->GetValue();
-        return NPT_SUCCESS;
-    }
-
-    static NPT_Result SetAttribute(NPT_XmlElementNode* node, 
-                                   const char*         name,
-                                   NPT_String&         value,
-                                   const char*         namespc = "") {
-        NPT_XmlAttribute* attribute = NULL;
-        NPT_CHECK(GetAttribute(node, name, attribute, namespc));
-        if (!attribute) return NPT_FAILURE;
-
-        attribute->SetValue(value);
-        return NPT_SUCCESS;
-    }
-
-    static NPT_Result AddChildText(NPT_XmlElementNode* node,
-                                   const char*         tag,
-                                   const char*         text,
-                                   const char*         prefix = NULL) {
-        if (!node) return NPT_FAILURE;
-        NPT_XmlElementNode* child = new NPT_XmlElementNode(prefix, tag);
-        child->AddText(text);
-        return node->AddChild(child);
-    }
-
-    static bool IsMatch(const NPT_XmlNode* const & node, const char* tag, const char* namespc_mapped) {
-        // if m_Namespace is NULL, we're looking for ANY namespace
-        // if m_Namespace is '\0', we're looking for NO namespace
-        // if m_Namespace is non-empty, look for that SPECIFIC namespace
-        
-        const NPT_XmlElementNode* element = node->AsElementNode();
-        // is tag the same (case sensitive)?
-        if (element && element->GetTag() == tag) {
-            if (namespc_mapped) {
-                // look for a SPECIFIC namespace or NO namespace
-                const NPT_String* namespc = element->GetNamespace();
-                if (namespc) {
-                    // the element has a namespace, match if it is equal to
-                    // what we're looking for
-                    return *namespc == namespc_mapped;
-                } else {
-                    // the element does not have a namespace, match if we're
-                    // looking for NO namespace
-                    return namespc_mapped[0] == '\0';
-                }
-            } else {
-                // ANY namespace will match
-                return true;
-            }
-        }
-        return false;
-    } 
-
-    static NPT_Result GetChildren(NPT_XmlElementNode*              node,
-                                  NPT_Array<NPT_XmlElementNode*>&  children,
-                                  const char*                      tag,
-                                  const char*                      namespc = "") {
-        if (!node) return NPT_FAILURE;
-
-        // special case "" means we look for the same namespace as the parent
-        if (namespc && namespc[0] == '\0') namespc = node->GetNamespace()?node->GetNamespace()->GetChars():NPT_XML_NO_NAMESPACE;
-
-        const char* namespc_mapped = (namespc==NULL)?"":(namespc[0]=='*' && namespc[1]=='\0')?NULL:namespc;
-
-        // get all children first
-        NPT_List<NPT_XmlNode*>& allchildren = node->GetChildren();
-
-        // iterate through children and add only elements with matching tag
-        NPT_List<NPT_XmlNode*>::Iterator child = allchildren.GetFirstItem();
-        while  (child) {
-            if (IsMatch(*child, tag, namespc_mapped)) {
-                children.Add((*child)->AsElementNode());
-            }
-            ++child;
-        }
-        return NPT_SUCCESS;
-    }
-
-    static NPT_XmlElementNode* GetChild(NPT_XmlElementNode* node,
-                                        const char*         tag,
-                                        const char*         namespc = "") {
-        if (!node) return NULL;
-
-        // special case "" means we look for the same namespace as the parent
-        if (namespc && namespc[0] == '\0') namespc = node->GetNamespace()?node->GetNamespace()->GetChars():NPT_XML_NO_NAMESPACE;
-
-        return node->GetChild(tag, namespc);
-    }
-
-    static NPT_Result GetChild(NPT_XmlElementNode*  parent,
-                               NPT_XmlElementNode*& child,
-                               NPT_Ordinal          n = 0) {
-        if (!parent) return NPT_FAILURE;
-
-        // reset child
-        child = NULL;
-
-        // get all children first
-        NPT_List<NPT_XmlNode*>::Iterator children = parent->GetChildren().GetFirstItem();
-        while  (children) {
-            if ((*children)->AsElementNode() && n-- == 0) {
-                child = (*children)->AsElementNode();
-                return NPT_SUCCESS;
-            }
-            children++;
-        }
-
-        return NPT_FAILURE;
-    }
-
-    static NPT_Result Serialize(NPT_XmlNode& node, NPT_String& xml, bool add_header = true) {
-        NPT_XmlWriter writer(0);
-        NPT_StringOutputStreamReference stream(new NPT_StringOutputStream(&xml));
-        NPT_CHECK(writer.Serialize(node, *stream, add_header));
-        return NPT_SUCCESS;
-    }
-
-	static NPT_String Serialize(NPT_XmlNode& node, bool add_header = true) {
-		NPT_XmlWriter writer(0);
-		NPT_String xml;
-		NPT_StringOutputStreamReference stream(new NPT_StringOutputStream(&xml));
-		if (NPT_FAILED(writer.Serialize(node, *stream, add_header))) {
-			NPT_Debug("Failed to serialize xml node");
-			return "";
-		}
-
-		return xml;
-	}
-private:
-    // members
-};
-
-#endif // _PLT_XML_HELPER_H_
-
-
-
-
-
-
-
-
-
diff --git a/extra_lib/include/png/png.h b/extra_lib/include/png/png.h
deleted file mode 100644
index 7faa021..0000000
--- a/extra_lib/include/png/png.h
+++ /dev/null
@@ -1,3597 +0,0 @@
-/* png.h - header file for PNG reference library
- *
- * libpng version 1.2.33 - October 31, 2008
- * Copyright (c) 1998-2008 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
- *
- * Authors and maintainers:
- *  libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
- *  libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
- *  libpng versions 0.97, January 1998, through 1.2.33 - October 31, 2008: Glenn
- *  See also "Contributing Authors", below.
- *
- * Note about libpng version numbers:
- *
- *    Due to various miscommunications, unforeseen code incompatibilities
- *    and occasional factors outside the authors' control, version numbering
- *    on the library has not always been consistent and straightforward.
- *    The following table summarizes matters since version 0.89c, which was
- *    the first widely used release:
- *
- *    source                 png.h  png.h  shared-lib
- *    version                string   int  version
- *    -------                ------ -----  ----------
- *    0.89c "1.0 beta 3"     0.89      89  1.0.89
- *    0.90  "1.0 beta 4"     0.90      90  0.90  [should have been 2.0.90]
- *    0.95  "1.0 beta 5"     0.95      95  0.95  [should have been 2.0.95]
- *    0.96  "1.0 beta 6"     0.96      96  0.96  [should have been 2.0.96]
- *    0.97b "1.00.97 beta 7" 1.00.97   97  1.0.1 [should have been 2.0.97]
- *    0.97c                  0.97      97  2.0.97
- *    0.98                   0.98      98  2.0.98
- *    0.99                   0.99      98  2.0.99
- *    0.99a-m                0.99      99  2.0.99
- *    1.00                   1.00     100  2.1.0 [100 should be 10000]
- *    1.0.0      (from here on, the   100  2.1.0 [100 should be 10000]
- *    1.0.1       png.h string is   10001  2.1.0
- *    1.0.1a-e    identical to the  10002  from here on, the shared library
- *    1.0.2       source version)   10002  is 2.V where V is the source code
- *    1.0.2a-b                      10003  version, except as noted.
- *    1.0.3                         10003
- *    1.0.3a-d                      10004
- *    1.0.4                         10004
- *    1.0.4a-f                      10005
- *    1.0.5 (+ 2 patches)           10005
- *    1.0.5a-d                      10006
- *    1.0.5e-r                      10100 (not source compatible)
- *    1.0.5s-v                      10006 (not binary compatible)
- *    1.0.6 (+ 3 patches)           10006 (still binary incompatible)
- *    1.0.6d-f                      10007 (still binary incompatible)
- *    1.0.6g                        10007
- *    1.0.6h                        10007  10.6h (testing xy.z so-numbering)
- *    1.0.6i                        10007  10.6i
- *    1.0.6j                        10007  2.1.0.6j (incompatible with 1.0.0)
- *    1.0.7beta11-14        DLLNUM  10007  2.1.0.7beta11-14 (binary compatible)
- *    1.0.7beta15-18           1    10007  2.1.0.7beta15-18 (binary compatible)
- *    1.0.7rc1-2               1    10007  2.1.0.7rc1-2 (binary compatible)
- *    1.0.7                    1    10007  (still compatible)
- *    1.0.8beta1-4             1    10008  2.1.0.8beta1-4
- *    1.0.8rc1                 1    10008  2.1.0.8rc1
- *    1.0.8                    1    10008  2.1.0.8
- *    1.0.9beta1-6             1    10009  2.1.0.9beta1-6
- *    1.0.9rc1                 1    10009  2.1.0.9rc1
- *    1.0.9beta7-10            1    10009  2.1.0.9beta7-10
- *    1.0.9rc2                 1    10009  2.1.0.9rc2
- *    1.0.9                    1    10009  2.1.0.9
- *    1.0.10beta1              1    10010  2.1.0.10beta1
- *    1.0.10rc1                1    10010  2.1.0.10rc1
- *    1.0.10                   1    10010  2.1.0.10
- *    1.0.11beta1-3            1    10011  2.1.0.11beta1-3
- *    1.0.11rc1                1    10011  2.1.0.11rc1
- *    1.0.11                   1    10011  2.1.0.11
- *    1.0.12beta1-2            2    10012  2.1.0.12beta1-2
- *    1.0.12rc1                2    10012  2.1.0.12rc1
- *    1.0.12                   2    10012  2.1.0.12
- *    1.1.0a-f                 -    10100  2.1.1.0a-f (branch abandoned)
- *    1.2.0beta1-2             2    10200  2.1.2.0beta1-2
- *    1.2.0beta3-5             3    10200  3.1.2.0beta3-5
- *    1.2.0rc1                 3    10200  3.1.2.0rc1
- *    1.2.0                    3    10200  3.1.2.0
- *    1.2.1beta1-4             3    10201  3.1.2.1beta1-4
- *    1.2.1rc1-2               3    10201  3.1.2.1rc1-2
- *    1.2.1                    3    10201  3.1.2.1
- *    1.2.2beta1-6            12    10202  12.so.0.1.2.2beta1-6
- *    1.0.13beta1             10    10013  10.so.0.1.0.13beta1
- *    1.0.13rc1               10    10013  10.so.0.1.0.13rc1
- *    1.2.2rc1                12    10202  12.so.0.1.2.2rc1
- *    1.0.13                  10    10013  10.so.0.1.0.13
- *    1.2.2                   12    10202  12.so.0.1.2.2
- *    1.2.3rc1-6              12    10203  12.so.0.1.2.3rc1-6
- *    1.2.3                   12    10203  12.so.0.1.2.3
- *    1.2.4beta1-3            13    10204  12.so.0.1.2.4beta1-3
- *    1.0.14rc1               13    10014  10.so.0.1.0.14rc1
- *    1.2.4rc1                13    10204  12.so.0.1.2.4rc1
- *    1.0.14                  10    10014  10.so.0.1.0.14
- *    1.2.4                   13    10204  12.so.0.1.2.4
- *    1.2.5beta1-2            13    10205  12.so.0.1.2.5beta1-2
- *    1.0.15rc1-3             10    10015  10.so.0.1.0.15rc1-3
- *    1.2.5rc1-3              13    10205  12.so.0.1.2.5rc1-3
- *    1.0.15                  10    10015  10.so.0.1.0.15
- *    1.2.5                   13    10205  12.so.0.1.2.5
- *    1.2.6beta1-4            13    10206  12.so.0.1.2.6beta1-4
- *    1.0.16                  10    10016  10.so.0.1.0.16
- *    1.2.6                   13    10206  12.so.0.1.2.6
- *    1.2.7beta1-2            13    10207  12.so.0.1.2.7beta1-2
- *    1.0.17rc1               10    10017  10.so.0.1.0.17rc1
- *    1.2.7rc1                13    10207  12.so.0.1.2.7rc1
- *    1.0.17                  10    10017  10.so.0.1.0.17
- *    1.2.7                   13    10207  12.so.0.1.2.7
- *    1.2.8beta1-5            13    10208  12.so.0.1.2.8beta1-5
- *    1.0.18rc1-5             10    10018  10.so.0.1.0.18rc1-5
- *    1.2.8rc1-5              13    10208  12.so.0.1.2.8rc1-5
- *    1.0.18                  10    10018  10.so.0.1.0.18
- *    1.2.8                   13    10208  12.so.0.1.2.8
- *    1.2.9beta1-3            13    10209  12.so.0.1.2.9beta1-3
- *    1.2.9beta4-11           13    10209  12.so.0.9[.0]
- *    1.2.9rc1                13    10209  12.so.0.9[.0]
- *    1.2.9                   13    10209  12.so.0.9[.0]
- *    1.2.10beta1-8           13    10210  12.so.0.10[.0]
- *    1.2.10rc1-3             13    10210  12.so.0.10[.0]
- *    1.2.10                  13    10210  12.so.0.10[.0]
- *    1.2.11beta1-4           13    10211  12.so.0.11[.0]
- *    1.0.19rc1-5             10    10019  10.so.0.19[.0]
- *    1.2.11rc1-5             13    10211  12.so.0.11[.0]
- *    1.0.19                  10    10019  10.so.0.19[.0]
- *    1.2.11                  13    10211  12.so.0.11[.0]
- *    1.0.20                  10    10020  10.so.0.20[.0]
- *    1.2.12                  13    10212  12.so.0.12[.0]
- *    1.2.13beta1             13    10213  12.so.0.13[.0]
- *    1.0.21                  10    10021  10.so.0.21[.0]
- *    1.2.13                  13    10213  12.so.0.13[.0]
- *    1.2.14beta1-2           13    10214  12.so.0.14[.0]
- *    1.0.22rc1               10    10022  10.so.0.22[.0]
- *    1.2.14rc1               13    10214  12.so.0.14[.0]
- *    1.0.22                  10    10022  10.so.0.22[.0]
- *    1.2.14                  13    10214  12.so.0.14[.0]
- *    1.2.15beta1-6           13    10215  12.so.0.15[.0]
- *    1.0.23rc1-5             10    10023  10.so.0.23[.0]
- *    1.2.15rc1-5             13    10215  12.so.0.15[.0]
- *    1.0.23                  10    10023  10.so.0.23[.0]
- *    1.2.15                  13    10215  12.so.0.15[.0]
- *    1.2.16beta1-2           13    10216  12.so.0.16[.0]
- *    1.2.16rc1               13    10216  12.so.0.16[.0]
- *    1.0.24                  10    10024  10.so.0.24[.0]
- *    1.2.16                  13    10216  12.so.0.16[.0]
- *    1.2.17beta1-2           13    10217  12.so.0.17[.0]
- *    1.0.25rc1               10    10025  10.so.0.25[.0]
- *    1.2.17rc1-3             13    10217  12.so.0.17[.0]
- *    1.0.25                  10    10025  10.so.0.25[.0]
- *    1.2.17                  13    10217  12.so.0.17[.0]
- *    1.0.26                  10    10026  10.so.0.26[.0]
- *    1.2.18                  13    10218  12.so.0.18[.0]
- *    1.2.19beta1-31          13    10219  12.so.0.19[.0]
- *    1.0.27rc1-6             10    10027  10.so.0.27[.0]
- *    1.2.19rc1-6             13    10219  12.so.0.19[.0]
- *    1.0.27                  10    10027  10.so.0.27[.0]
- *    1.2.19                  13    10219  12.so.0.19[.0]
- *    1.2.20beta01-04         13    10220  12.so.0.20[.0]
- *    1.0.28rc1-6             10    10028  10.so.0.28[.0]
- *    1.2.20rc1-6             13    10220  12.so.0.20[.0]
- *    1.0.28                  10    10028  10.so.0.28[.0]
- *    1.2.20                  13    10220  12.so.0.20[.0]
- *    1.2.21beta1-2           13    10221  12.so.0.21[.0]
- *    1.2.21rc1-3             13    10221  12.so.0.21[.0]
- *    1.0.29                  10    10029  10.so.0.29[.0]
- *    1.2.21                  13    10221  12.so.0.21[.0]
- *    1.2.22beta1-4           13    10222  12.so.0.22[.0]
- *    1.0.30rc1               10    10030  10.so.0.30[.0]
- *    1.2.22rc1               13    10222  12.so.0.22[.0]
- *    1.0.30                  10    10030  10.so.0.30[.0]
- *    1.2.22                  13    10222  12.so.0.22[.0]
- *    1.2.23beta01-05         13    10223  12.so.0.23[.0]
- *    1.2.23rc01              13    10223  12.so.0.23[.0]
- *    1.2.23                  13    10223  12.so.0.23[.0]
- *    1.2.24beta01-02         13    10224  12.so.0.24[.0]
- *    1.2.24rc01              13    10224  12.so.0.24[.0]
- *    1.2.24                  13    10224  12.so.0.24[.0]
- *    1.2.25beta01-06         13    10225  12.so.0.25[.0]
- *    1.2.25rc01-02           13    10225  12.so.0.25[.0]
- *    1.0.31                  10    10031  10.so.0.31[.0]
- *    1.2.25                  13    10225  12.so.0.25[.0]
- *    1.2.26beta01-06         13    10226  12.so.0.26[.0]
- *    1.2.26rc01              13    10226  12.so.0.26[.0]
- *    1.2.26                  13    10226  12.so.0.26[.0]
- *    1.0.32                  10    10032  10.so.0.32[.0]
- *    1.2.27beta01-06         13    10227  12.so.0.27[.0]
- *    1.2.27rc01              13    10227  12.so.0.27[.0]
- *    1.0.33                  10    10033  10.so.0.33[.0]
- *    1.2.27                  13    10227  12.so.0.27[.0]
- *    1.0.34                  10    10034  10.so.0.34[.0]
- *    1.2.28                  13    10228  12.so.0.28[.0]
- *    1.2.29beta01-03         13    10229  12.so.0.29[.0]
- *    1.2.29rc01              13    10229  12.so.0.29[.0]
- *    1.0.35                  10    10035  10.so.0.35[.0]
- *    1.2.29                  13    10229  12.so.0.29[.0]
- *    1.0.37                  10    10037  10.so.0.37[.0]
- *    1.2.30beta01-04         13    10230  12.so.0.30[.0]
- *    1.0.38rc01-08           10    10038  10.so.0.38[.0]
- *    1.2.30rc01-08           13    10230  12.so.0.30[.0]
- *    1.0.38                  10    10038  10.so.0.38[.0]
- *    1.2.30                  13    10230  12.so.0.30[.0]
- *    1.0.39rc01-03           10    10039  10.so.0.39[.0]
- *    1.2.31rc01-03           13    10231  12.so.0.31[.0]
- *    1.0.39                  10    10039  10.so.0.39[.0]
- *    1.2.31                  13    10231  12.so.0.31[.0]
- *    1.2.32beta01-02         13    10232  12.so.0.32[.0]
- *    1.0.40rc01              10    10040  10.so.0.40[.0]
- *    1.2.32rc01              13    10232  12.so.0.32[.0]
- *    1.0.40                  10    10040  10.so.0.40[.0]
- *    1.2.32                  13    10232  12.so.0.32[.0]
- *    1.2.33beta01-02         13    10233  12.so.0.33[.0]
- *    1.2.33rc01-02           13    10233  12.so.0.33[.0]
- *    1.0.41rc01              10    10041  10.so.0.41[.0]
- *    1.2.33                  13    10233  12.so.0.33[.0]
- *    1.0.41                  10    10041  10.so.0.41[.0]
- *
- *    Henceforth the source version will match the shared-library major
- *    and minor numbers; the shared-library major version number will be
- *    used for changes in backward compatibility, as it is intended.  The
- *    PNG_LIBPNG_VER macro, which is not used within libpng but is available
- *    for applications, is an unsigned integer of the form xyyzz corresponding
- *    to the source version x.y.z (leading zeros in y and z).  Beta versions
- *    were given the previous public release number plus a letter, until
- *    version 1.0.6j; from then on they were given the upcoming public
- *    release number plus "betaNN" or "rcNN".
- *
- *    Binary incompatibility exists only when applications make direct access
- *    to the info_ptr or png_ptr members through png.h, and the compiled
- *    application is loaded with a different version of the library.
- *
- *    DLLNUM will change each time there are forward or backward changes
- *    in binary compatibility (e.g., when a new feature is added).
- *
- * See libpng.txt or libpng.3 for more information.  The PNG specification
- * is available as a W3C Recommendation and as an ISO Specification,
- * <http://www.w3.org/TR/2003/REC-PNG-20031110/
- */
-
-/*
- * COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
- *
- * If you modify libpng you may insert additional notices immediately following
- * this sentence.
- *
- * libpng versions 1.2.6, August 15, 2004, through 1.2.33, October 31, 2008, are
- * Copyright (c) 2004, 2006-2008 Glenn Randers-Pehrson, and are
- * distributed according to the same disclaimer and license as libpng-1.2.5
- * with the following individual added to the list of Contributing Authors:
- *
- *    Cosmin Truta
- *
- * libpng versions 1.0.7, July 1, 2000, through 1.2.5, October 3, 2002, are
- * Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are
- * distributed according to the same disclaimer and license as libpng-1.0.6
- * with the following individuals added to the list of Contributing Authors:
- *
- *    Simon-Pierre Cadieux
- *    Eric S. Raymond
- *    Gilles Vollant
- *
- * and with the following additions to the disclaimer:
- *
- *    There is no warranty against interference with your enjoyment of the
- *    library or against infringement.  There is no warranty that our
- *    efforts or the library will fulfill any of your particular purposes
- *    or needs.  This library is provided with all faults, and the entire
- *    risk of satisfactory quality, performance, accuracy, and effort is with
- *    the user.
- *
- * libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
- * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson, and are
- * distributed according to the same disclaimer and license as libpng-0.96,
- * with the following individuals added to the list of Contributing Authors:
- *
- *    Tom Lane
- *    Glenn Randers-Pehrson
- *    Willem van Schaik
- *
- * libpng versions 0.89, June 1996, through 0.96, May 1997, are
- * Copyright (c) 1996, 1997 Andreas Dilger
- * Distributed according to the same disclaimer and license as libpng-0.88,
- * with the following individuals added to the list of Contributing Authors:
- *
- *    John Bowler
- *    Kevin Bracey
- *    Sam Bushell
- *    Magnus Holmgren
- *    Greg Roelofs
- *    Tom Tanner
- *
- * libpng versions 0.5, May 1995, through 0.88, January 1996, are
- * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
- *
- * For the purposes of this copyright and license, "Contributing Authors"
- * is defined as the following set of individuals:
- *
- *    Andreas Dilger
- *    Dave Martindale
- *    Guy Eric Schalnat
- *    Paul Schmidt
- *    Tim Wegner
- *
- * The PNG Reference Library is supplied "AS IS".  The Contributing Authors
- * and Group 42, Inc. disclaim all warranties, expressed or implied,
- * including, without limitation, the warranties of merchantability and of
- * fitness for any purpose.  The Contributing Authors and Group 42, Inc.
- * assume no liability for direct, indirect, incidental, special, exemplary,
- * or consequential damages, which may result from the use of the PNG
- * Reference Library, even if advised of the possibility of such damage.
- *
- * Permission is hereby granted to use, copy, modify, and distribute this
- * source code, or portions hereof, for any purpose, without fee, subject
- * to the following restrictions:
- *
- * 1. The origin of this source code must not be misrepresented.
- *
- * 2. Altered versions must be plainly marked as such and
- * must not be misrepresented as being the original source.
- *
- * 3. This Copyright notice may not be removed or altered from
- *    any source or altered source distribution.
- *
- * The Contributing Authors and Group 42, Inc. specifically permit, without
- * fee, and encourage the use of this source code as a component to
- * supporting the PNG file format in commercial products.  If you use this
- * source code in a product, acknowledgment is not required but would be
- * appreciated.
- */
-
-/*
- * A "png_get_copyright" function is available, for convenient use in "about"
- * boxes and the like:
- *
- * printf("%s",png_get_copyright(NULL));
- *
- * Also, the PNG logo (in PNG format, of course) is supplied in the
- * files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
- */
-
-/*
- * Libpng is OSI Certified Open Source Software.  OSI Certified is a
- * certification mark of the Open Source Initiative.
- */
-
-/*
- * The contributing authors would like to thank all those who helped
- * with testing, bug fixes, and patience.  This wouldn't have been
- * possible without all of you.
- *
- * Thanks to Frank J. T. Wojcik for helping with the documentation.
- */
-
-/*
- * Y2K compliance in libpng:
- * =========================
- *
- *    October 31, 2008
- *
- *    Since the PNG Development group is an ad-hoc body, we can't make
- *    an official declaration.
- *
- *    This is your unofficial assurance that libpng from version 0.71 and
- *    upward through 1.2.33 are Y2K compliant.  It is my belief that earlier
- *    versions were also Y2K compliant.
- *
- *    Libpng only has three year fields.  One is a 2-byte unsigned integer
- *    that will hold years up to 65535.  The other two hold the date in text
- *    format, and will hold years up to 9999.
- *
- *    The integer is
- *        "png_uint_16 year" in png_time_struct.
- *
- *    The strings are
- *        "png_charp time_buffer" in png_struct and
- *        "near_time_buffer", which is a local character string in png.c.
- *
- *    There are seven time-related functions:
- *        png.c: png_convert_to_rfc_1123() in png.c
- *          (formerly png_convert_to_rfc_1152() in error)
- *        png_convert_from_struct_tm() in pngwrite.c, called in pngwrite.c
- *        png_convert_from_time_t() in pngwrite.c
- *        png_get_tIME() in pngget.c
- *        png_handle_tIME() in pngrutil.c, called in pngread.c
- *        png_set_tIME() in pngset.c
- *        png_write_tIME() in pngwutil.c, called in pngwrite.c
- *
- *    All handle dates properly in a Y2K environment.  The
- *    png_convert_from_time_t() function calls gmtime() to convert from system
- *    clock time, which returns (year - 1900), which we properly convert to
- *    the full 4-digit year.  There is a possibility that applications using
- *    libpng are not passing 4-digit years into the png_convert_to_rfc_1123()
- *    function, or that they are incorrectly passing only a 2-digit year
- *    instead of "year - 1900" into the png_convert_from_struct_tm() function,
- *    but this is not under our control.  The libpng documentation has always
- *    stated that it works with 4-digit years, and the APIs have been
- *    documented as such.
- *
- *    The tIME chunk itself is also Y2K compliant.  It uses a 2-byte unsigned
- *    integer to hold the year, and can hold years as large as 65535.
- *
- *    zlib, upon which libpng depends, is also Y2K compliant.  It contains
- *    no date-related code.
- *
- *       Glenn Randers-Pehrson
- *       libpng maintainer
- *       PNG Development Group
- */
-
-#ifndef PNG_H
-#define PNG_H
-
-/* This is not the place to learn how to use libpng.  The file libpng.txt
- * describes how to use libpng, and the file example.c summarizes it
- * with some code on which to build.  This file is useful for looking
- * at the actual function definitions and structure components.
- */
-
-/* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.2.33"
-#define PNG_HEADER_VERSION_STRING \
-   " libpng version 1.2.33 - October 31, 2008\n"
-
-#define PNG_LIBPNG_VER_SONUM   0
-#define PNG_LIBPNG_VER_DLLNUM  13
-
-/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
-#define PNG_LIBPNG_VER_MAJOR   1
-#define PNG_LIBPNG_VER_MINOR   2
-#define PNG_LIBPNG_VER_RELEASE 33
-/* This should match the numeric part of the final component of
- * PNG_LIBPNG_VER_STRING, omitting any leading zero: */
-
-#define PNG_LIBPNG_VER_BUILD  0
-
-/* Release Status */
-#define PNG_LIBPNG_BUILD_ALPHA    1
-#define PNG_LIBPNG_BUILD_BETA     2
-#define PNG_LIBPNG_BUILD_RC       3
-#define PNG_LIBPNG_BUILD_STABLE   4
-#define PNG_LIBPNG_BUILD_RELEASE_STATUS_MASK 7
-  
-/* Release-Specific Flags */
-#define PNG_LIBPNG_BUILD_PATCH    8 /* Can be OR'ed with
-                                       PNG_LIBPNG_BUILD_STABLE only */
-#define PNG_LIBPNG_BUILD_PRIVATE 16 /* Cannot be OR'ed with
-                                       PNG_LIBPNG_BUILD_SPECIAL */
-#define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with
-                                       PNG_LIBPNG_BUILD_PRIVATE */
-
-#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_STABLE
-
-/* Careful here.  At one time, Guy wanted to use 082, but that would be octal.
- * We must not include leading zeros.
- * Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only
- * version 1.0.0 was mis-numbered 100 instead of 10000).  From
- * version 1.0.1 it's    xxyyzz, where x=major, y=minor, z=release */
-#define PNG_LIBPNG_VER 10233 /* 1.2.33 */
-
-#ifndef PNG_VERSION_INFO_ONLY
-/* include the compression library's header */
-#include "zlib.h"
-#endif
-
-/* include all user configurable info, including optional assembler routines */
-#include "pngconf.h"
-
-/*
- * Added at libpng-1.2.8 */
-/* Ref MSDN: Private as priority over Special
- * VS_FF_PRIVATEBUILD File *was not* built using standard release
- * procedures. If this value is given, the StringFileInfo block must
- * contain a PrivateBuild string. 
- *
- * VS_FF_SPECIALBUILD File *was* built by the original company using
- * standard release procedures but is a variation of the standard
- * file of the same version number. If this value is given, the
- * StringFileInfo block must contain a SpecialBuild string. 
- */
-
-#if defined(PNG_USER_PRIVATEBUILD)
-#  define PNG_LIBPNG_BUILD_TYPE \
-          (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_PRIVATE)
-#else
-#  if defined(PNG_LIBPNG_SPECIALBUILD)
-#    define PNG_LIBPNG_BUILD_TYPE \
-            (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_SPECIAL)
-#  else
-#    define PNG_LIBPNG_BUILD_TYPE (PNG_LIBPNG_BUILD_BASE_TYPE)
-#  endif
-#endif
-
-#ifndef PNG_VERSION_INFO_ONLY
-
-/* Inhibit C++ name-mangling for libpng functions but not for system calls. */
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/* This file is arranged in several sections.  The first section contains
- * structure and type definitions.  The second section contains the external
- * library functions, while the third has the internal library functions,
- * which applications aren't expected to use directly.
- */
-
-#ifndef PNG_NO_TYPECAST_NULL
-#define int_p_NULL                (int *)NULL
-#define png_bytep_NULL            (png_bytep)NULL
-#define png_bytepp_NULL           (png_bytepp)NULL
-#define png_doublep_NULL          (png_doublep)NULL
-#define png_error_ptr_NULL        (png_error_ptr)NULL
-#define png_flush_ptr_NULL        (png_flush_ptr)NULL
-#define png_free_ptr_NULL         (png_free_ptr)NULL
-#define png_infopp_NULL           (png_infopp)NULL
-#define png_malloc_ptr_NULL       (png_malloc_ptr)NULL
-#define png_read_status_ptr_NULL  (png_read_status_ptr)NULL
-#define png_rw_ptr_NULL           (png_rw_ptr)NULL
-#define png_structp_NULL          (png_structp)NULL
-#define png_uint_16p_NULL         (png_uint_16p)NULL
-#define png_voidp_NULL            (png_voidp)NULL
-#define png_write_status_ptr_NULL (png_write_status_ptr)NULL
-#else
-#define int_p_NULL                NULL
-#define png_bytep_NULL            NULL
-#define png_bytepp_NULL           NULL
-#define png_doublep_NULL          NULL
-#define png_error_ptr_NULL        NULL
-#define png_flush_ptr_NULL        NULL
-#define png_free_ptr_NULL         NULL
-#define png_infopp_NULL           NULL
-#define png_malloc_ptr_NULL       NULL
-#define png_read_status_ptr_NULL  NULL
-#define png_rw_ptr_NULL           NULL
-#define png_structp_NULL          NULL
-#define png_uint_16p_NULL         NULL
-#define png_voidp_NULL            NULL
-#define png_write_status_ptr_NULL NULL
-#endif
-
-/* variables declared in png.c - only it needs to define PNG_NO_EXTERN */
-#if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN)
-/* Version information for C files, stored in png.c.  This had better match
- * the version above.
- */
-#ifdef PNG_USE_GLOBAL_ARRAYS
-PNG_EXPORT_VAR (PNG_CONST char) png_libpng_ver[18];
-  /* need room for 99.99.99beta99z */
-#else
-#define png_libpng_ver png_get_header_ver(NULL)
-#endif
-
-#ifdef PNG_USE_GLOBAL_ARRAYS
-/* This was removed in version 1.0.5c */
-/* Structures to facilitate easy interlacing.  See png.c for more details */
-PNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_start[7];
-PNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_inc[7];
-PNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_ystart[7];
-PNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_yinc[7];
-PNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_mask[7];
-PNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_dsp_mask[7];
-/* This isn't currently used.  If you need it, see png.c for more details.
-PNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_height[7];
-*/
-#endif
-
-#endif /* PNG_NO_EXTERN */
-
-/* Three color definitions.  The order of the red, green, and blue, (and the
- * exact size) is not important, although the size of the fields need to
- * be png_byte or png_uint_16 (as defined below).
- */
-typedef struct png_color_struct
-{
-   png_byte red;
-   png_byte green;
-   png_byte blue;
-} png_color;
-typedef png_color FAR * png_colorp;
-typedef png_color FAR * FAR * png_colorpp;
-
-typedef struct png_color_16_struct
-{
-   png_byte index;    /* used for palette files */
-   png_uint_16 red;   /* for use in red green blue files */
-   png_uint_16 green;
-   png_uint_16 blue;
-   png_uint_16 gray;  /* for use in grayscale files */
-} png_color_16;
-typedef png_color_16 FAR * png_color_16p;
-typedef png_color_16 FAR * FAR * png_color_16pp;
-
-typedef struct png_color_8_struct
-{
-   png_byte red;   /* for use in red green blue files */
-   png_byte green;
-   png_byte blue;
-   png_byte gray;  /* for use in grayscale files */
-   png_byte alpha; /* for alpha channel files */
-} png_color_8;
-typedef png_color_8 FAR * png_color_8p;
-typedef png_color_8 FAR * FAR * png_color_8pp;
-
-/*
- * The following two structures are used for the in-core representation
- * of sPLT chunks.
- */
-typedef struct png_sPLT_entry_struct
-{
-   png_uint_16 red;
-   png_uint_16 green;
-   png_uint_16 blue;
-   png_uint_16 alpha;
-   png_uint_16 frequency;
-} png_sPLT_entry;
-typedef png_sPLT_entry FAR * png_sPLT_entryp;
-typedef png_sPLT_entry FAR * FAR * png_sPLT_entrypp;
-
-/*  When the depth of the sPLT palette is 8 bits, the color and alpha samples
- *  occupy the LSB of their respective members, and the MSB of each member
- *  is zero-filled.  The frequency member always occupies the full 16 bits.
- */
-
-typedef struct png_sPLT_struct
-{
-   png_charp name;           /* palette name */
-   png_byte depth;           /* depth of palette samples */
-   png_sPLT_entryp entries;  /* palette entries */
-   png_int_32 nentries;      /* number of palette entries */
-} png_sPLT_t;
-typedef png_sPLT_t FAR * png_sPLT_tp;
-typedef png_sPLT_t FAR * FAR * png_sPLT_tpp;
-
-#ifdef PNG_TEXT_SUPPORTED
-/* png_text holds the contents of a text/ztxt/itxt chunk in a PNG file,
- * and whether that contents is compressed or not.  The "key" field
- * points to a regular zero-terminated C string.  The "text", "lang", and
- * "lang_key" fields can be regular C strings, empty strings, or NULL pointers.
- * However, the * structure returned by png_get_text() will always contain
- * regular zero-terminated C strings (possibly empty), never NULL pointers,
- * so they can be safely used in printf() and other string-handling functions.
- */
-typedef struct png_text_struct
-{
-   int  compression;       /* compression value:
-                             -1: tEXt, none
-                              0: zTXt, deflate
-                              1: iTXt, none
-                              2: iTXt, deflate  */
-   png_charp key;          /* keyword, 1-79 character description of "text" */
-   png_charp text;         /* comment, may be an empty string (ie "")
-                              or a NULL pointer */
-   png_size_t text_length; /* length of the text string */
-#ifdef PNG_iTXt_SUPPORTED
-   png_size_t itxt_length; /* length of the itxt string */
-   png_charp lang;         /* language code, 0-79 characters
-                              or a NULL pointer */
-   png_charp lang_key;     /* keyword translated UTF-8 string, 0 or more
-                              chars or a NULL pointer */
-#endif
-} png_text;
-typedef png_text FAR * png_textp;
-typedef png_text FAR * FAR * png_textpp;
-#endif
-
-/* Supported compression types for text in PNG files (tEXt, and zTXt).
- * The values of the PNG_TEXT_COMPRESSION_ defines should NOT be changed. */
-#define PNG_TEXT_COMPRESSION_NONE_WR -3
-#define PNG_TEXT_COMPRESSION_zTXt_WR -2
-#define PNG_TEXT_COMPRESSION_NONE    -1
-#define PNG_TEXT_COMPRESSION_zTXt     0
-#define PNG_ITXT_COMPRESSION_NONE     1
-#define PNG_ITXT_COMPRESSION_zTXt     2
-#define PNG_TEXT_COMPRESSION_LAST     3  /* Not a valid value */
-
-/* png_time is a way to hold the time in an machine independent way.
- * Two conversions are provided, both from time_t and struct tm.  There
- * is no portable way to convert to either of these structures, as far
- * as I know.  If you know of a portable way, send it to me.  As a side
- * note - PNG has always been Year 2000 compliant!
- */
-typedef struct png_time_struct
-{
-   png_uint_16 year; /* full year, as in, 1995 */
-   png_byte month;   /* month of year, 1 - 12 */
-   png_byte day;     /* day of month, 1 - 31 */
-   png_byte hour;    /* hour of day, 0 - 23 */
-   png_byte minute;  /* minute of hour, 0 - 59 */
-   png_byte second;  /* second of minute, 0 - 60 (for leap seconds) */
-} png_time;
-typedef png_time FAR * png_timep;
-typedef png_time FAR * FAR * png_timepp;
-
-#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
-/* png_unknown_chunk is a structure to hold queued chunks for which there is
- * no specific support.  The idea is that we can use this to queue
- * up private chunks for output even though the library doesn't actually
- * know about their semantics.
- */
-#define PNG_CHUNK_NAME_LENGTH 5
-typedef struct png_unknown_chunk_t
-{
-    png_byte name[PNG_CHUNK_NAME_LENGTH];
-    png_byte *data;
-    png_size_t size;
-
-    /* libpng-using applications should NOT directly modify this byte. */
-    png_byte location; /* mode of operation at read time */
-}
-png_unknown_chunk;
-typedef png_unknown_chunk FAR * png_unknown_chunkp;
-typedef png_unknown_chunk FAR * FAR * png_unknown_chunkpp;
-#endif
-
-/* png_info is a structure that holds the information in a PNG file so
- * that the application can find out the characteristics of the image.
- * If you are reading the file, this structure will tell you what is
- * in the PNG file.  If you are writing the file, fill in the information
- * you want to put into the PNG file, then call png_write_info().
- * The names chosen should be very close to the PNG specification, so
- * consult that document for information about the meaning of each field.
- *
- * With libpng < 0.95, it was only possible to directly set and read the
- * the values in the png_info_struct, which meant that the contents and
- * order of the values had to remain fixed.  With libpng 0.95 and later,
- * however, there are now functions that abstract the contents of
- * png_info_struct from the application, so this makes it easier to use
- * libpng with dynamic libraries, and even makes it possible to use
- * libraries that don't have all of the libpng ancillary chunk-handing
- * functionality.
- *
- * In any case, the order of the parameters in png_info_struct should NOT
- * be changed for as long as possible to keep compatibility with applications
- * that use the old direct-access method with png_info_struct.
- *
- * The following members may have allocated storage attached that should be
- * cleaned up before the structure is discarded: palette, trans, text,
- * pcal_purpose, pcal_units, pcal_params, hist, iccp_name, iccp_profile,
- * splt_palettes, scal_unit, row_pointers, and unknowns.   By default, these
- * are automatically freed when the info structure is deallocated, if they were
- * allocated internally by libpng.  This behavior can be changed by means
- * of the png_data_freer() function.
- *
- * More allocation details: all the chunk-reading functions that
- * change these members go through the corresponding png_set_*
- * functions.  A function to clear these members is available: see
- * png_free_data().  The png_set_* functions do not depend on being
- * able to point info structure members to any of the storage they are
- * passed (they make their own copies), EXCEPT that the png_set_text
- * functions use the same storage passed to them in the text_ptr or
- * itxt_ptr structure argument, and the png_set_rows and png_set_unknowns
- * functions do not make their own copies.
- */
-typedef struct png_info_struct
-{
-   /* the following are necessary for every PNG file */
-   png_uint_32 width;       /* width of image in pixels (from IHDR) */
-   png_uint_32 height;      /* height of image in pixels (from IHDR) */
-   png_uint_32 valid;       /* valid chunk data (see PNG_INFO_ below) */
-   png_uint_32 rowbytes;    /* bytes needed to hold an untransformed row */
-   png_colorp palette;      /* array of color values (valid & PNG_INFO_PLTE) */
-   png_uint_16 num_palette; /* number of color entries in "palette" (PLTE) */
-   png_uint_16 num_trans;   /* number of transparent palette color (tRNS) */
-   png_byte bit_depth;      /* 1, 2, 4, 8, or 16 bits/channel (from IHDR) */
-   png_byte color_type;     /* see PNG_COLOR_TYPE_ below (from IHDR) */
-   /* The following three should have been named *_method not *_type */
-   png_byte compression_type; /* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */
-   png_byte filter_type;    /* must be PNG_FILTER_TYPE_BASE (from IHDR) */
-   png_byte interlace_type; /* One of PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */
-
-   /* The following is informational only on read, and not used on writes. */
-   png_byte channels;       /* number of data channels per pixel (1, 2, 3, 4) */
-   png_byte pixel_depth;    /* number of bits per pixel */
-   png_byte spare_byte;     /* to align the data, and for future use */
-   png_byte signature[8];   /* magic bytes read by libpng from start of file */
-
-   /* The rest of the data is optional.  If you are reading, check the
-    * valid field to see if the information in these are valid.  If you
-    * are writing, set the valid field to those chunks you want written,
-    * and initialize the appropriate fields below.
-    */
-
-#if defined(PNG_gAMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED)
-   /* The gAMA chunk describes the gamma characteristics of the system
-    * on which the image was created, normally in the range [1.0, 2.5].
-    * Data is valid if (valid & PNG_INFO_gAMA) is non-zero.
-    */
-   float gamma; /* gamma value of image, if (valid & PNG_INFO_gAMA) */
-#endif
-
-#if defined(PNG_sRGB_SUPPORTED)
-    /* GR-P, 0.96a */
-    /* Data valid if (valid & PNG_INFO_sRGB) non-zero. */
-   png_byte srgb_intent; /* sRGB rendering intent [0, 1, 2, or 3] */
-#endif
-
-#if defined(PNG_TEXT_SUPPORTED)
-   /* The tEXt, and zTXt chunks contain human-readable textual data in
-    * uncompressed, compressed, and optionally compressed forms, respectively.
-    * The data in "text" is an array of pointers to uncompressed,
-    * null-terminated C strings. Each chunk has a keyword that describes the
-    * textual data contained in that chunk.  Keywords are not required to be
-    * unique, and the text string may be empty.  Any number of text chunks may
-    * be in an image.
-    */
-   int num_text; /* number of comments read/to write */
-   int max_text; /* current size of text array */
-   png_textp text; /* array of comments read/to write */
-#endif /* PNG_TEXT_SUPPORTED */
-
-#if defined(PNG_tIME_SUPPORTED)
-   /* The tIME chunk holds the last time the displayed image data was
-    * modified.  See the png_time struct for the contents of this struct.
-    */
-   png_time mod_time;
-#endif
-
-#if defined(PNG_sBIT_SUPPORTED)
-   /* The sBIT chunk specifies the number of significant high-order bits
-    * in the pixel data.  Values are in the range [1, bit_depth], and are
-    * only specified for the channels in the pixel data.  The contents of
-    * the low-order bits is not specified.  Data is valid if
-    * (valid & PNG_INFO_sBIT) is non-zero.
-    */
-   png_color_8 sig_bit; /* significant bits in color channels */
-#endif
-
-#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_EXPAND_SUPPORTED) || \
-defined(PNG_READ_BACKGROUND_SUPPORTED)
-   /* The tRNS chunk supplies transparency data for paletted images and
-    * other image types that don't need a full alpha channel.  There are
-    * "num_trans" transparency values for a paletted image, stored in the
-    * same order as the palette colors, starting from index 0.  Values
-    * for the data are in the range [0, 255], ranging from fully transparent
-    * to fully opaque, respectively.  For non-paletted images, there is a
-    * single color specified that should be treated as fully transparent.
-    * Data is valid if (valid & PNG_INFO_tRNS) is non-zero.
-    */
-   png_bytep trans; /* transparent values for paletted image */
-   png_color_16 trans_values; /* transparent color for non-palette image */
-#endif
-
-#if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
-   /* The bKGD chunk gives the suggested image background color if the
-    * display program does not have its own background color and the image
-    * is needs to composited onto a background before display.  The colors
-    * in "background" are normally in the same color space/depth as the
-    * pixel data.  Data is valid if (valid & PNG_INFO_bKGD) is non-zero.
-    */
-   png_color_16 background;
-#endif
-
-#if defined(PNG_oFFs_SUPPORTED)
-   /* The oFFs chunk gives the offset in "offset_unit_type" units rightwards
-    * and downwards from the top-left corner of the display, page, or other
-    * application-specific co-ordinate space.  See the PNG_OFFSET_ defines
-    * below for the unit types.  Valid if (valid & PNG_INFO_oFFs) non-zero.
-    */
-   png_int_32 x_offset; /* x offset on page */
-   png_int_32 y_offset; /* y offset on page */
-   png_byte offset_unit_type; /* offset units type */
-#endif
-
-#if defined(PNG_pHYs_SUPPORTED)
-   /* The pHYs chunk gives the physical pixel density of the image for
-    * display or printing in "phys_unit_type" units (see PNG_RESOLUTION_
-    * defines below).  Data is valid if (valid & PNG_INFO_pHYs) is non-zero.
-    */
-   png_uint_32 x_pixels_per_unit; /* horizontal pixel density */
-   png_uint_32 y_pixels_per_unit; /* vertical pixel density */
-   png_byte phys_unit_type; /* resolution type (see PNG_RESOLUTION_ below) */
-#endif
-
-#if defined(PNG_hIST_SUPPORTED)
-   /* The hIST chunk contains the relative frequency or importance of the
-    * various palette entries, so that a viewer can intelligently select a
-    * reduced-color palette, if required.  Data is an array of "num_palette"
-    * values in the range [0,65535]. Data valid if (valid & PNG_INFO_hIST)
-    * is non-zero.
-    */
-   png_uint_16p hist;
-#endif
-
-#ifdef PNG_cHRM_SUPPORTED
-   /* The cHRM chunk describes the CIE color characteristics of the monitor
-    * on which the PNG was created.  This data allows the viewer to do gamut
-    * mapping of the input image to ensure that the viewer sees the same
-    * colors in the image as the creator.  Values are in the range
-    * [0.0, 0.8].  Data valid if (valid & PNG_INFO_cHRM) non-zero.
-    */
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-   float x_white;
-   float y_white;
-   float x_red;
-   float y_red;
-   float x_green;
-   float y_green;
-   float x_blue;
-   float y_blue;
-#endif
-#endif
-
-#if defined(PNG_pCAL_SUPPORTED)
-   /* The pCAL chunk describes a transformation between the stored pixel
-    * values and original physical data values used to create the image.
-    * The integer range [0, 2^bit_depth - 1] maps to the floating-point
-    * range given by [pcal_X0, pcal_X1], and are further transformed by a
-    * (possibly non-linear) transformation function given by "pcal_type"
-    * and "pcal_params" into "pcal_units".  Please see the PNG_EQUATION_
-    * defines below, and the PNG-Group's PNG extensions document for a
-    * complete description of the transformations and how they should be
-    * implemented, and for a description of the ASCII parameter strings.
-    * Data values are valid if (valid & PNG_INFO_pCAL) non-zero.
-    */
-   png_charp pcal_purpose;  /* pCAL chunk description string */
-   png_int_32 pcal_X0;      /* minimum value */
-   png_int_32 pcal_X1;      /* maximum value */
-   png_charp pcal_units;    /* Latin-1 string giving physical units */
-   png_charpp pcal_params;  /* ASCII strings containing parameter values */
-   png_byte pcal_type;      /* equation type (see PNG_EQUATION_ below) */
-   png_byte pcal_nparams;   /* number of parameters given in pcal_params */
-#endif
-
-/* New members added in libpng-1.0.6 */
-#ifdef PNG_FREE_ME_SUPPORTED
-   png_uint_32 free_me;     /* flags items libpng is responsible for freeing */
-#endif
-
-#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
-   /* storage for unknown chunks that the library doesn't recognize. */
-   png_unknown_chunkp unknown_chunks;
-   png_size_t unknown_chunks_num;
-#endif
-
-#if defined(PNG_iCCP_SUPPORTED)
-   /* iCCP chunk data. */
-   png_charp iccp_name;     /* profile name */
-   png_charp iccp_profile;  /* International Color Consortium profile data */
-                            /* Note to maintainer: should be png_bytep */
-   png_uint_32 iccp_proflen;  /* ICC profile data length */
-   png_byte iccp_compression; /* Always zero */
-#endif
-
-#if defined(PNG_sPLT_SUPPORTED)
-   /* data on sPLT chunks (there may be more than one). */
-   png_sPLT_tp splt_palettes;
-   png_uint_32 splt_palettes_num;
-#endif
-
-#if defined(PNG_sCAL_SUPPORTED)
-   /* The sCAL chunk describes the actual physical dimensions of the
-    * subject matter of the graphic.  The chunk contains a unit specification
-    * a byte value, and two ASCII strings representing floating-point
-    * values.  The values are width and height corresponsing to one pixel
-    * in the image.  This external representation is converted to double
-    * here.  Data values are valid if (valid & PNG_INFO_sCAL) is non-zero.
-    */
-   png_byte scal_unit;         /* unit of physical scale */
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-   double scal_pixel_width;    /* width of one pixel */
-   double scal_pixel_height;   /* height of one pixel */
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
-   png_charp scal_s_width;     /* string containing height */
-   png_charp scal_s_height;    /* string containing width */
-#endif
-#endif
-
-#if defined(PNG_INFO_IMAGE_SUPPORTED)
-   /* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS) non-zero */
-   /* Data valid if (valid & PNG_INFO_IDAT) non-zero */
-   png_bytepp row_pointers;        /* the image bits */
-#endif
-
-#if defined(PNG_FIXED_POINT_SUPPORTED) && defined(PNG_gAMA_SUPPORTED)
-   png_fixed_point int_gamma; /* gamma of image, if (valid & PNG_INFO_gAMA) */
-#endif
-
-#if defined(PNG_cHRM_SUPPORTED) && defined(PNG_FIXED_POINT_SUPPORTED)
-   png_fixed_point int_x_white;
-   png_fixed_point int_y_white;
-   png_fixed_point int_x_red;
-   png_fixed_point int_y_red;
-   png_fixed_point int_x_green;
-   png_fixed_point int_y_green;
-   png_fixed_point int_x_blue;
-   png_fixed_point int_y_blue;
-#endif
-
-} png_info;
-
-typedef png_info FAR * png_infop;
-typedef png_info FAR * FAR * png_infopp;
-
-/* Maximum positive integer used in PNG is (2^31)-1 */
-#define PNG_UINT_31_MAX ((png_uint_32)0x7fffffffL)
-#define PNG_UINT_32_MAX ((png_uint_32)(-1))
-#define PNG_SIZE_MAX ((png_size_t)(-1))
-#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
-/* PNG_MAX_UINT is deprecated; use PNG_UINT_31_MAX instead. */
-#define PNG_MAX_UINT PNG_UINT_31_MAX
-#endif
-
-/* These describe the color_type field in png_info. */
-/* color type masks */
-#define PNG_COLOR_MASK_PALETTE    1
-#define PNG_COLOR_MASK_COLOR      2
-#define PNG_COLOR_MASK_ALPHA      4
-
-/* color types.  Note that not all combinations are legal */
-#define PNG_COLOR_TYPE_GRAY 0
-#define PNG_COLOR_TYPE_PALETTE  (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_PALETTE)
-#define PNG_COLOR_TYPE_RGB        (PNG_COLOR_MASK_COLOR)
-#define PNG_COLOR_TYPE_RGB_ALPHA  (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_ALPHA)
-#define PNG_COLOR_TYPE_GRAY_ALPHA (PNG_COLOR_MASK_ALPHA)
-/* aliases */
-#define PNG_COLOR_TYPE_RGBA  PNG_COLOR_TYPE_RGB_ALPHA
-#define PNG_COLOR_TYPE_GA  PNG_COLOR_TYPE_GRAY_ALPHA
-
-/* This is for compression type. PNG 1.0-1.2 only define the single type. */
-#define PNG_COMPRESSION_TYPE_BASE 0 /* Deflate method 8, 32K window */
-#define PNG_COMPRESSION_TYPE_DEFAULT PNG_COMPRESSION_TYPE_BASE
-
-/* This is for filter type. PNG 1.0-1.2 only define the single type. */
-#define PNG_FILTER_TYPE_BASE      0 /* Single row per-byte filtering */
-#define PNG_INTRAPIXEL_DIFFERENCING 64 /* Used only in MNG datastreams */
-#define PNG_FILTER_TYPE_DEFAULT   PNG_FILTER_TYPE_BASE
-
-/* These are for the interlacing type.  These values should NOT be changed. */
-#define PNG_INTERLACE_NONE        0 /* Non-interlaced image */
-#define PNG_INTERLACE_ADAM7       1 /* Adam7 interlacing */
-#define PNG_INTERLACE_LAST        2 /* Not a valid value */
-
-/* These are for the oFFs chunk.  These values should NOT be changed. */
-#define PNG_OFFSET_PIXEL          0 /* Offset in pixels */
-#define PNG_OFFSET_MICROMETER     1 /* Offset in micrometers (1/10^6 meter) */
-#define PNG_OFFSET_LAST           2 /* Not a valid value */
-
-/* These are for the pCAL chunk.  These values should NOT be changed. */
-#define PNG_EQUATION_LINEAR       0 /* Linear transformation */
-#define PNG_EQUATION_BASE_E       1 /* Exponential base e transform */
-#define PNG_EQUATION_ARBITRARY    2 /* Arbitrary base exponential transform */
-#define PNG_EQUATION_HYPERBOLIC   3 /* Hyperbolic sine transformation */
-#define PNG_EQUATION_LAST         4 /* Not a valid value */
-
-/* These are for the sCAL chunk.  These values should NOT be changed. */
-#define PNG_SCALE_UNKNOWN         0 /* unknown unit (image scale) */
-#define PNG_SCALE_METER           1 /* meters per pixel */
-#define PNG_SCALE_RADIAN          2 /* radians per pixel */
-#define PNG_SCALE_LAST            3 /* Not a valid value */
-
-/* These are for the pHYs chunk.  These values should NOT be changed. */
-#define PNG_RESOLUTION_UNKNOWN    0 /* pixels/unknown unit (aspect ratio) */
-#define PNG_RESOLUTION_METER      1 /* pixels/meter */
-#define PNG_RESOLUTION_LAST       2 /* Not a valid value */
-
-/* These are for the sRGB chunk.  These values should NOT be changed. */
-#define PNG_sRGB_INTENT_PERCEPTUAL 0
-#define PNG_sRGB_INTENT_RELATIVE   1
-#define PNG_sRGB_INTENT_SATURATION 2
-#define PNG_sRGB_INTENT_ABSOLUTE   3
-#define PNG_sRGB_INTENT_LAST       4 /* Not a valid value */
-
-/* This is for text chunks */
-#define PNG_KEYWORD_MAX_LENGTH     79
-
-/* Maximum number of entries in PLTE/sPLT/tRNS arrays */
-#define PNG_MAX_PALETTE_LENGTH    256
-
-/* These determine if an ancillary chunk's data has been successfully read
- * from the PNG header, or if the application has filled in the corresponding
- * data in the info_struct to be written into the output file.  The values
- * of the PNG_INFO_<chunk> defines should NOT be changed.
- */
-#define PNG_INFO_gAMA 0x0001
-#define PNG_INFO_sBIT 0x0002
-#define PNG_INFO_cHRM 0x0004
-#define PNG_INFO_PLTE 0x0008
-#define PNG_INFO_tRNS 0x0010
-#define PNG_INFO_bKGD 0x0020
-#define PNG_INFO_hIST 0x0040
-#define PNG_INFO_pHYs 0x0080
-#define PNG_INFO_oFFs 0x0100
-#define PNG_INFO_tIME 0x0200
-#define PNG_INFO_pCAL 0x0400
-#define PNG_INFO_sRGB 0x0800   /* GR-P, 0.96a */
-#define PNG_INFO_iCCP 0x1000   /* ESR, 1.0.6 */
-#define PNG_INFO_sPLT 0x2000   /* ESR, 1.0.6 */
-#define PNG_INFO_sCAL 0x4000   /* ESR, 1.0.6 */
-#define PNG_INFO_IDAT 0x8000L  /* ESR, 1.0.6 */
-
-/* This is used for the transformation routines, as some of them
- * change these values for the row.  It also should enable using
- * the routines for other purposes.
- */
-typedef struct png_row_info_struct
-{
-   png_uint_32 width; /* width of row */
-   png_uint_32 rowbytes; /* number of bytes in row */
-   png_byte color_type; /* color type of row */
-   png_byte bit_depth; /* bit depth of row */
-   png_byte channels; /* number of channels (1, 2, 3, or 4) */
-   png_byte pixel_depth; /* bits per pixel (depth * channels) */
-} png_row_info;
-
-typedef png_row_info FAR * png_row_infop;
-typedef png_row_info FAR * FAR * png_row_infopp;
-
-/* These are the function types for the I/O functions and for the functions
- * that allow the user to override the default I/O functions with his or her
- * own.  The png_error_ptr type should match that of user-supplied warning
- * and error functions, while the png_rw_ptr type should match that of the
- * user read/write data functions.
- */
-typedef struct png_struct_def png_struct;
-typedef png_struct FAR * png_structp;
-
-typedef void (PNGAPI *png_error_ptr) PNGARG((png_structp, png_const_charp));
-typedef void (PNGAPI *png_rw_ptr) PNGARG((png_structp, png_bytep, png_size_t));
-typedef void (PNGAPI *png_flush_ptr) PNGARG((png_structp));
-typedef void (PNGAPI *png_read_status_ptr) PNGARG((png_structp, png_uint_32,
-   int));
-typedef void (PNGAPI *png_write_status_ptr) PNGARG((png_structp, png_uint_32,
-   int));
-
-#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
-typedef void (PNGAPI *png_progressive_info_ptr) PNGARG((png_structp, png_infop));
-typedef void (PNGAPI *png_progressive_end_ptr) PNGARG((png_structp, png_infop));
-typedef void (PNGAPI *png_progressive_row_ptr) PNGARG((png_structp, png_bytep,
-   png_uint_32, int));
-#endif
-
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
-    defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \
-    defined(PNG_LEGACY_SUPPORTED)
-typedef void (PNGAPI *png_user_transform_ptr) PNGARG((png_structp,
-    png_row_infop, png_bytep));
-#endif
-
-#if defined(PNG_USER_CHUNKS_SUPPORTED)
-typedef int (PNGAPI *png_user_chunk_ptr) PNGARG((png_structp, png_unknown_chunkp));
-#endif
-#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
-typedef void (PNGAPI *png_unknown_chunk_ptr) PNGARG((png_structp));
-#endif
-
-/* Transform masks for the high-level interface */
-#define PNG_TRANSFORM_IDENTITY       0x0000    /* read and write */
-#define PNG_TRANSFORM_STRIP_16       0x0001    /* read only */
-#define PNG_TRANSFORM_STRIP_ALPHA    0x0002    /* read only */
-#define PNG_TRANSFORM_PACKING        0x0004    /* read and write */
-#define PNG_TRANSFORM_PACKSWAP       0x0008    /* read and write */
-#define PNG_TRANSFORM_EXPAND         0x0010    /* read only */
-#define PNG_TRANSFORM_INVERT_MONO    0x0020    /* read and write */
-#define PNG_TRANSFORM_SHIFT          0x0040    /* read and write */
-#define PNG_TRANSFORM_BGR            0x0080    /* read and write */
-#define PNG_TRANSFORM_SWAP_ALPHA     0x0100    /* read and write */
-#define PNG_TRANSFORM_SWAP_ENDIAN    0x0200    /* read and write */
-#define PNG_TRANSFORM_INVERT_ALPHA   0x0400    /* read and write */
-#define PNG_TRANSFORM_STRIP_FILLER   0x0800    /* WRITE only */
-
-/* Flags for MNG supported features */
-#define PNG_FLAG_MNG_EMPTY_PLTE     0x01
-#define PNG_FLAG_MNG_FILTER_64      0x04
-#define PNG_ALL_MNG_FEATURES        0x05
-
-typedef png_voidp (*png_malloc_ptr) PNGARG((png_structp, png_size_t));
-typedef void (*png_free_ptr) PNGARG((png_structp, png_voidp));
-
-/* The structure that holds the information to read and write PNG files.
- * The only people who need to care about what is inside of this are the
- * people who will be modifying the library for their own special needs.
- * It should NOT be accessed directly by an application, except to store
- * the jmp_buf.
- */
-
-struct png_struct_def
-{
-#ifdef PNG_SETJMP_SUPPORTED
-   jmp_buf jmpbuf;            /* used in png_error */
-#endif
-   png_error_ptr error_fn;    /* function for printing errors and aborting */
-   png_error_ptr warning_fn;  /* function for printing warnings */
-   png_voidp error_ptr;       /* user supplied struct for error functions */
-   png_rw_ptr write_data_fn;  /* function for writing output data */
-   png_rw_ptr read_data_fn;   /* function for reading input data */
-   png_voidp io_ptr;          /* ptr to application struct for I/O functions */
-
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED)
-   png_user_transform_ptr read_user_transform_fn; /* user read transform */
-#endif
-
-#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
-   png_user_transform_ptr write_user_transform_fn; /* user write transform */
-#endif
-
-/* These were added in libpng-1.0.2 */
-#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
-    defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
-   png_voidp user_transform_ptr; /* user supplied struct for user transform */
-   png_byte user_transform_depth;    /* bit depth of user transformed pixels */
-   png_byte user_transform_channels; /* channels in user transformed pixels */
-#endif
-#endif
-
-   png_uint_32 mode;          /* tells us where we are in the PNG file */
-   png_uint_32 flags;         /* flags indicating various things to libpng */
-   png_uint_32 transformations; /* which transformations to perform */
-
-   z_stream zstream;          /* pointer to decompression structure (below) */
-   png_bytep zbuf;            /* buffer for zlib */
-   png_size_t zbuf_size;      /* size of zbuf */
-   int zlib_level;            /* holds zlib compression level */
-   int zlib_method;           /* holds zlib compression method */
-   int zlib_window_bits;      /* holds zlib compression window bits */
-   int zlib_mem_level;        /* holds zlib compression memory level */
-   int zlib_strategy;         /* holds zlib compression strategy */
-
-   png_uint_32 width;         /* width of image in pixels */
-   png_uint_32 height;        /* height of image in pixels */
-   png_uint_32 num_rows;      /* number of rows in current pass */
-   png_uint_32 usr_width;     /* width of row at start of write */
-   png_uint_32 rowbytes;      /* size of row in bytes */
-   png_uint_32 irowbytes;     /* size of current interlaced row in bytes */
-   png_uint_32 iwidth;        /* width of current interlaced row in pixels */
-   png_uint_32 row_number;    /* current row in interlace pass */
-   png_bytep prev_row;        /* buffer to save previous (unfiltered) row */
-   png_bytep row_buf;         /* buffer to save current (unfiltered) row */
-#ifndef PNG_NO_WRITE_FILTER
-   png_bytep sub_row;         /* buffer to save "sub" row when filtering */
-   png_bytep up_row;          /* buffer to save "up" row when filtering */
-   png_bytep avg_row;         /* buffer to save "avg" row when filtering */
-   png_bytep paeth_row;       /* buffer to save "Paeth" row when filtering */
-#endif
-   png_row_info row_info;     /* used for transformation routines */
-
-   png_uint_32 idat_size;     /* current IDAT size for read */
-   png_uint_32 crc;           /* current chunk CRC value */
-   png_colorp palette;        /* palette from the input file */
-   png_uint_16 num_palette;   /* number of color entries in palette */
-   png_uint_16 num_trans;     /* number of transparency values */
-   png_byte chunk_name[5];    /* null-terminated name of current chunk */
-   png_byte compression;      /* file compression type (always 0) */
-   png_byte filter;           /* file filter type (always 0) */
-   png_byte interlaced;       /* PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */
-   png_byte pass;             /* current interlace pass (0 - 6) */
-   png_byte do_filter;        /* row filter flags (see PNG_FILTER_ below ) */
-   png_byte color_type;       /* color type of file */
-   png_byte bit_depth;        /* bit depth of file */
-   png_byte usr_bit_depth;    /* bit depth of users row */
-   png_byte pixel_depth;      /* number of bits per pixel */
-   png_byte channels;         /* number of channels in file */
-   png_byte usr_channels;     /* channels at start of write */
-   png_byte sig_bytes;        /* magic bytes read/written from start of file */
-
-#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)
-#ifdef PNG_LEGACY_SUPPORTED
-   png_byte filler;           /* filler byte for pixel expansion */
-#else
-   png_uint_16 filler;           /* filler bytes for pixel expansion */
-#endif
-#endif
-
-#if defined(PNG_bKGD_SUPPORTED)
-   png_byte background_gamma_type;
-#  ifdef PNG_FLOATING_POINT_SUPPORTED
-   float background_gamma;
-#  endif
-   png_color_16 background;   /* background color in screen gamma space */
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-   png_color_16 background_1; /* background normalized to gamma 1.0 */
-#endif
-#endif /* PNG_bKGD_SUPPORTED */
-
-#if defined(PNG_WRITE_FLUSH_SUPPORTED)
-   png_flush_ptr output_flush_fn;/* Function for flushing output */
-   png_uint_32 flush_dist;    /* how many rows apart to flush, 0 - no flush */
-   png_uint_32 flush_rows;    /* number of rows written since last flush */
-#endif
-
-#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
-   int gamma_shift;      /* number of "insignificant" bits 16-bit gamma */
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-   float gamma;          /* file gamma value */
-   float screen_gamma;   /* screen gamma value (display_exponent) */
-#endif
-#endif
-
-#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
-   png_bytep gamma_table;     /* gamma table for 8-bit depth files */
-   png_bytep gamma_from_1;    /* converts from 1.0 to screen */
-   png_bytep gamma_to_1;      /* converts from file to 1.0 */
-   png_uint_16pp gamma_16_table; /* gamma table for 16-bit depth files */
-   png_uint_16pp gamma_16_from_1; /* converts from 1.0 to screen */
-   png_uint_16pp gamma_16_to_1; /* converts from file to 1.0 */
-#endif
-
-#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_sBIT_SUPPORTED)
-   png_color_8 sig_bit;       /* significant bits in each available channel */
-#endif
-
-#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED)
-   png_color_8 shift;         /* shift for significant bit tranformation */
-#endif
-
-#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \
- || defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
-   png_bytep trans;           /* transparency values for paletted files */
-   png_color_16 trans_values; /* transparency values for non-paletted files */
-#endif
-
-   png_read_status_ptr read_row_fn;   /* called after each row is decoded */
-   png_write_status_ptr write_row_fn; /* called after each row is encoded */
-#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
-   png_progressive_info_ptr info_fn; /* called after header data fully read */
-   png_progressive_row_ptr row_fn;   /* called after each prog. row is decoded */
-   png_progressive_end_ptr end_fn;   /* called after image is complete */
-   png_bytep save_buffer_ptr;        /* current location in save_buffer */
-   png_bytep save_buffer;            /* buffer for previously read data */
-   png_bytep current_buffer_ptr;     /* current location in current_buffer */
-   png_bytep current_buffer;         /* buffer for recently used data */
-   png_uint_32 push_length;          /* size of current input chunk */
-   png_uint_32 skip_length;          /* bytes to skip in input data */
-   png_size_t save_buffer_size;      /* amount of data now in save_buffer */
-   png_size_t save_buffer_max;       /* total size of save_buffer */
-   png_size_t buffer_size;           /* total amount of available input data */
-   png_size_t current_buffer_size;   /* amount of data now in current_buffer */
-   int process_mode;                 /* what push library is currently doing */
-   int cur_palette;                  /* current push library palette index */
-
-#  if defined(PNG_TEXT_SUPPORTED)
-     png_size_t current_text_size;   /* current size of text input data */
-     png_size_t current_text_left;   /* how much text left to read in input */
-     png_charp current_text;         /* current text chunk buffer */
-     png_charp current_text_ptr;     /* current location in current_text */
-#  endif /* PNG_TEXT_SUPPORTED */
-#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
-
-#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__)
-/* for the Borland special 64K segment handler */
-   png_bytepp offset_table_ptr;
-   png_bytep offset_table;
-   png_uint_16 offset_table_number;
-   png_uint_16 offset_table_count;
-   png_uint_16 offset_table_count_free;
-#endif
-
-#if defined(PNG_READ_DITHER_SUPPORTED)
-   png_bytep palette_lookup;         /* lookup table for dithering */
-   png_bytep dither_index;           /* index translation for palette files */
-#endif
-
-#if defined(PNG_READ_DITHER_SUPPORTED) || defined(PNG_hIST_SUPPORTED)
-   png_uint_16p hist;                /* histogram */
-#endif
-
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
-   png_byte heuristic_method;        /* heuristic for row filter selection */
-   png_byte num_prev_filters;        /* number of weights for previous rows */
-   png_bytep prev_filters;           /* filter type(s) of previous row(s) */
-   png_uint_16p filter_weights;      /* weight(s) for previous line(s) */
-   png_uint_16p inv_filter_weights;  /* 1/weight(s) for previous line(s) */
-   png_uint_16p filter_costs;        /* relative filter calculation cost */
-   png_uint_16p inv_filter_costs;    /* 1/relative filter calculation cost */
-#endif
-
-#if defined(PNG_TIME_RFC1123_SUPPORTED)
-   png_charp time_buffer;            /* String to hold RFC 1123 time text */
-#endif
-
-/* New members added in libpng-1.0.6 */
-
-#ifdef PNG_FREE_ME_SUPPORTED
-   png_uint_32 free_me;       /* flags items libpng is responsible for freeing */
-#endif
-
-#if defined(PNG_USER_CHUNKS_SUPPORTED)
-   png_voidp user_chunk_ptr;
-   png_user_chunk_ptr read_user_chunk_fn; /* user read chunk handler */
-#endif
-
-#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
-   int num_chunk_list;
-   png_bytep chunk_list;
-#endif
-
-/* New members added in libpng-1.0.3 */
-#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
-   png_byte rgb_to_gray_status;
-   /* These were changed from png_byte in libpng-1.0.6 */
-   png_uint_16 rgb_to_gray_red_coeff;
-   png_uint_16 rgb_to_gray_green_coeff;
-   png_uint_16 rgb_to_gray_blue_coeff;
-#endif
-
-/* New member added in libpng-1.0.4 (renamed in 1.0.9) */
-#if defined(PNG_MNG_FEATURES_SUPPORTED) || \
-    defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \
-    defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)
-/* changed from png_byte to png_uint_32 at version 1.2.0 */
-#ifdef PNG_1_0_X
-   png_byte mng_features_permitted;
-#else
-   png_uint_32 mng_features_permitted;
-#endif /* PNG_1_0_X */
-#endif
-
-/* New member added in libpng-1.0.7 */
-#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
-   png_fixed_point int_gamma;
-#endif
-
-/* New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 */
-#if defined(PNG_MNG_FEATURES_SUPPORTED)
-   png_byte filter_type;
-#endif
-
-#if defined(PNG_1_0_X)
-/* New member added in libpng-1.0.10, ifdef'ed out in 1.2.0 */
-   png_uint_32 row_buf_size;
-#endif
-
-/* New members added in libpng-1.2.0 */
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
-#  if !defined(PNG_1_0_X)
-#    if defined(PNG_MMX_CODE_SUPPORTED)
-   png_byte     mmx_bitdepth_threshold;
-   png_uint_32  mmx_rowbytes_threshold;
-#    endif
-   png_uint_32  asm_flags;
-#  endif
-#endif
-
-/* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */
-#ifdef PNG_USER_MEM_SUPPORTED
-   png_voidp mem_ptr;                /* user supplied struct for mem functions */
-   png_malloc_ptr malloc_fn;         /* function for allocating memory */
-   png_free_ptr free_fn;             /* function for freeing memory */
-#endif
-
-/* New member added in libpng-1.0.13 and 1.2.0 */
-   png_bytep big_row_buf;         /* buffer to save current (unfiltered) row */
-
-#if defined(PNG_READ_DITHER_SUPPORTED)
-/* The following three members were added at version 1.0.14 and 1.2.4 */
-   png_bytep dither_sort;            /* working sort array */
-   png_bytep index_to_palette;       /* where the original index currently is */
-                                     /* in the palette */
-   png_bytep palette_to_index;       /* which original index points to this */
-                                     /* palette color */
-#endif
-
-/* New members added in libpng-1.0.16 and 1.2.6 */
-   png_byte compression_type;
-
-#ifdef PNG_SET_USER_LIMITS_SUPPORTED
-   png_uint_32 user_width_max;
-   png_uint_32 user_height_max;
-#endif
-
-/* New member added in libpng-1.0.25 and 1.2.17 */
-#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
-   /* storage for unknown chunk that the library doesn't recognize. */
-   png_unknown_chunk unknown_chunk;
-#endif
-
-/* New members added in libpng-1.2.26 */
-  png_uint_32 old_big_row_buf_size, old_prev_row_size;
-
-/* New member added in libpng-1.2.30 */
-  png_charp chunkdata;  /* buffer for reading chunk data */
-
-};
-
-
-/* This triggers a compiler error in png.c, if png.c and png.h
- * do not agree upon the version number.
- */
-typedef png_structp version_1_2_33;
-
-typedef png_struct FAR * FAR * png_structpp;
-
-/* Here are the function definitions most commonly used.  This is not
- * the place to find out how to use libpng.  See libpng.txt for the
- * full explanation, see example.c for the summary.  This just provides
- * a simple one line description of the use of each function.
- */
-
-/* Returns the version number of the library */
-extern PNG_EXPORT(png_uint_32,png_access_version_number) PNGARG((void));
-
-/* Tell lib we have already handled the first <num_bytes> magic bytes.
- * Handling more than 8 bytes from the beginning of the file is an error.
- */
-extern PNG_EXPORT(void,png_set_sig_bytes) PNGARG((png_structp png_ptr,
-   int num_bytes));
-
-/* Check sig[start] through sig[start + num_to_check - 1] to see if it's a
- * PNG file.  Returns zero if the supplied bytes match the 8-byte PNG
- * signature, and non-zero otherwise.  Having num_to_check == 0 or
- * start > 7 will always fail (ie return non-zero).
- */
-extern PNG_EXPORT(int,png_sig_cmp) PNGARG((png_bytep sig, png_size_t start,
-   png_size_t num_to_check));
-
-/* Simple signature checking function.  This is the same as calling
- * png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n).
- */
-extern PNG_EXPORT(int,png_check_sig) PNGARG((png_bytep sig, int num));
-
-/* Allocate and initialize png_ptr struct for reading, and any other memory. */
-extern PNG_EXPORT(png_structp,png_create_read_struct)
-   PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
-   png_error_ptr error_fn, png_error_ptr warn_fn));
-
-/* Allocate and initialize png_ptr struct for writing, and any other memory */
-extern PNG_EXPORT(png_structp,png_create_write_struct)
-   PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
-   png_error_ptr error_fn, png_error_ptr warn_fn));
-
-#ifdef PNG_WRITE_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_get_compression_buffer_size)
-   PNGARG((png_structp png_ptr));
-#endif
-
-#ifdef PNG_WRITE_SUPPORTED
-extern PNG_EXPORT(void,png_set_compression_buffer_size)
-   PNGARG((png_structp png_ptr, png_uint_32 size));
-#endif
-
-/* Reset the compression stream */
-extern PNG_EXPORT(int,png_reset_zstream) PNGARG((png_structp png_ptr));
-
-/* New functions added in libpng-1.0.2 (not enabled by default until 1.2.0) */
-#ifdef PNG_USER_MEM_SUPPORTED
-extern PNG_EXPORT(png_structp,png_create_read_struct_2)
-   PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
-   png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,
-   png_malloc_ptr malloc_fn, png_free_ptr free_fn));
-extern PNG_EXPORT(png_structp,png_create_write_struct_2)
-   PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
-   png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,
-   png_malloc_ptr malloc_fn, png_free_ptr free_fn));
-#endif
-
-/* Write a PNG chunk - size, type, (optional) data, CRC. */
-extern PNG_EXPORT(void,png_write_chunk) PNGARG((png_structp png_ptr,
-   png_bytep chunk_name, png_bytep data, png_size_t length));
-
-/* Write the start of a PNG chunk - length and chunk name. */
-extern PNG_EXPORT(void,png_write_chunk_start) PNGARG((png_structp png_ptr,
-   png_bytep chunk_name, png_uint_32 length));
-
-/* Write the data of a PNG chunk started with png_write_chunk_start(). */
-extern PNG_EXPORT(void,png_write_chunk_data) PNGARG((png_structp png_ptr,
-   png_bytep data, png_size_t length));
-
-/* Finish a chunk started with png_write_chunk_start() (includes CRC). */
-extern PNG_EXPORT(void,png_write_chunk_end) PNGARG((png_structp png_ptr));
-
-/* Allocate and initialize the info structure */
-extern PNG_EXPORT(png_infop,png_create_info_struct)
-   PNGARG((png_structp png_ptr));
-
-#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
-/* Initialize the info structure (old interface - DEPRECATED) */
-extern PNG_EXPORT(void,png_info_init) PNGARG((png_infop info_ptr));
-#undef png_info_init
-#define png_info_init(info_ptr) png_info_init_3(&info_ptr,\
-    png_sizeof(png_info));
-#endif
-
-extern PNG_EXPORT(void,png_info_init_3) PNGARG((png_infopp info_ptr,
-    png_size_t png_info_struct_size));
-
-/* Writes all the PNG information before the image. */
-extern PNG_EXPORT(void,png_write_info_before_PLTE) PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-extern PNG_EXPORT(void,png_write_info) PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-
-#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
-/* read the information before the actual image data. */
-extern PNG_EXPORT(void,png_read_info) PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-#endif
-
-#if defined(PNG_TIME_RFC1123_SUPPORTED)
-extern PNG_EXPORT(png_charp,png_convert_to_rfc1123)
-   PNGARG((png_structp png_ptr, png_timep ptime));
-#endif
-
-#if !defined(_WIN32_WCE)
-/* "time.h" functions are not supported on WindowsCE */
-#if defined(PNG_WRITE_tIME_SUPPORTED)
-/* convert from a struct tm to png_time */
-extern PNG_EXPORT(void,png_convert_from_struct_tm) PNGARG((png_timep ptime,
-   struct tm FAR * ttime));
-
-/* convert from time_t to png_time.  Uses gmtime() */
-extern PNG_EXPORT(void,png_convert_from_time_t) PNGARG((png_timep ptime,
-   time_t ttime));
-#endif /* PNG_WRITE_tIME_SUPPORTED */
-#endif /* _WIN32_WCE */
-
-#if defined(PNG_READ_EXPAND_SUPPORTED)
-/* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */
-extern PNG_EXPORT(void,png_set_expand) PNGARG((png_structp png_ptr));
-#if !defined(PNG_1_0_X)
-extern PNG_EXPORT(void,png_set_expand_gray_1_2_4_to_8) PNGARG((png_structp
-  png_ptr));
-#endif
-extern PNG_EXPORT(void,png_set_palette_to_rgb) PNGARG((png_structp png_ptr));
-extern PNG_EXPORT(void,png_set_tRNS_to_alpha) PNGARG((png_structp png_ptr));
-#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
-/* Deprecated */
-extern PNG_EXPORT(void,png_set_gray_1_2_4_to_8) PNGARG((png_structp png_ptr));
-#endif
-#endif
-
-#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
-/* Use blue, green, red order for pixels. */
-extern PNG_EXPORT(void,png_set_bgr) PNGARG((png_structp png_ptr));
-#endif
-
-#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED)
-/* Expand the grayscale to 24-bit RGB if necessary. */
-extern PNG_EXPORT(void,png_set_gray_to_rgb) PNGARG((png_structp png_ptr));
-#endif
-
-#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
-/* Reduce RGB to grayscale. */
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(void,png_set_rgb_to_gray) PNGARG((png_structp png_ptr,
-   int error_action, double red, double green ));
-#endif
-extern PNG_EXPORT(void,png_set_rgb_to_gray_fixed) PNGARG((png_structp png_ptr,
-   int error_action, png_fixed_point red, png_fixed_point green ));
-extern PNG_EXPORT(png_byte,png_get_rgb_to_gray_status) PNGARG((png_structp
-   png_ptr));
-#endif
-
-extern PNG_EXPORT(void,png_build_grayscale_palette) PNGARG((int bit_depth,
-   png_colorp palette));
-
-#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
-extern PNG_EXPORT(void,png_set_strip_alpha) PNGARG((png_structp png_ptr));
-#endif
-
-#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \
-    defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)
-extern PNG_EXPORT(void,png_set_swap_alpha) PNGARG((png_structp png_ptr));
-#endif
-
-#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \
-    defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
-extern PNG_EXPORT(void,png_set_invert_alpha) PNGARG((png_structp png_ptr));
-#endif
-
-#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)
-/* Add a filler byte to 8-bit Gray or 24-bit RGB images. */
-extern PNG_EXPORT(void,png_set_filler) PNGARG((png_structp png_ptr,
-   png_uint_32 filler, int flags));
-/* The values of the PNG_FILLER_ defines should NOT be changed */
-#define PNG_FILLER_BEFORE 0
-#define PNG_FILLER_AFTER 1
-/* Add an alpha byte to 8-bit Gray or 24-bit RGB images. */
-#if !defined(PNG_1_0_X)
-extern PNG_EXPORT(void,png_set_add_alpha) PNGARG((png_structp png_ptr,
-   png_uint_32 filler, int flags));
-#endif
-#endif /* PNG_READ_FILLER_SUPPORTED || PNG_WRITE_FILLER_SUPPORTED */
-
-#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
-/* Swap bytes in 16-bit depth files. */
-extern PNG_EXPORT(void,png_set_swap) PNGARG((png_structp png_ptr));
-#endif
-
-#if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED)
-/* Use 1 byte per pixel in 1, 2, or 4-bit depth files. */
-extern PNG_EXPORT(void,png_set_packing) PNGARG((png_structp png_ptr));
-#endif
-
-#if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED)
-/* Swap packing order of pixels in bytes. */
-extern PNG_EXPORT(void,png_set_packswap) PNGARG((png_structp png_ptr));
-#endif
-
-#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED)
-/* Converts files to legal bit depths. */
-extern PNG_EXPORT(void,png_set_shift) PNGARG((png_structp png_ptr,
-   png_color_8p true_bits));
-#endif
-
-#if defined(PNG_READ_INTERLACING_SUPPORTED) || \
-    defined(PNG_WRITE_INTERLACING_SUPPORTED)
-/* Have the code handle the interlacing.  Returns the number of passes. */
-extern PNG_EXPORT(int,png_set_interlace_handling) PNGARG((png_structp png_ptr));
-#endif
-
-#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED)
-/* Invert monochrome files */
-extern PNG_EXPORT(void,png_set_invert_mono) PNGARG((png_structp png_ptr));
-#endif
-
-#if defined(PNG_READ_BACKGROUND_SUPPORTED)
-/* Handle alpha and tRNS by replacing with a background color. */
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(void,png_set_background) PNGARG((png_structp png_ptr,
-   png_color_16p background_color, int background_gamma_code,
-   int need_expand, double background_gamma));
-#endif
-#define PNG_BACKGROUND_GAMMA_UNKNOWN 0
-#define PNG_BACKGROUND_GAMMA_SCREEN  1
-#define PNG_BACKGROUND_GAMMA_FILE    2
-#define PNG_BACKGROUND_GAMMA_UNIQUE  3
-#endif
-
-#if defined(PNG_READ_16_TO_8_SUPPORTED)
-/* strip the second byte of information from a 16-bit depth file. */
-extern PNG_EXPORT(void,png_set_strip_16) PNGARG((png_structp png_ptr));
-#endif
-
-#if defined(PNG_READ_DITHER_SUPPORTED)
-/* Turn on dithering, and reduce the palette to the number of colors available. */
-extern PNG_EXPORT(void,png_set_dither) PNGARG((png_structp png_ptr,
-   png_colorp palette, int num_palette, int maximum_colors,
-   png_uint_16p histogram, int full_dither));
-#endif
-
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-/* Handle gamma correction. Screen_gamma=(display_exponent) */
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(void,png_set_gamma) PNGARG((png_structp png_ptr,
-   double screen_gamma, double default_file_gamma));
-#endif
-#endif
-
-#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
-#if defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \
-    defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)
-/* Permit or disallow empty PLTE (0: not permitted, 1: permitted) */
-/* Deprecated and will be removed.  Use png_permit_mng_features() instead. */
-extern PNG_EXPORT(void,png_permit_empty_plte) PNGARG((png_structp png_ptr,
-   int empty_plte_permitted));
-#endif
-#endif
-
-#if defined(PNG_WRITE_FLUSH_SUPPORTED)
-/* Set how many lines between output flushes - 0 for no flushing */
-extern PNG_EXPORT(void,png_set_flush) PNGARG((png_structp png_ptr, int nrows));
-/* Flush the current PNG output buffer */
-extern PNG_EXPORT(void,png_write_flush) PNGARG((png_structp png_ptr));
-#endif
-
-/* optional update palette with requested transformations */
-extern PNG_EXPORT(void,png_start_read_image) PNGARG((png_structp png_ptr));
-
-/* optional call to update the users info structure */
-extern PNG_EXPORT(void,png_read_update_info) PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-
-#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
-/* read one or more rows of image data. */
-extern PNG_EXPORT(void,png_read_rows) PNGARG((png_structp png_ptr,
-   png_bytepp row, png_bytepp display_row, png_uint_32 num_rows));
-#endif
-
-#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
-/* read a row of data. */
-extern PNG_EXPORT(void,png_read_row) PNGARG((png_structp png_ptr,
-   png_bytep row,
-   png_bytep display_row));
-#endif
-
-#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
-/* read the whole image into memory at once. */
-extern PNG_EXPORT(void,png_read_image) PNGARG((png_structp png_ptr,
-   png_bytepp image));
-#endif
-
-/* write a row of image data */
-extern PNG_EXPORT(void,png_write_row) PNGARG((png_structp png_ptr,
-   png_bytep row));
-
-/* write a few rows of image data */
-extern PNG_EXPORT(void,png_write_rows) PNGARG((png_structp png_ptr,
-   png_bytepp row, png_uint_32 num_rows));
-
-/* write the image data */
-extern PNG_EXPORT(void,png_write_image) PNGARG((png_structp png_ptr,
-   png_bytepp image));
-
-/* writes the end of the PNG file. */
-extern PNG_EXPORT(void,png_write_end) PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-
-#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
-/* read the end of the PNG file. */
-extern PNG_EXPORT(void,png_read_end) PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-#endif
-
-/* free any memory associated with the png_info_struct */
-extern PNG_EXPORT(void,png_destroy_info_struct) PNGARG((png_structp png_ptr,
-   png_infopp info_ptr_ptr));
-
-/* free any memory associated with the png_struct and the png_info_structs */
-extern PNG_EXPORT(void,png_destroy_read_struct) PNGARG((png_structpp
-   png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr));
-
-/* free all memory used by the read (old method - NOT DLL EXPORTED) */
-extern void png_read_destroy PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_infop end_info_ptr));
-
-/* free any memory associated with the png_struct and the png_info_structs */
-extern PNG_EXPORT(void,png_destroy_write_struct)
-   PNGARG((png_structpp png_ptr_ptr, png_infopp info_ptr_ptr));
-
-/* free any memory used in png_ptr struct (old method - NOT DLL EXPORTED) */
-extern void png_write_destroy PNGARG((png_structp png_ptr));
-
-/* set the libpng method of handling chunk CRC errors */
-extern PNG_EXPORT(void,png_set_crc_action) PNGARG((png_structp png_ptr,
-   int crit_action, int ancil_action));
-
-/* Values for png_set_crc_action() to say how to handle CRC errors in
- * ancillary and critical chunks, and whether to use the data contained
- * therein.  Note that it is impossible to "discard" data in a critical
- * chunk.  For versions prior to 0.90, the action was always error/quit,
- * whereas in version 0.90 and later, the action for CRC errors in ancillary
- * chunks is warn/discard.  These values should NOT be changed.
- *
- *      value                       action:critical     action:ancillary
- */
-#define PNG_CRC_DEFAULT       0  /* error/quit          warn/discard data */
-#define PNG_CRC_ERROR_QUIT    1  /* error/quit          error/quit        */
-#define PNG_CRC_WARN_DISCARD  2  /* (INVALID)           warn/discard data */
-#define PNG_CRC_WARN_USE      3  /* warn/use data       warn/use data     */
-#define PNG_CRC_QUIET_USE     4  /* quiet/use data      quiet/use data    */
-#define PNG_CRC_NO_CHANGE     5  /* use current value   use current value */
-
-/* These functions give the user control over the scan-line filtering in
- * libpng and the compression methods used by zlib.  These functions are
- * mainly useful for testing, as the defaults should work with most users.
- * Those users who are tight on memory or want faster performance at the
- * expense of compression can modify them.  See the compression library
- * header file (zlib.h) for an explination of the compression functions.
- */
-
-/* set the filtering method(s) used by libpng.  Currently, the only valid
- * value for "method" is 0.
- */
-extern PNG_EXPORT(void,png_set_filter) PNGARG((png_structp png_ptr, int method,
-   int filters));
-
-/* Flags for png_set_filter() to say which filters to use.  The flags
- * are chosen so that they don't conflict with real filter types
- * below, in case they are supplied instead of the #defined constants.
- * These values should NOT be changed.
- */
-#define PNG_NO_FILTERS     0x00
-#define PNG_FILTER_NONE    0x08
-#define PNG_FILTER_SUB     0x10
-#define PNG_FILTER_UP      0x20
-#define PNG_FILTER_AVG     0x40
-#define PNG_FILTER_PAETH   0x80
-#define PNG_ALL_FILTERS (PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP | \
-                         PNG_FILTER_AVG | PNG_FILTER_PAETH)
-
-/* Filter values (not flags) - used in pngwrite.c, pngwutil.c for now.
- * These defines should NOT be changed.
- */
-#define PNG_FILTER_VALUE_NONE  0
-#define PNG_FILTER_VALUE_SUB   1
-#define PNG_FILTER_VALUE_UP    2
-#define PNG_FILTER_VALUE_AVG   3
-#define PNG_FILTER_VALUE_PAETH 4
-#define PNG_FILTER_VALUE_LAST  5
-
-#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) /* EXPERIMENTAL */
-/* The "heuristic_method" is given by one of the PNG_FILTER_HEURISTIC_
- * defines, either the default (minimum-sum-of-absolute-differences), or
- * the experimental method (weighted-minimum-sum-of-absolute-differences).
- *
- * Weights are factors >= 1.0, indicating how important it is to keep the
- * filter type consistent between rows.  Larger numbers mean the current
- * filter is that many times as likely to be the same as the "num_weights"
- * previous filters.  This is cumulative for each previous row with a weight.
- * There needs to be "num_weights" values in "filter_weights", or it can be
- * NULL if the weights aren't being specified.  Weights have no influence on
- * the selection of the first row filter.  Well chosen weights can (in theory)
- * improve the compression for a given image.
- *
- * Costs are factors >= 1.0 indicating the relative decoding costs of a
- * filter type.  Higher costs indicate more decoding expense, and are
- * therefore less likely to be selected over a filter with lower computational
- * costs.  There needs to be a value in "filter_costs" for each valid filter
- * type (given by PNG_FILTER_VALUE_LAST), or it can be NULL if you aren't
- * setting the costs.  Costs try to improve the speed of decompression without
- * unduly increasing the compressed image size.
- *
- * A negative weight or cost indicates the default value is to be used, and
- * values in the range [0.0, 1.0) indicate the value is to remain unchanged.
- * The default values for both weights and costs are currently 1.0, but may
- * change if good general weighting/cost heuristics can be found.  If both
- * the weights and costs are set to 1.0, this degenerates the WEIGHTED method
- * to the UNWEIGHTED method, but with added encoding time/computation.
- */
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(void,png_set_filter_heuristics) PNGARG((png_structp png_ptr,
-   int heuristic_method, int num_weights, png_doublep filter_weights,
-   png_doublep filter_costs));
-#endif
-#endif /*  PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */
-
-/* Heuristic used for row filter selection.  These defines should NOT be
- * changed.
- */
-#define PNG_FILTER_HEURISTIC_DEFAULT    0  /* Currently "UNWEIGHTED" */
-#define PNG_FILTER_HEURISTIC_UNWEIGHTED 1  /* Used by libpng < 0.95 */
-#define PNG_FILTER_HEURISTIC_WEIGHTED   2  /* Experimental feature */
-#define PNG_FILTER_HEURISTIC_LAST       3  /* Not a valid value */
-
-/* Set the library compression level.  Currently, valid values range from
- * 0 - 9, corresponding directly to the zlib compression levels 0 - 9
- * (0 - no compression, 9 - "maximal" compression).  Note that tests have
- * shown that zlib compression levels 3-6 usually perform as well as level 9
- * for PNG images, and do considerably fewer caclulations.  In the future,
- * these values may not correspond directly to the zlib compression levels.
- */
-extern PNG_EXPORT(void,png_set_compression_level) PNGARG((png_structp png_ptr,
-   int level));
-
-extern PNG_EXPORT(void,png_set_compression_mem_level)
-   PNGARG((png_structp png_ptr, int mem_level));
-
-extern PNG_EXPORT(void,png_set_compression_strategy)
-   PNGARG((png_structp png_ptr, int strategy));
-
-extern PNG_EXPORT(void,png_set_compression_window_bits)
-   PNGARG((png_structp png_ptr, int window_bits));
-
-extern PNG_EXPORT(void,png_set_compression_method) PNGARG((png_structp png_ptr,
-   int method));
-
-/* These next functions are called for input/output, memory, and error
- * handling.  They are in the file pngrio.c, pngwio.c, and pngerror.c,
- * and call standard C I/O routines such as fread(), fwrite(), and
- * fprintf().  These functions can be made to use other I/O routines
- * at run time for those applications that need to handle I/O in a
- * different manner by calling png_set_???_fn().  See libpng.txt for
- * more information.
- */
-
-#if !defined(PNG_NO_STDIO)
-/* Initialize the input/output for the PNG file to the default functions. */
-extern PNG_EXPORT(void,png_init_io) PNGARG((png_structp png_ptr, png_FILE_p fp));
-#endif
-
-/* Replace the (error and abort), and warning functions with user
- * supplied functions.  If no messages are to be printed you must still
- * write and use replacement functions. The replacement error_fn should
- * still do a longjmp to the last setjmp location if you are using this
- * method of error handling.  If error_fn or warning_fn is NULL, the
- * default function will be used.
- */
-
-extern PNG_EXPORT(void,png_set_error_fn) PNGARG((png_structp png_ptr,
-   png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn));
-
-/* Return the user pointer associated with the error functions */
-extern PNG_EXPORT(png_voidp,png_get_error_ptr) PNGARG((png_structp png_ptr));
-
-/* Replace the default data output functions with a user supplied one(s).
- * If buffered output is not used, then output_flush_fn can be set to NULL.
- * If PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile time
- * output_flush_fn will be ignored (and thus can be NULL).
- */
-extern PNG_EXPORT(void,png_set_write_fn) PNGARG((png_structp png_ptr,
-   png_voidp io_ptr, png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn));
-
-/* Replace the default data input function with a user supplied one. */
-extern PNG_EXPORT(void,png_set_read_fn) PNGARG((png_structp png_ptr,
-   png_voidp io_ptr, png_rw_ptr read_data_fn));
-
-/* Return the user pointer associated with the I/O functions */
-extern PNG_EXPORT(png_voidp,png_get_io_ptr) PNGARG((png_structp png_ptr));
-
-extern PNG_EXPORT(void,png_set_read_status_fn) PNGARG((png_structp png_ptr,
-   png_read_status_ptr read_row_fn));
-
-extern PNG_EXPORT(void,png_set_write_status_fn) PNGARG((png_structp png_ptr,
-   png_write_status_ptr write_row_fn));
-
-#ifdef PNG_USER_MEM_SUPPORTED
-/* Replace the default memory allocation functions with user supplied one(s). */
-extern PNG_EXPORT(void,png_set_mem_fn) PNGARG((png_structp png_ptr,
-   png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn));
-/* Return the user pointer associated with the memory functions */
-extern PNG_EXPORT(png_voidp,png_get_mem_ptr) PNGARG((png_structp png_ptr));
-#endif
-
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
-    defined(PNG_LEGACY_SUPPORTED)
-extern PNG_EXPORT(void,png_set_read_user_transform_fn) PNGARG((png_structp
-   png_ptr, png_user_transform_ptr read_user_transform_fn));
-#endif
-
-#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \
-    defined(PNG_LEGACY_SUPPORTED)
-extern PNG_EXPORT(void,png_set_write_user_transform_fn) PNGARG((png_structp
-   png_ptr, png_user_transform_ptr write_user_transform_fn));
-#endif
-
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
-    defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \
-    defined(PNG_LEGACY_SUPPORTED)
-extern PNG_EXPORT(void,png_set_user_transform_info) PNGARG((png_structp
-   png_ptr, png_voidp user_transform_ptr, int user_transform_depth,
-   int user_transform_channels));
-/* Return the user pointer associated with the user transform functions */
-extern PNG_EXPORT(png_voidp,png_get_user_transform_ptr)
-   PNGARG((png_structp png_ptr));
-#endif
-
-#ifdef PNG_USER_CHUNKS_SUPPORTED
-extern PNG_EXPORT(void,png_set_read_user_chunk_fn) PNGARG((png_structp png_ptr,
-   png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn));
-extern PNG_EXPORT(png_voidp,png_get_user_chunk_ptr) PNGARG((png_structp
-   png_ptr));
-#endif
-
-#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
-/* Sets the function callbacks for the push reader, and a pointer to a
- * user-defined structure available to the callback functions.
- */
-extern PNG_EXPORT(void,png_set_progressive_read_fn) PNGARG((png_structp png_ptr,
-   png_voidp progressive_ptr,
-   png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn,
-   png_progressive_end_ptr end_fn));
-
-/* returns the user pointer associated with the push read functions */
-extern PNG_EXPORT(png_voidp,png_get_progressive_ptr)
-   PNGARG((png_structp png_ptr));
-
-/* function to be called when data becomes available */
-extern PNG_EXPORT(void,png_process_data) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_bytep buffer, png_size_t buffer_size));
-
-/* function that combines rows.  Not very much different than the
- * png_combine_row() call.  Is this even used?????
- */
-extern PNG_EXPORT(void,png_progressive_combine_row) PNGARG((png_structp png_ptr,
-   png_bytep old_row, png_bytep new_row));
-#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
-
-extern PNG_EXPORT(png_voidp,png_malloc) PNGARG((png_structp png_ptr,
-   png_uint_32 size));
-
-#if defined(PNG_1_0_X)
-#  define png_malloc_warn png_malloc
-#else
-/* Added at libpng version 1.2.4 */
-extern PNG_EXPORT(png_voidp,png_malloc_warn) PNGARG((png_structp png_ptr,
-   png_uint_32 size));
-#endif
-
-/* frees a pointer allocated by png_malloc() */
-extern PNG_EXPORT(void,png_free) PNGARG((png_structp png_ptr, png_voidp ptr));
-
-#if defined(PNG_1_0_X)
-/* Function to allocate memory for zlib. */
-extern PNG_EXPORT(voidpf,png_zalloc) PNGARG((voidpf png_ptr, uInt items,
-   uInt size));
-
-/* Function to free memory for zlib */
-extern PNG_EXPORT(void,png_zfree) PNGARG((voidpf png_ptr, voidpf ptr));
-#endif
-
-/* Free data that was allocated internally */
-extern PNG_EXPORT(void,png_free_data) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_uint_32 free_me, int num));
-#ifdef PNG_FREE_ME_SUPPORTED
-/* Reassign responsibility for freeing existing data, whether allocated
- * by libpng or by the application */
-extern PNG_EXPORT(void,png_data_freer) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, int freer, png_uint_32 mask));
-#endif
-/* assignments for png_data_freer */
-#define PNG_DESTROY_WILL_FREE_DATA 1
-#define PNG_SET_WILL_FREE_DATA 1
-#define PNG_USER_WILL_FREE_DATA 2
-/* Flags for png_ptr->free_me and info_ptr->free_me */
-#define PNG_FREE_HIST 0x0008
-#define PNG_FREE_ICCP 0x0010
-#define PNG_FREE_SPLT 0x0020
-#define PNG_FREE_ROWS 0x0040
-#define PNG_FREE_PCAL 0x0080
-#define PNG_FREE_SCAL 0x0100
-#define PNG_FREE_UNKN 0x0200
-#define PNG_FREE_LIST 0x0400
-#define PNG_FREE_PLTE 0x1000
-#define PNG_FREE_TRNS 0x2000
-#define PNG_FREE_TEXT 0x4000
-#define PNG_FREE_ALL  0x7fff
-#define PNG_FREE_MUL  0x4220 /* PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN */
-
-#ifdef PNG_USER_MEM_SUPPORTED
-extern PNG_EXPORT(png_voidp,png_malloc_default) PNGARG((png_structp png_ptr,
-   png_uint_32 size));
-extern PNG_EXPORT(void,png_free_default) PNGARG((png_structp png_ptr,
-   png_voidp ptr));
-#endif
-
-extern PNG_EXPORT(png_voidp,png_memcpy_check) PNGARG((png_structp png_ptr,
-   png_voidp s1, png_voidp s2, png_uint_32 size));
-
-extern PNG_EXPORT(png_voidp,png_memset_check) PNGARG((png_structp png_ptr,
-   png_voidp s1, int value, png_uint_32 size));
-
-#if defined(USE_FAR_KEYWORD)  /* memory model conversion function */
-extern void *png_far_to_near PNGARG((png_structp png_ptr,png_voidp ptr,
-   int check));
-#endif /* USE_FAR_KEYWORD */
-
-#ifndef PNG_NO_ERROR_TEXT
-/* Fatal error in PNG image of libpng - can't continue */
-extern PNG_EXPORT(void,png_error) PNGARG((png_structp png_ptr,
-   png_const_charp error_message));
-
-/* The same, but the chunk name is prepended to the error string. */
-extern PNG_EXPORT(void,png_chunk_error) PNGARG((png_structp png_ptr,
-   png_const_charp error_message));
-#else
-/* Fatal error in PNG image of libpng - can't continue */
-extern PNG_EXPORT(void,png_err) PNGARG((png_structp png_ptr));
-#endif
-
-#ifndef PNG_NO_WARNINGS
-/* Non-fatal error in libpng.  Can continue, but may have a problem. */
-extern PNG_EXPORT(void,png_warning) PNGARG((png_structp png_ptr,
-   png_const_charp warning_message));
-
-#ifdef PNG_READ_SUPPORTED
-/* Non-fatal error in libpng, chunk name is prepended to message. */
-extern PNG_EXPORT(void,png_chunk_warning) PNGARG((png_structp png_ptr,
-   png_const_charp warning_message));
-#endif /* PNG_READ_SUPPORTED */
-#endif /* PNG_NO_WARNINGS */
-
-/* The png_set_<chunk> functions are for storing values in the png_info_struct.
- * Similarly, the png_get_<chunk> calls are used to read values from the
- * png_info_struct, either storing the parameters in the passed variables, or
- * setting pointers into the png_info_struct where the data is stored.  The
- * png_get_<chunk> functions return a non-zero value if the data was available
- * in info_ptr, or return zero and do not change any of the parameters if the
- * data was not available.
- *
- * These functions should be used instead of directly accessing png_info
- * to avoid problems with future changes in the size and internal layout of
- * png_info_struct.
- */
-/* Returns "flag" if chunk data is valid in info_ptr. */
-extern PNG_EXPORT(png_uint_32,png_get_valid) PNGARG((png_structp png_ptr,
-png_infop info_ptr, png_uint_32 flag));
-
-/* Returns number of bytes needed to hold a transformed row. */
-extern PNG_EXPORT(png_uint_32,png_get_rowbytes) PNGARG((png_structp png_ptr,
-png_infop info_ptr));
-
-#if defined(PNG_INFO_IMAGE_SUPPORTED)
-/* Returns row_pointers, which is an array of pointers to scanlines that was
-returned from png_read_png(). */
-extern PNG_EXPORT(png_bytepp,png_get_rows) PNGARG((png_structp png_ptr,
-png_infop info_ptr));
-/* Set row_pointers, which is an array of pointers to scanlines for use
-by png_write_png(). */
-extern PNG_EXPORT(void,png_set_rows) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_bytepp row_pointers));
-#endif
-
-/* Returns number of color channels in image. */
-extern PNG_EXPORT(png_byte,png_get_channels) PNGARG((png_structp png_ptr,
-png_infop info_ptr));
-
-#ifdef PNG_EASY_ACCESS_SUPPORTED
-/* Returns image width in pixels. */
-extern PNG_EXPORT(png_uint_32, png_get_image_width) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-
-/* Returns image height in pixels. */
-extern PNG_EXPORT(png_uint_32, png_get_image_height) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-
-/* Returns image bit_depth. */
-extern PNG_EXPORT(png_byte, png_get_bit_depth) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-
-/* Returns image color_type. */
-extern PNG_EXPORT(png_byte, png_get_color_type) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-
-/* Returns image filter_type. */
-extern PNG_EXPORT(png_byte, png_get_filter_type) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-
-/* Returns image interlace_type. */
-extern PNG_EXPORT(png_byte, png_get_interlace_type) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-
-/* Returns image compression_type. */
-extern PNG_EXPORT(png_byte, png_get_compression_type) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-
-/* Returns image resolution in pixels per meter, from pHYs chunk data. */
-extern PNG_EXPORT(png_uint_32, png_get_pixels_per_meter) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-extern PNG_EXPORT(png_uint_32, png_get_x_pixels_per_meter) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-extern PNG_EXPORT(png_uint_32, png_get_y_pixels_per_meter) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-
-/* Returns pixel aspect ratio, computed from pHYs chunk data.  */
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(float, png_get_pixel_aspect_ratio) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-#endif
-
-/* Returns image x, y offset in pixels or microns, from oFFs chunk data. */
-extern PNG_EXPORT(png_int_32, png_get_x_offset_pixels) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-extern PNG_EXPORT(png_int_32, png_get_y_offset_pixels) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-extern PNG_EXPORT(png_int_32, png_get_x_offset_microns) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-extern PNG_EXPORT(png_int_32, png_get_y_offset_microns) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-
-#endif /* PNG_EASY_ACCESS_SUPPORTED */
-
-/* Returns pointer to signature string read from PNG header */
-extern PNG_EXPORT(png_bytep,png_get_signature) PNGARG((png_structp png_ptr,
-png_infop info_ptr));
-
-#if defined(PNG_bKGD_SUPPORTED)
-extern PNG_EXPORT(png_uint_32,png_get_bKGD) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_color_16p *background));
-#endif
-
-#if defined(PNG_bKGD_SUPPORTED)
-extern PNG_EXPORT(void,png_set_bKGD) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_color_16p background));
-#endif
-
-#if defined(PNG_cHRM_SUPPORTED)
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_get_cHRM) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, double *white_x, double *white_y, double *red_x,
-   double *red_y, double *green_x, double *green_y, double *blue_x,
-   double *blue_y));
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_get_cHRM_fixed) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_fixed_point *int_white_x, png_fixed_point
-   *int_white_y, png_fixed_point *int_red_x, png_fixed_point *int_red_y,
-   png_fixed_point *int_green_x, png_fixed_point *int_green_y, png_fixed_point
-   *int_blue_x, png_fixed_point *int_blue_y));
-#endif
-#endif
-
-#if defined(PNG_cHRM_SUPPORTED)
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(void,png_set_cHRM) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, double white_x, double white_y, double red_x,
-   double red_y, double green_x, double green_y, double blue_x, double blue_y));
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
-extern PNG_EXPORT(void,png_set_cHRM_fixed) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_fixed_point int_white_x, png_fixed_point int_white_y,
-   png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point
-   int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x,
-   png_fixed_point int_blue_y));
-#endif
-#endif
-
-#if defined(PNG_gAMA_SUPPORTED)
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_get_gAMA) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, double *file_gamma));
-#endif
-extern PNG_EXPORT(png_uint_32,png_get_gAMA_fixed) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_fixed_point *int_file_gamma));
-#endif
-
-#if defined(PNG_gAMA_SUPPORTED)
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(void,png_set_gAMA) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, double file_gamma));
-#endif
-extern PNG_EXPORT(void,png_set_gAMA_fixed) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_fixed_point int_file_gamma));
-#endif
-
-#if defined(PNG_hIST_SUPPORTED)
-extern PNG_EXPORT(png_uint_32,png_get_hIST) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_uint_16p *hist));
-#endif
-
-#if defined(PNG_hIST_SUPPORTED)
-extern PNG_EXPORT(void,png_set_hIST) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_uint_16p hist));
-#endif
-
-extern PNG_EXPORT(png_uint_32,png_get_IHDR) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_uint_32 *width, png_uint_32 *height,
-   int *bit_depth, int *color_type, int *interlace_method,
-   int *compression_method, int *filter_method));
-
-extern PNG_EXPORT(void,png_set_IHDR) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth,
-   int color_type, int interlace_method, int compression_method,
-   int filter_method));
-
-#if defined(PNG_oFFs_SUPPORTED)
-extern PNG_EXPORT(png_uint_32,png_get_oFFs) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_int_32 *offset_x, png_int_32 *offset_y,
-   int *unit_type));
-#endif
-
-#if defined(PNG_oFFs_SUPPORTED)
-extern PNG_EXPORT(void,png_set_oFFs) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_int_32 offset_x, png_int_32 offset_y,
-   int unit_type));
-#endif
-
-#if defined(PNG_pCAL_SUPPORTED)
-extern PNG_EXPORT(png_uint_32,png_get_pCAL) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_charp *purpose, png_int_32 *X0, png_int_32 *X1,
-   int *type, int *nparams, png_charp *units, png_charpp *params));
-#endif
-
-#if defined(PNG_pCAL_SUPPORTED)
-extern PNG_EXPORT(void,png_set_pCAL) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1,
-   int type, int nparams, png_charp units, png_charpp params));
-#endif
-
-#if defined(PNG_pHYs_SUPPORTED)
-extern PNG_EXPORT(png_uint_32,png_get_pHYs) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type));
-#endif
-
-#if defined(PNG_pHYs_SUPPORTED)
-extern PNG_EXPORT(void,png_set_pHYs) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type));
-#endif
-
-extern PNG_EXPORT(png_uint_32,png_get_PLTE) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_colorp *palette, int *num_palette));
-
-extern PNG_EXPORT(void,png_set_PLTE) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_colorp palette, int num_palette));
-
-#if defined(PNG_sBIT_SUPPORTED)
-extern PNG_EXPORT(png_uint_32,png_get_sBIT) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_color_8p *sig_bit));
-#endif
-
-#if defined(PNG_sBIT_SUPPORTED)
-extern PNG_EXPORT(void,png_set_sBIT) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_color_8p sig_bit));
-#endif
-
-#if defined(PNG_sRGB_SUPPORTED)
-extern PNG_EXPORT(png_uint_32,png_get_sRGB) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, int *intent));
-#endif
-
-#if defined(PNG_sRGB_SUPPORTED)
-extern PNG_EXPORT(void,png_set_sRGB) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, int intent));
-extern PNG_EXPORT(void,png_set_sRGB_gAMA_and_cHRM) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, int intent));
-#endif
-
-#if defined(PNG_iCCP_SUPPORTED)
-extern PNG_EXPORT(png_uint_32,png_get_iCCP) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_charpp name, int *compression_type,
-   png_charpp profile, png_uint_32 *proflen));
-   /* Note to maintainer: profile should be png_bytepp */
-#endif
-
-#if defined(PNG_iCCP_SUPPORTED)
-extern PNG_EXPORT(void,png_set_iCCP) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_charp name, int compression_type,
-   png_charp profile, png_uint_32 proflen));
-   /* Note to maintainer: profile should be png_bytep */
-#endif
-
-#if defined(PNG_sPLT_SUPPORTED)
-extern PNG_EXPORT(png_uint_32,png_get_sPLT) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_sPLT_tpp entries));
-#endif
-
-#if defined(PNG_sPLT_SUPPORTED)
-extern PNG_EXPORT(void,png_set_sPLT) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_sPLT_tp entries, int nentries));
-#endif
-
-#if defined(PNG_TEXT_SUPPORTED)
-/* png_get_text also returns the number of text chunks in *num_text */
-extern PNG_EXPORT(png_uint_32,png_get_text) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_textp *text_ptr, int *num_text));
-#endif
-
-/*
- *  Note while png_set_text() will accept a structure whose text,
- *  language, and  translated keywords are NULL pointers, the structure
- *  returned by png_get_text will always contain regular
- *  zero-terminated C strings.  They might be empty strings but
- *  they will never be NULL pointers.
- */
-
-#if defined(PNG_TEXT_SUPPORTED)
-extern PNG_EXPORT(void,png_set_text) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_textp text_ptr, int num_text));
-#endif
-
-#if defined(PNG_tIME_SUPPORTED)
-extern PNG_EXPORT(png_uint_32,png_get_tIME) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_timep *mod_time));
-#endif
-
-#if defined(PNG_tIME_SUPPORTED)
-extern PNG_EXPORT(void,png_set_tIME) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_timep mod_time));
-#endif
-
-#if defined(PNG_tRNS_SUPPORTED)
-extern PNG_EXPORT(png_uint_32,png_get_tRNS) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_bytep *trans, int *num_trans,
-   png_color_16p *trans_values));
-#endif
-
-#if defined(PNG_tRNS_SUPPORTED)
-extern PNG_EXPORT(void,png_set_tRNS) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_bytep trans, int num_trans,
-   png_color_16p trans_values));
-#endif
-
-#if defined(PNG_tRNS_SUPPORTED)
-#endif
-
-#if defined(PNG_sCAL_SUPPORTED)
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_get_sCAL) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, int *unit, double *width, double *height));
-#else
-#ifdef PNG_FIXED_POINT_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_get_sCAL_s) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, int *unit, png_charpp swidth, png_charpp sheight));
-#endif
-#endif
-#endif /* PNG_sCAL_SUPPORTED */
-
-#if defined(PNG_sCAL_SUPPORTED)
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(void,png_set_sCAL) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, int unit, double width, double height));
-#else
-#ifdef PNG_FIXED_POINT_SUPPORTED
-extern PNG_EXPORT(void,png_set_sCAL_s) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, int unit, png_charp swidth, png_charp sheight));
-#endif
-#endif
-#endif /* PNG_sCAL_SUPPORTED || PNG_WRITE_sCAL_SUPPORTED */
-
-#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
-/* provide a list of chunks and how they are to be handled, if the built-in
-   handling or default unknown chunk handling is not desired.  Any chunks not
-   listed will be handled in the default manner.  The IHDR and IEND chunks
-   must not be listed.
-      keep = 0: follow default behaviour
-           = 1: do not keep
-           = 2: keep only if safe-to-copy
-           = 3: keep even if unsafe-to-copy
-*/
-extern PNG_EXPORT(void, png_set_keep_unknown_chunks) PNGARG((png_structp
-   png_ptr, int keep, png_bytep chunk_list, int num_chunks));
-extern PNG_EXPORT(void, png_set_unknown_chunks) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns));
-extern PNG_EXPORT(void, png_set_unknown_chunk_location)
-   PNGARG((png_structp png_ptr, png_infop info_ptr, int chunk, int location));
-extern PNG_EXPORT(png_uint_32,png_get_unknown_chunks) PNGARG((png_structp
-   png_ptr, png_infop info_ptr, png_unknown_chunkpp entries));
-#endif
-#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
-PNG_EXPORT(int,png_handle_as_unknown) PNGARG((png_structp png_ptr, png_bytep
-   chunk_name));
-#endif
-
-/* Png_free_data() will turn off the "valid" flag for anything it frees.
-   If you need to turn it off for a chunk that your application has freed,
-   you can use png_set_invalid(png_ptr, info_ptr, PNG_INFO_CHNK); */
-extern PNG_EXPORT(void, png_set_invalid) PNGARG((png_structp png_ptr,
-   png_infop info_ptr, int mask));
-
-#if defined(PNG_INFO_IMAGE_SUPPORTED)
-/* The "params" pointer is currently not used and is for future expansion. */
-extern PNG_EXPORT(void, png_read_png) PNGARG((png_structp png_ptr,
-                        png_infop info_ptr,
-                        int transforms,
-                        png_voidp params));
-extern PNG_EXPORT(void, png_write_png) PNGARG((png_structp png_ptr,
-                        png_infop info_ptr,
-                        int transforms,
-                        png_voidp params));
-#endif
-
-/* Define PNG_DEBUG at compile time for debugging information.  Higher
- * numbers for PNG_DEBUG mean more debugging information.  This has
- * only been added since version 0.95 so it is not implemented throughout
- * libpng yet, but more support will be added as needed.
- */
-#ifdef PNG_DEBUG
-#if (PNG_DEBUG > 0)
-#if !defined(PNG_DEBUG_FILE) && defined(_MSC_VER)
-#include <crtdbg.h>
-#if (PNG_DEBUG > 1)
-#define png_debug(l,m)  _RPT0(_CRT_WARN,m)
-#define png_debug1(l,m,p1)  _RPT1(_CRT_WARN,m,p1)
-#define png_debug2(l,m,p1,p2) _RPT2(_CRT_WARN,m,p1,p2)
-#endif
-#else /* PNG_DEBUG_FILE || !_MSC_VER */
-#ifndef PNG_DEBUG_FILE
-#define PNG_DEBUG_FILE stderr
-#endif /* PNG_DEBUG_FILE */
-#if (PNG_DEBUG > 1)
-#define png_debug(l,m) \
-{ \
-     int num_tabs=l; \
-     fprintf(PNG_DEBUG_FILE,"%s"m,(num_tabs==1 ? "\t" : \
-       (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \
-}
-#define png_debug1(l,m,p1) \
-{ \
-     int num_tabs=l; \
-     fprintf(PNG_DEBUG_FILE,"%s"m,(num_tabs==1 ? "\t" : \
-       (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \
-}
-#define png_debug2(l,m,p1,p2) \
-{ \
-     int num_tabs=l; \
-     fprintf(PNG_DEBUG_FILE,"%s"m,(num_tabs==1 ? "\t" : \
-       (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \
-}
-#endif /* (PNG_DEBUG > 1) */
-#endif /* _MSC_VER */
-#endif /* (PNG_DEBUG > 0) */
-#endif /* PNG_DEBUG */
-#ifndef png_debug
-#define png_debug(l, m)
-#endif
-#ifndef png_debug1
-#define png_debug1(l, m, p1)
-#endif
-#ifndef png_debug2
-#define png_debug2(l, m, p1, p2)
-#endif
-
-extern PNG_EXPORT(png_charp,png_get_copyright) PNGARG((png_structp png_ptr));
-extern PNG_EXPORT(png_charp,png_get_header_ver) PNGARG((png_structp png_ptr));
-extern PNG_EXPORT(png_charp,png_get_header_version) PNGARG((png_structp png_ptr));
-extern PNG_EXPORT(png_charp,png_get_libpng_ver) PNGARG((png_structp png_ptr));
-
-#ifdef PNG_MNG_FEATURES_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_permit_mng_features) PNGARG((png_structp
-   png_ptr, png_uint_32 mng_features_permitted));
-#endif
-
-/* For use in png_set_keep_unknown, added to version 1.2.6 */
-#define PNG_HANDLE_CHUNK_AS_DEFAULT   0
-#define PNG_HANDLE_CHUNK_NEVER        1
-#define PNG_HANDLE_CHUNK_IF_SAFE      2
-#define PNG_HANDLE_CHUNK_ALWAYS       3
-
-/* Added to version 1.2.0 */
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
-#if defined(PNG_MMX_CODE_SUPPORTED)
-#define PNG_ASM_FLAG_MMX_SUPPORT_COMPILED  0x01  /* not user-settable */
-#define PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU    0x02  /* not user-settable */
-#define PNG_ASM_FLAG_MMX_READ_COMBINE_ROW  0x04
-#define PNG_ASM_FLAG_MMX_READ_INTERLACE    0x08
-#define PNG_ASM_FLAG_MMX_READ_FILTER_SUB   0x10
-#define PNG_ASM_FLAG_MMX_READ_FILTER_UP    0x20
-#define PNG_ASM_FLAG_MMX_READ_FILTER_AVG   0x40
-#define PNG_ASM_FLAG_MMX_READ_FILTER_PAETH 0x80
-#define PNG_ASM_FLAGS_INITIALIZED          0x80000000  /* not user-settable */
-
-#define PNG_MMX_READ_FLAGS ( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW  \
-                           | PNG_ASM_FLAG_MMX_READ_INTERLACE    \
-                           | PNG_ASM_FLAG_MMX_READ_FILTER_SUB   \
-                           | PNG_ASM_FLAG_MMX_READ_FILTER_UP    \
-                           | PNG_ASM_FLAG_MMX_READ_FILTER_AVG   \
-                           | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH )
-#define PNG_MMX_WRITE_FLAGS ( 0 )
-
-#define PNG_MMX_FLAGS ( PNG_ASM_FLAG_MMX_SUPPORT_COMPILED \
-                      | PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU   \
-                      | PNG_MMX_READ_FLAGS                \
-                      | PNG_MMX_WRITE_FLAGS )
-
-#define PNG_SELECT_READ   1
-#define PNG_SELECT_WRITE  2
-#endif /* PNG_MMX_CODE_SUPPORTED */
-
-#if !defined(PNG_1_0_X)
-/* pngget.c */
-extern PNG_EXPORT(png_uint_32,png_get_mmx_flagmask)
-   PNGARG((int flag_select, int *compilerID));
-
-/* pngget.c */
-extern PNG_EXPORT(png_uint_32,png_get_asm_flagmask)
-   PNGARG((int flag_select));
-
-/* pngget.c */
-extern PNG_EXPORT(png_uint_32,png_get_asm_flags)
-   PNGARG((png_structp png_ptr));
-
-/* pngget.c */
-extern PNG_EXPORT(png_byte,png_get_mmx_bitdepth_threshold)
-   PNGARG((png_structp png_ptr));
-
-/* pngget.c */
-extern PNG_EXPORT(png_uint_32,png_get_mmx_rowbytes_threshold)
-   PNGARG((png_structp png_ptr));
-
-/* pngset.c */
-extern PNG_EXPORT(void,png_set_asm_flags)
-   PNGARG((png_structp png_ptr, png_uint_32 asm_flags));
-
-/* pngset.c */
-extern PNG_EXPORT(void,png_set_mmx_thresholds)
-   PNGARG((png_structp png_ptr, png_byte mmx_bitdepth_threshold,
-   png_uint_32 mmx_rowbytes_threshold));
-
-#endif /* PNG_1_0_X */
-
-#if !defined(PNG_1_0_X)
-/* png.c, pnggccrd.c, or pngvcrd.c */
-extern PNG_EXPORT(int,png_mmx_support) PNGARG((void));
-#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
-
-/* Strip the prepended error numbers ("#nnn ") from error and warning
- * messages before passing them to the error or warning handler. */
-#ifdef PNG_ERROR_NUMBERS_SUPPORTED
-extern PNG_EXPORT(void,png_set_strip_error_numbers) PNGARG((png_structp
-   png_ptr, png_uint_32 strip_mode));
-#endif
-
-#endif /* PNG_1_0_X */
-
-/* Added at libpng-1.2.6 */
-#ifdef PNG_SET_USER_LIMITS_SUPPORTED
-extern PNG_EXPORT(void,png_set_user_limits) PNGARG((png_structp
-   png_ptr, png_uint_32 user_width_max, png_uint_32 user_height_max));
-extern PNG_EXPORT(png_uint_32,png_get_user_width_max) PNGARG((png_structp
-   png_ptr));
-extern PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp
-   png_ptr));
-#endif
-
-
-/* Maintainer: Put new public prototypes here ^, in libpng.3, and project defs */
-
-#ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED
-/* With these routines we avoid an integer divide, which will be slower on
- * most machines.  However, it does take more operations than the corresponding
- * divide method, so it may be slower on a few RISC systems.  There are two
- * shifts (by 8 or 16 bits) and an addition, versus a single integer divide.
- *
- * Note that the rounding factors are NOT supposed to be the same!  128 and
- * 32768 are correct for the NODIV code; 127 and 32767 are correct for the
- * standard method.
- *
- * [Optimized code by Greg Roelofs and Mark Adler...blame us for bugs. :-) ]
- */
-
- /* fg and bg should be in `gamma 1.0' space; alpha is the opacity          */
-
-#  define png_composite(composite, fg, alpha, bg)                            \
-     { png_uint_16 temp = (png_uint_16)((png_uint_16)(fg) * (png_uint_16)(alpha) \
-                        +        (png_uint_16)(bg)*(png_uint_16)(255 -       \
-                        (png_uint_16)(alpha)) + (png_uint_16)128);           \
-       (composite) = (png_byte)((temp + (temp >> 8)) >> 8); }
-
-#  define png_composite_16(composite, fg, alpha, bg)                         \
-     { png_uint_32 temp = (png_uint_32)((png_uint_32)(fg) * (png_uint_32)(alpha) \
-                        + (png_uint_32)(bg)*(png_uint_32)(65535L -           \
-                        (png_uint_32)(alpha)) + (png_uint_32)32768L);        \
-       (composite) = (png_uint_16)((temp + (temp >> 16)) >> 16); }
-
-#else  /* standard method using integer division */
-
-#  define png_composite(composite, fg, alpha, bg)                            \
-     (composite) = (png_byte)(((png_uint_16)(fg) * (png_uint_16)(alpha) +    \
-       (png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) +       \
-       (png_uint_16)127) / 255)
-
-#  define png_composite_16(composite, fg, alpha, bg)                         \
-     (composite) = (png_uint_16)(((png_uint_32)(fg) * (png_uint_32)(alpha) + \
-       (png_uint_32)(bg)*(png_uint_32)(65535L - (png_uint_32)(alpha)) +      \
-       (png_uint_32)32767) / (png_uint_32)65535L)
-
-#endif /* PNG_READ_COMPOSITE_NODIV_SUPPORTED */
-
-/* Inline macros to do direct reads of bytes from the input buffer.  These
- * require that you are using an architecture that uses PNG byte ordering
- * (MSB first) and supports unaligned data storage.  I think that PowerPC
- * in big-endian mode and 680x0 are the only ones that will support this.
- * The x86 line of processors definitely do not.  The png_get_int_32()
- * routine also assumes we are using two's complement format for negative
- * values, which is almost certainly true.
- */
-#if defined(PNG_READ_BIG_ENDIAN_SUPPORTED)
-#  define png_get_uint_32(buf) ( *((png_uint_32p) (buf)))
-#  define png_get_uint_16(buf) ( *((png_uint_16p) (buf)))
-#  define png_get_int_32(buf)  ( *((png_int_32p)  (buf)))
-#else
-extern PNG_EXPORT(png_uint_32,png_get_uint_32) PNGARG((png_bytep buf));
-extern PNG_EXPORT(png_uint_16,png_get_uint_16) PNGARG((png_bytep buf));
-extern PNG_EXPORT(png_int_32,png_get_int_32) PNGARG((png_bytep buf));
-#endif /* !PNG_READ_BIG_ENDIAN_SUPPORTED */
-extern PNG_EXPORT(png_uint_32,png_get_uint_31)
-  PNGARG((png_structp png_ptr, png_bytep buf));
-/* No png_get_int_16 -- may be added if there's a real need for it. */
-
-/* Place a 32-bit number into a buffer in PNG byte order (big-endian).
- */
-extern PNG_EXPORT(void,png_save_uint_32)
-   PNGARG((png_bytep buf, png_uint_32 i));
-extern PNG_EXPORT(void,png_save_int_32)
-   PNGARG((png_bytep buf, png_int_32 i));
-
-/* Place a 16-bit number into a buffer in PNG byte order.
- * The parameter is declared unsigned int, not png_uint_16,
- * just to avoid potential problems on pre-ANSI C compilers.
- */
-extern PNG_EXPORT(void,png_save_uint_16)
-   PNGARG((png_bytep buf, unsigned int i));
-/* No png_save_int_16 -- may be added if there's a real need for it. */
-
-/* ************************************************************************* */
-
-/* These next functions are used internally in the code.  They generally
- * shouldn't be used unless you are writing code to add or replace some
- * functionality in libpng.  More information about most functions can
- * be found in the files where the functions are located.
- */
-
-
-/* Various modes of operation, that are visible to applications because
- * they are used for unknown chunk location.
- */
-#define PNG_HAVE_IHDR               0x01
-#define PNG_HAVE_PLTE               0x02
-#define PNG_HAVE_IDAT               0x04
-#define PNG_AFTER_IDAT              0x08 /* Have complete zlib datastream */
-#define PNG_HAVE_IEND               0x10
-
-#if defined(PNG_INTERNAL)
-
-/* More modes of operation.  Note that after an init, mode is set to
- * zero automatically when the structure is created.
- */
-#define PNG_HAVE_gAMA               0x20
-#define PNG_HAVE_cHRM               0x40
-#define PNG_HAVE_sRGB               0x80
-#define PNG_HAVE_CHUNK_HEADER      0x100
-#define PNG_WROTE_tIME             0x200
-#define PNG_WROTE_INFO_BEFORE_PLTE 0x400
-#define PNG_BACKGROUND_IS_GRAY     0x800
-#define PNG_HAVE_PNG_SIGNATURE    0x1000
-#define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000 /* Have another chunk after IDAT */
-
-/* flags for the transformations the PNG library does on the image data */
-#define PNG_BGR                0x0001
-#define PNG_INTERLACE          0x0002
-#define PNG_PACK               0x0004
-#define PNG_SHIFT              0x0008
-#define PNG_SWAP_BYTES         0x0010
-#define PNG_INVERT_MONO        0x0020
-#define PNG_DITHER             0x0040
-#define PNG_BACKGROUND         0x0080
-#define PNG_BACKGROUND_EXPAND  0x0100
-                          /*   0x0200 unused */
-#define PNG_16_TO_8            0x0400
-#define PNG_RGBA               0x0800
-#define PNG_EXPAND             0x1000
-#define PNG_GAMMA              0x2000
-#define PNG_GRAY_TO_RGB        0x4000
-#define PNG_FILLER             0x8000L
-#define PNG_PACKSWAP          0x10000L
-#define PNG_SWAP_ALPHA        0x20000L
-#define PNG_STRIP_ALPHA       0x40000L
-#define PNG_INVERT_ALPHA      0x80000L
-#define PNG_USER_TRANSFORM   0x100000L
-#define PNG_RGB_TO_GRAY_ERR  0x200000L
-#define PNG_RGB_TO_GRAY_WARN 0x400000L
-#define PNG_RGB_TO_GRAY      0x600000L  /* two bits, RGB_TO_GRAY_ERR|WARN */
-                       /*    0x800000L     Unused */
-#define PNG_ADD_ALPHA       0x1000000L  /* Added to libpng-1.2.7 */
-#define PNG_EXPAND_tRNS     0x2000000L  /* Added to libpng-1.2.9 */
-                       /*   0x4000000L  unused */
-                       /*   0x8000000L  unused */
-                       /*  0x10000000L  unused */
-                       /*  0x20000000L  unused */
-                       /*  0x40000000L  unused */
-
-/* flags for png_create_struct */
-#define PNG_STRUCT_PNG   0x0001
-#define PNG_STRUCT_INFO  0x0002
-
-/* Scaling factor for filter heuristic weighting calculations */
-#define PNG_WEIGHT_SHIFT 8
-#define PNG_WEIGHT_FACTOR (1<<(PNG_WEIGHT_SHIFT))
-#define PNG_COST_SHIFT 3
-#define PNG_COST_FACTOR (1<<(PNG_COST_SHIFT))
-
-/* flags for the png_ptr->flags rather than declaring a byte for each one */
-#define PNG_FLAG_ZLIB_CUSTOM_STRATEGY     0x0001
-#define PNG_FLAG_ZLIB_CUSTOM_LEVEL        0x0002
-#define PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL    0x0004
-#define PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS  0x0008
-#define PNG_FLAG_ZLIB_CUSTOM_METHOD       0x0010
-#define PNG_FLAG_ZLIB_FINISHED            0x0020
-#define PNG_FLAG_ROW_INIT                 0x0040
-#define PNG_FLAG_FILLER_AFTER             0x0080
-#define PNG_FLAG_CRC_ANCILLARY_USE        0x0100
-#define PNG_FLAG_CRC_ANCILLARY_NOWARN     0x0200
-#define PNG_FLAG_CRC_CRITICAL_USE         0x0400
-#define PNG_FLAG_CRC_CRITICAL_IGNORE      0x0800
-#define PNG_FLAG_FREE_PLTE                0x1000
-#define PNG_FLAG_FREE_TRNS                0x2000
-#define PNG_FLAG_FREE_HIST                0x4000
-#define PNG_FLAG_KEEP_UNKNOWN_CHUNKS      0x8000L
-#define PNG_FLAG_KEEP_UNSAFE_CHUNKS       0x10000L
-#define PNG_FLAG_LIBRARY_MISMATCH         0x20000L
-#define PNG_FLAG_STRIP_ERROR_NUMBERS      0x40000L
-#define PNG_FLAG_STRIP_ERROR_TEXT         0x80000L
-#define PNG_FLAG_MALLOC_NULL_MEM_OK       0x100000L
-#define PNG_FLAG_ADD_ALPHA                0x200000L  /* Added to libpng-1.2.8 */
-#define PNG_FLAG_STRIP_ALPHA              0x400000L  /* Added to libpng-1.2.8 */
-                                  /*      0x800000L  unused */
-                                  /*     0x1000000L  unused */
-                                  /*     0x2000000L  unused */
-                                  /*     0x4000000L  unused */
-                                  /*     0x8000000L  unused */
-                                  /*    0x10000000L  unused */
-                                  /*    0x20000000L  unused */
-                                  /*    0x40000000L  unused */
-
-#define PNG_FLAG_CRC_ANCILLARY_MASK (PNG_FLAG_CRC_ANCILLARY_USE | \
-                                     PNG_FLAG_CRC_ANCILLARY_NOWARN)
-
-#define PNG_FLAG_CRC_CRITICAL_MASK  (PNG_FLAG_CRC_CRITICAL_USE | \
-                                     PNG_FLAG_CRC_CRITICAL_IGNORE)
-
-#define PNG_FLAG_CRC_MASK           (PNG_FLAG_CRC_ANCILLARY_MASK | \
-                                     PNG_FLAG_CRC_CRITICAL_MASK)
-
-/* save typing and make code easier to understand */
-
-#define PNG_COLOR_DIST(c1, c2) (abs((int)((c1).red) - (int)((c2).red)) + \
-   abs((int)((c1).green) - (int)((c2).green)) + \
-   abs((int)((c1).blue) - (int)((c2).blue)))
-
-/* Added to libpng-1.2.6 JB */
-#define PNG_ROWBYTES(pixel_bits, width) \
-    ((pixel_bits) >= 8 ? \
-    ((width) * (((png_uint_32)(pixel_bits)) >> 3)) : \
-    (( ((width) * ((png_uint_32)(pixel_bits))) + 7) >> 3) )
-
-/* PNG_OUT_OF_RANGE returns true if value is outside the range
-   ideal-delta..ideal+delta.  Each argument is evaluated twice.
-   "ideal" and "delta" should be constants, normally simple
-   integers, "value" a variable. Added to libpng-1.2.6 JB */
-#define PNG_OUT_OF_RANGE(value, ideal, delta) \
-        ( (value) < (ideal)-(delta) || (value) > (ideal)+(delta) )
-
-/* variables declared in png.c - only it needs to define PNG_NO_EXTERN */
-#if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN)
-/* place to hold the signature string for a PNG file. */
-#ifdef PNG_USE_GLOBAL_ARRAYS
-   PNG_EXPORT_VAR (PNG_CONST png_byte FARDATA) png_sig[8];
-#else
-#endif
-#endif /* PNG_NO_EXTERN */
-
-/* Constant strings for known chunk types.  If you need to add a chunk,
- * define the name here, and add an invocation of the macro in png.c and
- * wherever it's needed.
- */
-#define PNG_IHDR png_byte png_IHDR[5] = { 73,  72,  68,  82, '\0'}
-#define PNG_IDAT png_byte png_IDAT[5] = { 73,  68,  65,  84, '\0'}
-#define PNG_IEND png_byte png_IEND[5] = { 73,  69,  78,  68, '\0'}
-#define PNG_PLTE png_byte png_PLTE[5] = { 80,  76,  84,  69, '\0'}
-#define PNG_bKGD png_byte png_bKGD[5] = { 98,  75,  71,  68, '\0'}
-#define PNG_cHRM png_byte png_cHRM[5] = { 99,  72,  82,  77, '\0'}
-#define PNG_gAMA png_byte png_gAMA[5] = {103,  65,  77,  65, '\0'}
-#define PNG_hIST png_byte png_hIST[5] = {104,  73,  83,  84, '\0'}
-#define PNG_iCCP png_byte png_iCCP[5] = {105,  67,  67,  80, '\0'}
-#define PNG_iTXt png_byte png_iTXt[5] = {105,  84,  88, 116, '\0'}
-#define PNG_oFFs png_byte png_oFFs[5] = {111,  70,  70, 115, '\0'}
-#define PNG_pCAL png_byte png_pCAL[5] = {112,  67,  65,  76, '\0'}
-#define PNG_sCAL png_byte png_sCAL[5] = {115,  67,  65,  76, '\0'}
-#define PNG_pHYs png_byte png_pHYs[5] = {112,  72,  89, 115, '\0'}
-#define PNG_sBIT png_byte png_sBIT[5] = {115,  66,  73,  84, '\0'}
-#define PNG_sPLT png_byte png_sPLT[5] = {115,  80,  76,  84, '\0'}
-#define PNG_sRGB png_byte png_sRGB[5] = {115,  82,  71,  66, '\0'}
-#define PNG_tEXt png_byte png_tEXt[5] = {116,  69,  88, 116, '\0'}
-#define PNG_tIME png_byte png_tIME[5] = {116,  73,  77,  69, '\0'}
-#define PNG_tRNS png_byte png_tRNS[5] = {116,  82,  78,  83, '\0'}
-#define PNG_zTXt png_byte png_zTXt[5] = {122,  84,  88, 116, '\0'}
-
-#ifdef PNG_USE_GLOBAL_ARRAYS
-PNG_EXPORT_VAR (png_byte FARDATA) png_IHDR[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_IDAT[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_IEND[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_PLTE[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_bKGD[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_cHRM[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_gAMA[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_hIST[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_iCCP[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_iTXt[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_oFFs[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_pCAL[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_sCAL[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_pHYs[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_sBIT[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_sPLT[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_sRGB[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_tEXt[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_tIME[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_tRNS[5];
-PNG_EXPORT_VAR (png_byte FARDATA) png_zTXt[5];
-#endif /* PNG_USE_GLOBAL_ARRAYS */
-
-#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
-/* Initialize png_ptr struct for reading, and allocate any other memory.
- * (old interface - DEPRECATED - use png_create_read_struct instead).
- */
-extern PNG_EXPORT(void,png_read_init) PNGARG((png_structp png_ptr));
-#undef png_read_init
-#define png_read_init(png_ptr) png_read_init_3(&png_ptr, \
-    PNG_LIBPNG_VER_STRING,  png_sizeof(png_struct));
-#endif
-
-extern PNG_EXPORT(void,png_read_init_3) PNGARG((png_structpp ptr_ptr,
-    png_const_charp user_png_ver, png_size_t png_struct_size));
-#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
-extern PNG_EXPORT(void,png_read_init_2) PNGARG((png_structp png_ptr,
-    png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t
-    png_info_size));
-#endif
-
-#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
-/* Initialize png_ptr struct for writing, and allocate any other memory.
- * (old interface - DEPRECATED - use png_create_write_struct instead).
- */
-extern PNG_EXPORT(void,png_write_init) PNGARG((png_structp png_ptr));
-#undef png_write_init
-#define png_write_init(png_ptr) png_write_init_3(&png_ptr, \
-    PNG_LIBPNG_VER_STRING, png_sizeof(png_struct));
-#endif
-
-extern PNG_EXPORT(void,png_write_init_3) PNGARG((png_structpp ptr_ptr,
-    png_const_charp user_png_ver, png_size_t png_struct_size));
-extern PNG_EXPORT(void,png_write_init_2) PNGARG((png_structp png_ptr,
-    png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t
-    png_info_size));
-
-/* Allocate memory for an internal libpng struct */
-PNG_EXTERN png_voidp png_create_struct PNGARG((int type));
-
-/* Free memory from internal libpng struct */
-PNG_EXTERN void png_destroy_struct PNGARG((png_voidp struct_ptr));
-
-PNG_EXTERN png_voidp png_create_struct_2 PNGARG((int type, png_malloc_ptr
-  malloc_fn, png_voidp mem_ptr));
-PNG_EXTERN void png_destroy_struct_2 PNGARG((png_voidp struct_ptr,
-   png_free_ptr free_fn, png_voidp mem_ptr));
-
-/* Free any memory that info_ptr points to and reset struct. */
-PNG_EXTERN void png_info_destroy PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-
-#ifndef PNG_1_0_X
-/* Function to allocate memory for zlib. */
-PNG_EXTERN voidpf png_zalloc PNGARG((voidpf png_ptr, uInt items, uInt size));
-
-/* Function to free memory for zlib */
-PNG_EXTERN void png_zfree PNGARG((voidpf png_ptr, voidpf ptr));
-
-#ifdef PNG_SIZE_T
-/* Function to convert a sizeof an item to png_sizeof item */
-   PNG_EXTERN png_size_t PNGAPI png_convert_size PNGARG((size_t size));
-#endif
-
-/* Next four functions are used internally as callbacks.  PNGAPI is required
- * but not PNG_EXPORT.  PNGAPI added at libpng version 1.2.3. */
-
-PNG_EXTERN void PNGAPI png_default_read_data PNGARG((png_structp png_ptr,
-   png_bytep data, png_size_t length));
-
-#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
-PNG_EXTERN void PNGAPI png_push_fill_buffer PNGARG((png_structp png_ptr,
-   png_bytep buffer, png_size_t length));
-#endif
-
-PNG_EXTERN void PNGAPI png_default_write_data PNGARG((png_structp png_ptr,
-   png_bytep data, png_size_t length));
-
-#if defined(PNG_WRITE_FLUSH_SUPPORTED)
-#if !defined(PNG_NO_STDIO)
-PNG_EXTERN void PNGAPI png_default_flush PNGARG((png_structp png_ptr));
-#endif
-#endif
-#else /* PNG_1_0_X */
-#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
-PNG_EXTERN void png_push_fill_buffer PNGARG((png_structp png_ptr,
-   png_bytep buffer, png_size_t length));
-#endif
-#endif /* PNG_1_0_X */
-
-/* Reset the CRC variable */
-PNG_EXTERN void png_reset_crc PNGARG((png_structp png_ptr));
-
-/* Write the "data" buffer to whatever output you are using. */
-PNG_EXTERN void png_write_data PNGARG((png_structp png_ptr, png_bytep data,
-   png_size_t length));
-
-/* Read data from whatever input you are using into the "data" buffer */
-PNG_EXTERN void png_read_data PNGARG((png_structp png_ptr, png_bytep data,
-   png_size_t length));
-
-/* Read bytes into buf, and update png_ptr->crc */
-PNG_EXTERN void png_crc_read PNGARG((png_structp png_ptr, png_bytep buf,
-   png_size_t length));
-
-/* Decompress data in a chunk that uses compression */
-#if defined(PNG_zTXt_SUPPORTED) || defined(PNG_iTXt_SUPPORTED) || \
-    defined(PNG_iCCP_SUPPORTED) || defined(PNG_sPLT_SUPPORTED)
-PNG_EXTERN void png_decompress_chunk PNGARG((png_structp png_ptr,
-   int comp_type, png_size_t chunklength,
-   png_size_t prefix_length, png_size_t *data_length));
-#endif
-
-/* Read "skip" bytes, read the file crc, and (optionally) verify png_ptr->crc */
-PNG_EXTERN int png_crc_finish PNGARG((png_structp png_ptr, png_uint_32 skip));
-
-/* Read the CRC from the file and compare it to the libpng calculated CRC */
-PNG_EXTERN int png_crc_error PNGARG((png_structp png_ptr));
-
-/* Calculate the CRC over a section of data.  Note that we are only
- * passing a maximum of 64K on systems that have this as a memory limit,
- * since this is the maximum buffer size we can specify.
- */
-PNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr, png_bytep ptr,
-   png_size_t length));
-
-#if defined(PNG_WRITE_FLUSH_SUPPORTED)
-PNG_EXTERN void png_flush PNGARG((png_structp png_ptr));
-#endif
-
-/* simple function to write the signature */
-PNG_EXTERN void png_write_sig PNGARG((png_structp png_ptr));
-
-/* write various chunks */
-
-/* Write the IHDR chunk, and update the png_struct with the necessary
- * information.
- */
-PNG_EXTERN void png_write_IHDR PNGARG((png_structp png_ptr, png_uint_32 width,
-   png_uint_32 height,
-   int bit_depth, int color_type, int compression_method, int filter_method,
-   int interlace_method));
-
-PNG_EXTERN void png_write_PLTE PNGARG((png_structp png_ptr, png_colorp palette,
-   png_uint_32 num_pal));
-
-PNG_EXTERN void png_write_IDAT PNGARG((png_structp png_ptr, png_bytep data,
-   png_size_t length));
-
-PNG_EXTERN void png_write_IEND PNGARG((png_structp png_ptr));
-
-#if defined(PNG_WRITE_gAMA_SUPPORTED)
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-PNG_EXTERN void png_write_gAMA PNGARG((png_structp png_ptr, double file_gamma));
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
-PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr, png_fixed_point
-    file_gamma));
-#endif
-#endif
-
-#if defined(PNG_WRITE_sBIT_SUPPORTED)
-PNG_EXTERN void png_write_sBIT PNGARG((png_structp png_ptr, png_color_8p sbit,
-   int color_type));
-#endif
-
-#if defined(PNG_WRITE_cHRM_SUPPORTED)
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-PNG_EXTERN void png_write_cHRM PNGARG((png_structp png_ptr,
-   double white_x, double white_y,
-   double red_x, double red_y, double green_x, double green_y,
-   double blue_x, double blue_y));
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
-PNG_EXTERN void png_write_cHRM_fixed PNGARG((png_structp png_ptr,
-   png_fixed_point int_white_x, png_fixed_point int_white_y,
-   png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point
-   int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x,
-   png_fixed_point int_blue_y));
-#endif
-#endif
-
-#if defined(PNG_WRITE_sRGB_SUPPORTED)
-PNG_EXTERN void png_write_sRGB PNGARG((png_structp png_ptr,
-   int intent));
-#endif
-
-#if defined(PNG_WRITE_iCCP_SUPPORTED)
-PNG_EXTERN void png_write_iCCP PNGARG((png_structp png_ptr,
-   png_charp name, int compression_type,
-   png_charp profile, int proflen));
-   /* Note to maintainer: profile should be png_bytep */
-#endif
-
-#if defined(PNG_WRITE_sPLT_SUPPORTED)
-PNG_EXTERN void png_write_sPLT PNGARG((png_structp png_ptr,
-   png_sPLT_tp palette));
-#endif
-
-#if defined(PNG_WRITE_tRNS_SUPPORTED)
-PNG_EXTERN void png_write_tRNS PNGARG((png_structp png_ptr, png_bytep trans,
-   png_color_16p values, int number, int color_type));
-#endif
-
-#if defined(PNG_WRITE_bKGD_SUPPORTED)
-PNG_EXTERN void png_write_bKGD PNGARG((png_structp png_ptr,
-   png_color_16p values, int color_type));
-#endif
-
-#if defined(PNG_WRITE_hIST_SUPPORTED)
-PNG_EXTERN void png_write_hIST PNGARG((png_structp png_ptr, png_uint_16p hist,
-   int num_hist));
-#endif
-
-#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \
-    defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED)
-PNG_EXTERN png_size_t png_check_keyword PNGARG((png_structp png_ptr,
-   png_charp key, png_charpp new_key));
-#endif
-
-#if defined(PNG_WRITE_tEXt_SUPPORTED)
-PNG_EXTERN void png_write_tEXt PNGARG((png_structp png_ptr, png_charp key,
-   png_charp text, png_size_t text_len));
-#endif
-
-#if defined(PNG_WRITE_zTXt_SUPPORTED)
-PNG_EXTERN void png_write_zTXt PNGARG((png_structp png_ptr, png_charp key,
-   png_charp text, png_size_t text_len, int compression));
-#endif
-
-#if defined(PNG_WRITE_iTXt_SUPPORTED)
-PNG_EXTERN void png_write_iTXt PNGARG((png_structp png_ptr,
-   int compression, png_charp key, png_charp lang, png_charp lang_key,
-   png_charp text));
-#endif
-
-#if defined(PNG_TEXT_SUPPORTED)  /* Added at version 1.0.14 and 1.2.4 */
-PNG_EXTERN int png_set_text_2 PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_textp text_ptr, int num_text));
-#endif
-
-#if defined(PNG_WRITE_oFFs_SUPPORTED)
-PNG_EXTERN void png_write_oFFs PNGARG((png_structp png_ptr,
-   png_int_32 x_offset, png_int_32 y_offset, int unit_type));
-#endif
-
-#if defined(PNG_WRITE_pCAL_SUPPORTED)
-PNG_EXTERN void png_write_pCAL PNGARG((png_structp png_ptr, png_charp purpose,
-   png_int_32 X0, png_int_32 X1, int type, int nparams,
-   png_charp units, png_charpp params));
-#endif
-
-#if defined(PNG_WRITE_pHYs_SUPPORTED)
-PNG_EXTERN void png_write_pHYs PNGARG((png_structp png_ptr,
-   png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit,
-   int unit_type));
-#endif
-
-#if defined(PNG_WRITE_tIME_SUPPORTED)
-PNG_EXTERN void png_write_tIME PNGARG((png_structp png_ptr,
-   png_timep mod_time));
-#endif
-
-#if defined(PNG_WRITE_sCAL_SUPPORTED)
-#if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO)
-PNG_EXTERN void png_write_sCAL PNGARG((png_structp png_ptr,
-   int unit, double width, double height));
-#else
-#ifdef PNG_FIXED_POINT_SUPPORTED
-PNG_EXTERN void png_write_sCAL_s PNGARG((png_structp png_ptr,
-   int unit, png_charp width, png_charp height));
-#endif
-#endif
-#endif
-
-/* Called when finished processing a row of data */
-PNG_EXTERN void png_write_finish_row PNGARG((png_structp png_ptr));
-
-/* Internal use only.   Called before first row of data */
-PNG_EXTERN void png_write_start_row PNGARG((png_structp png_ptr));
-
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr));
-#endif
-
-/* combine a row of data, dealing with alpha, etc. if requested */
-PNG_EXTERN void png_combine_row PNGARG((png_structp png_ptr, png_bytep row,
-   int mask));
-
-#if defined(PNG_READ_INTERLACING_SUPPORTED)
-/* expand an interlaced row */
-/* OLD pre-1.0.9 interface:
-PNG_EXTERN void png_do_read_interlace PNGARG((png_row_infop row_info,
-   png_bytep row, int pass, png_uint_32 transformations));
- */
-PNG_EXTERN void png_do_read_interlace PNGARG((png_structp png_ptr));
-#endif
-
-/* GRR TO DO (2.0 or whenever):  simplify other internal calling interfaces */
-
-#if defined(PNG_WRITE_INTERLACING_SUPPORTED)
-/* grab pixels out of a row for an interlaced pass */
-PNG_EXTERN void png_do_write_interlace PNGARG((png_row_infop row_info,
-   png_bytep row, int pass));
-#endif
-
-/* unfilter a row */
-PNG_EXTERN void png_read_filter_row PNGARG((png_structp png_ptr,
-   png_row_infop row_info, png_bytep row, png_bytep prev_row, int filter));
-
-/* Choose the best filter to use and filter the row data */
-PNG_EXTERN void png_write_find_filter PNGARG((png_structp png_ptr,
-   png_row_infop row_info));
-
-/* Write out the filtered row. */
-PNG_EXTERN void png_write_filtered_row PNGARG((png_structp png_ptr,
-   png_bytep filtered_row));
-/* finish a row while reading, dealing with interlacing passes, etc. */
-PNG_EXTERN void png_read_finish_row PNGARG((png_structp png_ptr));
-
-/* initialize the row buffers, etc. */
-PNG_EXTERN void png_read_start_row PNGARG((png_structp png_ptr));
-/* optional call to update the users info structure */
-PNG_EXTERN void png_read_transform_info PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-
-/* these are the functions that do the transformations */
-#if defined(PNG_READ_FILLER_SUPPORTED)
-PNG_EXTERN void png_do_read_filler PNGARG((png_row_infop row_info,
-   png_bytep row, png_uint_32 filler, png_uint_32 flags));
-#endif
-
-#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED)
-PNG_EXTERN void png_do_read_swap_alpha PNGARG((png_row_infop row_info,
-   png_bytep row));
-#endif
-
-#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)
-PNG_EXTERN void png_do_write_swap_alpha PNGARG((png_row_infop row_info,
-   png_bytep row));
-#endif
-
-#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED)
-PNG_EXTERN void png_do_read_invert_alpha PNGARG((png_row_infop row_info,
-   png_bytep row));
-#endif
-
-#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
-PNG_EXTERN void png_do_write_invert_alpha PNGARG((png_row_infop row_info,
-   png_bytep row));
-#endif
-
-#if defined(PNG_WRITE_FILLER_SUPPORTED) || \
-    defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
-PNG_EXTERN void png_do_strip_filler PNGARG((png_row_infop row_info,
-   png_bytep row, png_uint_32 flags));
-#endif
-
-#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
-PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info, png_bytep row));
-#endif
-
-#if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED)
-PNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info, png_bytep row));
-#endif
-
-#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
-PNG_EXTERN int png_do_rgb_to_gray PNGARG((png_structp png_ptr, png_row_infop
-   row_info, png_bytep row));
-#endif
-
-#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED)
-PNG_EXTERN void png_do_gray_to_rgb PNGARG((png_row_infop row_info,
-   png_bytep row));
-#endif
-
-#if defined(PNG_READ_PACK_SUPPORTED)
-PNG_EXTERN void png_do_unpack PNGARG((png_row_infop row_info, png_bytep row));
-#endif
-
-#if defined(PNG_READ_SHIFT_SUPPORTED)
-PNG_EXTERN void png_do_unshift PNGARG((png_row_infop row_info, png_bytep row,
-   png_color_8p sig_bits));
-#endif
-
-#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED)
-PNG_EXTERN void png_do_invert PNGARG((png_row_infop row_info, png_bytep row));
-#endif
-
-#if defined(PNG_READ_16_TO_8_SUPPORTED)
-PNG_EXTERN void png_do_chop PNGARG((png_row_infop row_info, png_bytep row));
-#endif
-
-#if defined(PNG_READ_DITHER_SUPPORTED)
-PNG_EXTERN void png_do_dither PNGARG((png_row_infop row_info,
-   png_bytep row, png_bytep palette_lookup, png_bytep dither_lookup));
-
-#  if defined(PNG_CORRECT_PALETTE_SUPPORTED)
-PNG_EXTERN void png_correct_palette PNGARG((png_structp png_ptr,
-   png_colorp palette, int num_palette));
-#  endif
-#endif
-
-#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
-PNG_EXTERN void png_do_bgr PNGARG((png_row_infop row_info, png_bytep row));
-#endif
-
-#if defined(PNG_WRITE_PACK_SUPPORTED)
-PNG_EXTERN void png_do_pack PNGARG((png_row_infop row_info,
-   png_bytep row, png_uint_32 bit_depth));
-#endif
-
-#if defined(PNG_WRITE_SHIFT_SUPPORTED)
-PNG_EXTERN void png_do_shift PNGARG((png_row_infop row_info, png_bytep row,
-   png_color_8p bit_depth));
-#endif
-
-#if defined(PNG_READ_BACKGROUND_SUPPORTED)
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row,
-   png_color_16p trans_values, png_color_16p background,
-   png_color_16p background_1,
-   png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1,
-   png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1,
-   png_uint_16pp gamma_16_to_1, int gamma_shift));
-#else
-PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row,
-   png_color_16p trans_values, png_color_16p background));
-#endif
-#endif
-
-#if defined(PNG_READ_GAMMA_SUPPORTED)
-PNG_EXTERN void png_do_gamma PNGARG((png_row_infop row_info, png_bytep row,
-   png_bytep gamma_table, png_uint_16pp gamma_16_table,
-   int gamma_shift));
-#endif
-
-#if defined(PNG_READ_EXPAND_SUPPORTED)
-PNG_EXTERN void png_do_expand_palette PNGARG((png_row_infop row_info,
-   png_bytep row, png_colorp palette, png_bytep trans, int num_trans));
-PNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info,
-   png_bytep row, png_color_16p trans_value));
-#endif
-
-/* The following decodes the appropriate chunks, and does error correction,
- * then calls the appropriate callback for the chunk if it is valid.
- */
-
-/* decode the IHDR chunk */
-PNG_EXTERN void png_handle_IHDR PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-PNG_EXTERN void png_handle_PLTE PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-PNG_EXTERN void png_handle_IEND PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-
-#if defined(PNG_READ_bKGD_SUPPORTED)
-PNG_EXTERN void png_handle_bKGD PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_cHRM_SUPPORTED)
-PNG_EXTERN void png_handle_cHRM PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_gAMA_SUPPORTED)
-PNG_EXTERN void png_handle_gAMA PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_hIST_SUPPORTED)
-PNG_EXTERN void png_handle_hIST PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_iCCP_SUPPORTED)
-extern void png_handle_iCCP PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif /* PNG_READ_iCCP_SUPPORTED */
-
-#if defined(PNG_READ_iTXt_SUPPORTED)
-PNG_EXTERN void png_handle_iTXt PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_oFFs_SUPPORTED)
-PNG_EXTERN void png_handle_oFFs PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_pCAL_SUPPORTED)
-PNG_EXTERN void png_handle_pCAL PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_pHYs_SUPPORTED)
-PNG_EXTERN void png_handle_pHYs PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_sBIT_SUPPORTED)
-PNG_EXTERN void png_handle_sBIT PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_sCAL_SUPPORTED)
-PNG_EXTERN void png_handle_sCAL PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_sPLT_SUPPORTED)
-extern void png_handle_sPLT PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif /* PNG_READ_sPLT_SUPPORTED */
-
-#if defined(PNG_READ_sRGB_SUPPORTED)
-PNG_EXTERN void png_handle_sRGB PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_tEXt_SUPPORTED)
-PNG_EXTERN void png_handle_tEXt PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_tIME_SUPPORTED)
-PNG_EXTERN void png_handle_tIME PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_tRNS_SUPPORTED)
-PNG_EXTERN void png_handle_tRNS PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif
-
-#if defined(PNG_READ_zTXt_SUPPORTED)
-PNG_EXTERN void png_handle_zTXt PNGARG((png_structp png_ptr, png_infop info_ptr,
-   png_uint_32 length));
-#endif
-
-PNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_uint_32 length));
-
-PNG_EXTERN void png_check_chunk_name PNGARG((png_structp png_ptr,
-   png_bytep chunk_name));
-
-/* handle the transformations for reading and writing */
-PNG_EXTERN void png_do_read_transformations PNGARG((png_structp png_ptr));
-PNG_EXTERN void png_do_write_transformations PNGARG((png_structp png_ptr));
-
-PNG_EXTERN void png_init_read_transformations PNGARG((png_structp png_ptr));
-
-#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
-PNG_EXTERN void png_push_read_chunk PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-PNG_EXTERN void png_push_read_sig PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-PNG_EXTERN void png_push_check_crc PNGARG((png_structp png_ptr));
-PNG_EXTERN void png_push_crc_skip PNGARG((png_structp png_ptr,
-   png_uint_32 length));
-PNG_EXTERN void png_push_crc_finish PNGARG((png_structp png_ptr));
-PNG_EXTERN void png_push_save_buffer PNGARG((png_structp png_ptr));
-PNG_EXTERN void png_push_restore_buffer PNGARG((png_structp png_ptr,
-   png_bytep buffer, png_size_t buffer_length));
-PNG_EXTERN void png_push_read_IDAT PNGARG((png_structp png_ptr));
-PNG_EXTERN void png_process_IDAT_data PNGARG((png_structp png_ptr,
-   png_bytep buffer, png_size_t buffer_length));
-PNG_EXTERN void png_push_process_row PNGARG((png_structp png_ptr));
-PNG_EXTERN void png_push_handle_unknown PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_uint_32 length));
-PNG_EXTERN void png_push_have_info PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-PNG_EXTERN void png_push_have_end PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-PNG_EXTERN void png_push_have_row PNGARG((png_structp png_ptr, png_bytep row));
-PNG_EXTERN void png_push_read_end PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-PNG_EXTERN void png_process_some_data PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-PNG_EXTERN void png_read_push_finish_row PNGARG((png_structp png_ptr));
-#if defined(PNG_READ_tEXt_SUPPORTED)
-PNG_EXTERN void png_push_handle_tEXt PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_uint_32 length));
-PNG_EXTERN void png_push_read_tEXt PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-#endif
-#if defined(PNG_READ_zTXt_SUPPORTED)
-PNG_EXTERN void png_push_handle_zTXt PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_uint_32 length));
-PNG_EXTERN void png_push_read_zTXt PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-#endif
-#if defined(PNG_READ_iTXt_SUPPORTED)
-PNG_EXTERN void png_push_handle_iTXt PNGARG((png_structp png_ptr,
-   png_infop info_ptr, png_uint_32 length));
-PNG_EXTERN void png_push_read_iTXt PNGARG((png_structp png_ptr,
-   png_infop info_ptr));
-#endif
-
-#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
-
-#ifdef PNG_MNG_FEATURES_SUPPORTED
-PNG_EXTERN void png_do_read_intrapixel PNGARG((png_row_infop row_info,
-   png_bytep row));
-PNG_EXTERN void png_do_write_intrapixel PNGARG((png_row_infop row_info,
-   png_bytep row));
-#endif
-
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
-#if defined(PNG_MMX_CODE_SUPPORTED)
-/* png.c */ /* PRIVATE */
-PNG_EXTERN void png_init_mmx_flags PNGARG((png_structp png_ptr));
-#endif
-#endif
-
-#if defined(PNG_INCH_CONVERSIONS) && defined(PNG_FLOATING_POINT_SUPPORTED)
-PNG_EXTERN png_uint_32 png_get_pixels_per_inch PNGARG((png_structp png_ptr,
-png_infop info_ptr));
-
-PNG_EXTERN png_uint_32 png_get_x_pixels_per_inch PNGARG((png_structp png_ptr,
-png_infop info_ptr));
-
-PNG_EXTERN png_uint_32 png_get_y_pixels_per_inch PNGARG((png_structp png_ptr,
-png_infop info_ptr));
-
-PNG_EXTERN float png_get_x_offset_inches PNGARG((png_structp png_ptr,
-png_infop info_ptr));
-
-PNG_EXTERN float png_get_y_offset_inches PNGARG((png_structp png_ptr,
-png_infop info_ptr));
-
-#if defined(PNG_pHYs_SUPPORTED)
-PNG_EXTERN png_uint_32 png_get_pHYs_dpi PNGARG((png_structp png_ptr,
-png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type));
-#endif /* PNG_pHYs_SUPPORTED */
-#endif  /* PNG_INCH_CONVERSIONS && PNG_FLOATING_POINT_SUPPORTED */
-
-/* Read the chunk header (length + type name) */
-PNG_EXTERN png_uint_32 png_read_chunk_header PNGARG((png_structp png_ptr));
-
-/* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */
-
-#endif /* PNG_INTERNAL */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* PNG_VERSION_INFO_ONLY */
-/* do not put anything past this line */
-#endif /* PNG_H */
diff --git a/extra_lib/include/png/pngconf.h b/extra_lib/include/png/pngconf.h
deleted file mode 100644
index a59102c..0000000
--- a/extra_lib/include/png/pngconf.h
+++ /dev/null
@@ -1,1487 +0,0 @@
-
-/* pngconf.h - machine configurable file for libpng
- *
- * libpng version 1.2.33 - October 31, 2008
- * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2008 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
- */
-
-/* Any machine specific code is near the front of this file, so if you
- * are configuring libpng for a machine, you may want to read the section
- * starting here down to where it starts to typedef png_color, png_text,
- * and png_info.
- */
-
-#ifndef PNGCONF_H
-#define PNGCONF_H
-
-#define PNG_1_2_X
-
-/* 
- * PNG_USER_CONFIG has to be defined on the compiler command line. This
- * includes the resource compiler for Windows DLL configurations.
- */
-#ifdef PNG_USER_CONFIG
-#  ifndef PNG_USER_PRIVATEBUILD
-#    define PNG_USER_PRIVATEBUILD
-#  endif
-#include "pngusr.h"
-#endif
-
-/* PNG_CONFIGURE_LIBPNG is set by the "configure" script. */
-#ifdef PNG_CONFIGURE_LIBPNG
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-#endif
-
-/*
- * Added at libpng-1.2.8
- *  
- * If you create a private DLL you need to define in "pngusr.h" the followings:
- * #define PNG_USER_PRIVATEBUILD <Describes by whom and why this version of
- *        the DLL was built>
- *  e.g. #define PNG_USER_PRIVATEBUILD "Build by MyCompany for xyz reasons."
- * #define PNG_USER_DLLFNAME_POSTFIX <two-letter postfix that serve to
- *        distinguish your DLL from those of the official release. These
- *        correspond to the trailing letters that come after the version
- *        number and must match your private DLL name>
- *  e.g. // private DLL "libpng13gx.dll"
- *       #define PNG_USER_DLLFNAME_POSTFIX "gx"
- * 
- * The following macros are also at your disposal if you want to complete the 
- * DLL VERSIONINFO structure.
- * - PNG_USER_VERSIONINFO_COMMENTS
- * - PNG_USER_VERSIONINFO_COMPANYNAME
- * - PNG_USER_VERSIONINFO_LEGALTRADEMARKS
- */
-
-#ifdef __STDC__
-#ifdef SPECIALBUILD
-#  pragma message("PNG_LIBPNG_SPECIALBUILD (and deprecated SPECIALBUILD)\
- are now LIBPNG reserved macros. Use PNG_USER_PRIVATEBUILD instead.")
-#endif
-
-#ifdef PRIVATEBUILD
-# pragma message("PRIVATEBUILD is deprecated.\
- Use PNG_USER_PRIVATEBUILD instead.")
-# define PNG_USER_PRIVATEBUILD PRIVATEBUILD
-#endif
-#endif /* __STDC__ */
-
-#ifndef PNG_VERSION_INFO_ONLY
-
-/* End of material added to libpng-1.2.8 */
-
-/* Added at libpng-1.2.19, removed at libpng-1.2.20 because it caused trouble
-   Restored at libpng-1.2.21 */
-#if !defined(PNG_NO_WARN_UNINITIALIZED_ROW) && \
-    !defined(PNG_WARN_UNINITIALIZED_ROW)
-#  define PNG_WARN_UNINITIALIZED_ROW 1
-#endif
-/* End of material added at libpng-1.2.19/1.2.21 */
-
-/* This is the size of the compression buffer, and thus the size of
- * an IDAT chunk.  Make this whatever size you feel is best for your
- * machine.  One of these will be allocated per png_struct.  When this
- * is full, it writes the data to the disk, and does some other
- * calculations.  Making this an extremely small size will slow
- * the library down, but you may want to experiment to determine
- * where it becomes significant, if you are concerned with memory
- * usage.  Note that zlib allocates at least 32Kb also.  For readers,
- * this describes the size of the buffer available to read the data in.
- * Unless this gets smaller than the size of a row (compressed),
- * it should not make much difference how big this is.
- */
-
-#ifndef PNG_ZBUF_SIZE
-#  define PNG_ZBUF_SIZE 8192
-#endif
-
-/* Enable if you want a write-only libpng */
-
-#ifndef PNG_NO_READ_SUPPORTED
-#  define PNG_READ_SUPPORTED
-#endif
-
-/* Enable if you want a read-only libpng */
-
-#ifndef PNG_NO_WRITE_SUPPORTED
-#  define PNG_WRITE_SUPPORTED
-#endif
-
-/* Enabled by default in 1.2.0.  You can disable this if you don't need to
-   support PNGs that are embedded in MNG datastreams */
-#if !defined(PNG_1_0_X) && !defined(PNG_NO_MNG_FEATURES)
-#  ifndef PNG_MNG_FEATURES_SUPPORTED
-#    define PNG_MNG_FEATURES_SUPPORTED
-#  endif
-#endif
-
-#ifndef PNG_NO_FLOATING_POINT_SUPPORTED
-#  ifndef PNG_FLOATING_POINT_SUPPORTED
-#    define PNG_FLOATING_POINT_SUPPORTED
-#  endif
-#endif
-
-/* If you are running on a machine where you cannot allocate more
- * than 64K of memory at once, uncomment this.  While libpng will not
- * normally need that much memory in a chunk (unless you load up a very
- * large file), zlib needs to know how big of a chunk it can use, and
- * libpng thus makes sure to check any memory allocation to verify it
- * will fit into memory.
-#define PNG_MAX_MALLOC_64K
- */
-#if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K)
-#  define PNG_MAX_MALLOC_64K
-#endif
-
-/* Special munging to support doing things the 'cygwin' way:
- * 'Normal' png-on-win32 defines/defaults:
- *   PNG_BUILD_DLL -- building dll
- *   PNG_USE_DLL   -- building an application, linking to dll
- *   (no define)   -- building static library, or building an
- *                    application and linking to the static lib
- * 'Cygwin' defines/defaults:
- *   PNG_BUILD_DLL -- (ignored) building the dll
- *   (no define)   -- (ignored) building an application, linking to the dll
- *   PNG_STATIC    -- (ignored) building the static lib, or building an 
- *                    application that links to the static lib.
- *   ALL_STATIC    -- (ignored) building various static libs, or building an 
- *                    application that links to the static libs.
- * Thus,
- * a cygwin user should define either PNG_BUILD_DLL or PNG_STATIC, and
- * this bit of #ifdefs will define the 'correct' config variables based on
- * that. If a cygwin user *wants* to define 'PNG_USE_DLL' that's okay, but
- * unnecessary.
- *
- * Also, the precedence order is:
- *   ALL_STATIC (since we can't #undef something outside our namespace)
- *   PNG_BUILD_DLL
- *   PNG_STATIC
- *   (nothing) == PNG_USE_DLL
- * 
- * CYGWIN (2002-01-20): The preceding is now obsolete. With the advent
- *   of auto-import in binutils, we no longer need to worry about 
- *   __declspec(dllexport) / __declspec(dllimport) and friends.  Therefore,
- *   we don't need to worry about PNG_STATIC or ALL_STATIC when it comes
- *   to __declspec() stuff.  However, we DO need to worry about 
- *   PNG_BUILD_DLL and PNG_STATIC because those change some defaults
- *   such as CONSOLE_IO and whether GLOBAL_ARRAYS are allowed.
- */
-#if defined(__CYGWIN__)
-#  if defined(ALL_STATIC)
-#    if defined(PNG_BUILD_DLL)
-#      undef PNG_BUILD_DLL
-#    endif
-#    if defined(PNG_USE_DLL)
-#      undef PNG_USE_DLL
-#    endif
-#    if defined(PNG_DLL)
-#      undef PNG_DLL
-#    endif
-#    if !defined(PNG_STATIC)
-#      define PNG_STATIC
-#    endif
-#  else
-#    if defined (PNG_BUILD_DLL)
-#      if defined(PNG_STATIC)
-#        undef PNG_STATIC
-#      endif
-#      if defined(PNG_USE_DLL)
-#        undef PNG_USE_DLL
-#      endif
-#      if !defined(PNG_DLL)
-#        define PNG_DLL
-#      endif
-#    else
-#      if defined(PNG_STATIC)
-#        if defined(PNG_USE_DLL)
-#          undef PNG_USE_DLL
-#        endif
-#        if defined(PNG_DLL)
-#          undef PNG_DLL
-#        endif
-#      else
-#        if !defined(PNG_USE_DLL)
-#          define PNG_USE_DLL
-#        endif
-#        if !defined(PNG_DLL)
-#          define PNG_DLL
-#        endif
-#      endif  
-#    endif  
-#  endif
-#endif
-
-/* This protects us against compilers that run on a windowing system
- * and thus don't have or would rather us not use the stdio types:
- * stdin, stdout, and stderr.  The only one currently used is stderr
- * in png_error() and png_warning().  #defining PNG_NO_CONSOLE_IO will
- * prevent these from being compiled and used. #defining PNG_NO_STDIO
- * will also prevent these, plus will prevent the entire set of stdio
- * macros and functions (FILE *, printf, etc.) from being compiled and used,
- * unless (PNG_DEBUG > 0) has been #defined.
- *
- * #define PNG_NO_CONSOLE_IO
- * #define PNG_NO_STDIO
- */
-
-#if defined(_WIN32_WCE)
-#  include <windows.h>
-   /* Console I/O functions are not supported on WindowsCE */
-#  define PNG_NO_CONSOLE_IO
-#  ifdef PNG_DEBUG
-#    undef PNG_DEBUG
-#  endif
-#endif
-
-#ifdef PNG_BUILD_DLL
-#  ifndef PNG_CONSOLE_IO_SUPPORTED
-#    ifndef PNG_NO_CONSOLE_IO
-#      define PNG_NO_CONSOLE_IO
-#    endif
-#  endif
-#endif
-
-#  ifdef PNG_NO_STDIO
-#    ifndef PNG_NO_CONSOLE_IO
-#      define PNG_NO_CONSOLE_IO
-#    endif
-#    ifdef PNG_DEBUG
-#      if (PNG_DEBUG > 0)
-#        include <stdio.h>
-#      endif
-#    endif
-#  else
-#    if !defined(_WIN32_WCE)
-/* "stdio.h" functions are not supported on WindowsCE */
-#      include <stdio.h>
-#    endif
-#  endif
-
-/* This macro protects us against machines that don't have function
- * prototypes (ie K&R style headers).  If your compiler does not handle
- * function prototypes, define this macro and use the included ansi2knr.
- * I've always been able to use _NO_PROTO as the indicator, but you may
- * need to drag the empty declaration out in front of here, or change the
- * ifdef to suit your own needs.
- */
-#ifndef PNGARG
-
-#ifdef OF /* zlib prototype munger */
-#  define PNGARG(arglist) OF(arglist)
-#else
-
-#ifdef _NO_PROTO
-#  define PNGARG(arglist) ()
-#  ifndef PNG_TYPECAST_NULL
-#     define PNG_TYPECAST_NULL
-#  endif
-#else
-#  define PNGARG(arglist) arglist
-#endif /* _NO_PROTO */
-
-
-#endif /* OF */
-
-#endif /* PNGARG */
-
-/* Try to determine if we are compiling on a Mac.  Note that testing for
- * just __MWERKS__ is not good enough, because the Codewarrior is now used
- * on non-Mac platforms.
- */
-#ifndef MACOS
-#  if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \
-      defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC)
-#    define MACOS
-#  endif
-#endif
-
-/* enough people need this for various reasons to include it here */
-#if !defined(MACOS) && !defined(RISCOS) && !defined(_WIN32_WCE)
-#  include <sys/types.h>
-#endif
-
-#if !defined(PNG_SETJMP_NOT_SUPPORTED) && !defined(PNG_NO_SETJMP_SUPPORTED)
-#  define PNG_SETJMP_SUPPORTED
-#endif
-
-#ifdef PNG_SETJMP_SUPPORTED
-/* This is an attempt to force a single setjmp behaviour on Linux.  If
- * the X config stuff didn't define _BSD_SOURCE we wouldn't need this.
- */
-
-#  ifdef __linux__
-#    ifdef _BSD_SOURCE
-#      define PNG_SAVE_BSD_SOURCE
-#      undef _BSD_SOURCE
-#    endif
-#    ifdef _SETJMP_H
-     /* If you encounter a compiler error here, see the explanation
-      * near the end of INSTALL.
-      */
-         __pngconf.h__ already includes setjmp.h;
-         __dont__ include it again.;
-#    endif
-#  endif /* __linux__ */
-
-   /* include setjmp.h for error handling */
-#  include <setjmp.h>
-
-#  ifdef __linux__
-#    ifdef PNG_SAVE_BSD_SOURCE
-#      ifndef _BSD_SOURCE
-#        define _BSD_SOURCE
-#      endif
-#      undef PNG_SAVE_BSD_SOURCE
-#    endif
-#  endif /* __linux__ */
-#endif /* PNG_SETJMP_SUPPORTED */
-
-#ifdef BSD
-#  include <strings.h>
-#else
-#  include <string.h>
-#endif
-
-/* Other defines for things like memory and the like can go here.  */
-#ifdef PNG_INTERNAL
-
-#include <stdlib.h>
-
-/* The functions exported by PNG_EXTERN are PNG_INTERNAL functions, which
- * aren't usually used outside the library (as far as I know), so it is
- * debatable if they should be exported at all.  In the future, when it is
- * possible to have run-time registry of chunk-handling functions, some of
- * these will be made available again.
-#define PNG_EXTERN extern
- */
-#define PNG_EXTERN
-
-/* Other defines specific to compilers can go here.  Try to keep
- * them inside an appropriate ifdef/endif pair for portability.
- */
-
-#if defined(PNG_FLOATING_POINT_SUPPORTED)
-#  if defined(MACOS)
-     /* We need to check that <math.h> hasn't already been included earlier
-      * as it seems it doesn't agree with <fp.h>, yet we should really use
-      * <fp.h> if possible.
-      */
-#    if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)
-#      include <fp.h>
-#    endif
-#  else
-#    include <math.h>
-#  endif
-#  if defined(_AMIGA) && defined(__SASC) && defined(_M68881)
-     /* Amiga SAS/C: We must include builtin FPU functions when compiling using
-      * MATH=68881
-      */
-#    include <m68881.h>
-#  endif
-#endif
-
-/* Codewarrior on NT has linking problems without this. */
-#if (defined(__MWERKS__) && defined(WIN32)) || defined(__STDC__)
-#  define PNG_ALWAYS_EXTERN
-#endif
-
-/* This provides the non-ANSI (far) memory allocation routines. */
-#if defined(__TURBOC__) && defined(__MSDOS__)
-#  include <mem.h>
-#  include <alloc.h>
-#endif
-
-/* I have no idea why is this necessary... */
-#if defined(_MSC_VER) && (defined(WIN32) || defined(_Windows) || \
-    defined(_WINDOWS) || defined(_WIN32) || defined(__WIN32__))
-#  include <malloc.h>
-#endif
-
-/* This controls how fine the dithering gets.  As this allocates
- * a largish chunk of memory (32K), those who are not as concerned
- * with dithering quality can decrease some or all of these.
- */
-#ifndef PNG_DITHER_RED_BITS
-#  define PNG_DITHER_RED_BITS 5
-#endif
-#ifndef PNG_DITHER_GREEN_BITS
-#  define PNG_DITHER_GREEN_BITS 5
-#endif
-#ifndef PNG_DITHER_BLUE_BITS
-#  define PNG_DITHER_BLUE_BITS 5
-#endif
-
-/* This controls how fine the gamma correction becomes when you
- * are only interested in 8 bits anyway.  Increasing this value
- * results in more memory being used, and more pow() functions
- * being called to fill in the gamma tables.  Don't set this value
- * less then 8, and even that may not work (I haven't tested it).
- */
-
-#ifndef PNG_MAX_GAMMA_8
-#  define PNG_MAX_GAMMA_8 11
-#endif
-
-/* This controls how much a difference in gamma we can tolerate before
- * we actually start doing gamma conversion.
- */
-#ifndef PNG_GAMMA_THRESHOLD
-#  define PNG_GAMMA_THRESHOLD 0.05
-#endif
-
-#endif /* PNG_INTERNAL */
-
-/* The following uses const char * instead of char * for error
- * and warning message functions, so some compilers won't complain.
- * If you do not want to use const, define PNG_NO_CONST here.
- */
-
-#ifndef PNG_NO_CONST
-#  define PNG_CONST const
-#else
-#  define PNG_CONST
-#endif
-
-/* The following defines give you the ability to remove code from the
- * library that you will not be using.  I wish I could figure out how to
- * automate this, but I can't do that without making it seriously hard
- * on the users.  So if you are not using an ability, change the #define
- * to and #undef, and that part of the library will not be compiled.  If
- * your linker can't find a function, you may want to make sure the
- * ability is defined here.  Some of these depend upon some others being
- * defined.  I haven't figured out all the interactions here, so you may
- * have to experiment awhile to get everything to compile.  If you are
- * creating or using a shared library, you probably shouldn't touch this,
- * as it will affect the size of the structures, and this will cause bad
- * things to happen if the library and/or application ever change.
- */
-
-/* Any features you will not be using can be undef'ed here */
-
-/* GR-P, 0.96a: Set "*TRANSFORMS_SUPPORTED as default but allow user
- * to turn it off with "*TRANSFORMS_NOT_SUPPORTED" or *PNG_NO_*_TRANSFORMS
- * on the compile line, then pick and choose which ones to define without
- * having to edit this file. It is safe to use the *TRANSFORMS_NOT_SUPPORTED
- * if you only want to have a png-compliant reader/writer but don't need
- * any of the extra transformations.  This saves about 80 kbytes in a
- * typical installation of the library. (PNG_NO_* form added in version
- * 1.0.1c, for consistency)
- */
-
-/* The size of the png_text structure changed in libpng-1.0.6 when
- * iTXt support was added.  iTXt support was turned off by default through
- * libpng-1.2.x, to support old apps that malloc the png_text structure
- * instead of calling png_set_text() and letting libpng malloc it.  It
- * was turned on by default in libpng-1.3.0.
- */
-
-#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
-#  ifndef PNG_NO_iTXt_SUPPORTED
-#    define PNG_NO_iTXt_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_iTXt
-#    define PNG_NO_READ_iTXt
-#  endif
-#  ifndef PNG_NO_WRITE_iTXt
-#    define PNG_NO_WRITE_iTXt
-#  endif
-#endif
-
-#if !defined(PNG_NO_iTXt_SUPPORTED)
-#  if !defined(PNG_READ_iTXt_SUPPORTED) && !defined(PNG_NO_READ_iTXt)
-#    define PNG_READ_iTXt
-#  endif
-#  if !defined(PNG_WRITE_iTXt_SUPPORTED) && !defined(PNG_NO_WRITE_iTXt)
-#    define PNG_WRITE_iTXt
-#  endif
-#endif
-
-/* The following support, added after version 1.0.0, can be turned off here en
- * masse by defining PNG_LEGACY_SUPPORTED in case you need binary compatibility
- * with old applications that require the length of png_struct and png_info
- * to remain unchanged.
- */
-
-#ifdef PNG_LEGACY_SUPPORTED
-#  define PNG_NO_FREE_ME
-#  define PNG_NO_READ_UNKNOWN_CHUNKS
-#  define PNG_NO_WRITE_UNKNOWN_CHUNKS
-#  define PNG_NO_READ_USER_CHUNKS
-#  define PNG_NO_READ_iCCP
-#  define PNG_NO_WRITE_iCCP
-#  define PNG_NO_READ_iTXt
-#  define PNG_NO_WRITE_iTXt
-#  define PNG_NO_READ_sCAL
-#  define PNG_NO_WRITE_sCAL
-#  define PNG_NO_READ_sPLT
-#  define PNG_NO_WRITE_sPLT
-#  define PNG_NO_INFO_IMAGE
-#  define PNG_NO_READ_RGB_TO_GRAY
-#  define PNG_NO_READ_USER_TRANSFORM
-#  define PNG_NO_WRITE_USER_TRANSFORM
-#  define PNG_NO_USER_MEM
-#  define PNG_NO_READ_EMPTY_PLTE
-#  define PNG_NO_MNG_FEATURES
-#  define PNG_NO_FIXED_POINT_SUPPORTED
-#endif
-
-/* Ignore attempt to turn off both floating and fixed point support */
-#if !defined(PNG_FLOATING_POINT_SUPPORTED) || \
-    !defined(PNG_NO_FIXED_POINT_SUPPORTED)
-#  define PNG_FIXED_POINT_SUPPORTED
-#endif
-
-#ifndef PNG_NO_FREE_ME
-#  define PNG_FREE_ME_SUPPORTED
-#endif
-
-#if defined(PNG_READ_SUPPORTED)
-
-#if !defined(PNG_READ_TRANSFORMS_NOT_SUPPORTED) && \
-      !defined(PNG_NO_READ_TRANSFORMS)
-#  define PNG_READ_TRANSFORMS_SUPPORTED
-#endif
-
-#ifdef PNG_READ_TRANSFORMS_SUPPORTED
-#  ifndef PNG_NO_READ_EXPAND
-#    define PNG_READ_EXPAND_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_SHIFT
-#    define PNG_READ_SHIFT_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_PACK
-#    define PNG_READ_PACK_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_BGR
-#    define PNG_READ_BGR_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_SWAP
-#    define PNG_READ_SWAP_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_PACKSWAP
-#    define PNG_READ_PACKSWAP_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_INVERT
-#    define PNG_READ_INVERT_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_DITHER
-#    define PNG_READ_DITHER_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_BACKGROUND
-#    define PNG_READ_BACKGROUND_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_16_TO_8
-#    define PNG_READ_16_TO_8_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_FILLER
-#    define PNG_READ_FILLER_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_GAMMA
-#    define PNG_READ_GAMMA_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_GRAY_TO_RGB
-#    define PNG_READ_GRAY_TO_RGB_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_SWAP_ALPHA
-#    define PNG_READ_SWAP_ALPHA_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_INVERT_ALPHA
-#    define PNG_READ_INVERT_ALPHA_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_STRIP_ALPHA
-#    define PNG_READ_STRIP_ALPHA_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_USER_TRANSFORM
-#    define PNG_READ_USER_TRANSFORM_SUPPORTED
-#  endif
-#  ifndef PNG_NO_READ_RGB_TO_GRAY
-#    define PNG_READ_RGB_TO_GRAY_SUPPORTED
-#  endif
-#endif /* PNG_READ_TRANSFORMS_SUPPORTED */
-
-#if !defined(PNG_NO_PROGRESSIVE_READ) && \
- !defined(PNG_PROGRESSIVE_READ_SUPPORTED) /* if you don't do progressive   */
-#  define PNG_PROGRESSIVE_READ_SUPPORTED  /* reading.  This is not talking */
-#endif                            /* about interlacing capability!  You'll */
-           /* still have interlacing unless you change the following line: */
-
-#define PNG_READ_INTERLACING_SUPPORTED /* required in PNG-compliant decoders */
-
-#ifndef PNG_NO_READ_COMPOSITE_NODIV
-#  ifndef PNG_NO_READ_COMPOSITED_NODIV  /* libpng-1.0.x misspelling */
-#    define PNG_READ_COMPOSITE_NODIV_SUPPORTED  /* well tested on Intel, SGI */
-#  endif
-#endif
-
-#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
-/* Deprecated, will be removed from version 2.0.0.
-   Use PNG_MNG_FEATURES_SUPPORTED instead. */
-#ifndef PNG_NO_READ_EMPTY_PLTE
-#  define PNG_READ_EMPTY_PLTE_SUPPORTED
-#endif
-#endif
-
-#endif /* PNG_READ_SUPPORTED */
-
-#if defined(PNG_WRITE_SUPPORTED)
-
-# if !defined(PNG_WRITE_TRANSFORMS_NOT_SUPPORTED) && \
-    !defined(PNG_NO_WRITE_TRANSFORMS)
-#  define PNG_WRITE_TRANSFORMS_SUPPORTED
-#endif
-
-#ifdef PNG_WRITE_TRANSFORMS_SUPPORTED
-#  ifndef PNG_NO_WRITE_SHIFT
-#    define PNG_WRITE_SHIFT_SUPPORTED
-#  endif
-#  ifndef PNG_NO_WRITE_PACK
-#    define PNG_WRITE_PACK_SUPPORTED
-#  endif
-#  ifndef PNG_NO_WRITE_BGR
-#    define PNG_WRITE_BGR_SUPPORTED
-#  endif
-#  ifndef PNG_NO_WRITE_SWAP
-#    define PNG_WRITE_SWAP_SUPPORTED
-#  endif
-#  ifndef PNG_NO_WRITE_PACKSWAP
-#    define PNG_WRITE_PACKSWAP_SUPPORTED
-#  endif
-#  ifndef PNG_NO_WRITE_INVERT
-#    define PNG_WRITE_INVERT_SUPPORTED
-#  endif
-#  ifndef PNG_NO_WRITE_FILLER
-#    define PNG_WRITE_FILLER_SUPPORTED   /* same as WRITE_STRIP_ALPHA */
-#  endif
-#  ifndef PNG_NO_WRITE_SWAP_ALPHA
-#    define PNG_WRITE_SWAP_ALPHA_SUPPORTED
-#  endif
-#  ifndef PNG_NO_WRITE_INVERT_ALPHA
-#    define PNG_WRITE_INVERT_ALPHA_SUPPORTED
-#  endif
-#  ifndef PNG_NO_WRITE_USER_TRANSFORM
-#    define PNG_WRITE_USER_TRANSFORM_SUPPORTED
-#  endif
-#endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */
-
-#if !defined(PNG_NO_WRITE_INTERLACING_SUPPORTED) && \
-    !defined(PNG_WRITE_INTERLACING_SUPPORTED)
-#define PNG_WRITE_INTERLACING_SUPPORTED  /* not required for PNG-compliant
-                                            encoders, but can cause trouble
-                                            if left undefined */
-#endif
-
-#if !defined(PNG_NO_WRITE_WEIGHTED_FILTER) && \
-    !defined(PNG_WRITE_WEIGHTED_FILTER) && \
-     defined(PNG_FLOATING_POINT_SUPPORTED)
-#  define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
-#endif
-
-#ifndef PNG_NO_WRITE_FLUSH
-#  define PNG_WRITE_FLUSH_SUPPORTED
-#endif
-
-#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
-/* Deprecated, see PNG_MNG_FEATURES_SUPPORTED, above */
-#ifndef PNG_NO_WRITE_EMPTY_PLTE
-#  define PNG_WRITE_EMPTY_PLTE_SUPPORTED
-#endif
-#endif
-
-#endif /* PNG_WRITE_SUPPORTED */
-
-#ifndef PNG_1_0_X
-#  ifndef PNG_NO_ERROR_NUMBERS
-#    define PNG_ERROR_NUMBERS_SUPPORTED
-#  endif
-#endif /* PNG_1_0_X */
-
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
-    defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
-#  ifndef PNG_NO_USER_TRANSFORM_PTR
-#    define PNG_USER_TRANSFORM_PTR_SUPPORTED
-#  endif
-#endif
-
-#ifndef PNG_NO_STDIO
-#  define PNG_TIME_RFC1123_SUPPORTED
-#endif
-
-/* This adds extra functions in pngget.c for accessing data from the
- * info pointer (added in version 0.99)
- * png_get_image_width()
- * png_get_image_height()
- * png_get_bit_depth()
- * png_get_color_type()
- * png_get_compression_type()
- * png_get_filter_type()
- * png_get_interlace_type()
- * png_get_pixel_aspect_ratio()
- * png_get_pixels_per_meter()
- * png_get_x_offset_pixels()
- * png_get_y_offset_pixels()
- * png_get_x_offset_microns()
- * png_get_y_offset_microns()
- */
-#if !defined(PNG_NO_EASY_ACCESS) && !defined(PNG_EASY_ACCESS_SUPPORTED)
-#  define PNG_EASY_ACCESS_SUPPORTED
-#endif
-
-/* PNG_ASSEMBLER_CODE was enabled by default in version 1.2.0 
- * and removed from version 1.2.20.  The following will be removed
- * from libpng-1.4.0
-*/
-
-#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_OPTIMIZED_CODE)
-#  ifndef PNG_OPTIMIZED_CODE_SUPPORTED
-#    define PNG_OPTIMIZED_CODE_SUPPORTED
-#  endif
-#endif
-
-#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE)
-#  ifndef PNG_ASSEMBLER_CODE_SUPPORTED
-#    define PNG_ASSEMBLER_CODE_SUPPORTED
-#  endif
-
-#  if defined(__GNUC__) && defined(__x86_64__) && (__GNUC__ < 4)
-     /* work around 64-bit gcc compiler bugs in gcc-3.x */
-#    if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
-#      define PNG_NO_MMX_CODE
-#    endif
-#  endif
-
-#  if defined(__APPLE__)
-#    if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
-#      define PNG_NO_MMX_CODE
-#    endif
-#  endif
-
-#  if (defined(__MWERKS__) && ((__MWERKS__ < 0x0900) || macintosh))
-#    if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
-#      define PNG_NO_MMX_CODE
-#    endif
-#  endif
-
-#  if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
-#    define PNG_MMX_CODE_SUPPORTED
-#  endif
-
-#endif
-/* end of obsolete code to be removed from libpng-1.4.0 */
-
-#if !defined(PNG_1_0_X)
-#if !defined(PNG_NO_USER_MEM) && !defined(PNG_USER_MEM_SUPPORTED)
-#  define PNG_USER_MEM_SUPPORTED
-#endif
-#endif /* PNG_1_0_X */
-
-/* Added at libpng-1.2.6 */
-#if !defined(PNG_1_0_X)
-#ifndef PNG_SET_USER_LIMITS_SUPPORTED
-#if !defined(PNG_NO_SET_USER_LIMITS) && !defined(PNG_SET_USER_LIMITS_SUPPORTED)
-#  define PNG_SET_USER_LIMITS_SUPPORTED
-#endif
-#endif
-#endif /* PNG_1_0_X */
-
-/* Added at libpng-1.0.16 and 1.2.6.  To accept all valid PNGS no matter
- * how large, set these limits to 0x7fffffffL
- */
-#ifndef PNG_USER_WIDTH_MAX
-#  define PNG_USER_WIDTH_MAX 1000000L
-#endif
-#ifndef PNG_USER_HEIGHT_MAX
-#  define PNG_USER_HEIGHT_MAX 1000000L
-#endif
-
-/* These are currently experimental features, define them if you want */
-
-/* very little testing */
-/*
-#ifdef PNG_READ_SUPPORTED
-#  ifndef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
-#    define PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
-#  endif
-#endif
-*/
-
-/* This is only for PowerPC big-endian and 680x0 systems */
-/* some testing */
-/*
-#ifndef PNG_READ_BIG_ENDIAN_SUPPORTED
-#  define PNG_READ_BIG_ENDIAN_SUPPORTED
-#endif
-*/
-
-/* Buggy compilers (e.g., gcc 2.7.2.2) need this */
-/*
-#define PNG_NO_POINTER_INDEXING
-*/
-
-/* These functions are turned off by default, as they will be phased out. */
-/*
-#define  PNG_USELESS_TESTS_SUPPORTED
-#define  PNG_CORRECT_PALETTE_SUPPORTED
-*/
-
-/* Any chunks you are not interested in, you can undef here.  The
- * ones that allocate memory may be expecially important (hIST,
- * tEXt, zTXt, tRNS, pCAL).  Others will just save time and make png_info
- * a bit smaller.
- */
-
-#if defined(PNG_READ_SUPPORTED) && \
-    !defined(PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \
-    !defined(PNG_NO_READ_ANCILLARY_CHUNKS)
-#  define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
-#endif
-
-#if defined(PNG_WRITE_SUPPORTED) && \
-    !defined(PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \
-    !defined(PNG_NO_WRITE_ANCILLARY_CHUNKS)
-#  define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
-#endif
-
-#ifdef PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
-
-#ifdef PNG_NO_READ_TEXT
-#  define PNG_NO_READ_iTXt
-#  define PNG_NO_READ_tEXt
-#  define PNG_NO_READ_zTXt
-#endif
-#ifndef PNG_NO_READ_bKGD
-#  define PNG_READ_bKGD_SUPPORTED
-#  define PNG_bKGD_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_cHRM
-#  define PNG_READ_cHRM_SUPPORTED
-#  define PNG_cHRM_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_gAMA
-#  define PNG_READ_gAMA_SUPPORTED
-#  define PNG_gAMA_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_hIST
-#  define PNG_READ_hIST_SUPPORTED
-#  define PNG_hIST_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_iCCP
-#  define PNG_READ_iCCP_SUPPORTED
-#  define PNG_iCCP_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_iTXt
-#  ifndef PNG_READ_iTXt_SUPPORTED
-#    define PNG_READ_iTXt_SUPPORTED
-#  endif
-#  ifndef PNG_iTXt_SUPPORTED
-#    define PNG_iTXt_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_READ_oFFs
-#  define PNG_READ_oFFs_SUPPORTED
-#  define PNG_oFFs_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_pCAL
-#  define PNG_READ_pCAL_SUPPORTED
-#  define PNG_pCAL_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_sCAL
-#  define PNG_READ_sCAL_SUPPORTED
-#  define PNG_sCAL_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_pHYs
-#  define PNG_READ_pHYs_SUPPORTED
-#  define PNG_pHYs_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_sBIT
-#  define PNG_READ_sBIT_SUPPORTED
-#  define PNG_sBIT_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_sPLT
-#  define PNG_READ_sPLT_SUPPORTED
-#  define PNG_sPLT_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_sRGB
-#  define PNG_READ_sRGB_SUPPORTED
-#  define PNG_sRGB_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_tEXt
-#  define PNG_READ_tEXt_SUPPORTED
-#  define PNG_tEXt_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_tIME
-#  define PNG_READ_tIME_SUPPORTED
-#  define PNG_tIME_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_tRNS
-#  define PNG_READ_tRNS_SUPPORTED
-#  define PNG_tRNS_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_zTXt
-#  define PNG_READ_zTXt_SUPPORTED
-#  define PNG_zTXt_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_UNKNOWN_CHUNKS
-#  define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
-#  ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
-#    define PNG_UNKNOWN_CHUNKS_SUPPORTED
-#  endif
-#  ifndef PNG_NO_HANDLE_AS_UNKNOWN
-#    define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
-#  endif
-#endif
-#if !defined(PNG_NO_READ_USER_CHUNKS) && \
-     defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
-#  define PNG_READ_USER_CHUNKS_SUPPORTED
-#  define PNG_USER_CHUNKS_SUPPORTED
-#  ifdef PNG_NO_READ_UNKNOWN_CHUNKS
-#    undef PNG_NO_READ_UNKNOWN_CHUNKS
-#  endif
-#  ifdef PNG_NO_HANDLE_AS_UNKNOWN
-#    undef PNG_NO_HANDLE_AS_UNKNOWN
-#  endif
-#endif
-#ifndef PNG_NO_READ_OPT_PLTE
-#  define PNG_READ_OPT_PLTE_SUPPORTED /* only affects support of the */
-#endif                      /* optional PLTE chunk in RGB and RGBA images */
-#if defined(PNG_READ_iTXt_SUPPORTED) || defined(PNG_READ_tEXt_SUPPORTED) || \
-    defined(PNG_READ_zTXt_SUPPORTED)
-#  define PNG_READ_TEXT_SUPPORTED
-#  define PNG_TEXT_SUPPORTED
-#endif
-
-#endif /* PNG_READ_ANCILLARY_CHUNKS_SUPPORTED */
-
-#ifdef PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
-
-#ifdef PNG_NO_WRITE_TEXT
-#  define PNG_NO_WRITE_iTXt
-#  define PNG_NO_WRITE_tEXt
-#  define PNG_NO_WRITE_zTXt
-#endif
-#ifndef PNG_NO_WRITE_bKGD
-#  define PNG_WRITE_bKGD_SUPPORTED
-#  ifndef PNG_bKGD_SUPPORTED
-#    define PNG_bKGD_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_cHRM
-#  define PNG_WRITE_cHRM_SUPPORTED
-#  ifndef PNG_cHRM_SUPPORTED
-#    define PNG_cHRM_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_gAMA
-#  define PNG_WRITE_gAMA_SUPPORTED
-#  ifndef PNG_gAMA_SUPPORTED
-#    define PNG_gAMA_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_hIST
-#  define PNG_WRITE_hIST_SUPPORTED
-#  ifndef PNG_hIST_SUPPORTED
-#    define PNG_hIST_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_iCCP
-#  define PNG_WRITE_iCCP_SUPPORTED
-#  ifndef PNG_iCCP_SUPPORTED
-#    define PNG_iCCP_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_iTXt
-#  ifndef PNG_WRITE_iTXt_SUPPORTED
-#    define PNG_WRITE_iTXt_SUPPORTED
-#  endif
-#  ifndef PNG_iTXt_SUPPORTED
-#    define PNG_iTXt_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_oFFs
-#  define PNG_WRITE_oFFs_SUPPORTED
-#  ifndef PNG_oFFs_SUPPORTED
-#    define PNG_oFFs_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_pCAL
-#  define PNG_WRITE_pCAL_SUPPORTED
-#  ifndef PNG_pCAL_SUPPORTED
-#    define PNG_pCAL_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_sCAL
-#  define PNG_WRITE_sCAL_SUPPORTED
-#  ifndef PNG_sCAL_SUPPORTED
-#    define PNG_sCAL_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_pHYs
-#  define PNG_WRITE_pHYs_SUPPORTED
-#  ifndef PNG_pHYs_SUPPORTED
-#    define PNG_pHYs_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_sBIT
-#  define PNG_WRITE_sBIT_SUPPORTED
-#  ifndef PNG_sBIT_SUPPORTED
-#    define PNG_sBIT_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_sPLT
-#  define PNG_WRITE_sPLT_SUPPORTED
-#  ifndef PNG_sPLT_SUPPORTED
-#    define PNG_sPLT_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_sRGB
-#  define PNG_WRITE_sRGB_SUPPORTED
-#  ifndef PNG_sRGB_SUPPORTED
-#    define PNG_sRGB_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_tEXt
-#  define PNG_WRITE_tEXt_SUPPORTED
-#  ifndef PNG_tEXt_SUPPORTED
-#    define PNG_tEXt_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_tIME
-#  define PNG_WRITE_tIME_SUPPORTED
-#  ifndef PNG_tIME_SUPPORTED
-#    define PNG_tIME_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_tRNS
-#  define PNG_WRITE_tRNS_SUPPORTED
-#  ifndef PNG_tRNS_SUPPORTED
-#    define PNG_tRNS_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_zTXt
-#  define PNG_WRITE_zTXt_SUPPORTED
-#  ifndef PNG_zTXt_SUPPORTED
-#    define PNG_zTXt_SUPPORTED
-#  endif
-#endif
-#ifndef PNG_NO_WRITE_UNKNOWN_CHUNKS
-#  define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
-#  ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
-#    define PNG_UNKNOWN_CHUNKS_SUPPORTED
-#  endif
-#  ifndef PNG_NO_HANDLE_AS_UNKNOWN
-#     ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
-#       define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
-#     endif
-#  endif
-#endif
-#if defined(PNG_WRITE_iTXt_SUPPORTED) || defined(PNG_WRITE_tEXt_SUPPORTED) || \
-    defined(PNG_WRITE_zTXt_SUPPORTED)
-#  define PNG_WRITE_TEXT_SUPPORTED
-#  ifndef PNG_TEXT_SUPPORTED
-#    define PNG_TEXT_SUPPORTED
-#  endif
-#endif
-
-#endif /* PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED */
-
-/* Turn this off to disable png_read_png() and
- * png_write_png() and leave the row_pointers member
- * out of the info structure.
- */
-#ifndef PNG_NO_INFO_IMAGE
-#  define PNG_INFO_IMAGE_SUPPORTED
-#endif
-
-/* need the time information for reading tIME chunks */
-#if defined(PNG_tIME_SUPPORTED)
-#  if !defined(_WIN32_WCE)
-     /* "time.h" functions are not supported on WindowsCE */
-#    include <time.h>
-#  endif
-#endif
-
-/* Some typedefs to get us started.  These should be safe on most of the
- * common platforms.  The typedefs should be at least as large as the
- * numbers suggest (a png_uint_32 must be at least 32 bits long), but they
- * don't have to be exactly that size.  Some compilers dislike passing
- * unsigned shorts as function parameters, so you may be better off using
- * unsigned int for png_uint_16.  Likewise, for 64-bit systems, you may
- * want to have unsigned int for png_uint_32 instead of unsigned long.
- */
-
-typedef unsigned long png_uint_32;
-typedef long png_int_32;
-typedef unsigned short png_uint_16;
-typedef short png_int_16;
-typedef unsigned char png_byte;
-
-/* This is usually size_t.  It is typedef'ed just in case you need it to
-   change (I'm not sure if you will or not, so I thought I'd be safe) */
-#ifdef PNG_SIZE_T
-   typedef PNG_SIZE_T png_size_t;
-#  define png_sizeof(x) png_convert_size(sizeof(x))
-#else
-   typedef size_t png_size_t;
-#  define png_sizeof(x) sizeof(x)
-#endif
-
-/* The following is needed for medium model support.  It cannot be in the
- * PNG_INTERNAL section.  Needs modification for other compilers besides
- * MSC.  Model independent support declares all arrays and pointers to be
- * large using the far keyword.  The zlib version used must also support
- * model independent data.  As of version zlib 1.0.4, the necessary changes
- * have been made in zlib.  The USE_FAR_KEYWORD define triggers other
- * changes that are needed. (Tim Wegner)
- */
-
-/* Separate compiler dependencies (problem here is that zlib.h always
-   defines FAR. (SJT) */
-#ifdef __BORLANDC__
-#  if defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__)
-#    define LDATA 1
-#  else
-#    define LDATA 0
-#  endif
-   /* GRR:  why is Cygwin in here?  Cygwin is not Borland C... */
-#  if !defined(__WIN32__) && !defined(__FLAT__) && !defined(__CYGWIN__)
-#    define PNG_MAX_MALLOC_64K
-#    if (LDATA != 1)
-#      ifndef FAR
-#        define FAR __far
-#      endif
-#      define USE_FAR_KEYWORD
-#    endif   /* LDATA != 1 */
-     /* Possibly useful for moving data out of default segment.
-      * Uncomment it if you want. Could also define FARDATA as
-      * const if your compiler supports it. (SJT)
-#    define FARDATA FAR
-      */
-#  endif  /* __WIN32__, __FLAT__, __CYGWIN__ */
-#endif   /* __BORLANDC__ */
-
-
-/* Suggest testing for specific compiler first before testing for
- * FAR.  The Watcom compiler defines both __MEDIUM__ and M_I86MM,
- * making reliance oncertain keywords suspect. (SJT)
- */
-
-/* MSC Medium model */
-#if defined(FAR)
-#  if defined(M_I86MM)
-#    define USE_FAR_KEYWORD
-#    define FARDATA FAR
-#    include <dos.h>
-#  endif
-#endif
-
-/* SJT: default case */
-#ifndef FAR
-#  define FAR
-#endif
-
-/* At this point FAR is always defined */
-#ifndef FARDATA
-#  define FARDATA
-#endif
-
-/* Typedef for floating-point numbers that are converted
-   to fixed-point with a multiple of 100,000, e.g., int_gamma */
-typedef png_int_32 png_fixed_point;
-
-/* Add typedefs for pointers */
-typedef void            FAR * png_voidp;
-typedef png_byte        FAR * png_bytep;
-typedef png_uint_32     FAR * png_uint_32p;
-typedef png_int_32      FAR * png_int_32p;
-typedef png_uint_16     FAR * png_uint_16p;
-typedef png_int_16      FAR * png_int_16p;
-typedef PNG_CONST char  FAR * png_const_charp;
-typedef char            FAR * png_charp;
-typedef png_fixed_point FAR * png_fixed_point_p;
-
-#ifndef PNG_NO_STDIO
-#if defined(_WIN32_WCE)
-typedef HANDLE                png_FILE_p;
-#else
-typedef FILE                * png_FILE_p;
-#endif
-#endif
-
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-typedef double          FAR * png_doublep;
-#endif
-
-/* Pointers to pointers; i.e. arrays */
-typedef png_byte        FAR * FAR * png_bytepp;
-typedef png_uint_32     FAR * FAR * png_uint_32pp;
-typedef png_int_32      FAR * FAR * png_int_32pp;
-typedef png_uint_16     FAR * FAR * png_uint_16pp;
-typedef png_int_16      FAR * FAR * png_int_16pp;
-typedef PNG_CONST char  FAR * FAR * png_const_charpp;
-typedef char            FAR * FAR * png_charpp;
-typedef png_fixed_point FAR * FAR * png_fixed_point_pp;
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-typedef double          FAR * FAR * png_doublepp;
-#endif
-
-/* Pointers to pointers to pointers; i.e., pointer to array */
-typedef char            FAR * FAR * FAR * png_charppp;
-
-#if defined(PNG_1_0_X) || defined(PNG_1_2_X)
-/* SPC -  Is this stuff deprecated? */
-/* It'll be removed as of libpng-1.3.0 - GR-P */
-/* libpng typedefs for types in zlib. If zlib changes
- * or another compression library is used, then change these.
- * Eliminates need to change all the source files.
- */
-typedef charf *         png_zcharp;
-typedef charf * FAR *   png_zcharpp;
-typedef z_stream FAR *  png_zstreamp;
-#endif /* (PNG_1_0_X) || defined(PNG_1_2_X) */
-
-/*
- * Define PNG_BUILD_DLL if the module being built is a Windows
- * LIBPNG DLL.
- *
- * Define PNG_USE_DLL if you want to *link* to the Windows LIBPNG DLL.
- * It is equivalent to Microsoft predefined macro _DLL that is
- * automatically defined when you compile using the share
- * version of the CRT (C Run-Time library)
- *
- * The cygwin mods make this behavior a little different:
- * Define PNG_BUILD_DLL if you are building a dll for use with cygwin
- * Define PNG_STATIC if you are building a static library for use with cygwin,
- *   -or- if you are building an application that you want to link to the
- *   static library.
- * PNG_USE_DLL is defined by default (no user action needed) unless one of
- *   the other flags is defined.
- */
-
-#if !defined(PNG_DLL) && (defined(PNG_BUILD_DLL) || defined(PNG_USE_DLL))
-#  define PNG_DLL
-#endif
-/* If CYGWIN, then disallow GLOBAL ARRAYS unless building a static lib.
- * When building a static lib, default to no GLOBAL ARRAYS, but allow
- * command-line override
- */
-#if defined(__CYGWIN__)
-#  if !defined(PNG_STATIC)
-#    if defined(PNG_USE_GLOBAL_ARRAYS)
-#      undef PNG_USE_GLOBAL_ARRAYS
-#    endif
-#    if !defined(PNG_USE_LOCAL_ARRAYS)
-#      define PNG_USE_LOCAL_ARRAYS
-#    endif
-#  else
-#    if defined(PNG_USE_LOCAL_ARRAYS) || defined(PNG_NO_GLOBAL_ARRAYS)
-#      if defined(PNG_USE_GLOBAL_ARRAYS)
-#        undef PNG_USE_GLOBAL_ARRAYS
-#      endif
-#    endif
-#  endif
-#  if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)
-#    define PNG_USE_LOCAL_ARRAYS
-#  endif
-#endif
-
-/* Do not use global arrays (helps with building DLL's)
- * They are no longer used in libpng itself, since version 1.0.5c,
- * but might be required for some pre-1.0.5c applications.
- */
-#if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)
-#  if defined(PNG_NO_GLOBAL_ARRAYS) || \
-      (defined(__GNUC__) && defined(PNG_DLL)) || defined(_MSC_VER)
-#    define PNG_USE_LOCAL_ARRAYS
-#  else
-#    define PNG_USE_GLOBAL_ARRAYS
-#  endif
-#endif
-
-#if defined(__CYGWIN__)
-#  undef PNGAPI
-#  define PNGAPI __cdecl
-#  undef PNG_IMPEXP
-#  define PNG_IMPEXP
-#endif  
-
-/* If you define PNGAPI, e.g., with compiler option "-DPNGAPI=__stdcall",
- * you may get warnings regarding the linkage of png_zalloc and png_zfree.
- * Don't ignore those warnings; you must also reset the default calling
- * convention in your compiler to match your PNGAPI, and you must build
- * zlib and your applications the same way you build libpng.
- */
-
-#if defined(__MINGW32__) && !defined(PNG_MODULEDEF)
-#  ifndef PNG_NO_MODULEDEF
-#    define PNG_NO_MODULEDEF
-#  endif
-#endif
-
-#if !defined(PNG_IMPEXP) && defined(PNG_BUILD_DLL) && !defined(PNG_NO_MODULEDEF)
-#  define PNG_IMPEXP
-#endif
-
-#if defined (__SYMBIAN32__)
-# define PNGAPI
-#elif defined(PNG_DLL) || defined(_DLL) || defined(__DLL__ ) || \
-    (( defined(_Windows) || defined(_WINDOWS) || \
-       defined(WIN32) || defined(_WIN32) || defined(__WIN32__) ))
-
-#  ifndef PNGAPI
-#     if defined(__GNUC__) || (defined (_MSC_VER) && (_MSC_VER >= 800))
-#        define PNGAPI __cdecl
-#     else
-#        define PNGAPI _cdecl
-#     endif
-#  endif
-
-#  if !defined(PNG_IMPEXP) && (!defined(PNG_DLL) || \
-       0 /* WINCOMPILER_WITH_NO_SUPPORT_FOR_DECLIMPEXP */)
-#     define PNG_IMPEXP
-#  endif
-
-#  if !defined(PNG_IMPEXP)
-
-#     define PNG_EXPORT_TYPE1(type,symbol)  PNG_IMPEXP type PNGAPI symbol
-#     define PNG_EXPORT_TYPE2(type,symbol)  type PNG_IMPEXP PNGAPI symbol
-
-      /* Borland/Microsoft */
-#     if defined(_MSC_VER) || defined(__BORLANDC__)
-#        if (_MSC_VER >= 800) || (__BORLANDC__ >= 0x500)
-#           define PNG_EXPORT PNG_EXPORT_TYPE1
-#        else
-#           define PNG_EXPORT PNG_EXPORT_TYPE2
-#           if defined(PNG_BUILD_DLL)
-#              define PNG_IMPEXP __export
-#           else
-#              define PNG_IMPEXP /*__import */ /* doesn't exist AFAIK in
-                                                 VC++ */
-#           endif                             /* Exists in Borland C++ for
-                                                 C++ classes (== huge) */
-#        endif
-#     endif
-
-#     if !defined(PNG_IMPEXP)
-#        if defined(PNG_BUILD_DLL)
-#           define PNG_IMPEXP __declspec(dllexport)
-#        else
-#           define PNG_IMPEXP __declspec(dllimport)
-#        endif
-#     endif
-#  endif  /* PNG_IMPEXP */
-#else /* !(DLL || non-cygwin WINDOWS) */
-#   if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)
-#      ifndef PNGAPI
-#         define PNGAPI _System
-#      endif
-#   else
-#      if 0 /* ... other platforms, with other meanings */
-#      endif
-#   endif
-#endif
-
-#ifndef PNGAPI
-#  define PNGAPI
-#endif
-#ifndef PNG_IMPEXP
-#  define PNG_IMPEXP
-#endif
-
-#ifdef PNG_BUILDSYMS
-#  ifndef PNG_EXPORT
-#    define PNG_EXPORT(type,symbol) PNG_FUNCTION_EXPORT symbol END
-#  endif
-#  ifdef PNG_USE_GLOBAL_ARRAYS
-#    ifndef PNG_EXPORT_VAR
-#      define PNG_EXPORT_VAR(type) PNG_DATA_EXPORT
-#    endif
-#  endif
-#endif
-
-#ifndef PNG_EXPORT
-#  define PNG_EXPORT(type,symbol) PNG_IMPEXP type PNGAPI symbol
-#endif
-
-#ifdef PNG_USE_GLOBAL_ARRAYS
-#  ifndef PNG_EXPORT_VAR
-#    define PNG_EXPORT_VAR(type) extern PNG_IMPEXP type
-#  endif
-#endif
-
-/* User may want to use these so they are not in PNG_INTERNAL. Any library
- * functions that are passed far data must be model independent.
- */
-
-#ifndef PNG_ABORT
-# if defined(_WIN32_WCE)
-#  define PNG_ABORT() 
-# else
-#  define PNG_ABORT() abort()
-# endif
-#endif
-
-#ifdef PNG_SETJMP_SUPPORTED
-#  define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)
-#else
-#  define png_jmpbuf(png_ptr) \
-   (LIBPNG_WAS_COMPILED_WITH__PNG_SETJMP_NOT_SUPPORTED)
-#endif
-
-#if defined(USE_FAR_KEYWORD)  /* memory model independent fns */
-/* use this to make far-to-near assignments */
-#  define CHECK   1
-#  define NOCHECK 0
-#  define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK))
-#  define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK))
-#  define png_snprintf _fsnprintf   /* Added to v 1.2.19 */
-#  define png_strlen  _fstrlen
-#  define png_memcmp  _fmemcmp    /* SJT: added */
-#  define png_memcpy  _fmemcpy
-#  define png_memset  _fmemset
-#else /* use the usual functions */
-#  define CVT_PTR(ptr)         (ptr)
-#  define CVT_PTR_NOCHECK(ptr) (ptr)
-#  ifndef PNG_NO_SNPRINTF
-#    ifdef _MSC_VER
-#      define png_snprintf _snprintf   /* Added to v 1.2.19 */
-#      define png_snprintf2 _snprintf
-#      define png_snprintf6 _snprintf
-#    else
-#      define png_snprintf snprintf   /* Added to v 1.2.19 */
-#      define png_snprintf2 snprintf
-#      define png_snprintf6 snprintf
-#    endif
-#  else
-     /* You don't have or don't want to use snprintf().  Caution: Using
-      * sprintf instead of snprintf exposes your application to accidental
-      * or malevolent buffer overflows.  If you don't have snprintf()
-      * as a general rule you should provide one (you can get one from
-      * Portable OpenSSH). */
-#    define png_snprintf(s1,n,fmt,x1) sprintf(s1,fmt,x1)
-#    define png_snprintf2(s1,n,fmt,x1,x2) sprintf(s1,fmt,x1,x2)
-#    define png_snprintf6(s1,n,fmt,x1,x2,x3,x4,x5,x6) \
-        sprintf(s1,fmt,x1,x2,x3,x4,x5,x6)
-#  endif
-#  define png_strlen  strlen
-#  define png_memcmp  memcmp      /* SJT: added */
-#  define png_memcpy  memcpy
-#  define png_memset  memset
-#endif
-/* End of memory model independent support */
-
-/* Just a little check that someone hasn't tried to define something
- * contradictory.
- */
-#if (PNG_ZBUF_SIZE > 65536L) && defined(PNG_MAX_MALLOC_64K)
-#  undef PNG_ZBUF_SIZE
-#  define PNG_ZBUF_SIZE 65536L
-#endif
-
-/* Added at libpng-1.2.8 */
-#endif /* PNG_VERSION_INFO_ONLY */
-
-#endif /* PNGCONF_H */
diff --git a/extra_lib/include/theora/theora.h b/extra_lib/include/theora/theora.h
deleted file mode 100644
index 5429d10..0000000
--- a/extra_lib/include/theora/theora.h
+++ /dev/null
@@ -1,794 +0,0 @@
-/********************************************************************
- *                                                                  *
- * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE.   *
- * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
- * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
- * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
- *                                                                  *
- * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2007                *
- * by the Xiph.Org Foundation http://www.xiph.org/                  *
- *                                                                  *
- ********************************************************************
-
-  function:
-  last mod: $Id: theora.h,v 1.2 2008-12-02 18:04:43 jeanlf Exp $
-
- ********************************************************************/
-
-#ifndef _O_THEORA_H_
-#define _O_THEORA_H_
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include <stddef.h>	/* for size_t */
-
-#include <ogg/ogg.h>
-
-/** \defgroup oldfuncs Legacy pre-1.0 C API */
-/*  @{ */
-
-/** \mainpage
- * 
- * \section intro Introduction
- *
- * This is the documentation for the libtheora legacy C API, declared in 
- * the theora.h header, which describes the old interface used before
- * the 1.0 release. This API was widely deployed for several years and
- * remains supported, but for new code we recommend the cleaner API 
- * declared in theoradec.h and theoraenc.h.
- *
- * libtheora is the reference implementation for
- * <a href="http://www.theora.org/">Theora</a>, a free video codec.
- * Theora is derived from On2's VP3 codec with improved integration for
- * Ogg multimedia formats by <a href="http://www.xiph.org/">Xiph.Org</a>.
- * 
- * \section overview Overview
- *
- * This library will both decode and encode theora packets to/from raw YUV 
- * frames.  In either case, the packets will most likely either come from or
- * need to be embedded in an Ogg stream.  Use 
- * <a href="http://xiph.org/ogg/">libogg</a> or 
- * <a href="http://www.annodex.net/software/liboggz/index.html">liboggz</a>
- * to extract/package these packets.
- *
- * \section decoding Decoding Process
- *
- * Decoding can be separated into the following steps:
- * -# initialise theora_info and theora_comment structures using 
- *    theora_info_init() and theora_comment_init():
- \verbatim
- theora_info     info;
- theora_comment  comment;
-   
- theora_info_init(&info);
- theora_comment_init(&comment);
- \endverbatim
- * -# retrieve header packets from Ogg stream (there should be 3) and decode 
- *    into theora_info and theora_comment structures using 
- *    theora_decode_header().  See \ref identification for more information on 
- *    identifying which packets are theora packets.
- \verbatim
- int i;
- for (i = 0; i < 3; i++)
- {
-   (get a theora packet "op" from the Ogg stream)
-   theora_decode_header(&info, &comment, op);
- }
- \endverbatim
- * -# initialise the decoder based on the information retrieved into the
- *    theora_info struct by theora_decode_header().  You will need a 
- *    theora_state struct.
- \verbatim
- theora_state state;
- 
- theora_decode_init(&state, &info);
- \endverbatim
- * -# pass in packets and retrieve decoded frames!  See the yuv_buffer 
- *    documentation for information on how to retrieve raw YUV data.
- \verbatim
- yuf_buffer buffer;
- while (last packet was not e_o_s) {
-   (get a theora packet "op" from the Ogg stream)
-   theora_decode_packetin(&state, op);
-   theora_decode_YUVout(&state, &buffer);
- }
- \endverbatim
- *  
- *
- * \subsection identification Identifying Theora Packets
- *
- * All streams inside an Ogg file have a unique serial_no attached to the 
- * stream.  Typically, you will want to 
- *  - retrieve the serial_no for each b_o_s (beginning of stream) page 
- *    encountered within the Ogg file; 
- *  - test the first (only) packet on that page to determine if it is a theora 
- *    packet;
- *  - once you have found a theora b_o_s page then use the retrieved serial_no 
- *    to identify future packets belonging to the same theora stream.
- * 
- * Note that you \e cannot use theora_packet_isheader() to determine if a 
- * packet is a theora packet or not, as this function does not perform any
- * checking beyond whether a header bit is present.  Instead, use the
- * theora_decode_header() function and check the return value; or examine the
- * header bytes at the beginning of the Ogg page.
- *
- * \subsection example Example Decoder 
- *
- * See <a href="http://svn.xiph.org/trunk/theora/examples/dump_video.c">
- * examples/dump_video.c</a> for a simple decoder implementation.
- *
- * \section encoding Encoding Process
- *
- * See <a href="http://svn.xiph.org/trunk/theora/examples/encoder_example.c">
- * examples/encoder_example.c</a> for a simple encoder implementation.
- */
-
-/** \file
- * The libtheora pre-1.0 legacy C API.
- */
-
-/**
- * A YUV buffer for passing uncompressed frames to and from the codec.
- * This holds a Y'CbCr frame in planar format. The CbCr planes can be
- * subsampled and have their own separate dimensions and row stride
- * offsets. Note that the strides may be negative in some 
- * configurations. For theora the width and height of the largest plane
- * must be a multiple of 16. The actual meaningful picture size and 
- * offset are stored in the theora_info structure; frames returned by
- * the decoder may need to be cropped for display.
- *
- * All samples are 8 bits. Within each plane samples are ordered by
- * row from the top of the frame to the bottom. Within each row samples
- * are ordered from left to right.
- *
- * During decode, the yuv_buffer struct is allocated by the user, but all
- * fields (including luma and chroma pointers) are filled by the library.  
- * These pointers address library-internal memory and their contents should 
- * not be modified.
- *
- * Conversely, during encode the user allocates the struct and fills out all
- * fields.  The user also manages the data addressed by the luma and chroma
- * pointers.  See the encoder_example.c and dump_video.c example files in
- * theora/examples/ for more information.
- */
-typedef struct {
-    int   y_width;      /**< Width of the Y' luminance plane */
-    int   y_height;     /**< Height of the luminance plane */
-    int   y_stride;     /**< Offset in bytes between successive rows */
-
-    int   uv_width;     /**< Width of the Cb and Cr chroma planes */
-    int   uv_height;    /**< Height of the chroma planes */
-    int   uv_stride;    /**< Offset between successive chroma rows */
-    unsigned char *y;   /**< Pointer to start of luminance data */
-    unsigned char *u;   /**< Pointer to start of Cb data */
-    unsigned char *v;   /**< Pointer to start of Cr data */
-
-} yuv_buffer;
-
-/**
- * A Colorspace.
- */
-typedef enum {
-  OC_CS_UNSPECIFIED,    /**< The colorspace is unknown or unspecified */
-  OC_CS_ITU_REC_470M,   /**< This is the best option for 'NTSC' content */
-  OC_CS_ITU_REC_470BG,  /**< This is the best option for 'PAL' content */
-  OC_CS_NSPACES         /**< This marks the end of the defined colorspaces */
-} theora_colorspace;
-
-/**
- * A Chroma subsampling
- *
- * These enumerate the available chroma subsampling options supported
- * by the theora format. See Section 4.4 of the specification for
- * exact definitions.
- */
-typedef enum {
-  OC_PF_420,    /**< Chroma subsampling by 2 in each direction (4:2:0) */
-  OC_PF_RSVD,   /**< Reserved value */
-  OC_PF_422,    /**< Horizonatal chroma subsampling by 2 (4:2:2) */
-  OC_PF_444,    /**< No chroma subsampling at all (4:4:4) */
-} theora_pixelformat;
-
-/**
- * Theora bitstream info.
- * Contains the basic playback parameters for a stream,
- * corresponding to the initial 'info' header packet.
- * 
- * Encoded theora frames must be a multiple of 16 in width and height.
- * To handle other frame sizes, a crop rectangle is specified in
- * frame_height and frame_width, offset_x and * offset_y. The offset
- * and size should still be a multiple of 2 to avoid chroma sampling
- * shifts. Offset values in this structure are measured from the
- * upper left of the image.
- *
- * Frame rate, in frames per second, is stored as a rational
- * fraction. Aspect ratio is also stored as a rational fraction, and
- * refers to the aspect ratio of the frame pixels, not of the
- * overall frame itself.
- * 
- * See <a href="http://svn.xiph.org/trunk/theora/examples/encoder_example.c">
- * examples/encoder_example.c</a> for usage examples of the
- * other paramters and good default settings for the encoder parameters.
- */
-typedef struct {
-  ogg_uint32_t  width;		/**< encoded frame width  */
-  ogg_uint32_t  height;		/**< encoded frame height */
-  ogg_uint32_t  frame_width;	/**< display frame width  */
-  ogg_uint32_t  frame_height;	/**< display frame height */
-  ogg_uint32_t  offset_x;	/**< horizontal offset of the displayed frame */
-  ogg_uint32_t  offset_y;	/**< vertical offset of the displayed frame */
-  ogg_uint32_t  fps_numerator;	    /**< frame rate numerator **/
-  ogg_uint32_t  fps_denominator;    /**< frame rate denominator **/
-  ogg_uint32_t  aspect_numerator;   /**< pixel aspect ratio numerator */
-  ogg_uint32_t  aspect_denominator; /**< pixel aspect ratio denominator */
-  theora_colorspace colorspace;	    /**< colorspace */
-  int           target_bitrate;	    /**< nominal bitrate in bits per second */
-  int           quality;  /**< Nominal quality setting, 0-63 */
-  int           quick_p;  /**< Quick encode/decode */
-
-  /* decode only */
-  unsigned char version_major;
-  unsigned char version_minor;
-  unsigned char version_subminor;
-
-  void *codec_setup;
-
-  /* encode only */
-  int           dropframes_p;
-  int           keyframe_auto_p;
-  ogg_uint32_t  keyframe_frequency;
-  ogg_uint32_t  keyframe_frequency_force;  /* also used for decode init to
-                                              get granpos shift correct */
-  ogg_uint32_t  keyframe_data_target_bitrate;
-  ogg_int32_t   keyframe_auto_threshold;
-  ogg_uint32_t  keyframe_mindistance;
-  ogg_int32_t   noise_sensitivity;
-  ogg_int32_t   sharpness;
-
-  theora_pixelformat pixelformat;	/**< chroma subsampling mode to expect */
-
-} theora_info;
-
-/** Codec internal state and context.
- */
-typedef struct{
-  theora_info *i;
-  ogg_int64_t granulepos;
-
-  void *internal_encode;
-  void *internal_decode;
-
-} theora_state;
-
-/** 
- * Comment header metadata.
- *
- * This structure holds the in-stream metadata corresponding to
- * the 'comment' header packet.
- *
- * Meta data is stored as a series of (tag, value) pairs, in
- * length-encoded string vectors. The first occurence of the 
- * '=' character delimits the tag and value. A particular tag
- * may occur more than once. The character set encoding for
- * the strings is always UTF-8, but the tag names are limited
- * to case-insensitive ASCII. See the spec for details.
- *
- * In filling in this structure, theora_decode_header() will
- * null-terminate the user_comment strings for safety. However,
- * the bitstream format itself treats them as 8-bit clean,
- * and so the length array should be treated as authoritative
- * for their length.
- */
-typedef struct theora_comment{
-  char **user_comments;         /**< An array of comment string vectors */
-  int   *comment_lengths;       /**< An array of corresponding string vector lengths in bytes */
-  int    comments;              /**< The total number of comment string vectors */
-  char  *vendor;                /**< The vendor string identifying the encoder, null terminated */
-
-} theora_comment;
-
-
-/**\name theora_control() codes */
-
-/**\anchor decctlcodes
- * These are the available request codes for theora_control()
- * when called with a decoder instance.
- * By convention, these are odd, to distinguish them from the
- *  \ref encctlcodes "encoder control codes".
- * Keep any experimental or vendor-specific values above \c 0x8000.*/
-
-/**Get the maximum post-processing level.
- * The decoder supports a post-processing filter that can improve
- * the appearance of the decoded images. This returns the highest
- * level setting for this post-processor, corresponding to maximum
- * improvement and computational expense.
- */
-#define TH_DECCTL_GET_PPLEVEL_MAX (1)
-
-/**Set the post-processing level.
- * Sets the level of post-processing to use when decoding the 
- * compressed stream. This must be a value between zero (off)
- * and the maximum returned by TH_DECCTL_GET_PPLEVEL_MAX.
- */
-#define TH_DECCTL_SET_PPLEVEL (3)
-
-/**Sets the maximum distance between key frames.
- * This can be changed during an encode, but will be bounded by
- *  <tt>1<<th_info#keyframe_granule_shift</tt>.
- * If it is set before encoding begins, th_info#keyframe_granule_shift will
- *  be enlarged appropriately.
- *
- * \param[in]  buf <tt>ogg_uint32_t</tt>: The maximum distance between key
- *                   frames.
- * \param[out] buf <tt>ogg_uint32_t</tt>: The actual maximum distance set.
- * \retval TH_FAULT  \a theora_state or \a buf is <tt>NULL</tt>.
- * \retval TH_EINVAL \a buf_sz is not <tt>sizeof(ogg_uint32_t)</tt>.
- * \retval TH_IMPL   Not supported by this implementation.*/
-#define TH_ENCCTL_SET_KEYFRAME_FREQUENCY_FORCE (4)
-
-/**Set the granule position.
- * Call this after a seek, to update the internal granulepos
- * in the decoder, to insure that subsequent frames are marked
- * properly. If you track timestamps yourself and do not use
- * the granule postion returned by the decoder, then you do
- * not need to use this control.
- */
-#define TH_DECCTL_SET_GRANPOS (5)
-
-
-/**\anchor encctlcodes
- * These are the available request codes for theora_control()
- * when called with an encoder instance.
- * By convention, these are even, to distinguish them from the
- *  \ref decctlcodes "decoder control codes".
- * Keep any experimental or vendor-specific values above \c 0x8000.*/
-/*@{*/
-/**Sets the quantization parameters to use.
- * The parameters are copied, not stored by reference, so they can be freed
- *  after this call.
- * <tt>NULL</tt> may be specified to revert to the default parameters.
- * For the current encoder, <tt>scale[ci!=0][qi]</tt> must be no greater than
- *  <tt>scale[ci!=0][qi-1]</tt> and <tt>base[qti][pli][qi][ci]</tt> must be no
- *  greater than <tt>base[qti][pli][qi-1][ci]</tt>.
- * These two conditions ensure that the actual quantizer for a given \a qti,
- *  \a pli, and \a ci does not increase as \a qi increases.
- *
- * \param[in] buf #th_quant_info
- * \retval TH_FAULT  \a theora_state is <tt>NULL</tt>.
- * \retval TH_EINVAL Encoding has already begun, the quantization parameters
- *                    do not meet one of the above stated conditions, \a buf
- *                    is <tt>NULL</tt> and \a buf_sz is not zero, or \a buf
- *                    is non-<tt>NULL</tt> and \a buf_sz is not
- *                    <tt>sizeof(#th_quant_info)</tt>.
- * \retval TH_IMPL   Not supported by this implementation.*/
-#define TH_ENCCTL_SET_QUANT_PARAMS (2)
-/**Disables any encoder features that would prevent lossless transcoding back
- *  to VP3.
- * This primarily means disabling block-level QI values and not using 4MV mode
- *  when any of the luma blocks in a macro block are not coded.
- * It also includes using the VP3 quantization tables and Huffman codes; if you
- *  set them explicitly after calling this function, the resulting stream will
- *  not be VP3-compatible.
- * If you enable VP3-compatibility when encoding 4:2:2 or 4:4:4 source
- *  material, or when using a picture region smaller than the full frame (e.g.
- *  a non-multiple-of-16 width or height), then non-VP3 bitstream features will
- *  still be disabled, but the stream will still not be VP3-compatible, as VP3
- *  was not capable of encoding such formats.
- * If you call this after encoding has already begun, then the quantization
- *  tables and codebooks cannot be changed, but the frame-level features will
- *  be enabled or disabled as requested.
- *
- * \param[in]  buf <tt>int</tt>: a non-zero value to enable VP3 compatibility,
- *                   or 0 to disable it (the default).
- * \param[out] buf <tt>int</tt>: 1 if all bitstream features required for
- *                   VP3-compatibility could be set, and 0 otherwise.
- *                  The latter will be returned if the pixel format is not
- *                   4:2:0, the picture region is smaller than the full frame,
- *                   or if encoding has begun, preventing the quantization
- *                   tables and codebooks from being set.
- * \retval TH_FAULT  \a theora_state or \a buf is <tt>NULL</tt>.
- * \retval TH_EINVAL \a buf_sz is not <tt>sizeof(int)</tt>.
- * \retval TH_IMPL   Not supported by this implementation.*/
-#define TH_ENCCTL_SET_VP3_COMPATIBLE (10)
-/**Gets the maximum speed level.
- * Higher speed levels favor quicker encoding over better quality per bit.
- * Depending on the encoding mode, and the internal algorithms used, quality
- *  may actually improve, but in this case bitrate will also likely increase.
- * In any case, overall rate/distortion performance will probably decrease.
- * The maximum value, and the meaning of each value, may change depending on
- *  the current encoding mode (VBR vs. CQI, etc.).
- *
- * \param[out] buf int: The maximum encoding speed level.
- * \retval TH_FAULT  \a theora_state or \a buf is <tt>NULL</tt>.
- * \retval TH_EINVAL \a buf_sz is not <tt>sizeof(int)</tt>.
- * \retval TH_IMPL   Not supported by this implementation in the current
- *                    encoding mode.*/
-#define TH_ENCCTL_GET_SPLEVEL_MAX (12)
-/**Sets the speed level.
- * By default a speed value of 1 is used.
- *
- * \param[in] buf int: The new encoding speed level.
- *                      0 is slowest, larger values use less CPU.
- * \retval TH_FAULT  \a theora_state or \a buf is <tt>NULL</tt>.
- * \retval TH_EINVAL \a buf_sz is not <tt>sizeof(int)</tt>, or the
- *                    encoding speed level is out of bounds.
- *                   The maximum encoding speed level may be
- *                    implementation- and encoding mode-specific, and can be
- *                    obtained via #TH_ENCCTL_GET_SPLEVEL_MAX.
- * \retval TH_IMPL   Not supported by this implementation in the current
- *                    encoding mode.*/
-#define TH_ENCCTL_SET_SPLEVEL (14)
-/*@}*/
-
-#define OC_FAULT       -1       /**< General failure */
-#define OC_EINVAL      -10      /**< Library encountered invalid internal data */
-#define OC_DISABLED    -11      /**< Requested action is disabled */
-#define OC_BADHEADER   -20      /**< Header packet was corrupt/invalid */
-#define OC_NOTFORMAT   -21      /**< Packet is not a theora packet */
-#define OC_VERSION     -22      /**< Bitstream version is not handled */
-#define OC_IMPL        -23      /**< Feature or action not implemented */
-#define OC_BADPACKET   -24      /**< Packet is corrupt */
-#define OC_NEWPACKET   -25      /**< Packet is an (ignorable) unhandled extension */
-#define OC_DUPFRAME    1        /**< Packet is a dropped frame */
-
-/** 
- * Retrieve a human-readable string to identify the encoder vendor and version.
- * \returns A version string.
- */
-extern const char *theora_version_string(void);
-
-/**
- * Retrieve a 32-bit version number.
- * This number is composed of a 16-bit major version, 8-bit minor version
- * and 8 bit sub-version, composed as follows:
-<pre>
-   (VERSION_MAJOR<<16) + (VERSION_MINOR<<8) + (VERSION_SUB)
-</pre>
-* \returns The version number.
-*/
-extern ogg_uint32_t theora_version_number(void);
-
-/**
- * Initialize the theora encoder.
- * \param th The theora_state handle to initialize for encoding.
- * \param ti A theora_info struct filled with the desired encoding parameters.
- * \retval 0 Success
- */
-extern int theora_encode_init(theora_state *th, theora_info *ti);
-
-/**
- * Submit a YUV buffer to the theora encoder.
- * \param t A theora_state handle previously initialized for encoding.
- * \param yuv A buffer of YUV data to encode.  Note that both the yuv_buffer
- *            struct and the luma/chroma buffers within should be allocated by
- *            the user.
- * \retval OC_EINVAL Encoder is not ready, or is finished.
- * \retval -1 The size of the given frame differs from those previously input
- * \retval 0 Success
- */
-extern int theora_encode_YUVin(theora_state *t, yuv_buffer *yuv);
-
-/**
- * Request the next packet of encoded video. 
- * The encoded data is placed in a user-provided ogg_packet structure.
- * \param t A theora_state handle previously initialized for encoding.
- * \param last_p whether this is the last packet the encoder should produce.
- * \param op An ogg_packet structure to fill. libtheora will set all
- *           elements of this structure, including a pointer to encoded
- *           data. The memory for the encoded data is owned by libtheora.
- * \retval 0 No internal storage exists OR no packet is ready
- * \retval -1 The encoding process has completed
- * \retval 1 Success
- */
-extern int theora_encode_packetout( theora_state *t, int last_p,
-                                    ogg_packet *op);
-
-/**
- * Request a packet containing the initial header.
- * A pointer to the header data is placed in a user-provided ogg_packet
- * structure.
- * \param t A theora_state handle previously initialized for encoding.
- * \param op An ogg_packet structure to fill. libtheora will set all
- *           elements of this structure, including a pointer to the header
- *           data. The memory for the header data is owned by libtheora.
- * \retval 0 Success
- */
-extern int theora_encode_header(theora_state *t, ogg_packet *op);
-
-/**
- * Request a comment header packet from provided metadata.
- * A pointer to the comment data is placed in a user-provided ogg_packet
- * structure.
- * \param tc A theora_comment structure filled with the desired metadata
- * \param op An ogg_packet structure to fill. libtheora will set all
- *           elements of this structure, including a pointer to the encoded
- *           comment data. The memory for the comment data is owned by
- *           libtheora.
- * \retval 0 Success
- */
-extern int theora_encode_comment(theora_comment *tc, ogg_packet *op);
-
-/**
- * Request a packet containing the codebook tables for the stream.
- * A pointer to the codebook data is placed in a user-provided ogg_packet
- * structure.
- * \param t A theora_state handle previously initialized for encoding.
- * \param op An ogg_packet structure to fill. libtheora will set all
- *           elements of this structure, including a pointer to the codebook
- *           data. The memory for the header data is owned by libtheora.
- * \retval 0 Success
- */
-extern int theora_encode_tables(theora_state *t, ogg_packet *op);
-
-/**
- * Decode an Ogg packet, with the expectation that the packet contains
- * an initial header, comment data or codebook tables.
- *
- * \param ci A theora_info structure to fill. This must have been previously
- *           initialized with theora_info_init(). If \a op contains an initial
- *           header, theora_decode_header() will fill \a ci with the
- *           parsed header values. If \a op contains codebook tables,
- *           theora_decode_header() will parse these and attach an internal
- *           representation to \a ci->codec_setup.
- * \param cc A theora_comment structure to fill. If \a op contains comment
- *           data, theora_decode_header() will fill \a cc with the parsed
- *           comments.
- * \param op An ogg_packet structure which you expect contains an initial
- *           header, comment data or codebook tables.
- *
- * \retval OC_BADHEADER \a op is NULL; OR the first byte of \a op->packet
- *                      has the signature of an initial packet, but op is
- *                      not a b_o_s packet; OR this packet has the signature
- *                      of an initial header packet, but an initial header
- *                      packet has already been seen; OR this packet has the
- *                      signature of a comment packet, but the initial header
- *                      has not yet been seen; OR this packet has the signature
- *                      of a comment packet, but contains invalid data; OR
- *                      this packet has the signature of codebook tables,
- *                      but the initial header or comments have not yet
- *                      been seen; OR this packet has the signature of codebook
- *                      tables, but contains invalid data;
- *                      OR the stream being decoded has a compatible version
- *                      but this packet does not have the signature of a
- *                      theora initial header, comments, or codebook packet
- * \retval OC_VERSION   The packet data of \a op is an initial header with
- *                      a version which is incompatible with this version of
- *                      libtheora.
- * \retval OC_NEWPACKET the stream being decoded has an incompatible (future)
- *                      version and contains an unknown signature.
- * \retval 0            Success
- *
- * \note The normal usage is that theora_decode_header() be called on the
- *       first three packets of a theora logical bitstream in succession.
- */
-extern int theora_decode_header(theora_info *ci, theora_comment *cc,
-                                ogg_packet *op);
-
-/**
- * Initialize a theora_state handle for decoding.
- * \param th The theora_state handle to initialize.
- * \param c  A theora_info struct filled with the desired decoding parameters.
- *           This is of course usually obtained from a previous call to
- *           theora_decode_header().
- * \retval 0 Success
- */
-extern int theora_decode_init(theora_state *th, theora_info *c);
-
-/**
- * Input a packet containing encoded data into the theora decoder.
- * \param th A theora_state handle previously initialized for decoding.
- * \param op An ogg_packet containing encoded theora data.
- * \retval 0 Success
- * \retval OC_BADPACKET \a op does not contain encoded video data
- */
-extern int theora_decode_packetin(theora_state *th,ogg_packet *op);
-
-/**
- * Output the next available frame of decoded YUV data.
- * \param th A theora_state handle previously initialized for decoding.
- * \param yuv A yuv_buffer in which libtheora should place the decoded data.
- *            Note that the buffer struct itself is allocated by the user, but
- *            that the luma and chroma pointers will be filled in by the 
- *            library.  Also note that these luma and chroma regions should be 
- *            considered read-only by the user.
- * \retval 0 Success
- */
-extern int theora_decode_YUVout(theora_state *th,yuv_buffer *yuv);
-
-/**
- * Report whether a theora packet is a header or not
- * This function does no verification beyond checking the header
- * flag bit so it should not be used for bitstream identification;
- * use theora_decode_header() for that.
- *
- * \param op An ogg_packet containing encoded theora data.
- * \retval 1 The packet is a header packet
- * \retval 0 The packet is not a header packet (and so contains frame data)
- *
- * Thus function was added in the 1.0alpha4 release.
- */
-extern int theora_packet_isheader(ogg_packet *op);
-
-/**
- * Report whether a theora packet is a keyframe or not
- *
- * \param op An ogg_packet containing encoded theora data.
- * \retval 1 The packet contains a keyframe image
- * \retval 0 The packet is contains an interframe delta
- * \retval -1 The packet is not an image data packet at all
- *
- * Thus function was added in the 1.0alpha4 release.
- */
-extern int theora_packet_iskeyframe(ogg_packet *op);
-
-/**
- * Report the granulepos shift radix
- *
- * When embedded in Ogg, Theora uses a two-part granulepos, 
- * splitting the 64-bit field into two pieces. The more-significant
- * section represents the frame count at the last keyframe,
- * and the less-significant section represents the count of
- * frames since the last keyframe. In this way the overall
- * field is still non-decreasing with time, but usefully encodes
- * a pointer to the last keyframe, which is necessary for
- * correctly restarting decode after a seek. 
- *
- * This function reports the number of bits used to represent
- * the distance to the last keyframe, and thus how the granulepos
- * field must be shifted or masked to obtain the two parts.
- * 
- * Since libtheora returns compressed data in an ogg_packet
- * structure, this may be generally useful even if the Theora
- * packets are not being used in an Ogg container. 
- *
- * \param ti A previously initialized theora_info struct
- * \returns The bit shift dividing the two granulepos fields
- *
- * This function was added in the 1.0alpha5 release.
- */
-int theora_granule_shift(theora_info *ti);
-
-/**
- * Convert a granulepos to an absolute frame index, starting at 0.
- * The granulepos is interpreted in the context of a given theora_state handle.
- * 
- * Note that while the granulepos encodes the frame count (i.e. starting
- * from 1) this call returns the frame index, starting from zero. Thus
- * One can calculate the presentation time by multiplying the index by
- * the rate.
- *
- * \param th A previously initialized theora_state handle (encode or decode)
- * \param granulepos The granulepos to convert.
- * \returns The frame index corresponding to \a granulepos.
- * \retval -1 The given granulepos is undefined (i.e. negative)
- *
- * Thus function was added in the 1.0alpha4 release.
- */
-extern ogg_int64_t theora_granule_frame(theora_state *th,ogg_int64_t granulepos);
-
-/**
- * Convert a granulepos to absolute time in seconds. The granulepos is
- * interpreted in the context of a given theora_state handle, and gives
- * the end time of a frame's presentation as used in Ogg mux ordering.
- *
- * \param th A previously initialized theora_state handle (encode or decode)
- * \param granulepos The granulepos to convert.
- * \returns The absolute time in seconds corresponding to \a granulepos.
- *          This is the "end time" for the frame, or the latest time it should
- *           be displayed.
- *          It is not the presentation time.
- * \retval -1. The given granulepos is undefined (i.e. negative), or
- * \retval -1. The function has been disabled because floating 
- *              point support is not available.
- */
-extern double theora_granule_time(theora_state *th,ogg_int64_t granulepos);
-
-/**
- * Initialize a theora_info structure. All values within the given theora_info
- * structure are initialized, and space is allocated within libtheora for
- * internal codec setup data.
- * \param c A theora_info struct to initialize.
- */
-extern void theora_info_init(theora_info *c);
-
-/**
- * Clear a theora_info structure. All values within the given theora_info
- * structure are cleared, and associated internal codec setup data is freed.
- * \param c A theora_info struct to initialize.
- */
-extern void theora_info_clear(theora_info *c);
-
-/**
- * Free all internal data associated with a theora_state handle.
- * \param t A theora_state handle.
- */
-extern void theora_clear(theora_state *t);
-
-/**
- * Initialize an allocated theora_comment structure
- * \param tc An allocated theora_comment structure 
- **/
-extern void theora_comment_init(theora_comment *tc);
-
-/**
- * Add a comment to an initialized theora_comment structure
- * \param tc A previously initialized theora comment structure
- * \param comment A null-terminated string encoding the comment in the form
- *                "TAG=the value"
- *
- * Neither theora_comment_add() nor theora_comment_add_tag() support
- * comments containing null values, although the bitstream format
- * supports this. To add such comments you will need to manipulate
- * the theora_comment structure directly.
- **/
-
-extern void theora_comment_add(theora_comment *tc, char *comment);
-
-/**
- * Add a comment to an initialized theora_comment structure.
- * \param tc A previously initialized theora comment structure
- * \param tag A null-terminated string containing the tag 
- *            associated with the comment.
- * \param value The corresponding value as a null-terminated string
- *
- * Neither theora_comment_add() nor theora_comment_add_tag() support
- * comments containing null values, although the bitstream format
- * supports this. To add such comments you will need to manipulate
- * the theora_comment structure directly.
- **/
-extern void theora_comment_add_tag(theora_comment *tc,
-                                       char *tag, char *value);
-
-/**
- * Look up a comment value by tag.
- * \param tc Tn initialized theora_comment structure
- * \param tag The tag to look up
- * \param count The instance of the tag. The same tag can appear multiple
- *              times, each with a distinct and ordered value, so an index
- *              is required to retrieve them all.
- * \returns A pointer to the queried tag's value
- * \retval NULL No matching tag is found
- *
- * \note Use theora_comment_query_count() to get the legal range for the
- * count parameter.
- **/
-
-extern char *theora_comment_query(theora_comment *tc, char *tag, int count);
-
-/** Look up the number of instances of a tag.
- *  \param tc An initialized theora_comment structure
- *  \param tag The tag to look up
- *  \returns The number on instances of a particular tag.
- * 
- *  Call this first when querying for a specific tag and then interate
- *  over the number of instances with separate calls to 
- *  theora_comment_query() to retrieve all instances in order.
- **/
-extern int   theora_comment_query_count(theora_comment *tc, char *tag);
-
-/**
- * Clear an allocated theora_comment struct so that it can be freed.
- * \param tc An allocated theora_comment structure.
- **/
-extern void  theora_comment_clear(theora_comment *tc);
-
-/**Encoder control function.
- * This is used to provide advanced control the encoding process.
- * \param th     A #theora_state handle.
- * \param req    The control code to process.
- *                See \ref encctlcodes "the list of available control codes"
- *                 for details.
- * \param buf    The parameters for this control code.
- * \param buf_sz The size of the parameter buffer.*/
-extern int theora_control(theora_state *th,int req,void *buf,size_t buf_sz);
-
-/* @} */ /* end oldfuncs doxygen group */
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _O_THEORA_H_ */
diff --git a/extra_lib/include/vorbis/codec.h b/extra_lib/include/vorbis/codec.h
deleted file mode 100644
index 535bb43..0000000
--- a/extra_lib/include/vorbis/codec.h
+++ /dev/null
@@ -1,241 +0,0 @@
-/********************************************************************
- *                                                                  *
- * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
- * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
- * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
- * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
- *                                                                  *
- * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001             *
- * by the Xiph.Org Foundation http://www.xiph.org/                  *
-
- ********************************************************************
-
- function: libvorbis codec headers
- last mod: $Id: codec.h,v 1.2 2008-12-02 18:04:43 jeanlf Exp $
-
- ********************************************************************/
-
-#ifndef _vorbis_codec_h_
-#define _vorbis_codec_h_
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include <ogg/ogg.h>
-
-typedef struct vorbis_info{
-  int version;
-  int channels;
-  long rate;
-
-  /* The below bitrate declarations are *hints*.
-     Combinations of the three values carry the following implications:
-
-     all three set to the same value:
-       implies a fixed rate bitstream
-     only nominal set:
-       implies a VBR stream that averages the nominal bitrate.  No hard
-       upper/lower limit
-     upper and or lower set:
-       implies a VBR bitstream that obeys the bitrate limits. nominal
-       may also be set to give a nominal rate.
-     none set:
-       the coder does not care to speculate.
-  */
-
-  long bitrate_upper;
-  long bitrate_nominal;
-  long bitrate_lower;
-  long bitrate_window;
-
-  void *codec_setup;
-} vorbis_info;
-
-/* vorbis_dsp_state buffers the current vorbis audio
-   analysis/synthesis state.  The DSP state belongs to a specific
-   logical bitstream ****************************************************/
-typedef struct vorbis_dsp_state{
-  int analysisp;
-  vorbis_info *vi;
-
-  float **pcm;
-  float **pcmret;
-  int      pcm_storage;
-  int      pcm_current;
-  int      pcm_returned;
-
-  int  preextrapolate;
-  int  eofflag;
-
-  long lW;
-  long W;
-  long nW;
-  long centerW;
-
-  ogg_int64_t granulepos;
-  ogg_int64_t sequence;
-
-  ogg_int64_t glue_bits;
-  ogg_int64_t time_bits;
-  ogg_int64_t floor_bits;
-  ogg_int64_t res_bits;
-
-  void       *backend_state;
-} vorbis_dsp_state;
-
-typedef struct vorbis_block{
-  /* necessary stream state for linking to the framing abstraction */
-  float  **pcm;       /* this is a pointer into local storage */
-  oggpack_buffer opb;
-
-  long  lW;
-  long  W;
-  long  nW;
-  int   pcmend;
-  int   mode;
-
-  int         eofflag;
-  ogg_int64_t granulepos;
-  ogg_int64_t sequence;
-  vorbis_dsp_state *vd; /* For read-only access of configuration */
-
-  /* local storage to avoid remallocing; it's up to the mapping to
-     structure it */
-  void               *localstore;
-  long                localtop;
-  long                localalloc;
-  long                totaluse;
-  struct alloc_chain *reap;
-
-  /* bitmetrics for the frame */
-  long glue_bits;
-  long time_bits;
-  long floor_bits;
-  long res_bits;
-
-  void *internal;
-
-} vorbis_block;
-
-/* vorbis_block is a single block of data to be processed as part of
-the analysis/synthesis stream; it belongs to a specific logical
-bitstream, but is independant from other vorbis_blocks belonging to
-that logical bitstream. *************************************************/
-
-struct alloc_chain{
-  void *ptr;
-  struct alloc_chain *next;
-};
-
-/* vorbis_info contains all the setup information specific to the
-   specific compression/decompression mode in progress (eg,
-   psychoacoustic settings, channel setup, options, codebook
-   etc). vorbis_info and substructures are in backends.h.
-*********************************************************************/
-
-/* the comments are not part of vorbis_info so that vorbis_info can be
-   static storage */
-typedef struct vorbis_comment{
-  /* unlimited user comment fields.  libvorbis writes 'libvorbis'
-     whatever vendor is set to in encode */
-  char **user_comments;
-  int   *comment_lengths;
-  int    comments;
-  char  *vendor;
-
-} vorbis_comment;
-
-
-/* libvorbis encodes in two abstraction layers; first we perform DSP
-   and produce a packet (see docs/analysis.txt).  The packet is then
-   coded into a framed OggSquish bitstream by the second layer (see
-   docs/framing.txt).  Decode is the reverse process; we sync/frame
-   the bitstream and extract individual packets, then decode the
-   packet back into PCM audio.
-
-   The extra framing/packetizing is used in streaming formats, such as
-   files.  Over the net (such as with UDP), the framing and
-   packetization aren't necessary as they're provided by the transport
-   and the streaming layer is not used */
-
-/* Vorbis PRIMITIVES: general ***************************************/
-
-extern void     vorbis_info_init(vorbis_info *vi);
-extern void     vorbis_info_clear(vorbis_info *vi);
-extern int      vorbis_info_blocksize(vorbis_info *vi,int zo);
-extern void     vorbis_comment_init(vorbis_comment *vc);
-extern void     vorbis_comment_add(vorbis_comment *vc, char *comment);
-extern void     vorbis_comment_add_tag(vorbis_comment *vc,
-				       char *tag, char *contents);
-extern char    *vorbis_comment_query(vorbis_comment *vc, char *tag, int count);
-extern int      vorbis_comment_query_count(vorbis_comment *vc, char *tag);
-extern void     vorbis_comment_clear(vorbis_comment *vc);
-
-extern int      vorbis_block_init(vorbis_dsp_state *v, vorbis_block *vb);
-extern int      vorbis_block_clear(vorbis_block *vb);
-extern void     vorbis_dsp_clear(vorbis_dsp_state *v);
-extern double   vorbis_granule_time(vorbis_dsp_state *v,
-				    ogg_int64_t granulepos);
-
-/* Vorbis PRIMITIVES: analysis/DSP layer ****************************/
-
-extern int      vorbis_analysis_init(vorbis_dsp_state *v,vorbis_info *vi);
-extern int      vorbis_commentheader_out(vorbis_comment *vc, ogg_packet *op);
-extern int      vorbis_analysis_headerout(vorbis_dsp_state *v,
-					  vorbis_comment *vc,
-					  ogg_packet *op,
-					  ogg_packet *op_comm,
-					  ogg_packet *op_code);
-extern float  **vorbis_analysis_buffer(vorbis_dsp_state *v,int vals);
-extern int      vorbis_analysis_wrote(vorbis_dsp_state *v,int vals);
-extern int      vorbis_analysis_blockout(vorbis_dsp_state *v,vorbis_block *vb);
-extern int      vorbis_analysis(vorbis_block *vb,ogg_packet *op);
-
-extern int      vorbis_bitrate_addblock(vorbis_block *vb);
-extern int      vorbis_bitrate_flushpacket(vorbis_dsp_state *vd,
-					   ogg_packet *op);
-
-/* Vorbis PRIMITIVES: synthesis layer *******************************/
-extern int      vorbis_synthesis_idheader(ogg_packet *op);
-extern int      vorbis_synthesis_headerin(vorbis_info *vi,vorbis_comment *vc,
-					  ogg_packet *op);
-
-extern int      vorbis_synthesis_init(vorbis_dsp_state *v,vorbis_info *vi);
-extern int      vorbis_synthesis_restart(vorbis_dsp_state *v);
-extern int      vorbis_synthesis(vorbis_block *vb,ogg_packet *op);
-extern int      vorbis_synthesis_trackonly(vorbis_block *vb,ogg_packet *op);
-extern int      vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb);
-extern int      vorbis_synthesis_pcmout(vorbis_dsp_state *v,float ***pcm);
-extern int      vorbis_synthesis_lapout(vorbis_dsp_state *v,float ***pcm);
-extern int      vorbis_synthesis_read(vorbis_dsp_state *v,int samples);
-extern long     vorbis_packet_blocksize(vorbis_info *vi,ogg_packet *op);
-
-extern int      vorbis_synthesis_halfrate(vorbis_info *v,int flag);
-extern int      vorbis_synthesis_halfrate_p(vorbis_info *v);
-
-/* Vorbis ERRORS and return codes ***********************************/
-
-#define OV_FALSE      -1
-#define OV_EOF        -2
-#define OV_HOLE       -3
-
-#define OV_EREAD      -128
-#define OV_EFAULT     -129
-#define OV_EIMPL      -130
-#define OV_EINVAL     -131
-#define OV_ENOTVORBIS -132
-#define OV_EBADHEADER -133
-#define OV_EVERSION   -134
-#define OV_ENOTAUDIO  -135
-#define OV_EBADPACKET -136
-#define OV_EBADLINK   -137
-#define OV_ENOSEEK    -138
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
-
diff --git a/extra_lib/include/vorbis/vorbisenc.h b/extra_lib/include/vorbis/vorbisenc.h
deleted file mode 100644
index 21308bf..0000000
--- a/extra_lib/include/vorbis/vorbisenc.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/********************************************************************
- *                                                                  *
- * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
- * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
- * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
- * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
- *                                                                  *
- * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001             *
- * by the Xiph.Org Foundation http://www.xiph.org/                  *
- *                                                                  *
- ********************************************************************
-
- function: vorbis encode-engine setup
- last mod: $Id: vorbisenc.h,v 1.2 2008-12-02 18:04:43 jeanlf Exp $
-
- ********************************************************************/
-
-#ifndef _OV_ENC_H_
-#define _OV_ENC_H_
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "codec.h"
-
-extern int vorbis_encode_init(vorbis_info *vi,
-			      long channels,
-			      long rate,
-
-			      long max_bitrate,
-			      long nominal_bitrate,
-			      long min_bitrate);
-
-extern int vorbis_encode_setup_managed(vorbis_info *vi,
-				       long channels,
-				       long rate,
-
-				       long max_bitrate,
-				       long nominal_bitrate,
-				       long min_bitrate);
-
-extern int vorbis_encode_setup_vbr(vorbis_info *vi,
-				  long channels,
-				  long rate,
-
-				  float quality /* quality level from 0. (lo) to 1. (hi) */
-				  );
-
-extern int vorbis_encode_init_vbr(vorbis_info *vi,
-				  long channels,
-				  long rate,
-
-				  float base_quality /* quality level from 0. (lo) to 1. (hi) */
-				  );
-
-extern int vorbis_encode_setup_init(vorbis_info *vi);
-
-extern int vorbis_encode_ctl(vorbis_info *vi,int number,void *arg);
-
-  /* deprecated rate management supported only for compatability */
-#define OV_ECTL_RATEMANAGE_GET       0x10
-#define OV_ECTL_RATEMANAGE_SET       0x11
-#define OV_ECTL_RATEMANAGE_AVG       0x12
-#define OV_ECTL_RATEMANAGE_HARD      0x13
-
-struct ovectl_ratemanage_arg {
-  int    management_active;
-
-  long   bitrate_hard_min;
-  long   bitrate_hard_max;
-  double bitrate_hard_window;
-
-  long   bitrate_av_lo;
-  long   bitrate_av_hi;
-  double bitrate_av_window;
-  double bitrate_av_window_center;
-};
-
-
-  /* new rate setup */
-#define OV_ECTL_RATEMANAGE2_GET      0x14
-#define OV_ECTL_RATEMANAGE2_SET      0x15
-
-struct ovectl_ratemanage2_arg {
-  int    management_active;
-
-  long   bitrate_limit_min_kbps;
-  long   bitrate_limit_max_kbps;
-  long   bitrate_limit_reservoir_bits;
-  double bitrate_limit_reservoir_bias;
-
-  long   bitrate_average_kbps;
-  double bitrate_average_damping;
-};
-
-
-
-#define OV_ECTL_LOWPASS_GET          0x20
-#define OV_ECTL_LOWPASS_SET          0x21
-
-#define OV_ECTL_IBLOCK_GET           0x30
-#define OV_ECTL_IBLOCK_SET           0x31
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
-
-
diff --git a/extra_lib/include/vorbis/vorbisfile.h b/extra_lib/include/vorbis/vorbisfile.h
deleted file mode 100644
index 9abe89e..0000000
--- a/extra_lib/include/vorbis/vorbisfile.h
+++ /dev/null
@@ -1,183 +0,0 @@
-/********************************************************************
- *                                                                  *
- * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
- * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
- * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
- * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
- *                                                                  *
- * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007             *
- * by the Xiph.Org Foundation http://www.xiph.org/                  *
- *                                                                  *
- ********************************************************************
-
- function: stdio-based convenience library for opening/seeking/decoding
- last mod: $Id: vorbisfile.h,v 1.2 2008-12-02 18:04:43 jeanlf Exp $
-
- ********************************************************************/
-
-#ifndef _OV_FILE_H_
-#define _OV_FILE_H_
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include <stdio.h>
-#include "codec.h"
-
-/* The function prototypes for the callbacks are basically the same as for
- * the stdio functions fread, fseek, fclose, ftell.
- * The one difference is that the FILE * arguments have been replaced with
- * a void * - this is to be used as a pointer to whatever internal data these
- * functions might need. In the stdio case, it's just a FILE * cast to a void *
- *
- * If you use other functions, check the docs for these functions and return
- * the right values. For seek_func(), you *MUST* return -1 if the stream is
- * unseekable
- */
-typedef struct {
-  size_t (*read_func)  (void *ptr, size_t size, size_t nmemb, void *datasource);
-  int    (*seek_func)  (void *datasource, ogg_int64_t offset, int whence);
-  int    (*close_func) (void *datasource);
-  long   (*tell_func)  (void *datasource);
-} ov_callbacks;
-
-/* a few sets of convenient callbacks, especially for use under
- * Windows where ov_open_callbacks() should always be used instead of
- * ov_open() to avoid problems with incompatable crt.o version linking
- * issues. */
-
-static int _ov_header_fseek_wrap(FILE *f,ogg_int64_t off,int whence){
-  if(f==NULL)return(-1);
-  return fseek(f,off,whence);
-}
-
-static ov_callbacks OV_CALLBACKS_DEFAULT = {
-  (size_t (*)(void *, size_t, size_t, void *))  fread,
-  (int (*)(void *, ogg_int64_t, int))           _ov_header_fseek_wrap,
-  (int (*)(void *))                             fclose,
-  (long (*)(void *))                            ftell
-};
-
-static ov_callbacks OV_CALLBACKS_NOCLOSE = {
-  (size_t (*)(void *, size_t, size_t, void *))  fread,
-  (int (*)(void *, ogg_int64_t, int))           _ov_header_fseek_wrap,
-  (int (*)(void *))                             NULL,
-  (long (*)(void *))                            ftell
-};
-
-static ov_callbacks OV_CALLBACKS_STREAMONLY = {
-  (size_t (*)(void *, size_t, size_t, void *))  fread,
-  (int (*)(void *, ogg_int64_t, int))           NULL,
-  (int (*)(void *))                             fclose,
-  (long (*)(void *))                            NULL
-};
-
-static ov_callbacks OV_CALLBACKS_STREAMONLY_NOCLOSE = {
-  (size_t (*)(void *, size_t, size_t, void *))  fread,
-  (int (*)(void *, ogg_int64_t, int))           NULL,
-  (int (*)(void *))                             NULL,
-  (long (*)(void *))                            NULL
-};
-
-#define  NOTOPEN   0
-#define  PARTOPEN  1
-#define  OPENED    2
-#define  STREAMSET 3
-#define  INITSET   4
-
-typedef struct OggVorbis_File {
-  void            *datasource; /* Pointer to a FILE *, etc. */
-  int              seekable;
-  ogg_int64_t      offset;
-  ogg_int64_t      end;
-  ogg_sync_state   oy;
-
-  /* If the FILE handle isn't seekable (eg, a pipe), only the current
-     stream appears */
-  int              links;
-  ogg_int64_t     *offsets;
-  ogg_int64_t     *dataoffsets;
-  long            *serialnos;
-  ogg_int64_t     *pcmlengths; /* overloaded to maintain binary
-				  compatability; x2 size, stores both
-				  beginning and end values */
-  vorbis_info     *vi;
-  vorbis_comment  *vc;
-
-  /* Decoding working state local storage */
-  ogg_int64_t      pcm_offset;
-  int              ready_state;
-  long             current_serialno;
-  int              current_link;
-
-  double           bittrack;
-  double           samptrack;
-
-  ogg_stream_state os; /* take physical pages, weld into a logical
-                          stream of packets */
-  vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
-  vorbis_block     vb; /* local working space for packet->PCM decode */
-
-  ov_callbacks callbacks;
-
-} OggVorbis_File;
-
-
-extern int ov_clear(OggVorbis_File *vf);
-extern int ov_fopen(char *path,OggVorbis_File *vf);
-extern int ov_open(FILE *f,OggVorbis_File *vf,char *initial,long ibytes);
-extern int ov_open_callbacks(void *datasource, OggVorbis_File *vf,
-		char *initial, long ibytes, ov_callbacks callbacks);
-
-extern int ov_test(FILE *f,OggVorbis_File *vf,char *initial,long ibytes);
-extern int ov_test_callbacks(void *datasource, OggVorbis_File *vf,
-		char *initial, long ibytes, ov_callbacks callbacks);
-extern int ov_test_open(OggVorbis_File *vf);
-
-extern long ov_bitrate(OggVorbis_File *vf,int i);
-extern long ov_bitrate_instant(OggVorbis_File *vf);
-extern long ov_streams(OggVorbis_File *vf);
-extern long ov_seekable(OggVorbis_File *vf);
-extern long ov_serialnumber(OggVorbis_File *vf,int i);
-
-extern ogg_int64_t ov_raw_total(OggVorbis_File *vf,int i);
-extern ogg_int64_t ov_pcm_total(OggVorbis_File *vf,int i);
-extern double ov_time_total(OggVorbis_File *vf,int i);
-
-extern int ov_raw_seek(OggVorbis_File *vf,ogg_int64_t pos);
-extern int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos);
-extern int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos);
-extern int ov_time_seek(OggVorbis_File *vf,double pos);
-extern int ov_time_seek_page(OggVorbis_File *vf,double pos);
-
-extern int ov_raw_seek_lap(OggVorbis_File *vf,ogg_int64_t pos);
-extern int ov_pcm_seek_lap(OggVorbis_File *vf,ogg_int64_t pos);
-extern int ov_pcm_seek_page_lap(OggVorbis_File *vf,ogg_int64_t pos);
-extern int ov_time_seek_lap(OggVorbis_File *vf,double pos);
-extern int ov_time_seek_page_lap(OggVorbis_File *vf,double pos);
-
-extern ogg_int64_t ov_raw_tell(OggVorbis_File *vf);
-extern ogg_int64_t ov_pcm_tell(OggVorbis_File *vf);
-extern double ov_time_tell(OggVorbis_File *vf);
-
-extern vorbis_info *ov_info(OggVorbis_File *vf,int link);
-extern vorbis_comment *ov_comment(OggVorbis_File *vf,int link);
-
-extern long ov_read_float(OggVorbis_File *vf,float ***pcm_channels,int samples,
-			  int *bitstream);
-extern long ov_read(OggVorbis_File *vf,char *buffer,int length,
-		    int bigendianp,int word,int sgned,int *bitstream);
-extern int ov_crosslap(OggVorbis_File *vf1,OggVorbis_File *vf2);
-
-extern int ov_halfrate(OggVorbis_File *vf,int flag);
-extern int ov_halfrate_p(OggVorbis_File *vf);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
-
-
diff --git a/extra_lib/include/wiiuse.h b/extra_lib/include/wiiuse.h
deleted file mode 100644
index 78c5125..0000000
--- a/extra_lib/include/wiiuse.h
+++ /dev/null
@@ -1,653 +0,0 @@
-/*
- *	wiiuse
- *
- *	Written By:
- *		Michael Laforest	< para >
- *		Email: < thepara (--AT--) g m a i l [--DOT--] com >
- *
- *	Copyright 2006-2007
- *
- *	This file is part of wiiuse.
- *
- *	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/>.
- *
- *	$Header: /home/bouqueau/Works/smb_moscovie/gpac/extra_lib/include/wiiuse.h,v 1.1 2009-05-20 17:11:40 jeanlf Exp $
- *
- */
-
-/**
- *	@file
- *
- *	@brief API header file.
- *
- *	If this file is included from inside the wiiuse source
- *	and not from a third party program, then wiimote_internal.h
- *	is also included which extends this file.
- */
-
-#ifndef WIIUSE_H_INCLUDED
-#define WIIUSE_H_INCLUDED
-
-#ifdef _WIN32
-	/* windows */
-	#include <windows.h>
-#else
-	/* nix */
-	#include <bluetooth/bluetooth.h>
-#endif
-
-#ifdef WIIUSE_INTERNAL_H_INCLUDED
-	#define WCONST
-#else
-	#define WCONST		const
-#endif
-
-/* led bit masks */
-#define WIIMOTE_LED_NONE				0x00
-#define WIIMOTE_LED_1					0x10
-#define WIIMOTE_LED_2					0x20
-#define WIIMOTE_LED_3					0x40
-#define WIIMOTE_LED_4					0x80
-
-/* button codes */
-#define WIIMOTE_BUTTON_TWO				0x0001
-#define WIIMOTE_BUTTON_ONE				0x0002
-#define WIIMOTE_BUTTON_B				0x0004
-#define WIIMOTE_BUTTON_A				0x0008
-#define WIIMOTE_BUTTON_MINUS			0x0010
-#define WIIMOTE_BUTTON_ZACCEL_BIT6		0x0020
-#define WIIMOTE_BUTTON_ZACCEL_BIT7		0x0040
-#define WIIMOTE_BUTTON_HOME				0x0080
-#define WIIMOTE_BUTTON_LEFT				0x0100
-#define WIIMOTE_BUTTON_RIGHT			0x0200
-#define WIIMOTE_BUTTON_DOWN				0x0400
-#define WIIMOTE_BUTTON_UP				0x0800
-#define WIIMOTE_BUTTON_PLUS				0x1000
-#define WIIMOTE_BUTTON_ZACCEL_BIT4		0x2000
-#define WIIMOTE_BUTTON_ZACCEL_BIT5		0x4000
-#define WIIMOTE_BUTTON_UNKNOWN			0x8000
-#define WIIMOTE_BUTTON_ALL				0x1F9F
-
-/* nunchul button codes */
-#define NUNCHUK_BUTTON_Z				0x01
-#define NUNCHUK_BUTTON_C				0x02
-#define NUNCHUK_BUTTON_ALL				0x03
-
-/* classic controller button codes */
-#define CLASSIC_CTRL_BUTTON_UP			0x0001
-#define CLASSIC_CTRL_BUTTON_LEFT		0x0002
-#define CLASSIC_CTRL_BUTTON_ZR			0x0004
-#define CLASSIC_CTRL_BUTTON_X			0x0008
-#define CLASSIC_CTRL_BUTTON_A			0x0010
-#define CLASSIC_CTRL_BUTTON_Y			0x0020
-#define CLASSIC_CTRL_BUTTON_B			0x0040
-#define CLASSIC_CTRL_BUTTON_ZL			0x0080
-#define CLASSIC_CTRL_BUTTON_FULL_R		0x0200
-#define CLASSIC_CTRL_BUTTON_PLUS		0x0400
-#define CLASSIC_CTRL_BUTTON_HOME		0x0800
-#define CLASSIC_CTRL_BUTTON_MINUS		0x1000
-#define CLASSIC_CTRL_BUTTON_FULL_L		0x2000
-#define CLASSIC_CTRL_BUTTON_DOWN		0x4000
-#define CLASSIC_CTRL_BUTTON_RIGHT		0x8000
-#define CLASSIC_CTRL_BUTTON_ALL			0xFEFF
-
-/* guitar hero 3 button codes */
-#define GUITAR_HERO_3_BUTTON_STRUM_UP	0x0001
-#define GUITAR_HERO_3_BUTTON_YELLOW		0x0008
-#define GUITAR_HERO_3_BUTTON_GREEN		0x0010
-#define GUITAR_HERO_3_BUTTON_BLUE		0x0020
-#define GUITAR_HERO_3_BUTTON_RED		0x0040
-#define GUITAR_HERO_3_BUTTON_ORANGE		0x0080
-#define GUITAR_HERO_3_BUTTON_PLUS		0x0400
-#define GUITAR_HERO_3_BUTTON_MINUS		0x1000
-#define GUITAR_HERO_3_BUTTON_STRUM_DOWN	0x4000
-#define GUITAR_HERO_3_BUTTON_ALL		0xFEFF
-
-
-/* wiimote option flags */
-#define WIIUSE_SMOOTHING				0x01
-#define WIIUSE_CONTINUOUS				0x02
-#define WIIUSE_ORIENT_THRESH			0x04
-#define WIIUSE_INIT_FLAGS				(WIIUSE_SMOOTHING | WIIUSE_ORIENT_THRESH)
-
-#define WIIUSE_ORIENT_PRECISION			100.0f
-
-/* expansion codes */
-#define EXP_NONE						0
-#define EXP_NUNCHUK						1
-#define EXP_CLASSIC						2
-#define EXP_GUITAR_HERO_3				3
-
-/* IR correction types */
-typedef enum ir_position_t {
-	WIIUSE_IR_ABOVE,
-	WIIUSE_IR_BELOW
-} ir_position_t;
-
-/**
- *	@brief Check if a button is pressed.
- *	@param dev		Pointer to a wiimote_t or expansion structure.
- *	@param button	The button you are interested in.
- *	@return 1 if the button is pressed, 0 if not.
- */
-#define IS_PRESSED(dev, button)		((dev->btns & button) == button)
-
-/**
- *	@brief Check if a button is being held.
- *	@param dev		Pointer to a wiimote_t or expansion structure.
- *	@param button	The button you are interested in.
- *	@return 1 if the button is held, 0 if not.
- */
-#define IS_HELD(dev, button)			((dev->btns_held & button) == button)
-
-/**
- *	@brief Check if a button is released on this event.					\n\n
- *			This does not mean the button is not pressed, it means		\n
- *			this button was just now released.
- *	@param dev		Pointer to a wiimote_t or expansion structure.
- *	@param button	The button you are interested in.
- *	@return 1 if the button is released, 0 if not.
- *
- */
-#define IS_RELEASED(dev, button)		((dev->btns_released & button) == button)
-
-/**
- *	@brief Check if a button has just been pressed this event.
- *	@param dev		Pointer to a wiimote_t or expansion structure.
- *	@param button	The button you are interested in.
- *	@return 1 if the button is pressed, 0 if not.
- */
-#define IS_JUST_PRESSED(dev, button)	(IS_PRESSED(dev, button) && !IS_HELD(dev, button))
-
-/**
- *	@brief Return the IR sensitivity level.
- *	@param wm		Pointer to a wiimote_t structure.
- *	@param lvl		[out] Pointer to an int that will hold the level setting.
- *	If no level is set 'lvl' will be set to 0.
- */
-#define WIIUSE_GET_IR_SENSITIVITY(dev, lvl)									\
-			do {														\
-				if ((wm->state & 0x0200) == 0x0200) 		*lvl = 1;	\
-				else if ((wm->state & 0x0400) == 0x0400) 	*lvl = 2;	\
-				else if ((wm->state & 0x0800) == 0x0800) 	*lvl = 3;	\
-				else if ((wm->state & 0x1000) == 0x1000) 	*lvl = 4;	\
-				else if ((wm->state & 0x2000) == 0x2000) 	*lvl = 5;	\
-				else									*lvl = 0;		\
-			} while (0)
-
-#define WIIUSE_USING_ACC(wm)			((wm->state & 0x020) == 0x020)
-#define WIIUSE_USING_EXP(wm)			((wm->state & 0x040) == 0x040)
-#define WIIUSE_USING_IR(wm)				((wm->state & 0x080) == 0x080)
-#define WIIUSE_USING_SPEAKER(wm)		((wm->state & 0x100) == 0x100)
-
-#define WIIUSE_IS_LED_SET(wm, num)		((wm->leds & WIIMOTE_LED_##num) == WIIMOTE_LED_##num)
-
-/*
- *	Largest known payload is 21 bytes.
- *	Add 2 for the prefix and round up to a power of 2.
- */
-#define MAX_PAYLOAD			32
-
-/*
- *	This is left over from an old hack, but it may actually
- *	be a useful feature to keep so it wasn't removed.
- */
-#ifdef WIN32
-	#define WIIMOTE_DEFAULT_TIMEOUT		10
-	#define WIIMOTE_EXP_TIMEOUT			10
-#endif
-
-typedef unsigned char byte;
-typedef char sbyte;
-
-struct wiimote_t;
-struct vec3b_t;
-struct orient_t;
-struct gforce_t;
-
-
-/**
- *      @brief Callback that handles a read event.
- *
- *      @param wm               Pointer to a wiimote_t structure.
- *      @param data             Pointer to the filled data block.
- *      @param len              Length in bytes of the data block.
- *
- *      @see wiiuse_init()
- *
- *      A registered function of this type is called automatically by the wiiuse
- *      library when the wiimote has returned the full data requested by a previous
- *      call to wiiuse_read_data().
- */
-typedef void (*wiiuse_read_cb)(struct wiimote_t* wm, byte* data, unsigned short len);
-
-
-/**
- *	@struct read_req_t
- *	@brief Data read request structure.
- */
-struct read_req_t {
-	wiiuse_read_cb cb;			/**< read data callback											*/
-	byte* buf;					/**< buffer where read data is written							*/
-	unsigned int addr;			/**< the offset that the read started at						*/
-	unsigned short size;		/**< the length of the data read								*/
-	unsigned short wait;		/**< num bytes still needed to finish read						*/
-	byte dirty;					/**< set to 1 if not using callback and needs to be cleaned up	*/
-
-	struct read_req_t* next;	/**< next read request in the queue								*/
-};
-
-
-/**
- *	@struct vec2b_t
- *	@brief Unsigned x,y byte vector.
- */
-typedef struct vec2b_t {
-	byte x, y;
-} vec2b_t;
-
-
-/**
- *	@struct vec3b_t
- *	@brief Unsigned x,y,z byte vector.
- */
-typedef struct vec3b_t {
-	byte x, y, z;
-} vec3b_t;
-
-
-/**
- *	@struct vec3f_t
- *	@brief Signed x,y,z float struct.
- */
-typedef struct vec3f_t {
-	float x, y, z;
-} vec3f_t;
-
-
-/**
- *	@struct orient_t
- *	@brief Orientation struct.
- *
- *	Yaw, pitch, and roll range from -180 to 180 degrees.
- */
-typedef struct orient_t {
-	float roll;						/**< roll, this may be smoothed if enabled	*/
-	float pitch;					/**< pitch, this may be smoothed if enabled	*/
-	float yaw;
-
-	float a_roll;					/**< absolute roll, unsmoothed				*/
-	float a_pitch;					/**< absolute pitch, unsmoothed				*/
-} orient_t;
-
-
-/**
- *	@struct gforce_t
- *	@brief Gravity force struct.
- */
-typedef struct gforce_t {
-	float x, y, z;
-} gforce_t;
-
-
-/**
- *	@struct accel_t
- *	@brief Accelerometer struct. For any device with an accelerometer.
- */
-typedef struct accel_t {
-	struct vec3b_t cal_zero;		/**< zero calibration					*/
-	struct vec3b_t cal_g;			/**< 1g difference around 0cal			*/
-
-	float st_roll;					/**< last smoothed roll value			*/
-	float st_pitch;					/**< last smoothed roll pitch			*/
-	float st_alpha;					/**< alpha value for smoothing [0-1]	*/
-} accel_t;
-
-
-/**
- *	@struct ir_dot_t
- *	@brief A single IR source.
- */
-typedef struct ir_dot_t {
-	byte visible;					/**< if the IR source is visible		*/
-
-	unsigned int x;					/**< interpolated X coordinate			*/
-	unsigned int y;					/**< interpolated Y coordinate			*/
-
-	short rx;						/**< raw X coordinate (0-1023)			*/
-	short ry;						/**< raw Y coordinate (0-767)			*/
-
-	byte order;						/**< increasing order by x-axis value	*/
-
-	byte size;						/**< size of the IR dot (0-15)			*/
-} ir_dot_t;
-
-
-/**
- *	@enum aspect_t
- *	@brief Screen aspect ratio.
- */
-typedef enum aspect_t {
-	WIIUSE_ASPECT_4_3,
-	WIIUSE_ASPECT_16_9
-} aspect_t;
-
-
-/**
- *	@struct ir_t
- *	@brief IR struct. Hold all data related to the IR tracking.
- */
-typedef struct ir_t {
-	struct ir_dot_t dot[4];			/**< IR dots							*/
-	byte num_dots;					/**< number of dots at this time		*/
-
-	enum aspect_t aspect;			/**< aspect ratio of the screen			*/
-
-	enum ir_position_t pos;			/**< IR sensor bar position				*/
-
-	unsigned int vres[2];			/**< IR virtual screen resolution		*/
-	int offset[2];					/**< IR XY correction offset			*/
-	int state;						/**< keeps track of the IR state		*/
-
-	int ax;							/**< absolute X coordinate				*/
-	int ay;							/**< absolute Y coordinate				*/
-
-	int x;							/**< calculated X coordinate			*/
-	int y;							/**< calculated Y coordinate			*/
-
-	float distance;					/**< pixel distance between first 2 dots*/
-	float z;						/**< calculated distance				*/
-} ir_t;
-
-
-/**
- *	@struct joystick_t
- *	@brief Joystick calibration structure.
- *
- *	The angle \a ang is relative to the positive y-axis into quadrant I
- *	and ranges from 0 to 360 degrees.  So if the joystick is held straight
- *	upwards then angle is 0 degrees.  If it is held to the right it is 90,
- *	down is 180, and left is 270.
- *
- *	The magnitude \a mag is the distance from the center to where the
- *	joystick is being held.  The magnitude ranges from 0 to 1.
- *	If the joystick is only slightly tilted from the center the magnitude
- *	will be low, but if it is closer to the outter edge the value will
- *	be higher.
- */
-typedef struct joystick_t {
-	struct vec2b_t max;				/**< maximum joystick values	*/
-	struct vec2b_t min;				/**< minimum joystick values	*/
-	struct vec2b_t center;			/**< center joystick values		*/
-
-	float ang;						/**< angle the joystick is being held		*/
-	float mag;						/**< magnitude of the joystick (range 0-1)	*/
-} joystick_t;
-
-
-/**
- *	@struct nunchuk_t
- *	@brief Nunchuk expansion device.
- */
-typedef struct nunchuk_t {
-	struct accel_t accel_calib;		/**< nunchuk accelerometer calibration		*/
-	struct joystick_t js;			/**< joystick calibration					*/
-
-	int* flags;						/**< options flag (points to wiimote_t.flags) */
-
-	byte btns;						/**< what buttons have just been pressed	*/
-	byte btns_held;					/**< what buttons are being held down		*/
-	byte btns_released;				/**< what buttons were just released this	*/
-
-	float orient_threshold;			/**< threshold for orient to generate an event */
-	int accel_threshold;			/**< threshold for accel to generate an event */
-
-	struct vec3b_t accel;			/**< current raw acceleration data			*/
-	struct orient_t orient;			/**< current orientation on each axis		*/
-	struct gforce_t gforce;			/**< current gravity forces on each axis	*/
-} nunchuk_t;
-
-
-/**
- *	@struct classic_ctrl_t
- *	@brief Classic controller expansion device.
- */
-typedef struct classic_ctrl_t {
-	short btns;						/**< what buttons have just been pressed	*/
-	short btns_held;				/**< what buttons are being held down		*/
-	short btns_released;			/**< what buttons were just released this	*/
-
-	float r_shoulder;				/**< right shoulder button (range 0-1)		*/
-	float l_shoulder;				/**< left shoulder button (range 0-1)		*/
-
-	struct joystick_t ljs;			/**< left joystick calibration				*/
-	struct joystick_t rjs;			/**< right joystick calibration				*/
-} classic_ctrl_t;
-
-
-/**
- *	@struct guitar_hero_3_t
- *	@brief Guitar Hero 3 expansion device.
- */
-typedef struct guitar_hero_3_t {
-	short btns;						/**< what buttons have just been pressed	*/
-	short btns_held;				/**< what buttons are being held down		*/
-	short btns_released;			/**< what buttons were just released this	*/
-
-	float whammy_bar;				/**< whammy bar (range 0-1)					*/
-
-	struct joystick_t js;			/**< joystick calibration					*/
-} guitar_hero_3_t;
-
-
-/**
- *	@struct expansion_t
- *	@brief Generic expansion device plugged into wiimote.
- */
-typedef struct expansion_t {
-	int type;						/**< type of expansion attached				*/
-
-	union {
-		struct nunchuk_t nunchuk;
-		struct classic_ctrl_t classic;
-		struct guitar_hero_3_t gh3;
-	};
-} expansion_t;
-
-
-/**
- *	@enum win32_bt_stack_t
- *	@brief	Available bluetooth stacks for Windows.
- */
-typedef enum win_bt_stack_t {
-	WIIUSE_STACK_UNKNOWN,
-	WIIUSE_STACK_MS,
-	WIIUSE_STACK_BLUESOLEIL
-} win_bt_stack_t;
-
-
-/**
- *	@struct wiimote_state_t
- *	@brief Significant data from the previous event.
- */
-typedef struct wiimote_state_t {
-	/* expansion_t */
-	float exp_ljs_ang;
-	float exp_rjs_ang;
-	float exp_ljs_mag;
-	float exp_rjs_mag;
-	unsigned short exp_btns;
-	struct orient_t exp_orient;
-	struct vec3b_t exp_accel;
-	float exp_r_shoulder;
-	float exp_l_shoulder;
-
-	/* ir_t */
-	int ir_ax;
-	int ir_ay;
-	float ir_distance;
-
-	struct orient_t orient;
-	unsigned short btns;
-
-	struct vec3b_t accel;
-} wiimote_state_t;
-
-
-/**
- *	@enum WIIUSE_EVENT_TYPE
- *	@brief Events that wiiuse can generate from a poll.
- */
-typedef enum WIIUSE_EVENT_TYPE {
-	WIIUSE_NONE = 0,
-	WIIUSE_EVENT,
-	WIIUSE_STATUS,
-	WIIUSE_CONNECT,
-	WIIUSE_DISCONNECT,
-	WIIUSE_UNEXPECTED_DISCONNECT,
-	WIIUSE_READ_DATA,
-	WIIUSE_NUNCHUK_INSERTED,
-	WIIUSE_NUNCHUK_REMOVED,
-	WIIUSE_CLASSIC_CTRL_INSERTED,
-	WIIUSE_CLASSIC_CTRL_REMOVED,
-	WIIUSE_GUITAR_HERO_3_CTRL_INSERTED,
-	WIIUSE_GUITAR_HERO_3_CTRL_REMOVED
-} WIIUSE_EVENT_TYPE;
-
-/**
- *	@struct wiimote_t
- *	@brief Wiimote structure.
- */
-typedef struct wiimote_t {
-	WCONST int unid;						/**< user specified id						*/
-
-	#ifndef WIN32
-		WCONST bdaddr_t bdaddr;				/**< bt address								*/
-		WCONST char bdaddr_str[18];			/**< readable bt address					*/
-		WCONST int out_sock;				/**< output socket							*/
-		WCONST int in_sock;					/**< input socket 							*/
-	#else
-		WCONST HANDLE dev_handle;			/**< HID handle								*/
-		WCONST OVERLAPPED hid_overlap;		/**< overlap handle							*/
-		WCONST enum win_bt_stack_t stack;	/**< type of bluetooth stack to use			*/
-		WCONST int timeout;					/**< read timeout							*/
-		WCONST byte normal_timeout;			/**< normal timeout							*/
-		WCONST byte exp_timeout;			/**< timeout for expansion handshake		*/
-	#endif
-
-	WCONST int state;						/**< various state flags					*/
-	WCONST byte leds;						/**< currently lit leds						*/
-	WCONST float battery_level;				/**< battery level							*/
-
-	WCONST int flags;						/**< options flag							*/
-
-	WCONST byte handshake_state;			/**< the state of the connection handshake	*/
-
-	WCONST struct read_req_t* read_req;		/**< list of data read requests				*/
-	WCONST struct accel_t accel_calib;		/**< wiimote accelerometer calibration		*/
-	WCONST struct expansion_t exp;			/**< wiimote expansion device				*/
-
-	WCONST struct vec3b_t accel;			/**< current raw acceleration data			*/
-	WCONST struct orient_t orient;			/**< current orientation on each axis		*/
-	WCONST struct gforce_t gforce;			/**< current gravity forces on each axis	*/
-
-	WCONST struct ir_t ir;					/**< IR data								*/
-
-	WCONST unsigned short btns;				/**< what buttons have just been pressed	*/
-	WCONST unsigned short btns_held;		/**< what buttons are being held down		*/
-	WCONST unsigned short btns_released;	/**< what buttons were just released this	*/
-
-	WCONST float orient_threshold;			/**< threshold for orient to generate an event */
-	WCONST int accel_threshold;				/**< threshold for accel to generate an event */
-
-	WCONST struct wiimote_state_t lstate;	/**< last saved state						*/
-
-	WCONST WIIUSE_EVENT_TYPE event;			/**< type of event that occured				*/
-	WCONST byte event_buf[MAX_PAYLOAD];		/**< event buffer							*/
-} wiimote;
-
-
-/*****************************************
- *
- *	Include API specific stuff
- *
- *****************************************/
-
-#ifdef _WIN32
-	#define WIIUSE_EXPORT_DECL __declspec(dllexport)
-	#define WIIUSE_IMPORT_DECL __declspec(dllimport)
-#else
-	#define WIIUSE_EXPORT_DECL
-	#define WIIUSE_IMPORT_DECL
-#endif
-
-#ifdef WIIUSE_COMPILE_LIB
-	#define WIIUSE_EXPORT WIIUSE_EXPORT_DECL
-#else
-	#define WIIUSE_EXPORT WIIUSE_IMPORT_DECL
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* wiiuse.c */
-WIIUSE_EXPORT extern const char* wiiuse_version();
-
-WIIUSE_EXPORT extern struct wiimote_t** wiiuse_init(int wiimotes);
-WIIUSE_EXPORT extern void wiiuse_disconnected(struct wiimote_t* wm);
-WIIUSE_EXPORT extern void wiiuse_cleanup(struct wiimote_t** wm, int wiimotes);
-WIIUSE_EXPORT extern void wiiuse_rumble(struct wiimote_t* wm, int status);
-WIIUSE_EXPORT extern void wiiuse_toggle_rumble(struct wiimote_t* wm);
-WIIUSE_EXPORT extern void wiiuse_set_leds(struct wiimote_t* wm, int leds);
-WIIUSE_EXPORT extern void wiiuse_motion_sensing(struct wiimote_t* wm, int status);
-WIIUSE_EXPORT extern int wiiuse_read_data(struct wiimote_t* wm, byte* buffer, unsigned int offset, unsigned short len);
-WIIUSE_EXPORT extern int wiiuse_write_data(struct wiimote_t* wm, unsigned int addr, byte* data, byte len);
-WIIUSE_EXPORT extern void wiiuse_status(struct wiimote_t* wm);
-WIIUSE_EXPORT extern struct wiimote_t* wiiuse_get_by_id(struct wiimote_t** wm, int wiimotes, int unid);
-WIIUSE_EXPORT extern int wiiuse_set_flags(struct wiimote_t* wm, int enable, int disable);
-WIIUSE_EXPORT extern float wiiuse_set_smooth_alpha(struct wiimote_t* wm, float alpha);
-WIIUSE_EXPORT extern void wiiuse_set_bluetooth_stack(struct wiimote_t** wm, int wiimotes, enum win_bt_stack_t type);
-WIIUSE_EXPORT extern void wiiuse_set_orient_threshold(struct wiimote_t* wm, float threshold);
-WIIUSE_EXPORT extern void wiiuse_resync(struct wiimote_t* wm);
-WIIUSE_EXPORT extern void wiiuse_set_timeout(struct wiimote_t** wm, int wiimotes, byte normal_timeout, byte exp_timeout);
-WIIUSE_EXPORT extern void wiiuse_set_accel_threshold(struct wiimote_t* wm, int threshold);
-
-/* connect.c */
-WIIUSE_EXPORT extern int wiiuse_find(struct wiimote_t** wm, int max_wiimotes, int timeout);
-WIIUSE_EXPORT extern int wiiuse_connect(struct wiimote_t** wm, int wiimotes);
-WIIUSE_EXPORT extern void wiiuse_disconnect(struct wiimote_t* wm);
-
-/* events.c */
-WIIUSE_EXPORT extern int wiiuse_poll(struct wiimote_t** wm, int wiimotes);
-
-/* ir.c */
-WIIUSE_EXPORT extern void wiiuse_set_ir(struct wiimote_t* wm, int status);
-WIIUSE_EXPORT extern void wiiuse_set_ir_vres(struct wiimote_t* wm, unsigned int x, unsigned int y);
-WIIUSE_EXPORT extern void wiiuse_set_ir_position(struct wiimote_t* wm, enum ir_position_t pos);
-WIIUSE_EXPORT extern void wiiuse_set_aspect_ratio(struct wiimote_t* wm, enum aspect_t aspect);
-WIIUSE_EXPORT extern void wiiuse_set_ir_sensitivity(struct wiimote_t* wm, int level);
-
-/* nunchuk.c */
-WIIUSE_EXPORT extern void wiiuse_set_nunchuk_orient_threshold(struct wiimote_t* wm, float threshold);
-WIIUSE_EXPORT extern void wiiuse_set_nunchuk_accel_threshold(struct wiimote_t* wm, int threshold);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* WIIUSE_H_INCLUDED */
-
diff --git a/extra_lib/include/xvid.h b/extra_lib/include/xvid.h
deleted file mode 100644
index a33f339..0000000
--- a/extra_lib/include/xvid.h
+++ /dev/null
@@ -1,786 +0,0 @@
-/*****************************************************************************
- *
- * XVID MPEG-4 VIDEO CODEC
- * - XviD Main header file -
- *
- *  Copyright(C) 2001-2004 Peter Ross <pross at xvid.org>
- *
- *  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.
- *
- *  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, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
- *
- * $Id: xvid.h,v 1.2 2008-12-02 18:04:43 jeanlf Exp $
- *
- ****************************************************************************/
-
-#ifndef _XVID_H_
-#define _XVID_H_
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*****************************************************************************
- * versioning
- ****************************************************************************/
-
-/* versioning
-	version takes the form "$major.$minor.$patch"
-	$patch is incremented when there is no api change
-	$minor is incremented when the api is changed, but remains backwards compatible
-	$major is incremented when the api is changed significantly
-
-	when initialising an xvid structure, you must always zero it, and set the version field.
-		memset(&struct,0,sizeof(struct));
-		struct.version = XVID_VERSION;
-
-	XVID_UNSTABLE is defined only during development.
-	*/
-
-#define XVID_MAKE_VERSION(a,b,c) ((((a)&0xff)<<16) | (((b)&0xff)<<8) | ((c)&0xff))
-#define XVID_VERSION_MAJOR(a)    ((char)(((a)>>16) & 0xff))
-#define XVID_VERSION_MINOR(a)    ((char)(((a)>> 8) & 0xff))
-#define XVID_VERSION_PATCH(a)    ((char)(((a)>> 0) & 0xff))
-
-#define XVID_MAKE_API(a,b)       ((((a)&0xff)<<16) | (((b)&0xff)<<0))
-#define XVID_API_MAJOR(a)        (((a)>>16) & 0xff)
-#define XVID_API_MINOR(a)        (((a)>> 0) & 0xff)
-
-#define XVID_VERSION             XVID_MAKE_VERSION(1,1,3)
-#define XVID_API                 XVID_MAKE_API(4, 1)
-
-/* Bitstream Version
- * this will be writen into the bitstream to allow easy detection of xvid
- * encoder bugs in the decoder, without this it might not possible to
- * automatically distinquish between a file which has been encoded with an
- * old & buggy XVID from a file which has been encoded with a bugfree version
- * see the infamous interlacing bug ...
- *
- * this MUST be increased if an encoder bug is fixed, increasing it too often
- * doesnt hurt but not increasing it could cause difficulty for decoders in the
- * future
- */
-#define XVID_BS_VERSION 46
-
-/*****************************************************************************
- * error codes
- ****************************************************************************/
-
-	/*	all functions return values <0 indicate error */
-
-#define XVID_ERR_FAIL		-1		/* general fault */
-#define XVID_ERR_MEMORY		-2		/* memory allocation error */
-#define XVID_ERR_FORMAT		-3		/* file format error */
-#define XVID_ERR_VERSION	-4		/* structure version not supported */
-#define XVID_ERR_END		-5		/* encoder only; end of stream reached */
-
-
-
-/*****************************************************************************
- * xvid_image_t
- ****************************************************************************/
-
-/* colorspace values */
-
-#define XVID_CSP_PLANAR   (1<< 0) /* 4:2:0 planar (==I420, except for pointers/strides) */
-#define XVID_CSP_USER	  XVID_CSP_PLANAR
-#define XVID_CSP_I420     (1<< 1) /* 4:2:0 planar */
-#define XVID_CSP_YV12     (1<< 2) /* 4:2:0 planar */
-#define XVID_CSP_YUY2     (1<< 3) /* 4:2:2 packed */
-#define XVID_CSP_UYVY     (1<< 4) /* 4:2:2 packed */
-#define XVID_CSP_YVYU     (1<< 5) /* 4:2:2 packed */
-#define XVID_CSP_BGRA     (1<< 6) /* 32-bit bgra packed */
-#define XVID_CSP_ABGR     (1<< 7) /* 32-bit abgr packed */
-#define XVID_CSP_RGBA     (1<< 8) /* 32-bit rgba packed */
-#define XVID_CSP_ARGB     (1<<15) /* 32-bit argb packed */
-#define XVID_CSP_BGR      (1<< 9) /* 24-bit bgr packed */
-#define XVID_CSP_RGB555   (1<<10) /* 16-bit rgb555 packed */
-#define XVID_CSP_RGB565   (1<<11) /* 16-bit rgb565 packed */
-#define XVID_CSP_SLICE    (1<<12) /* decoder only: 4:2:0 planar, per slice rendering */
-#define XVID_CSP_INTERNAL (1<<13) /* decoder only: 4:2:0 planar, returns ptrs to internal buffers */
-#define XVID_CSP_NULL     (1<<14) /* decoder only: dont output anything */
-#define XVID_CSP_VFLIP    (1<<31) /* vertical flip mask */
-
-/* xvid_image_t
-	for non-planar colorspaces use only plane[0] and stride[0]
-	four plane reserved for alpha*/
-typedef struct {
-	int csp;				/* [in] colorspace; or with XVID_CSP_VFLIP to perform vertical flip */
-	void * plane[4];		/* [in] image plane ptrs */
-	int stride[4];			/* [in] image stride; "bytes per row"*/
-} xvid_image_t;
-
-/* video-object-sequence profiles */
-#define XVID_PROFILE_S_L0    0x08 /* simple */
-#define XVID_PROFILE_S_L1    0x01
-#define XVID_PROFILE_S_L2    0x02
-#define XVID_PROFILE_S_L3    0x03
-#define XVID_PROFILE_ARTS_L1 0x91 /* advanced realtime simple */
-#define XVID_PROFILE_ARTS_L2 0x92
-#define XVID_PROFILE_ARTS_L3 0x93
-#define XVID_PROFILE_ARTS_L4 0x94
-#define XVID_PROFILE_AS_L0   0xf0 /* advanced simple */
-#define XVID_PROFILE_AS_L1   0xf1
-#define XVID_PROFILE_AS_L2   0xf2
-#define XVID_PROFILE_AS_L3   0xf3
-#define XVID_PROFILE_AS_L4   0xf4
-
-/* aspect ratios */
-#define XVID_PAR_11_VGA    1 /* 1:1 vga (square), default if supplied PAR is not a valid value */
-#define XVID_PAR_43_PAL    2 /* 4:3 pal (12:11 625-line) */
-#define XVID_PAR_43_NTSC   3 /* 4:3 ntsc (10:11 525-line) */
-#define XVID_PAR_169_PAL   4 /* 16:9 pal (16:11 625-line) */
-#define XVID_PAR_169_NTSC  5 /* 16:9 ntsc (40:33 525-line) */
-#define XVID_PAR_EXT      15 /* extended par; use par_width, par_height */
-
-/* frame type flags */
-#define XVID_TYPE_VOL     -1 /* decoder only: vol was decoded */
-#define XVID_TYPE_NOTHING  0 /* decoder only (encoder stats): nothing was decoded/encoded */
-#define XVID_TYPE_AUTO     0 /* encoder: automatically determine coding type */
-#define XVID_TYPE_IVOP     1 /* intra frame */
-#define XVID_TYPE_PVOP     2 /* predicted frame */
-#define XVID_TYPE_BVOP     3 /* bidirectionally encoded */
-#define XVID_TYPE_SVOP     4 /* predicted+sprite frame */
-
-
-/*****************************************************************************
- * xvid_global()
- ****************************************************************************/
-
-/* cpu_flags definitions (make sure to sync this with cpuid.asm for ia32) */
-
-#define XVID_CPU_FORCE    (1<<31) /* force passed cpu flags */
-#define XVID_CPU_ASM      (1<< 7) /* native assembly */
-/* ARCH_IS_IA32 */
-#define XVID_CPU_MMX      (1<< 0) /*       mmx : pentiumMMX,k6 */
-#define XVID_CPU_MMXEXT   (1<< 1) /*   mmx-ext : pentium2, athlon */
-#define XVID_CPU_SSE      (1<< 2) /*       sse : pentium3, athlonXP */
-#define XVID_CPU_SSE2     (1<< 3) /*      sse2 : pentium4, athlon64 */
-#define XVID_CPU_3DNOW    (1<< 4) /*     3dnow : k6-2 */
-#define XVID_CPU_3DNOWEXT (1<< 5) /* 3dnow-ext : athlon */
-#define XVID_CPU_TSC      (1<< 6) /*       tsc : Pentium */
-/* ARCH_IS_PPC */
-#define XVID_CPU_ALTIVEC  (1<< 0) /* altivec */
-
-
-#define XVID_DEBUG_ERROR     (1<< 0)
-#define XVID_DEBUG_STARTCODE (1<< 1)
-#define XVID_DEBUG_HEADER    (1<< 2)
-#define XVID_DEBUG_TIMECODE  (1<< 3)
-#define XVID_DEBUG_MB        (1<< 4)
-#define XVID_DEBUG_COEFF     (1<< 5)
-#define XVID_DEBUG_MV        (1<< 6)
-#define XVID_DEBUG_RC        (1<< 7)
-#define XVID_DEBUG_DEBUG     (1<<31)
-
-/* XVID_GBL_INIT param1 */
-typedef struct {
-	int version;
-	unsigned int cpu_flags; /* [in:opt] zero = autodetect cpu; XVID_CPU_FORCE|{cpu features} = force cpu features */
-	int debug;     /* [in:opt] debug level */
-} xvid_gbl_init_t;
-
-
-/* XVID_GBL_INFO param1 */
-typedef struct {
-	int version;
-	int actual_version; /* [out] returns the actual xvidcore version */
-	const char * build; /* [out] if !null, points to description of this xvid core build */
-	unsigned int cpu_flags;      /* [out] detected cpu features */
-	int num_threads;    /* [out] detected number of cpus/threads */
-} xvid_gbl_info_t;
-
-
-/* XVID_GBL_CONVERT param1 */
-typedef struct {
-	int version;
-	xvid_image_t input;  /* [in] input image & colorspace */
-	xvid_image_t output; /* [in] output image & colorspace */
-	int width;           /* [in] width */
-	int height;          /* [in] height */
-	int interlacing;     /* [in] interlacing */
-} xvid_gbl_convert_t;
-
-
-#define XVID_GBL_INIT    0 /* initialize xvidcore; must be called before using xvid_decore, or xvid_encore) */
-#define XVID_GBL_INFO    1 /* return some info about xvidcore, and the host computer */
-#define XVID_GBL_CONVERT 2 /* colorspace conversion utility */
-
-extern int xvid_global(void *handle, int opt, void *param1, void *param2);
-
-
-/*****************************************************************************
- * xvid_decore()
- ****************************************************************************/
-
-#define XVID_DEC_CREATE  0 /* create decore instance; return 0 on success */
-#define XVID_DEC_DESTROY 1 /* destroy decore instance: return 0 on success */
-#define XVID_DEC_DECODE  2 /* decode a frame: returns number of bytes consumed >= 0 */
-
-extern int xvid_decore(void *handle, int opt, void *param1, void *param2);
-
-/* XVID_DEC_CREATE param 1
-	image width & height may be specified here when the dimensions are
-	known in advance. */
-typedef struct {
-	int version;
-	int width;     /* [in:opt] image width */
-	int height;    /* [in:opt] image width */
-	void * handle; /* [out]	   decore context handle */
-} xvid_dec_create_t;
-
-
-/* XVID_DEC_DECODE param1 */
-/* general flags */
-#define XVID_LOWDELAY      (1<<0) /* lowdelay mode  */
-#define XVID_DISCONTINUITY (1<<1) /* indicates break in stream */
-#define XVID_DEBLOCKY      (1<<2) /* perform luma deblocking */
-#define XVID_DEBLOCKUV     (1<<3) /* perform chroma deblocking */
-#define XVID_FILMEFFECT    (1<<4) /* adds film grain */
-#define XVID_DERINGUV      (1<<5) /* perform chroma deringing, requires deblocking to work */
-#define XVID_DERINGY       (1<<6) /* perform luma deringing, requires deblocking to work */
-
-#define XVID_DEC_FAST      (1<<29) /* disable postprocessing to decrease cpu usage *todo* */
-#define XVID_DEC_DROP      (1<<30) /* drop bframes to decrease cpu usage *todo* */
-#define XVID_DEC_PREROLL   (1<<31) /* decode as fast as you can, don't even show output *todo* */
-
-typedef struct {
-	int version;
-	int general;         /* [in:opt] general flags */
-	void *bitstream;     /* [in]     bitstream (read from)*/
-	int length;          /* [in]     bitstream length */
-	xvid_image_t output; /* [in]     output image (written to) */
-/* ------- v1.1.x ------- */
-	int brightness;		 /* [in]	 brightness offset (0=none) */
-} xvid_dec_frame_t;
-
-
-/* XVID_DEC_DECODE param2 :: optional */
-typedef struct
-{
-	int version;
-
-	int type;                   /* [out] output data type */
-	union {
-		struct { /* type>0 {XVID_TYPE_IVOP,XVID_TYPE_PVOP,XVID_TYPE_BVOP,XVID_TYPE_SVOP} */
-			int general;        /* [out] flags */
-			int time_base;      /* [out] time base */
-			int time_increment; /* [out] time increment */
-
-			/* XXX: external deblocking stuff */
-			int * qscale;	    /* [out] pointer to quantizer table */
-			int qscale_stride;  /* [out] quantizer scale stride */
-
-		} vop;
-		struct {	/* XVID_TYPE_VOL */
-			int general;        /* [out] flags */
-			int width;          /* [out] width */
-			int height;         /* [out] height */
-			int par;            /* [out] pixel aspect ratio (refer to XVID_PAR_xxx above) */
-			int par_width;      /* [out] aspect ratio width  [1..255] */
-			int par_height;     /* [out] aspect ratio height [1..255] */
-		} vol;
-	} data;
-} xvid_dec_stats_t;
-
-#define XVID_ZONE_QUANT  (1<<0)
-#define XVID_ZONE_WEIGHT (1<<1)
-
-typedef struct
-{
-	int frame;
-	int mode;
-	int increment;
-	int base;
-} xvid_enc_zone_t;
-
-
-/*----------------------------------------------------------------------------
- * xvid_enc_stats_t structure
- *
- * Used in:
- *  - xvid_plg_data_t structure
- *  - optional parameter in xvid_encore() function
- *
- * .coding_type = XVID_TYPE_NOTHING if the stats are not given
- *--------------------------------------------------------------------------*/
-
-typedef struct {
-	int version;
-
-	/* encoding parameters */
-	int type;      /* [out] coding type */
-	int quant;     /* [out] frame quantizer */
-	int vol_flags; /* [out] vol flags (see above) */
-	int vop_flags; /* [out] vop flags (see above) */
-
-	/* bitrate */
-	int length;    /* [out] frame length */
-
-	int hlength;   /* [out] header length (bytes) */
-	int kblks;     /* [out] number of blocks compressed as Intra */
-	int mblks;     /* [out] number of blocks compressed as Inter */
-	int ublks;     /* [out] number of blocks marked as not_coded */
-
-	int sse_y;     /* [out] Y plane's sse */
-	int sse_u;     /* [out] U plane's sse */
-	int sse_v;     /* [out] V plane's sse */
-} xvid_enc_stats_t;
-
-/*****************************************************************************
-  xvid plugin system -- internals
-
-  xvidcore will call XVID_PLG_INFO and XVID_PLG_CREATE during XVID_ENC_CREATE
-  before encoding each frame xvidcore will call XVID_PLG_BEFORE
-  after encoding each frame xvidcore will call XVID_PLG_AFTER
-  xvidcore will call XVID_PLG_DESTROY during XVID_ENC_DESTROY
- ****************************************************************************/
-
-
-#define XVID_PLG_CREATE  (1<<0)
-#define XVID_PLG_DESTROY (1<<1)
-#define XVID_PLG_INFO    (1<<2)
-#define XVID_PLG_BEFORE  (1<<3)
-#define XVID_PLG_FRAME   (1<<4)
-#define XVID_PLG_AFTER   (1<<5)
-
-/* xvid_plg_info_t.flags */
-#define XVID_REQORIGINAL (1<<0) /* plugin requires a copy of the original (uncompressed) image */
-#define XVID_REQPSNR     (1<<1) /* plugin requires psnr between the uncompressed and compressed image*/
-#define XVID_REQDQUANTS  (1<<2) /* plugin requires access to the dquant table */
-
-
-typedef struct
-{
-	int version;
-	int flags;   /* [in:opt] plugin flags */
-} xvid_plg_info_t;
-
-
-typedef struct
-{
-	int version;
-
-	int num_zones;           /* [out] */
-	xvid_enc_zone_t * zones; /* [out] */
-
-	int width;               /* [out] */
-	int height;              /* [out] */
-	int mb_width;            /* [out] */
-	int mb_height;           /* [out] */
-	int fincr;               /* [out] */
-	int fbase;               /* [out] */
-
-	void * param;            /* [out] */
-} xvid_plg_create_t;
-
-
-typedef struct
-{
-	int version;
-
-	int num_frames; /* [out] total frame encoded */
-} xvid_plg_destroy_t;
-
-typedef struct
-{
-	int version;
-
-	xvid_enc_zone_t * zone; /* [out] current zone */
-
-	int width;              /* [out] */
-	int height;             /* [out] */
-	int mb_width;           /* [out] */
-	int mb_height;          /* [out] */
-	int fincr;              /* [out] */
-	int fbase;              /* [out] */
-
-	int min_quant[3];       /* [out] */
-	int max_quant[3];       /* [out] */
-
-	xvid_image_t reference; /* [out] -> [out] */
-	xvid_image_t current;   /* [out] -> [in,out] */
-	xvid_image_t original;  /* [out] after: points the original (uncompressed) copy of the current frame */
-	int frame_num;          /* [out] frame number */
-
-	int type;               /* [in,out] */
-	int quant;              /* [in,out] */
-
-	int * dquant;           /* [in,out]	pointer to diff quantizer table */
-	int dquant_stride;      /* [in,out]	diff quantizer stride */
-
-	int vop_flags;          /* [in,out] */
-	int vol_flags;          /* [in,out] */
-	int motion_flags;       /* [in,out] */
-
-/* Deprecated, use the stats field instead.
- * Will disapear before 1.0 */
-	int length;             /* [out] after: length of encoded frame */
-	int kblks;              /* [out] number of blocks compressed as Intra */
-	int mblks;              /* [out] number of blocks compressed as Inter */
-	int ublks;              /* [out] number of blocks marked not_coded */
-	int sse_y;              /* [out] Y plane's sse */
-	int sse_u;              /* [out] U plane's sse */
-	int sse_v;              /* [out] V plane's sse */
-/* End of duplicated data, kept only for binary compatibility */
-
-	int bquant_ratio;       /* [in] */
-	int bquant_offset;      /* [in] */
-
-	xvid_enc_stats_t stats; /* [out] frame statistics */
-} xvid_plg_data_t;
-
-/*****************************************************************************
-  xvid plugin system -- external
-
-  the application passes xvid an array of "xvid_plugin_t" at XVID_ENC_CREATE. the array
-  indicates the plugin function pointer and plugin-specific data.
-  xvidcore handles the rest. example:
-
-  xvid_enc_create_t create;
-  xvid_enc_plugin_t plugins[2];
-
-  plugins[0].func = xvid_psnr_func;
-  plugins[0].param = NULL;
-  plugins[1].func = xvid_cbr_func;
-  plugins[1].param = &cbr_data;
-
-  create.num_plugins = 2;
-  create.plugins = plugins;
-
- ****************************************************************************/
-
-typedef int (xvid_plugin_func)(void * handle, int opt, void * param1, void * param2);
-
-typedef struct
-{
-	xvid_plugin_func * func;
-	void * param;
-} xvid_enc_plugin_t;
-
-
-extern xvid_plugin_func xvid_plugin_single;   /* single-pass rate control */
-extern xvid_plugin_func xvid_plugin_2pass1;   /* two-pass rate control: first pass */
-extern xvid_plugin_func xvid_plugin_2pass2;   /* two-pass rate control: second pass */
-
-extern xvid_plugin_func xvid_plugin_lumimasking;  /* lumimasking */
-
-extern xvid_plugin_func xvid_plugin_psnr;	/* write psnr values to stdout */
-extern xvid_plugin_func xvid_plugin_dump;	/* dump before and after yuvpgms */
-
-
-/* single pass rate control
- * CBR and Constant quantizer modes */
-typedef struct
-{
-	int version;
-
-	int bitrate;               /* [in] bits per second */
-	int reaction_delay_factor; /* [in] */
-	int averaging_period;      /* [in] */
-	int buffer;                /* [in] */
-} xvid_plugin_single_t;
-
-
-typedef struct {
-	int version;
-
-	char * filename;
-} xvid_plugin_2pass1_t;
-
-
-#define XVID_PAYBACK_BIAS 0 /* payback with bias */
-#define XVID_PAYBACK_PROP 1 /* payback proportionally */
-
-typedef struct {
-	int version;
-
-	int bitrate;                  /* [in] target bitrate (bits per second) */
-	char * filename;              /* [in] first pass stats filename */
-
-	int keyframe_boost;           /* [in] keyframe boost percentage: [0..100] */
-	int curve_compression_high;   /* [in] percentage of compression performed on the high part of the curve (above average) */
-	int curve_compression_low;    /* [in] percentage of compression performed on the low  part of the curve (below average) */
-	int overflow_control_strength;/* [in] Payback delay expressed in number of frames */
-	int max_overflow_improvement; /* [in] percentage of allowed range for a frame that gets bigger because of overflow bonus */
-	int max_overflow_degradation; /* [in] percentage of allowed range for a frame that gets smaller because of overflow penalty */
-
-	int kfreduction;              /* [in] maximum bitrate reduction applied to an iframe under the kfthreshold distance limit */
-	int kfthreshold;              /* [in] if an iframe is closer to the next iframe than this distance, a quantity of bits
-								   *      is substracted from its bit allocation. The reduction is computed as multiples of
-								   *      kfreduction/kthreshold. It reaches kfreduction when the distance == kfthreshold,
-								   *      0 for 1<distance<kfthreshold */
-
-	int container_frame_overhead; /* [in] How many bytes the controller has to compensate per frame due to container format overhead */
-
-/* ------- v1.1.x ------- */
-	int vbv_size;                 /* [in] buffer size (bits) */
-	int vbv_initial;              /* [in] initial buffer occupancy (bits) */
-	int vbv_maxrate;              /* [in] max processing bitrate (bits per second) */
-	int vbv_peakrate;             /* [in:opt] max average bitrate over 3 seconds (bits per second) */
-
-}xvid_plugin_2pass2_t;
-
-/*****************************************************************************
- *                             ENCODER API
- ****************************************************************************/
-
-/*----------------------------------------------------------------------------
- * Encoder operations
- *--------------------------------------------------------------------------*/
-
-#define XVID_ENC_CREATE  0 /* create encoder instance; returns 0 on success */
-#define XVID_ENC_DESTROY 1 /* destroy encoder instance; returns 0 on success */
-#define XVID_ENC_ENCODE  2 /* encode a frame: returns number of ouput bytes
-                            * 0 means this frame should not be written (ie. encoder lag) */
-
-
-/*----------------------------------------------------------------------------
- * Encoder entry point
- *--------------------------------------------------------------------------*/
-
-extern int xvid_encore(void *handle, int opt, void *param1, void *param2);
-
-/* Quick API reference
- *
- * XVID_ENC_CREATE operation
- *  - handle: ignored
- *  - opt: XVID_ENC_CREATE
- *  - param1: address of a xvid_enc_create_t structure
- *  - param2: ignored
- *
- * XVID_ENC_ENCODE operation
- *  - handle: an instance returned by a CREATE op
- *  - opt: XVID_ENC_ENCODE
- *  - param1: address of a xvid_enc_frame_t structure
- *  - param2: address of a xvid_enc_stats_t structure (optional)
- *            its return value is asynchronous to what is written to the buffer
- *            depending on the delay introduced by bvop use. It's display
- *            ordered.
- *
- * XVID_ENC_DESTROY operation
- *  - handle: an instance returned by a CREATE op
- *  - opt: XVID_ENC_DESTROY
- *  - param1: ignored
- *  - param2: ignored
- */
-
-
-/*----------------------------------------------------------------------------
- * "Global" flags
- *
- * These flags are used for xvid_enc_create_t->global field during instance
- * creation (operation XVID_ENC_CREATE)
- *--------------------------------------------------------------------------*/
-
-#define XVID_GLOBAL_PACKED            (1<<0) /* packed bitstream */
-#define XVID_GLOBAL_CLOSED_GOP        (1<<1) /* closed_gop:	was DX50BVOP dx50 bvop compatibility */
-#define XVID_GLOBAL_EXTRASTATS_ENABLE (1<<2)
-#if 0
-#define XVID_GLOBAL_VOL_AT_IVOP       (1<<3) /* write vol at every ivop: WIN32/divx compatibility */
-#define XVID_GLOBAL_FORCE_VOL         (1<<4) /* when vol-based parameters are changed, insert an ivop NOT recommended */
-#endif
-#define XVID_GLOBAL_DIVX5_USERDATA    (1<<5) /* write divx5 userdata string 
-                                                this is implied if XVID_GLOBAL_PACKED is set */
-
-/*----------------------------------------------------------------------------
- * "VOL" flags
- *
- * These flags are used for xvid_enc_frame_t->vol_flags field during frame
- * encoding (operation XVID_ENC_ENCODE)
- *--------------------------------------------------------------------------*/
-
-#define XVID_VOL_MPEGQUANT      (1<<0) /* enable MPEG type quantization */
-#define XVID_VOL_EXTRASTATS     (1<<1) /* enable plane sse stats */
-#define XVID_VOL_QUARTERPEL     (1<<2) /* enable quarterpel: frames will encoded as quarterpel */
-#define XVID_VOL_GMC            (1<<3) /* enable GMC; frames will be checked for gmc suitability */
-#define XVID_VOL_REDUCED_ENABLE (1<<4) /* enable reduced resolution vops: frames will be checked for rrv suitability */
-									   /* NOTE:  the reduced resolution feature is not supported anymore. This flag will have no effect! */
-#define XVID_VOL_INTERLACING    (1<<5) /* enable interlaced encoding */
-
-
-/*----------------------------------------------------------------------------
- * "VOP" flags
- *
- * These flags are used for xvid_enc_frame_t->vop_flags field during frame
- * encoding (operation XVID_ENC_ENCODE)
- *--------------------------------------------------------------------------*/
-
-/* Always valid */
-#define XVID_VOP_DEBUG                (1<< 0) /* print debug messages in frames */
-#define XVID_VOP_HALFPEL              (1<< 1) /* use halfpel interpolation */
-#define XVID_VOP_INTER4V              (1<< 2) /* use 4 motion vectors per MB */
-#define XVID_VOP_TRELLISQUANT         (1<< 3) /* use trellis based R-D "optimal" quantization */
-#define XVID_VOP_CHROMAOPT            (1<< 4) /* enable chroma optimization pre-filter */
-#define XVID_VOP_CARTOON              (1<< 5) /* use 'cartoon mode' */
-#define XVID_VOP_GREYSCALE            (1<< 6) /* enable greyscale only mode (even for  color input material chroma is ignored) */
-#define XVID_VOP_HQACPRED             (1<< 7) /* high quality ac prediction */
-#define XVID_VOP_MODEDECISION_RD      (1<< 8) /* enable DCT-ME and use it for mode decision */
-#define XVID_VOP_FAST_MODEDECISION_RD (1<<12) /* use simplified R-D mode decision */
-#define XVID_VOP_RD_BVOP              (1<<13) /* enable rate-distortion mode decision in b-frames */
-
-/* Only valid for vol_flags|=XVID_VOL_INTERLACING */
-#define XVID_VOP_TOPFIELDFIRST        (1<< 9) /* set top-field-first flag  */
-#define XVID_VOP_ALTERNATESCAN        (1<<10) /* set alternate vertical scan flag */
-
-/* only valid for vol_flags|=XVID_VOL_REDUCED_ENABLED */
-#define XVID_VOP_REDUCED              (1<<11) /* reduced resolution vop */
-											  /* NOTE: reduced resolution feature is not supported anymore. This flag will have no effect! */
-
-/*----------------------------------------------------------------------------
- * "Motion" flags
- *
- * These flags are used for xvid_enc_frame_t->motion field during frame
- * encoding (operation XVID_ENC_ENCODE)
- *--------------------------------------------------------------------------*/
-
-/* Motion Estimation Search Patterns */
-#define XVID_ME_ADVANCEDDIAMOND16     (1<< 0) /* use advdiamonds instead of diamonds as search pattern */
-#define XVID_ME_ADVANCEDDIAMOND8      (1<< 1) /* use advdiamond for XVID_ME_EXTSEARCH8 */
-#define XVID_ME_USESQUARES16          (1<< 2) /* use squares instead of diamonds as search pattern */
-#define XVID_ME_USESQUARES8           (1<< 3) /* use square for XVID_ME_EXTSEARCH8 */
-
-/* SAD operator based flags */
-#define XVID_ME_HALFPELREFINE16       (1<< 4)
-#define XVID_ME_HALFPELREFINE8        (1<< 6)
-#define XVID_ME_QUARTERPELREFINE16    (1<< 7)
-#define XVID_ME_QUARTERPELREFINE8     (1<< 8)
-#define XVID_ME_GME_REFINE            (1<< 9)
-#define XVID_ME_EXTSEARCH16           (1<<10) /* extend PMV by more searches */
-#define XVID_ME_EXTSEARCH8            (1<<11) /* use diamond/square for extended 8x8 search */
-#define XVID_ME_CHROMA_PVOP           (1<<12) /* also use chroma for P_VOP/S_VOP ME */
-#define XVID_ME_CHROMA_BVOP           (1<<13) /* also use chroma for B_VOP ME */
-#define XVID_ME_FASTREFINE16          (1<<25) /* use low-complexity refinement functions */
-#define XVID_ME_FASTREFINE8           (1<<29) /* low-complexity 8x8 sub-block refinement */
-
-/* Rate Distortion based flags
- * Valid when XVID_VOP_MODEDECISION_RD is enabled */
-#define XVID_ME_HALFPELREFINE16_RD    (1<<14) /* perform RD-based halfpel refinement */
-#define XVID_ME_HALFPELREFINE8_RD     (1<<15) /* perform RD-based halfpel refinement for 8x8 mode */
-#define XVID_ME_QUARTERPELREFINE16_RD (1<<16) /* perform RD-based qpel refinement */
-#define XVID_ME_QUARTERPELREFINE8_RD  (1<<17) /* perform RD-based qpel refinement for 8x8 mode */
-#define XVID_ME_EXTSEARCH_RD          (1<<18) /* perform RD-based search using square pattern enable XVID_ME_EXTSEARCH8 to do this in 8x8 search as well */
-#define XVID_ME_CHECKPREDICTION_RD    (1<<19) /* always check vector equal to prediction */
-
-/* Other */
-#define XVID_ME_DETECT_STATIC_MOTION  (1<<24) /* speed-up ME by detecting stationary scenes */
-#define XVID_ME_SKIP_DELTASEARCH      (1<<26) /* speed-up by skipping b-frame delta search */
-#define XVID_ME_FAST_MODEINTERPOLATE  (1<<27) /* speed-up by partly skipping interpolate mode */
-#define XVID_ME_BFRAME_EARLYSTOP      (1<<28) /* speed-up by early exiting b-search */
-
-/* Unused */
-#define XVID_ME_UNRESTRICTED16        (1<<20) /* unrestricted ME, not implemented */
-#define XVID_ME_OVERLAPPING16         (1<<21) /* overlapping ME, not implemented */
-#define XVID_ME_UNRESTRICTED8         (1<<22) /* unrestricted ME, not implemented */
-#define XVID_ME_OVERLAPPING8          (1<<23) /* overlapping ME, not implemented */
-
-
-/*----------------------------------------------------------------------------
- * xvid_enc_create_t structure definition
- *
- * This structure is passed as param1 during an instance creation (operation
- * XVID_ENC_CREATE)
- *--------------------------------------------------------------------------*/
-
-typedef struct {
-	int version;
-
-	int profile;                 /* [in] profile at level; refer to XVID_PROFILE_xxx */
-	int width;                   /* [in] frame dimensions; width, pixel units */
-	int height;                  /* [in] frame dimensions; height, pixel units */
-
-	int num_zones;               /* [in:opt] number of bitrate zones */
-	xvid_enc_zone_t * zones;     /*          ^^ zone array */
-
-	int num_plugins;             /* [in:opt] number of plugins */
-	xvid_enc_plugin_t * plugins; /*          ^^ plugin array */
-
-	int num_threads;             /* [in:opt] number of threads */
-	int max_bframes;             /* [in:opt] max sequential bframes (0=disable bframes) */
-
-	int global;                  /* [in:opt] global flags; controls encoding behavior */
-
-	/* --- vol-based stuff; included here for convenience */
-	int fincr;                   /* [in:opt] framerate increment; set to zero for variable framerate */
-	int fbase;                   /* [in] framerate base frame_duration = fincr/fbase seconds*/
-    /* ---------------------------------------------- */
-
-	/* --- vop-based; included here for convenience */
-	int max_key_interval;        /* [in:opt] the maximum interval between key frames */
-
-	int frame_drop_ratio;        /* [in:opt] frame dropping: 0=drop none... 100=drop all */
-
-	int bquant_ratio;            /* [in:opt] bframe quantizer multipier/offeset; used to decide bframes quant when bquant==-1 */
-	int bquant_offset;           /* bquant = (avg(past_ref_quant,future_ref_quant)*bquant_ratio + bquant_offset) / 100 */
-
-	int min_quant[3];            /* [in:opt] */
-	int max_quant[3];            /* [in:opt] */
-	/* ---------------------------------------------- */
-
-	void *handle;                /* [out] encoder instance handle */
-} xvid_enc_create_t;
-
-
-/*----------------------------------------------------------------------------
- * xvid_enc_frame_t structure definition
- *
- * This structure is passed as param1 during a frame encoding (operation
- * XVID_ENC_ENCODE)
- *--------------------------------------------------------------------------*/
-
-/* out value for the frame structure->type field
- * unlike stats output in param2, this field is not asynchronous and tells
- * the client app, if the frame written into the stream buffer is an ivop
- * usually used for indexing purpose in the container */
-#define XVID_KEYFRAME (1<<1)
-
-/* The structure */
-typedef struct {
-	int version;
-
-	/* VOL related stuff
-	 * unless XVID_FORCEVOL is set, the encoder will not react to any changes
-	 * here until the next VOL (keyframe). */
-
-	int vol_flags;                     /* [in] vol flags */
-	unsigned char *quant_intra_matrix; /* [in:opt] custom intra qmatrix */
-	unsigned char *quant_inter_matrix; /* [in:opt] custom inter qmatrix */
-
-	int par;                           /* [in:opt] pixel aspect ratio (refer to XVID_PAR_xxx above) */
-	int par_width;                     /* [in:opt] aspect ratio width */
-	int par_height;                    /* [in:opt] aspect ratio height */
-
-	/* Other fields that can change on a frame base */
-
-	int fincr;                         /* [in:opt] framerate increment, for variable framerate only */
-	int vop_flags;                     /* [in] (general)vop-based flags */
-	int motion;                        /* [in] ME options */
-
-	xvid_image_t input;                /* [in] input image (read from) */
-
-	int type;                          /* [in:opt] coding type */
-	int quant;                         /* [in] frame quantizer; if <=0, automatic (ratecontrol) */
-	int bframe_threshold;
-
-	void *bitstream;                   /* [in:opt] bitstream ptr (written to)*/
-	int length;                        /* [in:opt] bitstream length (bytes) */
-
-	int out_flags;                     /* [out] bitstream output flags */
-} xvid_enc_frame_t;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/extra_lib/include/zlib/zconf.h b/extra_lib/include/zlib/zconf.h
deleted file mode 100644
index dc25590..0000000
--- a/extra_lib/include/zlib/zconf.h
+++ /dev/null
@@ -1,332 +0,0 @@
-/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-2005 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id: zconf.h,v 1.2 2008-12-02 18:04:43 jeanlf Exp $ */
-
-#ifndef ZCONF_H
-#define ZCONF_H
-
-/*
- * If you *really* need a unique prefix for all types and library functions,
- * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
- */
-#ifdef Z_PREFIX
-#  define deflateInit_          z_deflateInit_
-#  define deflate               z_deflate
-#  define deflateEnd            z_deflateEnd
-#  define inflateInit_          z_inflateInit_
-#  define inflate               z_inflate
-#  define inflateEnd            z_inflateEnd
-#  define deflateInit2_         z_deflateInit2_
-#  define deflateSetDictionary  z_deflateSetDictionary
-#  define deflateCopy           z_deflateCopy
-#  define deflateReset          z_deflateReset
-#  define deflateParams         z_deflateParams
-#  define deflateBound          z_deflateBound
-#  define deflatePrime          z_deflatePrime
-#  define inflateInit2_         z_inflateInit2_
-#  define inflateSetDictionary  z_inflateSetDictionary
-#  define inflateSync           z_inflateSync
-#  define inflateSyncPoint      z_inflateSyncPoint
-#  define inflateCopy           z_inflateCopy
-#  define inflateReset          z_inflateReset
-#  define inflateBack           z_inflateBack
-#  define inflateBackEnd        z_inflateBackEnd
-#  define compress              z_compress
-#  define compress2             z_compress2
-#  define compressBound         z_compressBound
-#  define uncompress            z_uncompress
-#  define adler32               z_adler32
-#  define crc32                 z_crc32
-#  define get_crc_table         z_get_crc_table
-#  define zError                z_zError
-
-#  define alloc_func            z_alloc_func
-#  define free_func             z_free_func
-#  define in_func               z_in_func
-#  define out_func              z_out_func
-#  define Byte                  z_Byte
-#  define uInt                  z_uInt
-#  define uLong                 z_uLong
-#  define Bytef                 z_Bytef
-#  define charf                 z_charf
-#  define intf                  z_intf
-#  define uIntf                 z_uIntf
-#  define uLongf                z_uLongf
-#  define voidpf                z_voidpf
-#  define voidp                 z_voidp
-#endif
-
-#if defined(__MSDOS__) && !defined(MSDOS)
-#  define MSDOS
-#endif
-#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
-#  define OS2
-#endif
-#if defined(_WINDOWS) && !defined(WINDOWS)
-#  define WINDOWS
-#endif
-#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
-#  ifndef WIN32
-#    define WIN32
-#  endif
-#endif
-#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
-#  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
-#    ifndef SYS16BIT
-#      define SYS16BIT
-#    endif
-#  endif
-#endif
-
-/*
- * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
- * than 64k bytes at a time (needed on systems with 16-bit int).
- */
-#ifdef SYS16BIT
-#  define MAXSEG_64K
-#endif
-#ifdef MSDOS
-#  define UNALIGNED_OK
-#endif
-
-#ifdef __STDC_VERSION__
-#  ifndef STDC
-#    define STDC
-#  endif
-#  if __STDC_VERSION__ >= 199901L
-#    ifndef STDC99
-#      define STDC99
-#    endif
-#  endif
-#endif
-#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
-#  define STDC
-#endif
-
-#if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
-#  define STDC
-#endif
-
-#ifndef STDC
-#  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
-#    define const       /* note: need a more gentle solution here */
-#  endif
-#endif
-
-/* Some Mac compilers merge all .h files incorrectly: */
-#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
-#  define NO_DUMMY_DECL
-#endif
-
-/* Maximum value for memLevel in deflateInit2 */
-#ifndef MAX_MEM_LEVEL
-#  ifdef MAXSEG_64K
-#    define MAX_MEM_LEVEL 8
-#  else
-#    define MAX_MEM_LEVEL 9
-#  endif
-#endif
-
-/* Maximum value for windowBits in deflateInit2 and inflateInit2.
- * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
- * created by gzip. (Files created by minigzip can still be extracted by
- * gzip.)
- */
-#ifndef MAX_WBITS
-#  define MAX_WBITS   15 /* 32K LZ77 window */
-#endif
-
-/* The memory requirements for deflate are (in bytes):
-            (1 << (windowBits+2)) +  (1 << (memLevel+9))
- that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
- plus a few kilobytes for small objects. For example, if you want to reduce
- the default memory requirements from 256K to 128K, compile with
-     make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
- Of course this will generally degrade compression (there's no free lunch).
-
-   The memory requirements for inflate are (in bytes) 1 << windowBits
- that is, 32K for windowBits=15 (default value) plus a few kilobytes
- for small objects.
-*/
-
-                        /* Type declarations */
-
-#ifndef OF /* function prototypes */
-#  ifdef STDC
-#    define OF(args)  args
-#  else
-#    define OF(args)  ()
-#  endif
-#endif
-
-/* The following definitions for FAR are needed only for MSDOS mixed
- * model programming (small or medium model with some far allocations).
- * This was tested only with MSC; for other MSDOS compilers you may have
- * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
- * just define FAR to be empty.
- */
-#ifdef SYS16BIT
-#  if defined(M_I86SM) || defined(M_I86MM)
-     /* MSC small or medium model */
-#    define SMALL_MEDIUM
-#    ifdef _MSC_VER
-#      define FAR _far
-#    else
-#      define FAR far
-#    endif
-#  endif
-#  if (defined(__SMALL__) || defined(__MEDIUM__))
-     /* Turbo C small or medium model */
-#    define SMALL_MEDIUM
-#    ifdef __BORLANDC__
-#      define FAR _far
-#    else
-#      define FAR far
-#    endif
-#  endif
-#endif
-
-#if defined(WINDOWS) || defined(WIN32)
-   /* If building or using zlib as a DLL, define ZLIB_DLL.
-    * This is not mandatory, but it offers a little performance increase.
-    */
-#  ifdef ZLIB_DLL
-#    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
-#      ifdef ZLIB_INTERNAL
-#        define ZEXTERN extern __declspec(dllexport)
-#      else
-#        define ZEXTERN extern __declspec(dllimport)
-#      endif
-#    endif
-#  endif  /* ZLIB_DLL */
-   /* If building or using zlib with the WINAPI/WINAPIV calling convention,
-    * define ZLIB_WINAPI.
-    * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
-    */
-#  ifdef ZLIB_WINAPI
-#    ifdef FAR
-#      undef FAR
-#    endif
-#    include <windows.h>
-     /* No need for _export, use ZLIB.DEF instead. */
-     /* For complete Windows compatibility, use WINAPI, not __stdcall. */
-#    define ZEXPORT WINAPI
-#    ifdef WIN32
-#      define ZEXPORTVA WINAPIV
-#    else
-#      define ZEXPORTVA FAR CDECL
-#    endif
-#  endif
-#endif
-
-#if defined (__BEOS__)
-#  ifdef ZLIB_DLL
-#    ifdef ZLIB_INTERNAL
-#      define ZEXPORT   __declspec(dllexport)
-#      define ZEXPORTVA __declspec(dllexport)
-#    else
-#      define ZEXPORT   __declspec(dllimport)
-#      define ZEXPORTVA __declspec(dllimport)
-#    endif
-#  endif
-#endif
-
-#ifndef ZEXTERN
-#  define ZEXTERN extern
-#endif
-#ifndef ZEXPORT
-#  define ZEXPORT
-#endif
-#ifndef ZEXPORTVA
-#  define ZEXPORTVA
-#endif
-
-#ifndef FAR
-#  define FAR
-#endif
-
-#if !defined(__MACTYPES__)
-typedef unsigned char  Byte;  /* 8 bits */
-#endif
-typedef unsigned int   uInt;  /* 16 bits or more */
-typedef unsigned long  uLong; /* 32 bits or more */
-
-#ifdef SMALL_MEDIUM
-   /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
-#  define Bytef Byte FAR
-#else
-   typedef Byte  FAR Bytef;
-#endif
-typedef char  FAR charf;
-typedef int   FAR intf;
-typedef uInt  FAR uIntf;
-typedef uLong FAR uLongf;
-
-#ifdef STDC
-   typedef void const *voidpc;
-   typedef void FAR   *voidpf;
-   typedef void       *voidp;
-#else
-   typedef Byte const *voidpc;
-   typedef Byte FAR   *voidpf;
-   typedef Byte       *voidp;
-#endif
-
-#if 0           /* HAVE_UNISTD_H -- this line is updated by ./configure */
-#  include <sys/types.h> /* for off_t */
-#  include <unistd.h>    /* for SEEK_* and off_t */
-#  ifdef VMS
-#    include <unixio.h>   /* for off_t */
-#  endif
-#  define z_off_t off_t
-#endif
-#ifndef SEEK_SET
-#  define SEEK_SET        0       /* Seek from beginning of file.  */
-#  define SEEK_CUR        1       /* Seek from current position.  */
-#  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
-#endif
-#ifndef z_off_t
-#  define z_off_t long
-#endif
-
-#if defined(__OS400__)
-#  define NO_vsnprintf
-#endif
-
-#if defined(__MVS__)
-#  define NO_vsnprintf
-#  ifdef FAR
-#    undef FAR
-#  endif
-#endif
-
-/* MVS linker does not support external names larger than 8 bytes */
-#if defined(__MVS__)
-#   pragma map(deflateInit_,"DEIN")
-#   pragma map(deflateInit2_,"DEIN2")
-#   pragma map(deflateEnd,"DEEND")
-#   pragma map(deflateBound,"DEBND")
-#   pragma map(inflateInit_,"ININ")
-#   pragma map(inflateInit2_,"ININ2")
-#   pragma map(inflateEnd,"INEND")
-#   pragma map(inflateSync,"INSY")
-#   pragma map(inflateSetDictionary,"INSEDI")
-#   pragma map(compressBound,"CMBND")
-#   pragma map(inflate_table,"INTABL")
-#   pragma map(inflate_fast,"INFA")
-#   pragma map(inflate_copyright,"INCOPY")
-#endif
-
-#endif /* ZCONF_H */
diff --git a/extra_lib/include/zlib/zlib.h b/extra_lib/include/zlib/zlib.h
deleted file mode 100644
index 0228179..0000000
--- a/extra_lib/include/zlib/zlib.h
+++ /dev/null
@@ -1,1357 +0,0 @@
-/* zlib.h -- interface of the 'zlib' general purpose compression library
-  version 1.2.3, July 18th, 2005
-
-  Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  Jean-loup Gailly        Mark Adler
-  jloup at gzip.org          madler at alumni.caltech.edu
-
-
-  The data format used by the zlib library is described by RFCs (Request for
-  Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt
-  (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
-*/
-
-#ifndef ZLIB_H
-#define ZLIB_H
-
-#include "zconf.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define ZLIB_VERSION "1.2.3"
-#define ZLIB_VERNUM 0x1230
-
-/*
-     The 'zlib' compression library provides in-memory compression and
-  decompression functions, including integrity checks of the uncompressed
-  data.  This version of the library supports only one compression method
-  (deflation) but other algorithms will be added later and will have the same
-  stream interface.
-
-     Compression can be done in a single step if the buffers are large
-  enough (for example if an input file is mmap'ed), or can be done by
-  repeated calls of the compression function.  In the latter case, the
-  application must provide more input and/or consume the output
-  (providing more output space) before each call.
-
-     The compressed data format used by default by the in-memory functions is
-  the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
-  around a deflate stream, which is itself documented in RFC 1951.
-
-     The library also supports reading and writing files in gzip (.gz) format
-  with an interface similar to that of stdio using the functions that start
-  with "gz".  The gzip format is different from the zlib format.  gzip is a
-  gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
-
-     This library can optionally read and write gzip streams in memory as well.
-
-     The zlib format was designed to be compact and fast for use in memory
-  and on communications channels.  The gzip format was designed for single-
-  file compression on file systems, has a larger header than zlib to maintain
-  directory information, and uses a different, slower check method than zlib.
-
-     The library does not install any signal handler. The decoder checks
-  the consistency of the compressed data, so the library should never
-  crash even in case of corrupted input.
-*/
-
-typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
-typedef void   (*free_func)  OF((voidpf opaque, voidpf address));
-
-struct internal_state;
-
-typedef struct z_stream_s {
-    Bytef    *next_in;  /* next input byte */
-    uInt     avail_in;  /* number of bytes available at next_in */
-    uLong    total_in;  /* total nb of input bytes read so far */
-
-    Bytef    *next_out; /* next output byte should be put there */
-    uInt     avail_out; /* remaining free space at next_out */
-    uLong    total_out; /* total nb of bytes output so far */
-
-    char     *msg;      /* last error message, NULL if no error */
-    struct internal_state FAR *state; /* not visible by applications */
-
-    alloc_func zalloc;  /* used to allocate the internal state */
-    free_func  zfree;   /* used to free the internal state */
-    voidpf     opaque;  /* private data object passed to zalloc and zfree */
-
-    int     data_type;  /* best guess about the data type: binary or text */
-    uLong   adler;      /* adler32 value of the uncompressed data */
-    uLong   reserved;   /* reserved for future use */
-} z_stream;
-
-typedef z_stream FAR *z_streamp;
-
-/*
-     gzip header information passed to and from zlib routines.  See RFC 1952
-  for more details on the meanings of these fields.
-*/
-typedef struct gz_header_s {
-    int     text;       /* true if compressed data believed to be text */
-    uLong   time;       /* modification time */
-    int     xflags;     /* extra flags (not used when writing a gzip file) */
-    int     os;         /* operating system */
-    Bytef   *extra;     /* pointer to extra field or Z_NULL if none */
-    uInt    extra_len;  /* extra field length (valid if extra != Z_NULL) */
-    uInt    extra_max;  /* space at extra (only when reading header) */
-    Bytef   *name;      /* pointer to zero-terminated file name or Z_NULL */
-    uInt    name_max;   /* space at name (only when reading header) */
-    Bytef   *comment;   /* pointer to zero-terminated comment or Z_NULL */
-    uInt    comm_max;   /* space at comment (only when reading header) */
-    int     hcrc;       /* true if there was or will be a header crc */
-    int     done;       /* true when done reading gzip header (not used
-                           when writing a gzip file) */
-} gz_header;
-
-typedef gz_header FAR *gz_headerp;
-
-/*
-   The application must update next_in and avail_in when avail_in has
-   dropped to zero. It must update next_out and avail_out when avail_out
-   has dropped to zero. The application must initialize zalloc, zfree and
-   opaque before calling the init function. All other fields are set by the
-   compression library and must not be updated by the application.
-
-   The opaque value provided by the application will be passed as the first
-   parameter for calls of zalloc and zfree. This can be useful for custom
-   memory management. The compression library attaches no meaning to the
-   opaque value.
-
-   zalloc must return Z_NULL if there is not enough memory for the object.
-   If zlib is used in a multi-threaded application, zalloc and zfree must be
-   thread safe.
-
-   On 16-bit systems, the functions zalloc and zfree must be able to allocate
-   exactly 65536 bytes, but will not be required to allocate more than this
-   if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS,
-   pointers returned by zalloc for objects of exactly 65536 bytes *must*
-   have their offset normalized to zero. The default allocation function
-   provided by this library ensures this (see zutil.c). To reduce memory
-   requirements and avoid any allocation of 64K objects, at the expense of
-   compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h).
-
-   The fields total_in and total_out can be used for statistics or
-   progress reports. After compression, total_in holds the total size of
-   the uncompressed data and may be saved for use in the decompressor
-   (particularly if the decompressor wants to decompress everything in
-   a single step).
-*/
-
-                        /* constants */
-
-#define Z_NO_FLUSH      0
-#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */
-#define Z_SYNC_FLUSH    2
-#define Z_FULL_FLUSH    3
-#define Z_FINISH        4
-#define Z_BLOCK         5
-/* Allowed flush values; see deflate() and inflate() below for details */
-
-#define Z_OK            0
-#define Z_STREAM_END    1
-#define Z_NEED_DICT     2
-#define Z_ERRNO        (-1)
-#define Z_STREAM_ERROR (-2)
-#define Z_DATA_ERROR   (-3)
-#define Z_MEM_ERROR    (-4)
-#define Z_BUF_ERROR    (-5)
-#define Z_VERSION_ERROR (-6)
-/* Return codes for the compression/decompression functions. Negative
- * values are errors, positive values are used for special but normal events.
- */
-
-#define Z_NO_COMPRESSION         0
-#define Z_BEST_SPEED             1
-#define Z_BEST_COMPRESSION       9
-#define Z_DEFAULT_COMPRESSION  (-1)
-/* compression levels */
-
-#define Z_FILTERED            1
-#define Z_HUFFMAN_ONLY        2
-#define Z_RLE                 3
-#define Z_FIXED               4
-#define Z_DEFAULT_STRATEGY    0
-/* compression strategy; see deflateInit2() below for details */
-
-#define Z_BINARY   0
-#define Z_TEXT     1
-#define Z_ASCII    Z_TEXT   /* for compatibility with 1.2.2 and earlier */
-#define Z_UNKNOWN  2
-/* Possible values of the data_type field (though see inflate()) */
-
-#define Z_DEFLATED   8
-/* The deflate compression method (the only one supported in this version) */
-
-#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
-
-#define zlib_version zlibVersion()
-/* for compatibility with versions < 1.0.2 */
-
-                        /* basic functions */
-
-ZEXTERN const char * ZEXPORT zlibVersion OF((void));
-/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
-   If the first character differs, the library code actually used is
-   not compatible with the zlib.h header file used by the application.
-   This check is automatically made by deflateInit and inflateInit.
- */
-
-/*
-ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
-
-     Initializes the internal stream state for compression. The fields
-   zalloc, zfree and opaque must be initialized before by the caller.
-   If zalloc and zfree are set to Z_NULL, deflateInit updates them to
-   use default allocation functions.
-
-     The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
-   1 gives best speed, 9 gives best compression, 0 gives no compression at
-   all (the input data is simply copied a block at a time).
-   Z_DEFAULT_COMPRESSION requests a default compromise between speed and
-   compression (currently equivalent to level 6).
-
-     deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_STREAM_ERROR if level is not a valid compression level,
-   Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
-   with the version assumed by the caller (ZLIB_VERSION).
-   msg is set to null if there is no error message.  deflateInit does not
-   perform any compression: this will be done by deflate().
-*/
-
-
-ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
-/*
-    deflate compresses as much data as possible, and stops when the input
-  buffer becomes empty or the output buffer becomes full. It may introduce some
-  output latency (reading input without producing any output) except when
-  forced to flush.
-
-    The detailed semantics are as follows. deflate performs one or both of the
-  following actions:
-
-  - Compress more input starting at next_in and update next_in and avail_in
-    accordingly. If not all input can be processed (because there is not
-    enough room in the output buffer), next_in and avail_in are updated and
-    processing will resume at this point for the next call of deflate().
-
-  - Provide more output starting at next_out and update next_out and avail_out
-    accordingly. This action is forced if the parameter flush is non zero.
-    Forcing flush frequently degrades the compression ratio, so this parameter
-    should be set only when necessary (in interactive applications).
-    Some output may be provided even if flush is not set.
-
-  Before the call of deflate(), the application should ensure that at least
-  one of the actions is possible, by providing more input and/or consuming
-  more output, and updating avail_in or avail_out accordingly; avail_out
-  should never be zero before the call. The application can consume the
-  compressed output when it wants, for example when the output buffer is full
-  (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK
-  and with zero avail_out, it must be called again after making room in the
-  output buffer because there might be more output pending.
-
-    Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to
-  decide how much data to accumualte before producing output, in order to
-  maximize compression.
-
-    If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
-  flushed to the output buffer and the output is aligned on a byte boundary, so
-  that the decompressor can get all input data available so far. (In particular
-  avail_in is zero after the call if enough output space has been provided
-  before the call.)  Flushing may degrade compression for some compression
-  algorithms and so it should be used only when necessary.
-
-    If flush is set to Z_FULL_FLUSH, all output is flushed as with
-  Z_SYNC_FLUSH, and the compression state is reset so that decompression can
-  restart from this point if previous compressed data has been damaged or if
-  random access is desired. Using Z_FULL_FLUSH too often can seriously degrade
-  compression.
-
-    If deflate returns with avail_out == 0, this function must be called again
-  with the same value of the flush parameter and more output space (updated
-  avail_out), until the flush is complete (deflate returns with non-zero
-  avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
-  avail_out is greater than six to avoid repeated flush markers due to
-  avail_out == 0 on return.
-
-    If the parameter flush is set to Z_FINISH, pending input is processed,
-  pending output is flushed and deflate returns with Z_STREAM_END if there
-  was enough output space; if deflate returns with Z_OK, this function must be
-  called again with Z_FINISH and more output space (updated avail_out) but no
-  more input data, until it returns with Z_STREAM_END or an error. After
-  deflate has returned Z_STREAM_END, the only possible operations on the
-  stream are deflateReset or deflateEnd.
-
-    Z_FINISH can be used immediately after deflateInit if all the compression
-  is to be done in a single step. In this case, avail_out must be at least
-  the value returned by deflateBound (see below). If deflate does not return
-  Z_STREAM_END, then it must be called again as described above.
-
-    deflate() sets strm->adler to the adler32 checksum of all input read
-  so far (that is, total_in bytes).
-
-    deflate() may update strm->data_type if it can make a good guess about
-  the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered
-  binary. This field is only for information purposes and does not affect
-  the compression algorithm in any manner.
-
-    deflate() returns Z_OK if some progress has been made (more input
-  processed or more output produced), Z_STREAM_END if all input has been
-  consumed and all output has been produced (only when flush is set to
-  Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
-  if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible
-  (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not
-  fatal, and deflate() can be called again with more input and more output
-  space to continue compressing.
-*/
-
-
-ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
-/*
-     All dynamically allocated data structures for this stream are freed.
-   This function discards any unprocessed input and does not flush any
-   pending output.
-
-     deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
-   stream state was inconsistent, Z_DATA_ERROR if the stream was freed
-   prematurely (some input or output was discarded). In the error case,
-   msg may be set but then points to a static string (which must not be
-   deallocated).
-*/
-
-
-/*
-ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
-
-     Initializes the internal stream state for decompression. The fields
-   next_in, avail_in, zalloc, zfree and opaque must be initialized before by
-   the caller. If next_in is not Z_NULL and avail_in is large enough (the exact
-   value depends on the compression method), inflateInit determines the
-   compression method from the zlib header and allocates all data structures
-   accordingly; otherwise the allocation will be deferred to the first call of
-   inflate.  If zalloc and zfree are set to Z_NULL, inflateInit updates them to
-   use default allocation functions.
-
-     inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
-   version assumed by the caller.  msg is set to null if there is no error
-   message. inflateInit does not perform any decompression apart from reading
-   the zlib header if present: this will be done by inflate().  (So next_in and
-   avail_in may be modified, but next_out and avail_out are unchanged.)
-*/
-
-
-ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
-/*
-    inflate decompresses as much data as possible, and stops when the input
-  buffer becomes empty or the output buffer becomes full. It may introduce
-  some output latency (reading input without producing any output) except when
-  forced to flush.
-
-  The detailed semantics are as follows. inflate performs one or both of the
-  following actions:
-
-  - Decompress more input starting at next_in and update next_in and avail_in
-    accordingly. If not all input can be processed (because there is not
-    enough room in the output buffer), next_in is updated and processing
-    will resume at this point for the next call of inflate().
-
-  - Provide more output starting at next_out and update next_out and avail_out
-    accordingly.  inflate() provides as much output as possible, until there
-    is no more input data or no more space in the output buffer (see below
-    about the flush parameter).
-
-  Before the call of inflate(), the application should ensure that at least
-  one of the actions is possible, by providing more input and/or consuming
-  more output, and updating the next_* and avail_* values accordingly.
-  The application can consume the uncompressed output when it wants, for
-  example when the output buffer is full (avail_out == 0), or after each
-  call of inflate(). If inflate returns Z_OK and with zero avail_out, it
-  must be called again after making room in the output buffer because there
-  might be more output pending.
-
-    The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH,
-  Z_FINISH, or Z_BLOCK. Z_SYNC_FLUSH requests that inflate() flush as much
-  output as possible to the output buffer. Z_BLOCK requests that inflate() stop
-  if and when it gets to the next deflate block boundary. When decoding the
-  zlib or gzip format, this will cause inflate() to return immediately after
-  the header and before the first block. When doing a raw inflate, inflate()
-  will go ahead and process the first block, and will return when it gets to
-  the end of that block, or when it runs out of data.
-
-    The Z_BLOCK option assists in appending to or combining deflate streams.
-  Also to assist in this, on return inflate() will set strm->data_type to the
-  number of unused bits in the last byte taken from strm->next_in, plus 64
-  if inflate() is currently decoding the last block in the deflate stream,
-  plus 128 if inflate() returned immediately after decoding an end-of-block
-  code or decoding the complete header up to just before the first byte of the
-  deflate stream. The end-of-block will not be indicated until all of the
-  uncompressed data from that block has been written to strm->next_out.  The
-  number of unused bits may in general be greater than seven, except when
-  bit 7 of data_type is set, in which case the number of unused bits will be
-  less than eight.
-
-    inflate() should normally be called until it returns Z_STREAM_END or an
-  error. However if all decompression is to be performed in a single step
-  (a single call of inflate), the parameter flush should be set to
-  Z_FINISH. In this case all pending input is processed and all pending
-  output is flushed; avail_out must be large enough to hold all the
-  uncompressed data. (The size of the uncompressed data may have been saved
-  by the compressor for this purpose.) The next operation on this stream must
-  be inflateEnd to deallocate the decompression state. The use of Z_FINISH
-  is never required, but can be used to inform inflate that a faster approach
-  may be used for the single inflate() call.
-
-     In this implementation, inflate() always flushes as much output as
-  possible to the output buffer, and always uses the faster approach on the
-  first call. So the only effect of the flush parameter in this implementation
-  is on the return value of inflate(), as noted below, or when it returns early
-  because Z_BLOCK is used.
-
-     If a preset dictionary is needed after this call (see inflateSetDictionary
-  below), inflate sets strm->adler to the adler32 checksum of the dictionary
-  chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
-  strm->adler to the adler32 checksum of all output produced so far (that is,
-  total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
-  below. At the end of the stream, inflate() checks that its computed adler32
-  checksum is equal to that saved by the compressor and returns Z_STREAM_END
-  only if the checksum is correct.
-
-    inflate() will decompress and check either zlib-wrapped or gzip-wrapped
-  deflate data.  The header type is detected automatically.  Any information
-  contained in the gzip header is not retained, so applications that need that
-  information should instead use raw inflate, see inflateInit2() below, or
-  inflateBack() and perform their own processing of the gzip header and
-  trailer.
-
-    inflate() returns Z_OK if some progress has been made (more input processed
-  or more output produced), Z_STREAM_END if the end of the compressed data has
-  been reached and all uncompressed output has been produced, Z_NEED_DICT if a
-  preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
-  corrupted (input stream not conforming to the zlib format or incorrect check
-  value), Z_STREAM_ERROR if the stream structure was inconsistent (for example
-  if next_in or next_out was NULL), Z_MEM_ERROR if there was not enough memory,
-  Z_BUF_ERROR if no progress is possible or if there was not enough room in the
-  output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and
-  inflate() can be called again with more input and more output space to
-  continue decompressing. If Z_DATA_ERROR is returned, the application may then
-  call inflateSync() to look for a good compression block if a partial recovery
-  of the data is desired.
-*/
-
-
-ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
-/*
-     All dynamically allocated data structures for this stream are freed.
-   This function discards any unprocessed input and does not flush any
-   pending output.
-
-     inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
-   was inconsistent. In the error case, msg may be set but then points to a
-   static string (which must not be deallocated).
-*/
-
-                        /* Advanced functions */
-
-/*
-    The following functions are needed only in some special applications.
-*/
-
-/*
-ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
-                                     int  level,
-                                     int  method,
-                                     int  windowBits,
-                                     int  memLevel,
-                                     int  strategy));
-
-     This is another version of deflateInit with more compression options. The
-   fields next_in, zalloc, zfree and opaque must be initialized before by
-   the caller.
-
-     The method parameter is the compression method. It must be Z_DEFLATED in
-   this version of the library.
-
-     The windowBits parameter is the base two logarithm of the window size
-   (the size of the history buffer). It should be in the range 8..15 for this
-   version of the library. Larger values of this parameter result in better
-   compression at the expense of memory usage. The default value is 15 if
-   deflateInit is used instead.
-
-     windowBits can also be -8..-15 for raw deflate. In this case, -windowBits
-   determines the window size. deflate() will then generate raw deflate data
-   with no zlib header or trailer, and will not compute an adler32 check value.
-
-     windowBits can also be greater than 15 for optional gzip encoding. Add
-   16 to windowBits to write a simple gzip header and trailer around the
-   compressed data instead of a zlib wrapper. The gzip header will have no
-   file name, no extra data, no comment, no modification time (set to zero),
-   no header crc, and the operating system will be set to 255 (unknown).  If a
-   gzip stream is being written, strm->adler is a crc32 instead of an adler32.
-
-     The memLevel parameter specifies how much memory should be allocated
-   for the internal compression state. memLevel=1 uses minimum memory but
-   is slow and reduces compression ratio; memLevel=9 uses maximum memory
-   for optimal speed. The default value is 8. See zconf.h for total memory
-   usage as a function of windowBits and memLevel.
-
-     The strategy parameter is used to tune the compression algorithm. Use the
-   value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
-   filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no
-   string match), or Z_RLE to limit match distances to one (run-length
-   encoding). Filtered data consists mostly of small values with a somewhat
-   random distribution. In this case, the compression algorithm is tuned to
-   compress them better. The effect of Z_FILTERED is to force more Huffman
-   coding and less string matching; it is somewhat intermediate between
-   Z_DEFAULT and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as fast as
-   Z_HUFFMAN_ONLY, but give better compression for PNG image data. The strategy
-   parameter only affects the compression ratio but not the correctness of the
-   compressed output even if it is not set appropriately.  Z_FIXED prevents the
-   use of dynamic Huffman codes, allowing for a simpler decoder for special
-   applications.
-
-      deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid
-   method). msg is set to null if there is no error message.  deflateInit2 does
-   not perform any compression: this will be done by deflate().
-*/
-
-ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
-                                             const Bytef *dictionary,
-                                             uInt  dictLength));
-/*
-     Initializes the compression dictionary from the given byte sequence
-   without producing any compressed output. This function must be called
-   immediately after deflateInit, deflateInit2 or deflateReset, before any
-   call of deflate. The compressor and decompressor must use exactly the same
-   dictionary (see inflateSetDictionary).
-
-     The dictionary should consist of strings (byte sequences) that are likely
-   to be encountered later in the data to be compressed, with the most commonly
-   used strings preferably put towards the end of the dictionary. Using a
-   dictionary is most useful when the data to be compressed is short and can be
-   predicted with good accuracy; the data can then be compressed better than
-   with the default empty dictionary.
-
-     Depending on the size of the compression data structures selected by
-   deflateInit or deflateInit2, a part of the dictionary may in effect be
-   discarded, for example if the dictionary is larger than the window size in
-   deflate or deflate2. Thus the strings most likely to be useful should be
-   put at the end of the dictionary, not at the front. In addition, the
-   current implementation of deflate will use at most the window size minus
-   262 bytes of the provided dictionary.
-
-     Upon return of this function, strm->adler is set to the adler32 value
-   of the dictionary; the decompressor may later use this value to determine
-   which dictionary has been used by the compressor. (The adler32 value
-   applies to the whole dictionary even if only a subset of the dictionary is
-   actually used by the compressor.) If a raw deflate was requested, then the
-   adler32 value is not computed and strm->adler is not set.
-
-     deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
-   parameter is invalid (such as NULL dictionary) or the stream state is
-   inconsistent (for example if deflate has already been called for this stream
-   or if the compression method is bsort). deflateSetDictionary does not
-   perform any compression: this will be done by deflate().
-*/
-
-ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
-                                    z_streamp source));
-/*
-     Sets the destination stream as a complete copy of the source stream.
-
-     This function can be useful when several compression strategies will be
-   tried, for example when there are several ways of pre-processing the input
-   data with a filter. The streams that will be discarded should then be freed
-   by calling deflateEnd.  Note that deflateCopy duplicates the internal
-   compression state which can be quite large, so this strategy is slow and
-   can consume lots of memory.
-
-     deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
-   (such as zalloc being NULL). msg is left unchanged in both source and
-   destination.
-*/
-
-ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
-/*
-     This function is equivalent to deflateEnd followed by deflateInit,
-   but does not free and reallocate all the internal compression state.
-   The stream will keep the same compression level and any other attributes
-   that may have been set by deflateInit2.
-
-      deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent (such as zalloc or state being NULL).
-*/
-
-ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
-                                      int level,
-                                      int strategy));
-/*
-     Dynamically update the compression level and compression strategy.  The
-   interpretation of level and strategy is as in deflateInit2.  This can be
-   used to switch between compression and straight copy of the input data, or
-   to switch to a different kind of input data requiring a different
-   strategy. If the compression level is changed, the input available so far
-   is compressed with the old level (and may be flushed); the new level will
-   take effect only at the next call of deflate().
-
-     Before the call of deflateParams, the stream state must be set as for
-   a call of deflate(), since the currently available input may have to
-   be compressed and flushed. In particular, strm->avail_out must be non-zero.
-
-     deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
-   stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR
-   if strm->avail_out was zero.
-*/
-
-ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm,
-                                    int good_length,
-                                    int max_lazy,
-                                    int nice_length,
-                                    int max_chain));
-/*
-     Fine tune deflate's internal compression parameters.  This should only be
-   used by someone who understands the algorithm used by zlib's deflate for
-   searching for the best matching string, and even then only by the most
-   fanatic optimizer trying to squeeze out the last compressed bit for their
-   specific input data.  Read the deflate.c source code for the meaning of the
-   max_lazy, good_length, nice_length, and max_chain parameters.
-
-     deflateTune() can be called after deflateInit() or deflateInit2(), and
-   returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
- */
-
-ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
-                                       uLong sourceLen));
-/*
-     deflateBound() returns an upper bound on the compressed size after
-   deflation of sourceLen bytes.  It must be called after deflateInit()
-   or deflateInit2().  This would be used to allocate an output buffer
-   for deflation in a single pass, and so would be called before deflate().
-*/
-
-ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
-                                     int bits,
-                                     int value));
-/*
-     deflatePrime() inserts bits in the deflate output stream.  The intent
-  is that this function is used to start off the deflate output with the
-  bits leftover from a previous deflate stream when appending to it.  As such,
-  this function can only be used for raw deflate, and must be used before the
-  first deflate() call after a deflateInit2() or deflateReset().  bits must be
-  less than or equal to 16, and that many of the least significant bits of
-  value will be inserted in the output.
-
-      deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent.
-*/
-
-ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
-                                         gz_headerp head));
-/*
-      deflateSetHeader() provides gzip header information for when a gzip
-   stream is requested by deflateInit2().  deflateSetHeader() may be called
-   after deflateInit2() or deflateReset() and before the first call of
-   deflate().  The text, time, os, extra field, name, and comment information
-   in the provided gz_header structure are written to the gzip header (xflag is
-   ignored -- the extra flags are set according to the compression level).  The
-   caller must assure that, if not Z_NULL, name and comment are terminated with
-   a zero byte, and that if extra is not Z_NULL, that extra_len bytes are
-   available there.  If hcrc is true, a gzip header crc is included.  Note that
-   the current versions of the command-line version of gzip (up through version
-   1.3.x) do not support header crc's, and will report that it is a "multi-part
-   gzip file" and give up.
-
-      If deflateSetHeader is not used, the default gzip header has text false,
-   the time set to zero, and os set to 255, with no extra, name, or comment
-   fields.  The gzip header is returned to the default state by deflateReset().
-
-      deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent.
-*/
-
-/*
-ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
-                                     int  windowBits));
-
-     This is another version of inflateInit with an extra parameter. The
-   fields next_in, avail_in, zalloc, zfree and opaque must be initialized
-   before by the caller.
-
-     The windowBits parameter is the base two logarithm of the maximum window
-   size (the size of the history buffer).  It should be in the range 8..15 for
-   this version of the library. The default value is 15 if inflateInit is used
-   instead. windowBits must be greater than or equal to the windowBits value
-   provided to deflateInit2() while compressing, or it must be equal to 15 if
-   deflateInit2() was not used. If a compressed stream with a larger window
-   size is given as input, inflate() will return with the error code
-   Z_DATA_ERROR instead of trying to allocate a larger window.
-
-     windowBits can also be -8..-15 for raw inflate. In this case, -windowBits
-   determines the window size. inflate() will then process raw deflate data,
-   not looking for a zlib or gzip header, not generating a check value, and not
-   looking for any check values for comparison at the end of the stream. This
-   is for use with other formats that use the deflate compressed data format
-   such as zip.  Those formats provide their own check values. If a custom
-   format is developed using the raw deflate format for compressed data, it is
-   recommended that a check value such as an adler32 or a crc32 be applied to
-   the uncompressed data as is done in the zlib, gzip, and zip formats.  For
-   most applications, the zlib format should be used as is. Note that comments
-   above on the use in deflateInit2() applies to the magnitude of windowBits.
-
-     windowBits can also be greater than 15 for optional gzip decoding. Add
-   32 to windowBits to enable zlib and gzip decoding with automatic header
-   detection, or add 16 to decode only the gzip format (the zlib format will
-   return a Z_DATA_ERROR).  If a gzip stream is being decoded, strm->adler is
-   a crc32 instead of an adler32.
-
-     inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_STREAM_ERROR if a parameter is invalid (such as a null strm). msg
-   is set to null if there is no error message.  inflateInit2 does not perform
-   any decompression apart from reading the zlib header if present: this will
-   be done by inflate(). (So next_in and avail_in may be modified, but next_out
-   and avail_out are unchanged.)
-*/
-
-ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
-                                             const Bytef *dictionary,
-                                             uInt  dictLength));
-/*
-     Initializes the decompression dictionary from the given uncompressed byte
-   sequence. This function must be called immediately after a call of inflate,
-   if that call returned Z_NEED_DICT. The dictionary chosen by the compressor
-   can be determined from the adler32 value returned by that call of inflate.
-   The compressor and decompressor must use exactly the same dictionary (see
-   deflateSetDictionary).  For raw inflate, this function can be called
-   immediately after inflateInit2() or inflateReset() and before any call of
-   inflate() to set the dictionary.  The application must insure that the
-   dictionary that was used for compression is provided.
-
-     inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
-   parameter is invalid (such as NULL dictionary) or the stream state is
-   inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
-   expected one (incorrect adler32 value). inflateSetDictionary does not
-   perform any decompression: this will be done by subsequent calls of
-   inflate().
-*/
-
-ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
-/*
-    Skips invalid compressed data until a full flush point (see above the
-  description of deflate with Z_FULL_FLUSH) can be found, or until all
-  available input is skipped. No output is provided.
-
-    inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR
-  if no more input was provided, Z_DATA_ERROR if no flush point has been found,
-  or Z_STREAM_ERROR if the stream structure was inconsistent. In the success
-  case, the application may save the current current value of total_in which
-  indicates where valid compressed data was found. In the error case, the
-  application may repeatedly call inflateSync, providing more input each time,
-  until success or end of the input data.
-*/
-
-ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
-                                    z_streamp source));
-/*
-     Sets the destination stream as a complete copy of the source stream.
-
-     This function can be useful when randomly accessing a large stream.  The
-   first pass through the stream can periodically record the inflate state,
-   allowing restarting inflate at those points when randomly accessing the
-   stream.
-
-     inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
-   (such as zalloc being NULL). msg is left unchanged in both source and
-   destination.
-*/
-
-ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
-/*
-     This function is equivalent to inflateEnd followed by inflateInit,
-   but does not free and reallocate all the internal decompression state.
-   The stream will keep attributes that may have been set by inflateInit2.
-
-      inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent (such as zalloc or state being NULL).
-*/
-
-ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
-                                     int bits,
-                                     int value));
-/*
-     This function inserts bits in the inflate input stream.  The intent is
-  that this function is used to start inflating at a bit position in the
-  middle of a byte.  The provided bits will be used before any bytes are used
-  from next_in.  This function should only be used with raw inflate, and
-  should be used before the first inflate() call after inflateInit2() or
-  inflateReset().  bits must be less than or equal to 16, and that many of the
-  least significant bits of value will be inserted in the input.
-
-      inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent.
-*/
-
-ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
-                                         gz_headerp head));
-/*
-      inflateGetHeader() requests that gzip header information be stored in the
-   provided gz_header structure.  inflateGetHeader() may be called after
-   inflateInit2() or inflateReset(), and before the first call of inflate().
-   As inflate() processes the gzip stream, head->done is zero until the header
-   is completed, at which time head->done is set to one.  If a zlib stream is
-   being decoded, then head->done is set to -1 to indicate that there will be
-   no gzip header information forthcoming.  Note that Z_BLOCK can be used to
-   force inflate() to return immediately after header processing is complete
-   and before any actual data is decompressed.
-
-      The text, time, xflags, and os fields are filled in with the gzip header
-   contents.  hcrc is set to true if there is a header CRC.  (The header CRC
-   was valid if done is set to one.)  If extra is not Z_NULL, then extra_max
-   contains the maximum number of bytes to write to extra.  Once done is true,
-   extra_len contains the actual extra field length, and extra contains the
-   extra field, or that field truncated if extra_max is less than extra_len.
-   If name is not Z_NULL, then up to name_max characters are written there,
-   terminated with a zero unless the length is greater than name_max.  If
-   comment is not Z_NULL, then up to comm_max characters are written there,
-   terminated with a zero unless the length is greater than comm_max.  When
-   any of extra, name, or comment are not Z_NULL and the respective field is
-   not present in the header, then that field is set to Z_NULL to signal its
-   absence.  This allows the use of deflateSetHeader() with the returned
-   structure to duplicate the header.  However if those fields are set to
-   allocated memory, then the application will need to save those pointers
-   elsewhere so that they can be eventually freed.
-
-      If inflateGetHeader is not used, then the header information is simply
-   discarded.  The header is always checked for validity, including the header
-   CRC if present.  inflateReset() will reset the process to discard the header
-   information.  The application would need to call inflateGetHeader() again to
-   retrieve the header from the next gzip stream.
-
-      inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent.
-*/
-
-/*
-ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
-                                        unsigned char FAR *window));
-
-     Initialize the internal stream state for decompression using inflateBack()
-   calls.  The fields zalloc, zfree and opaque in strm must be initialized
-   before the call.  If zalloc and zfree are Z_NULL, then the default library-
-   derived memory allocation routines are used.  windowBits is the base two
-   logarithm of the window size, in the range 8..15.  window is a caller
-   supplied buffer of that size.  Except for special applications where it is
-   assured that deflate was used with small window sizes, windowBits must be 15
-   and a 32K byte window must be supplied to be able to decompress general
-   deflate streams.
-
-     See inflateBack() for the usage of these routines.
-
-     inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
-   the paramaters are invalid, Z_MEM_ERROR if the internal state could not
-   be allocated, or Z_VERSION_ERROR if the version of the library does not
-   match the version of the header file.
-*/
-
-typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *));
-typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
-
-ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
-                                    in_func in, void FAR *in_desc,
-                                    out_func out, void FAR *out_desc));
-/*
-     inflateBack() does a raw inflate with a single call using a call-back
-   interface for input and output.  This is more efficient than inflate() for
-   file i/o applications in that it avoids copying between the output and the
-   sliding window by simply making the window itself the output buffer.  This
-   function trusts the application to not change the output buffer passed by
-   the output function, at least until inflateBack() returns.
-
-     inflateBackInit() must be called first to allocate the internal state
-   and to initialize the state with the user-provided window buffer.
-   inflateBack() may then be used multiple times to inflate a complete, raw
-   deflate stream with each call.  inflateBackEnd() is then called to free
-   the allocated state.
-
-     A raw deflate stream is one with no zlib or gzip header or trailer.
-   This routine would normally be used in a utility that reads zip or gzip
-   files and writes out uncompressed files.  The utility would decode the
-   header and process the trailer on its own, hence this routine expects
-   only the raw deflate stream to decompress.  This is different from the
-   normal behavior of inflate(), which expects either a zlib or gzip header and
-   trailer around the deflate stream.
-
-     inflateBack() uses two subroutines supplied by the caller that are then
-   called by inflateBack() for input and output.  inflateBack() calls those
-   routines until it reads a complete deflate stream and writes out all of the
-   uncompressed data, or until it encounters an error.  The function's
-   parameters and return types are defined above in the in_func and out_func
-   typedefs.  inflateBack() will call in(in_desc, &buf) which should return the
-   number of bytes of provided input, and a pointer to that input in buf.  If
-   there is no input available, in() must return zero--buf is ignored in that
-   case--and inflateBack() will return a buffer error.  inflateBack() will call
-   out(out_desc, buf, len) to write the uncompressed data buf[0..len-1].  out()
-   should return zero on success, or non-zero on failure.  If out() returns
-   non-zero, inflateBack() will return with an error.  Neither in() nor out()
-   are permitted to change the contents of the window provided to
-   inflateBackInit(), which is also the buffer that out() uses to write from.
-   The length written by out() will be at most the window size.  Any non-zero
-   amount of input may be provided by in().
-
-     For convenience, inflateBack() can be provided input on the first call by
-   setting strm->next_in and strm->avail_in.  If that input is exhausted, then
-   in() will be called.  Therefore strm->next_in must be initialized before
-   calling inflateBack().  If strm->next_in is Z_NULL, then in() will be called
-   immediately for input.  If strm->next_in is not Z_NULL, then strm->avail_in
-   must also be initialized, and then if strm->avail_in is not zero, input will
-   initially be taken from strm->next_in[0 .. strm->avail_in - 1].
-
-     The in_desc and out_desc parameters of inflateBack() is passed as the
-   first parameter of in() and out() respectively when they are called.  These
-   descriptors can be optionally used to pass any information that the caller-
-   supplied in() and out() functions need to do their job.
-
-     On return, inflateBack() will set strm->next_in and strm->avail_in to
-   pass back any unused input that was provided by the last in() call.  The
-   return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR
-   if in() or out() returned an error, Z_DATA_ERROR if there was a format
-   error in the deflate stream (in which case strm->msg is set to indicate the
-   nature of the error), or Z_STREAM_ERROR if the stream was not properly
-   initialized.  In the case of Z_BUF_ERROR, an input or output error can be
-   distinguished using strm->next_in which will be Z_NULL only if in() returned
-   an error.  If strm->next is not Z_NULL, then the Z_BUF_ERROR was due to
-   out() returning non-zero.  (in() will always be called before out(), so
-   strm->next_in is assured to be defined if out() returns non-zero.)  Note
-   that inflateBack() cannot return Z_OK.
-*/
-
-ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm));
-/*
-     All memory allocated by inflateBackInit() is freed.
-
-     inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream
-   state was inconsistent.
-*/
-
-ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
-/* Return flags indicating compile-time options.
-
-    Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other:
-     1.0: size of uInt
-     3.2: size of uLong
-     5.4: size of voidpf (pointer)
-     7.6: size of z_off_t
-
-    Compiler, assembler, and debug options:
-     8: DEBUG
-     9: ASMV or ASMINF -- use ASM code
-     10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention
-     11: 0 (reserved)
-
-    One-time table building (smaller code, but not thread-safe if true):
-     12: BUILDFIXED -- build static block decoding tables when needed
-     13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed
-     14,15: 0 (reserved)
-
-    Library content (indicates missing functionality):
-     16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking
-                          deflate code when not needed)
-     17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect
-                    and decode gzip streams (to avoid linking crc code)
-     18-19: 0 (reserved)
-
-    Operation variations (changes in library functionality):
-     20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate
-     21: FASTEST -- deflate algorithm with only one, lowest compression level
-     22,23: 0 (reserved)
-
-    The sprintf variant used by gzprintf (zero is best):
-     24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format
-     25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure!
-     26: 0 = returns value, 1 = void -- 1 means inferred string length returned
-
-    Remainder:
-     27-31: 0 (reserved)
- */
-
-
-                        /* utility functions */
-
-/*
-     The following utility functions are implemented on top of the
-   basic stream-oriented functions. To simplify the interface, some
-   default options are assumed (compression level and memory usage,
-   standard memory allocation functions). The source code of these
-   utility functions can easily be modified if you need special options.
-*/
-
-ZEXTERN int ZEXPORT compress OF((Bytef *dest,   uLongf *destLen,
-                                 const Bytef *source, uLong sourceLen));
-/*
-     Compresses the source buffer into the destination buffer.  sourceLen is
-   the byte length of the source buffer. Upon entry, destLen is the total
-   size of the destination buffer, which must be at least the value returned
-   by compressBound(sourceLen). Upon exit, destLen is the actual size of the
-   compressed buffer.
-     This function can be used to compress a whole file at once if the
-   input file is mmap'ed.
-     compress returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_BUF_ERROR if there was not enough room in the output
-   buffer.
-*/
-
-ZEXTERN int ZEXPORT compress2 OF((Bytef *dest,   uLongf *destLen,
-                                  const Bytef *source, uLong sourceLen,
-                                  int level));
-/*
-     Compresses the source buffer into the destination buffer. The level
-   parameter has the same meaning as in deflateInit.  sourceLen is the byte
-   length of the source buffer. Upon entry, destLen is the total size of the
-   destination buffer, which must be at least the value returned by
-   compressBound(sourceLen). Upon exit, destLen is the actual size of the
-   compressed buffer.
-
-     compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_BUF_ERROR if there was not enough room in the output buffer,
-   Z_STREAM_ERROR if the level parameter is invalid.
-*/
-
-ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen));
-/*
-     compressBound() returns an upper bound on the compressed size after
-   compress() or compress2() on sourceLen bytes.  It would be used before
-   a compress() or compress2() call to allocate the destination buffer.
-*/
-
-ZEXTERN int ZEXPORT uncompress OF((Bytef *dest,   uLongf *destLen,
-                                   const Bytef *source, uLong sourceLen));
-/*
-     Decompresses the source buffer into the destination buffer.  sourceLen is
-   the byte length of the source buffer. Upon entry, destLen is the total
-   size of the destination buffer, which must be large enough to hold the
-   entire uncompressed data. (The size of the uncompressed data must have
-   been saved previously by the compressor and transmitted to the decompressor
-   by some mechanism outside the scope of this compression library.)
-   Upon exit, destLen is the actual size of the compressed buffer.
-     This function can be used to decompress a whole file at once if the
-   input file is mmap'ed.
-
-     uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_BUF_ERROR if there was not enough room in the output
-   buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.
-*/
-
-
-typedef voidp gzFile;
-
-ZEXTERN gzFile ZEXPORT gzopen  OF((const char *path, const char *mode));
-/*
-     Opens a gzip (.gz) file for reading or writing. The mode parameter
-   is as in fopen ("rb" or "wb") but can also include a compression level
-   ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for
-   Huffman only compression as in "wb1h", or 'R' for run-length encoding
-   as in "wb1R". (See the description of deflateInit2 for more information
-   about the strategy parameter.)
-
-     gzopen can be used to read a file which is not in gzip format; in this
-   case gzread will directly read from the file without decompression.
-
-     gzopen returns NULL if the file could not be opened or if there was
-   insufficient memory to allocate the (de)compression state; errno
-   can be checked to distinguish the two cases (if errno is zero, the
-   zlib error is Z_MEM_ERROR).  */
-
-ZEXTERN gzFile ZEXPORT gzdopen  OF((int fd, const char *mode));
-/*
-     gzdopen() associates a gzFile with the file descriptor fd.  File
-   descriptors are obtained from calls like open, dup, creat, pipe or
-   fileno (in the file has been previously opened with fopen).
-   The mode parameter is as in gzopen.
-     The next call of gzclose on the returned gzFile will also close the
-   file descriptor fd, just like fclose(fdopen(fd), mode) closes the file
-   descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode).
-     gzdopen returns NULL if there was insufficient memory to allocate
-   the (de)compression state.
-*/
-
-ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
-/*
-     Dynamically update the compression level or strategy. See the description
-   of deflateInit2 for the meaning of these parameters.
-     gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not
-   opened for writing.
-*/
-
-ZEXTERN int ZEXPORT    gzread  OF((gzFile file, voidp buf, unsigned len));
-/*
-     Reads the given number of uncompressed bytes from the compressed file.
-   If the input file was not in gzip format, gzread copies the given number
-   of bytes into the buffer.
-     gzread returns the number of uncompressed bytes actually read (0 for
-   end of file, -1 for error). */
-
-ZEXTERN int ZEXPORT    gzwrite OF((gzFile file,
-                                   voidpc buf, unsigned len));
-/*
-     Writes the given number of uncompressed bytes into the compressed file.
-   gzwrite returns the number of uncompressed bytes actually written
-   (0 in case of error).
-*/
-
-ZEXTERN int ZEXPORTVA   gzprintf OF((gzFile file, const char *format, ...));
-/*
-     Converts, formats, and writes the args to the compressed file under
-   control of the format string, as in fprintf. gzprintf returns the number of
-   uncompressed bytes actually written (0 in case of error).  The number of
-   uncompressed bytes written is limited to 4095. The caller should assure that
-   this limit is not exceeded. If it is exceeded, then gzprintf() will return
-   return an error (0) with nothing written. In this case, there may also be a
-   buffer overflow with unpredictable consequences, which is possible only if
-   zlib was compiled with the insecure functions sprintf() or vsprintf()
-   because the secure snprintf() or vsnprintf() functions were not available.
-*/
-
-ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
-/*
-      Writes the given null-terminated string to the compressed file, excluding
-   the terminating null character.
-      gzputs returns the number of characters written, or -1 in case of error.
-*/
-
-ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
-/*
-      Reads bytes from the compressed file until len-1 characters are read, or
-   a newline character is read and transferred to buf, or an end-of-file
-   condition is encountered.  The string is then terminated with a null
-   character.
-      gzgets returns buf, or Z_NULL in case of error.
-*/
-
-ZEXTERN int ZEXPORT    gzputc OF((gzFile file, int c));
-/*
-      Writes c, converted to an unsigned char, into the compressed file.
-   gzputc returns the value that was written, or -1 in case of error.
-*/
-
-ZEXTERN int ZEXPORT    gzgetc OF((gzFile file));
-/*
-      Reads one byte from the compressed file. gzgetc returns this byte
-   or -1 in case of end of file or error.
-*/
-
-ZEXTERN int ZEXPORT    gzungetc OF((int c, gzFile file));
-/*
-      Push one character back onto the stream to be read again later.
-   Only one character of push-back is allowed.  gzungetc() returns the
-   character pushed, or -1 on failure.  gzungetc() will fail if a
-   character has been pushed but not read yet, or if c is -1. The pushed
-   character will be discarded if the stream is repositioned with gzseek()
-   or gzrewind().
-*/
-
-ZEXTERN int ZEXPORT    gzflush OF((gzFile file, int flush));
-/*
-     Flushes all pending output into the compressed file. The parameter
-   flush is as in the deflate() function. The return value is the zlib
-   error number (see function gzerror below). gzflush returns Z_OK if
-   the flush parameter is Z_FINISH and all output could be flushed.
-     gzflush should be called only when strictly necessary because it can
-   degrade compression.
-*/
-
-ZEXTERN z_off_t ZEXPORT    gzseek OF((gzFile file,
-                                      z_off_t offset, int whence));
-/*
-      Sets the starting position for the next gzread or gzwrite on the
-   given compressed file. The offset represents a number of bytes in the
-   uncompressed data stream. The whence parameter is defined as in lseek(2);
-   the value SEEK_END is not supported.
-     If the file is opened for reading, this function is emulated but can be
-   extremely slow. If the file is opened for writing, only forward seeks are
-   supported; gzseek then compresses a sequence of zeroes up to the new
-   starting position.
-
-      gzseek returns the resulting offset location as measured in bytes from
-   the beginning of the uncompressed stream, or -1 in case of error, in
-   particular if the file is opened for writing and the new starting position
-   would be before the current position.
-*/
-
-ZEXTERN int ZEXPORT    gzrewind OF((gzFile file));
-/*
-     Rewinds the given file. This function is supported only for reading.
-
-   gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
-*/
-
-ZEXTERN z_off_t ZEXPORT    gztell OF((gzFile file));
-/*
-     Returns the starting position for the next gzread or gzwrite on the
-   given compressed file. This position represents a number of bytes in the
-   uncompressed data stream.
-
-   gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
-*/
-
-ZEXTERN int ZEXPORT gzeof OF((gzFile file));
-/*
-     Returns 1 when EOF has previously been detected reading the given
-   input stream, otherwise zero.
-*/
-
-ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
-/*
-     Returns 1 if file is being read directly without decompression, otherwise
-   zero.
-*/
-
-ZEXTERN int ZEXPORT    gzclose OF((gzFile file));
-/*
-     Flushes all pending output if necessary, closes the compressed file
-   and deallocates all the (de)compression state. The return value is the zlib
-   error number (see function gzerror below).
-*/
-
-ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
-/*
-     Returns the error message for the last error which occurred on the
-   given compressed file. errnum is set to zlib error number. If an
-   error occurred in the file system and not in the compression library,
-   errnum is set to Z_ERRNO and the application may consult errno
-   to get the exact error code.
-*/
-
-ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
-/*
-     Clears the error and end-of-file flags for file. This is analogous to the
-   clearerr() function in stdio. This is useful for continuing to read a gzip
-   file that is being written concurrently.
-*/
-
-                        /* checksum functions */
-
-/*
-     These functions are not related to compression but are exported
-   anyway because they might be useful in applications using the
-   compression library.
-*/
-
-ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
-/*
-     Update a running Adler-32 checksum with the bytes buf[0..len-1] and
-   return the updated checksum. If buf is NULL, this function returns
-   the required initial value for the checksum.
-   An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
-   much faster. Usage example:
-
-     uLong adler = adler32(0L, Z_NULL, 0);
-
-     while (read_buffer(buffer, length) != EOF) {
-       adler = adler32(adler, buffer, length);
-     }
-     if (adler != original_adler) error();
-*/
-
-ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
-                                          z_off_t len2));
-/*
-     Combine two Adler-32 checksums into one.  For two sequences of bytes, seq1
-   and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
-   each, adler1 and adler2.  adler32_combine() returns the Adler-32 checksum of
-   seq1 and seq2 concatenated, requiring only adler1, adler2, and len2.
-*/
-
-ZEXTERN uLong ZEXPORT crc32   OF((uLong crc, const Bytef *buf, uInt len));
-/*
-     Update a running CRC-32 with the bytes buf[0..len-1] and return the
-   updated CRC-32. If buf is NULL, this function returns the required initial
-   value for the for the crc. Pre- and post-conditioning (one's complement) is
-   performed within this function so it shouldn't be done by the application.
-   Usage example:
-
-     uLong crc = crc32(0L, Z_NULL, 0);
-
-     while (read_buffer(buffer, length) != EOF) {
-       crc = crc32(crc, buffer, length);
-     }
-     if (crc != original_crc) error();
-*/
-
-ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
-
-/*
-     Combine two CRC-32 check values into one.  For two sequences of bytes,
-   seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
-   calculated for each, crc1 and crc2.  crc32_combine() returns the CRC-32
-   check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and
-   len2.
-*/
-
-
-                        /* various hacks, don't look :) */
-
-/* deflateInit and inflateInit are macros to allow checking the zlib version
- * and the compiler's view of z_stream:
- */
-ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
-                                     const char *version, int stream_size));
-ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
-                                     const char *version, int stream_size));
-ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int  level, int  method,
-                                      int windowBits, int memLevel,
-                                      int strategy, const char *version,
-                                      int stream_size));
-ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int  windowBits,
-                                      const char *version, int stream_size));
-ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
-                                         unsigned char FAR *window,
-                                         const char *version,
-                                         int stream_size));
-#define deflateInit(strm, level) \
-        deflateInit_((strm), (level),       ZLIB_VERSION, sizeof(z_stream))
-#define inflateInit(strm) \
-        inflateInit_((strm),                ZLIB_VERSION, sizeof(z_stream))
-#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
-        deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
-                      (strategy),           ZLIB_VERSION, sizeof(z_stream))
-#define inflateInit2(strm, windowBits) \
-        inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
-#define inflateBackInit(strm, windowBits, window) \
-        inflateBackInit_((strm), (windowBits), (window), \
-        ZLIB_VERSION, sizeof(z_stream))
-
-
-#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
-    struct internal_state {int dummy;}; /* hack for buggy compilers */
-#endif
-
-ZEXTERN const char   * ZEXPORT zError           OF((int));
-ZEXTERN int            ZEXPORT inflateSyncPoint OF((z_streamp z));
-ZEXTERN const uLongf * ZEXPORT get_crc_table    OF((void));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ZLIB_H */

-- 
gpac packaging



More information about the pkg-multimedia-commits mailing list