#include "lib/config.h"
#include "lib/exceptions.h"
#include "lib/emailer.h"
-#include <locked_sstream.h>
#include <dcp/certificate.h>
#include <getopt.h>
#include <iostream>
static boost::posix_time::time_duration
duration_from_string (string d)
{
- locked_stringstream s (d);
int N;
- string unit;
- s >> N >> unit;
+ char unit_buf[64] = "\0";
+ sscanf (d.c_str(), "%d %64s", &N, unit_buf);
+ string const unit (unit_buf);
if (N == 0) {
cerr << "Could not understand duration \"" << d << "\"\n";
output = ".";
}
- NameFormat::Map values;
- values["film_name"] = film->name();
- values["from"] = dcp::LocalTime(valid_from.get()).date() + " " + dcp::LocalTime(valid_from.get()).time_of_day();
- values["to"] = dcp::LocalTime(valid_to.get()).date() + " " + dcp::LocalTime(valid_to.get()).time_of_day();
+ dcp::NameFormat::Map values;
+ values['f'] = film->name();
+ values['b'] = dcp::LocalTime(valid_from.get()).date() + " " + dcp::LocalTime(valid_from.get()).time_of_day();
+ values['e'] = dcp::LocalTime(valid_to.get()).date() + " " + dcp::LocalTime(valid_to.get()).time_of_day();
try {
list<ScreenKDM> screen_kdms = film->make_kdms (