#include <boost/filesystem.hpp>
#include <boost/algorithm/string.hpp>
#include <stdexcept>
-#include <sstream>
#include <iostream>
#include <iomanip>
using std::string;
using std::wstring;
using std::cout;
-using std::stringstream;
using std::min;
using std::max;
using std::list;
if (xmlSecCryptoInit() < 0) {
throw MiscError ("could not initialise xmlsec-crypto");
}
-}
-bool dcp::operator== (dcp::Size const & a, dcp::Size const & b)
-{
- return (a.width == b.width && a.height == b.height);
-}
-
-bool dcp::operator!= (dcp::Size const & a, dcp::Size const & b)
-{
- return !(a == b);
-}
-
-ostream& dcp::operator<< (ostream& s, dcp::Size const & a)
-{
- s << a.width << "x" << a.height;
- return s;
+ OpenSSL_add_all_algorithms();
}
/** Decode a base64 string. The base64 decode routine in KM_util.cpp
{
uintmax_t len = boost::filesystem::file_size (p);
if (len > max_length) {
- throw MiscError ("Unexpectedly long file");
+ throw MiscError (String::compose ("Unexpectedly long file (%1)", p.string()));
}
FILE* f = fopen_boost (p, "r");