Compare commits

..

45 Commits

Author SHA1 Message Date
s_nakamoto
06c4716396 version 0.3 rc2
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@95 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-06-26 15:47:45 +00:00
s_nakamoto
8700fae12a build-unix.txt: updated a few version numbers
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@94 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-06-26 00:23:16 +00:00
s_nakamoto
340120853f updated build-unix.txt instructions: sudo apt-get install libboost-all-dev
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@93 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-06-24 16:07:51 +00:00
s_nakamoto
3c3fc50c79 added instructions to build-unix.txt for building wxBase, which is needed to compile bitcoind
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@92 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-06-23 22:51:31 +00:00
s_nakamoto
6344edc36f version 0.3 rc1
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@91 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-06-22 17:59:00 +00:00
s_nakamoto
445520bf38 added new files to setup.nsi, updated version numbers
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@90 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-06-22 16:28:15 +00:00
s_nakamoto
8efd8f7f47 re-enable hiding taskbar button on minimize on linux, though it doesn't work cleanly
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@89 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-06-22 03:45:37 +00:00
s_nakamoto
36bb88e1b9 fix system tray icon on windows
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@88 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-06-21 18:41:34 +00:00
s_nakamoto
161c38ba60 80x80 xpm icon for ubuntu, alignment tweaked to scale nicely to 20x20 and 16x16
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@87 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-06-21 17:11:26 +00:00
s_nakamoto
68b973a913 fixed colors on ubuntu lucid,
enabled -O2 in makefile.unix,
boost removed -mt from their library names in 1.40,
updated bitcoin icon,
hashmeter,
generated and hashmeter log entries
-- version 0.2.13

git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@86 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-06-21 01:33:44 +00:00
s_nakamoto
24ba1b64e9 use seed nodes as fallback if IRC fails or with TOR
-- version 0.2.12

git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@85 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-06-18 03:14:24 +00:00
s_nakamoto
6a4a35549b German translation by DataWraith
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@84 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-06-16 16:35:34 +00:00
s_nakamoto
e5681bb121 more addr message error checking
-- version 0.2.11

git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@83 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-06-15 18:26:32 +00:00
s_nakamoto
bed005b639 revert makefile.unix from -02 back to -00 to fix compile on linux, -02 doesn't really help on linux anyway
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@82 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-06-14 22:34:33 +00:00
s_nakamoto
f93d5f9ffe automatically change displayed address whenever it receives anything,
added help and -? for daemon command line rpc commands,
only relay addr messages to 5 random nodes to save bandwidth,
started setting wtx.fFromMe flag,
trickle out tx inventory messages to protect privacy
 -- version 0.2.10

git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@81 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-06-10 23:10:30 +00:00
s_nakamoto
2ca1758832 Dutch translation by Xunie (93% complete)
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@80 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-06-02 22:10:06 +00:00
s_nakamoto
1da44d2e96 Italian translation by Joozero
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@79 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-05-27 14:11:03 +00:00
s_nakamoto
42605ce8bc better prevention of inventory relaying during initial download,
message checksum between nodes with 0.2.9 or higher,
optimization level up from -O0 to -O2,
rpc functions: setlabel, getlabel, getaddressesbylabel, getreceivedbyaddress, getreceivedbylabel, listreceivedbyaddress, listreceivedbylabel
 -- version 0.2.9

git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@78 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-05-26 00:05:26 +00:00
s_nakamoto
124baa4ccb build-osx.txt build instructions and makefile.osx from Laszlo
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@77 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-05-25 23:58:27 +00:00
s_nakamoto
2d98de1b3a Mac OS build fixes by laszlo
-- version 0.2.8

git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@76 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-05-19 00:26:56 +00:00
s_nakamoto
966cca4bd4 misc
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@75 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-03-05 02:55:09 +00:00
s_nakamoto
2cffa7ce31 fixed runaway memory alloc bug on 64-bit in ParseString found by sirius-m
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@74 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-03-05 01:13:27 +00:00
s_nakamoto
d7d80a74d5 fix unsafe string handling in wxGetTranslation
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@73 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-02-28 15:00:32 +00:00
s_nakamoto
6557910ccf wx/utils.h and wx/clipbrd.h not needed on bitcoind wxbase build
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@72 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-02-26 16:09:43 +00:00
s_nakamoto
c2430126d7 GUI-less build target bitcoind that links to wxBase and shouldn't need GTK,
split init and shutdown from ui.cpp into init.cpp,
support wxUSE_GUI=0
-- version 0.2.7

git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@71 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-02-25 21:55:27 +00:00
s_nakamoto
cb420a1dfc run as daemon without GUI,
hooked wxApp::Initialize to ignore gtk-init-check failure if no GUI,
fork to daemonize,
rpc getinfo, getconnectioncount, getbalance, getgenerate, setgenerate,
-- version 0.2.6

git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@70 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-02-23 22:01:39 +00:00
s_nakamoto
0184604aaf transaction filter tabs instead of view->show generated
-- version 0.2.5

git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@69 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-02-21 21:42:01 +00:00
s_nakamoto
75199de534 Address Book with tabs instead of separate Your Address book,
with live update of default address in main window, 
New... button on main window for creating new receiving address, 
made receiving address labels more visible, 
ask user before paying transaction fee, 
when sending to bitcoin address also use a bitcoin address for the change, 
added some event.Skip() to fix UI glitches 
-- version 0.2.4

git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@68 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-02-20 21:59:59 +00:00
s_nakamoto
c6ab3cf6d9 safer wxGetTranslation wrapper
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@67 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-02-17 23:55:43 +00:00
s_nakamoto
e480659765 all builds are now with wxWidgets-2.9.0, we are now using UTF-8,
added support for language translation file locale/<lang>/LC_MESSAGES/bitcoin.mo 
-- version 0.2.2

git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@66 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-02-17 17:22:01 +00:00
s_nakamoto
2b63e68bbf fix mingw makefile to use correct wxWidgets include,
this is the last version of makefile and makefile.vc for wxWidgets-2.8

git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@65 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-02-15 20:36:55 +00:00
s_nakamoto
5253d1ab77 strip out unfinished product, review and market stuff,
enable _() instead of wxT() in uiproject.fbp so it uses wxGetTranslation for the wxFormBuilder generated part of the UI

git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@64 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-02-15 04:03:07 +00:00
s_nakamoto
64a474a49b renamed a few rpc methods
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@63 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-02-14 22:27:13 +00:00
s_nakamoto
c4319e678f Workaround for bug on wxWidgets 2.9.0 Ubuntu 9.10 64-bit where first character of the hidden columns were displayed so status column had three numbers overprinted. Fixed by adding a leading space to the hidden columns. 64-bit compile with wxWidgets 2.9.0 seems to be fully working normally now.
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@62 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-02-14 00:08:27 +00:00
s_nakamoto
c85dfb148a updated build-unix.txt
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@61 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-02-13 02:09:07 +00:00
s_nakamoto
98500d70a8 command line and JSON-RPC first draft, requires Boost 1.35 or higher for boost::asio,
added SetBitcoinAddress and GetBitcoinAddress methods on CScript, 
critsect interlocks around mapAddressBook, 
added some random delays in tx broadcast to improve privacy, 
now compiles with MSVC 8.0

git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@60 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-02-12 20:38:44 +00:00
s_nakamoto
fa9dbd6b62 better error message in check_type(), tell the types by name instead of by number
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@59 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-02-10 19:46:04 +00:00
s_nakamoto
75990a46a7 JSON Spirit library from http://www.codeproject.com/KB/recipes/JSON_Spirit.aspx, MIT license
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@58 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-02-10 19:41:22 +00:00
s_nakamoto
c41226d847 revert revision 56, going in different direction with boost::asio and JSON-RPC
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@57 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-02-10 19:33:04 +00:00
sirius-m
082e725b33 Added some basic IPC functionality using wxServer, wxClient and wxConnection.
Added the -blockamount command line option for an example of usage.


git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@56 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-02-04 15:31:46 +00:00
s_nakamoto
53d508072b update fSpent flag on wallet transactions if they're seen spent in case copy of wallet.dat was used elsewhere or restored from backup,
better error dialog box if try to spend already spent coins, 
got rid of unused notebook with only one tab on main dialog, 
nicer looking About dialog, 
resize About dialog better on linux

git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@55 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-02-03 22:58:40 +00:00
s_nakamoto
8be979d9ae now compiles on 64-bit Ubuntu Karmic with wxWidgets-2.9.0,
fixes for wxWidgets-2.9.0, 
added superfluous GetEventHandler()'s, 
there's still a bug on wx2.9.0 that the status number is mashed up for some reason otherwise seems to run fine

git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@54 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-01-28 21:49:20 +00:00
s_nakamoto
cb0f89646f simplify AddAddress,
readcompactsize limit, 
fixed a 64-bit compile error in serialize.h, 
change status "# blocks" to "# confirmations" and widen the column.

git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@53 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-01-28 00:31:00 +00:00
s_nakamoto
9a36562347 command line switch -noui
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@52 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2009-12-17 23:16:27 +00:00
s_nakamoto
312c2c42b6 a few header changes for freebsd from madhatter
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@51 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2009-12-17 18:15:50 +00:00
69 changed files with 11322 additions and 12154 deletions

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2009 Satoshi Nakamoto
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2009 Satoshi Nakamoto
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
@@ -64,12 +64,6 @@ public:
}
}
explicit CBigNum(const std::string& str)
{
BN_init(this);
SetHex(str);
}
CBigNum& operator=(const CBigNum& b)
{
if (!BN_copy(this, &b))
@@ -309,6 +303,37 @@ public:
*this = 0 - *this;
}
std::string ToString(int nBase=10) const
{
CAutoBN_CTX pctx;
CBigNum bnBase = nBase;
CBigNum bn0 = 0;
string str;
CBigNum bn = *this;
BN_set_negative(&bn, false);
CBigNum dv;
CBigNum rem;
if (BN_cmp(&bn, &bn0) == 0)
return "0";
while (BN_cmp(&bn, &bn0) > 0)
{
if (!BN_div(&dv, &rem, &bn, &bnBase, pctx))
throw bignum_error("CBigNum::ToString() : BN_div failed");
bn = dv;
unsigned int c = rem.getulong();
str += "0123456789abcdef"[c];
}
if (BN_is_negative(this))
str += "-";
reverse(str.begin(), str.end());
return str;
}
std::string GetHex() const
{
return ToString(16);
}
unsigned int GetSerializeSize(int nType=0, int nVersion=VERSION) const
{
return ::GetSerializeSize(getvch(), nType, nVersion);
@@ -376,6 +401,7 @@ public:
CBigNum& operator>>=(unsigned int shift)
{
// Note: BN_rshift segfaults on 64-bit ubuntu 9.10 if 2^shift is greater than the number
if (!BN_rshift(this, this, shift))
throw bignum_error("CBigNum:operator>>= : BN_rshift failed");
return *this;
@@ -485,6 +511,7 @@ inline const CBigNum operator<<(const CBigNum& a, unsigned int shift)
inline const CBigNum operator>>(const CBigNum& a, unsigned int shift)
{
CBigNum r;
// Note: BN_rshift segfaults on 64-bit ubuntu 9.10 if 2^shift is greater than the number
if (!BN_rshift(&r, &a, shift))
throw bignum_error("CBigNum:operator>> : BN_rshift failed");
return r;

View File

@@ -1,6 +1,4 @@
Bitcoin v0.2.0 BETA
Copyright (c) 2009 Satoshi Nakamoto
Copyright (c) 2009-2010 Satoshi Nakamoto
Distributed under the MIT/X11 software license, see the accompanying
file license.txt or http://www.opensource.org/licenses/mit-license.php.
This product includes software developed by the OpenSSL Project for use in
@@ -13,20 +11,27 @@ WINDOWS BUILD NOTES
Compilers Supported
-------------------
MinGW GCC
Microsoft Visual C++ 6.0 SP6
MinGW GCC (recommended)
MSVC 6.0 SP6: You'll need Boost version 1.34 because they dropped support
for MSVC 6.0 after that. However, they didn't add Asio until 1.35.
You should still be able to build with MSVC 6.0 by adding Asio to 1.34 by
unpacking boost_asio_*.zip into the boost directory:
http://sourceforge.net/projects/asio/files/asio
MSVC 8.0 (2005) SP1 has been tested. Note: MSVC 7.0 and up have a habit of
linking to runtime DLLs that are not installed on XP by default.
Dependencies
------------
Libraries you need to download separately and build:
default path download
wxWidgets \wxwidgets http://www.wxwidgets.org/downloads/
or prebuilt: http://wxpack.sourceforge.net
OpenSSL \openssl http://www.openssl.org/source/
Berkeley DB \db http://www.oracle.com/technology/software/products/berkeley-db/index.html
Boost \boost http://www.boost.org/users/download/
default path download
wxWidgets-2.9 \wxwidgets http://www.wxwidgets.org/downloads/
OpenSSL \openssl http://www.openssl.org/source/
Berkeley DB \db http://www.oracle.com/technology/software/products/berkeley-db/index.html
Boost \boost http://www.boost.org/users/download/
Their licenses:
wxWidgets LGPL 2.1 with very liberal exceptions
@@ -36,10 +41,10 @@ Boost MIT-like license
Versions used in this release:
MinGW GCC 3.4.5
wxWidgets 2.8.9
wxWidgets 2.9.0
OpenSSL 0.9.8k
Berkeley DB 4.7.25.NC
Boost 1.34.1
Boost 1.42.1
Notes
@@ -52,6 +57,14 @@ The release is built with GCC and then "strip bitcoin.exe" to strip the debug
symbols, which reduces the executable size by about 90%.
wxWidgets
---------
cd \wxwidgets\build\msw
make -f makefile.gcc
or
nmake -f makefile.vc
OpenSSL
-------
Bitcoin does not use any encryption. If you want to do a no-everything
@@ -89,3 +102,13 @@ Using MinGW and MSYS:
cd \db\build_unix
sh ../dist/configure --enable-mingw --enable-cxx
make
Boost
-----
download bjam.exe from
http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=72941
cd \boost
bjam toolset=gcc --build-type=complete stage
or
bjam toolset=msvc --build-type=complete stage

217
build-osx.txt Normal file
View File

@@ -0,0 +1,217 @@
Copyright (c) 2009-2010 Satoshi Nakamoto
Distributed under the MIT/X11 software license, see the accompanying
file license.txt or http://www.opensource.org/licenses/mit-license.php.
This product includes software developed by the OpenSSL Project for use in
the OpenSSL Toolkit (http://www.openssl.org/). This product includes
cryptographic software written by Eric Young (eay@cryptsoft.com).
Mac OS X build instructions
Laszlo Hanyecz (solar@heliacal.net)
Tested on 10.5 and 10.6 intel. PPC is not supported because it's big-endian.
All of the commands should be executed in Terminal.app.. it's in
/Applications/Utilities
You need to install XCode with all the options checked so that the compiler
and everything is available in /usr not just /Developer
I think it comes on the DVD but you can get the current version from
http://developer.apple.com
1. Pick a directory to work inside.. something like ~/bitcoin works. The
structure I use looks like this:
(~ is your home directory)
~/bitcoin
~/bitcoin/trunk # source code
~/bitcoin/deps # dependencies.. like libraries and headers needed to compile
~/bitcoin/Bitcoin.app # the application bundle where you can run the app
Just execute: mkdir ~/bitcoin
This will create the top dir for you..
WARNING: do not use the ~ notation with the configure scripts.. use the full
name of the directory, for example /Users/james/bitcoin/deps for a user named
'james'. In my examples I am using 'macosuser' so make sure you change that.
2. Check out the trunk version of the bitcoin code from subversion:
cd ~/bitcoin
svn checkout https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk
This will make ~/bitcoin/trunk for you with all the files from subversion.
3. Get and build the dependencies
Boost
-----
Download from http://www.boost.org/users/download/
I'm assuming it ended up in ~/Downloads..
mkdir ~/bitcoin/deps
cd ~/bitcoin/deps
tar xvjf ~/Downloads/boost_1_42_0.tar.bz2
cd boost_1_42_0
./bootstrap.sh
./bjam architecture=combined address-model=32_64 macosx-version=10.6 macosx-version-min=10.5 link=static runtime-link=static --toolset=darwin --prefix=/Users/macosuser/bitcoin/deps install
This part takes a while.. use your judgement and fix it if something doesn't
build for some reason.
Change the prefix to whatever your directory is (my username in this example
is macosuser). I'm also running on 10.6 so i have macosx-version=10.6 change
to 10.5 if you're using leopard.
This is what my output looked like at the end:
...failed updating 2 targets...
...skipped 144 targets...
...updated 8074 targets...
OpenSSL
-------
Download from http://www.openssl.org/source/
We would like to build this as a 32 bit/64 bit library so we actually build it
2 times and join it together here.. If you downloaded with safari it already
uncompressed it so it will just be a tar not a tar.gz
cd ~/bitcoin/deps
tar xvf ~/Downloads/openssl-1.0.0.tar
mv openssl-1.0.0 openssl-1.0.0-i386
tar xvf ~/Downloads/openssl-1.0.0.tar
mv openssl-1.0.0 openssl-1.0.0-x86_64
# build i386 (32 bit intel) binary
cd openssl-1.0.0-i386
./Configure --prefix=/Users/macosuser/bitcoin/deps --openssldir=/Users/macosuser/deps/openssl darwin-i386-cc && make
make install # only do this on one of the architectures, to install the headers
cd ..
# build x86_64 (64 bit intel) binary
cd openssl-1.0.0-x86_64
./Configure --prefix=/Users/macosuser/bitcoin/deps --openssldir=/Users/macosuser/deps/openssl darwin64-x86_64-cc && make
cd ..
# combine the libs
cd ~/bitcoin/deps
lipo -arch i386 openssl-1.0.0-i386/libcrypto.a -arch x86_64 openssl-1.0.0-x86_64/libcrypto.a -o lib/libcrypto.a -create
lipo -arch i386 openssl-1.0.0-i386/libssl.a -arch x86_64 openssl-1.0.0-x86_64/libssl.a -o lib/libssl.a -create
Verify your binaries
file lib/libcrypto.a
output should look like this:
ib/libcrypto.a: Mach-O universal binary with 2 architectures
lib/libcrypto.a (for architecture i386): current ar archive random library
lib/libcrypto.a (for architecture x86_64): current ar archive random library
Berkeley DB
-----------
Download from http://freshmeat.net/projects/berkeleydb/
cd ~/bitcoin/deps
tar xvf ~/Downloads/db-4.8.26.tar
cd db-4.8.26/build_unix
../dist/configure --prefix=/Users/macosuser/bitcoin/deps --enable-cxx && make && make install
wxWidgets
---------
This is the big one..
Check it out from svn
cd ~/bitcoin/deps
svn checkout http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk wxWidgets-trunk
This will make a wxWidgets-trunk directory in deps.
Use this script snippet, change your prefix to whatever your dir is:
PREFIX=~/bitcoin/deps
SRCDIR="$PREFIX/wxWidgets-trunk"
BUILDDIR="$SRCDIR/macbuild"
cd "$PREFIX" &&
#svn checkout http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk wxWidgets-trunk &&
cd "$SRCDIR" &&
[ -f include/wx/hashmap.h.orig ] || cp include/wx/hashmap.h include/wx/hashmap.h.orig &&
sed 's/if wxUSE_STL/if 0 \&\& wxUSE_STL/g' < include/wx/hashmap.h.orig > include/wx/hashmap.h &&
[ -f include/wx/hashset.h.orig ] || cp include/wx/hashset.h include/wx/hashset.h.orig &&
sed 's/if wxUSE_STL/if 0 \&\& wxUSE_STL/g' < include/wx/hashset.h.orig > include/wx/hashset.h &&
rm -vrf "$BUILDDIR" &&
mkdir "$BUILDDIR" &&
cd "$BUILDDIR" &&
../configure --prefix="$PREFIX" \
--with-osx_cocoa \
--disable-shared \
--disable-debug_flag \
--with-macosx-version-min=10.5 \
--enable-stl \
--enable-utf8 \
--enable-universal_binary \
--with-libjpeg=builtin \
--with-libpng=builtin \
--with-regex=builtin \
--with-libtiff=builtin \
--with-zlib=builtin \
--with-expat=builtin \
--with-macosx-sdk=/Developer/SDKs/MacOSX10.5.sdk &&
find . -name Makefile |
while read i; do
echo $i;
sed 's/-arch i386/-arch i386 -arch x86_64/g' < "$i" > "$i".new &&
mv "$i" "$i".old &&
mv "$i".new "$i";
done
make &&
make install
Now you should be able to build bitcoin
cd ~/bitcoin/trunk
make -f makefile.osx bitcoin
Before you can run it, you need to create an application bundle for Mac OS.
Create the directories in terminal using mkdir and copy the files into place.
They are available at http://heliacal.net/~solar/bitcoin/mac-build/
You need the Info.plist and the .ins file. The Contents/MacOS/bitcoin file is
the output of the build.
Your directory structure should look like this:
Bitcoin.app
Bitcoin.app/Contents
Bitcoin.app/Contents/Info.plist
Bitcoin.app/Contents/MacOS
Bitcoin.app/Contents/MacOS/bitcoin
Bitcoin.app/Contents/Resources
Bitcoin.app/Contents/Resources/BitcoinAppIcon.icns
To run it you can just click the Bitcoin.app in Finder, or just do open
~/bitcoin/Bitcoin.app
If you want to run it with arguments you can just run it without backgrounding
by specifying the full name in terminal:
~/bitcoin/Bitcoin.app/Contents/MacOS/bitcoin -addnode=192.75.207.66

View File

@@ -1,6 +1,4 @@
Bitcoin v0.2.0 BETA
Copyright (c) 2009 Satoshi Nakamoto
Copyright (c) 2009-2010 Satoshi Nakamoto
Distributed under the MIT/X11 software license, see the accompanying
file license.txt or http://www.opensource.org/licenses/mit-license.php.
This product includes software developed by the OpenSSL Project for use in
@@ -13,15 +11,22 @@ UNIX BUILD NOTES
Dependencies
------------
apt-get install build-essential
apt-get install libgtk2.0-dev
apt-get install libssl-dev
apt-get install libdb4.7-dev
apt-get install libdb4.7++-dev
apt-get install libboost-dev
sudo apt-get install build-essential
sudo apt-get install libgtk2.0-dev
sudo apt-get install libssl-dev
sudo apt-get install libdb4.7-dev
sudo apt-get install libdb4.7++-dev
sudo apt-get install libboost-all-dev
We're now using wxWidgets 2.9, which uses UTF-8.
There isn't currently a debian package of wxWidgets we can use. The 2.8
packages for Karmic are UTF-16 unicode and won't work for us, and we've had
trouble building 2.8 on 64-bit.
You need to download wxWidgets from http://www.wxwidgets.org/downloads/
and build it yourself.
and build it yourself. See the build instructions and configure parameters
below.
Licenses of statically linked libraries:
wxWidgets LGPL 2.1 with very liberal exceptions
@@ -29,9 +34,9 @@ Berkeley DB New BSD license with additional requirement that linked software
Boost MIT-like license
Versions used in this release:
GCC 4.3.3
GCC 4.4.3
OpenSSL 0.9.8k
wxWidgets 2.8.9
wxWidgets 2.9.0
Berkeley DB 4.7.25.NC
Boost 1.40.0
@@ -48,12 +53,23 @@ symbols, which reduces the executable size by about 90%.
wxWidgets
---------
cd /usr/local/wxWidgets-2.8.9
cd /usr/local
tar -xzvf wxWidgets-2.9.0.tar.gz
cd /usr/local/wxWidgets-2.9.0
mkdir buildgtk
cd buildgtk
../configure --with-gtk --enable-debug --disable-shared --enable-monolithic
make
su
sudo su
make install
ldconfig
su <username>
cd ..
mkdir buildbase
cd buildbase
../configure --disable-gui --enable-debug --disable-shared --enable-monolithic
make
sudo su
make install
ldconfig

49
db.cpp
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2009 Satoshi Nakamoto
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
@@ -134,8 +134,6 @@ void CDB::Close()
CRITICAL_BLOCK(cs_db)
--mapFileUseCount[strFile];
RandAddSeed();
}
void CloseDb(const string& strFile)
@@ -456,7 +454,7 @@ bool CAddrDB::LoadAddresses()
CAddress addr(psz, NODE_NETWORK);
addr.nTime = 0; // so it won't relay unless successfully connected
if (addr.IsValid())
AddAddress(*this, addr);
AddAddress(addr);
}
}
catch (...) { }
@@ -509,34 +507,13 @@ bool LoadAddresses()
//
// CReviewDB
//
bool CReviewDB::ReadReviews(uint256 hash, vector<CReview>& vReviews)
{
vReviews.size(); // msvc workaround, just need to do anything with vReviews
return Read(make_pair(string("reviews"), hash), vReviews);
}
bool CReviewDB::WriteReviews(uint256 hash, const vector<CReview>& vReviews)
{
return Write(make_pair(string("reviews"), hash), vReviews);
}
//
// CWalletDB
//
bool CWalletDB::LoadWallet(vector<unsigned char>& vchDefaultKeyRet)
bool CWalletDB::LoadWallet()
{
vchDefaultKeyRet.clear();
vchDefaultKey.clear();
int nFileVersion = 0;
// Modify defaults
@@ -595,19 +572,22 @@ bool CWalletDB::LoadWallet(vector<unsigned char>& vchDefaultKeyRet)
// wtx.hashBlock.ToString().substr(0,16).c_str(),
// wtx.mapValue["message"].c_str());
}
else if (strType == "key")
else if (strType == "key" || strType == "wkey")
{
vector<unsigned char> vchPubKey;
ssKey >> vchPubKey;
CPrivKey vchPrivKey;
ssValue >> vchPrivKey;
CWalletKey wkey;
if (strType == "key")
ssValue >> wkey.vchPrivKey;
else
ssValue >> wkey;
mapKeys[vchPubKey] = vchPrivKey;
mapKeys[vchPubKey] = wkey.vchPrivKey;
mapPubKeys[Hash160(vchPubKey)] = vchPubKey;
}
else if (strType == "defaultkey")
{
ssValue >> vchDefaultKeyRet;
ssValue >> vchDefaultKey;
}
else if (strType == "version")
{
@@ -619,7 +599,6 @@ bool CWalletDB::LoadWallet(vector<unsigned char>& vchDefaultKeyRet)
ssKey >> strKey;
// Menu state
if (strKey == "fShowGenerated") ssValue >> fShowGenerated;
if (strKey == "fGenerateBitcoins") ssValue >> fGenerateBitcoins;
// Options
@@ -638,7 +617,6 @@ bool CWalletDB::LoadWallet(vector<unsigned char>& vchDefaultKeyRet)
}
printf("nFileVersion = %d\n", nFileVersion);
printf("fShowGenerated = %d\n", fShowGenerated);
printf("fGenerateBitcoins = %d\n", fGenerateBitcoins);
printf("nTransactionFee = %"PRI64d"\n", nTransactionFee);
printf("addrIncoming = %s\n", addrIncoming.ToString().c_str());
@@ -672,8 +650,7 @@ bool CWalletDB::LoadWallet(vector<unsigned char>& vchDefaultKeyRet)
bool LoadWallet(bool& fFirstRunRet)
{
fFirstRunRet = false;
vector<unsigned char> vchDefaultKey;
if (!CWalletDB("cr+").LoadWallet(vchDefaultKey))
if (!CWalletDB("cr+").LoadWallet())
return false;
fFirstRunRet = vchDefaultKey.empty();

56
db.h
View File

@@ -1,8 +1,7 @@
// Copyright (c) 2009 Satoshi Nakamoto
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
#include <db_cxx.h>
class CTransaction;
class CTxIndex;
class CDiskBlockIndex;
@@ -14,9 +13,12 @@ class CAddress;
class CWalletTx;
extern map<string, string> mapAddressBook;
extern CCriticalSection cs_mapAddressBook;
extern vector<unsigned char> vchDefaultKey;
extern bool fClient;
extern unsigned int nWalletDBUpdated;
extern DbEnv dbenv;
@@ -285,45 +287,6 @@ public:
class CReviewDB : public CDB
{
public:
CReviewDB(const char* pszMode="r+") : CDB("reviews.dat", pszMode) { }
private:
CReviewDB(const CReviewDB&);
void operator=(const CReviewDB&);
public:
bool ReadUser(uint256 hash, CUser& user)
{
return Read(make_pair(string("user"), hash), user);
}
bool WriteUser(uint256 hash, const CUser& user)
{
return Write(make_pair(string("user"), hash), user);
}
bool ReadReviews(uint256 hash, vector<CReview>& vReviews);
bool WriteReviews(uint256 hash, const vector<CReview>& vReviews);
};
class CMarketDB : public CDB
{
public:
CMarketDB(const char* pszMode="r+") : CDB("market.dat", pszMode) { }
private:
CMarketDB(const CMarketDB&);
void operator=(const CMarketDB&);
};
class CAddrDB : public CDB
{
public:
@@ -359,15 +322,19 @@ public:
bool WriteName(const string& strAddress, const string& strName)
{
CRITICAL_BLOCK(cs_mapAddressBook)
mapAddressBook[strAddress] = strName;
nWalletDBUpdated++;
mapAddressBook[strAddress] = strName;
return Write(make_pair(string("name"), strAddress), strName);
}
bool EraseName(const string& strAddress)
{
// This should only be used for sending addresses, never for receiving addresses,
// receiving addresses must always have an address book entry if they're not change return.
CRITICAL_BLOCK(cs_mapAddressBook)
mapAddressBook.erase(strAddress);
nWalletDBUpdated++;
mapAddressBook.erase(strAddress);
return Erase(make_pair(string("name"), strAddress));
}
@@ -408,6 +375,7 @@ public:
bool WriteDefaultKey(const vector<unsigned char>& vchPubKey)
{
vchDefaultKey = vchPubKey;
nWalletDBUpdated++;
return Write(string("defaultkey"), vchPubKey);
}
@@ -425,7 +393,7 @@ public:
return Write(make_pair(string("setting"), strKey), value);
}
bool LoadWallet(vector<unsigned char>& vchDefaultKeyRet);
bool LoadWallet();
};
bool LoadWallet(bool& fFirstRunRet);

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2009 Satoshi Nakamoto
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
@@ -19,25 +19,27 @@
#define WIN32_LEAN_AND_MEAN 1
#define __STDC_LIMIT_MACROS // to enable UINT64_MAX from stdint.h
#include <wx/wx.h>
#include <wx/clipbrd.h>
#include <wx/snglinst.h>
#include <wx/taskbar.h>
#include <wx/stdpaths.h>
#include <wx/snglinst.h>
#if wxUSE_GUI
#include <wx/utils.h>
#include <wx/clipbrd.h>
#include <wx/taskbar.h>
#endif
#include <openssl/ecdsa.h>
#include <openssl/evp.h>
#include <openssl/rand.h>
#include <openssl/sha.h>
#include <openssl/ripemd.h>
#include <db_cxx.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <limits.h>
#include <float.h>
#include <assert.h>
#include <malloc.h>
#include <memory>
#define BOUNDSCHECK 1
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
@@ -55,6 +57,8 @@
#include <boost/array.hpp>
#include <boost/bind.hpp>
#include <boost/function.hpp>
#include <boost/filesystem.hpp>
#include <boost/algorithm/string.hpp>
#ifdef __WXMSW__
#include <windows.h>
@@ -64,6 +68,7 @@
#include <shlwapi.h>
#include <io.h>
#include <process.h>
#include <malloc.h>
#else
#include <sys/time.h>
#include <sys/resource.h>
@@ -74,16 +79,16 @@
#include <errno.h>
#include <net/if.h>
#include <ifaddrs.h>
#include <boost/filesystem.hpp>
#include <boost/algorithm/string.hpp>
#endif
#ifdef __BSD__
#include <netinet/in.h>
#endif
#pragma hdrstop
using namespace std;
using namespace boost;
#include "strlcpy.h"
#include "serialize.h"
#include "uint256.h"
@@ -96,9 +101,12 @@ using namespace boost;
#include "net.h"
#include "irc.h"
#include "main.h"
#include "market.h"
#include "rpc.h"
#if wxUSE_GUI
#include "uibase.h"
#endif
#include "ui.h"
#include "init.h"
#include "xpm/addressbook16.xpm"
#include "xpm/addressbook20.xpm"
@@ -106,7 +114,9 @@ using namespace boost;
#include "xpm/bitcoin20.xpm"
#include "xpm/bitcoin32.xpm"
#include "xpm/bitcoin48.xpm"
#include "xpm/bitcoin80.xpm"
#include "xpm/check.xpm"
#include "xpm/send16.xpm"
#include "xpm/send16noshadow.xpm"
#include "xpm/send20.xpm"
#include "xpm/about.xpm"

635
init.cpp Normal file
View File

@@ -0,0 +1,635 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
#include "headers.h"
void ExitTimeout(void* parg)
{
#ifdef __WXMSW__
Sleep(5000);
ExitProcess(0);
#endif
}
void Shutdown(void* parg)
{
static CCriticalSection cs_Shutdown;
static bool fTaken;
bool fFirstThread;
CRITICAL_BLOCK(cs_Shutdown)
{
fFirstThread = !fTaken;
fTaken = true;
}
static bool fExit;
if (fFirstThread)
{
fShutdown = true;
nTransactionsUpdated++;
DBFlush(false);
StopNode();
DBFlush(true);
CreateThread(ExitTimeout, NULL);
Sleep(50);
printf("Bitcoin exiting\n\n");
fExit = true;
exit(0);
}
else
{
while (!fExit)
Sleep(500);
Sleep(100);
ExitThread(0);
}
}
//////////////////////////////////////////////////////////////////////////////
//
// Startup folder
//
#ifdef __WXMSW__
typedef WINSHELLAPI BOOL (WINAPI *PSHGETSPECIALFOLDERPATHA)(HWND hwndOwner, LPSTR lpszPath, int nFolder, BOOL fCreate);
string MyGetSpecialFolderPath(int nFolder, bool fCreate)
{
char pszPath[MAX_PATH+100] = "";
// SHGetSpecialFolderPath is not usually available on NT 4.0
HMODULE hShell32 = LoadLibraryA("shell32.dll");
if (hShell32)
{
PSHGETSPECIALFOLDERPATHA pSHGetSpecialFolderPath =
(PSHGETSPECIALFOLDERPATHA)GetProcAddress(hShell32, "SHGetSpecialFolderPathA");
if (pSHGetSpecialFolderPath)
(*pSHGetSpecialFolderPath)(NULL, pszPath, nFolder, fCreate);
FreeModule(hShell32);
}
// Backup option
if (pszPath[0] == '\0')
{
if (nFolder == CSIDL_STARTUP)
{
strcpy(pszPath, getenv("USERPROFILE"));
strcat(pszPath, "\\Start Menu\\Programs\\Startup");
}
else if (nFolder == CSIDL_APPDATA)
{
strcpy(pszPath, getenv("APPDATA"));
}
}
return pszPath;
}
string StartupShortcutPath()
{
return MyGetSpecialFolderPath(CSIDL_STARTUP, true) + "\\Bitcoin.lnk";
}
bool GetStartOnSystemStartup()
{
return wxFileExists(StartupShortcutPath());
}
void SetStartOnSystemStartup(bool fAutoStart)
{
// If the shortcut exists already, remove it for updating
remove(StartupShortcutPath().c_str());
if (fAutoStart)
{
CoInitialize(NULL);
// Get a pointer to the IShellLink interface.
IShellLink* psl = NULL;
HRESULT hres = CoCreateInstance(CLSID_ShellLink, NULL,
CLSCTX_INPROC_SERVER, IID_IShellLink,
reinterpret_cast<void**>(&psl));
if (SUCCEEDED(hres))
{
// Get the current executable path
TCHAR pszExePath[MAX_PATH];
GetModuleFileName(NULL, pszExePath, sizeof(pszExePath));
// Set the path to the shortcut target
psl->SetPath(pszExePath);
PathRemoveFileSpec(pszExePath);
psl->SetWorkingDirectory(pszExePath);
psl->SetShowCmd(SW_SHOWMINNOACTIVE);
// Query IShellLink for the IPersistFile interface for
// saving the shortcut in persistent storage.
IPersistFile* ppf = NULL;
hres = psl->QueryInterface(IID_IPersistFile,
reinterpret_cast<void**>(&ppf));
if (SUCCEEDED(hres))
{
WCHAR pwsz[MAX_PATH];
// Ensure that the string is ANSI.
MultiByteToWideChar(CP_ACP, 0, StartupShortcutPath().c_str(), -1, pwsz, MAX_PATH);
// Save the link by calling IPersistFile::Save.
hres = ppf->Save(pwsz, TRUE);
ppf->Release();
}
psl->Release();
}
CoUninitialize();
}
}
#else
bool GetStartOnSystemStartup() { return false; }
void SetStartOnSystemStartup(bool fAutoStart) { }
#endif
//////////////////////////////////////////////////////////////////////////////
//
// CMyApp
//
// Define a new application
class CMyApp: public wxApp
{
public:
wxLocale m_locale;
CMyApp(){};
~CMyApp(){};
bool OnInit();
bool OnInit2();
int OnExit();
// Hook Initialize so we can start without GUI
virtual bool Initialize(int& argc, wxChar** argv);
// 2nd-level exception handling: we get all the exceptions occurring in any
// event handler here
virtual bool OnExceptionInMainLoop();
// 3rd, and final, level exception handling: whenever an unhandled
// exception is caught, this function is called
virtual void OnUnhandledException();
// and now for something different: this function is called in case of a
// crash (e.g. dereferencing null pointer, division by 0, ...)
virtual void OnFatalException();
};
IMPLEMENT_APP(CMyApp)
bool CMyApp::Initialize(int& argc, wxChar** argv)
{
if (argc > 1 && argv[1][0] != '-' && (!fWindows || argv[1][0] != '/') &&
wxString(argv[1]) != "start")
{
fCommandLine = true;
}
else if (!fGUI)
{
fDaemon = true;
}
else
{
// wxApp::Initialize will remove environment-specific parameters,
// so it's too early to call ParseParameters yet
for (int i = 1; i < argc; i++)
{
wxString str = argv[i];
#ifdef __WXMSW__
if (str.size() >= 1 && str[0] == '/')
str[0] = '-';
str = str.MakeLower();
#endif
// haven't decided which argument to use for this yet
if (str == "-daemon" || str == "-d" || str == "start")
fDaemon = true;
}
}
#ifdef __WXGTK__
if (fDaemon || fCommandLine)
{
// Call the original Initialize while suppressing error messages
// and ignoring failure. If unable to initialize GTK, it fails
// near the end so hopefully the last few things don't matter.
{
wxLogNull logNo;
wxApp::Initialize(argc, argv);
}
if (fDaemon)
{
// Daemonize
pid_t pid = fork();
if (pid < 0)
{
fprintf(stderr, "Error: fork() returned %d errno %d\n", pid, errno);
return false;
}
if (pid > 0)
pthread_exit((void*)0);
}
return true;
}
#endif
return wxApp::Initialize(argc, argv);
}
bool CMyApp::OnInit()
{
bool fRet = false;
try
{
fRet = OnInit2();
}
catch (std::exception& e) {
PrintException(&e, "OnInit()");
} catch (...) {
PrintException(NULL, "OnInit()");
}
if (!fRet)
Shutdown(NULL);
return fRet;
}
extern int g_isPainting;
bool CMyApp::OnInit2()
{
#ifdef _MSC_VER
// Turn off microsoft heap dump noise
_CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);
_CrtSetReportFile(_CRT_WARN, CreateFileA("NUL", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0));
#endif
#if _MSC_VER >= 1400
// Disable confusing "helpful" text message on abort, ctrl-c
_set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT);
#endif
#if defined(__WXMSW__) && defined(__WXDEBUG__) && wxUSE_GUI
// Disable malfunctioning wxWidgets debug assertion
g_isPainting = 10000;
#endif
#if wxUSE_GUI
wxImage::AddHandler(new wxPNGHandler);
#endif
#if defined(__WXMSW__ ) || defined(__WXMAC__)
SetAppName("Bitcoin");
#else
SetAppName("bitcoin");
#endif
#ifndef __WXMSW__
umask(077);
#endif
#ifdef __WXMSW__
#if wxUSE_UNICODE
// Hack to set wxConvLibc codepage to UTF-8 on Windows,
// may break if wxMBConv_win32 implementation in strconv.cpp changes.
class wxMBConv_win32 : public wxMBConv
{
public:
long m_CodePage;
size_t m_minMBCharWidth;
};
if (((wxMBConv_win32*)&wxConvLibc)->m_CodePage == CP_ACP)
((wxMBConv_win32*)&wxConvLibc)->m_CodePage = CP_UTF8;
#endif
#endif
// Load locale/<lang>/LC_MESSAGES/bitcoin.mo language file
m_locale.Init(wxLANGUAGE_DEFAULT, 0);
m_locale.AddCatalogLookupPathPrefix("locale");
if (!fWindows)
{
m_locale.AddCatalogLookupPathPrefix("/usr/share/locale");
m_locale.AddCatalogLookupPathPrefix("/usr/local/share/locale");
}
m_locale.AddCatalog("wxstd"); // wxWidgets standard translations, if any
m_locale.AddCatalog("bitcoin");
//
// Parameters
//
if (fCommandLine)
{
int ret = CommandLineRPC(argc, argv);
exit(ret);
}
ParseParameters(argc, argv);
if (mapArgs.count("-?") || mapArgs.count("--help"))
{
wxString strUsage = string() +
_("Usage:") + "\t\t\t\t\t\t\t\t\t\t\n" +
" bitcoin [options] \t" + "\n" +
" bitcoin [command] \t" + _("Send command to bitcoin running with -server or -daemon\n") +
" bitcoin [command] -? \t" + _("Get help for a command\n") +
" bitcoin help \t" + _("List commands\n") +
_("Options:\n") +
" -gen \t " + _("Generate coins\n") +
" -gen=0 \t " + _("Don't generate coins\n") +
" -min \t " + _("Start minimized\n") +
" -datadir=<dir> \t " + _("Specify data directory\n") +
" -proxy=<ip:port>\t " + _("Connect through socks4 proxy\n") +
" -addnode=<ip> \t " + _("Add a node to connect to\n") +
" -connect=<ip> \t " + _("Connect only to the specified node\n") +
" -server \t " + _("Accept command line and JSON-RPC commands\n") +
" -daemon \t " + _("Run in the background as a daemon and accept commands\n") +
" -? \t " + _("This help message\n");
if (fWindows && fGUI)
{
// Tabs make the columns line up in the message box
wxMessageBox(strUsage, "Bitcoin", wxOK);
}
else
{
// Remove tabs
strUsage.Replace("\t", "");
fprintf(stderr, "%s", ((string)strUsage).c_str());
}
return false;
}
if (mapArgs.count("-datadir"))
strlcpy(pszSetDataDir, mapArgs["-datadir"].c_str(), sizeof(pszSetDataDir));
if (mapArgs.count("-debug"))
fDebug = true;
if (mapArgs.count("-printtodebugger"))
fPrintToDebugger = true;
if (!fDebug && !pszSetDataDir[0])
ShrinkDebugFile();
printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
printf("Bitcoin version 0.%d.%d%s beta, OS version %s\n", VERSION/100, VERSION%100, pszSubVer, ((string)wxGetOsDescription()).c_str());
printf("System default language is %d %s\n", m_locale.GetSystemLanguage(), ((string)m_locale.GetSysName()).c_str());
printf("Language file %s (%s)\n", (string("locale/") + (string)m_locale.GetCanonicalName() + "/LC_MESSAGES/bitcoin.mo").c_str(), ((string)m_locale.GetLocale()).c_str());
if (mapArgs.count("-loadblockindextest"))
{
CTxDB txdb("r");
txdb.LoadBlockIndex();
PrintBlockTree();
return false;
}
//
// Limit to single instance per user
// Required to protect the database files if we're going to keep deleting log.*
//
#ifdef __WXMSW__
// todo: wxSingleInstanceChecker wasn't working on Linux, never deleted its lock file
// maybe should go by whether successfully bind port 8333 instead
wxString strMutexName = wxString("bitcoin_running.") + getenv("HOMEPATH");
for (int i = 0; i < strMutexName.size(); i++)
if (!isalnum(strMutexName[i]))
strMutexName[i] = '.';
wxSingleInstanceChecker* psingleinstancechecker = new wxSingleInstanceChecker(strMutexName);
if (psingleinstancechecker->IsAnotherRunning())
{
printf("Existing instance found\n");
unsigned int nStart = GetTime();
loop
{
// TODO: find out how to do this in Linux, or replace with wxWidgets commands
// Show the previous instance and exit
HWND hwndPrev = FindWindowA("wxWindowClassNR", "Bitcoin");
if (hwndPrev)
{
if (IsIconic(hwndPrev))
ShowWindow(hwndPrev, SW_RESTORE);
SetForegroundWindow(hwndPrev);
return false;
}
if (GetTime() > nStart + 60)
return false;
// Resume this instance if the other exits
delete psingleinstancechecker;
Sleep(1000);
psingleinstancechecker = new wxSingleInstanceChecker(strMutexName);
if (!psingleinstancechecker->IsAnotherRunning())
break;
}
}
#endif
// Bind to the port early so we can tell if another instance is already running.
// This is a backup to wxSingleInstanceChecker, which doesn't work on Linux.
string strErrors;
if (!BindListenPort(strErrors))
{
wxMessageBox(strErrors, "Bitcoin");
return false;
}
//
// Load data files
//
if (fDaemon)
fprintf(stdout, "bitcoin server starting\n");
strErrors = "";
int64 nStart;
printf("Loading addresses...\n");
nStart = GetTimeMillis();
if (!LoadAddresses())
strErrors += _("Error loading addr.dat \n");
printf(" addresses %15"PRI64d"ms\n", GetTimeMillis() - nStart);
printf("Loading block index...\n");
nStart = GetTimeMillis();
if (!LoadBlockIndex())
strErrors += _("Error loading blkindex.dat \n");
printf(" block index %15"PRI64d"ms\n", GetTimeMillis() - nStart);
printf("Loading wallet...\n");
nStart = GetTimeMillis();
bool fFirstRun;
if (!LoadWallet(fFirstRun))
strErrors += _("Error loading wallet.dat \n");
printf(" wallet %15"PRI64d"ms\n", GetTimeMillis() - nStart);
printf("Done loading\n");
//// debug print
printf("mapBlockIndex.size() = %d\n", mapBlockIndex.size());
printf("nBestHeight = %d\n", nBestHeight);
printf("mapKeys.size() = %d\n", mapKeys.size());
printf("mapPubKeys.size() = %d\n", mapPubKeys.size());
printf("mapWallet.size() = %d\n", mapWallet.size());
printf("mapAddressBook.size() = %d\n", mapAddressBook.size());
if (!strErrors.empty())
{
wxMessageBox(strErrors, "Bitcoin");
return false;
}
// Add wallet transactions that aren't already in a block to mapTransactions
ReacceptWalletTransactions();
//
// Parameters
//
if (mapArgs.count("-printblockindex") || mapArgs.count("-printblocktree"))
{
PrintBlockTree();
return false;
}
if (mapArgs.count("-printblock"))
{
string strMatch = mapArgs["-printblock"];
int nFound = 0;
for (map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.begin(); mi != mapBlockIndex.end(); ++mi)
{
uint256 hash = (*mi).first;
if (strncmp(hash.ToString().c_str(), strMatch.c_str(), strMatch.size()) == 0)
{
CBlockIndex* pindex = (*mi).second;
CBlock block;
block.ReadFromDisk(pindex);
block.BuildMerkleTree();
block.print();
printf("\n");
nFound++;
}
}
if (nFound == 0)
printf("No blocks matching %s were found\n", strMatch.c_str());
return false;
}
if (mapArgs.count("-gen"))
{
if (mapArgs["-gen"].empty())
fGenerateBitcoins = true;
else
fGenerateBitcoins = (atoi(mapArgs["-gen"].c_str()) != 0);
}
if (mapArgs.count("-proxy"))
{
fUseProxy = true;
addrProxy = CAddress(mapArgs["-proxy"]);
if (!addrProxy.IsValid())
{
wxMessageBox(_("Invalid -proxy address"), "Bitcoin");
return false;
}
}
if (mapArgs.count("-addnode"))
{
foreach(string strAddr, mapMultiArgs["-addnode"])
{
CAddress addr(strAddr, NODE_NETWORK);
addr.nTime = 0; // so it won't relay unless successfully connected
if (addr.IsValid())
AddAddress(addr);
}
}
//
// Create the main window and start the node
//
if (!fDaemon)
CreateMainWindow();
if (!CheckDiskSpace())
return false;
RandAddSeedPerfmon();
if (!CreateThread(StartNode, NULL))
wxMessageBox("Error: CreateThread(StartNode) failed", "Bitcoin");
if (mapArgs.count("-server") || fDaemon)
CreateThread(ThreadRPCServer, NULL);
if (fFirstRun)
SetStartOnSystemStartup(true);
return true;
}
int CMyApp::OnExit()
{
Shutdown(NULL);
return wxApp::OnExit();
}
bool CMyApp::OnExceptionInMainLoop()
{
try
{
throw;
}
catch (std::exception& e)
{
PrintException(&e, "CMyApp::OnExceptionInMainLoop()");
wxLogWarning("Exception %s %s", typeid(e).name(), e.what());
Sleep(1000);
throw;
}
catch (...)
{
PrintException(NULL, "CMyApp::OnExceptionInMainLoop()");
wxLogWarning("Unknown exception");
Sleep(1000);
throw;
}
return true;
}
void CMyApp::OnUnhandledException()
{
// this shows how we may let some exception propagate uncaught
try
{
throw;
}
catch (std::exception& e)
{
PrintException(&e, "CMyApp::OnUnhandledException()");
wxLogWarning("Exception %s %s", typeid(e).name(), e.what());
Sleep(1000);
throw;
}
catch (...)
{
PrintException(NULL, "CMyApp::OnUnhandledException()");
wxLogWarning("Unknown exception");
Sleep(1000);
throw;
}
}
void CMyApp::OnFatalException()
{
wxMessageBox(_("Program has crashed and will terminate. "), "Bitcoin", wxOK | wxICON_ERROR);
}

7
init.h Normal file
View File

@@ -0,0 +1,7 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
void Shutdown(void* parg);
bool GetStartOnSystemStartup();
void SetStartOnSystemStartup(bool fAutoStart);

17
irc.cpp
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2009 Satoshi Nakamoto
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
@@ -76,6 +76,8 @@ bool RecvLine(SOCKET hSocket, string& strLine)
if (c == '\r')
return true;
strLine += c;
if (strLine.size() >= 9000)
return true;
}
else if (nBytes <= 0)
{
@@ -109,7 +111,7 @@ bool RecvLineIRC(SOCKET hSocket, string& strLine)
return false;
vector<string> vWords;
ParseString(strLine, ' ', vWords);
if (vWords[0] == "PING")
if (vWords.size() >= 1 && vWords[0] == "PING")
{
strLine[1] = 'O';
strLine += '\r';
@@ -156,7 +158,7 @@ bool Wait(int nSeconds)
void ThreadIRCSeed(void* parg)
{
SetThreadPriority(THREAD_PRIORITY_NORMAL);
printf("ThreadIRCSeed started\n");
int nErrorWait = 10;
int nRetryWait = 10;
bool fNameInUse = false;
@@ -164,10 +166,12 @@ void ThreadIRCSeed(void* parg)
while (!fShutdown)
{
CAddress addrConnect("216.155.130.130:6667");
//CAddress addrConnect("216.155.130.130:6667"); // chat.freenode.net
CAddress addrConnect("92.243.23.21:6667"); // irc.lfnet.org
if (!fTOR)
{
struct hostent* phostent = gethostbyname("chat.freenode.net");
//struct hostent* phostent = gethostbyname("chat.freenode.net");
struct hostent* phostent = gethostbyname("irc.lfnet.org");
if (phostent && phostent->h_addr_list && phostent->h_addr_list[0])
addrConnect = CAddress(*(u_long*)phostent->h_addr_list[0], htons(6667));
}
@@ -265,8 +269,7 @@ void ThreadIRCSeed(void* parg)
if (DecodeAddress(pszName, addr))
{
addr.nTime = GetAdjustedTime() - 51 * 60;
CAddrDB addrdb;
if (AddAddress(addrdb, addr))
if (AddAddress(addr))
printf("IRC got new address\n");
nGotIRCAddresses++;
}

6
irc.h
View File

@@ -1,8 +1,8 @@
// Copyright (c) 2009 Satoshi Nakamoto
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
extern bool RecvLine(SOCKET hSocket, string& strLine);
extern void ThreadIRCSeed(void* parg);
bool RecvLine(SOCKET hSocket, string& strLine);
void ThreadIRCSeed(void* parg);
extern int nGotIRCAddresses;

24
json/LICENSE.txt Normal file
View File

@@ -0,0 +1,24 @@
The MIT License
Copyright (c) 2007 - 2009 John W. Wilkinson
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.

18
json/json_spirit.h Normal file
View File

@@ -0,0 +1,18 @@
#ifndef JSON_SPIRIT
#define JSON_SPIRIT
// Copyright John W. Wilkinson 2007 - 2009.
// Distributed under the MIT License, see accompanying file LICENSE.txt
// json spirit version 4.03
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
#include "json_spirit_value.h"
#include "json_spirit_reader.h"
#include "json_spirit_writer.h"
#include "json_spirit_utils.h"
#endif

View File

@@ -0,0 +1,54 @@
#ifndef JSON_SPIRIT_ERROR_POSITION
#define JSON_SPIRIT_ERROR_POSITION
// Copyright John W. Wilkinson 2007 - 2009.
// Distributed under the MIT License, see accompanying file LICENSE.txt
// json spirit version 4.03
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
#include <string>
namespace json_spirit
{
// An Error_position exception is thrown by the "read_or_throw" functions below on finding an error.
// Note the "read_or_throw" functions are around 3 times slower than the standard functions "read"
// functions that return a bool.
//
struct Error_position
{
Error_position();
Error_position( unsigned int line, unsigned int column, const std::string& reason );
bool operator==( const Error_position& lhs ) const;
unsigned int line_;
unsigned int column_;
std::string reason_;
};
inline Error_position::Error_position()
: line_( 0 )
, column_( 0 )
{
}
inline Error_position::Error_position( unsigned int line, unsigned int column, const std::string& reason )
: line_( line )
, column_( column )
, reason_( reason )
{
}
inline bool Error_position::operator==( const Error_position& lhs ) const
{
if( this == &lhs ) return true;
return ( reason_ == lhs.reason_ ) &&
( line_ == lhs.line_ ) &&
( column_ == lhs.column_ );
}
}
#endif

137
json/json_spirit_reader.cpp Normal file
View File

@@ -0,0 +1,137 @@
// Copyright John W. Wilkinson 2007 - 2009.
// Distributed under the MIT License, see accompanying file LICENSE.txt
// json spirit version 4.03
#include "json_spirit_reader.h"
#include "json_spirit_reader_template.h"
using namespace json_spirit;
bool json_spirit::read( const std::string& s, Value& value )
{
return read_string( s, value );
}
void json_spirit::read_or_throw( const std::string& s, Value& value )
{
read_string_or_throw( s, value );
}
bool json_spirit::read( std::istream& is, Value& value )
{
return read_stream( is, value );
}
void json_spirit::read_or_throw( std::istream& is, Value& value )
{
read_stream_or_throw( is, value );
}
bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, Value& value )
{
return read_range( begin, end, value );
}
void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, Value& value )
{
begin = read_range_or_throw( begin, end, value );
}
#ifndef BOOST_NO_STD_WSTRING
bool json_spirit::read( const std::wstring& s, wValue& value )
{
return read_string( s, value );
}
void json_spirit::read_or_throw( const std::wstring& s, wValue& value )
{
read_string_or_throw( s, value );
}
bool json_spirit::read( std::wistream& is, wValue& value )
{
return read_stream( is, value );
}
void json_spirit::read_or_throw( std::wistream& is, wValue& value )
{
read_stream_or_throw( is, value );
}
bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value )
{
return read_range( begin, end, value );
}
void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value )
{
begin = read_range_or_throw( begin, end, value );
}
#endif
bool json_spirit::read( const std::string& s, mValue& value )
{
return read_string( s, value );
}
void json_spirit::read_or_throw( const std::string& s, mValue& value )
{
read_string_or_throw( s, value );
}
bool json_spirit::read( std::istream& is, mValue& value )
{
return read_stream( is, value );
}
void json_spirit::read_or_throw( std::istream& is, mValue& value )
{
read_stream_or_throw( is, value );
}
bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value )
{
return read_range( begin, end, value );
}
void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value )
{
begin = read_range_or_throw( begin, end, value );
}
#ifndef BOOST_NO_STD_WSTRING
bool json_spirit::read( const std::wstring& s, wmValue& value )
{
return read_string( s, value );
}
void json_spirit::read_or_throw( const std::wstring& s, wmValue& value )
{
read_string_or_throw( s, value );
}
bool json_spirit::read( std::wistream& is, wmValue& value )
{
return read_stream( is, value );
}
void json_spirit::read_or_throw( std::wistream& is, wmValue& value )
{
read_stream_or_throw( is, value );
}
bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value )
{
return read_range( begin, end, value );
}
void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value )
{
begin = read_range_or_throw( begin, end, value );
}
#endif

62
json/json_spirit_reader.h Normal file
View File

@@ -0,0 +1,62 @@
#ifndef JSON_SPIRIT_READER
#define JSON_SPIRIT_READER
// Copyright John W. Wilkinson 2007 - 2009.
// Distributed under the MIT License, see accompanying file LICENSE.txt
// json spirit version 4.03
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
#include "json_spirit_value.h"
#include "json_spirit_error_position.h"
#include <iostream>
namespace json_spirit
{
// functions to reads a JSON values
bool read( const std::string& s, Value& value );
bool read( std::istream& is, Value& value );
bool read( std::string::const_iterator& begin, std::string::const_iterator end, Value& value );
void read_or_throw( const std::string& s, Value& value );
void read_or_throw( std::istream& is, Value& value );
void read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, Value& value );
#ifndef BOOST_NO_STD_WSTRING
bool read( const std::wstring& s, wValue& value );
bool read( std::wistream& is, wValue& value );
bool read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value );
void read_or_throw( const std::wstring& s, wValue& value );
void read_or_throw( std::wistream& is, wValue& value );
void read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value );
#endif
bool read( const std::string& s, mValue& value );
bool read( std::istream& is, mValue& value );
bool read( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value );
void read_or_throw( const std::string& s, mValue& value );
void read_or_throw( std::istream& is, mValue& value );
void read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value );
#ifndef BOOST_NO_STD_WSTRING
bool read( const std::wstring& s, wmValue& value );
bool read( std::wistream& is, wmValue& value );
bool read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value );
void read_or_throw( const std::wstring& s, wmValue& value );
void read_or_throw( std::wistream& is, wmValue& value );
void read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value );
#endif
}
#endif

View File

@@ -0,0 +1,612 @@
#ifndef JSON_SPIRIT_READER_TEMPLATE
#define JSON_SPIRIT_READER_TEMPLATE
// Copyright John W. Wilkinson 2007 - 2009.
// Distributed under the MIT License, see accompanying file LICENSE.txt
// json spirit version 4.03
#include "json_spirit_value.h"
#include "json_spirit_error_position.h"
//#define BOOST_SPIRIT_THREADSAFE // uncomment for multithreaded use, requires linking to boost.thread
#include <boost/bind.hpp>
#include <boost/function.hpp>
#include <boost/version.hpp>
#if BOOST_VERSION >= 103800
#include <boost/spirit/include/classic_core.hpp>
#include <boost/spirit/include/classic_confix.hpp>
#include <boost/spirit/include/classic_escape_char.hpp>
#include <boost/spirit/include/classic_multi_pass.hpp>
#include <boost/spirit/include/classic_position_iterator.hpp>
#define spirit_namespace boost::spirit::classic
#else
#include <boost/spirit/core.hpp>
#include <boost/spirit/utility/confix.hpp>
#include <boost/spirit/utility/escape_char.hpp>
#include <boost/spirit/iterator/multi_pass.hpp>
#include <boost/spirit/iterator/position_iterator.hpp>
#define spirit_namespace boost::spirit
#endif
namespace json_spirit
{
const spirit_namespace::int_parser < boost::int64_t > int64_p = spirit_namespace::int_parser < boost::int64_t >();
const spirit_namespace::uint_parser< boost::uint64_t > uint64_p = spirit_namespace::uint_parser< boost::uint64_t >();
template< class Iter_type >
bool is_eq( Iter_type first, Iter_type last, const char* c_str )
{
for( Iter_type i = first; i != last; ++i, ++c_str )
{
if( *c_str == 0 ) return false;
if( *i != *c_str ) return false;
}
return true;
}
template< class Char_type >
Char_type hex_to_num( const Char_type c )
{
if( ( c >= '0' ) && ( c <= '9' ) ) return c - '0';
if( ( c >= 'a' ) && ( c <= 'f' ) ) return c - 'a' + 10;
if( ( c >= 'A' ) && ( c <= 'F' ) ) return c - 'A' + 10;
return 0;
}
template< class Char_type, class Iter_type >
Char_type hex_str_to_char( Iter_type& begin )
{
const Char_type c1( *( ++begin ) );
const Char_type c2( *( ++begin ) );
return ( hex_to_num( c1 ) << 4 ) + hex_to_num( c2 );
}
template< class Char_type, class Iter_type >
Char_type unicode_str_to_char( Iter_type& begin )
{
const Char_type c1( *( ++begin ) );
const Char_type c2( *( ++begin ) );
const Char_type c3( *( ++begin ) );
const Char_type c4( *( ++begin ) );
return ( hex_to_num( c1 ) << 12 ) +
( hex_to_num( c2 ) << 8 ) +
( hex_to_num( c3 ) << 4 ) +
hex_to_num( c4 );
}
template< class String_type >
void append_esc_char_and_incr_iter( String_type& s,
typename String_type::const_iterator& begin,
typename String_type::const_iterator end )
{
typedef typename String_type::value_type Char_type;
const Char_type c2( *begin );
switch( c2 )
{
case 't': s += '\t'; break;
case 'b': s += '\b'; break;
case 'f': s += '\f'; break;
case 'n': s += '\n'; break;
case 'r': s += '\r'; break;
case '\\': s += '\\'; break;
case '/': s += '/'; break;
case '"': s += '"'; break;
case 'x':
{
if( end - begin >= 3 ) // expecting "xHH..."
{
s += hex_str_to_char< Char_type >( begin );
}
break;
}
case 'u':
{
if( end - begin >= 5 ) // expecting "uHHHH..."
{
s += unicode_str_to_char< Char_type >( begin );
}
break;
}
}
}
template< class String_type >
String_type substitute_esc_chars( typename String_type::const_iterator begin,
typename String_type::const_iterator end )
{
typedef typename String_type::const_iterator Iter_type;
if( end - begin < 2 ) return String_type( begin, end );
String_type result;
result.reserve( end - begin );
const Iter_type end_minus_1( end - 1 );
Iter_type substr_start = begin;
Iter_type i = begin;
for( ; i < end_minus_1; ++i )
{
if( *i == '\\' )
{
result.append( substr_start, i );
++i; // skip the '\'
append_esc_char_and_incr_iter( result, i, end );
substr_start = i + 1;
}
}
result.append( substr_start, end );
return result;
}
template< class String_type >
String_type get_str_( typename String_type::const_iterator begin,
typename String_type::const_iterator end )
{
assert( end - begin >= 2 );
typedef typename String_type::const_iterator Iter_type;
Iter_type str_without_quotes( ++begin );
Iter_type end_without_quotes( --end );
return substitute_esc_chars< String_type >( str_without_quotes, end_without_quotes );
}
inline std::string get_str( std::string::const_iterator begin, std::string::const_iterator end )
{
return get_str_< std::string >( begin, end );
}
inline std::wstring get_str( std::wstring::const_iterator begin, std::wstring::const_iterator end )
{
return get_str_< std::wstring >( begin, end );
}
template< class String_type, class Iter_type >
String_type get_str( Iter_type begin, Iter_type end )
{
const String_type tmp( begin, end ); // convert multipass iterators to string iterators
return get_str( tmp.begin(), tmp.end() );
}
// this class's methods get called by the spirit parse resulting
// in the creation of a JSON object or array
//
// NB Iter_type could be a std::string iterator, wstring iterator, a position iterator or a multipass iterator
//
template< class Value_type, class Iter_type >
class Semantic_actions
{
public:
typedef typename Value_type::Config_type Config_type;
typedef typename Config_type::String_type String_type;
typedef typename Config_type::Object_type Object_type;
typedef typename Config_type::Array_type Array_type;
typedef typename String_type::value_type Char_type;
Semantic_actions( Value_type& value )
: value_( value )
, current_p_( 0 )
{
}
void begin_obj( Char_type c )
{
assert( c == '{' );
begin_compound< Object_type >();
}
void end_obj( Char_type c )
{
assert( c == '}' );
end_compound();
}
void begin_array( Char_type c )
{
assert( c == '[' );
begin_compound< Array_type >();
}
void end_array( Char_type c )
{
assert( c == ']' );
end_compound();
}
void new_name( Iter_type begin, Iter_type end )
{
assert( current_p_->type() == obj_type );
name_ = get_str< String_type >( begin, end );
}
void new_str( Iter_type begin, Iter_type end )
{
add_to_current( get_str< String_type >( begin, end ) );
}
void new_true( Iter_type begin, Iter_type end )
{
assert( is_eq( begin, end, "true" ) );
add_to_current( true );
}
void new_false( Iter_type begin, Iter_type end )
{
assert( is_eq( begin, end, "false" ) );
add_to_current( false );
}
void new_null( Iter_type begin, Iter_type end )
{
assert( is_eq( begin, end, "null" ) );
add_to_current( Value_type() );
}
void new_int( boost::int64_t i )
{
add_to_current( i );
}
void new_uint64( boost::uint64_t ui )
{
add_to_current( ui );
}
void new_real( double d )
{
add_to_current( d );
}
private:
Semantic_actions& operator=( const Semantic_actions& );
// to prevent "assignment operator could not be generated" warning
Value_type* add_first( const Value_type& value )
{
assert( current_p_ == 0 );
value_ = value;
current_p_ = &value_;
return current_p_;
}
template< class Array_or_obj >
void begin_compound()
{
if( current_p_ == 0 )
{
add_first( Array_or_obj() );
}
else
{
stack_.push_back( current_p_ );
Array_or_obj new_array_or_obj; // avoid copy by building new array or object in place
current_p_ = add_to_current( new_array_or_obj );
}
}
void end_compound()
{
if( current_p_ != &value_ )
{
current_p_ = stack_.back();
stack_.pop_back();
}
}
Value_type* add_to_current( const Value_type& value )
{
if( current_p_ == 0 )
{
return add_first( value );
}
else if( current_p_->type() == array_type )
{
current_p_->get_array().push_back( value );
return &current_p_->get_array().back();
}
assert( current_p_->type() == obj_type );
return &Config_type::add( current_p_->get_obj(), name_, value );
}
Value_type& value_; // this is the object or array that is being created
Value_type* current_p_; // the child object or array that is currently being constructed
std::vector< Value_type* > stack_; // previous child objects and arrays
String_type name_; // of current name/value pair
};
template< typename Iter_type >
void throw_error( spirit_namespace::position_iterator< Iter_type > i, const std::string& reason )
{
throw Error_position( i.get_position().line, i.get_position().column, reason );
}
template< typename Iter_type >
void throw_error( Iter_type i, const std::string& reason )
{
throw reason;
}
// the spirit grammer
//
template< class Value_type, class Iter_type >
class Json_grammer : public spirit_namespace::grammar< Json_grammer< Value_type, Iter_type > >
{
public:
typedef Semantic_actions< Value_type, Iter_type > Semantic_actions_t;
Json_grammer( Semantic_actions_t& semantic_actions )
: actions_( semantic_actions )
{
}
static void throw_not_value( Iter_type begin, Iter_type end )
{
throw_error( begin, "not a value" );
}
static void throw_not_array( Iter_type begin, Iter_type end )
{
throw_error( begin, "not an array" );
}
static void throw_not_object( Iter_type begin, Iter_type end )
{
throw_error( begin, "not an object" );
}
static void throw_not_pair( Iter_type begin, Iter_type end )
{
throw_error( begin, "not a pair" );
}
static void throw_not_colon( Iter_type begin, Iter_type end )
{
throw_error( begin, "no colon in pair" );
}
static void throw_not_string( Iter_type begin, Iter_type end )
{
throw_error( begin, "not a string" );
}
template< typename ScannerT >
class definition
{
public:
definition( const Json_grammer& self )
{
using namespace spirit_namespace;
typedef typename Value_type::String_type::value_type Char_type;
// first we convert the semantic action class methods to functors with the
// parameter signature expected by spirit
typedef boost::function< void( Char_type ) > Char_action;
typedef boost::function< void( Iter_type, Iter_type ) > Str_action;
typedef boost::function< void( double ) > Real_action;
typedef boost::function< void( boost::int64_t ) > Int_action;
typedef boost::function< void( boost::uint64_t ) > Uint64_action;
Char_action begin_obj ( boost::bind( &Semantic_actions_t::begin_obj, &self.actions_, _1 ) );
Char_action end_obj ( boost::bind( &Semantic_actions_t::end_obj, &self.actions_, _1 ) );
Char_action begin_array( boost::bind( &Semantic_actions_t::begin_array, &self.actions_, _1 ) );
Char_action end_array ( boost::bind( &Semantic_actions_t::end_array, &self.actions_, _1 ) );
Str_action new_name ( boost::bind( &Semantic_actions_t::new_name, &self.actions_, _1, _2 ) );
Str_action new_str ( boost::bind( &Semantic_actions_t::new_str, &self.actions_, _1, _2 ) );
Str_action new_true ( boost::bind( &Semantic_actions_t::new_true, &self.actions_, _1, _2 ) );
Str_action new_false ( boost::bind( &Semantic_actions_t::new_false, &self.actions_, _1, _2 ) );
Str_action new_null ( boost::bind( &Semantic_actions_t::new_null, &self.actions_, _1, _2 ) );
Real_action new_real ( boost::bind( &Semantic_actions_t::new_real, &self.actions_, _1 ) );
Int_action new_int ( boost::bind( &Semantic_actions_t::new_int, &self.actions_, _1 ) );
Uint64_action new_uint64 ( boost::bind( &Semantic_actions_t::new_uint64, &self.actions_, _1 ) );
// actual grammer
json_
= value_ | eps_p[ &throw_not_value ]
;
value_
= string_[ new_str ]
| number_
| object_
| array_
| str_p( "true" ) [ new_true ]
| str_p( "false" )[ new_false ]
| str_p( "null" ) [ new_null ]
;
object_
= ch_p('{')[ begin_obj ]
>> !members_
>> ( ch_p('}')[ end_obj ] | eps_p[ &throw_not_object ] )
;
members_
= pair_ >> *( ',' >> pair_ )
;
pair_
= string_[ new_name ]
>> ( ':' | eps_p[ &throw_not_colon ] )
>> ( value_ | eps_p[ &throw_not_value ] )
;
array_
= ch_p('[')[ begin_array ]
>> !elements_
>> ( ch_p(']')[ end_array ] | eps_p[ &throw_not_array ] )
;
elements_
= value_ >> *( ',' >> value_ )
;
string_
= lexeme_d // this causes white space inside a string to be retained
[
confix_p
(
'"',
*lex_escape_ch_p,
'"'
)
]
;
number_
= strict_real_p[ new_real ]
| int64_p [ new_int ]
| uint64_p [ new_uint64 ]
;
}
spirit_namespace::rule< ScannerT > json_, object_, members_, pair_, array_, elements_, value_, string_, number_;
const spirit_namespace::rule< ScannerT >& start() const { return json_; }
};
private:
Json_grammer& operator=( const Json_grammer& ); // to prevent "assignment operator could not be generated" warning
Semantic_actions_t& actions_;
};
template< class Iter_type, class Value_type >
Iter_type read_range_or_throw( Iter_type begin, Iter_type end, Value_type& value )
{
Semantic_actions< Value_type, Iter_type > semantic_actions( value );
const spirit_namespace::parse_info< Iter_type > info =
spirit_namespace::parse( begin, end,
Json_grammer< Value_type, Iter_type >( semantic_actions ),
spirit_namespace::space_p );
if( !info.hit )
{
assert( false ); // in theory exception should already have been thrown
throw_error( info.stop, "error" );
}
return info.stop;
}
template< class Iter_type, class Value_type >
void add_posn_iter_and_read_range_or_throw( Iter_type begin, Iter_type end, Value_type& value )
{
typedef spirit_namespace::position_iterator< Iter_type > Posn_iter_t;
const Posn_iter_t posn_begin( begin, end );
const Posn_iter_t posn_end( end, end );
read_range_or_throw( posn_begin, posn_end, value );
}
template< class Iter_type, class Value_type >
bool read_range( Iter_type& begin, Iter_type end, Value_type& value )
{
try
{
begin = read_range_or_throw( begin, end, value );
return true;
}
catch( ... )
{
return false;
}
}
template< class String_type, class Value_type >
void read_string_or_throw( const String_type& s, Value_type& value )
{
add_posn_iter_and_read_range_or_throw( s.begin(), s.end(), value );
}
template< class String_type, class Value_type >
bool read_string( const String_type& s, Value_type& value )
{
typename String_type::const_iterator begin = s.begin();
return read_range( begin, s.end(), value );
}
template< class Istream_type >
struct Multi_pass_iters
{
typedef typename Istream_type::char_type Char_type;
typedef std::istream_iterator< Char_type, Char_type > istream_iter;
typedef spirit_namespace::multi_pass< istream_iter > Mp_iter;
Multi_pass_iters( Istream_type& is )
{
is.unsetf( std::ios::skipws );
begin_ = spirit_namespace::make_multi_pass( istream_iter( is ) );
end_ = spirit_namespace::make_multi_pass( istream_iter() );
}
Mp_iter begin_;
Mp_iter end_;
};
template< class Istream_type, class Value_type >
bool read_stream( Istream_type& is, Value_type& value )
{
Multi_pass_iters< Istream_type > mp_iters( is );
return read_range( mp_iters.begin_, mp_iters.end_, value );
}
template< class Istream_type, class Value_type >
void read_stream_or_throw( Istream_type& is, Value_type& value )
{
const Multi_pass_iters< Istream_type > mp_iters( is );
add_posn_iter_and_read_range_or_throw( mp_iters.begin_, mp_iters.end_, value );
}
}
#endif

View File

@@ -0,0 +1,70 @@
#ifndef JSON_SPIRIT_READ_STREAM
#define JSON_SPIRIT_READ_STREAM
// Copyright John W. Wilkinson 2007 - 2009.
// Distributed under the MIT License, see accompanying file LICENSE.txt
// json spirit version 4.03
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
#include "json_spirit_reader_template.h"
namespace json_spirit
{
// these classes allows you to read multiple top level contiguous values from a stream,
// the normal stream read functions have a bug that prevent multiple top level values
// from being read unless they are separated by spaces
template< class Istream_type, class Value_type >
class Stream_reader
{
public:
Stream_reader( Istream_type& is )
: iters_( is )
{
}
bool read_next( Value_type& value )
{
return read_range( iters_.begin_, iters_.end_, value );
}
private:
typedef Multi_pass_iters< Istream_type > Mp_iters;
Mp_iters iters_;
};
template< class Istream_type, class Value_type >
class Stream_reader_thrower
{
public:
Stream_reader_thrower( Istream_type& is )
: iters_( is )
, posn_begin_( iters_.begin_, iters_.end_ )
, posn_end_( iters_.end_, iters_.end_ )
{
}
void read_next( Value_type& value )
{
posn_begin_ = read_range_or_throw( posn_begin_, posn_end_, value );
}
private:
typedef Multi_pass_iters< Istream_type > Mp_iters;
typedef spirit_namespace::position_iterator< typename Mp_iters::Mp_iter > Posn_iter_t;
Mp_iters iters_;
Posn_iter_t posn_begin_, posn_end_;
};
}
#endif

61
json/json_spirit_utils.h Normal file
View File

@@ -0,0 +1,61 @@
#ifndef JSON_SPIRIT_UTILS
#define JSON_SPIRIT_UTILS
// Copyright John W. Wilkinson 2007 - 2009.
// Distributed under the MIT License, see accompanying file LICENSE.txt
// json spirit version 4.03
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
#include "json_spirit_value.h"
#include <map>
namespace json_spirit
{
template< class Obj_t, class Map_t >
void obj_to_map( const Obj_t& obj, Map_t& mp_obj )
{
mp_obj.clear();
for( typename Obj_t::const_iterator i = obj.begin(); i != obj.end(); ++i )
{
mp_obj[ i->name_ ] = i->value_;
}
}
template< class Obj_t, class Map_t >
void map_to_obj( const Map_t& mp_obj, Obj_t& obj )
{
obj.clear();
for( typename Map_t::const_iterator i = mp_obj.begin(); i != mp_obj.end(); ++i )
{
obj.push_back( typename Obj_t::value_type( i->first, i->second ) );
}
}
typedef std::map< std::string, Value > Mapped_obj;
#ifndef BOOST_NO_STD_WSTRING
typedef std::map< std::wstring, wValue > wMapped_obj;
#endif
template< class Object_type, class String_type >
const typename Object_type::value_type::Value_type& find_value( const Object_type& obj, const String_type& name )
{
for( typename Object_type::const_iterator i = obj.begin(); i != obj.end(); ++i )
{
if( i->name_ == name )
{
return i->value_;
}
}
return Object_type::value_type::Value_type::null;
}
}
#endif

View File

@@ -0,0 +1,8 @@
/* Copyright (c) 2007 John W Wilkinson
This source code can be used for any purpose as long as
this comment is retained. */
// json spirit version 2.00
#include "json_spirit_value.h"

534
json/json_spirit_value.h Normal file
View File

@@ -0,0 +1,534 @@
#ifndef JSON_SPIRIT_VALUE
#define JSON_SPIRIT_VALUE
// Copyright John W. Wilkinson 2007 - 2009.
// Distributed under the MIT License, see accompanying file LICENSE.txt
// json spirit version 4.03
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
#include <vector>
#include <map>
#include <string>
#include <cassert>
#include <sstream>
#include <stdexcept>
#include <boost/config.hpp>
#include <boost/cstdint.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/variant.hpp>
namespace json_spirit
{
enum Value_type{ obj_type, array_type, str_type, bool_type, int_type, real_type, null_type };
static const char* Value_type_name[]={"obj", "array", "str", "bool", "int", "real", "null"};
template< class Config > // Config determines whether the value uses std::string or std::wstring and
// whether JSON Objects are represented as vectors or maps
class Value_impl
{
public:
typedef Config Config_type;
typedef typename Config::String_type String_type;
typedef typename Config::Object_type Object;
typedef typename Config::Array_type Array;
typedef typename String_type::const_pointer Const_str_ptr; // eg const char*
Value_impl(); // creates null value
Value_impl( Const_str_ptr value );
Value_impl( const String_type& value );
Value_impl( const Object& value );
Value_impl( const Array& value );
Value_impl( bool value );
Value_impl( int value );
Value_impl( boost::int64_t value );
Value_impl( boost::uint64_t value );
Value_impl( double value );
Value_impl( const Value_impl& other );
bool operator==( const Value_impl& lhs ) const;
Value_impl& operator=( const Value_impl& lhs );
Value_type type() const;
bool is_uint64() const;
bool is_null() const;
const String_type& get_str() const;
const Object& get_obj() const;
const Array& get_array() const;
bool get_bool() const;
int get_int() const;
boost::int64_t get_int64() const;
boost::uint64_t get_uint64() const;
double get_real() const;
Object& get_obj();
Array& get_array();
template< typename T > T get_value() const; // example usage: int i = value.get_value< int >();
// or double d = value.get_value< double >();
static const Value_impl null;
private:
void check_type( const Value_type vtype ) const;
typedef boost::variant< String_type,
boost::recursive_wrapper< Object >, boost::recursive_wrapper< Array >,
bool, boost::int64_t, double > Variant;
Value_type type_;
Variant v_;
bool is_uint64_;
};
// vector objects
template< class Config >
struct Pair_impl
{
typedef typename Config::String_type String_type;
typedef typename Config::Value_type Value_type;
Pair_impl( const String_type& name, const Value_type& value );
bool operator==( const Pair_impl& lhs ) const;
String_type name_;
Value_type value_;
};
template< class String >
struct Config_vector
{
typedef String String_type;
typedef Value_impl< Config_vector > Value_type;
typedef Pair_impl < Config_vector > Pair_type;
typedef std::vector< Value_type > Array_type;
typedef std::vector< Pair_type > Object_type;
static Value_type& add( Object_type& obj, const String_type& name, const Value_type& value )
{
obj.push_back( Pair_type( name , value ) );
return obj.back().value_;
}
static String_type get_name( const Pair_type& pair )
{
return pair.name_;
}
static Value_type get_value( const Pair_type& pair )
{
return pair.value_;
}
};
// typedefs for ASCII
typedef Config_vector< std::string > Config;
typedef Config::Value_type Value;
typedef Config::Pair_type Pair;
typedef Config::Object_type Object;
typedef Config::Array_type Array;
// typedefs for Unicode
#ifndef BOOST_NO_STD_WSTRING
typedef Config_vector< std::wstring > wConfig;
typedef wConfig::Value_type wValue;
typedef wConfig::Pair_type wPair;
typedef wConfig::Object_type wObject;
typedef wConfig::Array_type wArray;
#endif
// map objects
template< class String >
struct Config_map
{
typedef String String_type;
typedef Value_impl< Config_map > Value_type;
typedef std::vector< Value_type > Array_type;
typedef std::map< String_type, Value_type > Object_type;
typedef typename Object_type::value_type Pair_type;
static Value_type& add( Object_type& obj, const String_type& name, const Value_type& value )
{
return obj[ name ] = value;
}
static String_type get_name( const Pair_type& pair )
{
return pair.first;
}
static Value_type get_value( const Pair_type& pair )
{
return pair.second;
}
};
// typedefs for ASCII
typedef Config_map< std::string > mConfig;
typedef mConfig::Value_type mValue;
typedef mConfig::Object_type mObject;
typedef mConfig::Array_type mArray;
// typedefs for Unicode
#ifndef BOOST_NO_STD_WSTRING
typedef Config_map< std::wstring > wmConfig;
typedef wmConfig::Value_type wmValue;
typedef wmConfig::Object_type wmObject;
typedef wmConfig::Array_type wmArray;
#endif
///////////////////////////////////////////////////////////////////////////////////////////////
//
// implementation
template< class Config >
const Value_impl< Config > Value_impl< Config >::null;
template< class Config >
Value_impl< Config >::Value_impl()
: type_( null_type )
, is_uint64_( false )
{
}
template< class Config >
Value_impl< Config >::Value_impl( const Const_str_ptr value )
: type_( str_type )
, v_( String_type( value ) )
, is_uint64_( false )
{
}
template< class Config >
Value_impl< Config >::Value_impl( const String_type& value )
: type_( str_type )
, v_( value )
, is_uint64_( false )
{
}
template< class Config >
Value_impl< Config >::Value_impl( const Object& value )
: type_( obj_type )
, v_( value )
, is_uint64_( false )
{
}
template< class Config >
Value_impl< Config >::Value_impl( const Array& value )
: type_( array_type )
, v_( value )
, is_uint64_( false )
{
}
template< class Config >
Value_impl< Config >::Value_impl( bool value )
: type_( bool_type )
, v_( value )
, is_uint64_( false )
{
}
template< class Config >
Value_impl< Config >::Value_impl( int value )
: type_( int_type )
, v_( static_cast< boost::int64_t >( value ) )
, is_uint64_( false )
{
}
template< class Config >
Value_impl< Config >::Value_impl( boost::int64_t value )
: type_( int_type )
, v_( value )
, is_uint64_( false )
{
}
template< class Config >
Value_impl< Config >::Value_impl( boost::uint64_t value )
: type_( int_type )
, v_( static_cast< boost::int64_t >( value ) )
, is_uint64_( true )
{
}
template< class Config >
Value_impl< Config >::Value_impl( double value )
: type_( real_type )
, v_( value )
, is_uint64_( false )
{
}
template< class Config >
Value_impl< Config >::Value_impl( const Value_impl< Config >& other )
: type_( other.type() )
, v_( other.v_ )
, is_uint64_( other.is_uint64_ )
{
}
template< class Config >
Value_impl< Config >& Value_impl< Config >::operator=( const Value_impl& lhs )
{
Value_impl tmp( lhs );
std::swap( type_, tmp.type_ );
std::swap( v_, tmp.v_ );
std::swap( is_uint64_, tmp.is_uint64_ );
return *this;
}
template< class Config >
bool Value_impl< Config >::operator==( const Value_impl& lhs ) const
{
if( this == &lhs ) return true;
if( type() != lhs.type() ) return false;
return v_ == lhs.v_;
}
template< class Config >
Value_type Value_impl< Config >::type() const
{
return type_;
}
template< class Config >
bool Value_impl< Config >::is_uint64() const
{
return is_uint64_;
}
template< class Config >
bool Value_impl< Config >::is_null() const
{
return type() == null_type;
}
template< class Config >
void Value_impl< Config >::check_type( const Value_type vtype ) const
{
if( type() != vtype )
{
std::ostringstream os;
/// satoshi: tell the types by name instead of by number
os << "value is type " << Value_type_name[type()] << ", expected " << Value_type_name[vtype];
throw std::runtime_error( os.str() );
}
}
template< class Config >
const typename Config::String_type& Value_impl< Config >::get_str() const
{
check_type( str_type );
return *boost::get< String_type >( &v_ );
}
template< class Config >
const typename Value_impl< Config >::Object& Value_impl< Config >::get_obj() const
{
check_type( obj_type );
return *boost::get< Object >( &v_ );
}
template< class Config >
const typename Value_impl< Config >::Array& Value_impl< Config >::get_array() const
{
check_type( array_type );
return *boost::get< Array >( &v_ );
}
template< class Config >
bool Value_impl< Config >::get_bool() const
{
check_type( bool_type );
return boost::get< bool >( v_ );
}
template< class Config >
int Value_impl< Config >::get_int() const
{
check_type( int_type );
return static_cast< int >( get_int64() );
}
template< class Config >
boost::int64_t Value_impl< Config >::get_int64() const
{
check_type( int_type );
return boost::get< boost::int64_t >( v_ );
}
template< class Config >
boost::uint64_t Value_impl< Config >::get_uint64() const
{
check_type( int_type );
return static_cast< boost::uint64_t >( get_int64() );
}
template< class Config >
double Value_impl< Config >::get_real() const
{
if( type() == int_type )
{
return is_uint64() ? static_cast< double >( get_uint64() )
: static_cast< double >( get_int64() );
}
check_type( real_type );
return boost::get< double >( v_ );
}
template< class Config >
typename Value_impl< Config >::Object& Value_impl< Config >::get_obj()
{
check_type( obj_type );
return *boost::get< Object >( &v_ );
}
template< class Config >
typename Value_impl< Config >::Array& Value_impl< Config >::get_array()
{
check_type( array_type );
return *boost::get< Array >( &v_ );
}
template< class Config >
Pair_impl< Config >::Pair_impl( const String_type& name, const Value_type& value )
: name_( name )
, value_( value )
{
}
template< class Config >
bool Pair_impl< Config >::operator==( const Pair_impl< Config >& lhs ) const
{
if( this == &lhs ) return true;
return ( name_ == lhs.name_ ) && ( value_ == lhs.value_ );
}
// converts a C string, ie. 8 bit char array, to a string object
//
template < class String_type >
String_type to_str( const char* c_str )
{
String_type result;
for( const char* p = c_str; *p != 0; ++p )
{
result += *p;
}
return result;
}
//
namespace internal_
{
template< typename T >
struct Type_to_type
{
};
template< class Value >
int get_value( const Value& value, Type_to_type< int > )
{
return value.get_int();
}
template< class Value >
boost::int64_t get_value( const Value& value, Type_to_type< boost::int64_t > )
{
return value.get_int64();
}
template< class Value >
boost::uint64_t get_value( const Value& value, Type_to_type< boost::uint64_t > )
{
return value.get_uint64();
}
template< class Value >
double get_value( const Value& value, Type_to_type< double > )
{
return value.get_real();
}
template< class Value >
typename Value::String_type get_value( const Value& value, Type_to_type< typename Value::String_type > )
{
return value.get_str();
}
template< class Value >
typename Value::Array get_value( const Value& value, Type_to_type< typename Value::Array > )
{
return value.get_array();
}
template< class Value >
typename Value::Object get_value( const Value& value, Type_to_type< typename Value::Object > )
{
return value.get_obj();
}
template< class Value >
bool get_value( const Value& value, Type_to_type< bool > )
{
return value.get_bool();
}
}
template< class Config >
template< typename T >
T Value_impl< Config >::get_value() const
{
return internal_::get_value( *this, internal_::Type_to_type< T >() );
}
}
#endif

View File

@@ -0,0 +1,95 @@
// Copyright John W. Wilkinson 2007 - 2009.
// Distributed under the MIT License, see accompanying file LICENSE.txt
// json spirit version 4.03
#include "json_spirit_writer.h"
#include "json_spirit_writer_template.h"
void json_spirit::write( const Value& value, std::ostream& os )
{
write_stream( value, os, false );
}
void json_spirit::write_formatted( const Value& value, std::ostream& os )
{
write_stream( value, os, true );
}
std::string json_spirit::write( const Value& value )
{
return write_string( value, false );
}
std::string json_spirit::write_formatted( const Value& value )
{
return write_string( value, true );
}
#ifndef BOOST_NO_STD_WSTRING
void json_spirit::write( const wValue& value, std::wostream& os )
{
write_stream( value, os, false );
}
void json_spirit::write_formatted( const wValue& value, std::wostream& os )
{
write_stream( value, os, true );
}
std::wstring json_spirit::write( const wValue& value )
{
return write_string( value, false );
}
std::wstring json_spirit::write_formatted( const wValue& value )
{
return write_string( value, true );
}
#endif
void json_spirit::write( const mValue& value, std::ostream& os )
{
write_stream( value, os, false );
}
void json_spirit::write_formatted( const mValue& value, std::ostream& os )
{
write_stream( value, os, true );
}
std::string json_spirit::write( const mValue& value )
{
return write_string( value, false );
}
std::string json_spirit::write_formatted( const mValue& value )
{
return write_string( value, true );
}
#ifndef BOOST_NO_STD_WSTRING
void json_spirit::write( const wmValue& value, std::wostream& os )
{
write_stream( value, os, false );
}
void json_spirit::write_formatted( const wmValue& value, std::wostream& os )
{
write_stream( value, os, true );
}
std::wstring json_spirit::write( const wmValue& value )
{
return write_string( value, false );
}
std::wstring json_spirit::write_formatted( const wmValue& value )
{
return write_string( value, true );
}
#endif

50
json/json_spirit_writer.h Normal file
View File

@@ -0,0 +1,50 @@
#ifndef JSON_SPIRIT_WRITER
#define JSON_SPIRIT_WRITER
// Copyright John W. Wilkinson 2007 - 2009.
// Distributed under the MIT License, see accompanying file LICENSE.txt
// json spirit version 4.03
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
#include "json_spirit_value.h"
#include <iostream>
namespace json_spirit
{
// functions to convert JSON Values to text,
// the "formatted" versions add whitespace to format the output nicely
void write ( const Value& value, std::ostream& os );
void write_formatted( const Value& value, std::ostream& os );
std::string write ( const Value& value );
std::string write_formatted( const Value& value );
#ifndef BOOST_NO_STD_WSTRING
void write ( const wValue& value, std::wostream& os );
void write_formatted( const wValue& value, std::wostream& os );
std::wstring write ( const wValue& value );
std::wstring write_formatted( const wValue& value );
#endif
void write ( const mValue& value, std::ostream& os );
void write_formatted( const mValue& value, std::ostream& os );
std::string write ( const mValue& value );
std::string write_formatted( const mValue& value );
#ifndef BOOST_NO_STD_WSTRING
void write ( const wmValue& value, std::wostream& os );
void write_formatted( const wmValue& value, std::wostream& os );
std::wstring write ( const wmValue& value );
std::wstring write_formatted( const wmValue& value );
#endif
}
#endif

View File

@@ -0,0 +1,245 @@
#ifndef JSON_SPIRIT_WRITER_TEMPLATE
#define JSON_SPIRIT_WRITER_TEMPLATE
// Copyright John W. Wilkinson 2007 - 2009.
// Distributed under the MIT License, see accompanying file LICENSE.txt
// json spirit version 4.03
#include "json_spirit_value.h"
#include <cassert>
#include <sstream>
#include <iomanip>
namespace json_spirit
{
inline char to_hex_char( unsigned int c )
{
assert( c <= 0xF );
const char ch = static_cast< char >( c );
if( ch < 10 ) return '0' + ch;
return 'A' - 10 + ch;
}
template< class String_type >
String_type non_printable_to_string( unsigned int c )
{
typedef typename String_type::value_type Char_type;
String_type result( 6, '\\' );
result[1] = 'u';
result[ 5 ] = to_hex_char( c & 0x000F ); c >>= 4;
result[ 4 ] = to_hex_char( c & 0x000F ); c >>= 4;
result[ 3 ] = to_hex_char( c & 0x000F ); c >>= 4;
result[ 2 ] = to_hex_char( c & 0x000F );
return result;
}
template< typename Char_type, class String_type >
bool add_esc_char( Char_type c, String_type& s )
{
switch( c )
{
case '"': s += to_str< String_type >( "\\\"" ); return true;
case '\\': s += to_str< String_type >( "\\\\" ); return true;
case '\b': s += to_str< String_type >( "\\b" ); return true;
case '\f': s += to_str< String_type >( "\\f" ); return true;
case '\n': s += to_str< String_type >( "\\n" ); return true;
case '\r': s += to_str< String_type >( "\\r" ); return true;
case '\t': s += to_str< String_type >( "\\t" ); return true;
}
return false;
}
template< class String_type >
String_type add_esc_chars( const String_type& s )
{
typedef typename String_type::const_iterator Iter_type;
typedef typename String_type::value_type Char_type;
String_type result;
const Iter_type end( s.end() );
for( Iter_type i = s.begin(); i != end; ++i )
{
const Char_type c( *i );
if( add_esc_char( c, result ) ) continue;
const wint_t unsigned_c( ( c >= 0 ) ? c : 256 + c );
if( iswprint( unsigned_c ) )
{
result += c;
}
else
{
result += non_printable_to_string< String_type >( unsigned_c );
}
}
return result;
}
// this class generates the JSON text,
// it keeps track of the indentation level etc.
//
template< class Value_type, class Ostream_type >
class Generator
{
typedef typename Value_type::Config_type Config_type;
typedef typename Config_type::String_type String_type;
typedef typename Config_type::Object_type Object_type;
typedef typename Config_type::Array_type Array_type;
typedef typename String_type::value_type Char_type;
typedef typename Object_type::value_type Obj_member_type;
public:
Generator( const Value_type& value, Ostream_type& os, bool pretty )
: os_( os )
, indentation_level_( 0 )
, pretty_( pretty )
{
output( value );
}
private:
void output( const Value_type& value )
{
switch( value.type() )
{
case obj_type: output( value.get_obj() ); break;
case array_type: output( value.get_array() ); break;
case str_type: output( value.get_str() ); break;
case bool_type: output( value.get_bool() ); break;
case int_type: output_int( value ); break;
case real_type: os_ << std::showpoint << std::setprecision( 16 )
<< value.get_real(); break;
case null_type: os_ << "null"; break;
default: assert( false );
}
}
void output( const Object_type& obj )
{
output_array_or_obj( obj, '{', '}' );
}
void output( const Array_type& arr )
{
output_array_or_obj( arr, '[', ']' );
}
void output( const Obj_member_type& member )
{
output( Config_type::get_name( member ) ); space();
os_ << ':'; space();
output( Config_type::get_value( member ) );
}
void output_int( const Value_type& value )
{
if( value.is_uint64() )
{
os_ << value.get_uint64();
}
else
{
os_ << value.get_int64();
}
}
void output( const String_type& s )
{
os_ << '"' << add_esc_chars( s ) << '"';
}
void output( bool b )
{
os_ << to_str< String_type >( b ? "true" : "false" );
}
template< class T >
void output_array_or_obj( const T& t, Char_type start_char, Char_type end_char )
{
os_ << start_char; new_line();
++indentation_level_;
for( typename T::const_iterator i = t.begin(); i != t.end(); ++i )
{
indent(); output( *i );
typename T::const_iterator next = i;
if( ++next != t.end())
{
os_ << ',';
}
new_line();
}
--indentation_level_;
indent(); os_ << end_char;
}
void indent()
{
if( !pretty_ ) return;
for( int i = 0; i < indentation_level_; ++i )
{
os_ << " ";
}
}
void space()
{
if( pretty_ ) os_ << ' ';
}
void new_line()
{
if( pretty_ ) os_ << '\n';
}
Generator& operator=( const Generator& ); // to prevent "assignment operator could not be generated" warning
Ostream_type& os_;
int indentation_level_;
bool pretty_;
};
template< class Value_type, class Ostream_type >
void write_stream( const Value_type& value, Ostream_type& os, bool pretty )
{
Generator< Value_type, Ostream_type >( value, os, pretty );
}
template< class Value_type >
typename Value_type::String_type write_string( const Value_type& value, bool pretty )
{
typedef typename Value_type::String_type::value_type Char_type;
std::basic_ostringstream< Char_type > os;
write_stream( value, os, pretty );
return os.str();
}
}
#endif

2
key.h
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2009 Satoshi Nakamoto
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.

View File

@@ -1,4 +1,4 @@
Copyright (c) 2009 Satoshi Nakamoto
Copyright (c) 2009-2010 Satoshi Nakamoto
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

Binary file not shown.

View File

@@ -0,0 +1,805 @@
# DataWraith <DataWraith@web.de>, 2010.
msgid ""
msgstr ""
"POT-Creation-Date: 2010-05-26 22:02-0000\n"
"PO-Revision-Date: 2010-06-03 13:11+0200\n"
"Last-Translator: DataWraith\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-KeywordsList: _;gettext;gettext_noop\n"
"X-Poedit-Basepath: .\n"
"X-Poedit-SearchPath-0: ../../..\n"
"X-Generator: Lokalize 1.0\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
#: ../../../init.cpp:342
msgid "Usage: bitcoin [options]"
msgstr "Verwendung: bitcoin [optionen]"
#: ../../../init.cpp:343
msgid "Options:\n"
msgstr "Optionen:\n"
#: ../../../init.cpp:344
msgid "Generate coins\n"
msgstr "Münzen erzeugen\n"
#: ../../../init.cpp:345
msgid "Don't generate coins\n"
msgstr "Keine Münzen erzeugen\n"
#: ../../../init.cpp:346
msgid "Start minimized\n"
msgstr "Minimiert starten\n"
#: ../../../init.cpp:347
msgid "Specify data directory\n"
msgstr "Datenverzeichnis festlegen\n"
#: ../../../init.cpp:348
msgid "Connect through socks4 proxy\n"
msgstr "Socks4 Proxy verwenden\n"
#: ../../../init.cpp:349
msgid "Add a node to connect to\n"
msgstr "Einen Teilnehmer hinzufügen, zu dem verbunden werden soll\n"
#: ../../../init.cpp:350
msgid "Connect only to the specified node\n"
msgstr "Nur zu dem angegebenen Teilnehmer verbinden\n"
#: ../../../init.cpp:351
msgid "This help message\n"
msgstr "Diese Anleitung\n"
#: ../../../init.cpp:455
msgid "Error loading addr.dat \n"
msgstr "Fehler beim Laden von addr.dat \n"
#: ../../../init.cpp:461
msgid "Error loading blkindex.dat \n"
msgstr "Fehler beim Laden von blkindex.dat \n"
#: ../../../init.cpp:468
msgid "Error loading wallet.dat \n"
msgstr "Fehler beim Laden von wallet.dat \n"
#: ../../../init.cpp:536
msgid "Invalid -proxy address"
msgstr "Ungültige -Proxy Adresse"
#: ../../../init.cpp:629
msgid "Program has crashed and will terminate. "
msgstr "Das Programm ist abgestürzt und wird beendet. "
#: ../../../main.cpp:1465
msgid "Warning: Disk space is low "
msgstr "Warnung: Festplatte fast voll "
#: ../../../main.cpp:2994
#, c-format
msgid "Error: This is an oversized transaction that requires a transaction fee of %s "
msgstr "Fehler: Die Überweisung ist sehr groß. Es wird eine Gebühr von %s erhoben. "
#: ../../../main.cpp:2996
msgid "Error: Transaction creation failed "
msgstr "Fehler: Überweisung konnte nicht erzeugt werden. "
#: ../../../main.cpp:3001
#: ../../../ui.cpp:1761
#: ../../../ui.cpp:1763
#: ../../../ui.cpp:1904
#: ../../../ui.cpp:2053
msgid "Sending..."
msgstr "Überweise..."
#: ../../../main.cpp:3005
msgid "Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."
msgstr "Fehler: Die Überweisung wurde abgelehnt. Das kann passieren, wenn einige der Münzen in Ihrer Brieftasche bereits ausgegeben wurden, z.B. weil Sie eine Kopie der Brieftasche (wallet.dat) gemacht haben. Bitcoins, die mithilfe der Kopie ausgegeben wurden, sind in dieser Brieftasche noch nicht als ausgegeben markiert worden."
#: ../../../main.cpp:3017
msgid "Invalid amount"
msgstr "Ungültiger Betrag"
#: ../../../main.cpp:3019
#: ../../../ui.cpp:1971
#: ../../../ui.cpp:2038
msgid "Insufficient funds"
msgstr "Unzureichende Geldmittel"
#: ../../../main.cpp:3024
msgid "Invalid bitcoin address"
msgstr "Ungültige Bitcoin-Adresse"
#: ../../../ui.cpp:189
#, c-format
msgid "This transaction is over the size limit. You can still send it for a fee of %s, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?"
msgstr "Diese Überweisung übersteigt das Betragslimit. Sie können sie trotzdem tätigen, aber es wird eine Gebühr von %s erhoben, die an den Teilnehmer ausgeschüttet wird, der Ihre Überweisung bearbeitet und dadurch hilft das Netzwerk am laufen zu halten. Möchten Sie die Gebühr entrichten?"
#: ../../../ui.cpp:285
msgid "Status"
msgstr "Status"
#: ../../../ui.cpp:286
msgid "Date"
msgstr "Datum"
#: ../../../ui.cpp:287
msgid "Description"
msgstr "Beschreibung"
#: ../../../ui.cpp:288
msgid "Debit"
msgstr "Belastungen"
#: ../../../ui.cpp:289
msgid "Credit"
msgstr "Gutschriften"
#: ../../../ui.cpp:489
#, c-format
msgid "Open for %d blocks"
msgstr "Offen für %d Blöcke"
#: ../../../ui.cpp:491
#, c-format
msgid "Open until %s"
msgstr "Offen bis %s"
#: ../../../ui.cpp:497
#, c-format
msgid "%d/offline?"
msgstr "%d/Offline?"
#: ../../../ui.cpp:499
#, c-format
msgid "%d/unconfirmed"
msgstr "%d/nicht bestätigt"
#: ../../../ui.cpp:501
#, c-format
msgid "%d confirmations"
msgstr "%d Bestätigungen"
#: ../../../ui.cpp:584
msgid "Generated"
msgstr "Erzeugt"
#: ../../../ui.cpp:592
#, c-format
msgid "Generated (%s matures in %d more blocks)"
msgstr "Erzeugt (%s reifen nach %d weiteren Blöcken)"
#: ../../../ui.cpp:596
msgid "Generated - Warning: This block was not received by any other nodes and will probably not be accepted!"
msgstr "Erzeugt - Warnung: Dieser Block wurde von keinem anderen Teilnehmer empfangen und wird wahrscheinlich nicht akzeptiert werden!"
#: ../../../ui.cpp:600
msgid "Generated (not accepted)"
msgstr "Erzeugt (nicht akzeptiert)"
#: ../../../ui.cpp:610
msgid "From: "
msgstr "Von: "
#: ../../../ui.cpp:634
msgid "From: unknown, Received with: "
msgstr "Von: Unbekannt, Empfangen durch: "
#: ../../../ui.cpp:676
msgid "Payment to yourself"
msgstr "Überweisung an Sie selbst"
#: ../../../ui.cpp:713
msgid "To: "
msgstr "An: "
#: ../../../ui.cpp:1009
msgid " Generating"
msgstr " Erzeugen"
#: ../../../ui.cpp:1011
msgid "(not connected)"
msgstr "(nicht verbunden)"
#: ../../../ui.cpp:1014
#, c-format
msgid " %d connections %d blocks %d transactions"
msgstr " %d Verbindungen %d Blöcke %d Überweisungen"
#: ../../../ui.cpp:1123
#: ../../../ui.cpp:2351
msgid "New Receiving Address"
msgstr "&Neue Empfangs-Adresse"
#: ../../../ui.cpp:1124
#: ../../../ui.cpp:2352
msgid ""
"It's good policy to use a new address for each payment you receive.\n"
"\n"
"Label"
msgstr ""
"Am besten verwenden Sie für jede Zahlung die Sie erhalten eine neue Adresse.\n"
"\n"
"Beschreibung"
#: ../../../ui.cpp:1193
msgid "<b>Status:</b> "
msgstr "<b>Status:</b> "
#: ../../../ui.cpp:1198
msgid ", has not been successfully broadcast yet"
msgstr ", wurde noch nicht erfolgreich übertragen"
#: ../../../ui.cpp:1200
#, c-format
msgid ", broadcast through %d node"
msgstr ", durch %d Teilnehmer übertragen"
#: ../../../ui.cpp:1202
#, c-format
msgid ", broadcast through %d nodes"
msgstr ", durch %d Teilnehmer übertragen"
#: ../../../ui.cpp:1206
msgid "<b>Date:</b> "
msgstr "<b>Datum</b> "
#: ../../../ui.cpp:1214
msgid "<b>Source:</b> Generated<br>"
msgstr "<b>Quelle:</b>Erzeugt<br>"
#: ../../../ui.cpp:1220
#: ../../../ui.cpp:1238
msgid "<b>From:</b> "
msgstr "<b>Von:</b> "
#: ../../../ui.cpp:1238
msgid "unknown"
msgstr "Unbekannt"
#: ../../../ui.cpp:1239
#: ../../../ui.cpp:1263
#: ../../../ui.cpp:1322
msgid "<b>To:</b> "
msgstr "<b>An:</b> "
#: ../../../ui.cpp:1242
msgid " (yours, label: "
msgstr " (Eigene, Beschreibung: "
#: ../../../ui.cpp:1244
msgid " (yours)"
msgstr " (Eigene)"
#: ../../../ui.cpp:1281
#: ../../../ui.cpp:1293
#: ../../../ui.cpp:1356
msgid "<b>Credit:</b> "
msgstr "<b>Gutschrift:</b> "
#: ../../../ui.cpp:1283
#, c-format
msgid "(%s matures in %d more blocks)"
msgstr "(%s reifen nach %d weiteren Blöcken)"
#: ../../../ui.cpp:1285
msgid "(not accepted)"
msgstr "(nicht akzeptiert)"
#: ../../../ui.cpp:1330
#: ../../../ui.cpp:1353
msgid "<b>Debit:</b> "
msgstr "<b>Belastung:</b> "
#: ../../../ui.cpp:1344
msgid "<b>Transaction fee:</b> "
msgstr "<b>Überweisungsgebühr:</b> "
#: ../../../ui.cpp:1360
msgid "<b>Net amount:</b> "
msgstr "<b>Nettobetrag:</b> "
#: ../../../ui.cpp:1367
msgid "Message:"
msgstr "Nachricht:"
#: ../../../ui.cpp:1370
msgid "Generated coins must wait 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, it will change to \"not accepted\" and not be spendable. This may occasionally happen if another node generates a block within a few seconds of yours."
msgstr ""
"Erzeugte Münzen müssen 120 Blöcke lang reifen. Als Sie diesen Block erzeugt haben, wurde er an alle Teilnehmer übertragen, damit er zur Block-Kette hinzugefügt werden kann. Falls der Block es nicht in die Block-Kette schafft, wird die Beschreibung zu \"nicht akzeptiert\" geändert, und Sie können die Münzen nicht ausgeben. Dies kann manchmal "
"passieren, wenn Sie und ein anderer Teilnehmer annähernd zeitgleich einen Block erzeugen."
#: ../../../ui.cpp:1437
msgid "Main"
msgstr "Haupt"
#: ../../../ui.cpp:1442
msgid "&Minimize on close"
msgstr "Beim schließen &Minimieren"
#: ../../../ui.cpp:1595
#, c-format
msgid "version 0.%d.%d beta"
msgstr "Version 0.%d.%d Beta"
#: ../../../ui.cpp:1681
msgid "Will appear as \"From: Unknown\""
msgstr "Wird als \"Von: Unbekannt\" erscheinen"
#: ../../../ui.cpp:1682
msgid "Can't include a message when sending to a Bitcoin address"
msgstr "Beim überweisen an eine Bitcoin-Adresse kann keine Nachricht angegeben werden."
#: ../../../ui.cpp:1735
msgid "Error in amount "
msgstr "Fehler in Betrag "
#: ../../../ui.cpp:1735
#: ../../../ui.cpp:1740
#: ../../../ui.cpp:1745
#: ../../../ui.cpp:1771
#: ../../../uibase.cpp:61
msgid "Send Coins"
msgstr "Überweisen"
#: ../../../ui.cpp:1740
msgid "Amount exceeds your balance "
msgstr "Der Betrag übersteigt Ihr Guthaben "
#: ../../../ui.cpp:1745
msgid "Total exceeds your balance when the "
msgstr "Der Betrag übersteigt Ihr Guthaben, wenn man die Überweisungsgebühr von "
#: ../../../ui.cpp:1745
msgid " transaction fee is included "
msgstr " berücksichtigt "
#: ../../../ui.cpp:1761
msgid "Payment sent "
msgstr "Zahlung überwiesen "
#: ../../../ui.cpp:1771
msgid "Invalid address "
msgstr "Ungültige Adresse "
#: ../../../ui.cpp:1825
#, c-format
msgid "Sending %s to %s"
msgstr "Überweise %s an %s"
#: ../../../ui.cpp:1898
#: ../../../ui.cpp:1931
msgid "CANCELLED"
msgstr "ANNULLIERT"
#: ../../../ui.cpp:1902
msgid "Cancelled"
msgstr "Annulliert"
#: ../../../ui.cpp:1904
msgid "Transfer cancelled "
msgstr "Überweisung annulliert "
#: ../../../ui.cpp:1957
msgid "Error: "
msgstr "Fehler: "
#: ../../../ui.cpp:1976
msgid "Connecting..."
msgstr "Verbinde..."
#: ../../../ui.cpp:1981
msgid "Unable to connect"
msgstr "Kann nicht verbinden"
#: ../../../ui.cpp:1986
msgid "Requesting public key..."
msgstr "Fordere öffentlichen Schlüssel an..."
#: ../../../ui.cpp:1998
msgid "Received public key..."
msgstr "Öffentlichen Schlüssel empfangen..."
#: ../../../ui.cpp:2010
msgid "Transfer was not accepted"
msgstr "Überweisung wurde nicht akzeptiert"
#: ../../../ui.cpp:2019
msgid "Invalid response received"
msgstr "Ungültige Antwort erhalten"
#: ../../../ui.cpp:2034
msgid "Creating transaction..."
msgstr "Erstelle Überweisung..."
#: ../../../ui.cpp:2046
#, c-format
msgid "This is an oversized transaction that requires a transaction fee of %s"
msgstr "Die Überweisung ist sehr groß. Es wird eine Gebühr von %s erhoben."
#: ../../../ui.cpp:2048
msgid "Transaction creation failed"
msgstr "Überweisung konnte nicht erzeugt werden."
#: ../../../ui.cpp:2055
msgid "Transaction aborted"
msgstr "Überweisung abgebrochen"
#: ../../../ui.cpp:2063
msgid "Lost connection, transaction cancelled"
msgstr "Verbindung verloren, Überweisungsvorgang abgebrochen"
#: ../../../ui.cpp:2079
msgid "Sending payment..."
msgstr "Überweise Zahlung..."
#: ../../../ui.cpp:2085
msgid "The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."
msgstr "Die Überweisung wurde abgelehnt. Das kann passieren, wenn einige der Münzen in Ihrer Brieftasche bereits ausgegeben wurden, z.B. weil Sie eine Kopie der Brieftasche (wallet.dat) gemacht haben. Bitcoins, die mithilfe der Kopie ausgegeben wurden, sind in dieser Brieftasche noch nicht als ausgegeben markiert worden."
#: ../../../ui.cpp:2092
msgid "Waiting for confirmation..."
msgstr "Warte auf Bestätigung..."
#: ../../../ui.cpp:2110
msgid ""
"The payment was sent, but the recipient was unable to verify it.\n"
"The transaction is recorded and will credit to the recipient,\n"
"but the comment information will be blank."
msgstr ""
"Die Zahlung wurde überwiesen, aber der Empfänger konnte sie nicht bestätigen.\n"
"Die Überweisung wurde gespeichert und wird dem Empfänger gutgeschrieben,\n"
"aber die begleitende Nachricht wird nicht ankommen."
#: ../../../ui.cpp:2119
msgid "Payment was sent, but an invalid response was received"
msgstr "Die Zahlung wurde überwiesen, aber die Antwort war fehlerhaft"
#: ../../../ui.cpp:2125
msgid "Payment completed"
msgstr "Zahlung ausgeführt"
#: ../../../ui.cpp:2156
#: ../../../ui.cpp:2302
#: ../../../ui.cpp:2339
msgid "Name"
msgstr "Name"
#: ../../../ui.cpp:2157
#: ../../../ui.cpp:2302
#: ../../../ui.cpp:2339
msgid "Address"
msgstr "Adresse"
#: ../../../ui.cpp:2159
#: ../../../ui.cpp:2314
msgid "Label"
msgstr "Beschreibung"
#: ../../../ui.cpp:2160
#: ../../../uibase.cpp:908
msgid "Bitcoin Address"
msgstr "Bitcoin-Adresse"
#: ../../../ui.cpp:2284
msgid "This is one of your own addresses for receiving payments and cannot be entered in the address book. "
msgstr "Dies ist eine Ihrer eigenen Adressen für den Zahlungseingang und kann deshalb nicht in das Adressbuch übernommen werden. "
#: ../../../ui.cpp:2302
#: ../../../ui.cpp:2308
msgid "Edit Address"
msgstr "Adresse bearbeiten"
#: ../../../ui.cpp:2314
msgid "Edit Address Label"
msgstr "Beschreibung der Adresse bearbeiten"
#: ../../../ui.cpp:2339
#: ../../../ui.cpp:2345
msgid "Add Address"
msgstr "Adresse hinzufügen"
#: ../../../ui.cpp:2421
msgid "Bitcoin"
msgstr "Bitcoin"
#: ../../../ui.cpp:2423
msgid "Bitcoin - Generating"
msgstr "Bitcoin - Erzeuge"
#: ../../../ui.cpp:2425
msgid "Bitcoin - (not connected)"
msgstr "Bitcoin - (nicht verbunden)"
#: ../../../ui.cpp:2500
msgid "&Open Bitcoin"
msgstr "Bitcoin Ö&ffnen"
#: ../../../ui.cpp:2501
msgid "O&ptions..."
msgstr "O&ptionen..."
#: ../../../ui.cpp:2502
#: ../../../uibase.cpp:34
msgid "&Generate Coins"
msgstr "Münzen Er&zeugen"
#: ../../../ui.cpp:2505
#: ../../../uibase.cpp:27
msgid "E&xit"
msgstr "B&eenden"
#: ../../../uibase.cpp:30
msgid "&File"
msgstr "&Datei"
#: ../../../uibase.cpp:38
msgid "&Your Receiving Addresses..."
msgstr "&Ihre Empfangs-Adressen..."
#: ../../../uibase.cpp:42
msgid "&Options..."
msgstr "&Optionen..."
#: ../../../uibase.cpp:45
msgid "&Settings"
msgstr "&Einstellungen"
#: ../../../uibase.cpp:49
msgid "&About..."
msgstr "Ü&ber..."
#: ../../../uibase.cpp:52
msgid "&Help"
msgstr "&Hilfe"
#: ../../../uibase.cpp:62
msgid "Address Book"
msgstr "Adressbuch"
#: ../../../uibase.cpp:77
msgid "Your Bitcoin Address:"
msgstr "Ihre Bitcoin-Adresse:"
#: ../../../uibase.cpp:84
msgid " &New... "
msgstr " &Neu... "
#: ../../../uibase.cpp:87
#: ../../../uibase.cpp:851
#: ../../../uibase.cpp:954
msgid " &Copy to Clipboard "
msgstr " In die Zwischenablage &kopieren "
#: ../../../uibase.cpp:102
msgid "Balance:"
msgstr "Kontostand:"
#: ../../../uibase.cpp:121
msgid " All"
msgstr " Alle"
#: ../../../uibase.cpp:121
msgid " Sent"
msgstr " Überwiesen"
#: ../../../uibase.cpp:121
msgid " Received"
msgstr " Erhalten"
#: ../../../uibase.cpp:121
msgid " In Progress"
msgstr " In Bearbeitung"
#: ../../../uibase.cpp:142
msgid "All Transactions"
msgstr "Alle Überweisungen"
#: ../../../uibase.cpp:153
msgid "Sent/Received"
msgstr "Überwiesen/Erhalten"
#: ../../../uibase.cpp:164
msgid "Sent"
msgstr "Überwiesen"
#: ../../../uibase.cpp:175
msgid "Received"
msgstr "Erhalten"
#: ../../../uibase.cpp:318
#: ../../../uibase.cpp:479
#: ../../../uibase.cpp:580
#: ../../../uibase.cpp:793
#: ../../../uibase.cpp:854
#: ../../../uibase.cpp:963
#: ../../../uibase.cpp:1052
msgid "OK"
msgstr "OK"
#: ../../../uibase.cpp:361
msgid "Optional transaction fee you give to the nodes that process your transactions."
msgstr "Optionale Überweisungsgebühr, die Sie an den Teilnehmer entrichten, der Ihre Überweisungen bearbeitet."
#: ../../../uibase.cpp:370
msgid "Transaction fee:"
msgstr "Überweisungsgebühr:"
#: ../../../uibase.cpp:386
msgid "&Limit coin generation to"
msgstr "Erzeugung von Münzen auf"
#: ../../../uibase.cpp:393
msgid "processors"
msgstr "Prozessoren &beschränken"
#: ../../../uibase.cpp:399
msgid "&Start Bitcoin on system startup"
msgstr "Bitcoin beim &Systemstart ausführen"
#: ../../../uibase.cpp:403
msgid "&Minimize to the tray instead of the taskbar"
msgstr "In den Infobereich statt in die Taskleiste &minimieren"
#: ../../../uibase.cpp:407
msgid "M&inimize to the tray on close"
msgstr "Beim schließen in den Infobereich m&inimieren"
#: ../../../uibase.cpp:414
msgid "&Connect through socks4 proxy: "
msgstr "&Verbinden per Socks4-Proxy: "
#: ../../../uibase.cpp:426
msgid "Proxy &IP:"
msgstr "Proxy &IP:"
#: ../../../uibase.cpp:434
msgid " &Port:"
msgstr " &Port:"
#: ../../../uibase.cpp:456
msgid "// [don't translate] Test panel 2 for future expansion"
msgstr ""
#: ../../../uibase.cpp:460
msgid "// [don't translate] Let's not start multiple pages until the first page is filled up"
msgstr ""
#: ../../../uibase.cpp:482
#: ../../../uibase.cpp:735
#: ../../../uibase.cpp:798
#: ../../../uibase.cpp:857
#: ../../../uibase.cpp:966
#: ../../../uibase.cpp:1055
msgid "Cancel"
msgstr "Abbrechen"
#: ../../../uibase.cpp:485
msgid "&Apply"
msgstr "&Anwenden"
#: ../../../uibase.cpp:546
msgid "Bitcoin "
msgstr "Bitcoin "
#: ../../../uibase.cpp:552
msgid "version"
msgstr "Version"
#: ../../../uibase.cpp:563
msgid ""
"Copyright (c) 2009-2010 Satoshi Nakamoto.\n"
"\n"
"Distributed under the MIT/X11 software license, see the accompanying file \n"
"license.txt or http://www.opensource.org/licenses/mit-license.php.\n"
"\n"
"This product includes software developed by the OpenSSL Project for use in the \n"
"OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by \n"
"Eric Young (eay@cryptsoft.com)."
msgstr ""
"Copyright (c) 2009-2010 Satoshi Nakamoto.\n"
"\n"
"Lizensiert unter der MIT/X11 Software-Lizenz. Beachten Sie die beiliegende\n"
"Datei license.txt oder http://www.opensource.org/licenses/mit-license.php.\n"
"\n"
"Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Nutzung im\n"
"OpenSSL Toolkit (http://www.openssl.org/) geschrieben wurde sowie\n"
"kryptographische Software von Eric Young (eay@cryptsoft.com)."
#: ../../../uibase.cpp:619
msgid "Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L) or IP address (e.g. 123.45.6.7)"
msgstr "Geben Sie eine Bitcoin-Adresse (z.B. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L) oder IP-Adresse (z.B. 123.45.6.7) ein"
#: ../../../uibase.cpp:633
msgid "Pay &To:"
msgstr "Überweisen &An:"
#: ../../../uibase.cpp:648
msgid "&Paste"
msgstr "&Einfügen"
#: ../../../uibase.cpp:651
msgid " Address &Book..."
msgstr " Address&buch..."
#: ../../../uibase.cpp:658
msgid "&Amount:"
msgstr "&Betrag:"
#: ../../../uibase.cpp:668
msgid "T&ransfer:"
msgstr "Ü&berweisung:"
#: ../../../uibase.cpp:674
msgid " Standard"
msgstr " Standard"
#: ../../../uibase.cpp:696
msgid "&From:"
msgstr "&Von:"
#: ../../../uibase.cpp:713
msgid "&Message:"
msgstr "&Nachricht:"
#: ../../../uibase.cpp:730
msgid "&Send"
msgstr "Ü&berweisen"
#: ../../../uibase.cpp:782
msgid ""
"\n"
"\n"
"Connecting..."
msgstr ""
"\n"
"\n"
"Verbinde..."
#: ../../../uibase.cpp:832
msgid "These are your Bitcoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you. The highlighted address is displayed in the main window."
msgstr "Dies sind Ihre Bitcoin-Adressen zum Empfang von Zahlungen. Sie sollten vielleicht jedem Überweisenden eine andere Adresse geben um nachvollziehen zu können von wem eine Zahlung stammt. Die markierte Adresse wird im Hauptfenster angezeigt."
#: ../../../uibase.cpp:845
#: ../../../uibase.cpp:957
msgid "&Edit..."
msgstr "&Bearbeiten..."
#: ../../../uibase.cpp:848
#: ../../../uibase.cpp:960
msgid " &New Address... "
msgstr " &Neue Adresse... "
#: ../../../uibase.cpp:920
msgid "Sending"
msgstr "Überweise"
#: ../../../uibase.cpp:928
msgid "These are your Bitcoin addresses for receiving payments. You can give a different one to each sender to keep track of who is paying you. The highlighted address will be displayed in the main window."
msgstr "Dies sind Ihre Bitcoin-Adressen zum Empfang von Zahlungen. Sie können jedem Überweisenden eine andere Adresse geben um nachvollziehen zu können von wem eine Zahlung stammt. Die markierte Adresse wird im Hauptfenster angezeigt."
#: ../../../uibase.cpp:941
msgid "Receiving"
msgstr "Empfange"
#: ../../../uibase.cpp:951
msgid "&Delete"
msgstr "&Löschen"
#: ../../../uibase.h:150
msgid "Transaction Details"
msgstr "Überweisungsdetails"
#: ../../../uibase.h:203
msgid "Options"
msgstr "Optionen"
#: ../../../uibase.h:231
msgid "About Bitcoin"
msgstr "Über Bitcoin"
#: ../../../uibase.h:341
msgid "Your Bitcoin Addresses"
msgstr "Ihre Bitcoin-Adressen"

Binary file not shown.

View File

@@ -0,0 +1,803 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-05-26 22:02-0000\n"
"PO-Revision-Date: 2010-05-27 13:01+0100\n"
"Last-Translator: Franco Cimatti <hostfat@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-KeywordsList: _;gettext;gettext_noop\n"
"X-Poedit-Basepath: .\n"
"X-Poedit-SearchPath-0: ../../..\n"
#: ../../../init.cpp:342
msgid "Usage: bitcoin [options]"
msgstr "Uso: bitcoin [options]"
#: ../../../init.cpp:343
msgid "Options:\n"
msgstr "Opzioni:\n"
#: ../../../init.cpp:344
msgid "Generate coins\n"
msgstr "Genera monete\n"
#: ../../../init.cpp:345
msgid "Don't generate coins\n"
msgstr "Non generare monete\n"
#: ../../../init.cpp:346
msgid "Start minimized\n"
msgstr "Avvia minimizzato\n"
#: ../../../init.cpp:347
msgid "Specify data directory\n"
msgstr "Indica la cartella per i dati\n"
#: ../../../init.cpp:348
msgid "Connect through socks4 proxy\n"
msgstr "Connetti attraverso proxy socks4\n"
#: ../../../init.cpp:349
msgid "Add a node to connect to\n"
msgstr "Aggiungi un nodo a cui connetterti\n"
#: ../../../init.cpp:350
msgid "Connect only to the specified node\n"
msgstr "Impossibile connettersi al nodo specificato\n"
#: ../../../init.cpp:351
msgid "This help message\n"
msgstr "Questo messaggio di aiuto\n"
#: ../../../init.cpp:455
msgid "Error loading addr.dat \n"
msgstr "Errore nel caricare addr.dat \n"
#: ../../../init.cpp:461
msgid "Error loading blkindex.dat \n"
msgstr "Errore nel caricare blkindex.dat \n"
#: ../../../init.cpp:468
msgid "Error loading wallet.dat \n"
msgstr "Errore nel caricare wallet.dat \n"
#: ../../../init.cpp:536
msgid "Invalid -proxy address"
msgstr "Indirizzo proxy non valido"
#: ../../../init.cpp:629
msgid "Program has crashed and will terminate. "
msgstr "Il programma è crashato e sarà terminato. "
#: ../../../main.cpp:1465
msgid "Warning: Disk space is low "
msgstr "Attenzione: c'è poco spazio sul disco "
#: ../../../main.cpp:2994
#, c-format
msgid "Error: This is an oversized transaction that requires a transaction fee of %s "
msgstr "Errore: Questa è un operazione fuoriscala che richiede un sovrapprezzo di %s "
#: ../../../main.cpp:2996
msgid "Error: Transaction creation failed "
msgstr "Errore: La creazione del trasferimento è fallito "
#: ../../../main.cpp:3001
#: ../../../ui.cpp:1761
#: ../../../ui.cpp:1763
#: ../../../ui.cpp:1904
#: ../../../ui.cpp:2053
msgid "Sending..."
msgstr "Inviando..."
#: ../../../main.cpp:3005
msgid "Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."
msgstr "Errore: Il trasferimento è stato respinto. Questo può accadere se alcune delle monete nel tuo portafoglio erano già state spese, o anche se hai usato una copia di wallet.dat e le monete erano già state spese nella copia originale ma non segnate in quest'ultima."
#: ../../../main.cpp:3017
msgid "Invalid amount"
msgstr "Quantità non valida"
#: ../../../main.cpp:3019
#: ../../../ui.cpp:1971
#: ../../../ui.cpp:2038
msgid "Insufficient funds"
msgstr "Fondi insufficenti"
#: ../../../main.cpp:3024
msgid "Invalid bitcoin address"
msgstr "Indirizzo bitcoin non valido"
#: ../../../ui.cpp:189
#, c-format
msgid "This transaction is over the size limit. You can still send it for a fee of %s, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?"
msgstr "Questo trasferimento è oltre le dimensioni massime. Puoi comunque inviarlo per un costo aggiuntivo di %s, che andrà ai nodi che effettueranno il processo della tua operazione e che supportano il network. Vuoi pagare il costo aggiuntivo?"
#: ../../../ui.cpp:285
msgid "Status"
msgstr "Stato"
#: ../../../ui.cpp:286
msgid "Date"
msgstr "Data"
#: ../../../ui.cpp:287
msgid "Description"
msgstr "Descrizione"
#: ../../../ui.cpp:288
msgid "Debit"
msgstr "Debito"
#: ../../../ui.cpp:289
msgid "Credit"
msgstr "Credito"
#: ../../../ui.cpp:489
#, c-format
msgid "Open for %d blocks"
msgstr "Aperto per %d blocchi"
#: ../../../ui.cpp:491
#, c-format
msgid "Open until %s"
msgstr "Aperto fino a %s"
#: ../../../ui.cpp:497
#, c-format
msgid "%d/offline?"
msgstr "%d/fuorilinea?"
#: ../../../ui.cpp:499
#, c-format
msgid "%d/unconfirmed"
msgstr "%d/non confermato"
#: ../../../ui.cpp:501
#, c-format
msgid "%d confirmations"
msgstr "%d conferme"
#: ../../../ui.cpp:584
msgid "Generated"
msgstr "Generato"
#: ../../../ui.cpp:592
#, c-format
msgid "Generated (%s matures in %d more blocks)"
msgstr "Generate (%s matureranno in %d altri blocchi)"
#: ../../../ui.cpp:596
msgid "Generated - Warning: This block was not received by any other nodes and will probably not be accepted!"
msgstr "Generato - Attenzione: Questo blocco non è stato ricevuto da nessun altro nodo e probabilmente non sarà accettato!"
#: ../../../ui.cpp:600
msgid "Generated (not accepted)"
msgstr "Generato (non accettato)"
#: ../../../ui.cpp:610
msgid "From: "
msgstr "Da: "
#: ../../../ui.cpp:634
msgid "From: unknown, Received with: "
msgstr "Da: sconosciuto, Ricevuto con: "
#: ../../../ui.cpp:676
msgid "Payment to yourself"
msgstr "Pagamento a te stesso"
#: ../../../ui.cpp:713
msgid "To: "
msgstr "A: "
#: ../../../ui.cpp:1009
msgid " Generating"
msgstr " Generando"
#: ../../../ui.cpp:1011
msgid "(not connected)"
msgstr "(non connesso)"
#: ../../../ui.cpp:1014
#, c-format
msgid " %d connections %d blocks %d transactions"
msgstr " %d connessioni %d blocchi %d trasferimenti"
#: ../../../ui.cpp:1123
#: ../../../ui.cpp:2351
msgid "New Receiving Address"
msgstr "Nuovo indirizzo ricevente"
#: ../../../ui.cpp:1124
#: ../../../ui.cpp:2352
msgid ""
"It's good policy to use a new address for each payment you receive.\n"
"\n"
"Label"
msgstr ""
"E' una buona abitudine usare un nuovo indirizzo per ogni pagamento che ricevuto.\n"
"\n"
"Label"
#: ../../../ui.cpp:1193
msgid "<b>Status:</b> "
msgstr "<b>Stato:</b> "
#: ../../../ui.cpp:1198
msgid ", has not been successfully broadcast yet"
msgstr ", non è ancora stato diffuso correttamente"
#: ../../../ui.cpp:1200
#, c-format
msgid ", broadcast through %d node"
msgstr ", diffusione attraverso %d nodo"
#: ../../../ui.cpp:1202
#, c-format
msgid ", broadcast through %d nodes"
msgstr ", diffusione attraverso %d nodi"
#: ../../../ui.cpp:1206
msgid "<b>Date:</b> "
msgstr "<b>Data:</b> "
#: ../../../ui.cpp:1214
msgid "<b>Source:</b> Generated<br>"
msgstr "<b>Sorgente:</b> Generato<br>"
#: ../../../ui.cpp:1220
#: ../../../ui.cpp:1238
msgid "<b>From:</b> "
msgstr "<b>Da:</b> "
#: ../../../ui.cpp:1238
msgid "unknown"
msgstr "sconoscuto"
#: ../../../ui.cpp:1239
#: ../../../ui.cpp:1263
#: ../../../ui.cpp:1322
msgid "<b>To:</b> "
msgstr "<b>A:</b> "
#: ../../../ui.cpp:1242
msgid " (yours, label: "
msgstr " (vostro, label: "
#: ../../../ui.cpp:1244
msgid " (yours)"
msgstr " (vostro)"
#: ../../../ui.cpp:1281
#: ../../../ui.cpp:1293
#: ../../../ui.cpp:1356
msgid "<b>Credit:</b> "
msgstr "<b>Credito:</b> "
#: ../../../ui.cpp:1283
#, c-format
msgid "(%s matures in %d more blocks)"
msgstr "(%s matureranno in %d altri blocchi)"
#: ../../../ui.cpp:1285
msgid "(not accepted)"
msgstr "(non accettato)"
#: ../../../ui.cpp:1330
#: ../../../ui.cpp:1353
msgid "<b>Debit:</b> "
msgstr "<b>Debito:</b> "
#: ../../../ui.cpp:1344
msgid "<b>Transaction fee:</b> "
msgstr "<b>Trasferimento costo:</b> "
#: ../../../ui.cpp:1360
msgid "<b>Net amount:</b> "
msgstr "<b>Quantità del network:</b> "
#: ../../../ui.cpp:1367
msgid "Message:"
msgstr "Messaggio:"
#: ../../../ui.cpp:1370
msgid "Generated coins must wait 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, it will change to \"not accepted\" and not be spendable. This may occasionally happen if another node generates a block within a few seconds of yours."
msgstr "Le monete generate devono aspettare 120 blocchi prima di poter essere spese. Quando hai generato questo blocco, è stato diffuso sul network per essere aggiunto alla catena dei blocchi. Se fallirà l'entrata nella catena, cambierà in \"non accettato\" e non spendibile. Questo può capitare se un altro nodo genera un blocco pochi secondi prima del tuo."
#: ../../../ui.cpp:1437
msgid "Main"
msgstr "Principale"
#: ../../../ui.cpp:1442
msgid "&Minimize on close"
msgstr "&Minimizza se chiuso"
#: ../../../ui.cpp:1595
#, c-format
msgid "version 0.%d.%d beta"
msgstr "versione 0.%d.%d beta"
#: ../../../ui.cpp:1681
msgid "Will appear as \"From: Unknown\""
msgstr "Apparirà come \"Da: Sconosciuto\""
#: ../../../ui.cpp:1682
msgid "Can't include a message when sending to a Bitcoin address"
msgstr "Non si può includere un messaggio quando si invia attraverso l'indirizzo Bitcoin"
#: ../../../ui.cpp:1735
msgid "Error in amount "
msgstr "Errore nell'ammontare "
#: ../../../ui.cpp:1735
#: ../../../ui.cpp:1740
#: ../../../ui.cpp:1745
#: ../../../ui.cpp:1771
#: ../../../uibase.cpp:61
msgid "Send Coins"
msgstr "Invia monete"
#: ../../../ui.cpp:1740
msgid "Amount exceeds your balance "
msgstr "L'ammontare è andato oltre i tuoi capitali "
#: ../../../ui.cpp:1745
msgid "Total exceeds your balance when the "
msgstr "Il totale va oltre i tuoi capitali quando il "
#: ../../../ui.cpp:1745
msgid " transaction fee is included "
msgstr " il costo trasferimento è incluso "
#: ../../../ui.cpp:1761
msgid "Payment sent "
msgstr "Pagamento inviato "
#: ../../../ui.cpp:1771
msgid "Invalid address "
msgstr "Indirizzo non valido "
#: ../../../ui.cpp:1825
#, c-format
msgid "Sending %s to %s"
msgstr "Inviando %s a %s"
#: ../../../ui.cpp:1898
#: ../../../ui.cpp:1931
msgid "CANCELLED"
msgstr "CANCELLATO"
#: ../../../ui.cpp:1902
msgid "Cancelled"
msgstr "Cancellato"
#: ../../../ui.cpp:1904
msgid "Transfer cancelled "
msgstr "Operazione cancellata "
#: ../../../ui.cpp:1957
msgid "Error: "
msgstr "Errore: "
#: ../../../ui.cpp:1976
msgid "Connecting..."
msgstr "Connessione in corso..."
#: ../../../ui.cpp:1981
msgid "Unable to connect"
msgstr "Impossibile connettersi"
#: ../../../ui.cpp:1986
msgid "Requesting public key..."
msgstr "Richiesta chiave pubblica..."
#: ../../../ui.cpp:1998
msgid "Received public key..."
msgstr "Ricezione chiave pubblica..."
#: ../../../ui.cpp:2010
msgid "Transfer was not accepted"
msgstr "Trasferimento non accettato"
#: ../../../ui.cpp:2019
msgid "Invalid response received"
msgstr "Risposta non valida ricevuta"
#: ../../../ui.cpp:2034
msgid "Creating transaction..."
msgstr "Creazione trasferimento..."
#: ../../../ui.cpp:2046
#, c-format
msgid "This is an oversized transaction that requires a transaction fee of %s"
msgstr "Questo è un trasferimento fuoriscala che richiede un costo aggiuntivo di %s"
#: ../../../ui.cpp:2048
msgid "Transaction creation failed"
msgstr "Creazione trasferimento fallita"
#: ../../../ui.cpp:2055
msgid "Transaction aborted"
msgstr "Trasferimento bloccato"
#: ../../../ui.cpp:2063
msgid "Lost connection, transaction cancelled"
msgstr "Connessione persa, trasferimento cancellato"
#: ../../../ui.cpp:2079
msgid "Sending payment..."
msgstr "Inviando pagamento..."
#: ../../../ui.cpp:2085
msgid "The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."
msgstr "Il trasferimento è stato respinto. Questo può accadere se alcune delle monete nel tuo portafoglio erano già state spese, o anche se hai usato una copia di wallet.dat e le monete erano già state spese nella copia originale ma non segnate in quest'ultima."
#: ../../../ui.cpp:2092
msgid "Waiting for confirmation..."
msgstr "In attesa di conferma..."
#: ../../../ui.cpp:2110
msgid ""
"The payment was sent, but the recipient was unable to verify it.\n"
"The transaction is recorded and will credit to the recipient,\n"
"but the comment information will be blank."
msgstr ""
"Il pagamento è inviato, ma il ricevente non è stato in grado di verificarlo.\n"
"Il trasferimento è registrato e costerà sarà accreditato al ricevente,\n"
"ma il commento verrà mostrato come vuoto."
#: ../../../ui.cpp:2119
msgid "Payment was sent, but an invalid response was received"
msgstr "Il pagamento è stato inviato, ma è arrivata un risposta invalida"
#: ../../../ui.cpp:2125
msgid "Payment completed"
msgstr "Pagamento completato"
#: ../../../ui.cpp:2156
#: ../../../ui.cpp:2302
#: ../../../ui.cpp:2339
msgid "Name"
msgstr "Nome"
#: ../../../ui.cpp:2157
#: ../../../ui.cpp:2302
#: ../../../ui.cpp:2339
msgid "Address"
msgstr "Indirizzo"
#: ../../../ui.cpp:2159
#: ../../../ui.cpp:2314
msgid "Label"
msgstr "Label"
#: ../../../ui.cpp:2160
#: ../../../uibase.cpp:908
msgid "Bitcoin Address"
msgstr "Indirizzo Bitcoin"
#: ../../../ui.cpp:2284
msgid "This is one of your own addresses for receiving payments and cannot be entered in the address book. "
msgstr "Questo qui è uno dei tuoi indirizzi personali per ricevere pagamenti e non può essere inserito nella rubrica indirizzi. "
#: ../../../ui.cpp:2302
#: ../../../ui.cpp:2308
msgid "Edit Address"
msgstr "Modifica indirizzo"
#: ../../../ui.cpp:2314
msgid "Edit Address Label"
msgstr "Modifica spazio indirizzo"
#: ../../../ui.cpp:2339
#: ../../../ui.cpp:2345
msgid "Add Address"
msgstr "Aggiungi indirizzo"
#: ../../../ui.cpp:2421
msgid "Bitcoin"
msgstr "Bitcoin"
#: ../../../ui.cpp:2423
msgid "Bitcoin - Generating"
msgstr "Bitcoin - Generando"
#: ../../../ui.cpp:2425
msgid "Bitcoin - (not connected)"
msgstr "Bitcoin - (non connesso)"
#: ../../../ui.cpp:2500
msgid "&Open Bitcoin"
msgstr "&Apri Bitcoin"
#: ../../../ui.cpp:2501
msgid "O&ptions..."
msgstr "O&pzioni..."
#: ../../../ui.cpp:2502
#: ../../../uibase.cpp:34
msgid "&Generate Coins"
msgstr "&Genera monete"
#: ../../../ui.cpp:2505
#: ../../../uibase.cpp:27
msgid "E&xit"
msgstr "E&sci"
#: ../../../uibase.cpp:30
msgid "&File"
msgstr "&File"
#: ../../../uibase.cpp:38
msgid "&Your Receiving Addresses..."
msgstr "&Il tuo indirizzo di ricezione..."
#: ../../../uibase.cpp:42
msgid "&Options..."
msgstr "&Opzioni..."
#: ../../../uibase.cpp:45
msgid "&Settings"
msgstr "I&mpostazioni"
#: ../../../uibase.cpp:49
msgid "&About..."
msgstr "&Info..."
#: ../../../uibase.cpp:52
msgid "&Help"
msgstr "&Aiuto"
#: ../../../uibase.cpp:62
msgid "Address Book"
msgstr "Rubrica indirizzi"
#: ../../../uibase.cpp:77
msgid "Your Bitcoin Address:"
msgstr "Il tuo indirizzo Bitcoin:"
#: ../../../uibase.cpp:84
msgid " &New... "
msgstr " &Nuovo... "
#: ../../../uibase.cpp:87
#: ../../../uibase.cpp:851
#: ../../../uibase.cpp:954
msgid " &Copy to Clipboard "
msgstr " &Copia nella Clipboard "
#: ../../../uibase.cpp:102
msgid "Balance:"
msgstr "Capitali:"
#: ../../../uibase.cpp:121
msgid " All"
msgstr " Tutte"
#: ../../../uibase.cpp:121
msgid " Sent"
msgstr " Inviato"
#: ../../../uibase.cpp:121
msgid " Received"
msgstr " Ricevuto"
#: ../../../uibase.cpp:121
msgid " In Progress"
msgstr " In lavorazione"
#: ../../../uibase.cpp:142
msgid "All Transactions"
msgstr "Tutte le operazioni"
#: ../../../uibase.cpp:153
msgid "Sent/Received"
msgstr "Inviato/Ricevuto"
#: ../../../uibase.cpp:164
msgid "Sent"
msgstr "Inviato"
#: ../../../uibase.cpp:175
msgid "Received"
msgstr "Ricevuto"
#: ../../../uibase.cpp:318
#: ../../../uibase.cpp:479
#: ../../../uibase.cpp:580
#: ../../../uibase.cpp:793
#: ../../../uibase.cpp:854
#: ../../../uibase.cpp:963
#: ../../../uibase.cpp:1052
msgid "OK"
msgstr "OK"
#: ../../../uibase.cpp:361
msgid "Optional transaction fee you give to the nodes that process your transactions."
msgstr "Costo aggiuntivo opzionale che tu dai ai nodi che realizzano i tuoi trasferimenti"
#: ../../../uibase.cpp:370
msgid "Transaction fee:"
msgstr "Costo trasferimento:"
#: ../../../uibase.cpp:386
msgid "&Limit coin generation to"
msgstr "&Limita la generazione moneta a"
#: ../../../uibase.cpp:393
msgid "processors"
msgstr "processori"
#: ../../../uibase.cpp:399
msgid "&Start Bitcoin on system startup"
msgstr "A&vvia Bitcoin all'avvio del sistema"
#: ../../../uibase.cpp:403
msgid "&Minimize to the tray instead of the taskbar"
msgstr "&Minimizza nella tray invece che nella barra"
#: ../../../uibase.cpp:407
msgid "M&inimize to the tray on close"
msgstr "M&inimizza nella tray alla chiusura"
#: ../../../uibase.cpp:414
msgid "&Connect through socks4 proxy: "
msgstr "%Connesso attraverso proxy socks4: "
#: ../../../uibase.cpp:426
msgid "Proxy &IP:"
msgstr "Proxy &IP:"
#: ../../../uibase.cpp:434
msgid " &Port:"
msgstr " &Porta:"
#: ../../../uibase.cpp:456
msgid "// [don't translate] Test panel 2 for future expansion"
msgstr ""
#: ../../../uibase.cpp:460
msgid "// [don't translate] Let's not start multiple pages until the first page is filled up"
msgstr ""
#: ../../../uibase.cpp:482
#: ../../../uibase.cpp:735
#: ../../../uibase.cpp:798
#: ../../../uibase.cpp:857
#: ../../../uibase.cpp:966
#: ../../../uibase.cpp:1055
msgid "Cancel"
msgstr "Cancella"
#: ../../../uibase.cpp:485
msgid "&Apply"
msgstr "&Accetta"
#: ../../../uibase.cpp:546
msgid "Bitcoin "
msgstr "Bitcoin "
#: ../../../uibase.cpp:552
msgid "version"
msgstr "versione"
#: ../../../uibase.cpp:563
msgid ""
"Copyright (c) 2009-2010 Satoshi Nakamoto.\n"
"\n"
"Distributed under the MIT/X11 software license, see the accompanying file \n"
"license.txt or http://www.opensource.org/licenses/mit-license.php.\n"
"\n"
"This product includes software developed by the OpenSSL Project for use in the \n"
"OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by \n"
"Eric Young (eay@cryptsoft.com)."
msgstr ""
"Copyright (c) 2009-2010 Satoshi Nakamoto.\n"
"\n"
"Distribuito sotto la licenza software MIT/X11, guarda il file license.txt\n"
"incluso oppure su http://www.opensource.org/licenses/mit-license.php.\n"
"\n"
"Questo prodoto include software sviluppato dal progetto OpenSSL per\n"
"l'uso del (http://www.openssl.org/) e il software criptografico scritto\n"
"da Eric Young (eay@cryptsoft.com)."
#: ../../../uibase.cpp:619
msgid "Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L) or IP address (e.g. 123.45.6.7)"
msgstr "Inserisci un indirizzo Bitcoin (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L) o un indirizzo IP (e.g. 123.45.6.7)"
#: ../../../uibase.cpp:633
msgid "Pay &To:"
msgstr "Paga %a:"
#: ../../../uibase.cpp:648
msgid "&Paste"
msgstr "&Incolla"
#: ../../../uibase.cpp:651
msgid " Address &Book..."
msgstr " &Rubrica degli indirizzi..."
#: ../../../uibase.cpp:658
msgid "&Amount:"
msgstr "&Quantità"
#: ../../../uibase.cpp:668
msgid "T&ransfer:"
msgstr "T&rasferimento:"
#: ../../../uibase.cpp:674
msgid " Standard"
msgstr " Standard"
#: ../../../uibase.cpp:696
msgid "&From:"
msgstr "&Proveniente da:"
#: ../../../uibase.cpp:713
msgid "&Message:"
msgstr "&Messaggio:"
#: ../../../uibase.cpp:730
msgid "&Send"
msgstr "&Invia"
#: ../../../uibase.cpp:782
msgid ""
"\n"
"\n"
"Connecting..."
msgstr ""
"\n"
"\n"
"Connessione in corso..."
#: ../../../uibase.cpp:832
msgid "These are your Bitcoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you. The highlighted address is displayed in the main window."
msgstr "Questi sono i tuoi indirizzi Bitcoin per ricevere pagamenti. Potrai darne uno diverso ad ognuno per cosi tenere traccia di chi ti sta pagando. L'indirizzo selezionato sarà quello mostrato nella finestra principale."
#: ../../../uibase.cpp:845
#: ../../../uibase.cpp:957
msgid "&Edit..."
msgstr "&Cambia..."
#: ../../../uibase.cpp:848
#: ../../../uibase.cpp:960
msgid " &New Address... "
msgstr " &Nuovo indirizzo... "
#: ../../../uibase.cpp:920
msgid "Sending"
msgstr "Inviando"
#: ../../../uibase.cpp:928
msgid "These are your Bitcoin addresses for receiving payments. You can give a different one to each sender to keep track of who is paying you. The highlighted address will be displayed in the main window."
msgstr "Questi sono i tuoi indirizzi Bitcoin per ricevere pagamenti. Potrai darne uno diverso ad ognuno per cosi tenere traccia di chi ti sta pagando. L'indirizzo selezionato sarà quello mostrato nella finestra principale."
#: ../../../uibase.cpp:941
msgid "Receiving"
msgstr "Ricevendo"
#: ../../../uibase.cpp:951
msgid "&Delete"
msgstr "&Cancella"
#: ../../../uibase.h:150
msgid "Transaction Details"
msgstr "Dettagli operazione"
#: ../../../uibase.h:203
msgid "Options"
msgstr "Opzioni"
#: ../../../uibase.h:231
msgid "About Bitcoin"
msgstr "Info Bitcoin"
#: ../../../uibase.h:341
msgid "Your Bitcoin Addresses"
msgstr "Il tuo indirizzo Bitcoin"

Binary file not shown.

View File

@@ -0,0 +1,804 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-05-26 22:02-0000\n"
"PO-Revision-Date: 2010-05-27 19:27+0100\n"
"Last-Translator: Xunie\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-KeywordsList: _;gettext;gettext_noop\n"
"X-Poedit-Basepath: .\n"
"X-Poedit-SearchPath-0: ../../..\n"
#: ../../../init.cpp:342
msgid "Usage: bitcoin [options]"
msgstr ""
#: ../../../init.cpp:343
msgid "Options:\n"
msgstr "Opties:\n"
#: ../../../init.cpp:344
msgid "Generate coins\n"
msgstr "Genereer coins\n"
#: ../../../init.cpp:345
msgid "Don't generate coins\n"
msgstr "Genereer geen coins\n"
#: ../../../init.cpp:346
msgid "Start minimized\n"
msgstr "Start geminimalizeerd\n"
#: ../../../init.cpp:347
msgid "Specify data directory\n"
msgstr "Specificeer data map\n"
#: ../../../init.cpp:348
msgid "Connect through socks4 proxy\n"
msgstr "Verbind via socks4 proxy\n"
#: ../../../init.cpp:349
msgid "Add a node to connect to\n"
msgstr "Voeg een node om naar te verbinden toe\n"
#: ../../../init.cpp:350
msgid "Connect only to the specified node\n"
msgstr "Verbind alleen naar deze node\n"
#: ../../../init.cpp:351
msgid "This help message\n"
msgstr ""
#: ../../../init.cpp:455
msgid "Error loading addr.dat \n"
msgstr "Fout bij laden van bestand addr.dat \n"
#: ../../../init.cpp:461
msgid "Error loading blkindex.dat \n"
msgstr "Fout bij laden van bestand blkindex.dat \n"
#: ../../../init.cpp:468
msgid "Error loading wallet.dat \n"
msgstr "Fout bij laden van bestand wallet.dat \n"
#: ../../../init.cpp:536
msgid "Invalid -proxy address"
msgstr "Foutief -proxy adres"
#: ../../../init.cpp:629
msgid "Program has crashed and will terminate. "
msgstr "Programma is gecrashed en word afgesloten. "
#: ../../../main.cpp:1465
msgid "Warning: Disk space is low "
msgstr "Waarschuwng: Gebrek aan schijf ruimte "
#: ../../../main.cpp:2994
#, c-format
msgid "Error: This is an oversized transaction that requires a transaction fee of %s "
msgstr "Fout: Dit is een te grote transactie die een fooi nodig heeft van %s "
#: ../../../main.cpp:2996
msgid "Error: Transaction creation failed "
msgstr "Fout: Transactie aanmaak gefaald "
#: ../../../main.cpp:3001
#: ../../../ui.cpp:1761
#: ../../../ui.cpp:1763
#: ../../../ui.cpp:1904
#: ../../../ui.cpp:2053
msgid "Sending..."
msgstr "Versturen..."
#: ../../../main.cpp:3005
msgid "Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."
msgstr "Fout: De transactie was afgekeurd. Dit kan komen als bepaalde coins in uw Portefeuille al zijn uitgegeven. Dit kan komen doordat u wallet.dat heeft gekopieerd en wat coins heeft uitgegeven en niet terug gekopieerd heeft."
#: ../../../main.cpp:3017
msgid "Invalid amount"
msgstr "Foutief aantal"
#: ../../../main.cpp:3019
#: ../../../ui.cpp:1971
#: ../../../ui.cpp:2038
msgid "Insufficient funds"
msgstr "Onvoldoende coins"
#: ../../../main.cpp:3024
msgid "Invalid bitcoin address"
msgstr "Foutief bitcoin adres"
#: ../../../ui.cpp:189
#, c-format
msgid "This transaction is over the size limit. You can still send it for a fee of %s, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?"
msgstr "Deze transactie is over het limiet. U kunt nog door gaan met de transactie door een fooi te betalen van %s, deze word betaald aan de node die uw tranactie verwerkt. Wilt u de fooi betalen?"
#: ../../../ui.cpp:285
msgid "Status"
msgstr "Status"
#: ../../../ui.cpp:286
msgid "Date"
msgstr "Datum"
#: ../../../ui.cpp:287
msgid "Description"
msgstr "Beschrijving"
#: ../../../ui.cpp:288
msgid "Debit"
msgstr ""
#: ../../../ui.cpp:289
msgid "Credit"
msgstr ""
#: ../../../ui.cpp:489
#, c-format
msgid "Open for %d blocks"
msgstr "Open voor %d blocks"
#: ../../../ui.cpp:491
#, c-format
msgid "Open until %s"
msgstr "Open tot %s"
#: ../../../ui.cpp:497
#, c-format
msgid "%d/offline?"
msgstr "%d/offline?"
#: ../../../ui.cpp:499
#, c-format
msgid "%d/unconfirmed"
msgstr "%d/niet bevestigd"
#: ../../../ui.cpp:501
#, c-format
msgid "%d confirmations"
msgstr "%d bevestigingen"
#: ../../../ui.cpp:584
msgid "Generated"
msgstr "Gegenereerd"
#: ../../../ui.cpp:592
#, c-format
msgid "Generated (%s matures in %d more blocks)"
msgstr "Gegenereerd (%s word volwassen in %d blokken)"
#: ../../../ui.cpp:596
msgid "Generated - Warning: This block was not received by any other nodes and will probably not be accepted!"
msgstr "Gegenereerd - Waarschuwing: Dit blok is niet ontvangen door andere nodes en zal waarschijnlijk niet geaccepteerd worden!"
#: ../../../ui.cpp:600
msgid "Generated (not accepted)"
msgstr "Gegenereerd (niet geaccepteerd)"
#: ../../../ui.cpp:610
msgid "From: "
msgstr "Van: "
#: ../../../ui.cpp:634
msgid "From: unknown, Received with: "
msgstr "Van: onbekend, Ontvangen met: "
#: ../../../ui.cpp:676
msgid "Payment to yourself"
msgstr "Betaling naar u zelf"
#: ../../../ui.cpp:713
msgid "To: "
msgstr "Naar: "
#: ../../../ui.cpp:1009
msgid " Generating"
msgstr " Genereert"
#: ../../../ui.cpp:1011
msgid "(not connected)"
msgstr "(niet verbonden)"
#: ../../../ui.cpp:1014
#, c-format
msgid " %d connections %d blocks %d transactions"
msgstr " %d verbindingen %d blokken %d transacties"
#: ../../../ui.cpp:1123
#: ../../../ui.cpp:2351
msgid "New Receiving Address"
msgstr "Nieuw Ontvangings Adres"
#: ../../../ui.cpp:1124
#: ../../../ui.cpp:2352
msgid ""
"It's good policy to use a new address for each payment you receive.\n"
"\n"
"Label"
msgstr ""
"Het is goed beleid om een nieuw adres voor elke betaling te hebben.\n"
"\n"
"Label"
#: ../../../ui.cpp:1193
msgid "<b>Status:</b> "
msgstr "<b>Status:</b> "
#: ../../../ui.cpp:1198
msgid ", has not been successfully broadcast yet"
msgstr ", is nog niet succesvol verstuurd naar het netwerk"
#: ../../../ui.cpp:1200
#, c-format
msgid ", broadcast through %d node"
msgstr ", verstuurd via %d node"
#: ../../../ui.cpp:1202
#, c-format
msgid ", broadcast through %d nodes"
msgstr ", verstuurd via %d nodes"
#: ../../../ui.cpp:1206
msgid "<b>Date:</b> "
msgstr "<b>Datum:</b> "
#: ../../../ui.cpp:1214
msgid "<b>Source:</b> Generated<br>"
msgstr "<b>Bron:</b> Gegenereerd<br>"
#: ../../../ui.cpp:1220
#: ../../../ui.cpp:1238
msgid "<b>From:</b> "
msgstr "<b>Van:</b> "
#: ../../../ui.cpp:1238
msgid "unknown"
msgstr "onbekend"
#: ../../../ui.cpp:1239
#: ../../../ui.cpp:1263
#: ../../../ui.cpp:1322
msgid "<b>To:</b> "
msgstr "<b>Naar:</b> "
#: ../../../ui.cpp:1242
msgid " (yours, label: "
msgstr ""
#: ../../../ui.cpp:1244
#, fuzzy
msgid " (yours)"
msgstr ""
#: ../../../ui.cpp:1281
#: ../../../ui.cpp:1293
#: ../../../ui.cpp:1356
msgid "<b>Credit:</b> "
msgstr ""
#: ../../../ui.cpp:1283
#, c-format
msgid "(%s matures in %d more blocks)"
msgstr "(%s word volwassen in %d blokken)"
#: ../../../ui.cpp:1285
msgid "(not accepted)"
msgstr "(niet geaccepteerd"
#: ../../../ui.cpp:1330
#: ../../../ui.cpp:1353
msgid "<b>Debit:</b> "
msgstr ""
#: ../../../ui.cpp:1344
msgid "<b>Transaction fee:</b> "
msgstr "<b>Transactie fooi:</b> "
#: ../../../ui.cpp:1360
msgid "<b>Net amount:</b> "
msgstr "<b>Netto bedrag:</b> "
#: ../../../ui.cpp:1367
msgid "Message:"
msgstr "Mededeling:"
#: ../../../ui.cpp:1370
msgid "Generated coins must wait 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, it will change to \"not accepted\" and not be spendable. This may occasionally happen if another node generates a block within a few seconds of yours."
msgstr "Gegenereerde coins moeten 120 blokken wachten voordat ze uitgegeven kunnen worden. Wanneer je dit blok genereerde, werd het naar het netwerk gestuurd om opgenomen teworden in de rest van de blokken. Als dit faalt, dan zal de dit veranderen in \"niet geaccepteerd\" en zal niet uitgeefbaar zijn. Dit kan soms gebeuren als een node ook een blok rond dezelfde periode genereerd."
#: ../../../ui.cpp:1437
msgid "Main"
msgstr "Hoofd"
#: ../../../ui.cpp:1442
msgid "&Minimize on close"
msgstr "&Minimalizeer bij sluiten"
#: ../../../ui.cpp:1595
#, c-format
msgid "version 0.%d.%d beta"
msgstr "versie 0.%d.%d beta"
#: ../../../ui.cpp:1681
msgid "Will appear as \"From: Unknown\""
msgstr "Word vertoont als \"Van: Onbekend\""
#: ../../../ui.cpp:1682
msgid "Can't include a message when sending to a Bitcoin address"
msgstr "Kan geen mededeling versturen bij gebruik van Bitcoin adressen"
#: ../../../ui.cpp:1735
msgid "Error in amount "
msgstr "Fout in hoeveelheid "
#: ../../../ui.cpp:1735
#: ../../../ui.cpp:1740
#: ../../../ui.cpp:1745
#: ../../../ui.cpp:1771
#: ../../../uibase.cpp:61
msgid "Send Coins"
msgstr "Verstuur Coins"
#: ../../../ui.cpp:1740
msgid "Amount exceeds your balance "
msgstr "Hoeveelheid hoger dan uw huidige balans "
#: ../../../ui.cpp:1745
msgid "Total exceeds your balance when the "
msgstr "Totaal groter dan uw huidige balans wanner de "
#: ../../../ui.cpp:1745
msgid " transaction fee is included "
msgstr " transactie fooi is bijgerekend "
#: ../../../ui.cpp:1761
msgid "Payment sent "
msgstr "Betaling verstuurd "
#: ../../../ui.cpp:1771
msgid "Invalid address "
msgstr "Foutief adres "
#: ../../../ui.cpp:1825
#, c-format
msgid "Sending %s to %s"
msgstr "Verstuurd %s naar %s"
#: ../../../ui.cpp:1898
#: ../../../ui.cpp:1931
msgid "CANCELLED"
msgstr "GEANNULEERD"
#: ../../../ui.cpp:1902
msgid "Cancelled"
msgstr "Geannuleerd"
#: ../../../ui.cpp:1904
msgid "Transfer cancelled "
msgstr "Transactie geannuleerd "
#: ../../../ui.cpp:1957
msgid "Error: "
msgstr "Fout: "
#: ../../../ui.cpp:1976
msgid "Connecting..."
msgstr "Verbinden..."
#: ../../../ui.cpp:1981
msgid "Unable to connect"
msgstr "Kan niet verbinden"
#: ../../../ui.cpp:1986
msgid "Requesting public key..."
msgstr "Aanvragen van publieke sleutel..."
#: ../../../ui.cpp:1998
msgid "Received public key..."
msgstr "Publieke sleutel ontvangen..."
#: ../../../ui.cpp:2010
msgid "Transfer was not accepted"
msgstr "Transactie niet geaccepteerd"
#: ../../../ui.cpp:2019
msgid "Invalid response received"
msgstr "Foutief antwoord ontvangen"
#: ../../../ui.cpp:2034
msgid "Creating transaction..."
msgstr "Maakt transactie aan..."
#: ../../../ui.cpp:2046
#, c-format
msgid "This is an oversized transaction that requires a transaction fee of %s"
msgstr "Dit is een te grote transactie die een transactie fooi vereist van %s"
#: ../../../ui.cpp:2048
msgid "Transaction creation failed"
msgstr "Transactie aanmaak gefaald."
#: ../../../ui.cpp:2055
msgid "Transaction aborted"
msgstr "Transactie geannuleerd"
#: ../../../ui.cpp:2063
msgid "Lost connection, transaction cancelled"
msgstr "Verbinding verloren, transactie geannuleerd"
#: ../../../ui.cpp:2079
msgid "Sending payment..."
msgstr "Versturen van betaling..."
#: ../../../ui.cpp:2085
msgid "The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."
msgstr "De transactie was afgekeurd. Dit kan komen als bepaalde coins in uw Portefeuille al zijn uitgegeven. Dit kan komen doordat u wallet.dat heeft gekopieerd en wat coins heeft uitgegeven en niet terug gekopieerd heeft."
#: ../../../ui.cpp:2092
msgid "Waiting for confirmation..."
msgstr "Wachten op bevestiging..."
#: ../../../ui.cpp:2110
msgid ""
"The payment was sent, but the recipient was unable to verify it.\n"
"The transaction is recorded and will credit to the recipient,\n"
"but the comment information will be blank."
msgstr ""
"De betaling was verstuurd, maar de ontvanger kon het niet verifieeren.\n"
"De transactie is opgenomen en word uitbetaald aan de ontvanger,\n"
"maar de mededeling blijft blank bij de ontanger."
#: ../../../ui.cpp:2119
msgid "Payment was sent, but an invalid response was received"
msgstr "Betaling was verstuurd, maar een foutief antword was ontvangen."
#: ../../../ui.cpp:2125
msgid "Payment completed"
msgstr "Betaling voltooid"
#: ../../../ui.cpp:2156
#: ../../../ui.cpp:2302
#: ../../../ui.cpp:2339
msgid "Name"
msgstr "Naam"
#: ../../../ui.cpp:2157
#: ../../../ui.cpp:2302
#: ../../../ui.cpp:2339
msgid "Address"
msgstr "Adres"
#: ../../../ui.cpp:2159
#: ../../../ui.cpp:2314
msgid "Label"
msgstr "Label"
#: ../../../ui.cpp:2160
#: ../../../uibase.cpp:908
msgid "Bitcoin Address"
msgstr "Bitcoin Adres"
#: ../../../ui.cpp:2284
msgid "This is one of your own addresses for receiving payments and cannot be entered in the address book. "
msgstr "Dit is een van uw eigen adressen voor het ontvangen van betalingen en can niet worden toegevoegd aan uw adressen boek. "
#: ../../../ui.cpp:2302
#: ../../../ui.cpp:2308
msgid "Edit Address"
msgstr "Bewerk Adres"
#: ../../../ui.cpp:2314
msgid "Edit Address Label"
msgstr "Bewerk Adres Label"
#: ../../../ui.cpp:2339
#: ../../../ui.cpp:2345
msgid "Add Address"
msgstr "Adres Toevoegen"
#: ../../../ui.cpp:2421
msgid "Bitcoin"
msgstr "Bitcoin"
#: ../../../ui.cpp:2423
msgid "Bitcoin - Generating"
msgstr "Bitcoin - Genereert"
#: ../../../ui.cpp:2425
msgid "Bitcoin - (not connected)"
msgstr "Bitcoin - (niet verbonden)"
#: ../../../ui.cpp:2500
msgid "&Open Bitcoin"
msgstr "&Open Bitcoin"
#: ../../../ui.cpp:2501
msgid "O&ptions..."
msgstr "O&pties"
#: ../../../ui.cpp:2502
#: ../../../uibase.cpp:34
msgid "&Generate Coins"
msgstr "&Genereer Coins"
#: ../../../ui.cpp:2505
#: ../../../uibase.cpp:27
msgid "E&xit"
msgstr "A&fsluiten"
#: ../../../uibase.cpp:30
msgid "&File"
msgstr "&Bestand"
#: ../../../uibase.cpp:38
msgid "&Your Receiving Addresses..."
msgstr "&Uw Ontvang Adressen..."
#: ../../../uibase.cpp:42
msgid "&Options..."
msgstr "&Opties..."
#: ../../../uibase.cpp:45
msgid "&Settings"
msgstr "&Eigenschappen"
#: ../../../uibase.cpp:49
msgid "&About..."
msgstr "&Over..."
#: ../../../uibase.cpp:52
msgid "&Help"
msgstr "&Help"
#: ../../../uibase.cpp:62
msgid "Address Book"
msgstr "Adressen Boek"
#: ../../../uibase.cpp:77
msgid "Your Bitcoin Address:"
msgstr "Uw Bitcoin Address:"
#: ../../../uibase.cpp:84
msgid " &New... "
msgstr " &Nieuw... "
#: ../../../uibase.cpp:87
#: ../../../uibase.cpp:851
#: ../../../uibase.cpp:954
msgid " &Copy to Clipboard "
msgstr " &Kopieer naar Plakboord "
#: ../../../uibase.cpp:102
msgid "Balance:"
msgstr "Balans:"
#: ../../../uibase.cpp:121
msgid " All"
msgstr " Alles"
#: ../../../uibase.cpp:121
msgid " Sent"
msgstr " Verstuurd"
#: ../../../uibase.cpp:121
msgid " Received"
msgstr " Ontvangen"
#: ../../../uibase.cpp:121
msgid " In Progress"
msgstr " Word Verwerkt"
#: ../../../uibase.cpp:142
msgid "All Transactions"
msgstr "Alle transacties"
#: ../../../uibase.cpp:153
msgid "Sent/Received"
msgstr "Verstuurd/Ontvangen"
#: ../../../uibase.cpp:164
msgid "Sent"
msgstr "Verstuurd"
#: ../../../uibase.cpp:175
msgid "Received"
msgstr "Ontvangen"
#: ../../../uibase.cpp:318
#: ../../../uibase.cpp:479
#: ../../../uibase.cpp:580
#: ../../../uibase.cpp:793
#: ../../../uibase.cpp:854
#: ../../../uibase.cpp:963
#: ../../../uibase.cpp:1052
msgid "OK"
msgstr "OK"
#: ../../../uibase.cpp:361
msgid "Optional transaction fee you give to the nodes that process your transactions."
msgstr "Optionele transactie fooi die u geeft aan de nodes doe uw betaling verwerken."
#: ../../../uibase.cpp:370
msgid "Transaction fee:"
msgstr "Transactie fooi:"
#: ../../../uibase.cpp:386
msgid "&Limit coin generation to"
msgstr "&Limiteer coin generatie tot"
#: ../../../uibase.cpp:393
msgid "processors"
msgstr "processors"
#: ../../../uibase.cpp:399
msgid "&Start Bitcoin on system startup"
msgstr "&Start Bitcoin wanneer het systeem opstart"
#: ../../../uibase.cpp:403
msgid "&Minimize to the tray instead of the taskbar"
msgstr "&Minimalizeer tot systeemvak inplaats van taakbalk"
#: ../../../uibase.cpp:407
msgid "M&inimize to the tray on close"
msgstr "M&inimalizeer tot taakbalk bij sluiten"
#: ../../../uibase.cpp:414
msgid "&Connect through socks4 proxy: "
msgstr "&Verbind via socks4 proxy: "
#: ../../../uibase.cpp:426
msgid "Proxy &IP:"
msgstr "Proxy &IP:"
#: ../../../uibase.cpp:434
msgid " &Port:"
msgstr " &Poort:"
#: ../../../uibase.cpp:456
msgid "// [don't translate] Test panel 2 for future expansion"
msgstr ""
#: ../../../uibase.cpp:460
msgid "// [don't translate] Let's not start multiple pages until the first page is filled up"
msgstr ""
#: ../../../uibase.cpp:482
#: ../../../uibase.cpp:735
#: ../../../uibase.cpp:798
#: ../../../uibase.cpp:857
#: ../../../uibase.cpp:966
#: ../../../uibase.cpp:1055
msgid "Cancel"
msgstr "Annuleer"
#: ../../../uibase.cpp:485
msgid "&Apply"
msgstr "&Toepassen"
#: ../../../uibase.cpp:546
msgid "Bitcoin "
msgstr "Bitcoin "
#: ../../../uibase.cpp:552
msgid "version"
msgstr "versie"
#: ../../../uibase.cpp:563
msgid ""
"Copyright (c) 2009-2010 Satoshi Nakamoto.\n"
"\n"
"Distributed under the MIT/X11 software license, see the accompanying file \n"
"license.txt or http://www.opensource.org/licenses/mit-license.php.\n"
"\n"
"This product includes software developed by the OpenSSL Project for use in the \n"
"OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by \n"
"Eric Young (eay@cryptsoft.com)."
msgstr ""
"Copyright (c) 2009-2010 Satoshi Nakamoto.\n"
"\n"
"Gedistributeerd onder de MIT/X11 software licentie, see het bijbehorende bestand \n"
"license.txt of http://www.opensource.org/licenses/mit-license.php.\n"
"\n"
"Dit product komt met software ontwikkeld door het OpenSSL Project for gebruik \n"
"in de OpenSSL Toolkit (http://www.openssl.org/) and de cryptografische \n"
"software geschreven door Eric Young (eay@cryptsoft.com)."
#: ../../../uibase.cpp:619
msgid "Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L) or IP address (e.g. 123.45.6.7)"
msgstr "Voer een Bitcoin adres (bijvoorbeeld: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L) of IP address (bijvoorbeeld: 123.45.6.7) in."
#: ../../../uibase.cpp:633
msgid "Pay &To:"
msgstr "Betaal &Naar:"
#: ../../../uibase.cpp:648
msgid "&Paste"
msgstr "&Plakken"
#: ../../../uibase.cpp:651
msgid " Address &Book..."
msgstr " Adressen &Boek..."
#: ../../../uibase.cpp:658
msgid "&Amount:"
msgstr "&Hoeveelheid:"
#: ../../../uibase.cpp:668
msgid "T&ransfer:"
msgstr "O&verdracht:"
#: ../../../uibase.cpp:674
msgid " Standard"
msgstr " Standaard"
#: ../../../uibase.cpp:696
msgid "&From:"
msgstr "&Van:"
#: ../../../uibase.cpp:713
msgid "&Message:"
msgstr "&Mededeling:"
#: ../../../uibase.cpp:730
msgid "&Send"
msgstr "&Verstuur"
#: ../../../uibase.cpp:782
msgid ""
"\n"
"\n"
"Connecting..."
msgstr ""
"\n"
"\n"
"Verbinden..."
#: ../../../uibase.cpp:832
msgid "These are your Bitcoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you. The highlighted address is displayed in the main window."
msgstr "Dit zijn uw Bitcoin Adressen voor het ontvangen van betalingen. Misschien wilt u elk contact persoon een ander adres geven zodat u kunt bij houden wie er u heeft betaald. De opgelichte adressen worden weergeven in het hoofd venster."
#: ../../../uibase.cpp:845
#: ../../../uibase.cpp:957
msgid "&Edit..."
msgstr "&Bewerk..."
#: ../../../uibase.cpp:848
#: ../../../uibase.cpp:960
msgid " &New Address... "
msgstr " &New Adres... "
#: ../../../uibase.cpp:920
msgid "Sending"
msgstr "Versturen"
#: ../../../uibase.cpp:928
msgid "These are your Bitcoin addresses for receiving payments. You can give a different one to each sender to keep track of who is paying you. The highlighted address will be displayed in the main window."
msgstr "Dit zijn uw Bitcoin adressen voor het ontvangen van betalingen. U kunt een aan elk contact persoon geven zodat u een overzicht kunt houden wie u betaald. Dit adres zal wergeven worden in het hoofd main venster."
#: ../../../uibase.cpp:941
msgid "Receiving"
msgstr "Ontvangen"
#: ../../../uibase.cpp:951
msgid "&Delete"
msgstr "&Verwijder"
#: ../../../uibase.h:150
msgid "Transaction Details"
msgstr "Transactie Details"
#: ../../../uibase.h:203
msgid "Options"
msgstr "Opties"
#: ../../../uibase.h:231
msgid "About Bitcoin"
msgstr "Over Bitcoin"
#: ../../../uibase.h:341
msgid "Your Bitcoin Addresses"
msgstr "Uw Bitcoin Adressen"

5
locale/readme.txt Normal file
View File

@@ -0,0 +1,5 @@
put bitcoin.po and bitcoin.mo files at:
locale/<langcode>/LC_MESSAGES/bitcoin.mo and .po
.po is the sourcefile
.mo is the compiled translation

565
main.cpp
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2009 Satoshi Nakamoto
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
@@ -26,6 +26,7 @@ CBlockIndex* pindexGenesisBlock = NULL;
int nBestHeight = -1;
uint256 hashBestChain = 0;
CBlockIndex* pindexBest = NULL;
int64 nTimeBestReceived = 0;
map<uint256, CBlock*> mapOrphanBlocks;
multimap<uint256, CBlock*> mapOrphanBlocksByPrev;
@@ -45,12 +46,19 @@ CKey keyUser;
map<uint256, int> mapRequestCount;
CCriticalSection cs_mapRequestCount;
map<string, string> mapAddressBook;
CCriticalSection cs_mapAddressBook;
vector<unsigned char> vchDefaultKey;
// Settings
int fGenerateBitcoins = false;
int64 nTransactionFee = 0;
CAddress addrIncoming;
int fLimitProcessors = false;
int nLimitProcessors = 1;
int fMinimizeToTray = true;
int fMinimizeOnClose = true;
@@ -136,6 +144,19 @@ bool AddToWallet(const CWalletTx& wtxIn)
if (!wtx.WriteToDisk())
return false;
// If default receiving address gets used, replace it with a new one
CScript scriptDefaultKey;
scriptDefaultKey.SetBitcoinAddress(vchDefaultKey);
foreach(const CTxOut& txout, wtx.vout)
{
if (txout.scriptPubKey == scriptDefaultKey)
{
CWalletDB walletdb;
walletdb.WriteDefaultKey(GenerateNewKey());
walletdb.WriteName(PubKeyToAddress(vchDefaultKey), "");
}
}
// Notify UI
vWalletUpdated.push_back(hash);
}
@@ -168,6 +189,27 @@ bool EraseFromWallet(uint256 hash)
return true;
}
void WalletUpdateSpent(const COutPoint& prevout)
{
// Anytime a signature is successfully verified, it's proof the outpoint is spent.
// Update the wallet spent flag if it doesn't know due to wallet.dat being
// restored from backup or the user making copies of wallet.dat.
CRITICAL_BLOCK(cs_mapWallet)
{
map<uint256, CWalletTx>::iterator mi = mapWallet.find(prevout.hash);
if (mi != mapWallet.end())
{
CWalletTx& wtx = (*mi).second;
if (!wtx.fSpent && wtx.vout[prevout.n].IsMine())
{
printf("WalletUpdateSpent found spent coin %sbc %s\n", FormatMoney(wtx.GetCredit()).c_str(), wtx.GetHash().ToString().c_str());
wtx.fSpent = true;
wtx.WriteToDisk();
vWalletUpdated.push_back(prevout.hash);
}
}
}
}
@@ -451,7 +493,7 @@ bool CTransaction::AcceptTransaction(CTxDB& txdb, bool fCheckInputs, bool* pfMis
if (!CheckTransaction())
return error("AcceptTransaction() : CheckTransaction failed");
// To help v0.1.5 clients who would see it as negative number. please delete this later.
// To help v0.1.5 clients who would see it as a negative number
if (nLockTime > INT_MAX)
return error("AcceptTransaction() : not accepting nLockTime beyond 2038");
@@ -552,7 +594,7 @@ bool CTransaction::RemoveFromMemoryPool()
int CMerkleTx::GetDepthInMainChain() const
int CMerkleTx::GetDepthInMainChain(int& nHeightRet) const
{
if (hashBlock == 0 || nIndex == -1)
return 0;
@@ -573,6 +615,7 @@ int CMerkleTx::GetDepthInMainChain() const
fMerkleVerified = true;
}
nHeightRet = pindex->nHeight;
return pindexBest->nHeight - pindex->nHeight + 1;
}
@@ -622,15 +665,44 @@ bool CWalletTx::AcceptWalletTransaction(CTxDB& txdb, bool fCheckInputs)
void ReacceptWalletTransactions()
{
// Reaccept any txes of ours that aren't already in a block
CTxDB txdb("r");
CRITICAL_BLOCK(cs_mapWallet)
{
foreach(PAIRTYPE(const uint256, CWalletTx)& item, mapWallet)
{
CWalletTx& wtx = item.second;
if (!wtx.IsCoinBase() && !txdb.ContainsTx(wtx.GetHash()))
wtx.AcceptWalletTransaction(txdb, false);
if (wtx.fSpent && wtx.IsCoinBase())
continue;
CTxIndex txindex;
if (txdb.ReadTxIndex(wtx.GetHash(), txindex))
{
// Update fSpent if a tx got spent somewhere else by a copy of wallet.dat
if (!wtx.fSpent)
{
if (txindex.vSpent.size() != wtx.vout.size())
{
printf("ERROR: ReacceptWalletTransactions() : txindex.vSpent.size() %d != wtx.vout.size() %d\n", txindex.vSpent.size(), wtx.vout.size());
continue;
}
for (int i = 0; i < txindex.vSpent.size(); i++)
{
if (!txindex.vSpent[i].IsNull() && wtx.vout[i].IsMine())
{
printf("ReacceptWalletTransactions found spent coin %sbc %s\n", FormatMoney(wtx.GetCredit()).c_str(), wtx.GetHash().ToString().c_str());
wtx.fSpent = true;
wtx.WriteToDisk();
break;
}
}
}
}
else
{
// Reaccept any txes of ours that aren't already in a block
if (!wtx.IsCoinBase())
wtx.AcceptWalletTransaction(txdb, false);
}
}
}
}
@@ -658,15 +730,20 @@ void CWalletTx::RelayWalletTransaction(CTxDB& txdb)
}
}
void RelayWalletTransactions()
void ResendWalletTransactions()
{
static int64 nLastTime;
if (GetTime() - nLastTime < 10 * 60)
// Do this infrequently and randomly to avoid giving away
// that these are our transactions.
static int64 nNextTime;
if (GetTime() < nNextTime)
return;
bool fFirst = (nNextTime == 0);
nNextTime = GetTime() + GetRand(120 * 60);
if (fFirst)
return;
nLastTime = GetTime();
// Rebroadcast any of our txes that aren't in a block yet
printf("RelayWalletTransactions()\n");
printf("ResendWalletTransactions()\n");
CTxDB txdb("r");
CRITICAL_BLOCK(cs_mapWallet)
{
@@ -675,7 +752,10 @@ void RelayWalletTransactions()
foreach(PAIRTYPE(const uint256, CWalletTx)& item, mapWallet)
{
CWalletTx& wtx = item.second;
mapSorted.insert(make_pair(wtx.nTimeReceived, &wtx));
// Don't rebroadcast until it's had plenty of time that
// it should have gotten in already by now.
if (nTimeBestReceived - wtx.nTimeReceived > 60 * 60)
mapSorted.insert(make_pair(wtx.nTimeReceived, &wtx));
}
foreach(PAIRTYPE(const unsigned int, CWalletTx*)& item, mapSorted)
{
@@ -1169,10 +1249,11 @@ bool CBlock::AddToBlockIndex(unsigned int nFile, unsigned int nBlockPos)
}
}
// New best link
// New best block
hashBestChain = hash;
pindexBest = pindexNew;
nBestHeight = pindexBest->nHeight;
nTimeBestReceived = GetTime();
nTransactionsUpdated++;
printf("AddToBlockIndex: new best=%s height=%d\n", hashBestChain.ToString().substr(0,16).c_str(), nBestHeight);
}
@@ -1182,9 +1263,6 @@ bool CBlock::AddToBlockIndex(unsigned int nFile, unsigned int nBlockPos)
if (pindexNew == pindexBest)
{
// Relay wallet transactions that haven't gotten in yet
RelayWalletTransactions();
// Notify UI to display prev block's coinbase if it was ours
static uint256 hashPrevBestCoinBase;
CRITICAL_BLOCK(cs_mapWallet)
@@ -1254,11 +1332,10 @@ bool CBlock::AcceptBlock()
if (nTime <= pindexPrev->GetMedianTimePast())
return error("AcceptBlock() : block's timestamp is too early");
// Check that all transactions are finalized (starting around Mar 2010)
if (nBestHeight > 36000)
foreach(const CTransaction& tx, vtx)
if (!tx.IsFinal(nTime))
return error("AcceptBlock() : contains a non-final transaction");
// Check that all transactions are finalized
foreach(const CTransaction& tx, vtx)
if (!tx.IsFinal(nTime))
return error("AcceptBlock() : contains a non-final transaction");
// Check proof of work
if (nBits != GetNextWorkRequired(pindexPrev))
@@ -1274,17 +1351,12 @@ bool CBlock::AcceptBlock()
if (!AddToBlockIndex(nFile, nBlockPos))
return error("AcceptBlock() : AddToBlockIndex failed");
if (hashBestChain == hash && nBestHeight > 28000)
RelayInventory(CInv(MSG_BLOCK, hash));
// // Add atoms to user reviews for coins created
// vector<unsigned char> vchPubKey;
// if (ExtractPubKey(vtx[0].vout[0].scriptPubKey, false, vchPubKey))
// {
// unsigned short nAtom = GetRand(USHRT_MAX - 100) + 100;
// vector<unsigned short> vAtoms(1, nAtom);
// AddAtomsAndPropagate(Hash(vchPubKey.begin(), vchPubKey.end()), vAtoms, true);
// }
// Relay inventory, but don't relay old inventory during initial block download
if (hashBestChain == hash)
CRITICAL_BLOCK(cs_vNodes)
foreach(CNode* pnode, vNodes)
if (nBestHeight > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : 55000))
pnode->PushInventory(CInv(MSG_BLOCK, hash));
return true;
}
@@ -1399,27 +1471,13 @@ bool ScanMessageStart(Stream& s)
bool CheckDiskSpace(int64 nAdditionalBytes)
{
#ifdef __WXMSW__
uint64 nFreeBytesAvailable = 0; // bytes available to caller
uint64 nTotalNumberOfBytes = 0; // bytes on disk
uint64 nTotalNumberOfFreeBytes = 0; // free bytes on disk
if (!GetDiskFreeSpaceEx(GetDataDir().c_str(),
(PULARGE_INTEGER)&nFreeBytesAvailable,
(PULARGE_INTEGER)&nTotalNumberOfBytes,
(PULARGE_INTEGER)&nTotalNumberOfFreeBytes))
{
printf("ERROR: GetDiskFreeSpaceEx() failed\n");
return true;
}
#else
uint64 nFreeBytesAvailable = filesystem::space(GetDataDir()).available;
#endif
// Check for 15MB because database could create another 10MB log file at any time
if (nFreeBytesAvailable < (int64)15000000 + nAdditionalBytes)
{
fShutdown = true;
ThreadSafeMessageBox("Warning: Your disk space is low ", "Bitcoin", wxOK | wxICON_EXCLAMATION);
ThreadSafeMessageBox(_("Warning: Disk space is low "), "Bitcoin", wxOK | wxICON_EXCLAMATION);
CreateThread(Shutdown, NULL);
return false;
}
@@ -1507,9 +1565,11 @@ bool LoadBlockIndex(bool fAllowNew)
CTransaction txNew;
txNew.vin.resize(1);
txNew.vout.resize(1);
txNew.vin[0].scriptSig = CScript() << 486604799 << CBigNum(4) << vector<unsigned char>((const unsigned char*)pszTimestamp, (const unsigned char*)pszTimestamp + strlen(pszTimestamp));
txNew.vout[0].nValue = 50 * COIN;
txNew.vout[0].scriptPubKey = CScript() << CBigNum("0x5F1DF16B2B704C8A578D0BBAF74D385CDE12C11EE50455F3C438EF4C3FBCF649B6DE611FEAE06279A60939E028A8D65C10B73071A6F16719274855FEB0FD8A6704") << OP_CHECKSIG;
txNew.vin[0].scriptSig = CScript() << 486604799 << CBigNum(4) << vector<unsigned char>((const unsigned char*)pszTimestamp, (const unsigned char*)pszTimestamp + strlen(pszTimestamp));
txNew.vout[0].nValue = 50 * COIN;
CBigNum bnPubKey;
bnPubKey.SetHex("0x5F1DF16B2B704C8A578D0BBAF74D385CDE12C11EE50455F3C438EF4C3FBCF649B6DE611FEAE06279A60939E028A8D65C10B73071A6F16719274855FEB0FD8A6704");
txNew.vout[0].scriptPubKey = CScript() << bnPubKey << OP_CHECKSIG;
CBlock block;
block.vtx.push_back(txNew);
block.hashPrevBlock = 0;
@@ -1643,10 +1703,8 @@ bool AlreadyHave(CTxDB& txdb, const CInv& inv)
{
switch (inv.type)
{
case MSG_TX: return mapTransactions.count(inv.hash) || txdb.ContainsTx(inv.hash);
case MSG_BLOCK: return mapBlockIndex.count(inv.hash) || mapOrphanBlocks.count(inv.hash);
case MSG_REVIEW: return true;
case MSG_PRODUCT: return mapProducts.count(inv.hash);
case MSG_TX: return mapTransactions.count(inv.hash) || txdb.ContainsTx(inv.hash);
case MSG_BLOCK: return mapBlockIndex.count(inv.hash) || mapOrphanBlocks.count(inv.hash);
}
// Don't know what it is, just say we already got one
return true;
@@ -1671,6 +1729,7 @@ bool ProcessMessages(CNode* pfrom)
// (4) message start
// (12) command
// (4) size
// (4) checksum
// (x) data
//
@@ -1678,12 +1737,13 @@ bool ProcessMessages(CNode* pfrom)
{
// Scan for message start
CDataStream::iterator pstart = search(vRecv.begin(), vRecv.end(), BEGIN(pchMessageStart), END(pchMessageStart));
if (vRecv.end() - pstart < sizeof(CMessageHeader))
int nHeaderSize = vRecv.GetSerializeSize(CMessageHeader());
if (vRecv.end() - pstart < nHeaderSize)
{
if (vRecv.size() > sizeof(CMessageHeader))
if (vRecv.size() > nHeaderSize)
{
printf("\n\nPROCESSMESSAGE MESSAGESTART NOT FOUND\n\n");
vRecv.erase(vRecv.begin(), vRecv.end() - sizeof(CMessageHeader));
vRecv.erase(vRecv.begin(), vRecv.end() - nHeaderSize);
}
break;
}
@@ -1692,6 +1752,7 @@ bool ProcessMessages(CNode* pfrom)
vRecv.erase(vRecv.begin(), pstart);
// Read header
vector<char> vHeaderSave(vRecv.begin(), vRecv.begin() + nHeaderSize);
CMessageHeader hdr;
vRecv >> hdr;
if (!hdr.IsValid())
@@ -1707,10 +1768,7 @@ bool ProcessMessages(CNode* pfrom)
{
// Rewind and wait for rest of message
///// need a mechanism to give up waiting for overlong message size error
//if (fDebug)
// printf("message-break\n");
vRecv.insert(vRecv.begin(), BEGIN(hdr), END(hdr));
Sleep(100);
vRecv.insert(vRecv.begin(), vHeaderSave.begin(), vHeaderSave.end());
break;
}
@@ -1718,6 +1776,20 @@ bool ProcessMessages(CNode* pfrom)
CDataStream vMsg(vRecv.begin(), vRecv.begin() + nMessageSize, vRecv.nType, vRecv.nVersion);
vRecv.ignore(nMessageSize);
// Checksum
if (vRecv.GetVersion() >= 209)
{
uint256 hash = Hash(vMsg.begin(), vMsg.end());
unsigned int nChecksum = 0;
memcpy(&nChecksum, &hash, sizeof(nChecksum));
if (nChecksum != hdr.nChecksum)
{
printf("ProcessMessage(%s, %d bytes) : CHECKSUM ERROR nChecksum=%08x hdr.nChecksum=%08x\n",
strCommand.c_str(), nMessageSize, nChecksum, hdr.nChecksum);
continue;
}
}
// Process message
bool fRet = false;
try
@@ -1734,6 +1806,11 @@ bool ProcessMessages(CNode* pfrom)
// Allow exceptions from underlength message on vRecv
printf("ProcessMessage(%s, %d bytes) : Exception '%s' caught, normally caused by a message being shorter than its stated length\n", strCommand.c_str(), nMessageSize, e.what());
}
else if (strstr(e.what(), ": size too large"))
{
// Allow exceptions from overlong size
printf("ProcessMessage(%s, %d bytes) : Exception '%s' caught\n", strCommand.c_str(), nMessageSize, e.what());
}
else
{
PrintException(&e, "ProcessMessage()");
@@ -1789,6 +1866,9 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
vRecv >> addrFrom >> nNonce;
if (pfrom->nVersion >= 106 && !vRecv.empty())
vRecv >> strSubVer;
if (pfrom->nVersion >= 209 && !vRecv.empty())
vRecv >> pfrom->nStartingHeight;
if (pfrom->nVersion == 0)
return false;
@@ -1799,9 +1879,6 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
return true;
}
pfrom->vSend.SetVersion(min(pfrom->nVersion, VERSION));
pfrom->vRecv.SetVersion(min(pfrom->nVersion, VERSION));
pfrom->fClient = !(pfrom->nServices & NODE_NETWORK);
if (pfrom->fClient)
{
@@ -1811,17 +1888,24 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
AddTimeData(pfrom->addr.ip, nTime);
// Change version
if (pfrom->nVersion >= 209)
pfrom->PushMessage("verack");
pfrom->vSend.SetVersion(min(pfrom->nVersion, VERSION));
if (pfrom->nVersion < 209)
pfrom->vRecv.SetVersion(min(pfrom->nVersion, VERSION));
// Ask the first connected node for block updates
static bool fAskedForBlocks;
if (!fAskedForBlocks && !pfrom->fClient)
static int nAskedForBlocks;
if (!pfrom->fClient && (nAskedForBlocks < 1 || vNodes.size() <= 1))
{
fAskedForBlocks = true;
nAskedForBlocks++;
pfrom->PushGetBlocks(pindexBest, uint256(0));
}
pfrom->fSuccessfullyConnected = true;
printf("version message: version %d\n", pfrom->nVersion);
printf("version message: version %d, blocks=%d\n", pfrom->nVersion, pfrom->nStartingHeight);
}
@@ -1832,33 +1916,53 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
}
else if (strCommand == "verack")
{
pfrom->vRecv.SetVersion(min(pfrom->nVersion, VERSION));
}
else if (strCommand == "addr")
{
vector<CAddress> vAddr;
vRecv >> vAddr;
if (vAddr.size() > 50000) // lower this to 1000 later
if (pfrom->nVersion < 200) // don't want addresses from 0.1.5
return true;
if (vAddr.size() > 1000)
return error("message addr size() = %d", vAddr.size());
// Store the new addresses
CAddrDB addrdb;
foreach(CAddress& addr, vAddr)
{
if (fShutdown)
return true;
addr.nTime = GetAdjustedTime() - 2 * 60 * 60;
if (pfrom->fGetAddr)
if (pfrom->fGetAddr || vAddr.size() > 10)
addr.nTime -= 5 * 24 * 60 * 60;
AddAddress(addrdb, addr, false);
AddAddress(addr);
pfrom->AddAddressKnown(addr);
if (!pfrom->fGetAddr && addr.IsRoutable())
{
// Put on lists to send to other nodes
// Relay to a limited number of other nodes
CRITICAL_BLOCK(cs_vNodes)
{
// Use deterministic randomness to send to
// the same places for an hour at a time
static uint256 hashSalt;
if (hashSalt == 0)
RAND_bytes((unsigned char*)&hashSalt, sizeof(hashSalt));
uint256 hashRand = addr.ip ^ (GetTime()/3600) ^ hashSalt;
multimap<uint256, CNode*> mapMix;
foreach(CNode* pnode, vNodes)
pnode->PushAddress(addr);
mapMix.insert(make_pair(hashRand = Hash(BEGIN(hashRand), END(hashRand)), pnode));
int nRelayNodes = 10; // reduce this to 5 when the network is large
for (multimap<uint256, CNode*>::iterator mi = mapMix.begin(); mi != mapMix.end() && nRelayNodes-- > 0; ++mi)
((*mi).second)->PushAddress(addr);
}
}
}
pfrom->fGetAddr = false;
if (vAddr.size() < 1000)
pfrom->fGetAddr = false;
}
@@ -2041,33 +2145,14 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
}
else if (strCommand == "review")
{
CDataStream vMsg(vRecv);
CReview review;
vRecv >> review;
CInv inv(MSG_REVIEW, review.GetHash());
pfrom->AddInventoryKnown(inv);
if (review.AcceptReview())
{
// Relay the original message as-is in case it's a higher version than we know how to parse
RelayMessage(inv, vMsg);
mapAlreadyAskedFor.erase(inv);
}
}
else if (strCommand == "block")
{
auto_ptr<CBlock> pblock(new CBlock);
vRecv >> *pblock;
//// debug print
// printf("received block:\n");
// pblock->print();
printf("received block %s\n", pblock->GetHash().ToString().substr(0,16).c_str());
// pblock->print();
CInv inv(MSG_BLOCK, pblock->GetHash());
pfrom->AddInventoryKnown(inv);
@@ -2079,8 +2164,10 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
else if (strCommand == "getaddr")
{
// This includes all nodes that are currently online,
// since they rebroadcast an addr every 24 hours
pfrom->vAddrToSend.clear();
int64 nSince = GetAdjustedTime() - 5 * 24 * 60 * 60; // in the last 5 days
int64 nSince = GetAdjustedTime() - 24 * 60 * 60; // in the last 24 hours
CRITICAL_BLOCK(cs_mapAddresses)
{
unsigned int nSize = mapAddresses.size();
@@ -2120,6 +2207,7 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
uint256 hashReply;
CWalletTx wtxNew;
vRecv >> hashReply >> wtxNew;
wtxNew.fFromMe = false;
// Broadcast
if (!wtxNew.AcceptWalletTransaction())
@@ -2185,7 +2273,7 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
bool SendMessages(CNode* pto)
bool SendMessages(CNode* pto, bool fSendTrickle)
{
CRITICAL_BLOCK(cs_main)
{
@@ -2194,7 +2282,7 @@ bool SendMessages(CNode* pto)
return true;
// Keep-alive ping
if (pto->nLastSend && GetTime() - pto->nLastSend > 12 * 60 && pto->vSend.empty())
if (pto->nLastSend && GetTime() - pto->nLastSend > 30 * 60 && pto->vSend.empty())
pto->PushMessage("ping");
// Address refresh broadcast
@@ -2216,60 +2304,105 @@ bool SendMessages(CNode* pto)
}
}
// Resend wallet transactions that haven't gotten in a block yet
ResendWalletTransactions();
//
// Message: addr
//
vector<CAddress> vAddrToSend;
vAddrToSend.reserve(pto->vAddrToSend.size());
foreach(const CAddress& addr, pto->vAddrToSend)
if (fSendTrickle)
{
// returns true if wasn't already contained in the set
if (pto->setAddrKnown.insert(addr).second)
vector<CAddress> vAddr;
vAddr.reserve(pto->vAddrToSend.size());
foreach(const CAddress& addr, pto->vAddrToSend)
{
vAddrToSend.push_back(addr);
if (vAddrToSend.size() >= 1000)
// returns true if wasn't already contained in the set
if (pto->setAddrKnown.insert(addr).second)
{
pto->PushMessage("addr", vAddrToSend);
vAddrToSend.clear();
vAddr.push_back(addr);
// receiver rejects addr messages larger than 1000
if (vAddr.size() >= 1000)
{
pto->PushMessage("addr", vAddr);
vAddr.clear();
}
}
}
pto->vAddrToSend.clear();
if (!vAddr.empty())
pto->PushMessage("addr", vAddr);
}
pto->vAddrToSend.clear();
if (!vAddrToSend.empty())
pto->PushMessage("addr", vAddrToSend);
//
// Message: inventory
//
vector<CInv> vInventoryToSend;
vector<CInv> vInv;
vector<CInv> vInvWait;
CRITICAL_BLOCK(pto->cs_inventory)
{
vInventoryToSend.reserve(pto->vInventoryToSend.size());
vInv.reserve(pto->vInventoryToSend.size());
vInvWait.reserve(pto->vInventoryToSend.size());
foreach(const CInv& inv, pto->vInventoryToSend)
{
if (pto->setInventoryKnown.count(inv))
continue;
// trickle out tx inv to protect privacy
if (inv.type == MSG_TX && !fSendTrickle)
{
// 1/4 of tx invs blast to all immediately
static uint256 hashSalt;
if (hashSalt == 0)
RAND_bytes((unsigned char*)&hashSalt, sizeof(hashSalt));
uint256 hashRand = inv.hash ^ hashSalt;
hashRand = Hash(BEGIN(hashRand), END(hashRand));
bool fTrickleWait = ((hashRand & 3) != 0);
// always trickle our own transactions
if (!fTrickleWait)
{
TRY_CRITICAL_BLOCK(cs_mapWallet)
{
map<uint256, CWalletTx>::iterator mi = mapWallet.find(inv.hash);
if (mi != mapWallet.end())
{
CWalletTx& wtx = (*mi).second;
if (wtx.fFromMe)
fTrickleWait = true;
}
}
}
if (fTrickleWait)
{
vInvWait.push_back(inv);
continue;
}
}
// returns true if wasn't already contained in the set
if (pto->setInventoryKnown.insert(inv).second)
{
vInventoryToSend.push_back(inv);
if (vInventoryToSend.size() >= 1000)
vInv.push_back(inv);
if (vInv.size() >= 1000)
{
pto->PushMessage("inv", vInventoryToSend);
vInventoryToSend.clear();
pto->PushMessage("inv", vInv);
vInv.clear();
}
}
}
pto->vInventoryToSend.clear();
pto->vInventoryToSend = vInvWait;
}
if (!vInventoryToSend.empty())
pto->PushMessage("inv", vInventoryToSend);
if (!vInv.empty())
pto->PushMessage("inv", vInv);
//
// Message: getdata
//
vector<CInv> vAskFor;
vector<CInv> vGetData;
int64 nNow = GetTime() * 1000000;
CTxDB txdb("r");
while (!pto->mapAskFor.empty() && (*pto->mapAskFor.begin()).first <= nNow)
@@ -2278,17 +2411,17 @@ bool SendMessages(CNode* pto)
if (!AlreadyHave(txdb, inv))
{
printf("sending getdata: %s\n", inv.ToString().c_str());
vAskFor.push_back(inv);
if (vAskFor.size() >= 1000)
vGetData.push_back(inv);
if (vGetData.size() >= 1000)
{
pto->PushMessage("getdata", vAskFor);
vAskFor.clear();
pto->PushMessage("getdata", vGetData);
vGetData.clear();
}
}
pto->mapAskFor.erase(pto->mapAskFor.begin());
}
if (!vAskFor.empty())
pto->PushMessage("getdata", vAskFor);
if (!vGetData.empty())
pto->PushMessage("getdata", vGetData);
}
return true;
@@ -2331,8 +2464,11 @@ void GenerateBitcoins(bool fGenerate)
int nAddThreads = nProcessors - vnThreadsRunning[3];
printf("Starting %d BitcoinMiner threads\n", nAddThreads);
for (int i = 0; i < nAddThreads; i++)
{
if (!CreateThread(ThreadBitcoinMiner, NULL))
printf("Error: CreateThread(ThreadBitcoinMiner) failed\n");
Sleep(10);
}
}
}
@@ -2351,7 +2487,7 @@ void ThreadBitcoinMiner(void* parg)
vnThreadsRunning[3]--;
PrintException(NULL, "ThreadBitcoinMiner()");
}
UIThreadCall(bind(CalledSetStatusBar, "", 0));
printf("ThreadBitcoinMiner exiting, %d threads remaining\n", vnThreadsRunning[3]);
}
@@ -2542,6 +2678,8 @@ void BitcoinMiner()
printf("BitcoinMiner:\n");
printf("proof-of-work found \n hash: %s \ntarget: %s\n", hash.GetHex().c_str(), hashTarget.GetHex().c_str());
pblock->print();
printf("%s ", DateTimeStrFormat("%x %H:%M", GetTime()).c_str());
printf("generated %s\n", FormatMoney(pblock->vtx[0].vout[0].nValue).c_str());
SetThreadPriority(THREAD_PRIORITY_NORMAL);
CRITICAL_BLOCK(cs_main)
@@ -2569,8 +2707,33 @@ void BitcoinMiner()
}
// Update nTime every few seconds
if ((++tmp.block.nNonce & 0xffff) == 0)
const unsigned int nMask = 0xffff;
if ((++tmp.block.nNonce & nMask) == 0)
{
// Meter hashes/sec
static int64 nHashCounter;
static int64 nLastTick;
if (nLastTick == 0)
nLastTick = GetTimeMillis();
else
nHashCounter += nMask + 1;
if (GetTimeMillis() - nLastTick > 4000)
{
double dHashesPerSec = 1000.0 * nHashCounter / (GetTimeMillis() - nLastTick);
nLastTick = GetTimeMillis();
nHashCounter = 0;
string strStatus = strprintf(" %.0f khash/s", dHashesPerSec/1000.0);
UIThreadCall(bind(CalledSetStatusBar, strStatus, 0));
static int64 nLogTime;
if (GetTime() - nLogTime > 30 * 60)
{
nLogTime = GetTime();
printf("%s ", DateTimeStrFormat("%x %H:%M", GetTime()).c_str());
printf("hashmeter %3d CPUs %6.0f khash/s\n", vnThreadsRunning[3], dHashesPerSec/1000.0);
}
}
// Check for stop or if block needs to be rebuilt
if (fShutdown)
return;
if (!fGenerateBitcoins)
@@ -2592,12 +2755,18 @@ void BitcoinMiner()
do
{
pindexTmp = pindexBest;
Sleep(10000);
for (int i = 0; i < 10; i++)
{
Sleep(1000);
if (fShutdown)
return;
}
}
while (pindexTmp != pindexBest);
}
break;
}
tmp.block.nTime = pblock->nTime = max(pindexPrev->GetMedianTimePast()+1, GetAdjustedTime());
}
}
@@ -2767,6 +2936,7 @@ bool CreateTransaction(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, CK
{
wtxNew.vin.clear();
wtxNew.vout.clear();
wtxNew.fFromMe = true;
if (nValue < 0)
return false;
int64 nValueOut = nValue;
@@ -2788,14 +2958,24 @@ bool CreateTransaction(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, CK
// Fill a vout back to self with any change
if (nValueIn > nTotalValue)
{
// Note: We use a new key here to keep it from being obvious which side is the change.
// The drawback is that by not reusing a previous key, the change may be lost if a
// backup is restored, if the backup doesn't have the new private key for the change.
// If we reused the old key, it would be possible to add code to look for and
// rediscover unknown transactions that were written with keys of ours to recover
// post-backup change.
// New private key
if (keyRet.IsNull())
keyRet.MakeNewKey();
// Fill a vout to ourself
CScript scriptPubKey;
scriptPubKey << keyRet.GetPubKey() << OP_CHECKSIG;
wtxNew.vout.push_back(CTxOut(nValueIn - nTotalValue, scriptPubKey));
// Fill a vout to ourself, using same address type as the payment
CScript scriptChange;
if (scriptPubKey.GetBitcoinAddressHash160() != 0)
scriptChange.SetBitcoinAddress(keyRet.GetPubKey());
else
scriptChange << keyRet.GetPubKey() << OP_CHECKSIG;
wtxNew.vout.push_back(CTxOut(nValueIn - nTotalValue, scriptChange));
}
// Fill a vout to the payee
@@ -2834,38 +3014,50 @@ bool CreateTransaction(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, CK
}
// Call after CreateTransaction unless you want to abort
bool CommitTransactionSpent(const CWalletTx& wtxNew, const CKey& key)
bool CommitTransaction(CWalletTx& wtxNew, const CKey& key)
{
CRITICAL_BLOCK(cs_main)
CRITICAL_BLOCK(cs_mapWallet)
{
//// todo: eventually should make this transactional, never want to add a
//// transaction without marking spent transactions, although the risk of
//// interruption during this step is remote.
// This is only to keep the database open to defeat the auto-flush for the
// duration of this scope. This is the only place where this optimization
// maybe makes sense; please don't do it anywhere else.
CWalletDB walletdb("r");
// Add the change's private key to wallet
if (!key.IsNull() && !AddKey(key))
throw runtime_error("CommitTransactionSpent() : AddKey failed\n");
// Add tx to wallet, because if it has change it's also ours,
// otherwise just for transaction history.
AddToWallet(wtxNew);
// Mark old coins as spent
set<CWalletTx*> setCoins;
foreach(const CTxIn& txin, wtxNew.vin)
setCoins.insert(&mapWallet[txin.prevout.hash]);
foreach(CWalletTx* pcoin, setCoins)
printf("CommitTransaction:\n%s", wtxNew.ToString().c_str());
CRITICAL_BLOCK(cs_mapWallet)
{
pcoin->fSpent = true;
pcoin->WriteToDisk();
vWalletUpdated.push_back(pcoin->GetHash());
// This is only to keep the database open to defeat the auto-flush for the
// duration of this scope. This is the only place where this optimization
// maybe makes sense; please don't do it anywhere else.
CWalletDB walletdb("r");
// Add the change's private key to wallet
if (!key.IsNull() && !AddKey(key))
throw runtime_error("CommitTransaction() : AddKey failed\n");
// Add tx to wallet, because if it has change it's also ours,
// otherwise just for transaction history.
AddToWallet(wtxNew);
// Mark old coins as spent
set<CWalletTx*> setCoins;
foreach(const CTxIn& txin, wtxNew.vin)
setCoins.insert(&mapWallet[txin.prevout.hash]);
foreach(CWalletTx* pcoin, setCoins)
{
pcoin->fSpent = true;
pcoin->WriteToDisk();
vWalletUpdated.push_back(pcoin->GetHash());
}
}
// Track how many getdata requests our transaction gets
CRITICAL_BLOCK(cs_mapRequestCount)
mapRequestCount[wtxNew.GetHash()] = 0;
// Broadcast
if (!wtxNew.AcceptTransaction())
{
// This must not fail. The transaction has already been signed and recorded.
printf("CommitTransaction() : Error: Transaction not valid");
return false;
}
wtxNew.RelayWalletTransaction();
}
MainFrameRepaint();
return true;
@@ -2874,7 +3066,7 @@ bool CommitTransactionSpent(const CWalletTx& wtxNew, const CKey& key)
bool SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew)
string SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, bool fAskFee)
{
CRITICAL_BLOCK(cs_main)
{
@@ -2884,34 +3076,37 @@ bool SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew)
{
string strError;
if (nValue + nFeeRequired > GetBalance())
strError = strprintf("Error: This is an oversized transaction that requires a transaction fee of %s ", FormatMoney(nFeeRequired).c_str());
strError = strprintf(_("Error: This is an oversized transaction that requires a transaction fee of %s "), FormatMoney(nFeeRequired).c_str());
else
strError = "Error: Transaction creation failed ";
wxMessageBox(strError, "Sending...");
return error("SendMoney() : %s", strError.c_str());
}
if (!CommitTransactionSpent(wtxNew, key))
{
wxMessageBox("Error finalizing transaction ", "Sending...");
return error("SendMoney() : Error finalizing transaction");
strError = _("Error: Transaction creation failed ");
printf("SendMoney() : %s", strError.c_str());
return strError;
}
// Track how many getdata requests our transaction gets
CRITICAL_BLOCK(cs_mapRequestCount)
mapRequestCount[wtxNew.GetHash()] = 0;
if (fAskFee && !ThreadSafeAskFee(nFeeRequired, _("Sending..."), NULL))
return "ABORTED";
printf("SendMoney: %s\n", wtxNew.GetHash().ToString().substr(0,6).c_str());
// Broadcast
if (!wtxNew.AcceptTransaction())
{
// This must not fail. The transaction has already been signed and recorded.
throw runtime_error("SendMoney() : wtxNew.AcceptTransaction() failed\n");
wxMessageBox("Error: Transaction not valid ", "Sending...");
return error("SendMoney() : Error: Transaction not valid");
}
wtxNew.RelayWalletTransaction();
if (!CommitTransaction(wtxNew, key))
return _("Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.");
}
MainFrameRepaint();
return true;
return "";
}
string SendMoneyToBitcoinAddress(string strAddress, int64 nValue, CWalletTx& wtxNew, bool fAskFee)
{
// Check amount
if (nValue <= 0)
return _("Invalid amount");
if (nValue + nTransactionFee > GetBalance())
return _("Insufficient funds");
// Parse bitcoin address
CScript scriptPubKey;
if (!scriptPubKey.SetBitcoinAddress(strAddress))
return _("Invalid bitcoin address");
return SendMoney(scriptPubKey, nValue, wtxNew, fAskFee);
}

49
main.h
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2009 Satoshi Nakamoto
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
@@ -36,6 +36,9 @@ extern CBlockIndex* pindexBest;
extern unsigned int nTransactionsUpdated;
extern map<uint256, int> mapRequestCount;
extern CCriticalSection cs_mapRequestCount;
extern map<string, string> mapAddressBook;
extern CCriticalSection cs_mapAddressBook;
extern vector<unsigned char> vchDefaultKey;
// Settings
extern int fGenerateBitcoins;
@@ -43,6 +46,8 @@ extern int64 nTransactionFee;
extern CAddress addrIncoming;
extern int fLimitProcessors;
extern int nLimitProcessors;
extern int fMinimizeToTray;
extern int fMinimizeOnClose;
@@ -56,17 +61,19 @@ FILE* AppendBlockFile(unsigned int& nFileRet);
bool AddKey(const CKey& key);
vector<unsigned char> GenerateNewKey();
bool AddToWallet(const CWalletTx& wtxIn);
void WalletUpdateSpent(const COutPoint& prevout);
void ReacceptWalletTransactions();
void RelayWalletTransactions();
bool LoadBlockIndex(bool fAllowNew=true);
void PrintBlockTree();
bool ProcessMessages(CNode* pfrom);
bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv);
bool SendMessages(CNode* pto);
bool SendMessages(CNode* pto, bool fSendTrickle);
int64 GetBalance();
bool CreateTransaction(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, CKey& keyRet, int64& nFeeRequiredRet);
bool CommitTransactionSpent(const CWalletTx& wtxNew, const CKey& key);
bool SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew);
bool CommitTransaction(CWalletTx& wtxNew, const CKey& key);
bool BroadcastTransaction(CWalletTx& wtxNew);
string SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, bool fAskFee=false);
string SendMoneyToBitcoinAddress(string strAddress, int64 nValue, CWalletTx& wtxNew, bool fAskFee=false);
void GenerateBitcoins(bool fGenerate);
void ThreadBitcoinMiner(void* parg);
void BitcoinMiner();
@@ -679,7 +686,8 @@ public:
int SetMerkleBranch(const CBlock* pblock=NULL);
int GetDepthInMainChain() const;
int GetDepthInMainChain(int& nHeightRet) const;
int GetDepthInMainChain() const { int nHeight; return GetDepthInMainChain(nHeight); }
bool IsInMainChain() const { return GetDepthInMainChain() > 0; }
int GetBlocksToMaturity() const;
bool AcceptTransaction(CTxDB& txdb, bool fCheckInputs=true);
@@ -1370,6 +1378,35 @@ public:
//
// Private key that includes an expiration date in case it never gets used.
//
class CWalletKey
{
public:
CPrivKey vchPrivKey;
int64 nTimeCreated;
int64 nTimeExpires;
string strComment;
//// todo: add something to note what created it (user, getnewaddress, change)
//// maybe should have a map<string, string> property map
CWalletKey(int64 nTimeExpiresIn=0)
{
nTimeCreated = (nTimeExpiresIn ? GetTime() : 0);
nTimeExpires = nTimeExpiresIn;
}
IMPLEMENT_SERIALIZE
(
if (!(nType & SER_GETHASH))
READWRITE(nVersion);
READWRITE(vchPrivKey);
READWRITE(nTimeCreated);
READWRITE(nTimeExpires);
READWRITE(strComment);
)
};

View File

@@ -1,81 +0,0 @@
# Copyright (c) 2009 Satoshi Nakamoto
# Distributed under the MIT/X11 software license, see the accompanying
# file license.txt or http://www.opensource.org/licenses/mit-license.php.
ifneq "$(BUILD)" "debug"
ifneq "$(BUILD)" "release"
BUILD=debug
endif
endif
ifeq "$(BUILD)" "debug"
D=d
DEBUGFLAGS=-g -D__WXDEBUG__
endif
INCLUDEPATHS=-I"/boost" -I"/db/build_unix" -I"/openssl/include" -I"/wxwidgets/lib/vc_lib/mswd" -I"/wxwidgets/include"
LIBPATHS=-L"/db/build_unix" -L"/openssl/out" -L"/wxwidgets/lib/gcc_lib"
LIBS= \
-l db_cxx \
-l eay32 \
-l wxmsw28$(D)_richtext -l wxmsw28$(D)_html -l wxmsw28$(D)_core -l wxmsw28$(D)_adv -l wxbase28$(D) -l wxtiff$(D) -l wxjpeg$(D) -l wxpng$(D) -l wxzlib$(D) -l wxregex$(D) -l wxexpat$(D) \
-l kernel32 -l user32 -l gdi32 -l comdlg32 -l winspool -l winmm -l shell32 -l comctl32 -l ole32 -l oleaut32 -l uuid -l rpcrt4 -l advapi32 -l ws2_32 -l shlwapi
WXDEFS=-DWIN32 -D__WXMSW__ -D_WINDOWS -DNOPCH
CFLAGS=-mthreads -O0 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(WXDEFS) $(INCLUDEPATHS)
HEADERS=headers.h util.h main.h serialize.h uint256.h key.h bignum.h script.h db.h base58.h
all: bitcoin.exe
headers.h.gch: headers.h $(HEADERS) net.h irc.h market.h uibase.h ui.h
g++ -c $(CFLAGS) -o $@ $<
obj/util.o: util.cpp $(HEADERS)
g++ -c $(CFLAGS) -o $@ $<
obj/script.o: script.cpp $(HEADERS)
g++ -c $(CFLAGS) -o $@ $<
obj/db.o: db.cpp $(HEADERS) market.h
g++ -c $(CFLAGS) -o $@ $<
obj/net.o: net.cpp $(HEADERS) net.h
g++ -c $(CFLAGS) -o $@ $<
obj/main.o: main.cpp $(HEADERS) net.h market.h sha.h
g++ -c $(CFLAGS) -o $@ $<
obj/market.o: market.cpp $(HEADERS) market.h
g++ -c $(CFLAGS) -o $@ $<
obj/ui.o: ui.cpp $(HEADERS) net.h uibase.h ui.h market.h
g++ -c $(CFLAGS) -o $@ $<
obj/uibase.o: uibase.cpp uibase.h
g++ -c $(CFLAGS) -o $@ $<
obj/sha.o: sha.cpp sha.h
g++ -c $(CFLAGS) -O3 -o $@ $<
obj/irc.o: irc.cpp $(HEADERS)
g++ -c $(CFLAGS) -o $@ $<
obj/ui_res.o: ui.rc rc/bitcoin.ico rc/check.ico rc/send16.bmp rc/send16mask.bmp rc/send16masknoshadow.bmp rc/send20.bmp rc/send20mask.bmp rc/addressbook16.bmp rc/addressbook16mask.bmp rc/addressbook20.bmp rc/addressbook20mask.bmp
windres $(WXDEFS) $(INCLUDEPATHS) -o $@ -i $<
OBJS=obj/util.o obj/script.o obj/db.o obj/net.o obj/main.o obj/market.o \
obj/ui.o obj/uibase.o obj/sha.o obj/irc.o obj/ui_res.o
bitcoin.exe: headers.h.gch $(OBJS)
-kill /f bitcoin.exe
g++ $(CFLAGS) -mwindows -Wl,--subsystem,windows -o $@ $(LIBPATHS) $(OBJS) $(LIBS)
clean:
-del /Q obj\*
-del /Q headers.h.gch

76
makefile.mingw Normal file
View File

@@ -0,0 +1,76 @@
# Copyright (c) 2009-2010 Satoshi Nakamoto
# Distributed under the MIT/X11 software license, see the accompanying
# file license.txt or http://www.opensource.org/licenses/mit-license.php.
# for wxWidgets-2.8.x, search and replace "mswud"->"mswd" and "29u"->"28"
INCLUDEPATHS= \
-I"/boost" \
-I"/db/build_unix" \
-I"/openssl/include" \
-I"/wxwidgets/lib/gcc_lib/mswud" \
-I"/wxwidgets/include"
LIBPATHS= \
-L"/boost/stage/lib" \
-L"/db/build_unix" \
-L"/openssl/out" \
-L"/wxwidgets/lib/gcc_lib"
WXLIBS= \
-l wxmsw29ud_html -l wxmsw29ud_core -l wxmsw29ud_adv -l wxbase29ud -l wxtiffd -l wxjpegd -l wxpngd -l wxzlibd
LIBS= \
-l libboost_system-mgw34-mt-d -l libboost_filesystem-mgw34-mt-d \
-l db_cxx \
-l eay32 \
-l kernel32 -l user32 -l gdi32 -l comdlg32 -l winspool -l winmm -l shell32 -l comctl32 -l ole32 -l oleaut32 -l uuid -l rpcrt4 -l advapi32 -l ws2_32 -l shlwapi
WXDEFS=-DWIN32 -D__WXMSW__ -D_WINDOWS -DNOPCH
DEBUGFLAGS=-g -D__WXDEBUG__
CFLAGS=-mthreads -O2 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(WXDEFS) $(INCLUDEPATHS)
HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
script.h db.h net.h irc.h main.h rpc.h uibase.h ui.h init.h sha.h
all: bitcoin.exe
headers.h.gch: headers.h $(HEADERS)
g++ -c $(CFLAGS) -o $@ $<
obj/%.o: %.cpp $(HEADERS) headers.h.gch
g++ -c $(CFLAGS) -o $@ $<
obj/sha.o: sha.cpp sha.h
g++ -c $(CFLAGS) -O3 -o $@ $<
obj/ui_res.o: ui.rc rc/bitcoin.ico rc/check.ico rc/send16.bmp rc/send16mask.bmp rc/send16masknoshadow.bmp rc/send20.bmp rc/send20mask.bmp rc/addressbook16.bmp rc/addressbook16mask.bmp rc/addressbook20.bmp rc/addressbook20mask.bmp
windres $(WXDEFS) $(INCLUDEPATHS) -o $@ -i $<
OBJS= \
obj/util.o \
obj/script.o \
obj/db.o \
obj/net.o \
obj/irc.o \
obj/main.o \
obj/rpc.o \
obj/init.o
bitcoin.exe: $(OBJS) obj/ui.o obj/uibase.o obj/sha.o obj/ui_res.o
g++ $(CFLAGS) -mwindows -Wl,--subsystem,windows -o $@ $(LIBPATHS) $^ $(WXLIBS) $(LIBS)
obj/nogui/%.o: %.cpp $(HEADERS)
g++ -c $(CFLAGS) -DwxUSE_GUI=0 -o $@ $<
bitcoind.exe: $(OBJS:obj/%=obj/nogui/%) obj/sha.o obj/ui_res.o
g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ -l wxbase29ud $(LIBS)
clean:
-del /Q obj\*
-del /Q obj\nogui\*
-del /Q headers.h.gch

65
makefile.osx Normal file
View File

@@ -0,0 +1,65 @@
# Copyright (c) 2009-2010 Satoshi Nakamoto
# Distributed under the MIT/X11 software license, see the accompanying
# file license.txt or http://www.opensource.org/licenses/mit-license.php.
# Mac OS X makefile for bitcoin
# Laszlo Hanyecz (solar@heliacal.net)
DEPSDIR=/Users/macosuser/bitcoin/deps
INCLUDEPATHS= \
-I"$(DEPSDIR)/include"
LIBPATHS= \
-L"$(DEPSDIR)/lib"
WXLIBS=$(shell $(DEPSDIR)/bin/wx-config --libs --static)
LIBS= -dead_strip \
$(DEPSDIR)/lib/libdb_cxx-4.8.a \
$(DEPSDIR)/lib/libboost_system.a \
$(DEPSDIR)/lib/libboost_filesystem.a \
$(DEPSDIR)/lib/libcrypto.a
WXDEFS=$(shell $(DEPSDIR)/bin/wx-config --cxxflags) -DNOPCH -DMSG_NOSIGNAL=0
DEBUGFLAGS=-g -DwxDEBUG_LEVEL=0
# ppc doesn't work because we don't support big-endian
CFLAGS=-mmacosx-version-min=10.5 -arch i386 -arch x86_64 -O2 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(WXDEFS) $(INCLUDEPATHS)
HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
script.h db.h net.h irc.h main.h rpc.h uibase.h ui.h init.h sha.h
all: bitcoin
obj/%.o: %.cpp $(HEADERS)
g++ -c $(CFLAGS) -o $@ $<
obj/sha.o: sha.cpp sha.h
g++ -c $(CFLAGS) -O3 -o $@ $<
OBJS= \
obj/util.o \
obj/script.o \
obj/db.o \
obj/net.o \
obj/irc.o \
obj/main.o \
obj/rpc.o \
obj/init.o
bitcoin: $(OBJS) obj/ui.o obj/uibase.o obj/sha.o
g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(WXLIBS) $(LIBS)
obj/nogui/%.o: %.cpp $(HEADERS)
g++ -c $(CFLAGS) -DwxUSE_GUI=0 -o $@ $<
bitcoind: $(OBJS:obj/%=obj/nogui/%) obj/sha.o
g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(WXLIBS) $(LIBS)
clean:
-rm -f obj/*.o
-rm -f obj/nogui/*.o

View File

@@ -1,89 +1,73 @@
# Copyright (c) 2009 Satoshi Nakamoto
# Copyright (c) 2009-2010 Satoshi Nakamoto
# Distributed under the MIT/X11 software license, see the accompanying
# file license.txt or http://www.opensource.org/licenses/mit-license.php.
ifneq "$(BUILD)" "debug"
ifneq "$(BUILD)" "release"
BUILD=debug
endif
endif
ifeq "$(BUILD)" "debug"
D=d
DEBUGFLAGS=-g -D__WXDEBUG__
endif
INCLUDEPATHS= \
-I"/usr/include" \
-I"/usr/local/include/wx-2.8" \
-I"/usr/local/lib/wx/include/gtk2-ansi-debug-static-2.8"
-I"/usr/local/include/wx-2.9" \
-I"/usr/local/lib/wx/include/gtk2-unicode-debug-static-2.9"
LIBPATHS= \
-L"/usr/lib" \
-L"/usr/local/lib"
WXLIBS= \
-Wl,-Bstatic \
-l wx_gtk2ud-2.9 \
-Wl,-Bdynamic \
-l gtk-x11-2.0 -l SM
LIBS= \
-Wl,-Bstatic \
-l boost_system -l boost_filesystem \
-l db_cxx \
-l wx_gtk2$(D)-2.8 \
-Wl,-Bdynamic \
-l crypto \
-l gtk-x11-2.0 -l gthread-2.0 -l SM
-l gthread-2.0
WXDEFS=-D__WXGTK__ -DNOPCH
CFLAGS=-O0 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(WXDEFS) $(INCLUDEPATHS)
HEADERS=headers.h util.h main.h serialize.h uint256.h key.h bignum.h script.h db.h base58.h
DEBUGFLAGS=-g -D__WXDEBUG__
CFLAGS=-O2 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(WXDEFS) $(INCLUDEPATHS)
HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
script.h db.h net.h irc.h main.h rpc.h uibase.h ui.h init.h sha.h
all: bitcoin
headers.h.gch: headers.h $(HEADERS) net.h irc.h market.h uibase.h ui.h
headers.h.gch: headers.h $(HEADERS)
g++ -c $(CFLAGS) -o $@ $<
obj/util.o: util.cpp $(HEADERS)
obj/%.o: %.cpp $(HEADERS) headers.h.gch
g++ -c $(CFLAGS) -o $@ $<
obj/script.o: script.cpp $(HEADERS)
g++ -c $(CFLAGS) -o $@ $<
obj/db.o: db.cpp $(HEADERS) market.h
g++ -c $(CFLAGS) -o $@ $<
obj/net.o: net.cpp $(HEADERS) net.h
g++ -c $(CFLAGS) -o $@ $<
obj/main.o: main.cpp $(HEADERS) net.h market.h sha.h
g++ -c $(CFLAGS) -o $@ $<
obj/market.o: market.cpp $(HEADERS) market.h
g++ -c $(CFLAGS) -o $@ $<
obj/ui.o: ui.cpp $(HEADERS) net.h uibase.h ui.h market.h
g++ -c $(CFLAGS) -o $@ $<
obj/uibase.o: uibase.cpp uibase.h
g++ -c $(CFLAGS) -o $@ $<
obj/sha.o: sha.cpp sha.h
obj/sha.o: sha.cpp sha.h
g++ -c $(CFLAGS) -O3 -o $@ $<
obj/irc.o: irc.cpp $(HEADERS)
g++ -c $(CFLAGS) -o $@ $<
OBJS= \
obj/util.o \
obj/script.o \
obj/db.o \
obj/net.o \
obj/irc.o \
obj/main.o \
obj/rpc.o \
obj/init.o
bitcoin: $(OBJS) obj/ui.o obj/uibase.o obj/sha.o
g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(WXLIBS) $(LIBS)
obj/nogui/%.o: %.cpp $(HEADERS)
g++ -c $(CFLAGS) -DwxUSE_GUI=0 -o $@ $<
bitcoind: $(OBJS:obj/%=obj/nogui/%) obj/sha.o
g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ -l wx_baseud-2.9 $(LIBS)
OBJS=obj/util.o obj/script.o obj/db.o obj/net.o obj/main.o obj/market.o \
obj/ui.o obj/uibase.o obj/sha.o obj/irc.o
bitcoin: headers.h.gch $(OBJS)
g++ $(CFLAGS) -o $@ $(LIBPATHS) $(OBJS) $(LIBS)
clean:
-rm obj/*
-rm obj/*.o
-rm obj/nogui/*.o
-rm headers.h.gch

View File

@@ -1,76 +1,106 @@
# Copyright (c) 2009 Satoshi Nakamoto
# Copyright (c) 2009-2010 Satoshi Nakamoto
# Distributed under the MIT/X11 software license, see the accompanying
# file license.txt or http://www.opensource.org/licenses/mit-license.php.
!IF "$(BUILD)" != "debug" && "$(BUILD)" != "release"
BUILD=debug
!ENDIF
!IF "$(BUILD)" == "debug"
D=d
DEBUGFLAGS=/Zi /Od /D__WXDEBUG__
!ENDIF
# for wxWidgets-2.8.x, search and replace "mswud"->"mswd" and "29u"->"28"
INCLUDEPATHS= \
/I"/boost" \
/I"/db/build_windows" \
/I"/openssl/include" \
/I"/wxwidgets/lib/vc_lib/mswud" \
/I"/wxwidgets/include"
LIBPATHS= \
/LIBPATH:"/boost/stage/lib" \
/LIBPATH:"/db/build_windows/debug" \
/LIBPATH:"/openssl/out" \
/LIBPATH:"/wxwidgets/lib/vc_lib"
INCLUDEPATHS=/I"/boost" /I"/db/build_windows" /I"/openssl/include" /I"/wxwidgets/lib/vc_lib/mswd" /I"/wxwidgets/include"
LIBPATHS=/LIBPATH:"/db/build_windows/$(BUILD)" /LIBPATH:"/openssl/out" /LIBPATH:"/wxwidgets/lib/vc_lib"
LIBS= \
libdb47s$(D).lib \
libeay32.lib \
wxmsw28$(D)_richtext.lib wxmsw28$(D)_html.lib wxmsw28$(D)_core.lib wxmsw28$(D)_adv.lib wxbase28$(D).lib wxtiff$(D).lib wxjpeg$(D).lib wxpng$(D).lib wxzlib$(D).lib wxregex$(D).lib wxexpat$(D).lib \
kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib ws2_32.lib shlwapi.lib
WXDEFS=/DWIN32 /D__WXMSW__ /D_WINDOWS /DNOPCH
CFLAGS=/c /nologo /Ob0 /MD$(D) /EHsc /GR /Zm300 /YX /Fpobj/headers.pch $(DEBUGFLAGS) $(WXDEFS) $(INCLUDEPATHS)
HEADERS=headers.h util.h main.h serialize.h uint256.h key.h bignum.h script.h db.h base58.h
libboost_system-vc80-mt-gd.lib libboost_filesystem-vc80-mt-gd.lib \
libdb47sd.lib \
libeay32.lib \
wxmsw29ud_html.lib wxmsw29ud_core.lib wxmsw29ud_adv.lib wxbase29ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib \
kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib ws2_32.lib shlwapi.lib
WXDEFS=/DWIN32 /D__WXMSW__ /D_WINDOWS /DNOPCH
DEBUGFLAGS=/Zi /Od /D__WXDEBUG__
CFLAGS=/c /nologo /Ob0 /MDd /EHsc /GR /Zm300 $(DEBUGFLAGS) $(WXDEFS) $(INCLUDEPATHS)
HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
script.h db.h net.h irc.h main.h rpc.h uibase.h ui.h init.h sha.h
all: bitcoin.exe
obj\util.obj: util.cpp $(HEADERS)
.cpp{obj}.obj:
cl $(CFLAGS) /Fo$@ %s
obj\script.obj: script.cpp $(HEADERS)
cl $(CFLAGS) /Fo$@ %s
obj\util.obj: $(HEADERS)
obj\db.obj: db.cpp $(HEADERS) market.h
cl $(CFLAGS) /Fo$@ %s
obj\script.obj: $(HEADERS)
obj\net.obj: net.cpp $(HEADERS) net.h
cl $(CFLAGS) /Fo$@ %s
obj\db.obj: $(HEADERS)
obj\main.obj: main.cpp $(HEADERS) net.h market.h
cl $(CFLAGS) /Fo$@ %s
obj\net.obj: $(HEADERS)
obj\market.obj: market.cpp $(HEADERS) market.h
cl $(CFLAGS) /Fo$@ %s
obj\irc.obj: $(HEADERS)
obj\ui.obj: ui.cpp $(HEADERS) net.h uibase.h ui.h market.h
cl $(CFLAGS) /Fo$@ %s
obj\main.obj: $(HEADERS)
obj\uibase.obj: uibase.cpp uibase.h
cl $(CFLAGS) /Fo$@ %s
obj\rpc.obj: $(HEADERS)
obj\init.obj: $(HEADERS)
obj\ui.obj: $(HEADERS)
obj\uibase.obj: $(HEADERS)
obj\sha.obj: sha.cpp sha.h
cl $(CFLAGS) /O2 /Fo$@ %s
obj\irc.obj: irc.cpp $(HEADERS)
cl $(CFLAGS) /Fo$@ %s
obj\ui.res: ui.rc rc/bitcoin.ico rc/check.ico rc/send16.bmp rc/send16mask.bmp rc/send16masknoshadow.bmp rc/send20.bmp rc/send20mask.bmp rc/addressbook16.bmp rc/addressbook16mask.bmp rc/addressbook20.bmp rc/addressbook20mask.bmp
rc $(INCLUDEPATHS) $(WXDEFS) /Fo$@ %s
OBJS= \
obj\util.obj \
obj\script.obj \
obj\db.obj \
obj\net.obj \
obj\irc.obj \
obj\main.obj \
obj\rpc.obj \
obj\init.obj
OBJS=obj\util.obj obj\script.obj obj\db.obj obj\net.obj obj\main.obj obj\market.obj \
obj\ui.obj obj\uibase.obj obj\sha.obj obj\irc.obj obj\ui.res
bitcoin.exe: $(OBJS)
-kill /f bitcoin.exe & sleep 1
bitcoin.exe: $(OBJS) obj\ui.obj obj\uibase.obj obj\sha.obj obj\ui.res
link /nologo /DEBUG /SUBSYSTEM:WINDOWS /OUT:$@ $(LIBPATHS) $** $(LIBS)
.cpp{obj\nogui}.obj:
cl $(CFLAGS) /DwxUSE_GUI=0 /Fo$@ %s
obj\nogui\util.obj: $(HEADERS)
obj\nogui\script.obj: $(HEADERS)
obj\nogui\db.obj: $(HEADERS)
obj\nogui\net.obj: $(HEADERS)
obj\nogui\irc.obj: $(HEADERS)
obj\nogui\main.obj: $(HEADERS)
obj\nogui\rpc.obj: $(HEADERS)
obj\nogui\init.obj: $(HEADERS)
bitcoind.exe: $(OBJS:obj\=obj\nogui\) obj\sha.obj obj\ui.res
link /nologo /DEBUG /OUT:$@ $(LIBPATHS) $** $(LIBS)
clean:
-del /Q obj\*
-del *.ilk

View File

@@ -1,264 +0,0 @@
// Copyright (c) 2009 Satoshi Nakamoto
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
#include "headers.h"
//
// Global state variables
//
//// later figure out how these are persisted
map<uint256, CProduct> mapMyProducts;
map<uint256, CProduct> mapProducts;
CCriticalSection cs_mapProducts;
bool AdvertInsert(const CProduct& product)
{
uint256 hash = product.GetHash();
bool fNew = false;
bool fUpdated = false;
CRITICAL_BLOCK(cs_mapProducts)
{
// Insert or find existing product
pair<map<uint256, CProduct>::iterator, bool> item = mapProducts.insert(make_pair(hash, product));
CProduct* pproduct = &(*(item.first)).second;
fNew = item.second;
// Update if newer
if (product.nSequence > pproduct->nSequence)
{
*pproduct = product;
fUpdated = true;
}
}
//if (fNew)
// NotifyProductAdded(hash);
//else if (fUpdated)
// NotifyProductUpdated(hash);
return (fNew || fUpdated);
}
void AdvertErase(const CProduct& product)
{
uint256 hash = product.GetHash();
CRITICAL_BLOCK(cs_mapProducts)
mapProducts.erase(hash);
//NotifyProductDeleted(hash);
}
template<typename T>
unsigned int Union(T& v1, T& v2)
{
// v1 = v1 union v2
// v1 and v2 must be sorted
// returns the number of elements added to v1
///// need to check that this is equivalent, then delete this comment
//vector<unsigned short> vUnion(v1.size() + v2.size());
//vUnion.erase(set_union(v1.begin(), v1.end(),
// v2.begin(), v2.end(),
// vUnion.begin()),
// vUnion.end());
T vUnion;
vUnion.reserve(v1.size() + v2.size());
set_union(v1.begin(), v1.end(),
v2.begin(), v2.end(),
back_inserter(vUnion));
unsigned int nAdded = vUnion.size() - v1.size();
if (nAdded > 0)
v1 = vUnion;
return nAdded;
}
void CUser::AddAtom(unsigned short nAtom, bool fOrigin)
{
// Ignore duplicates
if (binary_search(vAtomsIn.begin(), vAtomsIn.end(), nAtom) ||
find(vAtomsNew.begin(), vAtomsNew.end(), nAtom) != vAtomsNew.end())
return;
//// instead of zero atom, should change to free atom that propagates,
//// limited to lower than a certain value like 5 so conflicts quickly
// The zero atom never propagates,
// new atoms always propagate through the user that created them
if (nAtom == 0 || fOrigin)
{
vector<unsigned short> vTmp(1, nAtom);
Union(vAtomsIn, vTmp);
if (fOrigin)
vAtomsOut.push_back(nAtom);
return;
}
vAtomsNew.push_back(nAtom);
if (vAtomsNew.size() >= nFlowthroughRate || vAtomsOut.empty())
{
// Select atom to flow through to vAtomsOut
vAtomsOut.push_back(vAtomsNew[GetRand(vAtomsNew.size())]);
// Merge vAtomsNew into vAtomsIn
sort(vAtomsNew.begin(), vAtomsNew.end());
Union(vAtomsIn, vAtomsNew);
vAtomsNew.clear();
}
}
bool AddAtomsAndPropagate(uint256 hashUserStart, const vector<unsigned short>& vAtoms, bool fOrigin)
{
CReviewDB reviewdb;
map<uint256, vector<unsigned short> > pmapPropagate[2];
pmapPropagate[0][hashUserStart] = vAtoms;
for (int side = 0; !pmapPropagate[side].empty(); side = 1 - side)
{
map<uint256, vector<unsigned short> >& mapFrom = pmapPropagate[side];
map<uint256, vector<unsigned short> >& mapTo = pmapPropagate[1 - side];
for (map<uint256, vector<unsigned short> >::iterator mi = mapFrom.begin(); mi != mapFrom.end(); ++mi)
{
const uint256& hashUser = (*mi).first;
const vector<unsigned short>& vReceived = (*mi).second;
///// this would be a lot easier on the database if it put the new atom at the beginning of the list,
///// so the change would be right next to the vector size.
// Read user
CUser user;
reviewdb.ReadUser(hashUser, user);
unsigned int nIn = user.vAtomsIn.size();
unsigned int nNew = user.vAtomsNew.size();
unsigned int nOut = user.vAtomsOut.size();
// Add atoms received
foreach(unsigned short nAtom, vReceived)
user.AddAtom(nAtom, fOrigin);
fOrigin = false;
// Don't bother writing to disk if no changes
if (user.vAtomsIn.size() == nIn && user.vAtomsNew.size() == nNew)
continue;
// Propagate
if (user.vAtomsOut.size() > nOut)
foreach(const uint256& hash, user.vLinksOut)
mapTo[hash].insert(mapTo[hash].end(), user.vAtomsOut.begin() + nOut, user.vAtomsOut.end());
// Write back
if (!reviewdb.WriteUser(hashUser, user))
return false;
}
mapFrom.clear();
}
return true;
}
bool CReview::AcceptReview()
{
// Timestamp
nTime = GetTime();
// Check signature
if (!CKey::Verify(vchPubKeyFrom, GetSigHash(), vchSig))
return false;
CReviewDB reviewdb;
// Add review text to recipient
vector<CReview> vReviews;
reviewdb.ReadReviews(hashTo, vReviews);
vReviews.push_back(*this);
if (!reviewdb.WriteReviews(hashTo, vReviews))
return false;
// Add link from sender
CUser user;
uint256 hashFrom = Hash(vchPubKeyFrom.begin(), vchPubKeyFrom.end());
reviewdb.ReadUser(hashFrom, user);
user.vLinksOut.push_back(hashTo);
if (!reviewdb.WriteUser(hashFrom, user))
return false;
reviewdb.Close();
// Propagate atoms to recipient
vector<unsigned short> vZeroAtom(1, 0);
if (!AddAtomsAndPropagate(hashTo, user.vAtomsOut.size() ? user.vAtomsOut : vZeroAtom, false))
return false;
return true;
}
bool CProduct::CheckSignature()
{
return (CKey::Verify(vchPubKeyFrom, GetSigHash(), vchSig));
}
bool CProduct::CheckProduct()
{
if (!CheckSignature())
return false;
// Make sure it's a summary product
if (!mapDetails.empty() || !vOrderForm.empty())
return false;
// Look up seller's atom count
CReviewDB reviewdb("r");
CUser user;
reviewdb.ReadUser(GetUserHash(), user);
nAtoms = user.GetAtomCount();
reviewdb.Close();
////// delme, this is now done by AdvertInsert
//// Store to memory
//CRITICAL_BLOCK(cs_mapProducts)
// mapProducts[GetHash()] = *this;
return true;
}

182
market.h
View File

@@ -1,182 +0,0 @@
// Copyright (c) 2009 Satoshi Nakamoto
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
class CUser;
class CReview;
class CProduct;
static const unsigned int nFlowthroughRate = 2;
bool AdvertInsert(const CProduct& product);
void AdvertErase(const CProduct& product);
bool AddAtomsAndPropagate(uint256 hashUserStart, const vector<unsigned short>& vAtoms, bool fOrigin);
class CUser
{
public:
vector<unsigned short> vAtomsIn;
vector<unsigned short> vAtomsNew;
vector<unsigned short> vAtomsOut;
vector<uint256> vLinksOut;
CUser()
{
}
IMPLEMENT_SERIALIZE
(
if (!(nType & SER_GETHASH))
READWRITE(nVersion);
READWRITE(vAtomsIn);
READWRITE(vAtomsNew);
READWRITE(vAtomsOut);
READWRITE(vLinksOut);
)
void SetNull()
{
vAtomsIn.clear();
vAtomsNew.clear();
vAtomsOut.clear();
vLinksOut.clear();
}
uint256 GetHash() const { return SerializeHash(*this); }
int GetAtomCount() const
{
return (vAtomsIn.size() + vAtomsNew.size());
}
void AddAtom(unsigned short nAtom, bool fOrigin);
};
class CReview
{
public:
int nVersion;
uint256 hashTo;
map<string, string> mapValue;
vector<unsigned char> vchPubKeyFrom;
vector<unsigned char> vchSig;
// memory only
unsigned int nTime;
int nAtoms;
CReview()
{
nVersion = 1;
hashTo = 0;
nTime = 0;
nAtoms = 0;
}
IMPLEMENT_SERIALIZE
(
READWRITE(this->nVersion);
nVersion = this->nVersion;
if (!(nType & SER_DISK))
READWRITE(hashTo);
READWRITE(mapValue);
READWRITE(vchPubKeyFrom);
if (!(nType & SER_GETHASH))
READWRITE(vchSig);
)
uint256 GetHash() const { return SerializeHash(*this); }
uint256 GetSigHash() const { return SerializeHash(*this, SER_GETHASH|SER_SKIPSIG); }
uint256 GetUserHash() const { return Hash(vchPubKeyFrom.begin(), vchPubKeyFrom.end()); }
bool AcceptReview();
};
class CProduct
{
public:
int nVersion;
CAddress addr;
map<string, string> mapValue;
map<string, string> mapDetails;
vector<pair<string, string> > vOrderForm;
unsigned int nSequence;
vector<unsigned char> vchPubKeyFrom;
vector<unsigned char> vchSig;
// disk only
int nAtoms;
// memory only
set<unsigned int> setSources;
CProduct()
{
nVersion = 1;
nAtoms = 0;
nSequence = 0;
}
IMPLEMENT_SERIALIZE
(
READWRITE(this->nVersion);
nVersion = this->nVersion;
READWRITE(addr);
READWRITE(mapValue);
if (!(nType & SER_GETHASH))
{
READWRITE(mapDetails);
READWRITE(vOrderForm);
READWRITE(nSequence);
}
READWRITE(vchPubKeyFrom);
if (!(nType & SER_GETHASH))
READWRITE(vchSig);
if (nType & SER_DISK)
READWRITE(nAtoms);
)
uint256 GetHash() const { return SerializeHash(*this); }
uint256 GetSigHash() const { return SerializeHash(*this, SER_GETHASH|SER_SKIPSIG); }
uint256 GetUserHash() const { return Hash(vchPubKeyFrom.begin(), vchPubKeyFrom.end()); }
bool CheckSignature();
bool CheckProduct();
};
extern map<uint256, CProduct> mapProducts;
extern CCriticalSection cs_mapProducts;
extern map<uint256, CProduct> mapMyProducts;

135
net.cpp
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2009 Satoshi Nakamoto
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
@@ -223,14 +223,12 @@ bool GetMyExternalIP(unsigned int& ipRet)
bool AddAddress(CAddrDB& addrdb, CAddress addr, bool fCurrentlyOnline)
bool AddAddress(CAddress addr)
{
if (!addr.IsRoutable())
return false;
if (addr.ip == addrLocalHost.ip)
return false;
if (fCurrentlyOnline)
addr.nTime = GetAdjustedTime();
CRITICAL_BLOCK(cs_mapAddresses)
{
map<vector<unsigned char>, CAddress>::iterator it = mapAddresses.find(addr.GetKey());
@@ -239,7 +237,7 @@ bool AddAddress(CAddrDB& addrdb, CAddress addr, bool fCurrentlyOnline)
// New address
printf("AddAddress(%s)\n", addr.ToStringLog().c_str());
mapAddresses.insert(make_pair(addr.GetKey(), addr));
addrdb.WriteAddress(addr);
CAddrDB().WriteAddress(addr);
return true;
}
else
@@ -252,6 +250,7 @@ bool AddAddress(CAddrDB& addrdb, CAddress addr, bool fCurrentlyOnline)
addrFound.nServices |= addr.nServices;
fUpdated = true;
}
bool fCurrentlyOnline = (GetAdjustedTime() - addr.nTime < 24 * 60 * 60);
int64 nUpdateInterval = (fCurrentlyOnline ? 60 * 60 : 24 * 60 * 60);
if (addrFound.nTime < addr.nTime - nUpdateInterval)
{
@@ -260,7 +259,7 @@ bool AddAddress(CAddrDB& addrdb, CAddress addr, bool fCurrentlyOnline)
fUpdated = true;
}
if (fUpdated)
addrdb.WriteAddress(addrFound);
CAddrDB().WriteAddress(addrFound);
}
}
return false;
@@ -381,11 +380,6 @@ void CNode::CancelSubscribe(unsigned int nChannel)
foreach(CNode* pnode, vNodes)
if (pnode != this)
pnode->PushMessage("sub-cancel", nChannel);
// Clear memory, no longer subscribed
if (nChannel == MSG_PRODUCT)
CRITICAL_BLOCK(cs_mapProducts)
mapProducts.clear();
}
}
@@ -497,10 +491,6 @@ void CNode::Cleanup()
// All of a nodes broadcasts and subscriptions are automatically torn down
// when it goes down, so a node has to stay up to keep its broadcast going.
CRITICAL_BLOCK(cs_mapProducts)
for (map<uint256, CProduct>::iterator mi = mapProducts.begin(); mi != mapProducts.end();)
AdvertRemoveSource(this, MSG_PRODUCT, 0, (*(mi++)).second);
// Cancel subscriptions
for (unsigned int nChannel = 0; nChannel < vfSubscribe.size(); nChannel++)
if (vfSubscribe[nChannel])
@@ -522,7 +512,6 @@ void CNode::Cleanup()
void ThreadSocketHandler(void* parg)
{
IMPLEMENT_RANDOMIZE_STACK(ThreadSocketHandler(parg));
try
{
vnThreadsRunning[0]++;
@@ -536,7 +525,6 @@ void ThreadSocketHandler(void* parg)
vnThreadsRunning[0]--;
throw; // support pthread_cancel()
}
printf("ThreadSocketHandler exiting\n");
}
@@ -657,11 +645,7 @@ void ThreadSocketHandler2(void* parg)
if (FD_ISSET(hListenSocket, &fdsetRecv))
{
struct sockaddr_in sockaddr;
#ifdef __WXMSW__
int len = sizeof(sockaddr);
#else
socklen_t len = sizeof(sockaddr);
#endif
SOCKET hSocket = accept(hListenSocket, (struct sockaddr*)&sockaddr, &len);
CAddress addr(sockaddr);
if (hSocket == INVALID_SOCKET)
@@ -813,10 +797,28 @@ void ThreadSocketHandler2(void* parg)
unsigned int pnSeed[] =
{
0x35218252, 0x9c9c9618, 0xda6bacad, 0xb9aca862, 0x97c235c6,
0x146f9562, 0xb67b9e4b, 0x87cf4bc0, 0xb83945d0, 0x984333ad,
0xbbeec555, 0x6f0eb440, 0xe0005318, 0x7797e460, 0xddc60fcc,
0xb3bbd24a, 0x1ac85746, 0x641846a6, 0x85ee1155, 0xbb2e7a4c,
0x9cb8514b, 0xfc342648, 0x62958fae, 0xd0a8c87a, 0xa800795b,
0xda8c814e, 0x256a0c80, 0x3f23ec63, 0xd565df43, 0x997d9044,
0xaa121448, 0xbed8688e, 0x59d09a5e, 0xb2931243, 0x3730ba18,
0xdd3462d0, 0x4e4d1448, 0x171df645, 0x84ee1155,
0x248ac445, 0x0e634444, 0x0ded1b63, 0x30c01e60,
0xa2b9a094, 0x29e4fd43, 0x9ce61b4c, 0xdae09744,
};
void ThreadOpenConnections(void* parg)
{
IMPLEMENT_RANDOMIZE_STACK(ThreadOpenConnections(parg));
try
{
vnThreadsRunning[1]++;
@@ -830,7 +832,6 @@ void ThreadOpenConnections(void* parg)
vnThreadsRunning[1]--;
PrintException(NULL, "ThreadOpenConnections()");
}
printf("ThreadOpenConnections exiting\n");
}
@@ -875,22 +876,72 @@ void ThreadOpenConnections2(void* parg)
}
// Initiate network connections
int64 nStart = GetTime();
loop
{
// Wait
vnThreadsRunning[1]--;
Sleep(500);
const int nMaxConnections = 15;
while (vNodes.size() >= nMaxConnections || vNodes.size() >= mapAddresses.size())
while (vNodes.size() >= nMaxConnections)
{
Sleep(2000);
if (fShutdown)
return;
Sleep(2000);
}
vnThreadsRunning[1]++;
if (fShutdown)
return;
CRITICAL_BLOCK(cs_mapAddresses)
{
// Add seed nodes if IRC isn't working
static bool fSeedUsed;
bool fTOR = (fUseProxy && addrProxy.port == htons(9050));
if (mapAddresses.empty() && (GetTime() - nStart > 60 || fTOR))
{
for (int i = 0; i < ARRAYLEN(pnSeed); i++)
{
// It'll only connect to one or two seed nodes because once it connects,
// it'll get a pile of addresses with newer timestamps.
CAddress addr;
addr.ip = pnSeed[i];
addr.nTime = 0;
AddAddress(addr);
}
fSeedUsed = true;
}
if (fSeedUsed && mapAddresses.size() > ARRAYLEN(pnSeed) + 100)
{
// Disconnect seed nodes
set<unsigned int> setSeed(pnSeed, pnSeed + ARRAYLEN(pnSeed));
static int64 nSeedDisconnected;
if (nSeedDisconnected == 0)
{
nSeedDisconnected = GetTime();
CRITICAL_BLOCK(cs_vNodes)
foreach(CNode* pnode, vNodes)
if (setSeed.count(pnode->addr.ip))
pnode->fDisconnect = true;
}
// Keep setting timestamps to 0 so they won't reconnect
if (GetTime() - nSeedDisconnected < 60 * 60)
{
foreach(PAIRTYPE(const vector<unsigned char>, CAddress)& item, mapAddresses)
{
if (setSeed.count(item.second.ip))
{
item.second.nTime = 0;
CAddrDB().WriteAddress(item.second);
}
}
}
}
}
//
// Choose an address to connect to based on most recently seen
//
@@ -914,9 +965,9 @@ void ThreadOpenConnections2(void* parg)
int64 nSinceLastTry = GetAdjustedTime() - addr.nLastTry;
// Randomize the order in a deterministic way, putting the standard port first
int64 nRandomizer = (uint64)(addr.nLastTry * 9567851 + addr.ip * 7789) % (30 * 60);
int64 nRandomizer = (uint64)(nStart * 4951 + addr.nLastTry * 9567851 + addr.ip * 7789) % (2 * 60 * 60);
if (addr.port != DEFAULT_PORT)
nRandomizer += 30 * 60;
nRandomizer += 2 * 60 * 60;
// Last seen Base retry frequency
// <1 hour 10 min
@@ -928,7 +979,7 @@ void ThreadOpenConnections2(void* parg)
// 30 days 27 hours
// 90 days 46 hours
// 365 days 93 hours
int64 nDelay = (int64)(3600.0 * sqrt(fabs(nSinceLastSeen) / 3600.0) + nRandomizer);
int64 nDelay = (int64)(3600.0 * sqrt(fabs((double)nSinceLastSeen) / 3600.0) + nRandomizer);
// Fast reconnect for one hour after last seen
if (nSinceLastSeen < 60 * 60)
@@ -944,9 +995,7 @@ void ThreadOpenConnections2(void* parg)
continue;
// Only try the old stuff if we don't have enough connections
if (vNodes.size() >= 2 && nSinceLastSeen > 7 * 24 * 60 * 60)
continue;
if (vNodes.size() >= 5 && nSinceLastSeen > 24 * 60 * 60)
if (vNodes.size() >= 8 && nSinceLastSeen > 24 * 60 * 60)
continue;
// If multiple addresses are ready, prioritize by time since
@@ -987,9 +1036,9 @@ bool OpenNetworkConnection(const CAddress& addrConnect)
if (addrLocalHost.IsRoutable() && !fUseProxy)
{
// Advertise our address
vector<CAddress> vAddrToSend;
vAddrToSend.push_back(addrLocalHost);
pnode->PushMessage("addr", vAddrToSend);
vector<CAddress> vAddr;
vAddr.push_back(addrLocalHost);
pnode->PushMessage("addr", vAddr);
}
// Get as many addresses as we can
@@ -1016,7 +1065,6 @@ bool OpenNetworkConnection(const CAddress& addrConnect)
void ThreadMessageHandler(void* parg)
{
IMPLEMENT_RANDOMIZE_STACK(ThreadMessageHandler(parg));
try
{
vnThreadsRunning[2]++;
@@ -1030,7 +1078,6 @@ void ThreadMessageHandler(void* parg)
vnThreadsRunning[2]--;
PrintException(NULL, "ThreadMessageHandler()");
}
printf("ThreadMessageHandler exiting\n");
}
@@ -1038,9 +1085,8 @@ void ThreadMessageHandler2(void* parg)
{
printf("ThreadMessageHandler started\n");
SetThreadPriority(THREAD_PRIORITY_BELOW_NORMAL);
loop
while (!fShutdown)
{
// Poll the connected nodes for messages
vector<CNode*> vNodesCopy;
CRITICAL_BLOCK(cs_vNodes)
{
@@ -1048,6 +1094,11 @@ void ThreadMessageHandler2(void* parg)
foreach(CNode* pnode, vNodesCopy)
pnode->AddRef();
}
// Poll the connected nodes for messages
CNode* pnodeTrickle = NULL;
if (!vNodesCopy.empty())
pnodeTrickle = vNodesCopy[GetRand(vNodesCopy.size())];
foreach(CNode* pnode, vNodesCopy)
{
// Receive messages
@@ -1058,10 +1109,11 @@ void ThreadMessageHandler2(void* parg)
// Send messages
TRY_CRITICAL_BLOCK(pnode->cs_vSend)
SendMessages(pnode);
SendMessages(pnode, pnode == pnodeTrickle);
if (fShutdown)
return;
}
CRITICAL_BLOCK(cs_vNodes)
{
foreach(CNode* pnode, vNodesCopy)
@@ -1329,7 +1381,7 @@ bool StopNode()
fShutdown = true;
nTransactionsUpdated++;
int64 nStart = GetTime();
while (vnThreadsRunning[0] > 0 || vnThreadsRunning[2] > 0 || vnThreadsRunning[3] > 0)
while (vnThreadsRunning[0] > 0 || vnThreadsRunning[2] > 0 || vnThreadsRunning[3] > 0 || vnThreadsRunning[4] > 0)
{
if (GetTime() - nStart > 20)
break;
@@ -1339,7 +1391,8 @@ bool StopNode()
if (vnThreadsRunning[1] > 0) printf("ThreadOpenConnections still running\n");
if (vnThreadsRunning[2] > 0) printf("ThreadMessageHandler still running\n");
if (vnThreadsRunning[3] > 0) printf("ThreadBitcoinMiner still running\n");
while (vnThreadsRunning[2] > 0)
if (vnThreadsRunning[4] > 0) printf("ThreadRPCServer still running\n");
while (vnThreadsRunning[2] > 0 || vnThreadsRunning[4] > 0)
Sleep(20);
Sleep(50);

104
net.h
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2009 Satoshi Nakamoto
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
@@ -8,10 +8,11 @@ class CInv;
class CRequestTracker;
class CNode;
class CBlockIndex;
extern int nBestHeight;
static const unsigned short DEFAULT_PORT = htons(8333);
static const unsigned short DEFAULT_PORT = 0x8d20; // htons(8333)
static const unsigned int PUBLISH_HOPS = 5;
enum
{
@@ -23,7 +24,7 @@ enum
bool ConnectSocket(const CAddress& addrConnect, SOCKET& hSocketRet);
bool GetMyExternalIP(unsigned int& ipRet);
bool AddAddress(CAddrDB& addrdb, CAddress addr, bool fCurrentlyOnline=true);
bool AddAddress(CAddress addr);
void AddressCurrentlyConnected(const CAddress& addr);
CNode* FindNode(unsigned int ip);
CNode* ConnectNode(CAddress addrConnect, int64 nTimeout=0);
@@ -45,6 +46,7 @@ bool StopNode();
// (4) message start
// (12) command
// (4) size
// (4) checksum
// The message start string is designed to be unlikely to occur in normal data.
// The characters are rarely used upper ascii, not valid as UTF-8, and produce
@@ -58,6 +60,7 @@ public:
char pchMessageStart[sizeof(::pchMessageStart)];
char pchCommand[COMMAND_SIZE];
unsigned int nMessageSize;
unsigned int nChecksum;
CMessageHeader()
{
@@ -65,6 +68,7 @@ public:
memset(pchCommand, 0, sizeof(pchCommand));
pchCommand[1] = 1;
nMessageSize = -1;
nChecksum = 0;
}
CMessageHeader(const char* pszCommand, unsigned int nMessageSizeIn)
@@ -72,6 +76,7 @@ public:
memcpy(pchMessageStart, ::pchMessageStart, sizeof(pchMessageStart));
strncpy(pchCommand, pszCommand, COMMAND_SIZE);
nMessageSize = nMessageSizeIn;
nChecksum = 0;
}
IMPLEMENT_SERIALIZE
@@ -79,6 +84,8 @@ public:
READWRITE(FLATDATA(pchMessageStart));
READWRITE(FLATDATA(pchCommand));
READWRITE(nMessageSize);
if (nVersion >= 209)
READWRITE(nChecksum);
)
string GetCommand()
@@ -282,16 +289,24 @@ public:
bool IsRoutable() const
{
return !(GetByte(3) == 10 ||
(GetByte(3) == 192 && GetByte(2) == 168) ||
GetByte(3) == 127 ||
GetByte(3) == 0 ||
ip == 0 ||
ip == INADDR_NONE);
return IsValid() &&
!(GetByte(3) == 10 ||
(GetByte(3) == 192 && GetByte(2) == 168) ||
GetByte(3) == 127 ||
GetByte(3) == 0);
}
bool IsValid() const
{
// Clean up 3-byte shifted addresses caused by garbage in size field
// of addr messages from versions before 0.2.9 checksum.
// Two consecutive addr messages look like this:
// header20 vectorlen3 addr26 addr26 addr26 header20 vectorlen3 addr26 addr26 addr26...
// so if the first length field is garbled, it reads the second batch
// of addr misaligned by 3 bytes.
if (memcmp(pchReserved, pchIPv4+3, sizeof(pchIPv4)-3) == 0)
return false;
return (ip != 0 && ip != INADDR_NONE && port != htons(USHRT_MAX));
}
@@ -341,9 +356,6 @@ enum
{
MSG_TX = 1,
MSG_BLOCK,
MSG_REVIEW,
MSG_PRODUCT,
MSG_TABLE,
};
static const char* ppszTypeName[] =
@@ -351,9 +363,6 @@ static const char* ppszTypeName[] =
"ERROR",
"tx",
"block",
"review",
"product",
"table",
};
class CInv
@@ -476,6 +485,7 @@ extern CAddress addrProxy;
class CNode
{
public:
@@ -490,7 +500,8 @@ public:
int64 nLastRecv;
int64 nLastSendEmpty;
int64 nTimeConnected;
unsigned int nPushPos;
unsigned int nHeaderStart;
unsigned int nMessageStart;
CAddress addr;
int nVersion;
bool fClient;
@@ -507,6 +518,7 @@ public:
uint256 hashContinue;
CBlockIndex* pindexLastGetBlocksBegin;
uint256 hashLastGetBlocksEnd;
int nStartingHeight;
// flood
vector<CAddress> vAddrToSend;
@@ -528,12 +540,21 @@ public:
nServices = 0;
hSocket = hSocketIn;
vSend.SetType(SER_NETWORK);
vSend.SetVersion(0);
vRecv.SetType(SER_NETWORK);
vRecv.SetVersion(0);
// Version 0.2 obsoletes 20 Feb 2012
if (GetTime() > 1329696000)
{
vSend.SetVersion(209);
vRecv.SetVersion(209);
}
nLastSend = 0;
nLastRecv = 0;
nLastSendEmpty = GetTime();
nTimeConnected = GetTime();
nPushPos = -1;
nHeaderStart = -1;
nMessageStart = -1;
addr = addrIn;
nVersion = 0;
fClient = false; // set by version message
@@ -546,6 +567,7 @@ public:
hashContinue = 0;
pindexLastGetBlocksBegin = 0;
hashLastGetBlocksEnd = 0;
nStartingHeight = -1;
fGetAddr = false;
vfSubscribe.assign(256, false);
@@ -555,7 +577,8 @@ public:
CAddress addrYou = (fUseProxy ? CAddress("0.0.0.0") : addr);
CAddress addrMe = (fUseProxy ? CAddress("0.0.0.0") : addrLocalHost);
RAND_bytes((unsigned char*)&nLocalHostNonce, sizeof(nLocalHostNonce));
PushMessage("version", VERSION, nLocalServices, nTime, addrYou, addrMe, nLocalHostNonce, string(pszSubVer));
PushMessage("version", VERSION, nLocalServices, nTime, addrYou, addrMe,
nLocalHostNonce, string(pszSubVer), nBestHeight);
}
~CNode()
@@ -604,7 +627,7 @@ public:
// Known checking here is only to save space from duplicates.
// SendMessages will filter it again for knowns that were added
// after addresses were pushed.
if (!setAddrKnown.count(addr))
if (addr.IsValid() && !setAddrKnown.count(addr))
vAddrToSend.push_back(addr);
}
@@ -627,7 +650,7 @@ public:
// We're using mapAskFor as a priority queue,
// the key is the earliest time the request can be sent
int64& nRequestTime = mapAlreadyAskedFor[inv];
printf("askfor %s %"PRI64d"\n", inv.ToString().c_str(), nRequestTime);
printf("askfor %s %"PRI64d"\n", inv.ToString().c_str(), nRequestTime);
// Make sure not to reuse time indexes to keep things in the same order
int64 nNow = (GetTime() - 1) * 1000000;
@@ -644,10 +667,11 @@ public:
void BeginMessage(const char* pszCommand)
{
cs_vSend.Enter();
if (nPushPos != -1)
if (nHeaderStart != -1)
AbortMessage();
nPushPos = vSend.size();
nHeaderStart = vSend.size();
vSend << CMessageHeader(pszCommand, 0);
nMessageStart = vSend.size();
if (fDebug)
printf("%s ", DateTimeStrFormat("%x %H:%M:%S", GetTime()).c_str());
printf("sending: %s ", pszCommand);
@@ -655,10 +679,11 @@ public:
void AbortMessage()
{
if (nPushPos == -1)
if (nHeaderStart == -1)
return;
vSend.resize(nPushPos);
nPushPos = -1;
vSend.resize(nHeaderStart);
nHeaderStart = -1;
nMessageStart = -1;
cs_vSend.Leave();
printf("(aborted)\n");
}
@@ -672,25 +697,36 @@ public:
return;
}
if (nPushPos == -1)
if (nHeaderStart == -1)
return;
// Patch in the size
unsigned int nSize = vSend.size() - nPushPos - sizeof(CMessageHeader);
memcpy((char*)&vSend[nPushPos] + offsetof(CMessageHeader, nMessageSize), &nSize, sizeof(nSize));
// Set the size
unsigned int nSize = vSend.size() - nMessageStart;
memcpy((char*)&vSend[nHeaderStart] + offsetof(CMessageHeader, nMessageSize), &nSize, sizeof(nSize));
// Set the checksum
if (vSend.GetVersion() >= 209)
{
uint256 hash = Hash(vSend.begin() + nMessageStart, vSend.end());
unsigned int nChecksum = 0;
memcpy(&nChecksum, &hash, sizeof(nChecksum));
assert(nMessageStart - nHeaderStart >= offsetof(CMessageHeader, nChecksum) + sizeof(nChecksum));
memcpy((char*)&vSend[nHeaderStart] + offsetof(CMessageHeader, nChecksum), &nChecksum, sizeof(nChecksum));
}
printf("(%d bytes) ", nSize);
printf("\n");
nPushPos = -1;
nHeaderStart = -1;
nMessageStart = -1;
cs_vSend.Leave();
}
void EndMessageAbortIfEmpty()
{
if (nPushPos == -1)
if (nHeaderStart == -1)
return;
int nSize = vSend.size() - nPushPos - sizeof(CMessageHeader);
int nSize = vSend.size() - nMessageStart;
if (nSize > 0)
EndMessage();
else
@@ -699,9 +735,9 @@ public:
const char* GetMessageCommand() const
{
if (nPushPos == -1)
if (nHeaderStart == -1)
return "";
return &vSend[nPushPos] + offsetof(CMessageHeader, pchCommand);
return &vSend[nHeaderStart] + offsetof(CMessageHeader, pchCommand);
}

BIN
rc/bitcoin-bc.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 25 KiB

BIN
rc/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

984
rpc.cpp Normal file
View File

@@ -0,0 +1,984 @@
// Copyright (c) 2010 Satoshi Nakamoto
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
#include "headers.h"
#undef printf
#include <boost/asio.hpp>
#include "json/json_spirit_reader_template.h"
#include "json/json_spirit_writer_template.h"
#include "json/json_spirit_utils.h"
#define printf OutputDebugStringF
// MinGW 3.4.5 gets "fatal error: had to relocate PCH" if the json headers are
// precompiled in headers.h. The problem might be when the pch file goes over
// a certain size around 145MB. If we need access to json_spirit outside this
// file, we could use the compiled json_spirit option.
using boost::asio::ip::tcp;
using namespace json_spirit;
void ThreadRPCServer2(void* parg);
typedef Value(*rpcfn_type)(const Array& params, bool fHelp);
extern map<string, rpcfn_type> mapCallTable;
///
/// Note: This interface may still be subject to change.
///
Value help(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
throw runtime_error(
"help\n"
"List commands.");
string strRet;
for (map<string, rpcfn_type>::iterator mi = mapCallTable.begin(); mi != mapCallTable.end(); ++mi)
{
try
{
Array params;
(*(*mi).second)(params, true);
}
catch (std::exception& e)
{
// Help text is returned in an exception
string strHelp = string(e.what());
if (strHelp.find('\n') != -1)
strHelp = strHelp.substr(0, strHelp.find('\n'));
strRet += strHelp + "\n";
}
}
strRet = strRet.substr(0,strRet.size()-1);
return strRet;
}
Value stop(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
throw runtime_error(
"stop\n"
"Stop bitcoin server.");
// Shutdown will take long enough that the response should get back
CreateThread(Shutdown, NULL);
return "bitcoin server stopping";
}
Value getblockcount(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
throw runtime_error(
"getblockcount\n"
"Returns the number of blocks in the longest block chain.");
return nBestHeight + 1;
}
Value getblocknumber(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
throw runtime_error(
"getblocknumber\n"
"Returns the block number of the latest block in the longest block chain.");
return nBestHeight;
}
Value getconnectioncount(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
throw runtime_error(
"getconnectioncount\n"
"Returns the number of connections to other nodes.");
return (int)vNodes.size();
}
double GetDifficulty()
{
// Floating point number that is a multiple of the minimum difficulty,
// minimum difficulty = 1.0.
if (pindexBest == NULL)
return 1.0;
int nShift = 256 - 32 - 31; // to fit in a uint
double dMinimum = (CBigNum().SetCompact(bnProofOfWorkLimit.GetCompact()) >> nShift).getuint();
double dCurrently = (CBigNum().SetCompact(pindexBest->nBits) >> nShift).getuint();
return dMinimum / dCurrently;
}
Value getdifficulty(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
throw runtime_error(
"getdifficulty\n"
"Returns the proof-of-work difficulty as a multiple of the minimum difficulty.");
return GetDifficulty();
}
Value getbalance(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
throw runtime_error(
"getbalance\n"
"Returns the server's available balance.");
return ((double)GetBalance() / (double)COIN);
}
Value getgenerate(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
throw runtime_error(
"getgenerate\n"
"Returns true or false.");
return (bool)fGenerateBitcoins;
}
Value setgenerate(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 2)
throw runtime_error(
"setgenerate <generate> [genproclimit]\n"
"<generate> is true or false to turn generation on or off.\n"
"Generation is limited to [genproclimit] processors, -1 is unlimited.");
bool fGenerate = true;
if (params.size() > 0)
fGenerate = params[0].get_bool();
if (params.size() > 1)
{
int nGenProcLimit = params[1].get_int();
fLimitProcessors = (nGenProcLimit != -1);
CWalletDB().WriteSetting("fLimitProcessors", fLimitProcessors);
if (nGenProcLimit != -1)
CWalletDB().WriteSetting("nLimitProcessors", nLimitProcessors = nGenProcLimit);
}
GenerateBitcoins(fGenerate);
return Value::null;
}
Value getinfo(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
throw runtime_error(
"getinfo");
Object obj;
obj.push_back(Pair("balance", (double)GetBalance() / (double)COIN));
obj.push_back(Pair("blocks", (int)nBestHeight + 1));
obj.push_back(Pair("connections", (int)vNodes.size()));
obj.push_back(Pair("proxy", (fUseProxy ? addrProxy.ToStringIPPort() : string())));
obj.push_back(Pair("generate", (bool)fGenerateBitcoins));
obj.push_back(Pair("genproclimit", (int)(fLimitProcessors ? nLimitProcessors : -1)));
obj.push_back(Pair("difficulty", (double)GetDifficulty()));
return obj;
}
Value getnewaddress(const Array& params, bool fHelp)
{
if (fHelp || params.size() > 1)
throw runtime_error(
"getnewaddress [label]\n"
"Returns a new bitcoin address for receiving payments. "
"If [label] is specified (recommended), it is added to the address book "
"so payments received with the address will be labeled.");
// Parse the label first so we don't generate a key if there's an error
string strLabel;
if (params.size() > 0)
strLabel = params[0].get_str();
// Generate a new key that is added to wallet
string strAddress = PubKeyToAddress(GenerateNewKey());
SetAddressBookName(strAddress, strLabel);
return strAddress;
}
Value setlabel(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 2)
throw runtime_error(
"setlabel <bitcoinaddress> <label>\n"
"Sets the label associated with the given address.");
string strAddress = params[0].get_str();
string strLabel;
if (params.size() > 1)
strLabel = params[1].get_str();
SetAddressBookName(strAddress, strLabel);
return Value::null;
}
Value getlabel(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 1)
throw runtime_error(
"getlabel <bitcoinaddress>\n"
"Returns the label associated with the given address.");
string strAddress = params[0].get_str();
string strLabel;
CRITICAL_BLOCK(cs_mapAddressBook)
{
map<string, string>::iterator mi = mapAddressBook.find(strAddress);
if (mi != mapAddressBook.end() && !(*mi).second.empty())
strLabel = (*mi).second;
}
return strLabel;
}
Value getaddressesbylabel(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 1)
throw runtime_error(
"getaddressesbylabel <label>\n"
"Returns the list of addresses with the given label.");
string strLabel = params[0].get_str();
// Find all addresses that have the given label
Array ret;
CRITICAL_BLOCK(cs_mapAddressBook)
{
foreach(const PAIRTYPE(string, string)& item, mapAddressBook)
{
const string& strAddress = item.first;
const string& strName = item.second;
if (strName == strLabel)
{
// We're only adding valid bitcoin addresses and not ip addresses
CScript scriptPubKey;
if (scriptPubKey.SetBitcoinAddress(strAddress))
ret.push_back(strAddress);
}
}
}
return ret;
}
Value sendtoaddress(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 2 || params.size() > 4)
throw runtime_error(
"sendtoaddress <bitcoinaddress> <amount> [comment] [comment-to]\n"
"<amount> is a real and is rounded to the nearest 0.01");
string strAddress = params[0].get_str();
// Amount
if (params[1].get_real() <= 0.0 || params[1].get_real() > 21000000.0)
throw runtime_error("Invalid amount");
int64 nAmount = roundint64(params[1].get_real() * 100.00) * CENT;
// Wallet comments
CWalletTx wtx;
if (params.size() > 2 && params[2].type() != null_type && !params[2].get_str().empty())
wtx.mapValue["message"] = params[2].get_str();
if (params.size() > 3 && params[3].type() != null_type && !params[3].get_str().empty())
wtx.mapValue["to"] = params[3].get_str();
string strError = SendMoneyToBitcoinAddress(strAddress, nAmount, wtx);
if (strError != "")
throw runtime_error(strError);
return "sent";
}
Value listtransactions(const Array& params, bool fHelp)
{
if (fHelp || params.size() > 2)
throw runtime_error(
"listtransactions [count=10] [includegenerated=false]\n"
"Returns up to [count] most recent transactions.");
int64 nCount = 10;
if (params.size() > 0)
nCount = params[0].get_int64();
bool fGenerated = false;
if (params.size() > 1)
fGenerated = params[1].get_bool();
Array ret;
//// not finished
ret.push_back("not implemented yet");
return ret;
}
Value getreceivedbyaddress(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 2)
throw runtime_error(
"getreceivedbyaddress <bitcoinaddress> [minconf=1]\n"
"Returns the total amount received by <bitcoinaddress> in transactions with at least [minconf] confirmations.");
// Bitcoin address
string strAddress = params[0].get_str();
CScript scriptPubKey;
if (!scriptPubKey.SetBitcoinAddress(strAddress))
throw runtime_error("Invalid bitcoin address");
if (!IsMine(scriptPubKey))
return (double)0.0;
// Minimum confirmations
int nMinDepth = 1;
if (params.size() > 1)
nMinDepth = params[1].get_int();
// Tally
int64 nAmount = 0;
CRITICAL_BLOCK(cs_mapWallet)
{
for (map<uint256, CWalletTx>::iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
{
const CWalletTx& wtx = (*it).second;
if (wtx.IsCoinBase() || !wtx.IsFinal())
continue;
foreach(const CTxOut& txout, wtx.vout)
if (txout.scriptPubKey == scriptPubKey)
if (wtx.GetDepthInMainChain() >= nMinDepth)
nAmount += txout.nValue;
}
}
return (double)nAmount / (double)COIN;
}
Value getreceivedbylabel(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 2)
throw runtime_error(
"getreceivedbylabel <label> [minconf=1]\n"
"Returns the total amount received by addresses with <label> in transactions with at least [minconf] confirmations.");
// Get the set of pub keys that have the label
string strLabel = params[0].get_str();
set<CScript> setPubKey;
CRITICAL_BLOCK(cs_mapAddressBook)
{
foreach(const PAIRTYPE(string, string)& item, mapAddressBook)
{
const string& strAddress = item.first;
const string& strName = item.second;
if (strName == strLabel)
{
// We're only counting our own valid bitcoin addresses and not ip addresses
CScript scriptPubKey;
if (scriptPubKey.SetBitcoinAddress(strAddress))
if (IsMine(scriptPubKey))
setPubKey.insert(scriptPubKey);
}
}
}
// Minimum confirmations
int nMinDepth = 1;
if (params.size() > 1)
nMinDepth = params[1].get_int();
// Tally
int64 nAmount = 0;
CRITICAL_BLOCK(cs_mapWallet)
{
for (map<uint256, CWalletTx>::iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
{
const CWalletTx& wtx = (*it).second;
if (wtx.IsCoinBase() || !wtx.IsFinal())
continue;
foreach(const CTxOut& txout, wtx.vout)
if (setPubKey.count(txout.scriptPubKey))
if (wtx.GetDepthInMainChain() >= nMinDepth)
nAmount += txout.nValue;
}
}
return (double)nAmount / (double)COIN;
}
struct tallyitem
{
int64 nAmount;
int nConf;
tallyitem()
{
nAmount = 0;
nConf = INT_MAX;
}
};
Value ListReceived(const Array& params, bool fByLabels)
{
// Minimum confirmations
int nMinDepth = 1;
if (params.size() > 0)
nMinDepth = params[0].get_int();
// Whether to include empty accounts
bool fIncludeEmpty = false;
if (params.size() > 1)
fIncludeEmpty = params[1].get_bool();
// Tally
map<uint160, tallyitem> mapTally;
CRITICAL_BLOCK(cs_mapWallet)
{
for (map<uint256, CWalletTx>::iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
{
const CWalletTx& wtx = (*it).second;
if (wtx.IsCoinBase() || !wtx.IsFinal())
continue;
int nDepth = wtx.GetDepthInMainChain();
if (nDepth < nMinDepth)
continue;
foreach(const CTxOut& txout, wtx.vout)
{
// Only counting our own bitcoin addresses and not ip addresses
uint160 hash160 = txout.scriptPubKey.GetBitcoinAddressHash160();
if (hash160 == 0 || !mapPubKeys.count(hash160)) // IsMine
continue;
tallyitem& item = mapTally[hash160];
item.nAmount += txout.nValue;
item.nConf = min(item.nConf, nDepth);
}
}
}
// Reply
Array ret;
map<string, tallyitem> mapLabelTally;
CRITICAL_BLOCK(cs_mapAddressBook)
{
foreach(const PAIRTYPE(string, string)& item, mapAddressBook)
{
const string& strAddress = item.first;
const string& strLabel = item.second;
uint160 hash160;
if (!AddressToHash160(strAddress, hash160))
continue;
map<uint160, tallyitem>::iterator it = mapTally.find(hash160);
if (it == mapTally.end() && !fIncludeEmpty)
continue;
int64 nAmount = 0;
int nConf = INT_MAX;
if (it != mapTally.end())
{
nAmount = (*it).second.nAmount;
nConf = (*it).second.nConf;
}
if (fByLabels)
{
tallyitem& item = mapLabelTally[strLabel];
item.nAmount += nAmount;
item.nConf = min(item.nConf, nConf);
}
else
{
Object obj;
obj.push_back(Pair("address", strAddress));
obj.push_back(Pair("label", strLabel));
obj.push_back(Pair("amount", (double)nAmount / (double)COIN));
obj.push_back(Pair("confirmations", (nConf == INT_MAX ? 0 : nConf)));
ret.push_back(obj);
}
}
}
if (fByLabels)
{
for (map<string, tallyitem>::iterator it = mapLabelTally.begin(); it != mapLabelTally.end(); ++it)
{
int64 nAmount = (*it).second.nAmount;
int nConf = (*it).second.nConf;
Object obj;
obj.push_back(Pair("label", (*it).first));
obj.push_back(Pair("amount", (double)nAmount / (double)COIN));
obj.push_back(Pair("confirmations", (nConf == INT_MAX ? 0 : nConf)));
ret.push_back(obj);
}
}
return ret;
}
Value listreceivedbyaddress(const Array& params, bool fHelp)
{
if (fHelp || params.size() > 2)
throw runtime_error(
"listreceivedbyaddress [minconf=1] [includeempty=false]\n"
"[minconf] is the minimum number of confirmations before payments are included.\n"
"[includeempty] whether to include addresses that haven't received any payments.\n"
"Returns an array of objects containing:\n"
" \"address\" : receiving address\n"
" \"label\" : the label of the receiving address\n"
" \"amount\" : total amount received by the address\n"
" \"confirmations\" : number of confirmations of the most recent transaction included");
return ListReceived(params, false);
}
Value listreceivedbylabel(const Array& params, bool fHelp)
{
if (fHelp || params.size() > 2)
throw runtime_error(
"listreceivedbylabel [minconf=1] [includeempty=false]\n"
"[minconf] is the minimum number of confirmations before payments are included.\n"
"[includeempty] whether to include labels that haven't received any payments.\n"
"Returns an array of objects containing:\n"
" \"label\" : the label of the receiving addresses\n"
" \"amount\" : total amount received by addresses with this label\n"
" \"confirmations\" : number of confirmations of the most recent transaction included");
return ListReceived(params, true);
}
//
// Call Table
//
pair<string, rpcfn_type> pCallTable[] =
{
make_pair("help", &help),
make_pair("stop", &stop),
make_pair("getblockcount", &getblockcount),
make_pair("getblocknumber", &getblocknumber),
make_pair("getconnectioncount", &getconnectioncount),
make_pair("getdifficulty", &getdifficulty),
make_pair("getbalance", &getbalance),
make_pair("getgenerate", &getgenerate),
make_pair("setgenerate", &setgenerate),
make_pair("getinfo", &getinfo),
make_pair("getnewaddress", &getnewaddress),
make_pair("setlabel", &setlabel),
make_pair("getlabel", &getlabel),
make_pair("getaddressesbylabel", &getaddressesbylabel),
make_pair("sendtoaddress", &sendtoaddress),
make_pair("listtransactions", &listtransactions),
make_pair("getamountreceived", &getreceivedbyaddress), // deprecated, renamed to getreceivedbyaddress
make_pair("getallreceived", &listreceivedbyaddress), // deprecated, renamed to listreceivedbyaddress
make_pair("getreceivedbyaddress", &getreceivedbyaddress),
make_pair("getreceivedbylabel", &getreceivedbylabel),
make_pair("listreceivedbyaddress", &listreceivedbyaddress),
make_pair("listreceivedbylabel", &listreceivedbylabel),
};
map<string, rpcfn_type> mapCallTable(pCallTable, pCallTable + sizeof(pCallTable)/sizeof(pCallTable[0]));
//
// HTTP protocol
//
// This ain't Apache. We're just using HTTP header for the length field
// and to be compatible with other JSON-RPC implementations.
//
string HTTPPost(const string& strMsg)
{
return strprintf(
"POST / HTTP/1.1\r\n"
"User-Agent: json-rpc/1.0\r\n"
"Host: 127.0.0.1\r\n"
"Content-Type: application/json\r\n"
"Content-Length: %d\r\n"
"Accept: application/json\r\n"
"\r\n"
"%s",
strMsg.size(),
strMsg.c_str());
}
string HTTPReply(const string& strMsg, int nStatus=200)
{
string strStatus;
if (nStatus == 200) strStatus = "OK";
if (nStatus == 500) strStatus = "Internal Server Error";
return strprintf(
"HTTP/1.1 %d %s\r\n"
"Connection: close\r\n"
"Content-Length: %d\r\n"
"Content-Type: application/json\r\n"
"Date: Sat, 08 Jul 2006 12:04:08 GMT\r\n"
"Server: json-rpc/1.0\r\n"
"\r\n"
"%s",
nStatus,
strStatus.c_str(),
strMsg.size(),
strMsg.c_str());
}
int ReadHTTPHeader(tcp::iostream& stream)
{
int nLen = 0;
loop
{
string str;
std::getline(stream, str);
if (str.empty() || str == "\r")
break;
if (str.substr(0,15) == "Content-Length:")
nLen = atoi(str.substr(15));
}
return nLen;
}
inline string ReadHTTP(tcp::iostream& stream)
{
// Read header
int nLen = ReadHTTPHeader(stream);
if (nLen <= 0)
return string();
// Read message
vector<char> vch(nLen);
stream.read(&vch[0], nLen);
return string(vch.begin(), vch.end());
}
//
// JSON-RPC protocol
//
// http://json-rpc.org/wiki/specification
// http://www.codeproject.com/KB/recipes/JSON_Spirit.aspx
//
string JSONRPCRequest(const string& strMethod, const Array& params, const Value& id)
{
Object request;
request.push_back(Pair("method", strMethod));
request.push_back(Pair("params", params));
request.push_back(Pair("id", id));
return write_string(Value(request), false) + "\n";
}
string JSONRPCReply(const Value& result, const Value& error, const Value& id)
{
Object reply;
if (error.type() != null_type)
reply.push_back(Pair("result", Value::null));
else
reply.push_back(Pair("result", result));
reply.push_back(Pair("error", error));
reply.push_back(Pair("id", id));
return write_string(Value(reply), false) + "\n";
}
void ThreadRPCServer(void* parg)
{
IMPLEMENT_RANDOMIZE_STACK(ThreadRPCServer(parg));
try
{
vnThreadsRunning[4]++;
ThreadRPCServer2(parg);
vnThreadsRunning[4]--;
}
catch (std::exception& e) {
vnThreadsRunning[4]--;
PrintException(&e, "ThreadRPCServer()");
} catch (...) {
vnThreadsRunning[4]--;
PrintException(NULL, "ThreadRPCServer()");
}
printf("ThreadRPCServer exiting\n");
}
void ThreadRPCServer2(void* parg)
{
printf("ThreadRPCServer started\n");
// Bind to loopback 127.0.0.1 so the socket can only be accessed locally
boost::asio::io_service io_service;
tcp::endpoint endpoint(boost::asio::ip::address_v4::loopback(), 8332);
tcp::acceptor acceptor(io_service, endpoint);
loop
{
// Accept connection
tcp::iostream stream;
tcp::endpoint peer;
vnThreadsRunning[4]--;
acceptor.accept(*stream.rdbuf(), peer);
vnThreadsRunning[4]++;
if (fShutdown)
return;
// Shouldn't be possible for anyone else to connect, but just in case
if (peer.address().to_string() != "127.0.0.1")
continue;
// Receive request
string strRequest = ReadHTTP(stream);
printf("ThreadRPCServer request=%s", strRequest.c_str());
// Handle multiple invocations per request
string::iterator begin = strRequest.begin();
while (skipspaces(begin), begin != strRequest.end())
{
string::iterator prev = begin;
Value id;
try
{
// Parse request
Value valRequest;
if (!read_range(begin, strRequest.end(), valRequest))
throw runtime_error("Parse error.");
const Object& request = valRequest.get_obj();
if (find_value(request, "method").type() != str_type ||
find_value(request, "params").type() != array_type)
throw runtime_error("Invalid request.");
string strMethod = find_value(request, "method").get_str();
const Array& params = find_value(request, "params").get_array();
id = find_value(request, "id");
// Execute
map<string, rpcfn_type>::iterator mi = mapCallTable.find(strMethod);
if (mi == mapCallTable.end())
throw runtime_error("Method not found.");
Value result = (*(*mi).second)(params, false);
// Send reply
string strReply = JSONRPCReply(result, Value::null, id);
stream << HTTPReply(strReply, 200) << std::flush;
}
catch (std::exception& e)
{
// Send error reply
string strReply = JSONRPCReply(Value::null, e.what(), id);
stream << HTTPReply(strReply, 500) << std::flush;
}
if (begin == prev)
break;
}
}
}
Value CallRPC(const string& strMethod, const Array& params)
{
// Connect to localhost
tcp::iostream stream("127.0.0.1", "8332");
if (stream.fail())
throw runtime_error("couldn't connect to server");
// Send request
string strRequest = JSONRPCRequest(strMethod, params, 1);
stream << HTTPPost(strRequest) << std::flush;
// Receive reply
string strReply = ReadHTTP(stream);
if (strReply.empty())
throw runtime_error("no response from server");
// Parse reply
Value valReply;
if (!read_string(strReply, valReply))
throw runtime_error("couldn't parse reply from server");
const Object& reply = valReply.get_obj();
if (reply.empty())
throw runtime_error("expected reply to have result, error and id properties");
const Value& result = find_value(reply, "result");
const Value& error = find_value(reply, "error");
const Value& id = find_value(reply, "id");
if (error.type() == str_type)
throw runtime_error(error.get_str());
else if (error.type() != null_type)
throw runtime_error(write_string(error, false));
return result;
}
template<typename T>
void ConvertTo(Value& value)
{
if (value.type() == str_type)
{
// reinterpret string as unquoted json value
Value value2;
if (!read_string(value.get_str(), value2))
throw runtime_error("type mismatch");
value = value2.get_value<T>();
}
else
{
value = value.get_value<T>();
}
}
int CommandLineRPC(int argc, char *argv[])
{
try
{
// Check that method exists
if (argc < 2)
throw runtime_error("too few parameters");
string strMethod = argv[1];
if (!mapCallTable.count(strMethod))
throw runtime_error(strprintf("unknown command: %s", strMethod.c_str()));
Value result;
if (argc == 3 && strcmp(argv[2], "-?") == 0)
{
// Call help locally, help text is returned in an exception
try
{
map<string, rpcfn_type>::iterator mi = mapCallTable.find(strMethod);
Array params;
(*(*mi).second)(params, true);
}
catch (std::exception& e)
{
result = e.what();
}
}
else
{
// Parameters default to strings
Array params;
for (int i = 2; i < argc; i++)
params.push_back(argv[i]);
int n = params.size();
//
// Special case non-string parameter types
//
if (strMethod == "setgenerate" && n > 0) ConvertTo<bool>(params[0]);
if (strMethod == "setgenerate" && n > 1) ConvertTo<boost::int64_t>(params[1]);
if (strMethod == "sendtoaddress" && n > 1) ConvertTo<double>(params[1]);
if (strMethod == "listtransactions" && n > 0) ConvertTo<boost::int64_t>(params[0]);
if (strMethod == "listtransactions" && n > 1) ConvertTo<bool>(params[1]);
if (strMethod == "getamountreceived" && n > 1) ConvertTo<boost::int64_t>(params[1]); // deprecated
if (strMethod == "getreceivedbyaddress" && n > 1) ConvertTo<boost::int64_t>(params[1]);
if (strMethod == "getreceivedbylabel" && n > 1) ConvertTo<boost::int64_t>(params[1]);
if (strMethod == "getallreceived" && n > 0) ConvertTo<boost::int64_t>(params[0]); // deprecated
if (strMethod == "getallreceived" && n > 1) ConvertTo<bool>(params[1]);
if (strMethod == "listreceivedbyaddress" && n > 0) ConvertTo<boost::int64_t>(params[0]);
if (strMethod == "listreceivedbyaddress" && n > 1) ConvertTo<bool>(params[1]);
if (strMethod == "listreceivedbylabel" && n > 0) ConvertTo<boost::int64_t>(params[0]);
if (strMethod == "listreceivedbylabel" && n > 1) ConvertTo<bool>(params[1]);
// Execute
result = CallRPC(strMethod, params);
}
// Print result
string strResult = (result.type() == str_type ? result.get_str() : write_string(result, true));
if (result.type() != null_type)
{
if (fWindows && fGUI)
// Windows GUI apps can't print to command line,
// so settle for a message box yuck
MyMessageBox(strResult.c_str(), "Bitcoin", wxOK);
else
fprintf(stdout, "%s\n", strResult.c_str());
}
return 0;
}
catch (std::exception& e) {
if (fWindows && fGUI)
MyMessageBox(strprintf("error: %s\n", e.what()).c_str(), "Bitcoin", wxOK);
else
fprintf(stderr, "error: %s\n", e.what());
} catch (...) {
PrintException(NULL, "CommandLineRPC()");
}
return 1;
}
#ifdef TEST
int main(int argc, char *argv[])
{
#ifdef _MSC_VER
// Turn off microsoft heap dump noise
_CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);
_CrtSetReportFile(_CRT_WARN, CreateFile("NUL", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0));
#endif
setbuf(stdin, NULL);
setbuf(stdout, NULL);
setbuf(stderr, NULL);
try
{
if (argc >= 2 && string(argv[1]) == "-server")
{
printf("server ready\n");
ThreadRPCServer(NULL);
}
else
{
return CommandLineRPC(argc, argv);
}
}
catch (std::exception& e) {
PrintException(&e, "main()");
} catch (...) {
PrintException(NULL, "main()");
}
return 0;
}
#endif

6
rpc.h Normal file
View File

@@ -0,0 +1,6 @@
// Copyright (c) 2010 Satoshi Nakamoto
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
void ThreadRPCServer(void* parg);
int CommandLineRPC(int argc, char *argv[]);

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2009 Satoshi Nakamoto
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
@@ -660,7 +660,7 @@ bool EvalScript(const CScript& script, const CTransaction& txTo, unsigned int nI
if (stack.size() < 1)
return false;
valtype& vch = stacktop(-1);
valtype vchHash(opcode == OP_RIPEMD160 || opcode == OP_SHA1 || opcode == OP_HASH160 ? 20 : 32);
valtype vchHash((opcode == OP_RIPEMD160 || opcode == OP_SHA1 || opcode == OP_HASH160) ? 20 : 32);
if (opcode == OP_RIPEMD160)
RIPEMD160(&vch[0], vch.size(), &vchHash[0]);
else if (opcode == OP_SHA1)
@@ -753,9 +753,9 @@ bool EvalScript(const CScript& script, const CTransaction& txTo, unsigned int nI
CScript scriptCode(pbegincodehash, pend);
// Drop the signatures, since there's no way for a signature to sign itself
for (int i = 0; i < nSigsCount; i++)
for (int k = 0; k < nSigsCount; k++)
{
valtype& vchSig = stacktop(-isig-i);
valtype& vchSig = stacktop(-isig-k);
scriptCode.FindAndDelete(CScript(vchSig));
}
@@ -909,7 +909,6 @@ bool CheckSig(vector<unsigned char> vchSig, vector<unsigned char> vchPubKey, CSc
bool Solver(const CScript& scriptPubKey, vector<pair<opcodetype, valtype> >& vSolutionRet)
{
// Templates
@@ -919,7 +918,7 @@ bool Solver(const CScript& scriptPubKey, vector<pair<opcodetype, valtype> >& vSo
// Standard tx, sender provides pubkey, receiver adds signature
vTemplates.push_back(CScript() << OP_PUBKEY << OP_CHECKSIG);
// Short account number tx, sender provides hash of pubkey, receiver provides signature and pubkey
// Bitcoin address tx, sender provides hash of pubkey, receiver provides signature and pubkey
vTemplates.push_back(CScript() << OP_DUP << OP_HASH160 << OP_PUBKEYHASH << OP_EQUALVERIFY << OP_CHECKSIG);
}
@@ -1123,5 +1122,13 @@ bool VerifySignature(const CTransaction& txFrom, const CTransaction& txTo, unsig
if (txin.prevout.hash != txFrom.GetHash())
return false;
return EvalScript(txin.scriptSig + CScript(OP_CODESEPARATOR) + txout.scriptPubKey, txTo, nIn, nHashType);
if (!EvalScript(txin.scriptSig + CScript(OP_CODESEPARATOR) + txout.scriptPubKey, txTo, nIn, nHashType))
return false;
// Anytime a signature is successfully verified, it's proof the outpoint is spent,
// so lets update the wallet spent flag if it doesn't know due to wallet.dat being
// restored from backup or the user making copies of wallet.dat.
WalletUpdateSpent(txin.prevout);
return true;
}

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2009 Satoshi Nakamoto
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
@@ -472,7 +472,7 @@ public:
bool GetOp(iterator& pc, opcodetype& opcodeRet, vector<unsigned char>& vchRet)
{
// This is why people hate C++
// Wrapper so it can be called with either iterator or const_iterator
const_iterator pc2 = pc;
bool fRet = GetOp(pc2, opcodeRet, vchRet);
pc = begin() + (pc2 - begin());
@@ -551,6 +551,51 @@ public:
}
uint160 GetBitcoinAddressHash160() const
{
opcodetype opcode;
vector<unsigned char> vch;
CScript::const_iterator pc = begin();
if (!GetOp(pc, opcode, vch) || opcode != OP_DUP) return 0;
if (!GetOp(pc, opcode, vch) || opcode != OP_HASH160) return 0;
if (!GetOp(pc, opcode, vch) || vch.size() != sizeof(uint160)) return 0;
uint160 hash160 = uint160(vch);
if (!GetOp(pc, opcode, vch) || opcode != OP_EQUALVERIFY) return 0;
if (!GetOp(pc, opcode, vch) || opcode != OP_CHECKSIG) return 0;
if (pc != end()) return 0;
return hash160;
}
string GetBitcoinAddress() const
{
uint160 hash160 = GetBitcoinAddressHash160();
if (hash160 == 0)
return "";
return Hash160ToAddress(hash160);
}
void SetBitcoinAddress(const uint160& hash160)
{
this->clear();
*this << OP_DUP << OP_HASH160 << hash160 << OP_EQUALVERIFY << OP_CHECKSIG;
}
void SetBitcoinAddress(const vector<unsigned char>& vchPubKey)
{
SetBitcoinAddress(Hash160(vchPubKey));
}
bool SetBitcoinAddress(const string& strAddress)
{
this->clear();
uint160 hash160;
if (!AddressToHash160(strAddress, hash160))
return false;
SetBitcoinAddress(hash160);
return true;
}
void PrintHex() const
{
printf("CScript(%s)\n", HexStr(begin(), end()).c_str());

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2009 Satoshi Nakamoto
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
@@ -19,7 +19,7 @@ class CScript;
class CDataStream;
class CAutoFile;
static const int VERSION = 200;
static const int VERSION = 300;
static const char* pszSubVer = " rc2";
@@ -194,28 +194,32 @@ uint64 ReadCompactSize(Stream& is)
{
unsigned char chSize;
READDATA(is, chSize);
uint64 nSizeRet = 0;
if (chSize < UCHAR_MAX-2)
{
return chSize;
nSizeRet = chSize;
}
else if (chSize == UCHAR_MAX-2)
{
unsigned short nSize;
READDATA(is, nSize);
return nSize;
nSizeRet = nSize;
}
else if (chSize == UCHAR_MAX-1)
{
unsigned int nSize;
READDATA(is, nSize);
return nSize;
nSizeRet = nSize;
}
else
{
uint64 nSize;
READDATA(is, nSize);
return nSize;
nSizeRet = nSize;
}
if (nSizeRet > (uint64)INT_MAX)
throw std::ios_base::failure("ReadCompactSize() : size too large");
return nSizeRet;
}
@@ -460,7 +464,7 @@ void Unserialize_impl(Stream& is, std::vector<T, A>& v, int nType, int nVersion,
unsigned int i = 0;
while (i < nSize)
{
unsigned int blk = min(nSize - i, 1 + 4999999 / sizeof(T));
unsigned int blk = min(nSize - i, (unsigned int)(1 + 4999999 / sizeof(T)));
v.resize(i + blk);
is.read((char*)&v[i], blk * sizeof(T));
i += blk;
@@ -805,6 +809,18 @@ public:
vch.insert(it, first, last);
}
void insert(iterator it, vector<char>::const_iterator first, vector<char>::const_iterator last)
{
if (it == vch.begin() + nReadPos && last - first <= nReadPos)
{
// special case for inserting at the front when there's room
nReadPos -= (last - first);
memcpy(&vch[nReadPos], &first[0], last - first);
}
else
vch.insert(it, first, last);
}
#if !defined(_MSC_VER) || _MSC_VER >= 1300
void insert(iterator it, const char* first, const char* last)
{

View File

@@ -7,7 +7,7 @@ RequestExecutionLevel highest
# General Symbol Definitions
!define REGKEY "SOFTWARE\$(^Name)"
!define VERSION 0.2.0
!define VERSION 0.3.0
!define COMPANY "Bitcoin project"
!define URL http://www.bitcoin.org/
@@ -42,12 +42,12 @@ Var StartMenuGroup
!insertmacro MUI_LANGUAGE English
# Installer attributes
OutFile bitcoin-0.2.0-win32-setup.exe
OutFile bitcoin-0.3.0-win32-setup.exe
InstallDir $PROGRAMFILES\Bitcoin
CRCCheck on
XPStyle on
ShowInstDetails show
VIProductVersion 0.2.0.0
VIProductVersion 0.3.0.0
VIAddVersionKey ProductName Bitcoin
VIAddVersionKey ProductVersion "${VERSION}"
VIAddVersionKey CompanyName "${COMPANY}"
@@ -67,6 +67,10 @@ Section -Main SEC0000
File mingwm10.dll
File license.txt
File readme.txt
SetOutPath $INSTDIR\daemon
File /r daemon\*.*
SetOutPath $INSTDIR\locale
File /r locale\*.*
SetOutPath $INSTDIR\src
File /r src\*.*
SetOutPath $INSTDIR
@@ -112,6 +116,8 @@ Section /o -un.Main UNSEC0000
Delete /REBOOTOK $INSTDIR\mingwm10.dll
Delete /REBOOTOK $INSTDIR\license.txt
Delete /REBOOTOK $INSTDIR\readme.txt
RMDir /r /REBOOTOK $INSTDIR\daemon
RMDir /r /REBOOTOK $INSTDIR\locale
RMDir /r /REBOOTOK $INSTDIR\src
DeleteRegValue HKCU "${REGKEY}\Components" Main
SectionEnd

2694
ui.cpp

File diff suppressed because it is too large Load Diff

282
ui.h
View File

@@ -1,35 +1,71 @@
// Copyright (c) 2009 Satoshi Nakamoto
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
DECLARE_EVENT_TYPE(wxEVT_UITHREADCALL, -1)
DECLARE_EVENT_TYPE(wxEVT_REPLY1, -1)
DECLARE_EVENT_TYPE(wxEVT_REPLY2, -1)
DECLARE_EVENT_TYPE(wxEVT_REPLY3, -1)
#if wxUSE_GUI
static const bool fGUI=true;
#else
static const bool fGUI=false;
#endif
inline int MyMessageBox(const wxString& message, const wxString& caption="Message", int style=wxOK, wxWindow* parent=NULL, int x=-1, int y=-1)
{
#if wxUSE_GUI
if (!fDaemon)
return wxMessageBox(message, caption, style, parent, x, y);
#endif
printf("wxMessageBox %s: %s\n", string(caption).c_str(), string(message).c_str());
fprintf(stderr, "%s: %s\n", string(caption).c_str(), string(message).c_str());
return wxOK;
}
#define wxMessageBox MyMessageBox
extern map<string, string> mapArgs;
// Settings
extern int fShowGenerated;
extern int fMinimizeToTray;
extern int fMinimizeOnClose;
void HandleCtrlA(wxKeyEvent& event);
string FormatTxStatus(const CWalletTx& wtx);
void UIThreadCall(boost::function0<void>);
int ThreadSafeMessageBox(const string& message, const string& caption="Message", int style=wxOK, wxWindow* parent=NULL, int x=-1, int y=-1);
bool ThreadSafeAskFee(int64 nFeeRequired, const string& strCaption, wxWindow* parent);
void CalledSetStatusBar(const string& strText, int nField);
void MainFrameRepaint();
void CreateMainWindow();
extern void HandleCtrlA(wxKeyEvent& event);
extern string FormatTxStatus(const CWalletTx& wtx);
extern void UIThreadCall(boost::function0<void>);
extern void MainFrameRepaint();
extern void Shutdown(void* parg);
extern int ThreadSafeMessageBox(const string& message, const string& caption="Message", int style=wxOK, wxWindow* parent=NULL, int x=-1, int y=-1);
#if !wxUSE_GUI
inline int ThreadSafeMessageBox(const string& message, const string& caption, int style, wxWindow* parent, int x, int y)
{
return MyMessageBox(message, caption, style, parent, x, y);
}
inline bool ThreadSafeAskFee(int64 nFeeRequired, const string& strCaption, wxWindow* parent)
{
return true;
}
inline void CalledSetStatusBar(const string& strText, int nField)
{
}
inline void UIThreadCall(boost::function0<void> fn)
{
}
inline void MainFrameRepaint()
{
}
inline void CreateMainWindow()
{
}
#else // wxUSE_GUI
@@ -38,6 +74,7 @@ class CMainFrame : public CMainFrameBase
{
protected:
// Event handlers
void OnNotebookPageChanged(wxNotebookEvent& event);
void OnClose(wxCloseEvent& event);
void OnIconize(wxIconizeEvent& event);
void OnMouseEvents(wxMouseEvent& event);
@@ -46,8 +83,6 @@ protected:
void OnPaint(wxPaintEvent& event);
void OnPaintListCtrl(wxPaintEvent& event);
void OnMenuFileExit(wxCommandEvent& event);
void OnMenuViewShowGenerated(wxCommandEvent& event);
void OnUpdateUIViewShowGenerated(wxUpdateUIEvent& event);
void OnMenuOptionsGenerate(wxCommandEvent& event);
void OnUpdateUIOptionsGenerate(wxUpdateUIEvent& event);
void OnMenuOptionsChangeYourAddress(wxCommandEvent& event);
@@ -57,10 +92,10 @@ protected:
void OnButtonAddressBook(wxCommandEvent& event);
void OnSetFocusAddress(wxFocusEvent& event);
void OnMouseEventsAddress(wxMouseEvent& event);
void OnButtonNew(wxCommandEvent& event);
void OnButtonCopy(wxCommandEvent& event);
void OnButtonChange(wxCommandEvent& event);
void OnListColBeginDrag(wxListEvent& event);
void OnListItemActivatedAllTransactions(wxListEvent& event);
void OnListItemActivated(wxListEvent& event);
void OnListItemActivatedProductsSent(wxListEvent& event);
void OnListItemActivatedOrdersSent(wxListEvent& event);
void OnListItemActivatedOrdersReceived(wxListEvent& event);
@@ -71,6 +106,18 @@ public:
~CMainFrame();
// Custom
enum
{
ALL = 0,
SENTRECEIVED = 1,
SENT = 2,
RECEIVED = 3,
};
int nPage;
wxListCtrl* m_listCtrl;
bool fShowGenerated;
bool fShowSent;
bool fShowReceived;
bool fRefreshListCtrl;
bool fRefreshListCtrlRunning;
bool fOnSetFocusAddress;
@@ -211,190 +258,44 @@ void SendingDialogOnReply3(void* parg, CDataStream& vRecv);
class CYourAddressDialog : public CYourAddressDialogBase
{
protected:
// Event handlers
void OnListEndLabelEdit(wxListEvent& event);
void OnListItemSelected(wxListEvent& event);
void OnListItemActivated(wxListEvent& event);
void OnButtonRename(wxCommandEvent& event);
void OnButtonNew(wxCommandEvent& event);
void OnButtonCopy(wxCommandEvent& event);
void OnButtonOK(wxCommandEvent& event);
void OnButtonCancel(wxCommandEvent& event);
void OnClose(wxCloseEvent& event);
public:
/** Constructor */
CYourAddressDialog(wxWindow* parent);
CYourAddressDialog(wxWindow* parent, const string& strInitSelected);
// Custom
wxString GetAddress();
};
class CAddressBookDialog : public CAddressBookDialogBase
{
protected:
// Event handlers
void OnNotebookPageChanged(wxNotebookEvent& event);
void OnListEndLabelEdit(wxListEvent& event);
void OnListItemSelected(wxListEvent& event);
void OnListItemActivated(wxListEvent& event);
void OnButtonEdit(wxCommandEvent& event);
void OnButtonDelete(wxCommandEvent& event);
void OnButtonNew(wxCommandEvent& event);
void OnButtonCopy(wxCommandEvent& event);
void OnButtonEdit(wxCommandEvent& event);
void OnButtonNew(wxCommandEvent& event);
void OnButtonOK(wxCommandEvent& event);
void OnButtonCancel(wxCommandEvent& event);
void OnClose(wxCloseEvent& event);
public:
/** Constructor */
CAddressBookDialog(wxWindow* parent, const wxString& strInitSelected, bool fSendingIn);
CAddressBookDialog(wxWindow* parent, const wxString& strInitSelected, int nPageIn, bool fDuringSendIn);
// Custom
bool fSending;
enum
{
SENDING = 0,
RECEIVING = 1,
};
int nPage;
wxListCtrl* m_listCtrl;
bool fDuringSend;
wxString GetAddress();
wxString GetSelectedAddress();
wxString GetSelectedSendingAddress();
wxString GetSelectedReceivingAddress();
bool CheckIfMine(const string& strAddress, const string& strTitle);
};
class CProductsDialog : public CProductsDialogBase
{
protected:
// Event handlers
void OnKeyDown(wxKeyEvent& event) { HandleCtrlA(event); }
void OnCombobox(wxCommandEvent& event);
void OnButtonSearch(wxCommandEvent& event);
void OnListItemActivated(wxListEvent& event);
public:
/** Constructor */
CProductsDialog(wxWindow* parent);
// Custom
vector<CProduct> m_vProduct;
};
class CEditProductDialog : public CEditProductDialogBase
{
protected:
// Event handlers
void OnKeyDown(wxKeyEvent& event) { HandleCtrlA(event); }
void OnButtonDel0(wxCommandEvent& event);
void OnButtonDel1(wxCommandEvent& event);
void OnButtonDel2(wxCommandEvent& event);
void OnButtonDel3(wxCommandEvent& event);
void OnButtonDel4(wxCommandEvent& event);
void OnButtonDel5(wxCommandEvent& event);
void OnButtonDel6(wxCommandEvent& event);
void OnButtonDel7(wxCommandEvent& event);
void OnButtonDel8(wxCommandEvent& event);
void OnButtonDel9(wxCommandEvent& event);
void OnButtonDel10(wxCommandEvent& event);
void OnButtonDel11(wxCommandEvent& event);
void OnButtonDel12(wxCommandEvent& event);
void OnButtonDel13(wxCommandEvent& event);
void OnButtonDel14(wxCommandEvent& event);
void OnButtonDel15(wxCommandEvent& event);
void OnButtonDel16(wxCommandEvent& event);
void OnButtonDel17(wxCommandEvent& event);
void OnButtonDel18(wxCommandEvent& event);
void OnButtonDel19(wxCommandEvent& event);
void OnButtonAddField(wxCommandEvent& event);
void OnButtonSend(wxCommandEvent& event);
void OnButtonPreview(wxCommandEvent& event);
void OnButtonCancel(wxCommandEvent& event);
public:
/** Constructor */
CEditProductDialog(wxWindow* parent);
// Custom
enum { FIELDS_MAX = 20 };
wxTextCtrl* m_textCtrlLabel[FIELDS_MAX];
wxTextCtrl* m_textCtrlField[FIELDS_MAX];
wxButton* m_buttonDel[FIELDS_MAX];
void LayoutAll();
void ShowLine(int i, bool fShow=true);
void OnButtonDel(wxCommandEvent& event, int n);
void SetProduct(const CProduct& productIn);
void GetProduct(CProduct& product);
};
class CViewProductDialog : public CViewProductDialogBase
{
protected:
// Event handlers
void OnButtonSubmitForm(wxCommandEvent& event);
void OnButtonCancelForm(wxCommandEvent& event);
void OnButtonBack(wxCommandEvent& event);
void OnButtonNext(wxCommandEvent& event);
void OnButtonCancel(wxCommandEvent& event);
public:
/** Constructor */
CViewProductDialog(wxWindow* parent, const CProduct& productIn);
~CViewProductDialog();
// Custom
CProduct product;
enum { FIELDS_MAX = 20 };
wxStaticText* m_staticTextLabel[FIELDS_MAX];
wxTextCtrl* m_textCtrlField[FIELDS_MAX];
wxChoice* m_choiceField[FIELDS_MAX];
void GetOrder(CWalletTx& order);
void UpdateProductDisplay(bool fDetails);
void OnReply1(wxCommandEvent& event);
};
class CViewOrderDialog : public CViewOrderDialogBase
{
protected:
// Event handlers
void OnButtonOK(wxCommandEvent& event);
public:
/** Constructor */
CViewOrderDialog(wxWindow* parent, CWalletTx order, bool fReceived);
// Custom
bool fReceived;
};
class CEditReviewDialog : public CEditReviewDialogBase
{
protected:
// Event handlers
void OnKeyDown(wxKeyEvent& event) { HandleCtrlA(event); }
void OnButtonSubmit(wxCommandEvent& event);
void OnButtonCancel(wxCommandEvent& event);
public:
/** Constructor */
CEditReviewDialog(wxWindow* parent);
// Custom
void GetReview(CReview& review);
};
class CGetTextFromUserDialog : public CGetTextFromUserDialogBase
{
protected:
@@ -420,16 +321,25 @@ public:
const string& strMessage2="",
const string& strValue2="") : CGetTextFromUserDialogBase(parent, wxID_ANY, strCaption)
{
int x = GetSize().GetWidth();
int y = GetSize().GetHeight();
m_staticTextMessage1->SetLabel(strMessage1);
m_textCtrl1->SetValue(strValue1);
y += wxString(strMessage1).Freq('\n') * 14;
if (!strMessage2.empty())
{
m_staticTextMessage2->Show(true);
m_staticTextMessage2->SetLabel(strMessage2);
m_textCtrl2->Show(true);
m_textCtrl2->SetValue(strValue2);
SetSize(wxDefaultCoord, 180);
y += 46 + wxString(strMessage2).Freq('\n') * 14;
}
if (!fWindows)
{
x *= 1.14;
y *= 1.14;
}
SetSize(x, y);
}
// Custom
@@ -465,3 +375,5 @@ public:
DECLARE_EVENT_TABLE()
};
#endif // wxUSE_GUI

1
ui.rc
View File

@@ -12,3 +12,4 @@ addressbook16 BITMAP "rc/addressbook16.bmp"
addressbook16mask BITMAP "rc/addressbook16mask.bmp"
addressbook20 BITMAP "rc/addressbook20.bmp"
addressbook20mask BITMAP "rc/addressbook20mask.bmp"
favicon ICON "rc/favicon.ico"

1142
uibase.cpp

File diff suppressed because it is too large Load Diff

378
uibase.h
View File

@@ -8,6 +8,8 @@
#ifndef __uibase__
#define __uibase__
#include <wx/intl.h>
#include <wx/string.h>
#include <wx/bitmap.h>
#include <wx/image.h>
@@ -23,9 +25,9 @@
#include <wx/textctrl.h>
#include <wx/button.h>
#include <wx/sizer.h>
#include <wx/panel.h>
#include <wx/choice.h>
#include <wx/listctrl.h>
#include <wx/panel.h>
#include <wx/notebook.h>
#include <wx/frame.h>
#include <wx/html/htmlwin.h>
@@ -35,60 +37,33 @@
#include <wx/spinctrl.h>
#include <wx/scrolwin.h>
#include <wx/statbmp.h>
#include <wx/combobox.h>
#include <wx/richtext/richtextctrl.h>
///////////////////////////////////////////////////////////////////////////
#define wxID_MAINFRAME 1000
#define wxID_VIEWSHOWGENERATED 1001
#define wxID_OPTIONSGENERATEBITCOINS 1002
#define wxID_MENUOPTIONSOPTIONS 1003
#define wxID_BUTTONSEND 1004
#define wxID_BUTTONRECEIVE 1005
#define wxID_TEXTCTRLADDRESS 1006
#define wxID_BUTTONCOPY 1007
#define wxID_BUTTONCHANGE 1008
#define wxID_TRANSACTIONFEE 1009
#define wxID_PROXYIP 1010
#define wxID_PROXYPORT 1011
#define wxID_TEXTCTRLPAYTO 1012
#define wxID_BUTTONPASTE 1013
#define wxID_BUTTONADDRESSBOOK 1014
#define wxID_TEXTCTRLAMOUNT 1015
#define wxID_CHOICETRANSFERTYPE 1016
#define wxID_LISTCTRL 1017
#define wxID_BUTTONRENAME 1018
#define wxID_BUTTONNEW 1019
#define wxID_BUTTONEDIT 1020
#define wxID_OPTIONSGENERATEBITCOINS 1001
#define wxID_BUTTONSEND 1002
#define wxID_BUTTONRECEIVE 1003
#define wxID_TEXTCTRLADDRESS 1004
#define wxID_BUTTONNEW 1005
#define wxID_BUTTONCOPY 1006
#define wxID_TRANSACTIONFEE 1007
#define wxID_PROXYIP 1008
#define wxID_PROXYPORT 1009
#define wxID_TEXTCTRLPAYTO 1010
#define wxID_BUTTONPASTE 1011
#define wxID_BUTTONADDRESSBOOK 1012
#define wxID_TEXTCTRLAMOUNT 1013
#define wxID_CHOICETRANSFERTYPE 1014
#define wxID_LISTCTRL 1015
#define wxID_BUTTONRENAME 1016
#define wxID_PANELSENDING 1017
#define wxID_LISTCTRLSENDING 1018
#define wxID_PANELRECEIVING 1019
#define wxID_LISTCTRLRECEIVING 1020
#define wxID_BUTTONDELETE 1021
#define wxID_DEL0 1022
#define wxID_DEL1 1023
#define wxID_DEL2 1024
#define wxID_DEL3 1025
#define wxID_DEL4 1026
#define wxID_DEL5 1027
#define wxID_DEL6 1028
#define wxID_DEL7 1029
#define wxID_DEL8 1030
#define wxID_DEL9 1031
#define wxID_DEL10 1032
#define wxID_DEL11 1033
#define wxID_DEL12 1034
#define wxID_DEL13 1035
#define wxID_DEL14 1036
#define wxID_DEL15 1037
#define wxID_DEL16 1038
#define wxID_DEL17 1039
#define wxID_DEL18 1040
#define wxID_DEL19 1041
#define wxID_BUTTONPREVIEW 1042
#define wxID_BUTTONSAMPLE 1043
#define wxID_CANCEL2 1044
#define wxID_BUTTONBACK 1045
#define wxID_BUTTONNEXT 1046
#define wxID_SUBMIT 1047
#define wxID_TEXTCTRL 1048
#define wxID_BUTTONEDIT 1022
#define wxID_TEXTCTRL 1023
///////////////////////////////////////////////////////////////////////////////
/// Class CMainFrameBase
@@ -100,27 +75,22 @@ class CMainFrameBase : public wxFrame
protected:
wxMenuBar* m_menubar;
wxMenu* m_menuFile;
wxMenu* m_menuView;
wxMenu* m_menuHelp;
wxToolBar* m_toolBar;
wxStatusBar* m_statusBar;
wxStaticText* m_staticText32;
wxTextCtrl* m_textCtrlAddress;
wxButton* m_buttonNew;
wxButton* m_buttonCopy;
wxButton* m_button91;
wxPanel* m_panel14;
wxStaticText* m_staticText41;
wxStaticText* m_staticTextBalance;
wxChoice* m_choiceFilter;
wxNotebook* m_notebook;
wxPanel* m_panel7;
wxPanel* m_panel9;
wxPanel* m_panel8;
wxPanel* m_panel10;
wxPanel* m_panel11;
wxPanel* m_panel91;
wxPanel* m_panel92;
wxPanel* m_panel93;
// Virtual event handlers, overide them in your derived class
virtual void OnClose( wxCloseEvent& event ){ event.Skip(); }
@@ -129,8 +99,6 @@ class CMainFrameBase : public wxFrame
virtual void OnMouseEvents( wxMouseEvent& event ){ event.Skip(); }
virtual void OnPaint( wxPaintEvent& event ){ event.Skip(); }
virtual void OnMenuFileExit( wxCommandEvent& event ){ event.Skip(); }
virtual void OnMenuViewShowGenerated( wxCommandEvent& event ){ event.Skip(); }
virtual void OnUpdateUIViewShowGenerated( wxUpdateUIEvent& event ){ event.Skip(); }
virtual void OnMenuOptionsGenerate( wxCommandEvent& event ){ event.Skip(); }
virtual void OnUpdateUIOptionsGenerate( wxUpdateUIEvent& event ){ event.Skip(); }
virtual void OnMenuOptionsChangeYourAddress( wxCommandEvent& event ){ event.Skip(); }
@@ -141,24 +109,23 @@ class CMainFrameBase : public wxFrame
virtual void OnKeyDown( wxKeyEvent& event ){ event.Skip(); }
virtual void OnMouseEventsAddress( wxMouseEvent& event ){ event.Skip(); }
virtual void OnSetFocusAddress( wxFocusEvent& event ){ event.Skip(); }
virtual void OnButtonNew( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonCopy( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonChange( wxCommandEvent& event ){ event.Skip(); }
virtual void OnNotebookPageChanged( wxNotebookEvent& event ){ event.Skip(); }
virtual void OnListColBeginDrag( wxListEvent& event ){ event.Skip(); }
virtual void OnListItemActivatedAllTransactions( wxListEvent& event ){ event.Skip(); }
virtual void OnListItemActivated( wxListEvent& event ){ event.Skip(); }
virtual void OnPaintListCtrl( wxPaintEvent& event ){ event.Skip(); }
virtual void OnListItemActivatedOrdersSent( wxListEvent& event ){ event.Skip(); }
virtual void OnListItemActivatedProductsSent( wxListEvent& event ){ event.Skip(); }
virtual void OnListItemActivatedOrdersReceived( wxListEvent& event ){ event.Skip(); }
public:
wxMenu* m_menuOptions;
wxListCtrl* m_listCtrl;
wxListCtrl* m_listCtrlEscrows;
wxListCtrl* m_listCtrlOrdersSent;
wxListCtrl* m_listCtrlProductsSent;
wxListCtrl* m_listCtrlOrdersReceived;
CMainFrameBase( wxWindow* parent, wxWindowID id = wxID_MAINFRAME, const wxString& title = wxT("Bitcoin"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 705,484 ), long style = wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER|wxTAB_TRAVERSAL );
wxStatusBar* m_statusBar;
wxTextCtrl* m_textCtrlAddress;
wxListCtrl* m_listCtrlAll;
wxListCtrl* m_listCtrlSentReceived;
wxListCtrl* m_listCtrlSent;
wxListCtrl* m_listCtrlReceived;
CMainFrameBase( wxWindow* parent, wxWindowID id = wxID_MAINFRAME, const wxString& title = _("Bitcoin"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 723,484 ), long style = wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER|wxTAB_TRAVERSAL );
~CMainFrameBase();
};
@@ -179,7 +146,7 @@ class CTxDetailsDialogBase : public wxDialog
public:
CTxDetailsDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Transaction Details"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 620,450 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
CTxDetailsDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Transaction Details"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 620,450 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~CTxDetailsDialogBase();
};
@@ -215,8 +182,6 @@ class COptionsDialogBase : public wxDialog
wxStaticText* m_staticText321;
wxStaticText* m_staticText69;
wxStaticText* m_staticText70;
wxStaticText* m_staticText71;
wxButton* m_buttonOK;
wxButton* m_buttonCancel;
wxButton* m_buttonApply;
@@ -234,7 +199,7 @@ class COptionsDialogBase : public wxDialog
public:
COptionsDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 540,360 ), long style = wxDEFAULT_DIALOG_STYLE );
COptionsDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 540,360 ), long style = wxDEFAULT_DIALOG_STYLE );
~COptionsDialogBase();
};
@@ -247,7 +212,7 @@ class CAboutDialogBase : public wxDialog
private:
protected:
wxStaticBitmap* m_bitmap;
wxStaticText* m_staticText40;
@@ -262,7 +227,7 @@ class CAboutDialogBase : public wxDialog
public:
wxStaticText* m_staticTextVersion;
CAboutDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("About Bitcoin"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 507,298 ), long style = wxDEFAULT_DIALOG_STYLE );
CAboutDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About Bitcoin"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 532,315 ), long style = wxDEFAULT_DIALOG_STYLE );
~CAboutDialogBase();
};
@@ -309,7 +274,7 @@ class CSendDialogBase : public wxDialog
public:
CSendDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Send Coins"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 675,312 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
CSendDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Send Coins"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 675,298 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~CSendDialogBase();
};
@@ -336,7 +301,7 @@ class CSendingDialogBase : public wxDialog
public:
CSendingDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Sending..."), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 442,151 ), long style = wxDEFAULT_DIALOG_STYLE );
CSendingDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Sending..."), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 442,151 ), long style = wxDEFAULT_DIALOG_STYLE );
~CSendingDialogBase();
};
@@ -372,7 +337,7 @@ class CYourAddressDialogBase : public wxDialog
public:
CYourAddressDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Your Bitcoin Addresses"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 610,390 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
CYourAddressDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Your Bitcoin Addresses"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 610,390 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~CYourAddressDialogBase();
};
@@ -385,265 +350,44 @@ class CAddressBookDialogBase : public wxDialog
private:
protected:
wxNotebook* m_notebook;
wxPanel* m_panelSending;
wxStaticText* m_staticText55;
wxListCtrl* m_listCtrl;
wxListCtrl* m_listCtrlSending;
wxPanel* m_panelReceiving;
wxStaticText* m_staticText45;
wxListCtrl* m_listCtrlReceiving;
wxButton* m_buttonDelete;
wxButton* m_buttonCopy;
wxButton* m_buttonEdit;
wxButton* m_buttonNew;
wxButton* m_buttonDelete;
wxButton* m_buttonOK;
// Virtual event handlers, overide them in your derived class
virtual void OnClose( wxCloseEvent& event ){ event.Skip(); }
virtual void OnNotebookPageChanged( wxNotebookEvent& event ){ event.Skip(); }
virtual void OnListEndLabelEdit( wxListEvent& event ){ event.Skip(); }
virtual void OnListItemActivated( wxListEvent& event ){ event.Skip(); }
virtual void OnListItemSelected( wxListEvent& event ){ event.Skip(); }
virtual void OnButtonDelete( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonCopy( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonEdit( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonNew( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonDelete( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonOK( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonCancel( wxCommandEvent& event ){ event.Skip(); }
public:
wxButton* m_buttonCancel;
CAddressBookDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Address Book"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 610,390 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
CAddressBookDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Address Book"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 610,390 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~CAddressBookDialogBase();
};
///////////////////////////////////////////////////////////////////////////////
/// Class CProductsDialogBase
///////////////////////////////////////////////////////////////////////////////
class CProductsDialogBase : public wxDialog
{
private:
protected:
wxComboBox* m_comboBoxCategory;
wxTextCtrl* m_textCtrlSearch;
wxButton* m_buttonSearch;
wxListCtrl* m_listCtrl;
// Virtual event handlers, overide them in your derived class
virtual void OnCombobox( wxCommandEvent& event ){ event.Skip(); }
virtual void OnKeyDown( wxKeyEvent& event ){ event.Skip(); }
virtual void OnButtonSearch( wxCommandEvent& event ){ event.Skip(); }
virtual void OnListItemActivated( wxListEvent& event ){ event.Skip(); }
public:
CProductsDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Marketplace"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 708,535 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~CProductsDialogBase();
};
///////////////////////////////////////////////////////////////////////////////
/// Class CEditProductDialogBase
///////////////////////////////////////////////////////////////////////////////
class CEditProductDialogBase : public wxFrame
{
private:
protected:
wxScrolledWindow* m_scrolledWindow;
wxStaticText* m_staticText106;
wxComboBox* m_comboBoxCategory;
wxStaticText* m_staticText108;
wxTextCtrl* m_textCtrlTitle;
wxStaticText* m_staticText107;
wxTextCtrl* m_textCtrlPrice;
wxStaticText* m_staticText22;
wxTextCtrl* m_textCtrlDescription;
wxStaticText* m_staticText23;
wxTextCtrl* m_textCtrlInstructions;
wxStaticText* m_staticText24;
wxStaticText* m_staticText25;
wxTextCtrl* m_textCtrlLabel0;
wxTextCtrl* m_textCtrlField0;
wxButton* m_buttonDel0;
wxTextCtrl* m_textCtrlLabel1;
wxTextCtrl* m_textCtrlField1;
wxButton* m_buttonDel1;
wxTextCtrl* m_textCtrlLabel2;
wxTextCtrl* m_textCtrlField2;
wxButton* m_buttonDel2;
wxTextCtrl* m_textCtrlLabel3;
wxTextCtrl* m_textCtrlField3;
wxButton* m_buttonDel3;
wxTextCtrl* m_textCtrlLabel4;
wxTextCtrl* m_textCtrlField4;
wxButton* m_buttonDel4;
wxTextCtrl* m_textCtrlLabel5;
wxTextCtrl* m_textCtrlField5;
wxButton* m_buttonDel5;
wxTextCtrl* m_textCtrlLabel6;
wxTextCtrl* m_textCtrlField6;
wxButton* m_buttonDel6;
wxTextCtrl* m_textCtrlLabel7;
wxTextCtrl* m_textCtrlField7;
wxButton* m_buttonDel7;
wxTextCtrl* m_textCtrlLabel8;
wxTextCtrl* m_textCtrlField8;
wxButton* m_buttonDel8;
wxTextCtrl* m_textCtrlLabel9;
wxTextCtrl* m_textCtrlField9;
wxButton* m_buttonDel9;
wxTextCtrl* m_textCtrlLabel10;
wxTextCtrl* m_textCtrlField10;
wxButton* m_buttonDel10;
wxTextCtrl* m_textCtrlLabel11;
wxTextCtrl* m_textCtrlField11;
wxButton* m_buttonDel11;
wxTextCtrl* m_textCtrlLabel12;
wxTextCtrl* m_textCtrlField12;
wxButton* m_buttonDel12;
wxTextCtrl* m_textCtrlLabel13;
wxTextCtrl* m_textCtrlField13;
wxButton* m_buttonDel13;
wxTextCtrl* m_textCtrlLabel14;
wxTextCtrl* m_textCtrlField14;
wxButton* m_buttonDel14;
wxTextCtrl* m_textCtrlLabel15;
wxTextCtrl* m_textCtrlField15;
wxButton* m_buttonDel15;
wxTextCtrl* m_textCtrlLabel16;
wxTextCtrl* m_textCtrlField16;
wxButton* m_buttonDel16;
wxTextCtrl* m_textCtrlLabel17;
wxTextCtrl* m_textCtrlField17;
wxButton* m_buttonDel17;
wxTextCtrl* m_textCtrlLabel18;
wxTextCtrl* m_textCtrlField18;
wxButton* m_buttonDel18;
wxTextCtrl* m_textCtrlLabel19;
wxTextCtrl* m_textCtrlField19;
wxButton* m_buttonDel19;
wxButton* m_buttonAddField;
wxButton* m_buttonOK;
wxButton* m_buttonPreview;
wxButton* m_buttonCancel;
// Virtual event handlers, overide them in your derived class
virtual void OnKeyDown( wxKeyEvent& event ){ event.Skip(); }
virtual void OnButtonDel0( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonDel1( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonDel2( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonDel3( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonDel4( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonDel5( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonDel6( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonDel7( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonDel8( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonDel9( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonDel10( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonDel11( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonDel12( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonDel13( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonDel14( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonDel15( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonDel16( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonDel17( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonDel18( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonDel19( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonAddField( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonSend( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonPreview( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonCancel( wxCommandEvent& event ){ event.Skip(); }
public:
wxFlexGridSizer* fgSizer5;
CEditProductDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Edit Product"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 660,640 ), long style = wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER|wxTAB_TRAVERSAL );
~CEditProductDialogBase();
};
///////////////////////////////////////////////////////////////////////////////
/// Class CViewProductDialogBase
///////////////////////////////////////////////////////////////////////////////
class CViewProductDialogBase : public wxFrame
{
private:
protected:
wxHtmlWindow* m_htmlWinReviews;
wxScrolledWindow* m_scrolledWindow;
wxRichTextCtrl* m_richTextHeading;
wxStaticText* m_staticTextInstructions;
wxButton* m_buttonSubmitForm;
wxButton* m_buttonCancelForm;
wxButton* m_buttonBack;
wxButton* m_buttonNext;
wxButton* m_buttonCancel;
// Virtual event handlers, overide them in your derived class
virtual void OnButtonSubmitForm( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonCancelForm( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonBack( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonNext( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonCancel( wxCommandEvent& event ){ event.Skip(); }
public:
CViewProductDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Order Form"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 630,520 ), long style = wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER|wxTAB_TRAVERSAL );
~CViewProductDialogBase();
};
///////////////////////////////////////////////////////////////////////////////
/// Class CViewOrderDialogBase
///////////////////////////////////////////////////////////////////////////////
class CViewOrderDialogBase : public wxFrame
{
private:
protected:
wxHtmlWindow* m_htmlWin;
wxButton* m_buttonOK;
// Virtual event handlers, overide them in your derived class
virtual void OnButtonOK( wxCommandEvent& event ){ event.Skip(); }
public:
CViewOrderDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("View Order"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 630,520 ), long style = wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER|wxTAB_TRAVERSAL );
~CViewOrderDialogBase();
};
///////////////////////////////////////////////////////////////////////////////
/// Class CEditReviewDialogBase
///////////////////////////////////////////////////////////////////////////////
class CEditReviewDialogBase : public wxFrame
{
private:
protected:
wxStaticText* m_staticTextSeller;
wxStaticText* m_staticText110;
wxChoice* m_choiceStars;
wxStaticText* m_staticText43;
wxTextCtrl* m_textCtrlReview;
wxButton* m_buttonSubmit;
wxButton* m_buttonCancel;
// Virtual event handlers, overide them in your derived class
virtual void OnKeyDown( wxKeyEvent& event ){ event.Skip(); }
virtual void OnButtonSubmit( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonCancel( wxCommandEvent& event ){ event.Skip(); }
public:
CEditReviewDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Enter Review"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 630,440 ), long style = wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER|wxTAB_TRAVERSAL );
~CEditReviewDialogBase();
};
///////////////////////////////////////////////////////////////////////////////
/// Class CGetTextFromUserDialogBase
///////////////////////////////////////////////////////////////////////////////
@@ -670,7 +414,7 @@ class CGetTextFromUserDialogBase : public wxDialog
public:
CGetTextFromUserDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 403,138 ), long style = wxDEFAULT_DIALOG_STYLE );
CGetTextFromUserDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 440,138 ), long style = wxDEFAULT_DIALOG_STYLE );
~CGetTextFromUserDialogBase();
};

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2009 Satoshi Nakamoto
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
@@ -299,19 +299,18 @@ public:
return string(psz, psz + sizeof(pn)*2);
}
void SetHex(const std::string& str)
void SetHex(const char* psz)
{
for (int i = 0; i < WIDTH; i++)
pn[i] = 0;
// skip 0x
const char* psz = str.c_str();
// skip leading spaces
while (isspace(*psz))
psz++;
// skip 0x
if (psz[0] == '0' && tolower(psz[1]) == 'x')
psz += 2;
while (isspace(*psz))
psz++;
// hex string to uint
static char phexdigit[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,1,2,3,4,5,6,7,8,9,0,0,0,0,0,0, 0,0xa,0xb,0xc,0xd,0xe,0xf,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0xa,0xb,0xc,0xd,0xe,0xf,0,0,0,0,0,0,0,0,0 };
@@ -332,6 +331,11 @@ public:
}
}
void SetHex(const std::string& str)
{
SetHex(str.c_str());
}
std::string ToString() const
{
return (GetHex());
@@ -384,7 +388,6 @@ typedef base_uint<256> base_uint256;
//
// uint160 and uint256 could be implemented as templates, but to keep
// compile errors and debugging cleaner, they're copy and pasted.
// It's safe to search and replace 160 with 256 and vice versa.
//
@@ -401,6 +404,8 @@ public:
uint160()
{
for (int i = 0; i < WIDTH; i++)
pn[i] = 0;
}
uint160(const basetype& b)
@@ -513,6 +518,8 @@ public:
uint256()
{
for (int i = 0; i < WIDTH; i++)
pn[i] = 0;
}
uint256(const basetype& b)

File diff suppressed because it is too large Load Diff

153
util.cpp
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2009 Satoshi Nakamoto
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
@@ -8,10 +8,12 @@
map<string, string> mapArgs;
map<string, vector<string> > mapMultiArgs;
bool fDebug = false;
bool fPrintToDebugger = false;
bool fPrintToConsole = false;
bool fPrintToDebugger = false;
char pszSetDataDir[MAX_PATH] = "";
bool fShutdown = false;
bool fDaemon = false;
bool fCommandLine = false;
@@ -75,6 +77,8 @@ void RandAddSeed()
void RandAddSeedPerfmon()
{
RandAddSeed();
// This can take up to 2 seconds, so only do it every 10 minutes
static int64 nLastPerfmon;
if (GetTime() < nLastPerfmon + 10 * 60)
@@ -87,7 +91,7 @@ void RandAddSeedPerfmon()
unsigned char pdata[250000];
memset(pdata, 0, sizeof(pdata));
unsigned long nSize = sizeof(pdata);
long ret = RegQueryValueEx(HKEY_PERFORMANCE_DATA, "Global", NULL, NULL, pdata, &nSize);
long ret = RegQueryValueExA(HKEY_PERFORMANCE_DATA, "Global", NULL, NULL, pdata, &nSize);
RegCloseKey(HKEY_PERFORMANCE_DATA);
if (ret == ERROR_SUCCESS)
{
@@ -97,10 +101,8 @@ void RandAddSeedPerfmon()
hash = 0;
memset(pdata, 0, nSize);
printf("%s RandAddSeed() %d bytes\n", DateTimeStrFormat("%x %H:%M:%S", GetTime()).c_str(), nSize);
printf("%s RandAddSeed() %d bytes\n", DateTimeStrFormat("%x %H:%M", GetTime()).c_str(), nSize);
}
#else
printf("%s RandAddSeed()\n", DateTimeStrFormat("%x %H:%M:%S", GetTime()).c_str());
#endif
}
@@ -129,6 +131,79 @@ uint64 GetRand(uint64 nMax)
inline int OutputDebugStringF(const char* pszFormat, ...)
{
int ret = 0;
if (fPrintToConsole || wxTheApp == NULL)
{
// print to console
va_list arg_ptr;
va_start(arg_ptr, pszFormat);
ret = vprintf(pszFormat, arg_ptr);
va_end(arg_ptr);
}
else
{
// print to debug.log
char pszFile[MAX_PATH+100];
GetDataDir(pszFile);
strlcat(pszFile, "/debug.log", sizeof(pszFile));
FILE* fileout = fopen(pszFile, "a");
if (fileout)
{
//// Debug print useful for profiling
//fprintf(fileout, " %"PRI64d" ", wxGetLocalTimeMillis().GetValue());
va_list arg_ptr;
va_start(arg_ptr, pszFormat);
ret = vfprintf(fileout, pszFormat, arg_ptr);
va_end(arg_ptr);
fclose(fileout);
}
}
#ifdef __WXMSW__
if (fPrintToDebugger)
{
// accumulate a line at a time
static CCriticalSection cs_OutputDebugStringF;
CRITICAL_BLOCK(cs_OutputDebugStringF)
{
static char pszBuffer[50000];
static char* pend;
if (pend == NULL)
pend = pszBuffer;
va_list arg_ptr;
va_start(arg_ptr, pszFormat);
int limit = END(pszBuffer) - pend - 2;
int ret = _vsnprintf(pend, limit, pszFormat, arg_ptr);
va_end(arg_ptr);
if (ret < 0 || ret >= limit)
{
pend = END(pszBuffer) - 2;
*pend++ = '\n';
}
else
pend += ret;
*pend = '\0';
char* p1 = pszBuffer;
char* p2;
while (p2 = strchr(p1, '\n'))
{
p2++;
char c = *p2;
*p2 = '\0';
OutputDebugStringA(p1);
*p2 = c;
p1 = p2;
}
if (p1 != pszBuffer)
memmove(pszBuffer, p1, pend - p1 + 1);
pend -= (p1 - pszBuffer);
}
}
#endif
return ret;
}
// Safer snprintf
@@ -173,11 +248,6 @@ string strprintf(const char* format, ...)
if (p == NULL)
throw std::bad_alloc();
}
#ifdef _MSC_VER
// msvc optimisation
if (p == buffer)
return string(p, p+ret);
#endif
string str(p, p+ret);
if (p != buffer)
delete p;
@@ -205,15 +275,21 @@ bool error(const char* format, ...)
void ParseString(const string& str, char c, vector<string>& v)
{
unsigned int i1 = 0;
unsigned int i2;
do
if (str.empty())
return;
string::size_type i1 = 0;
string::size_type i2;
loop
{
i2 = str.find(c, i1);
if (i2 == str.npos)
{
v.push_back(str.substr(i1));
return;
}
v.push_back(str.substr(i1, i2-i1));
i1 = i2+1;
}
while (i2 != str.npos);
}
@@ -231,6 +307,12 @@ string FormatMoney(int64 n, bool fPlus)
return str;
}
bool ParseMoney(const string& str, int64& nRet)
{
return ParseMoney(str.c_str(), nRet);
}
bool ParseMoney(const char* pszIn, int64& nRet)
{
string strWhole;
@@ -355,6 +437,40 @@ void ParseParameters(int argc, char* argv[])
}
const char* wxGetTranslation(const char* pszEnglish)
{
// Wrapper of wxGetTranslation returning the same const char* type as was passed in
static CCriticalSection cs;
CRITICAL_BLOCK(cs)
{
// Look in cache
static map<string, char*> mapCache;
map<string, char*>::iterator mi = mapCache.find(pszEnglish);
if (mi != mapCache.end())
return (*mi).second;
// wxWidgets translation
wxString strTranslated = wxGetTranslation(wxString(pszEnglish, wxConvUTF8));
// We don't cache unknown strings because caller might be passing in a
// dynamic string and we would keep allocating memory for each variation.
if (strcmp(pszEnglish, strTranslated.utf8_str()) == 0)
return pszEnglish;
// Add to cache, memory doesn't need to be freed. We only cache because
// we must pass back a pointer to permanently allocated memory.
char* pszCached = new char[strlen(strTranslated.utf8_str())+1];
strcpy(pszCached, strTranslated.utf8_str());
mapCache[pszEnglish] = pszCached;
return pszCached;
}
return NULL;
}
@@ -365,7 +481,7 @@ void FormatException(char* pszMessage, std::exception* pex, const char* pszThrea
#ifdef __WXMSW__
char pszModule[MAX_PATH];
pszModule[0] = '\0';
GetModuleFileName(NULL, pszModule, sizeof(pszModule));
GetModuleFileNameA(NULL, pszModule, sizeof(pszModule));
#else
// might not be thread safe, uses wxString
//const char* pszModule = wxStandardPaths::Get().GetExecutablePath().mb_str();
@@ -391,8 +507,9 @@ void PrintException(std::exception* pex, const char* pszThread)
char pszMessage[1000];
FormatException(pszMessage, pex, pszThread);
printf("\n\n************************\n%s\n", pszMessage);
if (wxTheApp)
wxMessageBox(pszMessage, "Error", wxOK | wxICON_ERROR);
fprintf(stderr, "\n\n************************\n%s\n", pszMessage);
if (wxTheApp && !fDaemon && fGUI)
MyMessageBox(pszMessage, "Error", wxOK | wxICON_ERROR);
throw;
//DebugBreak();
}

129
util.h
View File

@@ -1,4 +1,4 @@
// Copyright (c) 2009 Satoshi Nakamoto
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
@@ -55,6 +55,7 @@ inline T& REF(const T& val)
}
#ifdef __WXMSW__
static const bool fWindows = true;
#define MSG_NOSIGNAL 0
#define MSG_DONTWAIT 0
#ifndef UINT64_MAX
@@ -66,7 +67,10 @@ inline T& REF(const T& val)
#define S_IRUSR 0400
#define S_IWUSR 0200
#endif
#define unlink _unlink
typedef int socklen_t;
#else
static const bool fWindows = false;
#define WSAGetLastError() errno
#define WSAEWOULDBLOCK EWOULDBLOCK
#define WSAEMSGSIZE EMSGSIZE
@@ -112,13 +116,16 @@ inline int myclosesocket(SOCKET& hSocket)
extern map<string, string> mapArgs;
extern map<string, vector<string> > mapMultiArgs;
extern bool fDebug;
extern bool fPrintToDebugger;
extern bool fPrintToConsole;
extern bool fPrintToDebugger;
extern char pszSetDataDir[MAX_PATH];
extern bool fShutdown;
extern bool fDaemon;
extern bool fCommandLine;
void RandAddSeed();
void RandAddSeedPerfmon();
int OutputDebugStringF(const char* pszFormat, ...);
int my_snprintf(char* buffer, size_t limit, const char* format, ...);
string strprintf(const char* format, ...);
bool error(const char* format, ...);
@@ -126,10 +133,12 @@ void PrintException(std::exception* pex, const char* pszThread);
void LogException(std::exception* pex, const char* pszThread);
void ParseString(const string& str, char c, vector<string>& v);
string FormatMoney(int64 n, bool fPlus=false);
bool ParseMoney(const string& str, int64& nRet);
bool ParseMoney(const char* pszIn, int64& nRet);
vector<unsigned char> ParseHex(const char* psz);
vector<unsigned char> ParseHex(const std::string& str);
void ParseParameters(int argc, char* argv[]);
const char* wxGetTranslation(const char* psz);
int GetFilesize(FILE* file);
void GetDataDir(char* pszDirRet);
string GetDataDir();
@@ -219,92 +228,6 @@ public:
inline int OutputDebugStringF(const char* pszFormat, ...)
{
int ret = 0;
#ifdef __WXDEBUG__
if (!fPrintToConsole)
{
// print to debug.log
char pszFile[MAX_PATH+100];
GetDataDir(pszFile);
strlcat(pszFile, "/debug.log", sizeof(pszFile));
FILE* fileout = fopen(pszFile, "a");
if (fileout)
{
//// Debug print useful for profiling
//fprintf(fileout, " %"PRI64d" ", wxGetLocalTimeMillis().GetValue());
va_list arg_ptr;
va_start(arg_ptr, pszFormat);
ret = vfprintf(fileout, pszFormat, arg_ptr);
va_end(arg_ptr);
fclose(fileout);
}
}
#ifdef __WXMSW__
if (fPrintToDebugger)
{
// accumulate a line at a time
static CCriticalSection cs_OutputDebugStringF;
CRITICAL_BLOCK(cs_OutputDebugStringF)
{
static char pszBuffer[50000];
static char* pend;
if (pend == NULL)
pend = pszBuffer;
va_list arg_ptr;
va_start(arg_ptr, pszFormat);
int limit = END(pszBuffer) - pend - 2;
int ret = _vsnprintf(pend, limit, pszFormat, arg_ptr);
va_end(arg_ptr);
if (ret < 0 || ret >= limit)
{
pend = END(pszBuffer) - 2;
*pend++ = '\n';
}
else
pend += ret;
*pend = '\0';
char* p1 = pszBuffer;
char* p2;
while (p2 = strchr(p1, '\n'))
{
p2++;
char c = *p2;
*p2 = '\0';
OutputDebugString(p1);
*p2 = c;
p1 = p2;
}
if (p1 != pszBuffer)
memmove(pszBuffer, p1, pend - p1 + 1);
pend -= (p1 - pszBuffer);
}
}
#endif
#endif
if (fPrintToConsole)
{
// print to console
va_list arg_ptr;
va_start(arg_ptr, pszFormat);
ret = vprintf(pszFormat, arg_ptr);
va_end(arg_ptr);
}
return ret;
}
inline string i64tostr(int64 n)
{
return strprintf("%"PRI64d, n);
@@ -343,6 +266,11 @@ inline int roundint(double d)
return (int)(d > 0 ? d + 0.5 : d - 0.5);
}
inline int64 roundint64(double d)
{
return (int64)(d > 0 ? d + 0.5 : d - 0.5);
}
template<typename T>
string HexStr(const T itbegin, const T itend, bool fSpaces=true)
{
@@ -408,6 +336,17 @@ inline string DateTimeStrFormat(const char* pszFormat, int64 nTime)
return pszTime;
}
template<typename T>
void skipspaces(T& it)
{
while (isspace(*it))
++it;
}
@@ -418,8 +357,9 @@ inline string DateTimeStrFormat(const char* pszFormat, int64 nTime)
inline void heapchk()
{
#ifdef __WXMSW__
if (_heapchk() != _HEAPOK)
DebugBreak();
/// for debugging
//if (_heapchk() != _HEAPOK)
// DebugBreak();
#endif
}
@@ -580,8 +520,13 @@ inline pthread_t CreateThread(void(*pfn)(void*), void* parg, bool fWantHandle=fa
inline void SetThreadPriority(int nPriority)
{
// threads are processes on linux, so PRIO_PROCESS affects just the one thread
setpriority(PRIO_PROCESS, getpid(), nPriority);
// It's unclear if it's even possible to change thread priorities on Linux,
// but we really and truly need it for the generation threads.
#ifdef PRIO_THREAD
setpriority(PRIO_THREAD, 0, nPriority);
#else
setpriority(PRIO_PROCESS, 0, nPriority);
#endif
}
inline bool TerminateThread(pthread_t hthread, unsigned int nExitCode)

665
xpm/about.xpm Normal file
View File

@@ -0,0 +1,665 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
/* XPM */
static const char * about_xpm[] = {
/* columns rows colors chars-per-pixel */
"96 564 92 1",
" c #001269",
". c #000C72",
"X c #00057F",
"o c #001175",
"O c #000B6A",
"+ c #000E84",
"@ c #000489",
"# c #001583",
"$ c #001B89",
"% c #001B99",
"& c #000B92",
"* c #00208B",
"= c #002B97",
"- c #0004A6",
"; c #001DA7",
": c #0014BC",
"> c #0019BB",
", c #0017B4",
"< c #0023A3",
"1 c #002CAA",
"2 c #0030A4",
"3 c #003BA3",
"4 c #0033AB",
"5 c #003FA8",
"6 c #0027B8",
"7 c #0035BB",
"8 c #003CBA",
"9 c #004ABD",
"0 c #001DC4",
"q c #0017CC",
"w c #000CD0",
"e c #0026C7",
"r c #0035C4",
"t c #003DC5",
"y c #0032CB",
"u c #003BCC",
"i c #002BD3",
"p c #0021DC",
"a c #0025D5",
"s c #0034D5",
"d c #003ADB",
"f c #0016F6",
"g c #0008F9",
"h c #0027E3",
"j c #003CE9",
"k c #002BF5",
"l c #0024F9",
"z c #0033F4",
"x c #0035F8",
"c c #0048CA",
"v c #0055C5",
"b c #0059C3",
"n c #0053CB",
"m c #005ACC",
"M c #004FD4",
"N c #004CDC",
"B c #0047D0",
"V c #005BD6",
"C c #0049E5",
"Z c #0042EA",
"A c #0052E4",
"S c #005CE4",
"D c #0054EC",
"F c #005EEB",
"G c #004AF5",
"H c #0051F2",
"J c #005CFA",
"K c #0058F9",
"L c #0066E4",
"P c #006BE3",
"I c #0064EC",
"U c #006DEF",
"Y c #0074EB",
"T c #0078EC",
"R c #0073E7",
"E c #0065F4",
"W c #006BF5",
"Q c #006BFB",
"! c #0066FD",
"~ c #0073F5",
"^ c #007CF3",
"/ c #0075FB",
"( c #007DFC",
") c #0084FF",
"_ c #008AFF",
"` c #0092FF",
"' c #339CFF",
"] c #33A3FF",
"[ c #33AAFF",
"{ c #66B5FF",
"} c #66BBFF",
"| c #66C0FF",
/* pixels */
"kkkkkkkkkkkk<<<<<<<<<<<<DDDDDDDDDDDDvvvvvvvvvvvv////////////))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"kkkkkkkkkkkk<<<<<<<<<<<<DDDDDDDDDDDDvvvvvvvvvvvv////////////))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"kkkkkkkkkkkk<<<<<<<<<<<<DDDDDDDDDDDDvvvvvvvvvvvv////////////))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"kkkkkkkkkkkk<<<<<<<<<<<<DDDDDDDDDDDDvvvvvvvvvvvv////////////))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"kkkkkkkkkkkk<<<<<<<<<<<<DDDDDDDDDDDDvvvvvvvvvvvv////////////))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"kkkkkkkkkkkk<<<<<<<<<<<<DDDDDDDDDDDDvvvvvvvvvvvv////////////))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"kkkkkkkkkkkk<<<<<<<<<<<<DDDDDDDDDDDDvvvvvvvvvvvv////////////))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"kkkkkkkkkkkk<<<<<<<<<<<<DDDDDDDDDDDDvvvvvvvvvvvv////////////))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"kkkkkkkkkkkk<<<<<<<<<<<<DDDDDDDDDDDDvvvvvvvvvvvv////////////))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"kkkkkkkkkkkk<<<<<<<<<<<<DDDDDDDDDDDDvvvvvvvvvvvv////////////))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"kkkkkkkkkkkk<<<<<<<<<<<<DDDDDDDDDDDDvvvvvvvvvvvv////////////))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"kkkkkkkkkkkk<<<<<<<<<<<<DDDDDDDDDDDDvvvvvvvvvvvv////////////))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"XXXXXXXXXXXXrrrrrrrrrrrr777777777777MMMMMMMMMMMM(((((((((((())))))))))))[[[[[[[[[[[[}}}}}}}}}}}}",
"XXXXXXXXXXXXrrrrrrrrrrrr777777777777MMMMMMMMMMMM(((((((((((())))))))))))[[[[[[[[[[[[}}}}}}}}}}}}",
"XXXXXXXXXXXXrrrrrrrrrrrr777777777777MMMMMMMMMMMM(((((((((((())))))))))))[[[[[[[[[[[[}}}}}}}}}}}}",
"XXXXXXXXXXXXrrrrrrrrrrrr777777777777MMMMMMMMMMMM(((((((((((())))))))))))[[[[[[[[[[[[}}}}}}}}}}}}",
"XXXXXXXXXXXXrrrrrrrrrrrr777777777777MMMMMMMMMMMM(((((((((((())))))))))))[[[[[[[[[[[[}}}}}}}}}}}}",
"XXXXXXXXXXXXrrrrrrrrrrrr777777777777MMMMMMMMMMMM(((((((((((())))))))))))[[[[[[[[[[[[}}}}}}}}}}}}",
"XXXXXXXXXXXXrrrrrrrrrrrr777777777777MMMMMMMMMMMM(((((((((((())))))))))))[[[[[[[[[[[[}}}}}}}}}}}}",
"XXXXXXXXXXXXrrrrrrrrrrrr777777777777MMMMMMMMMMMM(((((((((((())))))))))))[[[[[[[[[[[[}}}}}}}}}}}}",
"XXXXXXXXXXXXrrrrrrrrrrrr777777777777MMMMMMMMMMMM(((((((((((())))))))))))[[[[[[[[[[[[}}}}}}}}}}}}",
"XXXXXXXXXXXXrrrrrrrrrrrr777777777777MMMMMMMMMMMM(((((((((((())))))))))))[[[[[[[[[[[[}}}}}}}}}}}}",
"XXXXXXXXXXXXrrrrrrrrrrrr777777777777MMMMMMMMMMMM(((((((((((())))))))))))[[[[[[[[[[[[}}}}}}}}}}}}",
"XXXXXXXXXXXXrrrrrrrrrrrr777777777777MMMMMMMMMMMM(((((((((((())))))))))))[[[[[[[[[[[[}}}}}}}}}}}}",
"llllllllllll;;;;;;;;;;;;NNNNNNNNNNNNSSSSSSSSSSSS~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"llllllllllll;;;;;;;;;;;;NNNNNNNNNNNNSSSSSSSSSSSS~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"llllllllllll;;;;;;;;;;;;NNNNNNNNNNNNSSSSSSSSSSSS~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"llllllllllll;;;;;;;;;;;;NNNNNNNNNNNNSSSSSSSSSSSS~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"llllllllllll;;;;;;;;;;;;NNNNNNNNNNNNSSSSSSSSSSSS~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"llllllllllll;;;;;;;;;;;;NNNNNNNNNNNNSSSSSSSSSSSS~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"llllllllllll;;;;;;;;;;;;NNNNNNNNNNNNSSSSSSSSSSSS~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"llllllllllll;;;;;;;;;;;;NNNNNNNNNNNNSSSSSSSSSSSS~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"llllllllllll;;;;;;;;;;;;NNNNNNNNNNNNSSSSSSSSSSSS~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"llllllllllll;;;;;;;;;;;;NNNNNNNNNNNNSSSSSSSSSSSS~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"llllllllllll;;;;;;;;;;;;NNNNNNNNNNNNSSSSSSSSSSSS~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"llllllllllll;;;;;;;;;;;;NNNNNNNNNNNNSSSSSSSSSSSS~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"############666666666666uuuuuuuuuuuuJJJJJJJJJJJJ^^^^^^^^^^^^____________]]]]]]]]]]]]{{{{{{{{{{{{",
"############666666666666uuuuuuuuuuuuJJJJJJJJJJJJ^^^^^^^^^^^^____________]]]]]]]]]]]]{{{{{{{{{{{{",
"############666666666666uuuuuuuuuuuuJJJJJJJJJJJJ^^^^^^^^^^^^____________]]]]]]]]]]]]{{{{{{{{{{{{",
"############666666666666uuuuuuuuuuuuJJJJJJJJJJJJ^^^^^^^^^^^^____________]]]]]]]]]]]]{{{{{{{{{{{{",
"############666666666666uuuuuuuuuuuuJJJJJJJJJJJJ^^^^^^^^^^^^____________]]]]]]]]]]]]{{{{{{{{{{{{",
"############666666666666uuuuuuuuuuuuJJJJJJJJJJJJ^^^^^^^^^^^^____________]]]]]]]]]]]]{{{{{{{{{{{{",
"############666666666666uuuuuuuuuuuuJJJJJJJJJJJJ^^^^^^^^^^^^____________]]]]]]]]]]]]{{{{{{{{{{{{",
"############666666666666uuuuuuuuuuuuJJJJJJJJJJJJ^^^^^^^^^^^^____________]]]]]]]]]]]]{{{{{{{{{{{{",
"############666666666666uuuuuuuuuuuuJJJJJJJJJJJJ^^^^^^^^^^^^____________]]]]]]]]]]]]{{{{{{{{{{{{",
"############666666666666uuuuuuuuuuuuJJJJJJJJJJJJ^^^^^^^^^^^^____________]]]]]]]]]]]]{{{{{{{{{{{{",
"############666666666666uuuuuuuuuuuuJJJJJJJJJJJJ^^^^^^^^^^^^____________]]]]]]]]]]]]{{{{{{{{{{{{",
"############666666666666uuuuuuuuuuuuJJJJJJJJJJJJ^^^^^^^^^^^^____________]]]]]]]]]]]]{{{{{{{{{{{{",
"............yyyyyyyyyyyy333333333333AAAAAAAAAAAAWWWWWWWWWWWW____________[[[[[[[[[[[[{{{{{{{{{{{{",
"............yyyyyyyyyyyy333333333333AAAAAAAAAAAAWWWWWWWWWWWW____________[[[[[[[[[[[[{{{{{{{{{{{{",
"............yyyyyyyyyyyy333333333333AAAAAAAAAAAAWWWWWWWWWWWW____________[[[[[[[[[[[[{{{{{{{{{{{{",
"............yyyyyyyyyyyy333333333333AAAAAAAAAAAAWWWWWWWWWWWW____________[[[[[[[[[[[[{{{{{{{{{{{{",
"............yyyyyyyyyyyy333333333333AAAAAAAAAAAAWWWWWWWWWWWW____________[[[[[[[[[[[[{{{{{{{{{{{{",
"............yyyyyyyyyyyy333333333333AAAAAAAAAAAAWWWWWWWWWWWW____________[[[[[[[[[[[[{{{{{{{{{{{{",
"............yyyyyyyyyyyy333333333333AAAAAAAAAAAAWWWWWWWWWWWW____________[[[[[[[[[[[[{{{{{{{{{{{{",
"............yyyyyyyyyyyy333333333333AAAAAAAAAAAAWWWWWWWWWWWW____________[[[[[[[[[[[[{{{{{{{{{{{{",
"............yyyyyyyyyyyy333333333333AAAAAAAAAAAAWWWWWWWWWWWW____________[[[[[[[[[[[[{{{{{{{{{{{{",
"............yyyyyyyyyyyy333333333333AAAAAAAAAAAAWWWWWWWWWWWW____________[[[[[[[[[[[[{{{{{{{{{{{{",
"............yyyyyyyyyyyy333333333333AAAAAAAAAAAAWWWWWWWWWWWW____________[[[[[[[[[[[[{{{{{{{{{{{{",
"............yyyyyyyyyyyy333333333333AAAAAAAAAAAAWWWWWWWWWWWW____________[[[[[[[[[[[[{{{{{{{{{{{{",
"ffffffffffff============yyyyyyyyyyyyJJJJJJJJJJJJRRRRRRRRRRRR))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"ffffffffffff============yyyyyyyyyyyyJJJJJJJJJJJJRRRRRRRRRRRR))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"ffffffffffff============yyyyyyyyyyyyJJJJJJJJJJJJRRRRRRRRRRRR))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"ffffffffffff============yyyyyyyyyyyyJJJJJJJJJJJJRRRRRRRRRRRR))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"ffffffffffff============yyyyyyyyyyyyJJJJJJJJJJJJRRRRRRRRRRRR))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"ffffffffffff============yyyyyyyyyyyyJJJJJJJJJJJJRRRRRRRRRRRR))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"ffffffffffff============yyyyyyyyyyyyJJJJJJJJJJJJRRRRRRRRRRRR))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"ffffffffffff============yyyyyyyyyyyyJJJJJJJJJJJJRRRRRRRRRRRR))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"ffffffffffff============yyyyyyyyyyyyJJJJJJJJJJJJRRRRRRRRRRRR))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"ffffffffffff============yyyyyyyyyyyyJJJJJJJJJJJJRRRRRRRRRRRR))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"ffffffffffff============yyyyyyyyyyyyJJJJJJJJJJJJRRRRRRRRRRRR))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"ffffffffffff============yyyyyyyyyyyyJJJJJJJJJJJJRRRRRRRRRRRR))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"gggggggggggg$$$$$$$$$$$$uuuuuuuuuuuuNNNNNNNNNNNN~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"gggggggggggg$$$$$$$$$$$$uuuuuuuuuuuuNNNNNNNNNNNN~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"gggggggggggg$$$$$$$$$$$$uuuuuuuuuuuuNNNNNNNNNNNN~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"gggggggggggg$$$$$$$$$$$$uuuuuuuuuuuuNNNNNNNNNNNN~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"gggggggggggg$$$$$$$$$$$$uuuuuuuuuuuuNNNNNNNNNNNN~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"gggggggggggg$$$$$$$$$$$$uuuuuuuuuuuuNNNNNNNNNNNN~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"gggggggggggg$$$$$$$$$$$$uuuuuuuuuuuuNNNNNNNNNNNN~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"gggggggggggg$$$$$$$$$$$$uuuuuuuuuuuuNNNNNNNNNNNN~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"gggggggggggg$$$$$$$$$$$$uuuuuuuuuuuuNNNNNNNNNNNN~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"gggggggggggg$$$$$$$$$$$$uuuuuuuuuuuuNNNNNNNNNNNN~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"gggggggggggg$$$$$$$$$$$$uuuuuuuuuuuuNNNNNNNNNNNN~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"gggggggggggg$$$$$$$$$$$$uuuuuuuuuuuuNNNNNNNNNNNN~~~~~~~~~~~~))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"::::::::::::hhhhhhhhhhhhddddddddddddAAAAAAAAAAAAUUUUUUUUUUUU))))))))))))''''''''''''}}}}}}}}}}}}",
"::::::::::::hhhhhhhhhhhhddddddddddddAAAAAAAAAAAAUUUUUUUUUUUU))))))))))))''''''''''''}}}}}}}}}}}}",
"::::::::::::hhhhhhhhhhhhddddddddddddAAAAAAAAAAAAUUUUUUUUUUUU))))))))))))''''''''''''}}}}}}}}}}}}",
"::::::::::::hhhhhhhhhhhhddddddddddddAAAAAAAAAAAAUUUUUUUUUUUU))))))))))))''''''''''''}}}}}}}}}}}}",
"::::::::::::hhhhhhhhhhhhddddddddddddAAAAAAAAAAAAUUUUUUUUUUUU))))))))))))''''''''''''}}}}}}}}}}}}",
"::::::::::::hhhhhhhhhhhhddddddddddddAAAAAAAAAAAAUUUUUUUUUUUU))))))))))))''''''''''''}}}}}}}}}}}}",
"::::::::::::hhhhhhhhhhhhddddddddddddAAAAAAAAAAAAUUUUUUUUUUUU))))))))))))''''''''''''}}}}}}}}}}}}",
"::::::::::::hhhhhhhhhhhhddddddddddddAAAAAAAAAAAAUUUUUUUUUUUU))))))))))))''''''''''''}}}}}}}}}}}}",
"::::::::::::hhhhhhhhhhhhddddddddddddAAAAAAAAAAAAUUUUUUUUUUUU))))))))))))''''''''''''}}}}}}}}}}}}",
"::::::::::::hhhhhhhhhhhhddddddddddddAAAAAAAAAAAAUUUUUUUUUUUU))))))))))))''''''''''''}}}}}}}}}}}}",
"::::::::::::hhhhhhhhhhhhddddddddddddAAAAAAAAAAAAUUUUUUUUUUUU))))))))))))''''''''''''}}}}}}}}}}}}",
"::::::::::::hhhhhhhhhhhhddddddddddddAAAAAAAAAAAAUUUUUUUUUUUU))))))))))))''''''''''''}}}}}}}}}}}}",
"zzzzzzzzzzzzGGGGGGGGGGGGBBBBBBBBBBBBDDDDDDDDDDDDPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"zzzzzzzzzzzzGGGGGGGGGGGGBBBBBBBBBBBBDDDDDDDDDDDDPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"zzzzzzzzzzzzGGGGGGGGGGGGBBBBBBBBBBBBDDDDDDDDDDDDPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"zzzzzzzzzzzzGGGGGGGGGGGGBBBBBBBBBBBBDDDDDDDDDDDDPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"zzzzzzzzzzzzGGGGGGGGGGGGBBBBBBBBBBBBDDDDDDDDDDDDPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"zzzzzzzzzzzzGGGGGGGGGGGGBBBBBBBBBBBBDDDDDDDDDDDDPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"zzzzzzzzzzzzGGGGGGGGGGGGBBBBBBBBBBBBDDDDDDDDDDDDPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"zzzzzzzzzzzzGGGGGGGGGGGGBBBBBBBBBBBBDDDDDDDDDDDDPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"zzzzzzzzzzzzGGGGGGGGGGGGBBBBBBBBBBBBDDDDDDDDDDDDPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"zzzzzzzzzzzzGGGGGGGGGGGGBBBBBBBBBBBBDDDDDDDDDDDDPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"zzzzzzzzzzzzGGGGGGGGGGGGBBBBBBBBBBBBDDDDDDDDDDDDPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"zzzzzzzzzzzzGGGGGGGGGGGGBBBBBBBBBBBBDDDDDDDDDDDDPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"ffffffffffffssssssssssssjjjjjjjjjjjjnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
"ffffffffffffssssssssssssjjjjjjjjjjjjnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
"ffffffffffffssssssssssssjjjjjjjjjjjjnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
"ffffffffffffssssssssssssjjjjjjjjjjjjnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
"ffffffffffffssssssssssssjjjjjjjjjjjjnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
"ffffffffffffssssssssssssjjjjjjjjjjjjnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
"ffffffffffffssssssssssssjjjjjjjjjjjjnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
"ffffffffffffssssssssssssjjjjjjjjjjjjnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
"ffffffffffffssssssssssssjjjjjjjjjjjjnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
"ffffffffffffssssssssssssjjjjjjjjjjjjnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
"ffffffffffffssssssssssssjjjjjjjjjjjjnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
"ffffffffffffssssssssssssjjjjjjjjjjjjnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
"wwwwwwwwwwww<<<<<<<<<<<<888888888888VVVVVVVVVVVV~~~~~~~~~~~~((((((((((((]]]]]]]]]]]]}}}}}}}}}}}}",
"wwwwwwwwwwww<<<<<<<<<<<<888888888888VVVVVVVVVVVV~~~~~~~~~~~~((((((((((((]]]]]]]]]]]]}}}}}}}}}}}}",
"wwwwwwwwwwww<<<<<<<<<<<<888888888888VVVVVVVVVVVV~~~~~~~~~~~~((((((((((((]]]]]]]]]]]]}}}}}}}}}}}}",
"wwwwwwwwwwww<<<<<<<<<<<<888888888888VVVVVVVVVVVV~~~~~~~~~~~~((((((((((((]]]]]]]]]]]]}}}}}}}}}}}}",
"wwwwwwwwwwww<<<<<<<<<<<<888888888888VVVVVVVVVVVV~~~~~~~~~~~~((((((((((((]]]]]]]]]]]]}}}}}}}}}}}}",
"wwwwwwwwwwww<<<<<<<<<<<<888888888888VVVVVVVVVVVV~~~~~~~~~~~~((((((((((((]]]]]]]]]]]]}}}}}}}}}}}}",
"wwwwwwwwwwww<<<<<<<<<<<<888888888888VVVVVVVVVVVV~~~~~~~~~~~~((((((((((((]]]]]]]]]]]]}}}}}}}}}}}}",
"wwwwwwwwwwww<<<<<<<<<<<<888888888888VVVVVVVVVVVV~~~~~~~~~~~~((((((((((((]]]]]]]]]]]]}}}}}}}}}}}}",
"wwwwwwwwwwww<<<<<<<<<<<<888888888888VVVVVVVVVVVV~~~~~~~~~~~~((((((((((((]]]]]]]]]]]]}}}}}}}}}}}}",
"wwwwwwwwwwww<<<<<<<<<<<<888888888888VVVVVVVVVVVV~~~~~~~~~~~~((((((((((((]]]]]]]]]]]]}}}}}}}}}}}}",
"wwwwwwwwwwww<<<<<<<<<<<<888888888888VVVVVVVVVVVV~~~~~~~~~~~~((((((((((((]]]]]]]]]]]]}}}}}}}}}}}}",
"wwwwwwwwwwww<<<<<<<<<<<<888888888888VVVVVVVVVVVV~~~~~~~~~~~~((((((((((((]]]]]]]]]]]]}}}}}}}}}}}}",
"hhhhhhhhhhhh>>>>>>>>>>>>rrrrrrrrrrrrVVVVVVVVVVVVLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"hhhhhhhhhhhh>>>>>>>>>>>>rrrrrrrrrrrrVVVVVVVVVVVVLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"hhhhhhhhhhhh>>>>>>>>>>>>rrrrrrrrrrrrVVVVVVVVVVVVLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"hhhhhhhhhhhh>>>>>>>>>>>>rrrrrrrrrrrrVVVVVVVVVVVVLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"hhhhhhhhhhhh>>>>>>>>>>>>rrrrrrrrrrrrVVVVVVVVVVVVLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"hhhhhhhhhhhh>>>>>>>>>>>>rrrrrrrrrrrrVVVVVVVVVVVVLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"hhhhhhhhhhhh>>>>>>>>>>>>rrrrrrrrrrrrVVVVVVVVVVVVLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"hhhhhhhhhhhh>>>>>>>>>>>>rrrrrrrrrrrrVVVVVVVVVVVVLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"hhhhhhhhhhhh>>>>>>>>>>>>rrrrrrrrrrrrVVVVVVVVVVVVLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"hhhhhhhhhhhh>>>>>>>>>>>>rrrrrrrrrrrrVVVVVVVVVVVVLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"hhhhhhhhhhhh>>>>>>>>>>>>rrrrrrrrrrrrVVVVVVVVVVVVLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"hhhhhhhhhhhh>>>>>>>>>>>>rrrrrrrrrrrrVVVVVVVVVVVVLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"::::::::::::;;;;;;;;;;;;HHHHHHHHHHHHccccccccccccQQQQQQQQQQQQ))))))))))))''''''''''''}}}}}}}}}}}}",
"::::::::::::;;;;;;;;;;;;HHHHHHHHHHHHccccccccccccQQQQQQQQQQQQ))))))))))))''''''''''''}}}}}}}}}}}}",
"::::::::::::;;;;;;;;;;;;HHHHHHHHHHHHccccccccccccQQQQQQQQQQQQ))))))))))))''''''''''''}}}}}}}}}}}}",
"::::::::::::;;;;;;;;;;;;HHHHHHHHHHHHccccccccccccQQQQQQQQQQQQ))))))))))))''''''''''''}}}}}}}}}}}}",
"::::::::::::;;;;;;;;;;;;HHHHHHHHHHHHccccccccccccQQQQQQQQQQQQ))))))))))))''''''''''''}}}}}}}}}}}}",
"::::::::::::;;;;;;;;;;;;HHHHHHHHHHHHccccccccccccQQQQQQQQQQQQ))))))))))))''''''''''''}}}}}}}}}}}}",
"::::::::::::;;;;;;;;;;;;HHHHHHHHHHHHccccccccccccQQQQQQQQQQQQ))))))))))))''''''''''''}}}}}}}}}}}}",
"::::::::::::;;;;;;;;;;;;HHHHHHHHHHHHccccccccccccQQQQQQQQQQQQ))))))))))))''''''''''''}}}}}}}}}}}}",
"::::::::::::;;;;;;;;;;;;HHHHHHHHHHHHccccccccccccQQQQQQQQQQQQ))))))))))))''''''''''''}}}}}}}}}}}}",
"::::::::::::;;;;;;;;;;;;HHHHHHHHHHHHccccccccccccQQQQQQQQQQQQ))))))))))))''''''''''''}}}}}}}}}}}}",
"::::::::::::;;;;;;;;;;;;HHHHHHHHHHHHccccccccccccQQQQQQQQQQQQ))))))))))))''''''''''''}}}}}}}}}}}}",
"::::::::::::;;;;;;;;;;;;HHHHHHHHHHHHccccccccccccQQQQQQQQQQQQ))))))))))))''''''''''''}}}}}}}}}}}}",
"qqqqqqqqqqqqkkkkkkkkkkkk333333333333AAAAAAAAAAAARRRRRRRRRRRR))))))))))))''''''''''''{{{{{{{{{{{{",
"qqqqqqqqqqqqkkkkkkkkkkkk333333333333AAAAAAAAAAAARRRRRRRRRRRR))))))))))))''''''''''''{{{{{{{{{{{{",
"qqqqqqqqqqqqkkkkkkkkkkkk333333333333AAAAAAAAAAAARRRRRRRRRRRR))))))))))))''''''''''''{{{{{{{{{{{{",
"qqqqqqqqqqqqkkkkkkkkkkkk333333333333AAAAAAAAAAAARRRRRRRRRRRR))))))))))))''''''''''''{{{{{{{{{{{{",
"qqqqqqqqqqqqkkkkkkkkkkkk333333333333AAAAAAAAAAAARRRRRRRRRRRR))))))))))))''''''''''''{{{{{{{{{{{{",
"qqqqqqqqqqqqkkkkkkkkkkkk333333333333AAAAAAAAAAAARRRRRRRRRRRR))))))))))))''''''''''''{{{{{{{{{{{{",
"qqqqqqqqqqqqkkkkkkkkkkkk333333333333AAAAAAAAAAAARRRRRRRRRRRR))))))))))))''''''''''''{{{{{{{{{{{{",
"qqqqqqqqqqqqkkkkkkkkkkkk333333333333AAAAAAAAAAAARRRRRRRRRRRR))))))))))))''''''''''''{{{{{{{{{{{{",
"qqqqqqqqqqqqkkkkkkkkkkkk333333333333AAAAAAAAAAAARRRRRRRRRRRR))))))))))))''''''''''''{{{{{{{{{{{{",
"qqqqqqqqqqqqkkkkkkkkkkkk333333333333AAAAAAAAAAAARRRRRRRRRRRR))))))))))))''''''''''''{{{{{{{{{{{{",
"qqqqqqqqqqqqkkkkkkkkkkkk333333333333AAAAAAAAAAAARRRRRRRRRRRR))))))))))))''''''''''''{{{{{{{{{{{{",
"qqqqqqqqqqqqkkkkkkkkkkkk333333333333AAAAAAAAAAAARRRRRRRRRRRR))))))))))))''''''''''''{{{{{{{{{{{{",
"############ppppppppppppssssssssssssIIIIIIIIIIII^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
"############ppppppppppppssssssssssssIIIIIIIIIIII^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
"############ppppppppppppssssssssssssIIIIIIIIIIII^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
"############ppppppppppppssssssssssssIIIIIIIIIIII^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
"############ppppppppppppssssssssssssIIIIIIIIIIII^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
"############ppppppppppppssssssssssssIIIIIIIIIIII^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
"############ppppppppppppssssssssssssIIIIIIIIIIII^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
"############ppppppppppppssssssssssssIIIIIIIIIIII^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
"############ppppppppppppssssssssssssIIIIIIIIIIII^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
"############ppppppppppppssssssssssssIIIIIIIIIIII^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
"############ppppppppppppssssssssssssIIIIIIIIIIII^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
"############ppppppppppppssssssssssssIIIIIIIIIIII^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
"++++++++++++rrrrrrrrrrrr777777777777MMMMMMMMMMMMIIIIIIIIIIII````````````''''''''''''{{{{{{{{{{{{",
"++++++++++++rrrrrrrrrrrr777777777777MMMMMMMMMMMMIIIIIIIIIIII````````````''''''''''''{{{{{{{{{{{{",
"++++++++++++rrrrrrrrrrrr777777777777MMMMMMMMMMMMIIIIIIIIIIII````````````''''''''''''{{{{{{{{{{{{",
"++++++++++++rrrrrrrrrrrr777777777777MMMMMMMMMMMMIIIIIIIIIIII````````````''''''''''''{{{{{{{{{{{{",
"++++++++++++rrrrrrrrrrrr777777777777MMMMMMMMMMMMIIIIIIIIIIII````````````''''''''''''{{{{{{{{{{{{",
"++++++++++++rrrrrrrrrrrr777777777777MMMMMMMMMMMMIIIIIIIIIIII````````````''''''''''''{{{{{{{{{{{{",
"++++++++++++rrrrrrrrrrrr777777777777MMMMMMMMMMMMIIIIIIIIIIII````````````''''''''''''{{{{{{{{{{{{",
"++++++++++++rrrrrrrrrrrr777777777777MMMMMMMMMMMMIIIIIIIIIIII````````````''''''''''''{{{{{{{{{{{{",
"++++++++++++rrrrrrrrrrrr777777777777MMMMMMMMMMMMIIIIIIIIIIII````````````''''''''''''{{{{{{{{{{{{",
"++++++++++++rrrrrrrrrrrr777777777777MMMMMMMMMMMMIIIIIIIIIIII````````````''''''''''''{{{{{{{{{{{{",
"++++++++++++rrrrrrrrrrrr777777777777MMMMMMMMMMMMIIIIIIIIIIII````````````''''''''''''{{{{{{{{{{{{",
"++++++++++++rrrrrrrrrrrr777777777777MMMMMMMMMMMMIIIIIIIIIIII````````````''''''''''''{{{{{{{{{{{{",
"------------$$$$$$$$$$$$999999999999JJJJJJJJJJJJTTTTTTTTTTTT____________]]]]]]]]]]]]{{{{{{{{{{{{",
"------------$$$$$$$$$$$$999999999999JJJJJJJJJJJJTTTTTTTTTTTT____________]]]]]]]]]]]]{{{{{{{{{{{{",
"------------$$$$$$$$$$$$999999999999JJJJJJJJJJJJTTTTTTTTTTTT____________]]]]]]]]]]]]{{{{{{{{{{{{",
"------------$$$$$$$$$$$$999999999999JJJJJJJJJJJJTTTTTTTTTTTT____________]]]]]]]]]]]]{{{{{{{{{{{{",
"------------$$$$$$$$$$$$999999999999JJJJJJJJJJJJTTTTTTTTTTTT____________]]]]]]]]]]]]{{{{{{{{{{{{",
"------------$$$$$$$$$$$$999999999999JJJJJJJJJJJJTTTTTTTTTTTT____________]]]]]]]]]]]]{{{{{{{{{{{{",
"------------$$$$$$$$$$$$999999999999JJJJJJJJJJJJTTTTTTTTTTTT____________]]]]]]]]]]]]{{{{{{{{{{{{",
"------------$$$$$$$$$$$$999999999999JJJJJJJJJJJJTTTTTTTTTTTT____________]]]]]]]]]]]]{{{{{{{{{{{{",
"------------$$$$$$$$$$$$999999999999JJJJJJJJJJJJTTTTTTTTTTTT____________]]]]]]]]]]]]{{{{{{{{{{{{",
"------------$$$$$$$$$$$$999999999999JJJJJJJJJJJJTTTTTTTTTTTT____________]]]]]]]]]]]]{{{{{{{{{{{{",
"------------$$$$$$$$$$$$999999999999JJJJJJJJJJJJTTTTTTTTTTTT____________]]]]]]]]]]]]{{{{{{{{{{{{",
"------------$$$$$$$$$$$$999999999999JJJJJJJJJJJJTTTTTTTTTTTT____________]]]]]]]]]]]]{{{{{{{{{{{{",
"@@@@@@@@@@@@666666666666ttttttttttttWWWWWWWWWWWWPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"@@@@@@@@@@@@666666666666ttttttttttttWWWWWWWWWWWWPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"@@@@@@@@@@@@666666666666ttttttttttttWWWWWWWWWWWWPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"@@@@@@@@@@@@666666666666ttttttttttttWWWWWWWWWWWWPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"@@@@@@@@@@@@666666666666ttttttttttttWWWWWWWWWWWWPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"@@@@@@@@@@@@666666666666ttttttttttttWWWWWWWWWWWWPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"@@@@@@@@@@@@666666666666ttttttttttttWWWWWWWWWWWWPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"@@@@@@@@@@@@666666666666ttttttttttttWWWWWWWWWWWWPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"@@@@@@@@@@@@666666666666ttttttttttttWWWWWWWWWWWWPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"@@@@@@@@@@@@666666666666ttttttttttttWWWWWWWWWWWWPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"@@@@@@@@@@@@666666666666ttttttttttttWWWWWWWWWWWWPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"@@@@@@@@@@@@666666666666ttttttttttttWWWWWWWWWWWWPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"aaaaaaaaaaaazzzzzzzzzzzzBBBBBBBBBBBBbbbbbbbbbbbbPPPPPPPPPPPP____________''''''''''''{{{{{{{{{{{{",
"aaaaaaaaaaaazzzzzzzzzzzzBBBBBBBBBBBBbbbbbbbbbbbbPPPPPPPPPPPP____________''''''''''''{{{{{{{{{{{{",
"aaaaaaaaaaaazzzzzzzzzzzzBBBBBBBBBBBBbbbbbbbbbbbbPPPPPPPPPPPP____________''''''''''''{{{{{{{{{{{{",
"aaaaaaaaaaaazzzzzzzzzzzzBBBBBBBBBBBBbbbbbbbbbbbbPPPPPPPPPPPP____________''''''''''''{{{{{{{{{{{{",
"aaaaaaaaaaaazzzzzzzzzzzzBBBBBBBBBBBBbbbbbbbbbbbbPPPPPPPPPPPP____________''''''''''''{{{{{{{{{{{{",
"aaaaaaaaaaaazzzzzzzzzzzzBBBBBBBBBBBBbbbbbbbbbbbbPPPPPPPPPPPP____________''''''''''''{{{{{{{{{{{{",
"aaaaaaaaaaaazzzzzzzzzzzzBBBBBBBBBBBBbbbbbbbbbbbbPPPPPPPPPPPP____________''''''''''''{{{{{{{{{{{{",
"aaaaaaaaaaaazzzzzzzzzzzzBBBBBBBBBBBBbbbbbbbbbbbbPPPPPPPPPPPP____________''''''''''''{{{{{{{{{{{{",
"aaaaaaaaaaaazzzzzzzzzzzzBBBBBBBBBBBBbbbbbbbbbbbbPPPPPPPPPPPP____________''''''''''''{{{{{{{{{{{{",
"aaaaaaaaaaaazzzzzzzzzzzzBBBBBBBBBBBBbbbbbbbbbbbbPPPPPPPPPPPP____________''''''''''''{{{{{{{{{{{{",
"aaaaaaaaaaaazzzzzzzzzzzzBBBBBBBBBBBBbbbbbbbbbbbbPPPPPPPPPPPP____________''''''''''''{{{{{{{{{{{{",
"aaaaaaaaaaaazzzzzzzzzzzzBBBBBBBBBBBBbbbbbbbbbbbbPPPPPPPPPPPP____________''''''''''''{{{{{{{{{{{{",
"------------%%%%%%%%%%%%ttttttttttttNNNNNNNNNNNN^^^^^^^^^^^^))))))))))))''''''''''''}}}}}}}}}}}}",
"------------%%%%%%%%%%%%ttttttttttttNNNNNNNNNNNN^^^^^^^^^^^^))))))))))))''''''''''''}}}}}}}}}}}}",
"------------%%%%%%%%%%%%ttttttttttttNNNNNNNNNNNN^^^^^^^^^^^^))))))))))))''''''''''''}}}}}}}}}}}}",
"------------%%%%%%%%%%%%ttttttttttttNNNNNNNNNNNN^^^^^^^^^^^^))))))))))))''''''''''''}}}}}}}}}}}}",
"------------%%%%%%%%%%%%ttttttttttttNNNNNNNNNNNN^^^^^^^^^^^^))))))))))))''''''''''''}}}}}}}}}}}}",
"------------%%%%%%%%%%%%ttttttttttttNNNNNNNNNNNN^^^^^^^^^^^^))))))))))))''''''''''''}}}}}}}}}}}}",
"------------%%%%%%%%%%%%ttttttttttttNNNNNNNNNNNN^^^^^^^^^^^^))))))))))))''''''''''''}}}}}}}}}}}}",
"------------%%%%%%%%%%%%ttttttttttttNNNNNNNNNNNN^^^^^^^^^^^^))))))))))))''''''''''''}}}}}}}}}}}}",
"------------%%%%%%%%%%%%ttttttttttttNNNNNNNNNNNN^^^^^^^^^^^^))))))))))))''''''''''''}}}}}}}}}}}}",
"------------%%%%%%%%%%%%ttttttttttttNNNNNNNNNNNN^^^^^^^^^^^^))))))))))))''''''''''''}}}}}}}}}}}}",
"------------%%%%%%%%%%%%ttttttttttttNNNNNNNNNNNN^^^^^^^^^^^^))))))))))))''''''''''''}}}}}}}}}}}}",
"------------%%%%%%%%%%%%ttttttttttttNNNNNNNNNNNN^^^^^^^^^^^^))))))))))))''''''''''''}}}}}}}}}}}}",
" 000000000000888888888888FFFFFFFFFFFF~~~~~~~~~~~~))))))))))))''''''''''''}}}}}}}}}}}}",
" 000000000000888888888888FFFFFFFFFFFF~~~~~~~~~~~~))))))))))))''''''''''''}}}}}}}}}}}}",
" 000000000000888888888888FFFFFFFFFFFF~~~~~~~~~~~~))))))))))))''''''''''''}}}}}}}}}}}}",
" 000000000000888888888888FFFFFFFFFFFF~~~~~~~~~~~~))))))))))))''''''''''''}}}}}}}}}}}}",
" 000000000000888888888888FFFFFFFFFFFF~~~~~~~~~~~~))))))))))))''''''''''''}}}}}}}}}}}}",
" 000000000000888888888888FFFFFFFFFFFF~~~~~~~~~~~~))))))))))))''''''''''''}}}}}}}}}}}}",
" 000000000000888888888888FFFFFFFFFFFF~~~~~~~~~~~~))))))))))))''''''''''''}}}}}}}}}}}}",
" 000000000000888888888888FFFFFFFFFFFF~~~~~~~~~~~~))))))))))))''''''''''''}}}}}}}}}}}}",
" 000000000000888888888888FFFFFFFFFFFF~~~~~~~~~~~~))))))))))))''''''''''''}}}}}}}}}}}}",
" 000000000000888888888888FFFFFFFFFFFF~~~~~~~~~~~~))))))))))))''''''''''''}}}}}}}}}}}}",
" 000000000000888888888888FFFFFFFFFFFF~~~~~~~~~~~~))))))))))))''''''''''''}}}}}}}}}}}}",
" 000000000000888888888888FFFFFFFFFFFF~~~~~~~~~~~~))))))))))))''''''''''''}}}}}}}}}}}}",
"++++++++++++222222222222xxxxxxxxxxxxNNNNNNNNNNNNEEEEEEEEEEEE))))))))))))''''''''''''}}}}}}}}}}}}",
"++++++++++++222222222222xxxxxxxxxxxxNNNNNNNNNNNNEEEEEEEEEEEE))))))))))))''''''''''''}}}}}}}}}}}}",
"++++++++++++222222222222xxxxxxxxxxxxNNNNNNNNNNNNEEEEEEEEEEEE))))))))))))''''''''''''}}}}}}}}}}}}",
"++++++++++++222222222222xxxxxxxxxxxxNNNNNNNNNNNNEEEEEEEEEEEE))))))))))))''''''''''''}}}}}}}}}}}}",
"++++++++++++222222222222xxxxxxxxxxxxNNNNNNNNNNNNEEEEEEEEEEEE))))))))))))''''''''''''}}}}}}}}}}}}",
"++++++++++++222222222222xxxxxxxxxxxxNNNNNNNNNNNNEEEEEEEEEEEE))))))))))))''''''''''''}}}}}}}}}}}}",
"++++++++++++222222222222xxxxxxxxxxxxNNNNNNNNNNNNEEEEEEEEEEEE))))))))))))''''''''''''}}}}}}}}}}}}",
"++++++++++++222222222222xxxxxxxxxxxxNNNNNNNNNNNNEEEEEEEEEEEE))))))))))))''''''''''''}}}}}}}}}}}}",
"++++++++++++222222222222xxxxxxxxxxxxNNNNNNNNNNNNEEEEEEEEEEEE))))))))))))''''''''''''}}}}}}}}}}}}",
"++++++++++++222222222222xxxxxxxxxxxxNNNNNNNNNNNNEEEEEEEEEEEE))))))))))))''''''''''''}}}}}}}}}}}}",
"++++++++++++222222222222xxxxxxxxxxxxNNNNNNNNNNNNEEEEEEEEEEEE))))))))))))''''''''''''}}}}}}}}}}}}",
"++++++++++++222222222222xxxxxxxxxxxxNNNNNNNNNNNNEEEEEEEEEEEE))))))))))))''''''''''''}}}}}}}}}}}}",
"$$$$$$$$$$$$000000000000GGGGGGGGGGGGnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"$$$$$$$$$$$$000000000000GGGGGGGGGGGGnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"$$$$$$$$$$$$000000000000GGGGGGGGGGGGnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"$$$$$$$$$$$$000000000000GGGGGGGGGGGGnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"$$$$$$$$$$$$000000000000GGGGGGGGGGGGnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"$$$$$$$$$$$$000000000000GGGGGGGGGGGGnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"$$$$$$$$$$$$000000000000GGGGGGGGGGGGnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"$$$$$$$$$$$$000000000000GGGGGGGGGGGGnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"$$$$$$$$$$$$000000000000GGGGGGGGGGGGnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"$$$$$$$$$$$$000000000000GGGGGGGGGGGGnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"$$$$$$$$$$$$000000000000GGGGGGGGGGGGnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"$$$$$$$$$$$$000000000000GGGGGGGGGGGGnnnnnnnnnnnnLLLLLLLLLLLL))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"ooooooooooooffffffffffffccccccccccccbbbbbbbbbbbbRRRRRRRRRRRR____________''''''''''''{{{{{{{{{{{{",
"ooooooooooooffffffffffffccccccccccccbbbbbbbbbbbbRRRRRRRRRRRR____________''''''''''''{{{{{{{{{{{{",
"ooooooooooooffffffffffffccccccccccccbbbbbbbbbbbbRRRRRRRRRRRR____________''''''''''''{{{{{{{{{{{{",
"ooooooooooooffffffffffffccccccccccccbbbbbbbbbbbbRRRRRRRRRRRR____________''''''''''''{{{{{{{{{{{{",
"ooooooooooooffffffffffffccccccccccccbbbbbbbbbbbbRRRRRRRRRRRR____________''''''''''''{{{{{{{{{{{{",
"ooooooooooooffffffffffffccccccccccccbbbbbbbbbbbbRRRRRRRRRRRR____________''''''''''''{{{{{{{{{{{{",
"ooooooooooooffffffffffffccccccccccccbbbbbbbbbbbbRRRRRRRRRRRR____________''''''''''''{{{{{{{{{{{{",
"ooooooooooooffffffffffffccccccccccccbbbbbbbbbbbbRRRRRRRRRRRR____________''''''''''''{{{{{{{{{{{{",
"ooooooooooooffffffffffffccccccccccccbbbbbbbbbbbbRRRRRRRRRRRR____________''''''''''''{{{{{{{{{{{{",
"ooooooooooooffffffffffffccccccccccccbbbbbbbbbbbbRRRRRRRRRRRR____________''''''''''''{{{{{{{{{{{{",
"ooooooooooooffffffffffffccccccccccccbbbbbbbbbbbbRRRRRRRRRRRR____________''''''''''''{{{{{{{{{{{{",
"ooooooooooooffffffffffffccccccccccccbbbbbbbbbbbbRRRRRRRRRRRR____________''''''''''''{{{{{{{{{{{{",
"@@@@@@@@@@@@111111111111777777777777JJJJJJJJJJJJPPPPPPPPPPPP((((((((((((''''''''''''{{{{{{{{{{{{",
"@@@@@@@@@@@@111111111111777777777777JJJJJJJJJJJJPPPPPPPPPPPP((((((((((((''''''''''''{{{{{{{{{{{{",
"@@@@@@@@@@@@111111111111777777777777JJJJJJJJJJJJPPPPPPPPPPPP((((((((((((''''''''''''{{{{{{{{{{{{",
"@@@@@@@@@@@@111111111111777777777777JJJJJJJJJJJJPPPPPPPPPPPP((((((((((((''''''''''''{{{{{{{{{{{{",
"@@@@@@@@@@@@111111111111777777777777JJJJJJJJJJJJPPPPPPPPPPPP((((((((((((''''''''''''{{{{{{{{{{{{",
"@@@@@@@@@@@@111111111111777777777777JJJJJJJJJJJJPPPPPPPPPPPP((((((((((((''''''''''''{{{{{{{{{{{{",
"@@@@@@@@@@@@111111111111777777777777JJJJJJJJJJJJPPPPPPPPPPPP((((((((((((''''''''''''{{{{{{{{{{{{",
"@@@@@@@@@@@@111111111111777777777777JJJJJJJJJJJJPPPPPPPPPPPP((((((((((((''''''''''''{{{{{{{{{{{{",
"@@@@@@@@@@@@111111111111777777777777JJJJJJJJJJJJPPPPPPPPPPPP((((((((((((''''''''''''{{{{{{{{{{{{",
"@@@@@@@@@@@@111111111111777777777777JJJJJJJJJJJJPPPPPPPPPPPP((((((((((((''''''''''''{{{{{{{{{{{{",
"@@@@@@@@@@@@111111111111777777777777JJJJJJJJJJJJPPPPPPPPPPPP((((((((((((''''''''''''{{{{{{{{{{{{",
"@@@@@@@@@@@@111111111111777777777777JJJJJJJJJJJJPPPPPPPPPPPP((((((((((((''''''''''''{{{{{{{{{{{{",
" iiiiiiiiiiiiGGGGGGGGGGGGVVVVVVVVVVVV~~~~~~~~~~~~____________''''''''''''}}}}}}}}}}}}",
" iiiiiiiiiiiiGGGGGGGGGGGGVVVVVVVVVVVV~~~~~~~~~~~~____________''''''''''''}}}}}}}}}}}}",
" iiiiiiiiiiiiGGGGGGGGGGGGVVVVVVVVVVVV~~~~~~~~~~~~____________''''''''''''}}}}}}}}}}}}",
" iiiiiiiiiiiiGGGGGGGGGGGGVVVVVVVVVVVV~~~~~~~~~~~~____________''''''''''''}}}}}}}}}}}}",
" iiiiiiiiiiiiGGGGGGGGGGGGVVVVVVVVVVVV~~~~~~~~~~~~____________''''''''''''}}}}}}}}}}}}",
" iiiiiiiiiiiiGGGGGGGGGGGGVVVVVVVVVVVV~~~~~~~~~~~~____________''''''''''''}}}}}}}}}}}}",
" iiiiiiiiiiiiGGGGGGGGGGGGVVVVVVVVVVVV~~~~~~~~~~~~____________''''''''''''}}}}}}}}}}}}",
" iiiiiiiiiiiiGGGGGGGGGGGGVVVVVVVVVVVV~~~~~~~~~~~~____________''''''''''''}}}}}}}}}}}}",
" iiiiiiiiiiiiGGGGGGGGGGGGVVVVVVVVVVVV~~~~~~~~~~~~____________''''''''''''}}}}}}}}}}}}",
" iiiiiiiiiiiiGGGGGGGGGGGGVVVVVVVVVVVV~~~~~~~~~~~~____________''''''''''''}}}}}}}}}}}}",
" iiiiiiiiiiiiGGGGGGGGGGGGVVVVVVVVVVVV~~~~~~~~~~~~____________''''''''''''}}}}}}}}}}}}",
" iiiiiiiiiiiiGGGGGGGGGGGGVVVVVVVVVVVV~~~~~~~~~~~~____________''''''''''''}}}}}}}}}}}}",
"------------222222222222KKKKKKKKKKKKIIIIIIIIIIIIQQQQQQQQQQQQ____________''''''''''''{{{{{{{{{{{{",
"------------222222222222KKKKKKKKKKKKIIIIIIIIIIIIQQQQQQQQQQQQ____________''''''''''''{{{{{{{{{{{{",
"------------222222222222KKKKKKKKKKKKIIIIIIIIIIIIQQQQQQQQQQQQ____________''''''''''''{{{{{{{{{{{{",
"------------222222222222KKKKKKKKKKKKIIIIIIIIIIIIQQQQQQQQQQQQ____________''''''''''''{{{{{{{{{{{{",
"------------222222222222KKKKKKKKKKKKIIIIIIIIIIIIQQQQQQQQQQQQ____________''''''''''''{{{{{{{{{{{{",
"------------222222222222KKKKKKKKKKKKIIIIIIIIIIIIQQQQQQQQQQQQ____________''''''''''''{{{{{{{{{{{{",
"------------222222222222KKKKKKKKKKKKIIIIIIIIIIIIQQQQQQQQQQQQ____________''''''''''''{{{{{{{{{{{{",
"------------222222222222KKKKKKKKKKKKIIIIIIIIIIIIQQQQQQQQQQQQ____________''''''''''''{{{{{{{{{{{{",
"------------222222222222KKKKKKKKKKKKIIIIIIIIIIIIQQQQQQQQQQQQ____________''''''''''''{{{{{{{{{{{{",
"------------222222222222KKKKKKKKKKKKIIIIIIIIIIIIQQQQQQQQQQQQ____________''''''''''''{{{{{{{{{{{{",
"------------222222222222KKKKKKKKKKKKIIIIIIIIIIIIQQQQQQQQQQQQ____________''''''''''''{{{{{{{{{{{{",
"------------222222222222KKKKKKKKKKKKIIIIIIIIIIIIQQQQQQQQQQQQ____________''''''''''''{{{{{{{{{{{{",
"&&&&&&&&&&&&222222222222333333333333WWWWWWWWWWWW~~~~~~~~~~~~____________''''''''''''{{{{{{{{{{{{",
"&&&&&&&&&&&&222222222222333333333333WWWWWWWWWWWW~~~~~~~~~~~~____________''''''''''''{{{{{{{{{{{{",
"&&&&&&&&&&&&222222222222333333333333WWWWWWWWWWWW~~~~~~~~~~~~____________''''''''''''{{{{{{{{{{{{",
"&&&&&&&&&&&&222222222222333333333333WWWWWWWWWWWW~~~~~~~~~~~~____________''''''''''''{{{{{{{{{{{{",
"&&&&&&&&&&&&222222222222333333333333WWWWWWWWWWWW~~~~~~~~~~~~____________''''''''''''{{{{{{{{{{{{",
"&&&&&&&&&&&&222222222222333333333333WWWWWWWWWWWW~~~~~~~~~~~~____________''''''''''''{{{{{{{{{{{{",
"&&&&&&&&&&&&222222222222333333333333WWWWWWWWWWWW~~~~~~~~~~~~____________''''''''''''{{{{{{{{{{{{",
"&&&&&&&&&&&&222222222222333333333333WWWWWWWWWWWW~~~~~~~~~~~~____________''''''''''''{{{{{{{{{{{{",
"&&&&&&&&&&&&222222222222333333333333WWWWWWWWWWWW~~~~~~~~~~~~____________''''''''''''{{{{{{{{{{{{",
"&&&&&&&&&&&&222222222222333333333333WWWWWWWWWWWW~~~~~~~~~~~~____________''''''''''''{{{{{{{{{{{{",
"&&&&&&&&&&&&222222222222333333333333WWWWWWWWWWWW~~~~~~~~~~~~____________''''''''''''{{{{{{{{{{{{",
"&&&&&&&&&&&&222222222222333333333333WWWWWWWWWWWW~~~~~~~~~~~~____________''''''''''''{{{{{{{{{{{{",
"wwwwwwwwwwww============555555555555EEEEEEEEEEEEEEEEEEEEEEEE____________''''''''''''||||||||||||",
"wwwwwwwwwwww============555555555555EEEEEEEEEEEEEEEEEEEEEEEE____________''''''''''''||||||||||||",
"wwwwwwwwwwww============555555555555EEEEEEEEEEEEEEEEEEEEEEEE____________''''''''''''||||||||||||",
"wwwwwwwwwwww============555555555555EEEEEEEEEEEEEEEEEEEEEEEE____________''''''''''''||||||||||||",
"wwwwwwwwwwww============555555555555EEEEEEEEEEEEEEEEEEEEEEEE____________''''''''''''||||||||||||",
"wwwwwwwwwwww============555555555555EEEEEEEEEEEEEEEEEEEEEEEE____________''''''''''''||||||||||||",
"wwwwwwwwwwww============555555555555EEEEEEEEEEEEEEEEEEEEEEEE____________''''''''''''||||||||||||",
"wwwwwwwwwwww============555555555555EEEEEEEEEEEEEEEEEEEEEEEE____________''''''''''''||||||||||||",
"wwwwwwwwwwww============555555555555EEEEEEEEEEEEEEEEEEEEEEEE____________''''''''''''||||||||||||",
"wwwwwwwwwwww============555555555555EEEEEEEEEEEEEEEEEEEEEEEE____________''''''''''''||||||||||||",
"wwwwwwwwwwww============555555555555EEEEEEEEEEEEEEEEEEEEEEEE____________''''''''''''||||||||||||",
"wwwwwwwwwwww============555555555555EEEEEEEEEEEEEEEEEEEEEEEE____________''''''''''''||||||||||||",
"ffffffffffff>>>>>>>>>>>>rrrrrrrrrrrrnnnnnnnnnnnn~~~~~~~~~~~~____________]]]]]]]]]]]]{{{{{{{{{{{{",
"ffffffffffff>>>>>>>>>>>>rrrrrrrrrrrrnnnnnnnnnnnn~~~~~~~~~~~~____________]]]]]]]]]]]]{{{{{{{{{{{{",
"ffffffffffff>>>>>>>>>>>>rrrrrrrrrrrrnnnnnnnnnnnn~~~~~~~~~~~~____________]]]]]]]]]]]]{{{{{{{{{{{{",
"ffffffffffff>>>>>>>>>>>>rrrrrrrrrrrrnnnnnnnnnnnn~~~~~~~~~~~~____________]]]]]]]]]]]]{{{{{{{{{{{{",
"ffffffffffff>>>>>>>>>>>>rrrrrrrrrrrrnnnnnnnnnnnn~~~~~~~~~~~~____________]]]]]]]]]]]]{{{{{{{{{{{{",
"ffffffffffff>>>>>>>>>>>>rrrrrrrrrrrrnnnnnnnnnnnn~~~~~~~~~~~~____________]]]]]]]]]]]]{{{{{{{{{{{{",
"ffffffffffff>>>>>>>>>>>>rrrrrrrrrrrrnnnnnnnnnnnn~~~~~~~~~~~~____________]]]]]]]]]]]]{{{{{{{{{{{{",
"ffffffffffff>>>>>>>>>>>>rrrrrrrrrrrrnnnnnnnnnnnn~~~~~~~~~~~~____________]]]]]]]]]]]]{{{{{{{{{{{{",
"ffffffffffff>>>>>>>>>>>>rrrrrrrrrrrrnnnnnnnnnnnn~~~~~~~~~~~~____________]]]]]]]]]]]]{{{{{{{{{{{{",
"ffffffffffff>>>>>>>>>>>>rrrrrrrrrrrrnnnnnnnnnnnn~~~~~~~~~~~~____________]]]]]]]]]]]]{{{{{{{{{{{{",
"ffffffffffff>>>>>>>>>>>>rrrrrrrrrrrrnnnnnnnnnnnn~~~~~~~~~~~~____________]]]]]]]]]]]]{{{{{{{{{{{{",
"ffffffffffff>>>>>>>>>>>>rrrrrrrrrrrrnnnnnnnnnnnn~~~~~~~~~~~~____________]]]]]]]]]]]]{{{{{{{{{{{{",
"############$$$$$$$$$$$$CCCCCCCCCCCCEEEEEEEEEEEE(((((((((((())))))))))))''''''''''''}}}}}}}}}}}}",
"############$$$$$$$$$$$$CCCCCCCCCCCCEEEEEEEEEEEE(((((((((((())))))))))))''''''''''''}}}}}}}}}}}}",
"############$$$$$$$$$$$$CCCCCCCCCCCCEEEEEEEEEEEE(((((((((((())))))))))))''''''''''''}}}}}}}}}}}}",
"############$$$$$$$$$$$$CCCCCCCCCCCCEEEEEEEEEEEE(((((((((((())))))))))))''''''''''''}}}}}}}}}}}}",
"############$$$$$$$$$$$$CCCCCCCCCCCCEEEEEEEEEEEE(((((((((((())))))))))))''''''''''''}}}}}}}}}}}}",
"############$$$$$$$$$$$$CCCCCCCCCCCCEEEEEEEEEEEE(((((((((((())))))))))))''''''''''''}}}}}}}}}}}}",
"############$$$$$$$$$$$$CCCCCCCCCCCCEEEEEEEEEEEE(((((((((((())))))))))))''''''''''''}}}}}}}}}}}}",
"############$$$$$$$$$$$$CCCCCCCCCCCCEEEEEEEEEEEE(((((((((((())))))))))))''''''''''''}}}}}}}}}}}}",
"############$$$$$$$$$$$$CCCCCCCCCCCCEEEEEEEEEEEE(((((((((((())))))))))))''''''''''''}}}}}}}}}}}}",
"############$$$$$$$$$$$$CCCCCCCCCCCCEEEEEEEEEEEE(((((((((((())))))))))))''''''''''''}}}}}}}}}}}}",
"############$$$$$$$$$$$$CCCCCCCCCCCCEEEEEEEEEEEE(((((((((((())))))))))))''''''''''''}}}}}}}}}}}}",
"############$$$$$$$$$$$$CCCCCCCCCCCCEEEEEEEEEEEE(((((((((((())))))))))))''''''''''''}}}}}}}}}}}}",
",,,,,,,,,,,,666666666666ddddddddddddHHHHHHHHHHHHEEEEEEEEEEEE____________]]]]]]]]]]]]{{{{{{{{{{{{",
",,,,,,,,,,,,666666666666ddddddddddddHHHHHHHHHHHHEEEEEEEEEEEE____________]]]]]]]]]]]]{{{{{{{{{{{{",
",,,,,,,,,,,,666666666666ddddddddddddHHHHHHHHHHHHEEEEEEEEEEEE____________]]]]]]]]]]]]{{{{{{{{{{{{",
",,,,,,,,,,,,666666666666ddddddddddddHHHHHHHHHHHHEEEEEEEEEEEE____________]]]]]]]]]]]]{{{{{{{{{{{{",
",,,,,,,,,,,,666666666666ddddddddddddHHHHHHHHHHHHEEEEEEEEEEEE____________]]]]]]]]]]]]{{{{{{{{{{{{",
",,,,,,,,,,,,666666666666ddddddddddddHHHHHHHHHHHHEEEEEEEEEEEE____________]]]]]]]]]]]]{{{{{{{{{{{{",
",,,,,,,,,,,,666666666666ddddddddddddHHHHHHHHHHHHEEEEEEEEEEEE____________]]]]]]]]]]]]{{{{{{{{{{{{",
",,,,,,,,,,,,666666666666ddddddddddddHHHHHHHHHHHHEEEEEEEEEEEE____________]]]]]]]]]]]]{{{{{{{{{{{{",
",,,,,,,,,,,,666666666666ddddddddddddHHHHHHHHHHHHEEEEEEEEEEEE____________]]]]]]]]]]]]{{{{{{{{{{{{",
",,,,,,,,,,,,666666666666ddddddddddddHHHHHHHHHHHHEEEEEEEEEEEE____________]]]]]]]]]]]]{{{{{{{{{{{{",
",,,,,,,,,,,,666666666666ddddddddddddHHHHHHHHHHHHEEEEEEEEEEEE____________]]]]]]]]]]]]{{{{{{{{{{{{",
",,,,,,,,,,,,666666666666ddddddddddddHHHHHHHHHHHHEEEEEEEEEEEE____________]]]]]]]]]]]]{{{{{{{{{{{{",
"xxxxxxxxxxxxjjjjjjjjjjjjccccccccccccSSSSSSSSSSSSPPPPPPPPPPPP))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"xxxxxxxxxxxxjjjjjjjjjjjjccccccccccccSSSSSSSSSSSSPPPPPPPPPPPP))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"xxxxxxxxxxxxjjjjjjjjjjjjccccccccccccSSSSSSSSSSSSPPPPPPPPPPPP))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"xxxxxxxxxxxxjjjjjjjjjjjjccccccccccccSSSSSSSSSSSSPPPPPPPPPPPP))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"xxxxxxxxxxxxjjjjjjjjjjjjccccccccccccSSSSSSSSSSSSPPPPPPPPPPPP))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"xxxxxxxxxxxxjjjjjjjjjjjjccccccccccccSSSSSSSSSSSSPPPPPPPPPPPP))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"xxxxxxxxxxxxjjjjjjjjjjjjccccccccccccSSSSSSSSSSSSPPPPPPPPPPPP))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"xxxxxxxxxxxxjjjjjjjjjjjjccccccccccccSSSSSSSSSSSSPPPPPPPPPPPP))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"xxxxxxxxxxxxjjjjjjjjjjjjccccccccccccSSSSSSSSSSSSPPPPPPPPPPPP))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"xxxxxxxxxxxxjjjjjjjjjjjjccccccccccccSSSSSSSSSSSSPPPPPPPPPPPP))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"xxxxxxxxxxxxjjjjjjjjjjjjccccccccccccSSSSSSSSSSSSPPPPPPPPPPPP))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"xxxxxxxxxxxxjjjjjjjjjjjjccccccccccccSSSSSSSSSSSSPPPPPPPPPPPP))))))))))))]]]]]]]]]]]]}}}}}}}}}}}}",
"000000000000%%%%%%%%%%%%ttttttttttttmmmmmmmmmmmm////////////````````````''''''''''''{{{{{{{{{{{{",
"000000000000%%%%%%%%%%%%ttttttttttttmmmmmmmmmmmm////////////````````````''''''''''''{{{{{{{{{{{{",
"000000000000%%%%%%%%%%%%ttttttttttttmmmmmmmmmmmm////////////````````````''''''''''''{{{{{{{{{{{{",
"000000000000%%%%%%%%%%%%ttttttttttttmmmmmmmmmmmm////////////````````````''''''''''''{{{{{{{{{{{{",
"000000000000%%%%%%%%%%%%ttttttttttttmmmmmmmmmmmm////////////````````````''''''''''''{{{{{{{{{{{{",
"000000000000%%%%%%%%%%%%ttttttttttttmmmmmmmmmmmm////////////````````````''''''''''''{{{{{{{{{{{{",
"000000000000%%%%%%%%%%%%ttttttttttttmmmmmmmmmmmm////////////````````````''''''''''''{{{{{{{{{{{{",
"000000000000%%%%%%%%%%%%ttttttttttttmmmmmmmmmmmm////////////````````````''''''''''''{{{{{{{{{{{{",
"000000000000%%%%%%%%%%%%ttttttttttttmmmmmmmmmmmm////////////````````````''''''''''''{{{{{{{{{{{{",
"000000000000%%%%%%%%%%%%ttttttttttttmmmmmmmmmmmm////////////````````````''''''''''''{{{{{{{{{{{{",
"000000000000%%%%%%%%%%%%ttttttttttttmmmmmmmmmmmm////////////````````````''''''''''''{{{{{{{{{{{{",
"000000000000%%%%%%%%%%%%ttttttttttttmmmmmmmmmmmm////////////````````````''''''''''''{{{{{{{{{{{{",
">>>>>>>>>>>>uuuuuuuuuuuuZZZZZZZZZZZZmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
">>>>>>>>>>>>uuuuuuuuuuuuZZZZZZZZZZZZmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
">>>>>>>>>>>>uuuuuuuuuuuuZZZZZZZZZZZZmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
">>>>>>>>>>>>uuuuuuuuuuuuZZZZZZZZZZZZmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
">>>>>>>>>>>>uuuuuuuuuuuuZZZZZZZZZZZZmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
">>>>>>>>>>>>uuuuuuuuuuuuZZZZZZZZZZZZmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
">>>>>>>>>>>>uuuuuuuuuuuuZZZZZZZZZZZZmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
">>>>>>>>>>>>uuuuuuuuuuuuZZZZZZZZZZZZmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
">>>>>>>>>>>>uuuuuuuuuuuuZZZZZZZZZZZZmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
">>>>>>>>>>>>uuuuuuuuuuuuZZZZZZZZZZZZmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
">>>>>>>>>>>>uuuuuuuuuuuuZZZZZZZZZZZZmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
">>>>>>>>>>>>uuuuuuuuuuuuZZZZZZZZZZZZmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''{{{{{{{{{{{{",
"OOOOOOOOOOOO444444444444888888888888KKKKKKKKKKKKTTTTTTTTTTTT))))))))))))''''''''''''{{{{{{{{{{{{",
"OOOOOOOOOOOO444444444444888888888888KKKKKKKKKKKKTTTTTTTTTTTT))))))))))))''''''''''''{{{{{{{{{{{{",
"OOOOOOOOOOOO444444444444888888888888KKKKKKKKKKKKTTTTTTTTTTTT))))))))))))''''''''''''{{{{{{{{{{{{",
"OOOOOOOOOOOO444444444444888888888888KKKKKKKKKKKKTTTTTTTTTTTT))))))))))))''''''''''''{{{{{{{{{{{{",
"OOOOOOOOOOOO444444444444888888888888KKKKKKKKKKKKTTTTTTTTTTTT))))))))))))''''''''''''{{{{{{{{{{{{",
"OOOOOOOOOOOO444444444444888888888888KKKKKKKKKKKKTTTTTTTTTTTT))))))))))))''''''''''''{{{{{{{{{{{{",
"OOOOOOOOOOOO444444444444888888888888KKKKKKKKKKKKTTTTTTTTTTTT))))))))))))''''''''''''{{{{{{{{{{{{",
"OOOOOOOOOOOO444444444444888888888888KKKKKKKKKKKKTTTTTTTTTTTT))))))))))))''''''''''''{{{{{{{{{{{{",
"OOOOOOOOOOOO444444444444888888888888KKKKKKKKKKKKTTTTTTTTTTTT))))))))))))''''''''''''{{{{{{{{{{{{",
"OOOOOOOOOOOO444444444444888888888888KKKKKKKKKKKKTTTTTTTTTTTT))))))))))))''''''''''''{{{{{{{{{{{{",
"OOOOOOOOOOOO444444444444888888888888KKKKKKKKKKKKTTTTTTTTTTTT))))))))))))''''''''''''{{{{{{{{{{{{",
"OOOOOOOOOOOO444444444444888888888888KKKKKKKKKKKKTTTTTTTTTTTT))))))))))))''''''''''''{{{{{{{{{{{{",
"++++++++++++666666666666CCCCCCCCCCCCQQQQQQQQQQQQYYYYYYYYYYYY____________''''''''''''}}}}}}}}}}}}",
"++++++++++++666666666666CCCCCCCCCCCCQQQQQQQQQQQQYYYYYYYYYYYY____________''''''''''''}}}}}}}}}}}}",
"++++++++++++666666666666CCCCCCCCCCCCQQQQQQQQQQQQYYYYYYYYYYYY____________''''''''''''}}}}}}}}}}}}",
"++++++++++++666666666666CCCCCCCCCCCCQQQQQQQQQQQQYYYYYYYYYYYY____________''''''''''''}}}}}}}}}}}}",
"++++++++++++666666666666CCCCCCCCCCCCQQQQQQQQQQQQYYYYYYYYYYYY____________''''''''''''}}}}}}}}}}}}",
"++++++++++++666666666666CCCCCCCCCCCCQQQQQQQQQQQQYYYYYYYYYYYY____________''''''''''''}}}}}}}}}}}}",
"++++++++++++666666666666CCCCCCCCCCCCQQQQQQQQQQQQYYYYYYYYYYYY____________''''''''''''}}}}}}}}}}}}",
"++++++++++++666666666666CCCCCCCCCCCCQQQQQQQQQQQQYYYYYYYYYYYY____________''''''''''''}}}}}}}}}}}}",
"++++++++++++666666666666CCCCCCCCCCCCQQQQQQQQQQQQYYYYYYYYYYYY____________''''''''''''}}}}}}}}}}}}",
"++++++++++++666666666666CCCCCCCCCCCCQQQQQQQQQQQQYYYYYYYYYYYY____________''''''''''''}}}}}}}}}}}}",
"++++++++++++666666666666CCCCCCCCCCCCQQQQQQQQQQQQYYYYYYYYYYYY____________''''''''''''}}}}}}}}}}}}",
"++++++++++++666666666666CCCCCCCCCCCCQQQQQQQQQQQQYYYYYYYYYYYY____________''''''''''''}}}}}}}}}}}}",
"oooooooooooo,,,,,,,,,,,,DDDDDDDDDDDDmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''}}}}}}}}}}}}",
"oooooooooooo,,,,,,,,,,,,DDDDDDDDDDDDmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''}}}}}}}}}}}}",
"oooooooooooo,,,,,,,,,,,,DDDDDDDDDDDDmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''}}}}}}}}}}}}",
"oooooooooooo,,,,,,,,,,,,DDDDDDDDDDDDmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''}}}}}}}}}}}}",
"oooooooooooo,,,,,,,,,,,,DDDDDDDDDDDDmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''}}}}}}}}}}}}",
"oooooooooooo,,,,,,,,,,,,DDDDDDDDDDDDmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''}}}}}}}}}}}}",
"oooooooooooo,,,,,,,,,,,,DDDDDDDDDDDDmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''}}}}}}}}}}}}",
"oooooooooooo,,,,,,,,,,,,DDDDDDDDDDDDmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''}}}}}}}}}}}}",
"oooooooooooo,,,,,,,,,,,,DDDDDDDDDDDDmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''}}}}}}}}}}}}",
"oooooooooooo,,,,,,,,,,,,DDDDDDDDDDDDmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''}}}}}}}}}}}}",
"oooooooooooo,,,,,,,,,,,,DDDDDDDDDDDDmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''}}}}}}}}}}}}",
"oooooooooooo,,,,,,,,,,,,DDDDDDDDDDDDmmmmmmmmmmmmLLLLLLLLLLLL))))))))))))''''''''''''}}}}}}}}}}}}",
"::::::::::::eeeeeeeeeeee444444444444mmmmmmmmmmmm^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
"::::::::::::eeeeeeeeeeee444444444444mmmmmmmmmmmm^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
"::::::::::::eeeeeeeeeeee444444444444mmmmmmmmmmmm^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
"::::::::::::eeeeeeeeeeee444444444444mmmmmmmmmmmm^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
"::::::::::::eeeeeeeeeeee444444444444mmmmmmmmmmmm^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
"::::::::::::eeeeeeeeeeee444444444444mmmmmmmmmmmm^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
"::::::::::::eeeeeeeeeeee444444444444mmmmmmmmmmmm^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
"::::::::::::eeeeeeeeeeee444444444444mmmmmmmmmmmm^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
"::::::::::::eeeeeeeeeeee444444444444mmmmmmmmmmmm^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
"::::::::::::eeeeeeeeeeee444444444444mmmmmmmmmmmm^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
"::::::::::::eeeeeeeeeeee444444444444mmmmmmmmmmmm^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
"::::::::::::eeeeeeeeeeee444444444444mmmmmmmmmmmm^^^^^^^^^^^^____________''''''''''''{{{{{{{{{{{{",
"............666666666666ZZZZZZZZZZZZbbbbbbbbbbbbPPPPPPPPPPPP````````````''''''''''''{{{{{{{{{{{{",
"............666666666666ZZZZZZZZZZZZbbbbbbbbbbbbPPPPPPPPPPPP````````````''''''''''''{{{{{{{{{{{{",
"............666666666666ZZZZZZZZZZZZbbbbbbbbbbbbPPPPPPPPPPPP````````````''''''''''''{{{{{{{{{{{{",
"............666666666666ZZZZZZZZZZZZbbbbbbbbbbbbPPPPPPPPPPPP````````````''''''''''''{{{{{{{{{{{{",
"............666666666666ZZZZZZZZZZZZbbbbbbbbbbbbPPPPPPPPPPPP````````````''''''''''''{{{{{{{{{{{{",
"............666666666666ZZZZZZZZZZZZbbbbbbbbbbbbPPPPPPPPPPPP````````````''''''''''''{{{{{{{{{{{{",
"............666666666666ZZZZZZZZZZZZbbbbbbbbbbbbPPPPPPPPPPPP````````````''''''''''''{{{{{{{{{{{{",
"............666666666666ZZZZZZZZZZZZbbbbbbbbbbbbPPPPPPPPPPPP````````````''''''''''''{{{{{{{{{{{{",
"............666666666666ZZZZZZZZZZZZbbbbbbbbbbbbPPPPPPPPPPPP````````````''''''''''''{{{{{{{{{{{{",
"............666666666666ZZZZZZZZZZZZbbbbbbbbbbbbPPPPPPPPPPPP````````````''''''''''''{{{{{{{{{{{{",
"............666666666666ZZZZZZZZZZZZbbbbbbbbbbbbPPPPPPPPPPPP````````````''''''''''''{{{{{{{{{{{{",
"............666666666666ZZZZZZZZZZZZbbbbbbbbbbbbPPPPPPPPPPPP````````````''''''''''''{{{{{{{{{{{{",
"aaaaaaaaaaaaiiiiiiiiiiiizzzzzzzzzzzzJJJJJJJJJJJJPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"aaaaaaaaaaaaiiiiiiiiiiiizzzzzzzzzzzzJJJJJJJJJJJJPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"aaaaaaaaaaaaiiiiiiiiiiiizzzzzzzzzzzzJJJJJJJJJJJJPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"aaaaaaaaaaaaiiiiiiiiiiiizzzzzzzzzzzzJJJJJJJJJJJJPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"aaaaaaaaaaaaiiiiiiiiiiiizzzzzzzzzzzzJJJJJJJJJJJJPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"aaaaaaaaaaaaiiiiiiiiiiiizzzzzzzzzzzzJJJJJJJJJJJJPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"aaaaaaaaaaaaiiiiiiiiiiiizzzzzzzzzzzzJJJJJJJJJJJJPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"aaaaaaaaaaaaiiiiiiiiiiiizzzzzzzzzzzzJJJJJJJJJJJJPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"aaaaaaaaaaaaiiiiiiiiiiiizzzzzzzzzzzzJJJJJJJJJJJJPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"aaaaaaaaaaaaiiiiiiiiiiiizzzzzzzzzzzzJJJJJJJJJJJJPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"aaaaaaaaaaaaiiiiiiiiiiiizzzzzzzzzzzzJJJJJJJJJJJJPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"aaaaaaaaaaaaiiiiiiiiiiiizzzzzzzzzzzzJJJJJJJJJJJJPPPPPPPPPPPP))))))))))))''''''''''''{{{{{{{{{{{{",
"............eeeeeeeeeeee444444444444IIIIIIIIIIIIWWWWWWWWWWWW))))))))))))''''''''''''}}}}}}}}}}}}",
"............eeeeeeeeeeee444444444444IIIIIIIIIIIIWWWWWWWWWWWW))))))))))))''''''''''''}}}}}}}}}}}}",
"............eeeeeeeeeeee444444444444IIIIIIIIIIIIWWWWWWWWWWWW))))))))))))''''''''''''}}}}}}}}}}}}",
"............eeeeeeeeeeee444444444444IIIIIIIIIIIIWWWWWWWWWWWW))))))))))))''''''''''''}}}}}}}}}}}}",
"............eeeeeeeeeeee444444444444IIIIIIIIIIIIWWWWWWWWWWWW))))))))))))''''''''''''}}}}}}}}}}}}",
"............eeeeeeeeeeee444444444444IIIIIIIIIIIIWWWWWWWWWWWW))))))))))))''''''''''''}}}}}}}}}}}}",
"............eeeeeeeeeeee444444444444IIIIIIIIIIIIWWWWWWWWWWWW))))))))))))''''''''''''}}}}}}}}}}}}",
"............eeeeeeeeeeee444444444444IIIIIIIIIIIIWWWWWWWWWWWW))))))))))))''''''''''''}}}}}}}}}}}}",
"............eeeeeeeeeeee444444444444IIIIIIIIIIIIWWWWWWWWWWWW))))))))))))''''''''''''}}}}}}}}}}}}",
"............eeeeeeeeeeee444444444444IIIIIIIIIIIIWWWWWWWWWWWW))))))))))))''''''''''''}}}}}}}}}}}}",
"............eeeeeeeeeeee444444444444IIIIIIIIIIIIWWWWWWWWWWWW))))))))))))''''''''''''}}}}}}}}}}}}",
"............eeeeeeeeeeee444444444444IIIIIIIIIIIIWWWWWWWWWWWW))))))))))))''''''''''''}}}}}}}}}}}}",
"llllllllllll444444444444HHHHHHHHHHHHvvvvvvvvvvvv((((((((((((____________]]]]]]]]]]]]}}}}}}}}}}}}",
"llllllllllll444444444444HHHHHHHHHHHHvvvvvvvvvvvv((((((((((((____________]]]]]]]]]]]]}}}}}}}}}}}}",
"llllllllllll444444444444HHHHHHHHHHHHvvvvvvvvvvvv((((((((((((____________]]]]]]]]]]]]}}}}}}}}}}}}",
"llllllllllll444444444444HHHHHHHHHHHHvvvvvvvvvvvv((((((((((((____________]]]]]]]]]]]]}}}}}}}}}}}}",
"llllllllllll444444444444HHHHHHHHHHHHvvvvvvvvvvvv((((((((((((____________]]]]]]]]]]]]}}}}}}}}}}}}",
"llllllllllll444444444444HHHHHHHHHHHHvvvvvvvvvvvv((((((((((((____________]]]]]]]]]]]]}}}}}}}}}}}}",
"llllllllllll444444444444HHHHHHHHHHHHvvvvvvvvvvvv((((((((((((____________]]]]]]]]]]]]}}}}}}}}}}}}",
"llllllllllll444444444444HHHHHHHHHHHHvvvvvvvvvvvv((((((((((((____________]]]]]]]]]]]]}}}}}}}}}}}}",
"llllllllllll444444444444HHHHHHHHHHHHvvvvvvvvvvvv((((((((((((____________]]]]]]]]]]]]}}}}}}}}}}}}",
"llllllllllll444444444444HHHHHHHHHHHHvvvvvvvvvvvv((((((((((((____________]]]]]]]]]]]]}}}}}}}}}}}}",
"llllllllllll444444444444HHHHHHHHHHHHvvvvvvvvvvvv((((((((((((____________]]]]]]]]]]]]}}}}}}}}}}}}",
"llllllllllll444444444444HHHHHHHHHHHHvvvvvvvvvvvv((((((((((((____________]]]]]]]]]]]]}}}}}}}}}}}}",
"qqqqqqqqqqqq111111111111ssssssssssssGGGGGGGGGGGGQQQQQQQQQQQQ____________[[[[[[[[[[[[{{{{{{{{{{{{",
"qqqqqqqqqqqq111111111111ssssssssssssGGGGGGGGGGGGQQQQQQQQQQQQ____________[[[[[[[[[[[[{{{{{{{{{{{{",
"qqqqqqqqqqqq111111111111ssssssssssssGGGGGGGGGGGGQQQQQQQQQQQQ____________[[[[[[[[[[[[{{{{{{{{{{{{",
"qqqqqqqqqqqq111111111111ssssssssssssGGGGGGGGGGGGQQQQQQQQQQQQ____________[[[[[[[[[[[[{{{{{{{{{{{{",
"qqqqqqqqqqqq111111111111ssssssssssssGGGGGGGGGGGGQQQQQQQQQQQQ____________[[[[[[[[[[[[{{{{{{{{{{{{",
"qqqqqqqqqqqq111111111111ssssssssssssGGGGGGGGGGGGQQQQQQQQQQQQ____________[[[[[[[[[[[[{{{{{{{{{{{{",
"qqqqqqqqqqqq111111111111ssssssssssssGGGGGGGGGGGGQQQQQQQQQQQQ____________[[[[[[[[[[[[{{{{{{{{{{{{",
"qqqqqqqqqqqq111111111111ssssssssssssGGGGGGGGGGGGQQQQQQQQQQQQ____________[[[[[[[[[[[[{{{{{{{{{{{{",
"qqqqqqqqqqqq111111111111ssssssssssssGGGGGGGGGGGGQQQQQQQQQQQQ____________[[[[[[[[[[[[{{{{{{{{{{{{",
"qqqqqqqqqqqq111111111111ssssssssssssGGGGGGGGGGGGQQQQQQQQQQQQ____________[[[[[[[[[[[[{{{{{{{{{{{{",
"qqqqqqqqqqqq111111111111ssssssssssssGGGGGGGGGGGGQQQQQQQQQQQQ____________[[[[[[[[[[[[{{{{{{{{{{{{",
"qqqqqqqqqqqq111111111111ssssssssssssGGGGGGGGGGGGQQQQQQQQQQQQ____________[[[[[[[[[[[[{{{{{{{{{{{{",
"ppppppppppppkkkkkkkkkkkkttttttttttttSSSSSSSSSSSS!!!!!!!!!!!!))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"ppppppppppppkkkkkkkkkkkkttttttttttttSSSSSSSSSSSS!!!!!!!!!!!!))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"ppppppppppppkkkkkkkkkkkkttttttttttttSSSSSSSSSSSS!!!!!!!!!!!!))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"ppppppppppppkkkkkkkkkkkkttttttttttttSSSSSSSSSSSS!!!!!!!!!!!!))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"ppppppppppppkkkkkkkkkkkkttttttttttttSSSSSSSSSSSS!!!!!!!!!!!!))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"ppppppppppppkkkkkkkkkkkkttttttttttttSSSSSSSSSSSS!!!!!!!!!!!!))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"ppppppppppppkkkkkkkkkkkkttttttttttttSSSSSSSSSSSS!!!!!!!!!!!!))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"ppppppppppppkkkkkkkkkkkkttttttttttttSSSSSSSSSSSS!!!!!!!!!!!!))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"ppppppppppppkkkkkkkkkkkkttttttttttttSSSSSSSSSSSS!!!!!!!!!!!!))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"ppppppppppppkkkkkkkkkkkkttttttttttttSSSSSSSSSSSS!!!!!!!!!!!!))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"ppppppppppppkkkkkkkkkkkkttttttttttttSSSSSSSSSSSS!!!!!!!!!!!!))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"ppppppppppppkkkkkkkkkkkkttttttttttttSSSSSSSSSSSS!!!!!!!!!!!!))))))))))))]]]]]]]]]]]]{{{{{{{{{{{{",
"ppppppppppppzzzzzzzzzzzzddddddddddddFFFFFFFFFFFFLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
"ppppppppppppzzzzzzzzzzzzddddddddddddFFFFFFFFFFFFLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
"ppppppppppppzzzzzzzzzzzzddddddddddddFFFFFFFFFFFFLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
"ppppppppppppzzzzzzzzzzzzddddddddddddFFFFFFFFFFFFLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
"ppppppppppppzzzzzzzzzzzzddddddddddddFFFFFFFFFFFFLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
"ppppppppppppzzzzzzzzzzzzddddddddddddFFFFFFFFFFFFLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
"ppppppppppppzzzzzzzzzzzzddddddddddddFFFFFFFFFFFFLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
"ppppppppppppzzzzzzzzzzzzddddddddddddFFFFFFFFFFFFLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
"ppppppppppppzzzzzzzzzzzzddddddddddddFFFFFFFFFFFFLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
"ppppppppppppzzzzzzzzzzzzddddddddddddFFFFFFFFFFFFLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
"ppppppppppppzzzzzzzzzzzzddddddddddddFFFFFFFFFFFFLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
"ppppppppppppzzzzzzzzzzzzddddddddddddFFFFFFFFFFFFLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
"666666666666************777777777777MMMMMMMMMMMMLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
"666666666666************777777777777MMMMMMMMMMMMLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
"666666666666************777777777777MMMMMMMMMMMMLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
"666666666666************777777777777MMMMMMMMMMMMLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
"666666666666************777777777777MMMMMMMMMMMMLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
"666666666666************777777777777MMMMMMMMMMMMLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
"666666666666************777777777777MMMMMMMMMMMMLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
"666666666666************777777777777MMMMMMMMMMMMLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
"666666666666************777777777777MMMMMMMMMMMMLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
"666666666666************777777777777MMMMMMMMMMMMLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
"666666666666************777777777777MMMMMMMMMMMMLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{",
"666666666666************777777777777MMMMMMMMMMMMLLLLLLLLLLLL````````````''''''''''''{{{{{{{{{{{{"
};

View File

@@ -1,203 +1,219 @@
/* XPM */
static const char * bitcoin16_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 16 181 2",
" c #775605",
". c #745507",
"X c #785806",
"o c #7D5A06",
"O c #745508",
"+ c #755508",
"@ c #755608",
"# c #775708",
"$ c #77580B",
"% c #7A5A0B",
"& c #7D5E14",
"* c #86630D",
"= c #8D6B16",
"- c #886818",
"; c #927019",
": c #91701E",
"> c #9A751E",
", c #957627",
"< c #9A7925",
"1 c #987827",
"2 c #98782B",
"3 c #9D7C2F",
"4 c #9E7E31",
"5 c #A57D22",
"6 c #A88227",
"7 c #B78D2E",
"8 c #B78F2E",
"9 c #A78430",
"0 c #A48733",
"q c #A68536",
"w c #A98937",
"e c #B98F31",
"r c #B49233",
"t c #B39337",
"y c #C09837",
"u c #C39936",
"i c #C49936",
"p c #C69C39",
"a c #C89C3A",
"s c #CCA23A",
"d c #AF9240",
"f c #B99644",
"g c #BE9C46",
"h c #BF9D4A",
"j c #BA9F58",
"k c #BEA04B",
"l c #BBA253",
"z c #BAA057",
"x c #C29E44",
"c c #C2A144",
"v c #CAA246",
"b c #CCA344",
"n c #CEA645",
"m c #C2A04A",
"M c #C7A349",
"N c #C5A34A",
"B c #C7A64D",
"V c #CFA649",
"C c #CEAA4C",
"Z c #D1A84B",
"A c #D4AC49",
"S c #D5AC49",
"D c #D7AD48",
"F c #D5AF4D",
"G c #C0A451",
"H c #CAA550",
"J c #CBAA58",
"K c #CAAD5D",
"L c #D9AD53",
"P c #DFB757",
"I c #D5B058",
"U c #D7B75D",
"Y c #DCB75A",
"T c #DFBB5E",
"R c #E1B957",
"E c #E3B759",
"W c #E6BC5B",
"Q c #E7BE5D",
"! c #E5BC5E",
"~ c #CAAE62",
"^ c #C8AF6A",
"/ c #CDB565",
"( c #CDB46D",
") c #D7B360",
"_ c #D5B862",
"` c #D1B66C",
"' c #D8BB68",
"] c #DBBA6E",
"[ c #DFBE6D",
"{ c #D0B872",
"} c #D2B974",
"| c #DABF74",
" . c #D8BF77",
".. c #D6BD79",
"X. c #D5BE7B",
"o. c #D7BF7A",
"O. c #E8BC61",
"+. c #DDC075",
"@. c #DCC279",
"#. c #DCC47E",
"$. c #EDC661",
"%. c #EEC562",
"&. c #E0C16B",
"*. c #E0C36B",
"=. c #E3C26A",
"-. c #E7C26A",
";. c #E3C569",
":. c #E3C26C",
">. c #E4C16C",
",. c #EEC969",
"<. c #F4C664",
"1. c #F0CA68",
"2. c #F7CA68",
"3. c #F6CD69",
"4. c #F7CD69",
"5. c #F7CF68",
"6. c #E6C374",
"7. c #E1C47A",
"8. c #E1C77B",
"9. c #E5C578",
"0. c #E4C579",
"q. c #E4C67A",
"w. c #E5C67C",
"e. c #E8C57B",
"r. c #E8CB7B",
"t. c #EDCC78",
"y. c #EBCB7C",
"u. c #F0CF73",
"i. c #F6CF74",
"p. c #F4D173",
"a. c #F7D072",
"s. c #F5D376",
"d. c #FAD071",
"f. c #FBD470",
"g. c #FAD572",
"h. c #FDD671",
"j. c #FDD773",
"k. c #F3DB76",
"l. c #F8D578",
"z. c #FBDB79",
"x. c #FFE57E",
"c. c #DEC681",
"v. c #DFC782",
"b. c #E0C682",
"n. c #E1C984",
"m. c #E2C985",
"M. c #E3CB87",
"N. c #E9C980",
"B. c #EBCC82",
"V. c #E3CC88",
"C. c #E4CF8D",
"Z. c #EFD187",
"A. c #EFD488",
"S. c #EFD58D",
"D. c #F6D581",
"F. c #F1D687",
"G. c #F9D680",
"H. c #F7DA8B",
"J. c #F2DE93",
"K. c #FADF93",
"L. c #F3DB98",
"P. c #F0DB9B",
"I. c #FEE081",
"U. c #FEE18C",
"Y. c #FCE38F",
"T. c #F7E98E",
"R. c #FFE88C",
"E. c #F6E491",
"W. c #FBEA91",
"Q. c #FFE897",
"!. c #FFEE9A",
"~. c #FEE99D",
"^. c #FEEC9F",
"/. c #FEF092",
"(. c #FFF29A",
"). c #FBE7A9",
"_. c #F4EDA8",
"`. c #FAEBAA",
"'. c #FEEBAD",
"]. c #FEFABD",
"[. c None",
"16 16 197 2",
" c #755507",
". c #775606",
"X c #795707",
"o c #7D5A07",
"O c #765608",
"+ c #74550A",
"@ c #75550A",
"# c #75560A",
"$ c #785708",
"% c #78580B",
"& c #7D5C0B",
"* c #78590E",
"= c #7E5F14",
"- c #8A6711",
"; c #8D6B15",
": c #8A691A",
"> c #93711C",
", c #9D7A23",
"< c #9F7B22",
"1 c #9C7B2A",
"2 c #9E7C28",
"3 c #A37F26",
"4 c #B4831B",
"5 c #A68126",
"6 c #A5852E",
"7 c #A9872E",
"8 c #AC862D",
"9 c #AC872F",
"0 c #AF8B30",
"q c #AC8932",
"w c #AF8A34",
"e c #B08E36",
"r c #B98F33",
"t c #B18E3A",
"y c #B39036",
"u c #B69237",
"i c #B3913B",
"p c #B6923C",
"a c #BD9338",
"s c #B9993F",
"d c #BA993F",
"f c #C2932D",
"g c #C09437",
"h c #C59832",
"j c #C39836",
"k c #C89835",
"l c #C59C3D",
"z c #CF9E3E",
"x c #CFA23F",
"c c #D0A13A",
"v c #D3A23A",
"b c #D4A338",
"n c #D6A33F",
"m c #B19345",
"M c #BF9940",
"N c #BF9D43",
"B c #B3954B",
"V c #BD9A48",
"C c #BC9C4B",
"Z c #BD9F51",
"A c #CAA244",
"S c #C2A14B",
"D c #C4A44B",
"F c #C1A24C",
"G c #C7A64C",
"H c #C5A64E",
"J c #C9A94F",
"K c #D1A343",
"L c #D7A644",
"P c #D5A547",
"I c #D6A547",
"U c #DCAD42",
"Y c #DDAB45",
"T c #C3A151",
"R c #C9A551",
"E c #CAAA50",
"W c #CBAD53",
"Q c #CDAC52",
"! c #CEA855",
"~ c #CEB15A",
"^ c #DEB154",
"/ c #D1B35A",
"( c #D7B35A",
") c #D8B45D",
"_ c #E3B34A",
"` c #E2B34E",
"' c #E6B54F",
"] c #E2B350",
"[ c #E3B352",
"{ c #E4B451",
"} c #E2B355",
"| c #E7B853",
" . c #E9BC51",
".. c #ECBC53",
"X. c #E7BE5A",
"o. c #E2BA5C",
"O. c #E2BC5C",
"+. c #E9BB59",
"@. c #EBBE59",
"#. c #EABD5B",
"$. c #E8BF5C",
"%. c #E9BE5E",
"&. c #C8AC63",
"*. c #D0B162",
"=. c #D5B567",
"-. c #DABC62",
";. c #D2B66B",
":. c #D0B56D",
">. c #DCBC6E",
",. c #D2B972",
"<. c #D7BE78",
"1. c #E9BE62",
"2. c #EEC05A",
"3. c #F0C25F",
"4. c #DEC26B",
"5. c #DDC27A",
"6. c #E0C167",
"7. c #E5C067",
"8. c #EBC463",
"9. c #EEC460",
"0. c #ECC364",
"q. c #E4C16B",
"w. c #E7C46B",
"e. c #E9C56C",
"r. c #E0C172",
"t. c #E5C575",
"y. c #E4C870",
"u. c #E6CA72",
"i. c #E6CA74",
"p. c #E8CB73",
"a. c #E9CE76",
"s. c #EBD07B",
"d. c #EED179",
"f. c #F5D478",
"g. c #F5D57C",
"h. c #F4D67C",
"j. c #F4D77E",
"k. c #DEC781",
"l. c #E0C883",
"z. c #E3CA89",
"x. c #E4CB8B",
"c. c #E3CD8A",
"v. c #E5CE8B",
"b. c #E3CC8E",
"n. c #E8D18D",
"m. c #F6D980",
"M. c #F7DB83",
"N. c #F3DA86",
"B. c #F7DA84",
"V. c #F6DB84",
"C. c #F7DB84",
"Z. c #F7DA86",
"A. c #F6DC85",
"S. c #F7DC85",
"D. c #F8DB85",
"F. c #FADD85",
"G. c #FBDE86",
"H. c #F5DE8B",
"J. c #FADD88",
"K. c #F9DF8B",
"L. c #E4CF93",
"P. c #E6CF92",
"I. c #E6D094",
"U. c #EAD597",
"Y. c #EBD698",
"T. c #EFDA99",
"R. c #F0DC9C",
"E. c #FCE089",
"W. c #FCE28B",
"Q. c #FDE28B",
"!. c #FCE38C",
"~. c #FCE28D",
"^. c #FCE38D",
"/. c #FDE38D",
"(. c #FEE38D",
"). c #FDE38E",
"_. c #FEE48D",
"`. c #FEE58F",
"'. c #FCE490",
"]. c #FDE490",
"[. c #FFE590",
"{. c #FFE690",
"}. c #FFE691",
"|. c #FEE791",
" X c #FFE692",
".X c #FFE792",
"XX c #FEE693",
"oX c #FFE693",
"OX c #FFE793",
"+X c #FEE897",
"@X c #F6E2A2",
"#X c #F7E3A2",
"$X c #FAE6A8",
"%X c #FBE7A9",
"&X c #FCE9AB",
"*X c #FDEAAC",
"=X c None",
/* pixels */
"[.[.[.[.[.3 f M m q [.[.[.[.[.[.",
"[.[.[.4 A 5.j.f.3.3.! 6 [.[.[.[.",
"[.[.9 %.h.%.D s n -.z.l.c % [.[.",
"[.1 1.g.S p i i C 6.7.W./.t [.[.",
"[._ U.Z e 7 7 y B | #.*.T.k.* [.",
", E.F.c.).).C.g K `.`.C.' x.r + ",
"d !.y.M.).j '.( ).L.h M I z.F + ",
"G (.t.M.'.'.C.j ).b.T Q O.d.R X ",
"k T.O.M.`.^ `.X.).V.;.! L i.E ",
"w I.6.c.'.).C.{ c.).).C.H d.v + ",
"[.,.u.~ } X.@.@.| .#.` V 2.5 ",
"[.x p.U J ] B.Z.9.) v a <.E o [.",
"[.[.Y s.-.[ 0.0.N.e.w.H.D.> + [.",
"[.[.2 &.).Y.A.S.L.`.]._.0 . [.[.",
"[.[.[.[.l r.Y.Q.~.J./ = $ [.[.[.",
"[.[.[.[.[.[.: 1 ; - & [.[.[.[.[."
"=X=X=X=X=X0 S G D i =X=X=X=X=X=X",
"=X=X=X9 6.).).).).).d.e =X=X=X=X",
"=X=Xu C.J.O.( h ( o.D.).J & =X=X",
"=X0 S.j.f 4 b.e P.K @.j.'.d % =X",
"=X4.).k a T Y.&.Y.R 2.2.F.S.- =X",
"e '.e.z ! v.&X,.k.*X:. .%.`.d # ",
"H +X^ I P =.*X9 j T.k.U ' F.-.% ",
"W '.` { } >.*X<.n.*XC b Y g.u.X ",
"W |.` { 3.t.&Xm C c.%Xa n m.u.. ",
"N '.9...@.r.&Xi A 5.*XM L W.~ . ",
"5 m.f._ *.#X&XR.#X%X:.v 0.'.7 # ",
"=XQ `.@.l t P.B I.u v { G.a.o =X",
"=X3 u.W.0.A z.V b.+.1.J.E., # =X",
"=X=X3 u.oXF.e.7.q.C.+XH.6 # =X=X",
"=X=X=X=XS s.'.'.'.C.~ ; * =X=X=X",
"=X=X=X=X=X=X1 1 > : = =X=X=X=X=X"
};

View File

@@ -1,226 +1,160 @@
/* XPM */
static const char * bitcoin20_xpm[] = {
/* columns rows colors chars-per-pixel */
"20 20 200 2",
" c #7B5500",
". c #7B5900",
"X c #735508",
"o c #7B5908",
"O c #7B5D08",
"+ c #7B5910",
"@ c #7B6118",
"# c #845D08",
"$ c #846108",
"% c #8C6510",
"& c #8C6910",
"* c #8C6918",
"= c #946D10",
"- c #947118",
"; c #9C7518",
": c #A57918",
"> c #846929",
", c #846D29",
"< c #947121",
"1 c #8C7539",
"2 c #947939",
"3 c #8C7542",
"4 c #AD8221",
"5 c #B58E29",
"6 c #B58E31",
"7 c #B59231",
"8 c #BD9231",
"9 c #BD9631",
"0 c #C69A31",
"q c #C69A39",
"w c #C69E39",
"e c #CE9E39",
"r c #CEA239",
"t c #948652",
"y c #A58A4A",
"u c #BD9642",
"i c #BD9A42",
"p c #B5964A",
"a c #B59A4A",
"s c #BD9E4A",
"d c #A58E5A",
"f c #BD9A52",
"g c #BD9E52",
"h c #BDA252",
"j c #BDA25A",
"k c #BD9E63",
"l c #A59673",
"z c #AD9A73",
"x c #AD9E7B",
"c c #BDA263",
"v c #BDA26B",
"b c #BDA273",
"n c #BDA673",
"m c #B5A27B",
"M c #BDAA7B",
"N c #C69E42",
"B c #CE9E42",
"V c #C6A242",
"C c #CEA242",
"Z c #CEA642",
"A c #C6A24A",
"S c #C6A64A",
"D c #CEA64A",
"F c #CEAA4A",
"G c #D6A642",
"H c #DEAE4A",
"J c #DEB24A",
"K c #C6A252",
"L c #C6A652",
"P c #CEAA52",
"I c #CEAE52",
"U c #C6A65A",
"Y c #C6AA5A",
"T c #CEAA5A",
"R c #CEAE5A",
"E c #D6AE52",
"W c #DEAE52",
"Q c #D6AE5A",
"! c #D6B252",
"~ c #DEB252",
"^ c #DEB652",
"/ c #D6B65A",
"( c #DEB65A",
") c #DEBA5A",
"_ c #EFBE52",
"` c #E7BA5A",
"' c #E7BE5A",
"] c #EFBE5A",
"[ c #C6A663",
"{ c #C6AE63",
"} c #CEAE63",
"| c #D6AE63",
" . c #CEB26B",
".. c #CEB66B",
"X. c #DEB663",
"o. c #D6BE63",
"O. c #DEBA63",
"+. c #DEBE63",
"@. c #D6B66B",
"#. c #DEB66B",
"$. c #D6BA6B",
"%. c #D6BE6B",
"&. c #DEBA6B",
"*. c #DEBE6B",
"=. c #D6BA73",
"-. c #DEBE73",
";. c #EFBE63",
":. c #E7BE73",
">. c #DEC37B",
",. c #E7C363",
"<. c #EFC763",
"1. c #EFCF63",
"2. c #E7C36B",
"3. c #E7C76B",
"4. c #EFC36B",
"5. c #EFC76B",
"6. c #E7CB6B",
"7. c #EFCB6B",
"8. c #F7CB63",
"9. c #F7CB6B",
"0. c #F7CF6B",
"q. c #FFCB6B",
"w. c #F7D36B",
"e. c #FFD36B",
"r. c #E7C373",
"t. c #E7CB73",
"y. c #EFCF73",
"u. c #E7C37B",
"i. c #E7C77B",
"p. c #E7CB7B",
"a. c #EFCB7B",
"s. c #F7CF73",
"d. c #EFD373",
"f. c #EFD37B",
"g. c #F7D373",
"h. c #FFD373",
"j. c #FFD773",
"k. c #FFDB73",
"l. c #F7DB7B",
"z. c #FFDF7B",
"x. c #ADA284",
"c. c #BDAA84",
"v. c #BDAE84",
"b. c #B5A68C",
"n. c #B5AE9C",
"m. c #BDB6A5",
"M. c #C6BA9C",
"N. c #C6BAA5",
"B. c #C6BEA5",
"V. c #DEC784",
"C. c #E7CB84",
"Z. c #E7CF84",
"A. c #EFCF84",
"S. c #E7CF8C",
"D. c #EFCF8C",
"F. c #EFD384",
"G. c #E7D38C",
"H. c #EFD38C",
"J. c #EFD78C",
"K. c #F7D784",
"L. c #FFD784",
"P. c #F7DB84",
"I. c #F7DF84",
"U. c #FFDB84",
"Y. c #FFDF84",
"T. c #F7DB8C",
"R. c #EFD394",
"E. c #EFD794",
"W. c #EFDB94",
"Q. c #EFDB9C",
"!. c #F7DB9C",
"~. c #F7DF9C",
"^. c #FFE384",
"/. c #FFE784",
"(. c #FFE38C",
"). c #FFEB8C",
"_. c #EFE79C",
"`. c #FFE794",
"'. c #FFEB94",
"]. c #FFEF94",
"[. c #FFEB9C",
"{. c #FFEF9C",
"}. c #FFF394",
"|. c #FFF794",
" X c #C6C3B5",
".X c #CEC7BD",
"XX c #F7E3A5",
"oX c #FFE7A5",
"OX c #F7EBA5",
"+X c #FFEBA5",
"@X c #FFEFA5",
"#X c #FFE7AD",
"$X c #FFEBAD",
"%X c #FFEFAD",
"&X c #FFF3AD",
"*X c #FFF7B5",
"=X c #FFFBB5",
"-X c #FFFFBD",
";X c #CEC7C6",
":X c None",
"20 20 134 2",
" c #735305",
". c #785706",
"X c #7E5C07",
"o c #755509",
"O c #76580D",
"+ c #7F6015",
"@ c #85620D",
"# c #89650D",
"$ c #836215",
"% c #886510",
"& c #8E6B11",
"* c #81641F",
"= c #906D19",
"- c #977116",
"; c #96741E",
": c #9B761E",
"> c #947424",
", c #9B7722",
"< c #9D7824",
"1 c #A47F23",
"2 c #A17D2A",
"3 c #A58125",
"4 c #AA8327",
"5 c #A4832F",
"6 c #AD862B",
"7 c #B28B2E",
"8 c #A58433",
"9 c #A88637",
"0 c #AD8932",
"q c #A78639",
"w c #A8893C",
"e c #B28C34",
"r c #B88E33",
"t c #B28E3A",
"y c #B79136",
"u c #BB9235",
"i c #BB9639",
"p c #C19836",
"a c #C29539",
"s c #C59C3C",
"d c #A88B41",
"f c #AF9045",
"g c #B49342",
"h c #BE9641",
"j c #BD9B44",
"k c #B29448",
"l c #B7994B",
"z c #B8994C",
"x c #C09946",
"c c #CB9E46",
"v c #C59D4C",
"b c #CFA246",
"n c #CBAB47",
"m c #CEA74A",
"M c #D4A749",
"N c #D6A94D",
"B c #C7A754",
"V c #CEA453",
"C c #C6AA56",
"Z c #CDA955",
"A c #CBAB5B",
"S c #D2AB54",
"D c #D2AE5E",
"F c #D9AE5A",
"G c #D7B356",
"H c #DDB35F",
"J c #DFB95A",
"K c #E1B554",
"L c #E4BA56",
"P c #E6BC5A",
"I c #E9BE5E",
"U c #C7AC64",
"Y c #CBAF64",
"T c #CDB166",
"R c #D4B364",
"E c #DBB463",
"W c #DFB867",
"Q c #D5B76B",
"! c #DFBA6F",
"~ c #D5BB76",
"^ c #D7BE79",
"/ c #E3BC64",
"( c #E8BF64",
") c #E0BB68",
"_ c #DECA7A",
"` c #EBC265",
"' c #EBC36B",
"] c #EFC96B",
"[ c #F1C564",
"{ c #F3CB6A",
"} c #F9CD6C",
"| c #FAD16C",
" . c #E5C770",
".. c #EEC774",
"X. c #E6CE7E",
"o. c #EFCE7A",
"O. c #F1CB73",
"+. c #F4CE7A",
"@. c #F3D273",
"#. c #FCD574",
"$. c #FEDA76",
"%. c #F5D47D",
"&. c #FAD47B",
"*. c #F2D97D",
"=. c #FCDA7A",
"-. c #DDC784",
";. c #E1CA86",
":. c #E4CE8B",
">. c #ECD985",
",. c #E7D18E",
"<. c #F4DC84",
"1. c #FCDC81",
"2. c #F4DB8B",
"3. c #FBDF8B",
"4. c #EBD592",
"5. c #EFDA99",
"6. c #F1DD9C",
"7. c #F6E081",
"8. c #FDE484",
"9. c #FFEA87",
"0. c #F9E488",
"q. c #FEE88D",
"w. c #F9E394",
"e. c #FFEB93",
"r. c #FEE698",
"t. c #FEEA9B",
"y. c #FFF49A",
"u. c #F7E4A4",
"i. c #F9E5A5",
"p. c #FCE9AA",
"a. c #F7F0AA",
"s. c #FEF1AE",
"d. c #FEF6B3",
"f. c None",
/* pixels */
":X:X:X:X:X:XM.v f i g k c..X:X:X:X:X:X:X",
":X:X:X:XM.u H 8.j.j.e.0.^ 7 d X:X:X:X:X",
":X:X:Xn Z 0.k.j.8._ ] 9.h.h.~ ; b.:X:X:X",
":X:Xn J j.j.' C 0 0 w E a.K.^.d.- x.:X:X",
":XN.F k.w.G w q 0 0 D 2.i.a.].|.6.$ m.:X",
":Xg (.U.C 9 8 8 8 q S *.H.f.y.].).9 , :X",
"B.o.{.p.-.>.>.>.R 7 N =.G.E.Z.&./.1.# n.",
"M I.[.| R.$X..~.#Xs V.$XG.h @.T l.z.; t ",
"c {.'.X.E.$Xj G.$XU #X$Xg ) ! ( 0.k.5 > ",
"j }.`.O.E.$XE.oXC.p $X$XA ,.' ;.5.j.9 o ",
"j ).I.Q E.$X .Q.#X .$X$XP 7.` W 4.j.8 X ",
"c z.Y.P R.$X[ S.$X{ XX$X$.) P D 5.h.4 @ ",
"v.<.Y.I R.$XW.oXXX} @.XX#XE.XXK 8.8.& 3 ",
".XC j.3.s a h Y .J.A.T Y h 6 e 8.H . x ",
":Xk <.g./ P #.i.F.A.r.X.E B r 9.q.: + :X",
":X.Xi s.g.+.O.r.i.u.i.u.:.r.L.L.N l :X",
":X:XN.V U.(.T.a.i.C.D.!.%X-X=X%.# 1 :X:X",
":X:X:XN.g _.+X`.[.+X@X&X*XOXh O 1 :X:X:X",
":X:X:X:X;Xb i +.f.P.K.t.L = o z :X:X:X:X",
":X:X:X:X:X:X.Xm y < % * 2 x :X:X:X:X:X:X"
"f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.",
"f.f.f.f.f.f.f.0 y i i 0 , f.f.f.f.f.f.f.",
"f.f.f.f.3 p P | $.| } { I p ; f.f.f.f.f.",
"f.f.f.4 L | $.{ L K L ` =.#.` 3 $ f.f.f.",
"f.f.6 [ $.{ M a Q 0 Q S ' %.q.*.6 o f.f.",
"f.3 ' $.P i u r ,.< :.S +.%.0.y.*.& f.f.",
"f.C e.%.c x T Y 6.U 5.T R @.#.0.9.n . f.",
"f.>.t.W F A ^ p.u.~ -.p.i.C { { =.@.# f.",
"e e.3.E H / j p.6.0 V ~ p.Y ( ` #.$.3 o ",
"j p.2.( ( ! Z p.6.l R 6.6.t I I { #.y o ",
"j e.1.( ! +.H i.i.-.:.i.u.R N K ` #.u ",
"i 9.&.( ..1.) p.6.8 j w p.p.h N ' #.7 ",
"4 =.7.` ....Z p.6.g D T p.i.t M [ } - o ",
"f.J =.{ ` E i.p.p.i.p.p.6.k u M } K @ o ",
"f.7 @.@./ S z f 4.d ,.q 2 r a ( { 6 f.",
"f.f.m @.O.( / V 4.q :.v V V O.&.G X O f.",
"f.f.: G 1.0.+.W R D R ! 4.d.d._ # f.f.",
"f.f.f.2 C a.i.r.w.w.i.s.d.p.Y @ f.f.f.",
"f.f.f.f.f.5 Z .<.3.2.X.A > . f.f.f.f.",
"f.f.f.f.f.f.f.> > = # $ + f.f.f.f.f.f.f."
};

View File

@@ -1,223 +1,232 @@
/* XPM */
static const char * bitcoin32_xpm[] = {
/* columns rows colors chars-per-pixel */
"32 32 185 2",
" c #715103",
". c #725203",
"X c #725204",
"o c #735304",
"O c #745404",
"+ c #765504",
"@ c #775504",
"# c #785604",
"$ c #795704",
"% c #795705",
"& c #77580A",
"* c #77580B",
"= c #77580C",
"- c #785808",
"; c #785809",
": c #78590D",
"> c #795A0D",
", c #7F5E0D",
"< c #7C5C0E",
"1 c #815F0E",
"2 c #89650F",
"3 c #8C670F",
"4 c #8D680F",
"5 c #836110",
"6 c #866410",
"7 c #8F6A11",
"8 c #926C12",
"9 c #946F14",
"0 c #967015",
"q c #987217",
"w c #997318",
"e c #9A751C",
"r c #9B761E",
"t c #9C7720",
"y c #9D7924",
"u c #9D7B28",
"i c #9E7C2C",
"p c #A07F31",
"a c #AA852D",
"s c #A9852E",
"d c #AC872D",
"f c #AE892E",
"g c #AF8A2E",
"h c #B08B2F",
"j c #A18133",
"k c #A78533",
"l c #A28235",
"z c #A48435",
"x c #A68535",
"c c #A58536",
"v c #A68536",
"b c #A88530",
"n c #B18C30",
"m c #B18D33",
"M c #B08D37",
"N c #B08F3B",
"B c #B08F3D",
"V c #BC9537",
"C c #BE9736",
"Z c #BF9737",
"A c #B6933B",
"S c #B0903F",
"D c #B2913E",
"F c #B4923D",
"G c #B99438",
"H c #C09736",
"J c #C19835",
"K c #C29836",
"L c #C39937",
"P c #C39A37",
"I c #C49B38",
"U c #C59C3A",
"Y c #C69D3B",
"T c #C79E3C",
"R c #C89F3D",
"E c #CAA03F",
"W c #C6A247",
"Q c #CAA140",
"! c #C9A242",
"~ c #C8A245",
"^ c #C2A14B",
"/ c #C3A24D",
"( c #C3A24F",
") c #C2A351",
"_ c #C1A352",
"` c #C0A355",
"' c #C1A457",
"] c #C1A458",
"[ c #C1A55A",
"{ c #C2A65C",
"} c #C3A75D",
"| c #C3A85E",
" . c #C6AA5D",
".. c #C7AA5D",
"X. c #C5A95E",
"o. c #CFAE5A",
"O. c #C8AB5E",
"+. c #D4AF56",
"@. c #D1AE58",
"#. c #D6B056",
"$. c #D8B155",
"%. c #D9B256",
"&. c #DAB357",
"*. c #DBB457",
"=. c #DDB558",
"-. c #DFB759",
";. c #E2BB5B",
":. c #E3BC5D",
">. c #E4BD5E",
",. c #C9AC61",
"<. c #C9AD62",
"1. c #CAAE62",
"2. c #CCAF62",
"3. c #DDBC69",
"4. c #DFBD68",
"5. c #DCBB6E",
"6. c #DCBC6C",
"7. c #DBBC70",
"8. c #DABD72",
"9. c #DBBE74",
"0. c #E4BD61",
"q. c #E4BE60",
"w. c #E3BE65",
"e. c #E2BF66",
"r. c #DDC177",
"t. c #DFC279",
"y. c #EFCB6F",
"u. c #F1CA6B",
"i. c #F4CB6A",
"p. c #F5CC6A",
"a. c #F7CD6B",
"s. c #F0CA6D",
"d. c #F7CF6E",
"f. c #EFCD72",
"g. c #EFCE77",
"h. c #E0C47B",
"j. c #E3C77E",
"k. c #E4C87F",
"l. c #F7D070",
"z. c #F8D171",
"x. c #F8D272",
"c. c #FAD473",
"v. c #FBD676",
"b. c #FCD574",
"n. c #FCD674",
"m. c #FCD777",
"M. c #F0D17E",
"N. c #FCD778",
"B. c #FCDA7A",
"V. c #FDDC7C",
"C. c #FDDE7E",
"Z. c #E6CA80",
"A. c #E8CC83",
"S. c #EACD84",
"D. c #ECD086",
"F. c #EFD286",
"G. c #EED287",
"H. c #F0D283",
"J. c #FDDF80",
"K. c #F6DF91",
"L. c #F5DE92",
"P. c #F4DE95",
"I. c #F4DF98",
"U. c #FDE081",
"Y. c #FCE184",
"T. c #FBE188",
"R. c #FAE18B",
"E. c #F8E08D",
"W. c #F5E19B",
"Q. c #F5E29C",
"!. c #F7E49D",
"~. c #F9E69B",
"^. c #FBE89B",
"/. c #FDEB9B",
"(. c #FDEC9B",
"). c #FEEE9B",
"_. c #FEEF9C",
"`. c #FEEEA3",
"'. c #FDEBA9",
"]. c #FDEBAC",
"[. c #FDEBAD",
"{. c #FDECAD",
"}. c #FDF0B0",
"|. c #FDF2B1",
" X c None",
"32 32 194 2",
" c #745305",
". c #785704",
"X c #7C5903",
"o c #75560B",
"O c #77590F",
"+ c #7C5C0B",
"@ c #795B12",
"# c #7F631D",
"$ c #825E07",
"% c #825F0B",
"& c #85610A",
"* c #8C660C",
"= c #8E680E",
"- c #916B0F",
"; c #856515",
": c #8B6714",
"> c #8F6A16",
", c #816218",
"< c #88691C",
"1 c #926D12",
"2 c #936F1C",
"3 c #997417",
"4 c #94721E",
"5 c #9B761C",
"6 c #9F781C",
"7 c #A17B1E",
"8 c #826622",
"9 c #916E20",
"0 c #967425",
"q c #9D7420",
"w c #9C7923",
"e c #997728",
"r c #99792C",
"t c #A37D23",
"y c #A37F2C",
"u c #A68125",
"i c #AB8225",
"p c #A5832B",
"a c #AA852C",
"s c #B28A2C",
"d c #A58233",
"f c #AC8734",
"g c #AE8C33",
"h c #AC8C3C",
"j c #B28C33",
"k c #B98E34",
"l c #B28D3D",
"z c #B59136",
"x c #BC9335",
"c c #B3913E",
"v c #BC933A",
"b c #BF9A3D",
"n c #C19235",
"m c #C2953C",
"M c #C39B3C",
"N c #CA9C3D",
"B c #B59343",
"V c #BE9642",
"C c #B69A44",
"Z c #BD9A45",
"A c #B49649",
"S c #BB9A49",
"D c #BB9F52",
"F c #BFA256",
"G c #C49C43",
"H c #CA9D41",
"J c #C59D4A",
"K c #C99E4D",
"L c #C3A144",
"P c #CDA244",
"I c #CFAA47",
"U c #C3A14D",
"Y c #CDA24A",
"T c #CCAB49",
"R c #D2A644",
"E c #D2A54B",
"W c #D6AA4C",
"Q c #DAAE4E",
"! c #DAB04F",
"~ c #C7A656",
"^ c #CDA452",
"/ c #CFAC52",
"( c #C0A65E",
") c #CEA75A",
"_ c #CCAC59",
"` c #D2AB53",
"' c #DCAF52",
"] c #D6AD5A",
"[ c #D9AE5B",
"{ c #DCB556",
"} c #DFB855",
"| c #D6B25F",
" . c #DCB35C",
".. c #DEBE5E",
"X. c #E2B656",
"o. c #E1B55A",
"O. c #E6BC5D",
"+. c #E9BD5E",
"@. c #C3AA63",
"#. c #CCAD62",
"$. c #D4AF62",
"%. c #CDB565",
"&. c #CEB46D",
"*. c #D7B164",
"=. c #DBB362",
"-. c #D6BD64",
";. c #DDBA64",
":. c #D3B66C",
">. c #DFB86B",
",. c #CEB772",
"<. c #D0B771",
"1. c #D4BA73",
"2. c #D9BE77",
"3. c #D6BE79",
"4. c #D8BF7A",
"5. c #E4BB62",
"6. c #E9BF64",
"7. c #E4BC69",
"8. c #E9BF69",
"9. c #E0BB71",
"0. c #E9C05E",
"q. c #D2C279",
"w. c #DBC27C",
"e. c #E2C667",
"r. c #EDC364",
"t. c #E3C16E",
"y. c #ECC46C",
"u. c #EDCC6C",
"i. c #F1C764",
"p. c #F5CA66",
"a. c #F9CD67",
"s. c #F5CC6A",
"d. c #F9CD6B",
"f. c #FBD36F",
"g. c #EDC572",
"h. c #E5CF77",
"j. c #ECCA74",
"k. c #E0C67E",
"l. c #EFCE78",
"z. c #F6CE72",
"x. c #FBCF71",
"c. c #F4CE79",
"v. c #F4D273",
"b. c #FCD473",
"n. c #F4DC75",
"m. c #FEDA74",
"M. c #F6D77C",
"N. c #FBD47A",
"B. c #F1DA7B",
"V. c #FDDA7C",
"C. c #FEE27D",
"Z. c #DDC683",
"A. c #DFC884",
"S. c #E4CA84",
"D. c #E3CC89",
"F. c #E7D183",
"G. c #EFD280",
"H. c #EFDC82",
"J. c #ECD48D",
"K. c #EFDA8C",
"L. c #F9D783",
"P. c #F2DF83",
"I. c #FCDB83",
"U. c #F5DC8F",
"Y. c #FADD8B",
"T. c #EBD593",
"R. c #EFDA99",
"E. c #F3DD93",
"W. c #F3DF9F",
"Q. c #FFE385",
"!. c #FEE986",
"~. c #FDE48C",
"^. c #FEEC8E",
"/. c #ECE199",
"(. c #F6E591",
"). c #FEE494",
"_. c #FEEB93",
"`. c #FEE69A",
"'. c #FFEB9B",
"]. c #FFF197",
"[. c #FFF39B",
"{. c #FEF99B",
"}. c #F6E2A2",
"|. c #F9E5A5",
" X c #F7E9A5",
".X c #FEECA4",
"XX c #FBE7A8",
"oX c #FDEAAB",
"OX c #F7F2AA",
"+X c #FEF2AC",
"@X c #FDF4B4",
"#X c #FFFABA",
"$X c #FFFEC2",
"%X c None",
/* pixels */
" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X",
" X X X X X X X X X X X Xc F z z F z j X X X X X X X X X X X X X",
" X X X X X X X X Xz b V ~ %.;.u.e.-.! f e i X X X X X X X X X X",
" X X X X X X Xz d ! >.a.l.B.v.c.a.a.a.a.>.R w 6 X X X X X X X X",
" X X X X X Xb L q.a.n.c.n.n.c.a.i.i.a.a.z.z.>.m 3 5 X X X X X X",
" X X X X Xs +.a.c.n.B.c.>.#.E E ! +.>.n.J.v.z.z.~ 8 & X X X X X",
" X X X Xs %.c.n.B.l.*.E Y L L L L W +.r.Z.H.Y.Y.R.+.7 ; X X X X",
" X X Xk %.n.J.n.>.! Y Y I L L L T *.w.h.7.5.K.).).).W 6 = X X X",
" X Xj T V.B.n.;.L L L I L L L Y ~ *.s.Z.G.D.B._._._.Y.h % > X X",
" X Xm H.R.Y.0.L H H L L C V C Y ! ..8.G.E.H.M.g._._.Y.q.8 o X X",
" Xj o.)./.K.@.^ A F M N M s n C W ) { <.9.9.2.X.#./.Y.C.m % > X",
" XM D.)._.t.,.[.[.[.[.{.[.W.A G C O.I.[.[.[.[.{.5.y.Y.B.*.2 o X",
" XA /.).~.%.{ [.[.[.| D.[.[.I.b ,.[.[.[.j.) ' D.5.@.Y.V.a.w . X",
"i O.).).E.3.X.[.[.[.S X.[.[.'.i Q.[.{.D.z X.~ A ) %.B.V.n.s + = ",
"z 6._._.R.w.<.[.[.[.S <.[.[.I.F [.[.[.X.) 0.>.;.>.>.l.B.n.C % > ",
"z e._._.H.e.,.[.[.[.j.W.[.D.S { [.[.].' -.>.>.>.e.0.s.N.n.Y % & ",
"v s.)._.M.3.O.[.].].W.'.[.].{ { [.[.[.' 3.e.;.;.%.-.s.N.n.R # . ",
"z ;.T.E.g.-.{ [.].].S <.[.{.].` [.[.[.<.e.f.e.*.$.$.s.V.n.L $ O ",
"j o.Y.Y.g.+.] {.].]._ | [.[.[.F ].[.[.A.) y.e.@.W @.s.N.n.h $ = ",
" XZ J.Y.N.@.' [.[.].F 7.[.[.].z h.[.[.].7.^ ^ 5.2.U z.z.a.r X = ",
" Xs n.V.Y.+.` [.[.].].].{.{.9.2...A.{.[.[.[.].[.2.! a.u.;.3 = ",
" XF *.m.B.s.^ X.,.{ ,.<.1.] 2.G.D.O.` 2.9.7.2.^ d ;.u.a.K $ X X",
" X Xm z.c.v.o.^ ^ ^ { <.7.Z.K.K.H.Z.6.o.^ A f h E a.i.0.w X = X",
" X Xz #.l.z.f.X.O.<.5.t.Z.D.D.A.j.7.*.@.^ ! Y ! i.a.a.Y , X X X",
" X X Xd u.l.z.y.o.o.3.r.j.Z.h.r.9.5.%.%.#.+.#.c.B.z.-.8 . & X X",
" X X Xj m f.c.v.l.s.3.4.h.t.r.k.D.G.H.D.A.D./.!.E.M.y + X X X X",
" X X X Xj Z v.J.T.R.E.Z.7.t.Z.A.S.H.D.Q.|.|.|.|.!.b % . X X X X",
" X X X X Xj A D.|.`.~.~.!.E.I.I.Q.{.|.|.|.|.|.D.u % X < X X X X",
" X X X X X Xj z 9.{.`.~.~.^././.`.`.`.}.|.Q.] 9 $ X X X X X X X",
" X X X X X X X Xj s X.k.Y.R.~.~./.~.K.h.) e , . = X X X X X X X",
" X X X X X X X X X X9 w t n A C A s r 3 $ X > X X X X X X X X X",
" X X X X X X X X X X X X X5 2 1 $ ; 5 5 5 X X X X X X X X X X X"
"%X%X%X%X%X%X%X%X%X%X%X%Xp t 6 5 w t w %X%X%X%X%X%X%X%X%X%X%X%X%X",
"%X%X%X%X%X%X%X%X%Xu u x I X.0.s.u.0.W x 7 4 %X%X%X%X%X%X%X%X%X%X",
"%X%X%X%X%X%X%Xy i I i.a.f.m.m.b.f.s.a.s.i.W 7 > %X%X%X%X%X%X%X%X",
"%X%X%X%X%X%Xt M 0.a.m.m.m.m.f.d.p.p.p.f.d.f.i.b 1 < %X%X%X%X%X%X",
"%X%X%X%X%X7 ! d.f.f.m.f.+.W P R I Q 5.v.V.V.z.f.{ 5 + %X%X%X%X%X",
"%X%X%X%Xu X.f.m.m.f.' H s ~ V y _ Z J o.g.L.L.Q.!.e.5 X %X%X%X%X",
"%X%X%Xu X.b.C.m.+.N m n t }.3.> }.w.V 5.y.y.Y.[.^.^.-.1 + %X%X%X",
"%X%Xt P m.N.m.X.v v v k 6 }.1.: /.4.c 7.N.N.v.!.{.{.^.L & %X%X%X",
"%X%Xg Y.Y.V.+.m k a t t : }.1.% }.1.r | l.B.M.b.!.{.^.n.7 X %X%X",
"%Xp -._.'.Y.' Y n D.}.}.|.oXXX|.oX XT.w.F _ j.v.v._.^.C.T & @ %X",
"%Xa (.'.'.9.[ [ K S.}.oXoXoXoXXXoXoXoXoX XD / s.d.v.!.C.v.3 o %X",
"%XU '.'.Y.[ [ [ [ J f <.oXoX( 2 f S J.oXoXT.j r.s.i.C.C.C.z X %X",
"p e.'.'.F. .=.=.=.=.) 1.oXoX@.f . .F oXoX}.a +.i.i.b.C.m.I X O ",
"u w.'.[.j.5.8.7.7.7.] 2.oXoX@.y W c &.oXoXZ.k r.s.i.s.V.m.} = o ",
"u H.[.{.y.8.y.g.8.g.7.2.oXoXA.@.&.D.oXoXT.e G +.O.O.5.V.m.0.- o ",
"u !.].[.r.8.y.g.g.g.7.4.oXoXoXoXoXoXoXoXoX<.y W X.o.o.m.m.0.- o ",
"u B._._.5.5.8.y.g.c.g.w.oXoX,.h A F <..XoXoX1.k ' ' ' V.N.r.- ",
"u u.Q.~.r.6.z.N.V.I.v.k.oXoX@.B | _ c 1.oXoX}.a ' ' O.I.b.O.= o ",
"u ..Q.Q.v.i.s.c.N.L.l.Z.oXoX@.B t.=.S &.oXoXXXy Y R +.N.b.Q % o ",
"t T C.I.I.6.u.z.z.5.S 1.oXoX@.e B h D |.oXoXS.f Y Y 6.d.d.n X O ",
"%Xs m.V.Q.r.r.z.5.<.}.oXoXoXXXW.}.oXoXoXoXW.h G H R a.p.s.7 %X",
"%X7 O.V.V.v.+.r.` 4.oXoXoXoXoXoXoXoXXXR.<.h v N N o.a.p.Q = %X",
"%Xw x v.v.v.r.+. .Z l d e }.Z.r }.3.d l V G n n R a.s.a.s X O %X",
"%X%X6 { v.l.v.+.O.5.=.^ d }.4.9 }.1.f J G m m G d.d.x.Q = %X%X",
"%X%X%Xs u.v.v.v.r.6.o. .l }.4.9 W.4.l ^ ^ J ) c.N.N.y.7 X O %X%X",
"%X%X%X5 z v.v.M.I.g.;. .J 1.#.B 1.#.) 7.$.S..X'.W.Y.j $ %X%X%X",
"%X%X%X%X5 b N.Y.~.).Y.j.5.$.=.=.$.*.2.J.@X$X#X#XoXC $ %X%X%X%X",
"%X%X%X%X%X3 z U.@X+X`.`.`.(.E.E.E.|.@X@X#X#X#X/.j % %X%X%X%X%X",
"%X%X%X%X%X%Xw a q.OX|.).`._.'.'.XX.X.X+X+X X%.w X o %X%X%X%X%X%X",
"%X%X%X%X%X%X%X%Xw a _ j.~.~.).).`.`.`.F._ t & . # %X%X%X%X%X%X%X",
"%X%X%X%X%X%X%X%X%X%X4 3 t z L U Z z t 1 $ . 8 %X%X%X%X%X%X%X%X%X",
"%X%X%X%X%X%X%X%X%X%X%X%X%X< ; & + + , 8 %X%X%X%X%X%X%X%X%X%X%X%X"
};

View File

@@ -1,278 +1,277 @@
/* XPM */
static const char * bitcoin48_xpm[] = {
/* columns rows colors chars-per-pixel */
"48 48 224 2",
" c #715103",
". c #735203",
"X c #735204",
"o c #745405",
"O c #755506",
"+ c #775606",
"@ c #785707",
"# c #7A5806",
"$ c #7C5905",
"% c #7D5A05",
"& c #7E5B05",
"* c #7F5C07",
"= c #7E5C0A",
"- c #7B5C11",
"; c #7C5D13",
": c #7D5E15",
"> c #805C05",
", c #805C06",
"< c #8B6813",
"1 c #8D6912",
"2 c #8F6A12",
"3 c #896816",
"4 c #806219",
"5 c #82631A",
"6 c #876719",
"7 c #84651B",
"8 c #906C13",
"9 c #916D15",
"0 c #936F18",
"q c #94701B",
"w c #95721B",
"e c #98731A",
"r c #99741B",
"t c #99751E",
"y c #9A761F",
"u c #9B7822",
"i c #9F7A21",
"p c #9D7922",
"a c #A27C20",
"s c #A47E21",
"d c #A67F22",
"f c #9E8038",
"g c #9E803B",
"h c #9E813C",
"j c #9F833D",
"k c #A68023",
"l c #A78124",
"z c #A98326",
"x c #AA8427",
"c c #A7832B",
"v c #A7832C",
"b c #A6832D",
"n c #A98429",
"m c #A8842B",
"M c #AD892F",
"N c #AE8A2F",
"B c #AF8A2F",
"V c #B28B2E",
"C c #B48C2E",
"Z c #B68E2F",
"A c #B78E2F",
"S c #A38232",
"D c #A08136",
"F c #AC8931",
"G c #AB8934",
"H c #AA8836",
"J c #AA8937",
"K c #A1843F",
"L c #A2853F",
"P c #AB8A39",
"I c #AB8B3A",
"U c #AD8C3C",
"Y c #AE8E3E",
"T c #B89030",
"R c #BA9131",
"E c #BC9332",
"W c #BE9533",
"Q c #C09733",
"! c #C29834",
"~ c #C39934",
"^ c #C39935",
"/ c #C39A37",
"( c #C39A38",
") c #C49A38",
"_ c #C49B38",
"` c #C59C3A",
"' c #C69E3C",
"] c #C69E3E",
"[ c #C79F3F",
"{ c #A48640",
"} c #A58741",
"| c #A68842",
" . c #A78A43",
".. c #AA8D45",
"X. c #AD9046",
"o. c #B19040",
"O. c #B59443",
"+. c #B29447",
"@. c #B79745",
"#. c #B79847",
"$. c #B89846",
"%. c #B69748",
"&. c #C8A040",
"*. c #CAA241",
"=. c #CBA343",
"-. c #C9A346",
";. c #CBA445",
":. c #C7A44D",
">. c #C5A44F",
",. c #C9A448",
"<. c #C9A44A",
"1. c #C5A551",
"2. c #C4A554",
"3. c #CBAA57",
"4. c #CDAA57",
"5. c #C3A559",
"6. c #C4A65A",
"7. c #C7A85A",
"8. c #D0AB55",
"9. c #D2AD56",
"0. c #D4AE57",
"q. c #D4AF58",
"w. c #D5B05A",
"e. c #D5B15C",
"r. c #D5B25E",
"t. c #DFB65A",
"y. c #DEB75B",
"u. c #E1B759",
"i. c #E2B95B",
"p. c #E4BA5C",
"a. c #E4BC5F",
"s. c #D4B567",
"d. c #D8B764",
"f. c #D5B769",
"g. c #D4B76A",
"h. c #D4B86B",
"j. c #E5BD61",
"k. c #E6BE62",
"l. c #E6BF63",
"z. c #E0BF6F",
"x. c #E7C063",
"c. c #EAC263",
"v. c #EDC563",
"b. c #EBC364",
"n. c #EEC565",
"m. c #EEC767",
"M. c #E1C06F",
"N. c #EBC76D",
"B. c #EEC869",
"V. c #F7CD6A",
"C. c #F6CD6B",
"Z. c #F4CE6F",
"A. c #F8CD6A",
"S. c #F9CF6E",
"D. c #FAD16F",
"F. c #E1C071",
"G. c #E4C370",
"H. c #E1C174",
"J. c #E0C276",
"K. c #E1C377",
"L. c #E8C670",
"P. c #E2C479",
"I. c #E0C47A",
"U. c #E2C57C",
"Y. c #E3C77E",
"T. c #F3D073",
"R. c #FBD270",
"E. c #FCD572",
"W. c #FCD674",
"Q. c #FDD774",
"!. c #FED876",
"~. c #FED977",
"^. c #F2D278",
"/. c #F1D37B",
"(. c #FDDA78",
"). c #FDDB7A",
"_. c #FDDB7C",
"`. c #FDDD7D",
"'. c #FDDF7F",
"]. c #E4C880",
"[. c #E6CA83",
"{. c #E7CD86",
"}. c #E9CF89",
"|. c #EBD089",
" X c #EFD289",
".X c #F2D382",
"XX c #F0D387",
"oX c #FDDF80",
"OX c #FCDF84",
"+X c #FBDF89",
"@X c #F9DE8B",
"#X c #FBE08B",
"$X c #FBE28C",
"%X c #FCE48F",
"&X c #FDE592",
"*X c #FEE692",
"=X c #FEE693",
"-X c #FEE895",
";X c #FEEA96",
":X c #FEEC97",
">X c #FEEE98",
",X c #FEEE99",
"<X c #FEEE9A",
"1X c #FDEB9C",
"2X c #FCE99E",
"3X c #F7E4A4",
"4X c #FAE7A1",
"5X c #F8E5A3",
"6X c #F8E5A5",
"7X c #F8E5A6",
"8X c #F9E6A7",
"9X c #FCE8AA",
"0X c #FDEAAC",
"qX c #FDEBAC",
"wX c #FDECAC",
"eX c #FDEDAC",
"rX c #FDEEAD",
"tX c #FDF2B1",
"yX c #FDF4B3",
"uX c #FEF6B5",
"iX c #FEF8B7",
"pX c #FEF9B8",
"aX c #FEF8B9",
"sX c None",
/* pixels */
"sXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsX",
"sXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXh ..X.........X...p sXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsX",
"sXsXsXsXsXsXsXsXsXsXsXsXsXsXsX .P m l l l n V W R M z s p u K sXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsX",
"sXsXsXsXsXsXsXsXsXsXsXsXsX .m l n _ q.l.C.A.E.(.`.!.m.u.-.B d q 1 3 sXsXsXsXsXsXsXsXsXsXsXsXsXsX",
"sXsXsXsXsXsXsXsXsXsXsX .n z W u.V.V.A.R.!.!.W.E.S.S.A.A.C.C.p.[ k e = 6 sXsXsXsXsXsXsXsXsXsXsXsX",
"sXsXsXsXsXsXsXsXsXsXG l R p.C.A.E.E.W.(.(.(.E.A.C.C.C.A.C.C.A.D.m.` s 1 * sXsXsXsXsXsXsXsXsXsXsX",
"sXsXsXsXsXsXsXsXg n n 9.C.V.A.E.!.(.(.!.!.R.A.V.C.C.C.A.C.S.D.R.D.V.i.M r & ; sXsXsXsXsXsXsXsXsX",
"sXsXsXsXsXsXsXL n C k.C.R.R.R.(.oXW.R.v.i.w.=.=.9.u.p.B.T.W._.(.W.Z.V.V./ p & # sXsXsXsXsXsXsXsX",
"sXsXsXsXsXsXL z R m.S.D.W.(.W.W.m.u.=._ ~ ~ ! ! ! ` ] <.y./.%X+X!.^.E.'.'.<.a * + sXsXsXsXsXsXsX",
"sXsXsXsXsXh n R m.R.!.!.!.(.A.0.*.=._ _ ~ Q / ! ! ] -.0.z.G.z.[.#X#X%X*X&X%X;.r * O sXsXsXsXsXsX",
"sXsXsXsXsXm Z C.R._.oX!.S.p.;.[ ] _ _ _ ~ ~ ^ _ ( -.w.a.N.U.z.s.M.*X>X>X:X:X%X' 0 O # sXsXsXsXsX",
"sXsXsXsXG n m.(.!.(.(.S.;.] [ _ ` _ ^ ^ ! Q ^ _ ` 9.k.M.U.K.U.H.U./.>X>X>X>X>X#XV < . - sXsXsXsX",
"sXsXsXh n w._._.(.W.S.;._ _ _ / _ _ _ _ Q Q / ` [ 9.d.G.H.|.XX@X#X#X).:X>X>X>X>Xm.a > sXsXsXsX",
"sXsXsXG @.#X+XOX_.R.8._ _ _ _ ! ^ _ ) ! W W _ ] [ <.r.h.{.@X6X&X#X#X).).>X>X>X;X#X' 8 + + sXsXsX",
"sXsXL M H.;X=X&X#Xk.] E R T Z T A A A A R E _ ` &.<.4.F.Y.[.U.H.z.h.z.L.^.>X>X;X'.m.k > : sXsX",
"sXsXP @.,X,X1X;X+X3.%.o.G H F m m b b a s z E _ [ 1.2.2.2.7.h.h.h.h.2.$.1.^.;X#X'.).` 2 . + sXsX",
"sXsXF f.<X1X1X;Xz.@.7X9XqXqXqXqX9X0X0X7XH.b F / -.$.+.U.3XqXqXqX0X0X0X3XH.1.%X#X`.'.c.y # sXsX",
"sX .F $X<X1X1X$Xr.Y 7XqXqXqXqXqX0X0X0X0XwX Xc W O.1.3X0XqXqXqXqX0X0X0X0X}.o.N.).`.`.`.B * - sX",
"sXP #.,X<X1X1X.Xr.P 7XqXqXqXqX6.{ 8X0X0X0X0X2.m @.6X0XwXqXqX X@.S Y s.6X{.Y y.#X'.`.`.*.2 . o sX",
"sXF q.,X<X1X,XL.r.U 7XqXqXqXqX5.6 |.0XwXwXwXh.u |.qXwX0XqX3Xf Y #.$.F P s.] w.(.'.`.~.y.w + X sX",
"sXM M.,X<X<X;XL.s.o.6X0XqXqXqX6.q U.0XwX0XwX7. .0X0XwX0XqX5.P 9.y.y.4.<.<.q.u.Z.'.).!.v.i $ - ",
"h M /.,X<X<X=XN.z.O.6X0XqXqXqX6.2 |.wX0X0X0X+.5.wXwX0XwXqXG :.k.k.p.a.a.k.k.k.B.`.~.E.V.k $ - ",
"| B OX,X<X<X$XT.z.O.6X0XqXqXqXh.X.0X0XwX0X].q h.0XwXwX0X6XS 4.b.l.c.c.m.m.c.k.c.`.E.E.E.k & . = ",
"| M $X:X<X,X+XT.z.O.6XwXqXqXqX0XwXwX0X9X5.q u U.wX0X0X0X6XS 0.b.k.p.i.k.k.p.p.k.).~.E.E.x * . + ",
"L M #X;X>X>X/.L.d.o.6X0X0XwXwX0X0XwXwX0X9XI.u I.0XwXqXqX3XG r.B.c.i.u.u.u.u.y.p.`.!.E.E.x * X ",
" .n ^.&X;X;X.Xx.d.Y 6X0XwX0X0X5.u 3X0XwXwX9X5.h.wX0XqXqX6XP d.T.N.c.i.u.y.0.0.k.(.!.W.E.k * X ",
"L x C.'.*X&X^.j.r.P 7XqX0XwX0X6.0 I.wX0XwX0XI.@.0XqXqXqX0X+.q.T.T.N.a.y.9.8.9.l._.!.!.D.s $ - ",
"sXx k.#X#X$X.Xy.8.G 3XqXwX0XwX7.u I.0XwX0XwX}.u qXqXqXqX0Xh.$.G.T.N.p.9.-.-.8.N._.!.E.b.i # X : ",
"sXc 9.'.'.#X'.y.4.H 7XqX0XwX0X6.q ].9XwX0XwXU.u {.0XwX0XwX8X%.#.w.4.$.#.f.W -.Z.W.R.R.y.r O = ",
"sXN _ '.'.'.#Xx.3.P 7XqXwX0XwXh.+.8XwX0X0X0X7.X.#.8X0XwX0XwX6Xh.2.5.U.6X{.F *.R.R.R.S.*.1 ; ",
"sXX.x E.`.).`.T.1.G 8XwX0XwXwX0XwX0X0XwX0X}.%.h.7.5.3X0X0XwX0XwXwX0X0X0X[.z 9.A.V.V.V.n * X sX",
"sXg x y.~.).).#X4.o.3X3X3X3X3X3X3X7X3X Xh.%.h. X|.3.#.h.3X0X0X0X0X0X8X}.2.V c.A.C.V.i.e # X X sX",
"sXsXn W E.E.).`.L.$.P g u p f D d . .+.6.U. X@X@X}.f.1.U Y %.%.+.H y e l &.A.A.V.V.' 8 X ; sX",
"sXsX..x k.T.T.T.W.9.#.#.#.#.1.7.4.s.h.z.}.}.@X@X X X].z.d.3.:.@.V V V C E c.A.A.A.c.s > sXsX",
"sXsXsXb W T.T.T./.T.:.1.3.4.r.h.z.].[. X X X X X[.Y.H.z.z.d.0.;.` / Q Q u.A.A.A.D.*.9 O X # sXsX",
"sXsXsX| l y.T.T.T./.N.<.1.4.r.f.z.z.].[.{.{.[.].H.z.s.r.8.8.-.-.*.] ] u.D.E.D.D.k.a > sXsXsX",
"sXsXsXsXn F B.T.T.T.^.N.1.4.w.s.z.z.U.[.{.].J.J.H.F.h.r.w.r.w.0.8.8.k.W.W.R.D.T.Z 1 O @ sXsXsX",
"sXsXsXsXf x W T.T.T.^./.T.r.r.d.z.L.U.].U.z.z.P.Y.[.[.U.P.F.G.h.h..X@XOXOX.X.X<.9 # sXsXsXsX",
"sXsXsXsXsXL x [ W.W.W.)._.OXN.d.z.z.I.U.I.z.U. X.X X XXXXX X XXXwXyX,X1X1X=Xs.p > X ; sXsXsXsX",
"sXsXsXsXsXsX| x :._.oX_.OX$X=X+X/.G.h.z.I.].}.}.|.|. X X X3XtXpXpXpXpXpXaXP.a > X - sXsXsXsXsX",
"sXsXsXsXsXsXsX{ c <.+X@X=X;X;X&X=X&XXX[.U.P.U.].[.}.XX3XyXpXpXpXpXpXpXpXh.a > O sXsXsXsXsXsX",
"sXsXsXsXsXsXsXsXL c @.+XpXpXuX1X=X=X;X1X1X1X1XrXwXwXyXyXyXuXpXaXpXuX3X2.u > . @ sXsXsXsXsXsXsX",
"sXsXsXsXsXsXsXsXsXj n Y I.aXaX0X=X=X&X;X=X1X1X1X<X0XwXwXwXyXyXyXwXU.F 9 $ - sXsXsXsXsXsXsXsX",
"sXsXsXsXsXsXsXsXsXsXsX| l o.h.@X&X&X&X&X=X-X-X-X<X2X2X<XwXwX4XH.O.y * @ 5 sXsXsXsXsXsXsXsXsX",
"sXsXsXsXsXsXsXsXsXsXsXsXh p a F :.M..X%X&X&X&X=X=X=X=X@XI.3.F u < $ @ sXsXsXsXsXsXsXsXsXsXsX",
"sXsXsXsXsXsXsXsXsXsXsXsXsXsXy w w a z V ( -.:.:.1.@.V l p 9 * # # sXsXsXsXsXsXsXsXsXsXsXsXsX",
"sXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXq : < 1 9 8 8 8 3 = * @ X X X 6 sXsXsXsXsXsXsXsXsXsXsXsXsXsXsX",
"sXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsX5 5 6 : O O @ : 6 5 sXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsXsX"
};
/* XPM */
static const char * bitcoin48_xpm[] = {
/* columns rows colors chars-per-pixel */
"48 48 223 2",
" c #765404",
". c #795704",
"X c #7C5904",
"o c #7C5A0A",
"O c #825E05",
"+ c #815F0E",
"@ c #815F11",
"# c #866107",
"$ c #866208",
"% c #8A650A",
"& c #8E680D",
"* c #916B0E",
"= c #866414",
"- c #8C6715",
"; c #8F6A10",
": c #8A691B",
"> c #956E12",
", c #906D1D",
"< c #967013",
"1 c #997215",
"2 c #94711F",
"3 c #9C751A",
"4 c #9E781C",
"5 c #A27B1D",
"6 c #947324",
"7 c #997625",
"8 c #9D7926",
"9 c #97792B",
"0 c #9D7B28",
"q c #9C7F34",
"w c #A47E22",
"e c #A87F21",
"r c #A37E2A",
"t c #A8801F",
"y c #A58025",
"u c #AB8425",
"i c #A5812C",
"p c #AB842A",
"a c #AB892D",
"s c #B0862C",
"d c #B48C2D",
"f c #B88F2F",
"g c #B9912E",
"h c #A68432",
"j c #AB8531",
"k c #AD8A33",
"l c #A68638",
"z c #AD8B3B",
"x c #B38C32",
"c c #BA8E35",
"v c #B28D3B",
"b c #B59234",
"n c #BD9235",
"m c #B5903E",
"M c #BC943B",
"N c #BA9A3B",
"B c #C29536",
"V c #C59937",
"C c #C2953B",
"Z c #C49C3C",
"A c #CA9E3D",
"S c #AC8E43",
"D c #AD9045",
"F c #AE9248",
"G c #B49444",
"H c #B99542",
"J c #B49842",
"K c #BD9C44",
"L c #B3954A",
"P c #B7994D",
"I c #BD9A4A",
"U c #B69A52",
"Y c #BB9E54",
"T c #BEA04A",
"R c #BFA354",
"E c #BEA35A",
"W c #C19742",
"Q c #C49B43",
"! c #CA9D41",
"~ c #C39C4B",
"^ c #C99E4A",
"/ c #C7A444",
"( c #CDA244",
") c #CAA945",
"_ c #C5A44C",
"` c #CCA44B",
"' c #C6A94C",
"] c #CFAC4D",
"[ c #D2A647",
"{ c #D2A54B",
"} c #D4AA4C",
"| c #D9AC4D",
" . c #D4B04E",
".. c #DCB14D",
"X. c #C4A151",
"o. c #CAA454",
"O. c #C6AB56",
"+. c #CCA955",
"@. c #C1A45A",
"#. c #C6AA5A",
"$. c #CDAB5D",
"%. c #D1A652",
"&. c #D4AB53",
"*. c #DDAF52",
"=. c #D3AC5B",
"-. c #D9AF5C",
";. c #D5B154",
":. c #DDB253",
">. c #D5B25B",
",. c #DCB45D",
"<. c #DDBB5E",
"1. c #E1B354",
"2. c #E4B955",
"3. c #E3B65B",
"4. c #E5BA5C",
"5. c #EABE5E",
"6. c #C6AB63",
"7. c #CCAD63",
"8. c #C6AE68",
"9. c #C9AF69",
"0. c #D4AC60",
"q. c #CDB067",
"w. c #CDB36C",
"e. c #D6B162",
"r. c #DDB463",
"t. c #D7B964",
"y. c #DBB965",
"u. c #D1B66F",
"i. c #DDB66A",
"p. c #D0BC6C",
"a. c #DFBE6B",
"s. c #CEB772",
"d. c #D1B771",
"f. c #D4BC74",
"g. c #DBBD75",
"h. c #DABF78",
"j. c #E2B764",
"k. c #E4BA64",
"l. c #E9BD62",
"z. c #E2BB6A",
"x. c #E8BF69",
"c. c #EBC15F",
"v. c #F1C25E",
"b. c #DFC266",
"n. c #DBC26C",
"m. c #DCC676",
"M. c #DEC973",
"N. c #D7C07A",
"B. c #D9C27E",
"V. c #E4C162",
"C. c #EDC363",
"Z. c #E3C36F",
"A. c #EBC26C",
"S. c #E5CA6B",
"D. c #EECA6D",
"F. c #F1C565",
"G. c #F5CB66",
"H. c #F9CA66",
"J. c #F2C76A",
"K. c #F5CC6A",
"L. c #F9CD6C",
"P. c #EDD26C",
"I. c #FBD26E",
"U. c #E5C374",
"Y. c #EDC573",
"T. c #E6CB74",
"R. c #EECC73",
"E. c #EBCA78",
"W. c #F5CD74",
"Q. c #F9CE72",
"!. c #EED77F",
"~. c #F4D274",
"^. c #FDD473",
"/. c #F2D870",
"(. c #FED975",
"). c #F5D37C",
"_. c #FCD57A",
"`. c #F7D87A",
"'. c #FEDC7C",
"]. c #FFE37D",
"[. c #DCC682",
"{. c #E1C984",
"}. c #E4CD8A",
"|. c #EFD182",
" X c #E5D48D",
".X c #EAD28D",
"XX c #E8DB8D",
"oX c #F1D581",
"OX c #FDD581",
"+X c #F5DB84",
"@X c #FDDC84",
"#X c #FEDE89",
"$X c #EAD594",
"%X c #E1D894",
"&X c #ECDA94",
"*X c #EFDA99",
"=X c #F2DD9C",
"-X c #F6E284",
";X c #FEE385",
":X c #FFE883",
">X c #FEE38C",
",X c #FEEA8C",
"<X c #F6E196",
"1X c #FEE594",
"2X c #FEEC93",
"3X c #F6E39C",
"4X c #FEE599",
"5X c #FFEB9B",
"6X c #FFF195",
"7X c #FEF39B",
"8X c #FEF99C",
"9X c #F5E2A2",
"0X c #F9E5A5",
"qX c #F6EAA6",
"wX c #FFECA3",
"eX c #FDEAAB",
"rX c #FFF5A0",
"tX c #FFF2AB",
"yX c #FEF5B3",
"uX c #FFF9B3",
"iX c #FFFBBB",
"pX c #FFFDC1",
"aX c None",
/* pixels */
"aXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaX* < * < < < < * * & aXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaX",
"aXaXaXaXaXaXaXaXaXaXaXaXaXaXaX* 1 3 5 u u d g Z Z N d u 5 3 * % aXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaX",
"aXaXaXaXaXaXaXaXaXaXaXaXaX< 3 t u A ..c.K.I.I.(.(.'.(.G.2.( d 5 1 & aXaXaXaXaXaXaXaXaXaXaXaXaXaX",
"aXaXaXaXaXaXaXaXaXaXaX< 5 t g 1.G.H.H.I.(.'.(.I.I.I.K.K.G.I.K.2.V u 1 % aXaXaXaXaXaXaXaXaXaXaXaX",
"aXaXaXaXaXaXaXaXaXaX4 t g c.G.H.I.I.I.].(.(.(.I.G.H.K.G.K.I.G.K.Q.C.C 5 & % aXaXaXaXaXaXaXaXaXaX",
"aXaXaXaXaXaXaXaXaX4 u } v.G.G.I.(.].(.(.(.I.G.G.G.G.G.L.G.K.I.^.^.L.L.:.u < # aXaXaXaXaXaXaXaXaX",
"aXaXaXaXaXaXaXaXt d c.G.I.I.I.I.].(.I.G.c.........:.4.C.W.~.`.'._.^.K.K.J.N 4 # aXaXaXaXaXaXaXaX",
"aXaXaXaXaXaXaX5 g v.H.I.I.(.(.(.H.c.[ V V V V A A A ! ( } l.).>X@X_.`._.'.'./ 4 O aXaXaXaXaXaXaX",
"aXaXaXaXaXaXt g C.I.(.(.^.(.^.1.( ! C d p u s d d d x M &.3.3.A.).+XOX>X;X;X;X) 3 O aXaXaXaXaXaX",
"aXaXaXaXaX5 d G.I.'.].(.^.l.( C A C s H =X=XI 7 N.*X$Xk o.j.z.J.l.W.1X7X6X,X,X,XK 1 X aXaXaXaXaX",
"aXaXaXaX3 p C.(.(.'.'.^.*.C C C C B r G eXeXL - [.eX3Xr ~ r.W._.W.J.D.6X8X6X6X6X-Xd & X aXaXaXaX",
"aXaXaXaXu ;.'.'.(.^.^.| C c B B B c w z eXeXF = [.eX*X8 K r.@X#X;X`.~.D.7X8X8X6X,XS.y O aXaXaXaX",
"aXaXaXw N #X#X'.'.^.*.C c c s r e r 2 r eXeXD $ B.eX=X: z z.oX>X,X,X;X~.D.8X8X6X,X:X) < X aXaXaX",
"aXaX3 a T.1X1X>X#XA.! C B s $.6.6.@.@.w.eXeXd.U $XeX9XF z G O.n.!.-X;X'.D./.8X6X,X:X/.u # aXaXaX",
"aXaXy K 5X5X5X2X>X-.} ^ C r 0XeXeXeXeXeXeXeXeXeXeXeXeXeXeX9XN.L O.T.`.]./.F.-X6X:X].].) < . aXaX",
"aXaXa M.7X5X5X5XU.&.-.&.^ j 0XeXeXeXeXeXeXeXeXeXeXeXeXeXeXeXeX9XL X.~.'.'.K.c.6X:X].].P.t O aXaX",
"aX5 k 2X5X5X5X<X-.-.-.-.=.W q.6.9.=XeXeXeXeXs.9.d.B.*XeXeXeXeXeX&Xh <.(.(.Q.F.~.;X].].].b & . aX",
"aXy O.5X5X5X5XE.-.-.-.-.-.%.Q z 6 6.eXeXeXeX: , w r 7 R eXeXeXeX0XG ' ~.^.^.F.l.;X].].]. .1 . aX",
"aXp n.2X5X5X5Xj.-.-.-.r.r.r.-.=.G 9.eXeXeXeX6 j ( &.} i [.eXeXeXeXY Q J.I.I.L.5.(.;X].(.c.5 X aX",
"3 a !.7X5X7X<X-.r.r.r.r.j.r.r.r.W w.eXeXeXeX6 v ,.Q.k.m s.eXeXeXeXL K C.L.L.L.F.D.'.'.(.I.u # ",
"5 a ,X5XrXwX+X3.j.j.j.z.z.z.z.r.~ w.eXeXeXeX6 l ;.<._ 0 *XeXeXeX0X0 ( G.L.Q.L.5.C.].'.^.^.g $ ",
"4 b 2X7X7XrX!.l.x.x.x.x.U.x.z.z.~ w.eXeXeXeX: , k z Y XeXeXeXeXY r } C.5.5.5.3.4.'.(.^.^.V % . ",
"4 N 6X7X7XrXOXx.x.x.W.x.Y.Y.Y.Y.o.d.eXeXeXeX=X=X9XeXeXeXeXeXeX8.+ r [ 3.5.5.3.3.1.'._.(.^.A & . ",
"5 N 2X6X5X5XW.x.x.x.x.W.Y.Y.Y.Y.o.d.eXeXeXeXeXeXeXeXeXeXeXeXeXeX[.r C | 1.3.3.3.:._._.^.I./ % ",
"5 N ,X2X2X6XD.l.l.x.x.x.Y.Y.Y.R.=.f.eXeXeXeX[.[.[.[.*XeXeXeXeXeXeX*Xj ! *.1.1.1.1._._.^.^./ % ",
"5 b ;X,X,X2XU.3.j.x.Y.W.).OX#X@Xt.f.eXeXeXeX: : 7 7 : 6 6.eXeXeXeXeXd.k { *.*.*.1.OX_.(.^.V % ",
"4 a ].;X;X>X`.C.L.^._._.OX@X#X#Xt.f.eXeXeXeX6 z #.o.I z 6 w.eXeXeXeX*Xr ! { %.%.,.OX_.(.^.n % ",
"4 u /.;X;X;X@XF.Q.Q._._._.@X#X#Xa.f.eXeXeXeX9 I a.Z.y.+.k F eXeXeXeX0Xr Q { { { 4.'.(.^.^.u O ",
"aXu V.;X;X;X>XF.K.Q.Q._._.OX#X@Xt.f.eXeXeXeX9 I Z.U.z.=.z 8.eXeXeXeX=X7 Q { { ( A._.^.^.F.5 O ",
"aXu ] '.'.;X>XK.J.Q.Q.^._._.~.Z.R w.eXeXeXeX6 S =.>.+.G S 9XeXeXeXeXh.r ! ( ( [ L.L.L.L.:.1 . aX",
"aX5 b '.'.'.@X`.F.K.Q.Q.~.A.e.$.P }.eXeXeXeXF L E #.9.[.eXeXeXeXeXeXS k ! ( ! *.H.K.H.L.Z % aX",
"aX1 u J.(.'.'.;XC.F.W.Q.K.&.h.eXeXeXeXeXeXeXeXeXeXeXeXeXeXeXeXeXeX@.2 c ! ! ! F.H.L.H.F.w O aX",
"aXaXw ( (.(.`.`.`.C.F.K.A.~ [.eXeXeXeXeXeXeXeXeXeXeXeXeXeXeXeX*XF 7 r C B A | H.H.H.H.| 1 X aXaX",
"aXaX3 u D.~.~.~.`.D.C.J.V.` .X=X=X3X9X9XeXeX9X=XeXeXeX$X{.9.S 2 r r B B B V 5.H.H.H.H.s + . aXaX",
"aXaXaXt / ~.W.~.`.`.5.V.C.>.M i 6 - = q eXeXS o B.eX*Xo 7 r r r B C B r B 1.H.H.L.L.*.5 X . aXaX",
"aXaXaX1 u 4.~.~.~.~.~.c.V.l.4.,.~ H i S eXeXF : [.eX=X, r W ^ W W C C W *.Q.Q.Q.Q.J.e % aXaXaX",
"aXaXaXaX5 b K.~.~.R.~.`.l.C.J.A.,.=.H P eXeXU , [.eX=X7 v ^ %.^ W ^ ^ -.^.^.W._.W.Z > . aXaXaX",
"aXaXaXaX1 5 / ~.~.~.~.~.`.F.F.<.r.,.~ R eXeXY 7 [.eX=Xq ~ 0.r.0.%.o.g.#XOXOXOXOX,.4 O aXaXaXaX",
"aXaXaXaXaX1 y } ~.`.`.`.'.#XR.,.r.,.+.X.9.7.I G 9.7.7.X.0.i.i.j.i.9XeX0X=X4X1XT.r # aXaXaXaXaX",
"aXaXaXaXaXaX1 u :.'.'.OX#X#X1X+XA.3.r.-.=.=.>.e.i.$.0.0.i.j.g.0XpXpXpXyXuXyXXXk % aXaXaXaXaXaX",
"aXaXaXaXaXaXaX1 p >.>X#X>X1X1X1X1X1X|.U.z.3.j.z.y.i.i.U..XqXpXiXpXpXpXiXiX Xh % . . aXaXaXaXaXaX",
"aXaXaXaXaXaXaXaX< y _ 3XtXuXtXwX=X4X4X4X5X<X>X=X3X0XeXtXyXuXiXiXiXiXiXuXp.y # . . aXaXaXaXaXaXaX",
"aXaXaXaXaXaXaXaXaX* y J %XpXiXwX4X4X4X5X4X5X5XwXwXwXeXtXeXtXtXyXyXyX&XJ 3 # aXaXaXaXaXaXaXaXaX",
"aXaXaXaXaXaXaXaXaXaX* 3 k R XwX4X1X1X1X1X5X4X5X5XwX5XwXwXtXtXtX&X@.y & X aXaXaXaXaXaXaXaXaXaX",
"aXaXaXaXaXaXaXaXaXaXaXaX& 3 a J t.|.>X,X>X>X2X1X1X1X5X4X0X<Xm.T i > O o aXaXaXaXaXaXaXaXaXaXaX",
"aXaXaXaXaXaXaXaXaXaXaXaXaXaX% > w p b _ >.b.S.T.T.U.t.O.N p 4 & O . o aXaXaXaXaXaXaXaXaXaXaXaXaX",
"aXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaX$ $ ; 1 4 5 5 w w 5 3 > % O . . o aXaXaXaXaXaXaXaXaXaXaXaXaXaXaX",
"aXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXO X X X o X X X o aXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaXaX"
};

292
xpm/bitcoin80.xpm Normal file
View File

@@ -0,0 +1,292 @@
/* XPM */
static const char * bitcoin80_xpm[] = {
/* columns rows colors chars-per-pixel */
"80 80 206 2",
" c #725203",
". c #785706",
"X c #7B5907",
"o c #7C5A09",
"O c #7F5F10",
"+ c #815E0B",
"@ c #85620C",
"# c #89650F",
"$ c #856313",
"% c #896614",
"& c #8D6913",
"* c #886718",
"= c #8D6B1B",
"- c #926D14",
"; c #926E1B",
": c #967116",
"> c #997317",
", c #95711E",
"< c #9B7419",
"1 c #9F781B",
"2 c #A27B1D",
"3 c #8F6F22",
"4 c #926F21",
"5 c #947323",
"6 c #9A7623",
"7 c #9D7925",
"8 c #957628",
"9 c #9A7729",
"0 c #9D7B2B",
"q c #9D7F33",
"w c #A47D23",
"e c #A97F27",
"r c #A37E2B",
"t c #9F8030",
"y c #A78021",
"u c #AC8425",
"i c #A5802D",
"p c #AC842B",
"a c #AF8829",
"s c #B2872C",
"d c #B28B2D",
"f c #A68333",
"g c #AA8633",
"h c #AD8A36",
"j c #A4863A",
"k c #A88638",
"l c #A7893B",
"z c #AC8B3B",
"x c #B28732",
"c c #B48C32",
"v c #B98E34",
"b c #B28D3B",
"n c #B88F3C",
"m c #B69033",
"M c #BD9235",
"N c #B4913D",
"B c #BC943A",
"V c #BE993C",
"C c #C19336",
"Z c #C1953B",
"A c #C49A3C",
"S c #C99C3D",
"D c #CDA13F",
"F c #D0A33F",
"G c #A88B40",
"H c #B08F40",
"J c #AE9142",
"K c #AE944C",
"L c #B49443",
"P c #BB9542",
"I c #B49946",
"U c #BD9846",
"Y c #B3964C",
"T c #BB974A",
"R c #B6994A",
"E c #BF9C4A",
"W c #B69B53",
"Q c #B99D53",
"! c #BCA055",
"~ c #BDA25A",
"^ c #C49742",
"/ c #C49C43",
"( c #CB9E42",
") c #C49D4B",
"_ c #C99E4C",
"` c #C29F52",
"' c #C5A244",
"] c #CDA245",
"[ c #C5A34C",
"{ c #CCA34B",
"} c #CCA94D",
"| c #D2A445",
" . c #D1A54B",
".. c #D5AA4E",
"X. c #DBAF4F",
"o. c #C6A352",
"O. c #CBA554",
"+. c #C5AA57",
"@. c #CEAC54",
"#. c #C4A65A",
"$. c #CDA458",
"%. c #C2A85F",
"&. c #CEAA5B",
"*. c #D0A550",
"=. c #D4AB53",
"-. c #DBAE53",
";. c #D0A75B",
":. c #D4AC5A",
">. c #D9AE5C",
",. c #CEB25E",
"<. c #D4B156",
"1. c #DDB156",
"2. c #D4B25C",
"3. c #DCB35D",
"4. c #D7B85C",
"5. c #DCBA5E",
"6. c #E2B355",
"7. c #E2B65B",
"8. c #E4BA5D",
"9. c #EABD5E",
"0. c #C5AA62",
"q. c #CCAE63",
"w. c #C6AE69",
"e. c #D5AF62",
"r. c #CEB167",
"t. c #CCB36C",
"y. c #D5B162",
"u. c #DCB462",
"i. c #D7B964",
"p. c #DCBC64",
"a. c #D2B66B",
"s. c #DCB669",
"d. c #D7BE69",
"f. c #DFB86A",
"g. c #D0B771",
"h. c #D2BA74",
"j. c #D5BE78",
"k. c #E1B766",
"l. c #E4BB63",
"z. c #E9BE63",
"x. c #E3BB6A",
"c. c #E9BF6A",
"v. c #E1BE72",
"b. c #DDC16B",
"n. c #DAC27E",
"m. c #E4C164",
"M. c #ECC264",
"N. c #E4C36B",
"B. c #EBC36C",
"V. c #E7C96F",
"C. c #EECA6E",
"Z. c #F1C564",
"A. c #F1C76A",
"S. c #F5CB6C",
"D. c #FACE6D",
"F. c #F4D06F",
"G. c #FCD06E",
"H. c #E5C371",
"J. c #EDC573",
"K. c #E4CA73",
"L. c #ECCC74",
"P. c #E7CF7A",
"I. c #EBCD7A",
"U. c #F3CD73",
"Y. c #F8CE71",
"T. c #F3CD7A",
"R. c #EDD076",
"E. c #EDD17B",
"W. c #F4D274",
"Q. c #FBD274",
"!. c #FED977",
"~. c #F3D47B",
"^. c #FDD47A",
"/. c #F5DA7C",
"(. c #FDDA7C",
"). c #FFE07F",
"_. c #DBC481",
"`. c #DFC885",
"'. c #E1CA86",
"]. c #EACC80",
"[. c #E4CD8A",
"{. c #EED383",
"}. c #E7D18F",
"|. c #EAD38C",
" X c #F4D680",
".X c #FDD780",
"XX c #F5DA83",
"oX c #FCDC84",
"OX c #F5DB8A",
"+X c #FADE89",
"@X c #EAD492",
"#X c #EED896",
"$X c #EFDA9A",
"%X c #F1DD9D",
"&X c #FDE283",
"*X c #F6E18D",
"=X c #FEE48D",
"-X c #FFE692",
";X c #FFE894",
":X c #FBE799",
">X c #FFEA98",
",X c #F6E2A3",
"<X c #FAE6A6",
"1X c #FAE7A8",
"2X c #FDEAAB",
"3X c None",
/* pixels */
"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3Xu u u u u u u y y u y 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3Xu u u u u u u u u a u u u u u u a u u 2 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3Xu u u u u u u u s m V D ' { ' D M d u u a u u u u 2 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3Xu u u u u u M } m.~.oX=X=X=X=X=X-X-X=X&X/.m.=.V u u a u u w 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3Xu u u u u M 4.~.=X=X=X=X=X=X=X=X=X=X=X=X=X=X=X=X=X=X/.5.Z u u u u u 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3Xu u u u ] V.&X=X=X&X=X=X=X=X=X=X=X=X=X&X=X=X=X=X=X=X=X=X=X=XW.} a u u u 2 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3Xu a u u ' W.=X=X=X=X=X=X=X=X=X=X=X=X=X=X=X=X=X=X=X=X+X=X=X=X&X=X=X=X~.} a u u u < 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3Xu u u M N.=X&X=X=X=X=X=X=X=X-X=X=X=X=X&X=X=X=XoX=X=X=X=X&X+X=X=X=X=X=X=X=XL.M u u u < 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3Xu u u u } XX=X=X=X&X=X=X=X=X=X=X=X=X=X=X=X=X=X=X=X*X=X=X=X=X=X=X=X=X=X=X=X=X=X=XoX<.a u u 2 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X3X3Xu u u s m.&X=X=X=X=X=X=X=X=X=X=X=X=X=X/.L.M.m.9.m.9.m.C.~.&X*X=X=X=X=X=X=X=X=X=X=X=X=XV.m u u 2 o 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X3Xu u u c R.=X=X=X=X=X=X=X=X=X=X=XoXC.1.| S S A S D D D D ] ] ..<.N./.=X-X=X-X=X=X=X=X=X=X=XXXZ u a 2 o 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3Xu u u m XX=X=X=X=X=X=X=X=X=X=XW.3.| ^ A C M M M C S S A A A / ( { =.<.l.I.=X-X-X=X=X=X=X=X=X=X=XV a u 2 . 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3Xu u m /.=X=X=X-X=X=X=X=X=X~.1.D ] S Z v x p s u s d d v c c v V { =.7.8.7.l.T.=X-X=X-X-X-X-X-X=X=XV u a 1 3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3Xu u d /.=X=X=X=X=X=X=X=X&X8.^ A ( S M v e $.r.e.r.u w i a.a.a.&.b ^ =.l.l.l.c.z.z.XX-X-X-X-X=X-X-X;X&XV u u : 3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3Xu u s R.=X=X=X=X=X=X=X=XU.{ ^ Z C ( A M u w [.2X2X2X0 - 7 2X2X1X@Xi P *.l.x.B.U.C.z.z.W.-X-X-X-X-X-X=X-X*Xd a u # . 3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3Xu u u l.=X=X=X=X-X=X=X=Xm.Z Z Z Z n Z Z v e , '.2X2X2X5 & ; 2X2X2X}.7 b { 3.x.^.^.^.Y.A.z.R.-X;X;X;X;X-X;X-XP.a u y . 3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3Xu u } -X-X=X-X=X=X=X=Xl.M M Z C C C C C x e ; '.2X2X2X, $ = 2X2X2X}.6 h ) >.J..X.X.X.X(.W.Z.C.&X;X;X;X;X-X-X-X<.u u < 3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3Xu u c oX=X=X=X=X=X=X=Xl.Z C M M C C v v v s w = '.2X2X2X5 $ = 2X2X2X}.5 g ) u./.+X+X=X=X=X&XW.Z.F.=X;X;X;X;X-X-X*XV u y @ X 3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3Xu u u N.-X-X-X-X=X=X=XB.Z M C v v s e e e e w > % `.2X2X2X= + % 2X2X2X}.= r L 4.E.OX+X-X=X=X&X).W.M.R.;X;X;X-X-X-X;XR.u u y 3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3Xu u U -X-X-X-X-X-X=XW.^ C C C x e e r 6 5 4 ; = $ `.2X2X2X= O = 2X2X2X}.O = t Q ,.b.P./.*X=X&X&X).F.M.W.;X;X;X;X&X-X&X} u u O 3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3Xu u u R.-X-X-X-X-X-X=X=.{ ^ Z C x n 2X2X<X<X1X2X<X<X2X2X2X2X1X1X<X2X2X2X<X$X[.b.~ J I ~ b.P.&X&X&X).!.F.m.).;X;X;X;X;X&X).u y y 3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3Xu u U -X-X-X-X-X-X-Xc.=.=. ._ ^ x z 2X2X1X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X<Xn.l I ,.K./.).).).F.Z.Z.&X;X;X=X-X-X&X} u u O 3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3Xu u V.-X;X-X-X-X-XOX>.>.>.=.=._ n b 2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X:XI N +.V./.).).F.F.9.W.;X=X;X-X-X-XR.u u > 3X3X3X3X3X3X3X3X",
"3X3X3X3X3Xu u d =X;X-X-X-X-X-Xx.>.>.>.>.>...^ P 2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X,Xl N 4.R.!.!.!.G.Z.M.&X;X=X=X-X-X-XB a u 3X3X3X3X3X3X3X",
"3X3X3X3X3Xu u @.;X;X-X;X;X;XXX>.:.>.>.>.>.>._ P ` Y Y W _.2X2X2X2X2X2X@XW W ~ 0.t.'.<X2X2X2X2X2X2X2X2X'.0 ' m./.!.!.Q.S.9.F.=X;X-X=X-X&X4.u u @ 3X3X3X3X3X3X3X",
"3X3X3X3X3Xu u P.;X;X;X;X-X:XN.>.>.>.>.>.>.>.=._ P z r 4 8 2X2X2X2X2X2X_.. $ , 6 1 3 t ~ 1X2X2X2X2X2X2X2Xt B 5.G.!.!.G.G.M.9.&X;X=X-X-X=X/.u u > 3X3X3X3X3X3X3X",
"3X3X3X3Xu u d =X;X;X=X;X;X=X3.>.>.>.e.>.3.3.>.:.*._ P r 9 2X2X2X2X2X1Xn.@ , c B N m h 8 ~ 2X2X2X2X2X2X2XI h <.F.!.G.G.F.M.9.W.;X=X-X-X=X=Xm u y . 3X3X3X3X3X3X",
"3X3X3X3Xu u ' -X-X>X-X-X-X X>.>.>.>.>.>.>.u.u.u.u.3.$.P f 2X2X2X2X2X2X_.$ i / -.<.8.} h 8 1X2X2X2X2X2X2X! i <.S.G.G.G.G.Z.9.Z.=X-X=X-X&X-X} u u X 3X3X3X3X3X3X",
"3X3X3X3Xu u 4.-X-X-X-X-X-XJ.3.>.>.k.k.k.k.k.u.k.u.u.:.U k 2X2X2X2X2X1X_.% f } 8.Z.F.8.U 8 ,X2X2X2X2X2X2XI g } Z.D.G.D.G.D.Z.9.&X-X=X=X=X-Xm.u u @ 3X3X3X3X3X3X",
"3X3X3X3Xu u K.;X-X;X-X>X-Xk.3.k.k.k.k.k.k.k.k.k.k.u.e.U k 2X2X2X2X2X2X_.% f [ 8.F.M.<.b i 2X2X2X2X2X2X2Xt a X.Z.D.D.D.G.G.Z.9./.=X-X=X=X=XR.u u & 3X3X3X3X3X3X",
"3X3X3X3Xu u E.;X-X;X-X-X=Xl.l.x.c.k.x.k.k.x.x.v.x.x.u.) z 2X2X2X2X2X2X_.$ 7 L <.<.} N 6 h.2X2X2X2X2X2X_.: V 1.S.D.D.G.D.S.M.6.W.-X=X-X=X=X&Xu u > X 3X3X3X3X3X",
"3X3X3Xu a u =X;X;X;X;X;XoX7.z.c.c.c.c.c.c.c.c.c.x.k.u.) z 2X2X2X2X2X2Xn.o = i N h i l n.2X2X2X2X2X2X<Xt t D 7.M.Z.z.z.9.9.9.6.M.-X=X=X=X;X=Xm u 1 3X3X3X3X3X",
"3X3X3Xy u a =X;X;X;X;X;XXXl.z.c.c.c.c.T.J.J.T.v.J.J.s.` z 2X2X2X2X2X2X#XW ~ ~ t.n.$X2X2X2X2X2X2X2X,Xt % t V X.8.9.8.9.9.9.6.6.M.-X=X=X=X=X&XM u 2 3X3X3X3X3X",
"3X3X3Xu u m -X-X-X;X;X;X~.z.z.c.c.c.c..XJ.J.J.J.J.J.x.O.b 2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2Xw.$ * y V X.7.8.8.9.7.8.7.6.8.=X=X-X-X=X-XV a y 3X3X3X3X3X",
"3X3X3Xu a m -X-X-X;X;X;X~.7.z.c.c.c.c.c.c.J.T.J.T.J.B.O.b 2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X,X~ , c ' X.6.6.7.6.6.6.6.8.=X=X=X-X&X-XV u y 3X3X3X3X3X",
"3X3X3Xu u m -X-X-X-X-X-X/.8.l.z.c.T.c.J.c.J.T.v.J.J.x.O.G 2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2Xn.r v { 6.6.6.6.6.6.-.7.&X-X=X=X=X-XD u y 3X3X3X3X3X",
"3X3X3Xu u d =X-X-X-X-X-X~.7.z.z.c.c.c.c.c.J.c.T.T.^.T.y.R 2X2X2X2X2X2X@XK K W W W ~ h.#X1X2X2X2X2X2X2X2X2Xa.i Z ..X.6.6.-.-.6.7.-X-X-X-X-X-XD u 2 3X3X3X3X3X",
"3X3X3Xw u a =X-X-X-X-X-X~.7.7.8.c.c.c.c.T..X.X+X+X+XXXi.R 2X2X2X2X2X2Xn.. * 5 8 5 3 = * q `.2X2X2X2X2X2X2X<Xk c | X.6.-.-.-.-.z.&X;X=X;X-X;XV u w 3X3X3X3X3X",
"3X3X3Xu u u =X-X=X-X-X-X/.8.M.B.Y.T.^.^.^..X.XoXoX+XXXi.R 2X2X2X2X2X2X_.$ 0 b U U N l t 5 $ `.2X2X2X2X2X2X2X0.e Z .....-.-.6.c.;X=X;X=X;X-Xd u 1 3X3X3X3X3X",
"3X3X3X3Xu a E.-X-X-X-X-X=Xz.S.D.Y.^.Q.^.^.^..XoX+X+XXXi.R 2X2X2X2X2X2X_.= l +.u.i.,.O.E h 5 G 2X2X2X2X2X2X2X_.0 n | . .*. .*.T.-X;X;X;X-X=Xa u : 3X3X3X3X3X",
"3X3X3X3Xu u N.-X-X-X=X-X-XA.Z.S.Y.Q.Q.^.^..X.XoXoX&X.Xi.R 2X2X2X2X2X2X_.= N y.H.H.m.i.y.E f 8 2X2X2X2X2X2X2X'.6 n | . . . . ..X;X;X;X;X-X~.u u & 3X3X3X3X3X",
"3X3X3X3Xu u <.-X-X=X=X-X-XW.Z.S.Y.Y.Q.^.^.^.(..XoX=XXXi.R 2X2X2X2X2X2X_.= L 4.H.J.H.x.i.o.k j 2X2X2X2X2X2X2X_.6 B . . . .{ =.-X;X-X;X-X-Xb.a u @ 3X3X3X3X3X",
"3X3X3X3Xy a V =X=X-X-X=X-XXXZ.S.Y.Y.Y.Q.!.^..X.XoXoXE.y.I 2X2X2X2X2X2X_.= J y.b.H.N.p.&.P 0 g.2X2X2X2X2X2X2Xr.r B _ { .| ] l.-X;X;X-X-X;X..u u . . 3X3X3X3X3X",
"3X3X3X3Xy u a =X=X=X=X-X=X-XM.Z.S.Y.Y.Q.Q.^.^.^.U.J.u.E l 2X2X2X2X2X2X_.* k o.e.e.$.` P q W 1X2X2X2X2X2X2X2XG i B ] | ] ] ( ~.=X;X;X;X;X;XM u y 3X3X3X3X3X3X",
"3X3X3X3X3Xu u V.-X=X-X=X-X-XF.M.A.D.Y.Q.Y.Q.Y.B.2.[ N 0 j 2X2X2X2X2X2X_.O 5 l G z H H Q _.2X2X2X2X2X2X2X2X#X, g ^ ] ] | ] ..-X-X-X-X&X;X).u u : 3X3X3X3X3X3X",
"3X3X3X3X3Xu u } =X=X=X=X-X=X&XM.Z.S.D.W.Q.Y.B.*.a.#X@X|.,X2X2X2X2X2X2X,X[.[.}.}.%X<X2X2X2X2X2X2X2X2X2X2X<Xj 6 b / ] ] ] ] M.-X-X-X-X-X-X4.u u O 3X3X3X3X3X3X",
"3X3X3X3X3Xy u d =X=X=X=X=X=X-XS.M.A.S.S.U.A.u.) n.2X2X2X2X2X2X2X2X2X2X2X2X1X2X2X2X2X2X2X2X2X2X2X2X2X2X2XW ; i M ( S S S ] &X-X-X-X-X=X-Xm u y . X 3X3X3X3X3X3X",
"3X3X3X3X3X3Xu u p.=X=X=X=X=X-X&X9.Z.C.S.S.M.:.b [.2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X%XG = r x v C D D D m.-X-X-X-X-X-XR.u u : 3X3X3X3X3X3X3X",
"3X3X3X3X3X3Xy u B =X=X=X=X=X=X=XF.9.M.A.C.M.=.h %X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X2X1X#X~ 4 ; r p v v M C A | &X-X-X-X-X-X-X] u u X 3X3X3X3X3X3X3X",
"3X3X3X3X3X3Xy u u N.=X=X-X=X-X=X=XM.z.M.M.M.1.V #X%X%X%X%X$X%X%X<X2X2X2X%X$X%X2X2X2X<X[.n.t.W q = , r i x v C C C M C W.-X-X-X-X-X-X/.u u 1 X 3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3Xu u V *X=X=X*X=X=X=XoX8.M.M.M.5.{ m r , ; $ $ o o `.2X2X2X3 o $ 2X2X2X[.o $ 4 9 0 r g x v m C M C C C 8.&X-X-X-X-X-X-X[ u u @ 3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X2 u u 5.=X=X=X=X=X=X=XI.8.M.M.z.3.O.) P b r 0 4 % `.2X2X2X3 $ * 2X2X2X[.$ 4 r e ^ n n Z Z Z C C C M | =X=X-X-X-X-X-XR.u u < 3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3Xy u d XX=X=X=X=X-X=X=XS.8.8.M.M.z.z.7.{ _ U g 5 `.2X2X2X8 = 3 2X2X2X}.3 0 x ^ _ ^ ^ ^ Z ^ B ^ C .&X-X-X-X-X-X-X=XB u u o 3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X1 u u ' =X=X*X=X=X*X=X=XW.8.M.M.A.S.l.u.>.o.L r [.2X2X2X9 = 8 2X2X2X}.4 r ^ _ *.*._ ) ) ^ ^ ^ O.oX=X-X-X-X-X-X-X<.u u : . 3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3Xy u u i.=X=X=X=X=X-X*X=XW.9.M.A.B.3.5.5.;.U f [.2X2X2Xq 4 8 2X2X2X}.r q _ _ ;.;.*._ _ ` _ e.+X-X-X-X-X-X-X-XR.a u 2 3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3Xu u u K.=X=X=X-X=X=X=X=XXXz.M.8.5.8.u.:.) h }.2X2X2Xj r f 2X2X2X@Xq T _ e.e.u.e.;.$.$.b.-X-X-X=X;X=X;X-X&Xa a u + 3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3Xu u d ~.=X=X=X=X=X-X=X-X+XC.3.5.7.7.2.@.) q.r.q.q.H H L g.r.w.q.T ` e.k.v.k.k.s.s.{.-X-X;X-X;X;X;X;X*XV u u & . 3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X2 u u c XX-X=X=X=X=X-X=X-X-X Xl.7.7.u.2.$.o.[ [ o.O.$.&.&.` ` ` q.s.k.v.k.k.x.{.%X>X>X>X;X>X;X>X>X*XV u u > 3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X2 u u m ~.=X-X-X-X=X-X-X-X-X-X Xc.7.5.u.3.e.y.u.s.f.k.s.e.e.s.s.k.k.k.v. X:X>X>X>X>X>X>X;X>X>X*XV u u < 3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X3X2 u u d R.-X=X-X=X-X-X-X-X-X-X-X+XI.v.u.s.l.k.k.x.x.x.s.s.s.s.j.].+X>X>X>X>X>X:X>X>X>X>X>XOXV u u 1 3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X3X3X2 u u a p.-X-X-X;X;X;X-X-X-X:X-X-X-X-XOX XL.J.J.J.L.I.].OX:X>X-X>X>X-X>X>X>X>X>X>X>X>XK.a a u < 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X2 u u u @.=X;X;X>X;X-X-X>X-X-X-X-X;X-X-X-X-X-X>X>X-X>X-X>X>X>X>X;X>X>X>X-X>X-X-X:X<.u u u > 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X1 u u u m n.>X;X>X>X-X-X-X-X>X-X-X-X;X;X;X-X-X-X-X-X>X-X-X>X-X>X>X-X>X>X>X>XK.B u u u & 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3Xw u u u / {.>X>X-X-X-X-X-X-X-X-X-X-X;X-X-X;X:X-X-X>X-X:X>X;X;X>X;X;X{.[ u u u w + 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X2 u u u u ) K.-X-X-X-X:X-X-X-X-X-X-X-X-X-X-X-X-X>X-X-X-X-X-X-XE.[ u u u u - . 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X1 u u u u m 2.E.-X+X:X-X-X-X-X-X-X-X-X-X:X-X-X-X;X-XOXi.B u u u u 1 o 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X> u u u u u v [ l.I.OX-X-X-X-X-X-X-X-X+XI.f.@.m u u u u u 1 + o 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X& 2 u u u u u u u d B V V V V B d u u u u u u u y - . o 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X+ - 1 u u u u u u u a u u u u u u u u 2 - o o 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3Xo . X # - > 1 2 2 2 1 2 > - # o . o 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3Xo o . o 3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X",
"3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X3X"
};