gdiff 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. data/CHANGELOG +7 -0
  2. data/COPYING.suffix_array +278 -0
  3. data/LICENSE.suffix_array +17 -0
  4. data/README +40 -0
  5. data/README.suffix_array +274 -0
  6. data/bin/gdiff +25 -0
  7. data/bin/gpatch +25 -0
  8. data/doc/classes/Diff.html +117 -0
  9. data/doc/classes/Diff/GDiff.html +120 -0
  10. data/doc/classes/Diff/GDiff/EGdiffError.html +111 -0
  11. data/doc/classes/Diff/GDiff/ENoGdiffStream.html +113 -0
  12. data/doc/classes/Diff/GDiff/EPrematureEndOfStream.html +113 -0
  13. data/doc/classes/Diff/GDiff/Operations.html +156 -0
  14. data/doc/classes/Diff/GDiff/Operations/Copy.html +246 -0
  15. data/doc/classes/Diff/GDiff/Operations/Copy.src/M000014.html +19 -0
  16. data/doc/classes/Diff/GDiff/Operations/Copy.src/M000015.html +39 -0
  17. data/doc/classes/Diff/GDiff/Operations/Copy.src/M000016.html +25 -0
  18. data/doc/classes/Diff/GDiff/Operations/Copy.src/M000017.html +18 -0
  19. data/doc/classes/Diff/GDiff/Operations/Data.html +246 -0
  20. data/doc/classes/Diff/GDiff/Operations/Data.src/M000009.html +18 -0
  21. data/doc/classes/Diff/GDiff/Operations/Data.src/M000010.html +18 -0
  22. data/doc/classes/Diff/GDiff/Operations/Data.src/M000011.html +35 -0
  23. data/doc/classes/Diff/GDiff/Operations/Data.src/M000012.html +29 -0
  24. data/doc/classes/Diff/GDiff/Operations/Data.src/M000013.html +19 -0
  25. data/doc/classes/SAError.html +111 -0
  26. data/doc/classes/SuffixArray.html +342 -0
  27. data/doc/classes/SuffixArray.src/M000001.html +97 -0
  28. data/doc/classes/SuffixArray.src/M000002.html +73 -0
  29. data/doc/classes/SuffixArray.src/M000003.html +102 -0
  30. data/doc/classes/SuffixArray.src/M000004.html +47 -0
  31. data/doc/classes/SuffixArray.src/M000005.html +44 -0
  32. data/doc/classes/SuffixArray.src/M000006.html +33 -0
  33. data/doc/classes/SuffixArray.src/M000007.html +24 -0
  34. data/doc/classes/SuffixArray.src/M000008.html +46 -0
  35. data/doc/created.rid +1 -0
  36. data/doc/files/ext/gdiff/suffix_array/extconf_rb.html +108 -0
  37. data/doc/files/ext/gdiff/suffix_array/lcp_c.html +101 -0
  38. data/doc/files/ext/gdiff/suffix_array/sarray_c.html +101 -0
  39. data/doc/files/ext/gdiff/suffix_array/suffix_array_c.html +101 -0
  40. data/doc/files/lib/gdiff_rb.html +108 -0
  41. data/doc/fr_class_index.html +36 -0
  42. data/doc/fr_file_index.html +31 -0
  43. data/doc/fr_method_index.html +43 -0
  44. data/doc/index.html +24 -0
  45. data/doc/rdoc-style.css +208 -0
  46. data/ext/gdiff/COPYING +278 -0
  47. data/ext/gdiff/LICENSE +17 -0
  48. data/ext/gdiff/README +274 -0
  49. data/ext/gdiff/extconf.rb +3 -0
  50. data/ext/gdiff/lcp.c +97 -0
  51. data/ext/gdiff/sarray.3 +145 -0
  52. data/ext/gdiff/sarray.c +372 -0
  53. data/ext/gdiff/sarray.h +13 -0
  54. data/ext/gdiff/suffix_array.c +510 -0
  55. data/lib/gdiff.rb +255 -0
  56. data/setup.rb +1551 -0
  57. data/test/tc_gdiff.rb +66 -0
  58. metadata +119 -0
@@ -0,0 +1,113 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: Diff::GDiff::EPrematureEndOfStream</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">Diff::GDiff::EPrematureEndOfStream</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../files/lib/gdiff_rb.html">
59
+ lib/gdiff.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ <a href="EGdiffError.html">
69
+ EGdiffError
70
+ </a>
71
+ </td>
72
+ </tr>
73
+ </table>
74
+ </div>
75
+ <!-- banner header -->
76
+
77
+ <div id="bodyContent">
78
+
79
+
80
+
81
+ <div id="contextContent">
82
+
83
+
84
+
85
+ </div>
86
+
87
+
88
+ </div>
89
+
90
+
91
+ <!-- if includes -->
92
+
93
+ <div id="section">
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+ <!-- if method_list -->
103
+
104
+
105
+ </div>
106
+
107
+
108
+ <div id="validator-badges">
109
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
110
+ </div>
111
+
112
+ </body>
113
+ </html>
@@ -0,0 +1,156 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Module: Diff::GDiff::Operations</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Module</strong></td>
53
+ <td class="class-name-in-header">Diff::GDiff::Operations</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../files/lib/gdiff_rb.html">
59
+ lib/gdiff.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+ <div id="description">
76
+ <p>
77
+ <a href="Operations.html">Operations</a> allowed by the gdiff protocoll
78
+ </p>
79
+
80
+ </div>
81
+
82
+
83
+ </div>
84
+
85
+
86
+ </div>
87
+
88
+
89
+ <!-- if includes -->
90
+
91
+ <div id="section">
92
+
93
+ <div id="class-list">
94
+ <h3 class="section-bar">Classes and Modules</h3>
95
+
96
+ Class <a href="Operations/Copy.html" class="link">Diff::GDiff::Operations::Copy</a><br />
97
+ Class <a href="Operations/Data.html" class="link">Diff::GDiff::Operations::Data</a><br />
98
+
99
+ </div>
100
+
101
+ <div id="constants-list">
102
+ <h3 class="section-bar">Constants</h3>
103
+
104
+ <div class="name-list">
105
+ <table summary="Constants">
106
+ <tr class="top-aligned-row context-row">
107
+ <td class="context-item-name">BYTE</td>
108
+ <td>=</td>
109
+ <td class="context-item-value">[&quot;c&quot;, 2**7-1, 1]</td>
110
+ <td width="3em">&nbsp;</td>
111
+ <td class="context-item-desc">
112
+ Define type packs and length
113
+
114
+ </td>
115
+ </tr>
116
+ <tr class="top-aligned-row context-row">
117
+ <td class="context-item-name">UBYTE</td>
118
+ <td>=</td>
119
+ <td class="context-item-value">[&quot;C&quot;, 2**8-1, 1]</td>
120
+ </tr>
121
+ <tr class="top-aligned-row context-row">
122
+ <td class="context-item-name">USHORT</td>
123
+ <td>=</td>
124
+ <td class="context-item-value">[&quot;n&quot;, 2**16-1, 2]</td>
125
+ </tr>
126
+ <tr class="top-aligned-row context-row">
127
+ <td class="context-item-name">INT</td>
128
+ <td>=</td>
129
+ <td class="context-item-value">[&quot;N&quot;, 2**31-1, 4]</td>
130
+ </tr>
131
+ <tr class="top-aligned-row context-row">
132
+ <td class="context-item-name">LONG</td>
133
+ <td>=</td>
134
+ <td class="context-item-value">[&quot;Q&quot;, 2**63-1, 8]</td>
135
+ </tr>
136
+ </table>
137
+ </div>
138
+ </div>
139
+
140
+
141
+
142
+
143
+
144
+
145
+ <!-- if method_list -->
146
+
147
+
148
+ </div>
149
+
150
+
151
+ <div id="validator-badges">
152
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
153
+ </div>
154
+
155
+ </body>
156
+ </html>
@@ -0,0 +1,246 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: Diff::GDiff::Operations::Copy</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">Diff::GDiff::Operations::Copy</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../../files/lib/gdiff_rb.html">
59
+ lib/gdiff.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Object
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+ <div id="description">
82
+ <p>
83
+ A <a href="Copy.html">Copy</a> operation copies part of the source file to
84
+ the target file.
85
+ </p>
86
+ <p>
87
+ The <a href="Copy.html#M000015">pack</a> operation may create multiple copy
88
+ operations if neccessary.
89
+ </p>
90
+
91
+ </div>
92
+
93
+
94
+ </div>
95
+
96
+ <div id="method-list">
97
+ <h3 class="section-bar">Methods</h3>
98
+
99
+ <div class="name-list">
100
+ <a href="#M000014">new</a>&nbsp;&nbsp;
101
+ <a href="#M000015">pack</a>&nbsp;&nbsp;
102
+ <a href="#M000017">to_s</a>&nbsp;&nbsp;
103
+ <a href="#M000016">unpack_if_match</a>&nbsp;&nbsp;
104
+ </div>
105
+ </div>
106
+
107
+ </div>
108
+
109
+
110
+ <!-- if includes -->
111
+
112
+ <div id="section">
113
+
114
+
115
+ <div id="constants-list">
116
+ <h3 class="section-bar">Constants</h3>
117
+
118
+ <div class="name-list">
119
+ <table summary="Constants">
120
+ <tr class="top-aligned-row context-row">
121
+ <td class="context-item-name">TYPES</td>
122
+ <td>=</td>
123
+ <td class="context-item-value">[ [249, USHORT, UBYTE], [250, USHORT, USHORT], [251, USHORT, INT], [252, INT, UBYTE], [253, INT, USHORT], [254, INT, INT], [255, LONG, INT] ]</td>
124
+ <td width="3em">&nbsp;</td>
125
+ <td class="context-item-desc">
126
+ Codes and maximum sizes
127
+
128
+ </td>
129
+ </tr>
130
+ </table>
131
+ </div>
132
+ </div>
133
+
134
+
135
+
136
+ <div id="attribute-list">
137
+ <h3 class="section-bar">Attributes</h3>
138
+
139
+ <div class="name-list">
140
+ <table>
141
+ <tr class="top-aligned-row context-row">
142
+ <td class="context-item-name">length</td>
143
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
144
+ <td class="context-item-desc"></td>
145
+ </tr>
146
+ <tr class="top-aligned-row context-row">
147
+ <td class="context-item-name">position</td>
148
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
149
+ <td class="context-item-desc"></td>
150
+ </tr>
151
+ </table>
152
+ </div>
153
+ </div>
154
+
155
+
156
+
157
+ <!-- if method_list -->
158
+ <div id="methods">
159
+ <h3 class="section-bar">Public Class methods</h3>
160
+
161
+ <div id="method-M000014" class="method-detail">
162
+ <a name="M000014"></a>
163
+
164
+ <div class="method-heading">
165
+ <a href="Copy.src/M000014.html" target="Code" class="method-signature"
166
+ onclick="popupCode('Copy.src/M000014.html');return false;">
167
+ <span class="method-name">new</span><span class="method-args">(position, length)</span>
168
+ </a>
169
+ </div>
170
+
171
+ <div class="method-description">
172
+ <p>
173
+ Create a new <a href="Copy.html">Copy</a> object that copies length bytes
174
+ from the source string at position.
175
+ </p>
176
+ </div>
177
+ </div>
178
+
179
+ <div id="method-M000016" class="method-detail">
180
+ <a name="M000016"></a>
181
+
182
+ <div class="method-heading">
183
+ <a href="Copy.src/M000016.html" target="Code" class="method-signature"
184
+ onclick="popupCode('Copy.src/M000016.html');return false;">
185
+ <span class="method-name">unpack_if_match</span><span class="method-args">(string, position)</span>
186
+ </a>
187
+ </div>
188
+
189
+ <div class="method-description">
190
+ <p>
191
+ Takes a string and a position and returns the position after this operation
192
+ and a new operation object if the operation starting at the position is a
193
+ <a href="Copy.html">Copy</a> operation. Otherwise returns nil.
194
+ </p>
195
+ </div>
196
+ </div>
197
+
198
+ <h3 class="section-bar">Public Instance methods</h3>
199
+
200
+ <div id="method-M000015" class="method-detail">
201
+ <a name="M000015"></a>
202
+
203
+ <div class="method-heading">
204
+ <a href="Copy.src/M000015.html" target="Code" class="method-signature"
205
+ onclick="popupCode('Copy.src/M000015.html');return false;">
206
+ <span class="method-name">pack</span><span class="method-args">()</span>
207
+ </a>
208
+ </div>
209
+
210
+ <div class="method-description">
211
+ <p>
212
+ Create a binary representation in gdiff format.
213
+ </p>
214
+ </div>
215
+ </div>
216
+
217
+ <div id="method-M000017" class="method-detail">
218
+ <a name="M000017"></a>
219
+
220
+ <div class="method-heading">
221
+ <a href="Copy.src/M000017.html" target="Code" class="method-signature"
222
+ onclick="popupCode('Copy.src/M000017.html');return false;">
223
+ <span class="method-name">to_s</span><span class="method-args">()</span>
224
+ </a>
225
+ </div>
226
+
227
+ <div class="method-description">
228
+ <p>
229
+ Return a readable representation of the operation
230
+ </p>
231
+ </div>
232
+ </div>
233
+
234
+
235
+ </div>
236
+
237
+
238
+ </div>
239
+
240
+
241
+ <div id="validator-badges">
242
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
243
+ </div>
244
+
245
+ </body>
246
+ </html>