Fix compiling on Win32
Damn linker...
This commit is contained in:
parent
5b76990e97
commit
1c2885fc12
6 changed files with 47 additions and 34 deletions
|
@ -111,7 +111,7 @@ public:
|
|||
/**
|
||||
* Create new end-of-sequence iterator.
|
||||
*/
|
||||
token_iterator();
|
||||
token_iterator() : str(tmp) { ctor_eos(); }
|
||||
/**
|
||||
* Create a new start-of-sequence iterator.
|
||||
*
|
||||
|
@ -120,28 +120,38 @@ public:
|
|||
* Parameter whole_sequence: If true, after seeing one separator, throw away separators until none more are found.
|
||||
*/
|
||||
token_iterator(const std::basic_string<T>& s, std::initializer_list<const T*> sep,
|
||||
bool whole_sequence = false) throw(std::bad_alloc);
|
||||
bool whole_sequence = false) throw(std::bad_alloc) : str(s) { ctor_itr(sep, whole_sequence); }
|
||||
/**
|
||||
* Compare.
|
||||
*/
|
||||
bool operator==(const token_iterator<T>& itr) const throw();
|
||||
bool operator==(const token_iterator<T>& itr) const throw() { return equals_op(itr); }
|
||||
/**
|
||||
* Compare.
|
||||
*/
|
||||
bool operator!=(const token_iterator<T>& itr) const throw();
|
||||
bool operator!=(const token_iterator<T>& itr) const throw() { return !equals_op(itr); }
|
||||
/**
|
||||
* Dereference.
|
||||
*/
|
||||
const std::basic_string<T>& operator*() const throw();
|
||||
const std::basic_string<T>& operator*() const throw() { return dereference(); }
|
||||
/**
|
||||
* Increment.
|
||||
*/
|
||||
token_iterator<T>& operator++() throw(std::bad_alloc);
|
||||
token_iterator<T>& operator++() throw(std::bad_alloc) { return preincrement(); }
|
||||
/**
|
||||
* Increment.
|
||||
*/
|
||||
token_iterator<T> operator++(int) throw(std::bad_alloc);
|
||||
token_iterator<T> operator++(int) throw(std::bad_alloc) { return postincrement(); }
|
||||
/**
|
||||
* Do nothing, pull everything.
|
||||
*/
|
||||
static void pull_fn();
|
||||
private:
|
||||
void ctor_eos();
|
||||
void ctor_itr(std::initializer_list<const T*> sep, bool whole_sequence = false) throw(std::bad_alloc);
|
||||
token_iterator<T> postincrement() throw(std::bad_alloc);
|
||||
token_iterator<T>& preincrement() throw(std::bad_alloc);
|
||||
const std::basic_string<T>& dereference() const throw();
|
||||
bool equals_op(const token_iterator<T>& itr) const throw();
|
||||
size_t is_sep(size_t pos);
|
||||
void load_helper();
|
||||
const std::basic_string<T>& str;
|
||||
|
|
|
@ -149,6 +149,7 @@ namespace
|
|||
|
||||
void fatal_signal_handler(int sig)
|
||||
{
|
||||
write(2, "Caught fatal signal!\n", 21);
|
||||
emerg_save_movie(our_movie, movb.get_movie().get_frame_vector());
|
||||
signal(sig, SIG_DFL);
|
||||
raise(sig);
|
||||
|
@ -156,6 +157,7 @@ namespace
|
|||
|
||||
void terminate_handler()
|
||||
{
|
||||
write(2, "Terminating abnormally!\n", 24);
|
||||
emerg_save_movie(our_movie, movb.get_movie().get_frame_vector());
|
||||
std::cerr << "Exiting on fatal error" << std::endl;
|
||||
exit(1);
|
||||
|
|
|
@ -518,7 +518,6 @@ static void skein256_compress(uint64_t* out, const uint64_t* in, const uint64_t*
|
|||
out[1]=in[1]^out[1];
|
||||
out[2]=in[2]^out[2];
|
||||
out[3]=in[3]^out[3];
|
||||
out[4]=in[4]^out[4];
|
||||
}
|
||||
static void skein512_compress(uint64_t* out, const uint64_t* in, const uint64_t* key, const uint64_t* tweak)
|
||||
{
|
||||
|
@ -1556,7 +1555,6 @@ static void skein512_compress(uint64_t* out, const uint64_t* in, const uint64_t*
|
|||
out[5]=in[5]^out[5];
|
||||
out[6]=in[6]^out[6];
|
||||
out[7]=in[7]^out[7];
|
||||
out[8]=in[8]^out[8];
|
||||
}
|
||||
static void skein1024_compress(uint64_t* out, const uint64_t* in, const uint64_t* key, const uint64_t* tweak)
|
||||
{
|
||||
|
@ -3850,5 +3848,4 @@ static void skein1024_compress(uint64_t* out, const uint64_t* in, const uint64_t
|
|||
out[13]=in[13]^out[13];
|
||||
out[14]=in[14]^out[14];
|
||||
out[15]=in[15]^out[15];
|
||||
out[16]=in[16]^out[16];
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ for r=0,rounds do
|
|||
current_permute[i]=permutation[current_permute[i]+1];
|
||||
end
|
||||
end
|
||||
for i=0,okeys do print("\tout["..i.."]=in["..i.."]^out["..i.."];"); end
|
||||
for i=0,okeys-1 do print("\tout["..i.."]=in["..i.."]^out["..i.."];"); end
|
||||
print("}");
|
||||
end
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "string.hpp"
|
||||
#include "minmax.hpp"
|
||||
#include "threadtypes.hpp"
|
||||
#include "eatarg.hpp"
|
||||
#include <cctype>
|
||||
#include <boost/regex.hpp>
|
||||
#include "map-pointer.hpp"
|
||||
|
@ -282,26 +283,24 @@ string_list<char32_t> split_on_codepoint(const std::u32string& s, char32_t cp)
|
|||
return _split_on_codepoint<char32_t>(s, _cp);
|
||||
}
|
||||
|
||||
template<typename T> token_iterator<T>::token_iterator()
|
||||
: str(tmp), is_end_iterator(true)
|
||||
template<typename T> void token_iterator<T>::ctor_eos()
|
||||
{
|
||||
is_end_iterator = true;
|
||||
}
|
||||
|
||||
template<typename T> token_iterator<T>::token_iterator(const std::basic_string<T>& s,
|
||||
std::initializer_list<const T*> sep, bool whole_sequence) throw(std::bad_alloc)
|
||||
: str(s), whole_seq(whole_sequence), is_end_iterator(false), bidx(0), eidx(0)
|
||||
template<typename T> void token_iterator<T>::ctor_itr(std::initializer_list<const T*> sep, bool whole_sequence)
|
||||
throw(std::bad_alloc)
|
||||
{
|
||||
whole_seq = whole_sequence;
|
||||
is_end_iterator = false;
|
||||
bidx = 0;
|
||||
eidx = 0;
|
||||
for(auto i : sep)
|
||||
spliton.insert(i);
|
||||
load_helper();
|
||||
}
|
||||
|
||||
template<typename T> bool token_iterator<T>::operator!=(const token_iterator<T>& itr) const throw()
|
||||
{
|
||||
return !(*this == itr);
|
||||
}
|
||||
|
||||
template<typename T> bool token_iterator<T>::operator==(const token_iterator<T>& itr) const throw()
|
||||
template<typename T> bool token_iterator<T>::equals_op(const token_iterator<T>& itr) const throw()
|
||||
{
|
||||
bool is_end_a = is_end_iterator || (bidx >= str.length());
|
||||
bool is_end_b = itr.is_end_iterator || (itr.bidx >= itr.str.length());
|
||||
|
@ -317,19 +316,19 @@ template<typename T> bool token_iterator<T>::operator==(const token_iterator<T>&
|
|||
return bidx == itr.bidx;
|
||||
}
|
||||
|
||||
template<typename T> const std::basic_string<T>& token_iterator<T>::operator*() const throw()
|
||||
template<typename T> const std::basic_string<T>& token_iterator<T>::dereference() const throw()
|
||||
{
|
||||
return tmp;
|
||||
}
|
||||
|
||||
template<typename T> token_iterator<T> token_iterator<T>::operator++(int) throw(std::bad_alloc)
|
||||
template<typename T> token_iterator<T> token_iterator<T>::postincrement() throw(std::bad_alloc)
|
||||
{
|
||||
token_iterator<T> t = *this;
|
||||
++*this;
|
||||
return t;
|
||||
}
|
||||
|
||||
template<typename T> token_iterator<T>& token_iterator<T>::operator++() throw(std::bad_alloc)
|
||||
template<typename T> token_iterator<T>& token_iterator<T>::preincrement() throw(std::bad_alloc)
|
||||
{
|
||||
bidx = eidx + is_sep(eidx);
|
||||
load_helper();
|
||||
|
@ -368,19 +367,23 @@ template<typename T> size_t token_iterator<T>::is_sep(size_t pos)
|
|||
}
|
||||
}
|
||||
|
||||
template<typename T> void token_iterator<T>::pull_fn()
|
||||
{
|
||||
eat_argument(&token_iterator<T>::ctor_itr);
|
||||
eat_argument(&token_iterator<T>::ctor_eos);
|
||||
eat_argument(&token_iterator<T>::postincrement);
|
||||
eat_argument(&token_iterator<T>::preincrement);
|
||||
eat_argument(&token_iterator<T>::dereference);
|
||||
eat_argument(&token_iterator<T>::equals_op);
|
||||
eat_argument(&token_iterator<T>::is_sep);
|
||||
eat_argument(&token_iterator<T>::load_helper);
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
template<typename T> void pull_token_itr()
|
||||
{
|
||||
int w = 0;
|
||||
std::basic_string<T> x;
|
||||
token_iterator<T> y(x, {});
|
||||
token_iterator<T> z;
|
||||
y++;
|
||||
++y;
|
||||
x = *y;
|
||||
if(y == z) w = 1;
|
||||
if(y != z) w = 2;
|
||||
token_iterator<T>::pull_fn();
|
||||
}
|
||||
|
||||
void pull_token_itr2()
|
||||
|
|
|
@ -358,6 +358,7 @@ IMPLEMENT_APP(lsnes_app)
|
|||
lsnes_app::lsnes_app()
|
||||
{
|
||||
settings_mode = false;
|
||||
pluginmanager_mode = false;
|
||||
exit_immediately = false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue