annotate src/REPNOTE.txt @ 49:000769ce6c9d default tip

Added tag v7-3-618 for changeset 67300faee616
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 01 Aug 2012 18:08:37 +0900
parents 8d4ffb7c9f4e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
31
8d4ffb7c9f4e *** empty log message ***
kono
parents: 30
diff changeset
1 Tue Oct 28 09:57:29 JST 2008
8d4ffb7c9f4e *** empty log message ***
kono
parents: 30
diff changeset
2
8d4ffb7c9f4e *** empty log message ***
kono
parents: 30
diff changeset
3 utf-8 encoding でないと動作しないので、それをチェックした方が良い。
8d4ffb7c9f4e *** empty log message ***
kono
parents: 30
diff changeset
4
8d4ffb7c9f4e *** empty log message ***
kono
parents: 30
diff changeset
5 session は不要。session 毎に channelを開ける(現状では)必要があるので、
8d4ffb7c9f4e *** empty log message ***
kono
parents: 30
diff changeset
6 rep_T を切替える方が良いらしい。
8d4ffb7c9f4e *** empty log message ***
kono
parents: 30
diff changeset
7
29
ef6d2a18d7c2 *** empty log message ***
kono
parents: 28
diff changeset
8 Tue Oct 28 01:28:47 JST 2008
ef6d2a18d7c2 *** empty log message ***
kono
parents: 28
diff changeset
9
ef6d2a18d7c2 *** empty log message ***
kono
parents: 28
diff changeset
10 まぁ、一応、それっぽくはなって来たかな。
ef6d2a18d7c2 *** empty log message ***
kono
parents: 28
diff changeset
11
ef6d2a18d7c2 *** empty log message ***
kono
parents: 28
diff changeset
12 readが0を返す場合と、-1を返す場合がある。0の場合は、
ef6d2a18d7c2 *** empty log message ***
kono
parents: 28
diff changeset
13 selectの関係があるので、close()しない方が良いと思う。
ef6d2a18d7c2 *** empty log message ***
kono
parents: 28
diff changeset
14
30
bf9fabc0ae84 *** empty log message ***
kono
parents: 29
diff changeset
15 SessionManagerが死ぬと、read() で無限ループに入ってしまう。
bf9fabc0ae84 *** empty log message ***
kono
parents: 29
diff changeset
16
28
24808249e776 *** empty log message ***
kono
parents: 27
diff changeset
17 Tue Oct 28 00:40:44 JST 2008
24808249e776 *** empty log message ***
kono
parents: 27
diff changeset
18
24808249e776 *** empty log message ***
kono
parents: 27
diff changeset
19 mode change の最初のml_replace で、delete command が出てない。
29
ef6d2a18d7c2 *** empty log message ***
kono
parents: 28
diff changeset
20 prevline==-1 のcheckのせいだった
28
24808249e776 *** empty log message ***
kono
parents: 27
diff changeset
21 delete command のasserttion がfailすることがある。
29
ef6d2a18d7c2 *** empty log message ***
kono
parents: 28
diff changeset
22 assert del_cmd==0 は正しくない
ef6d2a18d7c2 *** empty log message ***
kono
parents: 28
diff changeset
23
ef6d2a18d7c2 *** empty log message ***
kono
parents: 28
diff changeset
24 ml_append
ef6d2a18d7c2 *** empty log message ***
kono
parents: 28
diff changeset
25 複数行(n) appendすると、prev_line_flushが xtr=1 で複数回呼ばれ
ef6d2a18d7c2 *** empty log message ***
kono
parents: 28
diff changeset
26 rep_register では、xtr=n となる。
ef6d2a18d7c2 *** empty log message ***
kono
parents: 28
diff changeset
27 ml_delete
ef6d2a18d7c2 *** empty log message ***
kono
parents: 28
diff changeset
28 複数行(n) deleteすると、prev_line_flushが xtr=-1 で複数回呼ばれ
ef6d2a18d7c2 *** empty log message ***
kono
parents: 28
diff changeset
29 rep_register では、xtr=-n となる。
ef6d2a18d7c2 *** empty log message ***
kono
parents: 28
diff changeset
30
28
24808249e776 *** empty log message ***
kono
parents: 27
diff changeset
31
27
a01d8d9b2a58 first working version.
kono
parents: 26
diff changeset
32 Mon Oct 27 15:53:19 JST 2008
a01d8d9b2a58 first working version.
kono
parents: 26
diff changeset
33
a01d8d9b2a58 first working version.
kono
parents: 26
diff changeset
34 直せば直すほど、動かなくなってくる。joinのsessionが変らしい。
31
8d4ffb7c9f4e *** empty log message ***
kono
parents: 30
diff changeset
35 Done: read がでたらめだった...
27
a01d8d9b2a58 first working version.
kono
parents: 26
diff changeset
36
26
7101f8c1fa21 *** empty log message ***
kono
parents: 18
diff changeset
37 Sun Oct 26 21:45:49 JST 2008
7101f8c1fa21 *** empty log message ***
kono
parents: 18
diff changeset
38
7101f8c1fa21 *** empty log message ***
kono
parents: 18
diff changeset
39 なんか、でたらめな感じ... そもそも、コマンドがちゃんと
7101f8c1fa21 *** empty log message ***
kono
parents: 18
diff changeset
40 読めてない?
7101f8c1fa21 *** empty log message ***
kono
parents: 18
diff changeset
41
27
a01d8d9b2a58 first working version.
kono
parents: 26
diff changeset
42 command を読み込む時に、 三回も malloc して、しかも、
a01d8d9b2a58 first working version.
kono
parents: 26
diff changeset
43 一回は、free してない。
a01d8d9b2a58 first working version.
kono
parents: 26
diff changeset
44
18
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
45 Sun Sep 7 20:18:14 JST 2008
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
46
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
47 ml_replace
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
48 文字のinsert の時には毎回呼ばれる
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
49 文字のdeleteの時には、最初の一回しか呼ばれない
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
50 ml_append
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
51 行のopen の時に一回だけ呼ばれる
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
52 複数行appendしても、一回ずつ呼ばれる
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
53 ml_delete
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
54 複数行deleteしても、一回ずつ呼ばれる
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
55
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
56 changed_common
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
57 これらが呼ばれて変更があった時に呼ばれる
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
58 複数行の変更は一回にまとめられて、変更行数がxtraに入る
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
59
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
60 というわけなので、以下のようなアルゴリズムになると思われる
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
61
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
62 ml_* で、prev_line_flushを呼ぶ。
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
63
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
64 prev_line とcurrent lineを比較して異なっていたら、
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
65 insert されているdelete commandがあったらキャンセルする
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
66 溜っているのは、changed_commonのreplaceのケースのみ
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
67
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
68 prev_line をcurrent lineに設定して、
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
69
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
70 delete の場合は、DELETE_CMDとして現在の行をセーブして終了
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
71 ml_deleteは1行毎に呼ばれる
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
72 送ってしまっても構わない
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
73
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
74 append の場合は何もしない
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
75 最後にまとめてchanged_common でINSERT_CMDを発行すれば良い`
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
76
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
77 あとはreplaceの場合となる
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
78
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
79 既にprev_lineがsaveしてあったら何もしないで終了
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
80 文字のinsertの場合
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
81
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
82 そうでなかったら、current lineを DELETE_CMD としてセーブする
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
83 最初のreplaceの場合
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
84
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
85 changed_common で、
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
86
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
87 xtra < 0 の場合は何もしないで溜ったコマンドを送信
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
88 ml_delete の分だけDELETE_CMDが送信される (送ってなければ)
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
89 xtra > 0 の場合は、INSERT_CMD を行数の分だけ送信
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
90 xtra == 0 の場合は、INSERT_CMD を送信して、
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
91 現在行をDELETE_CMDとしてセーブ
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
92 (ml_replace は文字の削除では呼ばれないので、ここでセーブする必要がある)
70868348fbd8 *** empty log message ***
kono
parents:
diff changeset
93