From: <arn...@us...> - 2006-12-14 21:59:22
|
Revision: 692 http://svn.sourceforge.net/dcplusplus/?rev=692&view=rev Author: arnetheduck Date: 2006-12-14 13:59:19 -0800 (Thu, 14 Dec 2006) Log Message: ----------- release compile fix, yassl fixes Modified Paths: -------------- dcplusplus/trunk/DCPlusPlus.rc dcplusplus/trunk/client/version.h dcplusplus/trunk/yassl/include/buffer.hpp dcplusplus/trunk/yassl/taocrypt/src/asn.cpp dcplusplus/trunk/yassl/taocrypt/src/integer.cpp dcplusplus/trunk/yassl/taocrypt/src/template_instnt.cpp dcplusplus/trunk/yassl/yassl.vcproj Removed Paths: ------------- dcplusplus/trunk/yassl/mySTL/ dcplusplus/trunk/yassl/taocrypt/mySTL/algorithm.hpp dcplusplus/trunk/yassl/taocrypt/mySTL/list.hpp dcplusplus/trunk/yassl/taocrypt/mySTL/memory.hpp dcplusplus/trunk/yassl/taocrypt/mySTL/pair.hpp dcplusplus/trunk/yassl/taocrypt/mySTL/stdexcept.hpp dcplusplus/trunk/yassl/taocrypt/mySTL/vector.hpp Modified: dcplusplus/trunk/DCPlusPlus.rc =================================================================== --- dcplusplus/trunk/DCPlusPlus.rc 2006-12-13 21:04:04 UTC (rev 691) +++ dcplusplus/trunk/DCPlusPlus.rc 2006-12-14 21:59:19 UTC (rev 692) @@ -7,7 +7,7 @@ // // Generated from the TEXTINCLUDE 2 resource. // -#include "atlres.h" +#include "wtl\\atlres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -831,8 +831,8 @@ // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,6,9,8 - PRODUCTVERSION 0,6,9,8 + FILEVERSION 0,6,9,9 + PRODUCTVERSION 0,6,9,9 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -840,7 +840,7 @@ FILEFLAGS 0x0L #endif FILEOS 0x4L - FILETYPE 0x2L + FILETYPE 0x1L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" @@ -849,12 +849,12 @@ BEGIN VALUE "Comments", "http://dcplusplus.sourceforge.net" VALUE "FileDescription", "DC++" - VALUE "FileVersion", "0, 6, 9, 8" + VALUE "FileVersion", "0, 6, 9, 9" VALUE "InternalName", "DC++" VALUE "LegalCopyright", "Copyright 2001-2006 Jacek Sieka" VALUE "OriginalFilename", "DCPlusPlus.exe" VALUE "ProductName", "DC++" - VALUE "ProductVersion", "0, 6, 9, 8" + VALUE "ProductVersion", "0, 6, 9, 9" END END BLOCK "VarFileInfo" Modified: dcplusplus/trunk/client/version.h =================================================================== --- dcplusplus/trunk/client/version.h 2006-12-13 21:04:04 UTC (rev 691) +++ dcplusplus/trunk/client/version.h 2006-12-14 21:59:19 UTC (rev 692) @@ -17,7 +17,7 @@ */ #define APPNAME "DC++" -#define VERSIONSTRING "0.698" -#define VERSIONFLOAT 0.698 +#define VERSIONSTRING "0.699" +#define VERSIONFLOAT 0.699 /* Update the .rc file as well... */ Modified: dcplusplus/trunk/yassl/include/buffer.hpp =================================================================== --- dcplusplus/trunk/yassl/include/buffer.hpp 2006-12-13 21:04:04 UTC (rev 691) +++ dcplusplus/trunk/yassl/include/buffer.hpp 2006-12-14 21:59:19 UTC (rev 692) @@ -33,7 +33,7 @@ #include <assert.h> // assert #include "yassl_types.hpp" // ysDelete -#include "memory.hpp" // mySTL::auto_ptr +#include "memory_array.hpp" // mySTL::auto_ptr #include STL_ALGORITHM_FILE Deleted: dcplusplus/trunk/yassl/taocrypt/mySTL/algorithm.hpp =================================================================== --- dcplusplus/trunk/yassl/taocrypt/mySTL/algorithm.hpp 2006-12-13 21:04:04 UTC (rev 691) +++ dcplusplus/trunk/yassl/taocrypt/mySTL/algorithm.hpp 2006-12-14 21:59:19 UTC (rev 692) @@ -1,115 +0,0 @@ -/* mySTL algorithm.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL 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. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL 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 - */ - - -/* mySTL algorithm implements max, min, for_each, swap, find_if, copy, - * copy_backward, fill - */ - -#ifndef mySTL_ALGORITHM_HPP -#define mySTL_ALGORITHM_HPP - - -namespace mySTL { - - -template<typename T> -inline const T& max(const T& a, const T&b) -{ - return a < b ? b : a; -} - - -template<typename T> -inline const T& min(const T& a, const T&b) -{ - return b < a ? b : a; -} - - -template<typename InIter, typename Func> -Func for_each(InIter first, InIter last, Func op) -{ - while (first != last) { - op(*first); - ++first; - } - return op; -} - - -template<typename T> -inline void swap(T& a, T& b) -{ - T tmp = a; - a = b; - b = tmp; -} - - -template<typename InIter, typename Pred> -InIter find_if(InIter first, InIter last, Pred pred) -{ - while (first != last && !pred(*first)) - ++first; - return first; -} - - -template<typename InputIter, typename OutputIter> -inline OutputIter copy(InputIter first, InputIter last, OutputIter place) -{ - while (first != last) { - *place = *first; - ++first; - ++place; - } - return place; -} - - -template<typename InputIter, typename OutputIter> -inline OutputIter -copy_backward(InputIter first, InputIter last, OutputIter place) -{ - while (first != last) - *--place = *--last; - return place; -} - - -template<typename InputIter, typename T> -void fill(InputIter first, InputIter last, const T& v) -{ - while (first != last) { - *first = v; - ++first; - } -} - - -} // namespace mySTL - -#endif // mySTL_ALGORITHM_HPP Deleted: dcplusplus/trunk/yassl/taocrypt/mySTL/list.hpp =================================================================== --- dcplusplus/trunk/yassl/taocrypt/mySTL/list.hpp 2006-12-13 21:04:04 UTC (rev 691) +++ dcplusplus/trunk/yassl/taocrypt/mySTL/list.hpp 2006-12-14 21:59:19 UTC (rev 692) @@ -1,374 +0,0 @@ -/* mySTL list.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL 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. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL 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 - */ - - -/* mySTL list implements a simple list - * - */ - -#ifndef mySTL_LIST_HPP -#define mySTL_LIST_HPP - - -#include "helpers.hpp" - - -namespace mySTL { - - - -template<typename T> -class list { - -#ifdef __SUNPRO_CC -/* - Sun Forte 7 C++ v. 5.4 needs class 'node' public to be visible to - the nested class 'iterator' (a non-standard behaviour). -*/ -public: -#endif - - struct node { - node(T t) : prev_(0), next_(0), value_(t) {} - - node* prev_; - node* next_; - T value_; - }; -public: - list() : head_(0), tail_(0), sz_(0) {} - ~list(); - - void push_front(T); - void pop_front(); - T front() const; - void push_back(T); - void pop_back(); - T back() const; - bool remove(T); - size_t size() const { return sz_; } - bool empty() const { return sz_ == 0; } - - class iterator { - node* current_; - public: - explicit iterator(node* p = 0) : current_(p) {} - - T& operator*() const - { - return current_->value_; - } - - T* operator->() const - { - return &(operator*()); - } - - iterator& operator++() - { - current_ = current_->next_; - return *this; - } - - iterator& operator--() - { - current_ = current_->prev_; - return *this; - } - - iterator operator++(int) - { - iterator tmp = *this; - current_ = current_->next_; - return tmp; - } - - iterator operator--(int) - { - iterator tmp = *this; - current_ = current_->prev_; - return tmp; - } - - bool operator==(const iterator& other) const - { - return current_ == other.current_; - } - - bool operator!=(const iterator& other) const - { - return current_ != other.current_; - } - - friend class list<T>; - }; - - - class reverse_iterator { - node* current_; - public: - explicit reverse_iterator(node* p = 0) : current_(p) {} - - T& operator*() const - { - return current_->value_; - } - - T* operator->() const - { - return &(operator*()); - } - - reverse_iterator& operator++() - { - current_ = current_->prev_; - return *this; - } - - reverse_iterator& operator--() - { - current_ = current_->next_; - return *this; - } - - reverse_iterator operator++(int) - { - reverse_iterator tmp = *this; - current_ = current_->prev_; - return tmp; - } - - reverse_iterator operator--(int) - { - reverse_iterator tmp = *this; - current_ = current_->next_; - return tmp; - } - - bool operator==(const reverse_iterator& other) const - { - return current_ == other.current_; - } - - bool operator!=(const reverse_iterator& other) const - { - return current_ != other.current_; - } - - friend class list<T>; - }; - - bool erase(iterator); - - iterator begin() const { return iterator(head_); } - reverse_iterator rbegin() const { return reverse_iterator(tail_); } - iterator end() const { return iterator(); } - reverse_iterator rend() const { return reverse_iterator(); } - - typedef iterator const_iterator; // for now - - class underflow {}; - class overflow {}; -private: - node* head_; - node* tail_; - size_t sz_; - - node* look_up(T); - - list(const list&); // hide copy - list& operator=(const list&); // and assign -}; - - -template<typename T> -list<T>::~list() -{ - node* start = head_; - node* next_; - - for (; start; start = next_) { - next_ = start->next_; - destroy(start); - FreeMemory(start); - } -} - - -template<typename T> -void list<T>::push_front(T t) -{ - void* mem = GetMemory(sizeof(node)); - node* add = new (reinterpret_cast<yassl_pointer>(mem)) node(t); - - if (head_) { - add->next_ = head_; - head_->prev_ = add; - } - else - tail_ = add; - - head_ = add; - ++sz_; -} - - -template<typename T> -void list<T>::pop_front() -{ - node* front = head_; - - if (head_ == 0) - return; - else if (head_ == tail_) - head_ = tail_ = 0; - else { - head_ = head_->next_; - head_->prev_ = 0; - } - destroy(front); - FreeMemory(front); - --sz_; -} - - -template<typename T> -T list<T>::front() const -{ - if (head_ == 0) return T(); - return head_->value_; -} - - -template<typename T> -void list<T>::push_back(T t) -{ - void* mem = GetMemory(sizeof(node)); - node* add = new (reinterpret_cast<yassl_pointer>(mem)) node(t); - - if (tail_) { - tail_->next_ = add; - add->prev_ = tail_; - } - else - head_ = add; - - tail_ = add; - ++sz_; -} - - -template<typename T> -void list<T>::pop_back() -{ - node* rear = tail_; - - if (tail_ == 0) - return; - else if (tail_ == head_) - tail_ = head_ = 0; - else { - tail_ = tail_->prev_; - tail_->next_ = 0; - } - destroy(rear); - FreeMemory(rear); - --sz_; -} - - -template<typename T> -T list<T>::back() const -{ - if (tail_ == 0) return T(); - return tail_->value_; -} - - -template<typename T> -typename list<T>::node* list<T>::look_up(T t) -{ - node* list = head_; - - if (list == 0) return 0; - - for (; list; list = list->next_) - if (list->value_ == t) - return list; - - return 0; -} - - -template<typename T> -bool list<T>::remove(T t) -{ - node* del = look_up(t); - - if (del == 0) - return false; - else if (del == head_) - pop_front(); - else if (del == tail_) - pop_back(); - else { - del->prev_->next_ = del->next_; - del->next_->prev_ = del->prev_; - - destroy(del); - FreeMemory(del); - --sz_; - } - return true; -} - - -template<typename T> -bool list<T>::erase(iterator iter) -{ - node* del = iter.current_; - - if (del == 0) - return false; - else if (del == head_) - pop_front(); - else if (del == tail_) - pop_back(); - else { - del->prev_->next_ = del->next_; - del->next_->prev_ = del->prev_; - - destroy(del); - FreeMemory(del); - --sz_; - } - return true; -} - - - -} // namespace mySTL - -#endif // mySTL_LIST_HPP Deleted: dcplusplus/trunk/yassl/taocrypt/mySTL/memory.hpp =================================================================== --- dcplusplus/trunk/yassl/taocrypt/mySTL/memory.hpp 2006-12-13 21:04:04 UTC (rev 691) +++ dcplusplus/trunk/yassl/taocrypt/mySTL/memory.hpp 2006-12-14 21:59:19 UTC (rev 692) @@ -1,143 +0,0 @@ -/* mySTL memory.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL 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. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL 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 - */ - - -/* mySTL memory implements auto_ptr - * - */ - -#ifndef mySTL_MEMORY_HPP -#define mySTL_MEMORY_HPP - -#include "memory_array.hpp" // for auto_array - -#ifdef _MSC_VER - // disable operator-> warning for builtins - #pragma warning(disable:4284) -#endif - - -namespace mySTL { - - -template<typename T> -struct auto_ptr_ref { - T* ptr_; - explicit auto_ptr_ref(T* p) : ptr_(p) {} -}; - - -template<typename T> -class auto_ptr { - T* ptr_; - - void Destroy() - { - #ifdef YASSL_LIB - yaSSL::ysDelete(ptr_); - #else - TaoCrypt::tcDelete(ptr_); - #endif - } -public: - explicit auto_ptr(T* p = 0) : ptr_(p) {} - - ~auto_ptr() - { - Destroy(); - } - - - auto_ptr(auto_ptr& other) : ptr_(other.release()) {} - - auto_ptr& operator=(auto_ptr& that) - { - if (this != &that) { - Destroy(); - ptr_ = that.release(); - } - return *this; - } - - - T* operator->() const - { - return ptr_; - } - - T& operator*() const - { - return *ptr_; - } - - T* get() const - { - return ptr_; - } - - T* release() - { - T* tmp = ptr_; - ptr_ = 0; - return tmp; - } - - void reset(T* p = 0) - { - if (ptr_ != p) { - Destroy(); - ptr_ = p; - } - } - - // auto_ptr_ref conversions - auto_ptr(auto_ptr_ref<T> ref) : ptr_(ref.ptr_) {} - - auto_ptr& operator=(auto_ptr_ref<T> ref) - { - if (this->ptr_ != ref.ptr_) { - Destroy(); - ptr_ = ref.ptr_; - } - return *this; - } - - template<typename T2> - operator auto_ptr<T2>() - { - return auto_ptr<T2>(this->release()); - } - - template<typename T2> - operator auto_ptr_ref<T2>() - { - return auto_ptr_ref<T2>(this->release()); - } -}; - - -} // namespace mySTL - -#endif // mySTL_MEMORY_HPP Deleted: dcplusplus/trunk/yassl/taocrypt/mySTL/pair.hpp =================================================================== --- dcplusplus/trunk/yassl/taocrypt/mySTL/pair.hpp 2006-12-13 21:04:04 UTC (rev 691) +++ dcplusplus/trunk/yassl/taocrypt/mySTL/pair.hpp 2006-12-14 21:59:19 UTC (rev 692) @@ -1,65 +0,0 @@ -/* mySTL pair.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL 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. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL 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 - */ - - -/* mySTL pair implements pair - * - */ - -#ifndef mySTL_PAIR_HPP -#define mySTL_PAIR_HPP - - - -namespace mySTL { - - -template<typename T1, typename T2> -struct pair { - typedef T1 first_type; - typedef T2 second_type; - - first_type first; - second_type second; - - pair() {} - pair(const T1& t1, const T2& t2) : first(t1), second(t2) {} - - template<typename U1, typename U2> - pair(const pair<U1, U2>& p) : first(p.first), second(p.second) {} -}; - - -template<typename T1, typename T2> -inline pair<T1, T2> make_pair(const T1& a, const T2& b) -{ - return pair<T1, T2>(a, b); -} - - - -} // namespace mySTL - -#endif // mySTL_PAIR_HPP Deleted: dcplusplus/trunk/yassl/taocrypt/mySTL/stdexcept.hpp =================================================================== --- dcplusplus/trunk/yassl/taocrypt/mySTL/stdexcept.hpp 2006-12-13 21:04:04 UTC (rev 691) +++ dcplusplus/trunk/yassl/taocrypt/mySTL/stdexcept.hpp 2006-12-14 21:59:19 UTC (rev 692) @@ -1,84 +0,0 @@ -/* mySTL stdexcept.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL 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. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL 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 - */ - - -/* mySTL memory implements exception, runtime_error - * - */ - -#ifndef mySTL_STDEXCEPT_HPP -#define mySTL_STDEXCEPT_HPP - - -#include <string.h> // strncpy -#include <assert.h> // assert -#include <stdlib.h> // size_t - - -namespace mySTL { - - -class exception { -public: - exception() {} - virtual ~exception() {} // to shut up compiler warnings - - virtual const char* what() const { return ""; } - - // for compiler generated call, never used - static void operator delete(void*) { assert(0); } -private: - // don't allow dynamic creation of exceptions - static void* operator new(size_t); -}; - - -class named_exception : public exception { -public: - enum { NAME_SIZE = 80 }; - - explicit named_exception(const char* str) - { - strncpy(name_, str, NAME_SIZE); - name_[NAME_SIZE - 1] = 0; - } - - virtual const char* what() const { return name_; } -private: - char name_[NAME_SIZE]; -}; - - -class runtime_error : public named_exception { -public: - explicit runtime_error(const char* str) : named_exception(str) {} -}; - - - - -} // namespace mySTL - -#endif // mySTL_STDEXCEPT_HPP Deleted: dcplusplus/trunk/yassl/taocrypt/mySTL/vector.hpp =================================================================== --- dcplusplus/trunk/yassl/taocrypt/mySTL/vector.hpp 2006-12-13 21:04:04 UTC (rev 691) +++ dcplusplus/trunk/yassl/taocrypt/mySTL/vector.hpp 2006-12-14 21:59:19 UTC (rev 692) @@ -1,161 +0,0 @@ -/* mySTL vector.hpp - * - * Copyright (C) 2003 Sawtooth Consulting Ltd. - * - * This file is part of yaSSL. - * - * yaSSL 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. - * - * There are special exceptions to the terms and conditions of the GPL as it - * is applied to yaSSL. View the full text of the exception in the file - * FLOSS-EXCEPTIONS in the directory of this software distribution. - * - * yaSSL 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 - */ - - -/* mySTL vector implements simple vector, w/ swap - * - */ - -#ifndef mySTL_VECTOR_HPP -#define mySTL_VECTOR_HPP - -#include "helpers.hpp" // construct, destory, fill, etc. -#include "algorithm.hpp" // swap -#include <assert.h> // assert - - -namespace mySTL { - - -template <typename T> -struct vector_base { - T* start_; - T* finish_; - T* end_of_storage_; - - vector_base() : start_(0), finish_(0), end_of_storage_(0) {} - vector_base(size_t n) - { - start_ = GetArrayMemory<T>(n); - finish_ = start_; - end_of_storage_ = start_ + n; - } - - ~vector_base() - { - FreeArrayMemory(start_); - } - - void Swap(vector_base& that) - { - swap(start_, that.start_); - swap(finish_, that.finish_); - swap(end_of_storage_, that.end_of_storage_); - } -}; - - - -template <typename T> -class vector { -public: - typedef T* iterator; - typedef const T* const_iterator; - - vector() {} - explicit vector(size_t n) : vec_(n) - { - vec_.finish_ = uninit_fill_n(vec_.start_, n, T()); - } - - ~vector() { destroy(vec_.start_, vec_.finish_); } - - vector(const vector& other) : vec_(other.size()) - { - vec_.finish_ = uninit_copy(other.vec_.start_, other.vec_.finish_, - vec_.start_); - } - - size_t capacity() const { return vec_.end_of_storage_ - vec_.start_; } - - size_t size() const { return vec_.finish_ - vec_.start_; } - - T& operator[](size_t idx) { return *(vec_.start_ + idx); } - const T& operator[](size_t idx) const { return *(vec_.start_ + idx); } - - const T* begin() const { return vec_.start_; } - const T* end() const { return vec_.finish_; } - - void push_back(const T& v) - { - if (vec_.finish_ != vec_.end_of_storage_) { - construct(vec_.finish_, v); - ++vec_.finish_; - } - else { - vector tmp(size() * 2 + 1, *this); - construct(tmp.vec_.finish_, v); - ++tmp.vec_.finish_; - Swap(tmp); - } - } - - void resize(size_t n, const T& v) - { - if (n == size()) return; - - if (n < size()) { - T* first = vec_.start_ + n; - destroy(first, vec_.finish_); - vec_.finish_ -= vec_.finish_ - first; - } - else { - vector tmp(n, *this); - tmp.vec_.finish_ = uninit_fill_n(tmp.vec_.finish_, n - size(), v); - Swap(tmp); - } - } - - void reserve(size_t n) - { - if (capacity() < n) { - vector tmp(n, *this); - Swap(tmp); - } - } - - void Swap(vector& that) - { - vec_.Swap(that.vec_); - } -private: - vector_base<T> vec_; - - vector& operator=(const vector&); // hide assign - - // for growing, n must be bigger than other size - vector(size_t n, const vector& other) : vec_(n) - { - assert(n > other.size()); - vec_.finish_ = uninit_copy(other.vec_.start_, other.vec_.finish_, - vec_.start_); - } -}; - - - -} // namespace mySTL - -#endif // mySTL_VECTOR_HPP Modified: dcplusplus/trunk/yassl/taocrypt/src/asn.cpp =================================================================== --- dcplusplus/trunk/yassl/taocrypt/src/asn.cpp 2006-12-13 21:04:04 UTC (rev 691) +++ dcplusplus/trunk/yassl/taocrypt/src/asn.cpp 2006-12-14 21:59:19 UTC (rev 692) @@ -857,7 +857,7 @@ bool CertDecoder::ConfirmSignature(Source& pub) { HashType ht; - mySTL::auto_ptr<HASH> hasher; + STL_NAMESPACE::auto_ptr<HASH> hasher; if (signatureOID_ == MD5wRSA) { hasher.reset(NEW_TC MD5); Modified: dcplusplus/trunk/yassl/taocrypt/src/integer.cpp =================================================================== --- dcplusplus/trunk/yassl/taocrypt/src/integer.cpp 2006-12-13 21:04:04 UTC (rev 691) +++ dcplusplus/trunk/yassl/taocrypt/src/integer.cpp 2006-12-14 21:59:19 UTC (rev 692) @@ -572,24 +572,24 @@ class Portable { public: - static word Add(word *C, const word *A, const word *B, unsigned int N); - static word Subtract(word *C, const word *A, const word*B, unsigned int N); + static word TAOCRYPT_CDECL Add(word *C, const word *A, const word *B, unsigned int N); + static word TAOCRYPT_CDECL Subtract(word *C, const word *A, const word*B, unsigned int N); - static void Multiply2(word *C, const word *A, const word *B); - static word Multiply2Add(word *C, const word *A, const word *B); - static void Multiply4(word *C, const word *A, const word *B); - static void Multiply8(word *C, const word *A, const word *B); - static unsigned int MultiplyRecursionLimit() {return 8;} + static void TAOCRYPT_CDECL Multiply2(word *C, const word *A, const word *B); + static word TAOCRYPT_CDECL Multiply2Add(word *C, const word *A, const word *B); + static void TAOCRYPT_CDECL Multiply4(word *C, const word *A, const word *B); + static void TAOCRYPT_CDECL Multiply8(word *C, const word *A, const word *B); + static unsigned int TAOCRYPT_CDECL MultiplyRecursionLimit() {return 8;} - static void Multiply2Bottom(word *C, const word *A, const word *B); - static void Multiply4Bottom(word *C, const word *A, const word *B); - static void Multiply8Bottom(word *C, const word *A, const word *B); - static unsigned int MultiplyBottomRecursionLimit() {return 8;} + static void TAOCRYPT_CDECL Multiply2Bottom(word *C, const word *A, const word *B); + static void TAOCRYPT_CDECL Multiply4Bottom(word *C, const word *A, const word *B); + static void TAOCRYPT_CDECL Multiply8Bottom(word *C, const word *A, const word *B); + static unsigned int TAOCRYPT_CDECL MultiplyBottomRecursionLimit() {return 8;} - static void Square2(word *R, const word *A); - static void Square4(word *R, const word *A); - static void Square8(word *R, const word *A) {assert(false);} - static unsigned int SquareRecursionLimit() {return 4;} + static void TAOCRYPT_CDECL Square2(word *R, const word *A); + static void TAOCRYPT_CDECL Square4(word *R, const word *A); + static void TAOCRYPT_CDECL Square8(word *R, const word *A) {assert(false);} + static unsigned int TAOCRYPT_CDECL SquareRecursionLimit() {return 4;} }; word Portable::Add(word *C, const word *A, const word *B, unsigned int N) Modified: dcplusplus/trunk/yassl/taocrypt/src/template_instnt.cpp =================================================================== --- dcplusplus/trunk/yassl/taocrypt/src/template_instnt.cpp 2006-12-13 21:04:04 UTC (rev 691) +++ dcplusplus/trunk/yassl/taocrypt/src/template_instnt.cpp 2006-12-14 21:59:19 UTC (rev 692) @@ -37,7 +37,6 @@ #include "ripemd.hpp" #include "pwdbased.hpp" #include "algebra.hpp" -#include "vector.hpp" #include "hash.hpp" #ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION Modified: dcplusplus/trunk/yassl/yassl.vcproj =================================================================== --- dcplusplus/trunk/yassl/yassl.vcproj 2006-12-13 21:04:04 UTC (rev 691) +++ dcplusplus/trunk/yassl/yassl.vcproj 2006-12-14 21:59:19 UTC (rev 692) @@ -41,7 +41,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories="include,taocrypt\include,mySTL" + AdditionalIncludeDirectories="include,taocrypt\include,taocrypt\mySTL" PreprocessorDefinitions="WIN32;_DEBUG;_LIB;USE_SYS_STL" StringPooling="true" MinimalRebuild="true" @@ -119,7 +119,7 @@ FavorSizeOrSpeed="2" OmitFramePointers="true" EnableFiberSafeOptimizations="true" - AdditionalIncludeDirectories="include,taocrypt\include,mySTL" + AdditionalIncludeDirectories="include,taocrypt\include,taocrypt\mySTL" PreprocessorDefinitions="WIN32;NDEBUG;_LIB;USE_SYS_STL" StringPooling="true" MinimalRebuild="true" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |