summaryrefslogtreecommitdiff
path: root/src/common/db.c
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2011-03-02 13:52:33 -0800
committerBen Longbons <b.r.longbons@gmail.com>2011-03-02 14:06:46 -0800
commita1a2711abfc594f2be1da51df95ddcd7071ddebd (patch)
tree9128237fc4794b917394a1c39221d08cc78c1b54 /src/common/db.c
parent877018d1296c984afe72b79f076265d6d27c3a7c (diff)
downloadtmwa-a1a2711abfc594f2be1da51df95ddcd7071ddebd.tar.gz
tmwa-a1a2711abfc594f2be1da51df95ddcd7071ddebd.tar.bz2
tmwa-a1a2711abfc594f2be1da51df95ddcd7071ddebd.tar.xz
tmwa-a1a2711abfc594f2be1da51df95ddcd7071ddebd.zip
Recode from SHIFT-JIS to unicode, then undo the conversion of backslashs and tildes.
Diffstat (limited to 'src/common/db.c')
-rw-r--r--src/common/db.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/common/db.c b/src/common/db.c
index 7a4fa70..07b08c8 100644
--- a/src/common/db.c
+++ b/src/common/db.c
@@ -211,7 +211,7 @@ static void db_rebalance (struct dbn *p, struct dbn **root)
{
p->color = RED;
while (p != *root && p->parent->color == RED)
- { // rootは必ず黒で親は赤いので親の親は必ず存在する
+ { // root縺ッ蠢縺夐サ偵〒隕ェ縺ッ襍、縺縺ョ縺ァ隕ェ縺ョ隕ェ縺ッ蠢縺壼ュ伜惠縺吶k
if (p->parent == p->parent->parent->left)
{
struct dbn *y = p->parent->parent->right;
@@ -276,7 +276,7 @@ static void db_rebalance_erase (struct dbn *z, struct dbn **root)
x = y->right;
}
if (y != z)
- { // 左右が両方埋まっていた時 yをzの位置に持ってきてzを浮かせる
+ { // 蟾ヲ蜿ウ縺御ク。譁ケ蝓九∪縺」縺ヲ縺縺滓凾 y繧築縺ョ菴咲スョ縺ォ謖√▲縺ヲ縺阪※z繧呈オョ縺九○繧
z->left->parent = y;
y->left = z->left;
if (y != z->right)
@@ -305,7 +305,7 @@ static void db_rebalance_erase (struct dbn *z, struct dbn **root)
y = z;
}
else
- { // どちらか空いていた場合 xをzの位置に持ってきてzを浮かせる
+ { // 縺ゥ縺。繧峨°遨コ縺縺ヲ縺縺溷エ蜷 x繧築縺ョ菴咲スョ縺ォ謖√▲縺ヲ縺阪※z繧呈オョ縺九○繧
x_parent = y->parent;
if (x)
x->parent = y->parent;
@@ -316,9 +316,9 @@ static void db_rebalance_erase (struct dbn *z, struct dbn **root)
else
z->parent->right = x;
}
- // ここまで色の移動の除いて通常の2分木と同じ
+ // 縺薙%縺セ縺ァ濶イ縺ョ遘サ蜍輔ョ髯、縺縺ヲ騾壼クク縺ョ2蛻譛ィ縺ィ蜷後§
if (y->color != RED)
- { // 赤が消える分には影響無し
+ { // 襍、縺梧カ医∴繧句縺ォ縺ッ蠖ア髻ソ辟。縺
while (x != *root && (x == NULL || x->color == BLACK))
if (x == x_parent->left)
{
@@ -498,7 +498,7 @@ void db_foreach (struct dbt *table, int (*func) (void *, void *, va_list),
...)
{
int i, sp;
- // red-black treeなので64個stackがあれば2^32個ノードまで大丈夫
+ // red-black tree縺ェ縺ョ縺ァ64蛟虐tack縺後≠繧後ー2^32蛟九ヮ繝シ繝峨∪縺ァ螟ァ荳亥、ォ
struct dbn *p, *pn, *stack[64];
va_list ap;