daff 1.1.11 → 1.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,7 @@ require 'date'
12
12
  require_relative 'lib/hx_overrides'
13
13
  require_relative 'lib/lambda'
14
14
  require_relative 'lib/list'
15
- require_relative 'lib/imap'
15
+ require_relative 'lib/_list/list_iterator'
16
16
  require_relative 'lib/reflect'
17
17
  require_relative 'lib/string_buf'
18
18
  require_relative 'lib/sys'
@@ -56,13 +56,18 @@ require_relative 'lib/coopy/unit'
56
56
  require_relative 'lib/coopy/viewed_datum'
57
57
  require_relative 'lib/coopy/viterbi'
58
58
  require_relative 'lib/coopy/workspace'
59
+ require_relative 'lib/haxe/imap'
59
60
  require_relative 'lib/haxe/log'
60
61
  require_relative 'lib/haxe/ds/int_map'
61
62
  require_relative 'lib/haxe/ds/string_map'
62
63
  require_relative 'lib/haxe/format/json_parser'
63
64
  require_relative 'lib/haxe/format/json_printer'
64
65
  require_relative 'lib/haxe/io/bytes'
66
+ require_relative 'lib/haxe/io/bytes_buffer'
67
+ require_relative 'lib/haxe/io/input'
68
+ require_relative 'lib/haxe/io/bytes_input'
65
69
  require_relative 'lib/haxe/io/output'
70
+ require_relative 'lib/haxe/io/bytes_output'
66
71
  require_relative 'lib/haxe/io/eof'
67
72
  require_relative 'lib/haxe/io/error'
68
73
  require_relative 'lib/rb/boot'
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env ruby
2
+ # encoding: utf-8
3
+
4
+ module X_List
5
+ class ListIterator
6
+
7
+ def initialize(head)
8
+ @head = head
9
+ @val = nil
10
+ end
11
+
12
+ # protected - in ruby this doesn't play well with static/inline methods
13
+
14
+ attr_accessor :head
15
+ attr_accessor :val
16
+
17
+ public
18
+
19
+ def has_next
20
+ return @head != nil
21
+ end
22
+
23
+ def _next
24
+ @val = @head[0]
25
+ @head = @head[1]
26
+ return @val
27
+ end
28
+
29
+ end
30
+
31
+ end
@@ -3,6 +3,7 @@
3
3
 
4
4
  module Coopy
5
5
  class Bag
6
+ def get_size() puts "Abstract Bag.get_size called" end
6
7
  def getItem(x) puts "Abstract Bag.getItem called" end
7
8
  def getItemView() puts "Abstract Bag.getItemView called" end
8
9
  end
@@ -550,7 +550,7 @@ module Coopy
550
550
  class << self
551
551
  attr_accessor :version
552
552
  end
553
- @version = "1.1.11"
553
+ @version = "1.1.12"
554
554
 
555
555
  def Coopy.compare_tables(local,remote,flags = nil)
556
556
  ct = ::Coopy::CompareTable.new
@@ -200,7 +200,7 @@ module Format
200
200
 
201
201
  def parse_string
202
202
  start = @pos
203
- buf = StringBuf.new
203
+ buf_b = ""
204
204
  while(true)
205
205
  c = nil
206
206
  begin
@@ -210,7 +210,7 @@ module Format
210
210
  end
211
211
  break if c == 34
212
212
  if c == 92
213
- buf.b += @str[start,@pos - start - 1]
213
+ buf_b += @str[start,@pos - start - 1]
214
214
  begin
215
215
  index1 = @pos
216
216
  @pos+=1
@@ -218,17 +218,17 @@ module Format
218
218
  end
219
219
  case(c)
220
220
  when 114
221
- buf.b += [13].pack("U")
221
+ buf_b += [13].pack("U")
222
222
  when 110
223
- buf.b += [10].pack("U")
223
+ buf_b += [10].pack("U")
224
224
  when 116
225
- buf.b += [9].pack("U")
225
+ buf_b += [9].pack("U")
226
226
  when 98
227
- buf.b += [8].pack("U")
227
+ buf_b += [8].pack("U")
228
228
  when 102
229
- buf.b += [12].pack("U")
229
+ buf_b += [12].pack("U")
230
230
  when 47,92,34
231
- buf.b += [c].pack("U")
231
+ buf_b += [c].pack("U")
232
232
  when 117
233
233
  uc = nil
234
234
  begin
@@ -236,7 +236,7 @@ module Format
236
236
  uc = x.to_i
237
237
  end
238
238
  @pos += 4
239
- buf.b += [uc].pack("U")
239
+ buf_b += [uc].pack("U")
240
240
  else
241
241
  raise "Invalid escape sequence \\" + _hx_str([c].pack("U")) + " at position " + _hx_str((@pos - 1))
242
242
  end
@@ -245,8 +245,8 @@ module Format
245
245
  raise "Unclosed string"
246
246
  end
247
247
  end
248
- buf.b += @str[start,@pos - start - 1]
249
- return buf.b
248
+ buf_b += @str[start,@pos - start - 1]
249
+ return buf_b
250
250
  end
251
251
 
252
252
  def invalid_char
@@ -1,6 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
  # encoding: utf-8
3
3
 
4
+ module Haxe
4
5
  class IMap
5
6
  end
6
7
 
8
+ end
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env ruby
2
+ # encoding: utf-8
3
+
4
+ module Haxe
5
+ module Io
6
+ class BytesBuffer
7
+
8
+ # protected - in ruby this doesn't play well with static/inline methods
9
+
10
+ attr_accessor :b
11
+
12
+ public
13
+
14
+ attr_accessor :length
15
+ end
16
+
17
+ end
18
+ end
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env ruby
2
+ # encoding: utf-8
3
+
4
+ module Haxe
5
+ module Io
6
+ class BytesInput < ::Haxe::Io::Input
7
+ attr_accessor :position
8
+ attr_accessor :length
9
+ end
10
+
11
+ end
12
+ end
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env ruby
2
+ # encoding: utf-8
3
+
4
+ module Haxe
5
+ module Io
6
+ class BytesOutput < ::Haxe::Io::Output
7
+
8
+ # protected - in ruby this doesn't play well with static/inline methods
9
+
10
+ attr_accessor :b
11
+
12
+ public
13
+
14
+ attr_accessor :length
15
+
16
+ def write_byte(c)
17
+ @b.b.concat(c)
18
+ end
19
+
20
+
21
+ def write_bytes(buf,pos,len)
22
+ begin
23
+ raise ::Haxe::Io::Error.outside_bounds if pos < 0 || len < 0 || pos + len > buf.length
24
+ @b.b += buf.b.byteslice(pos,len)
25
+ end
26
+ return len
27
+ end
28
+
29
+ end
30
+
31
+ end
32
+ end
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+ # encoding: utf-8
3
+
4
+ module Haxe
5
+ module Io
6
+ class Input
7
+ end
8
+
9
+ end
10
+ end
@@ -7,7 +7,7 @@
7
7
  @length = 0
8
8
  end
9
9
 
10
- protected
10
+ # protected - in ruby this doesn't play well with static/inline methods
11
11
 
12
12
  attr_accessor :h
13
13
  attr_accessor :q
@@ -28,14 +28,7 @@
28
28
  end
29
29
 
30
30
  def iterator
31
- return { h: @h, has_next: lambda {
32
- return @h != nil
33
- }, _next: lambda {
34
- return nil if @h == nil
35
- x = @h[0]
36
- @h = @h[1]
37
- return x
38
- }}
31
+ return ::X_List::ListIterator.new(@h)
39
32
  end
40
33
 
41
34
  end
@@ -10,5 +10,9 @@
10
10
  # protected - in ruby this doesn't play well with static/inline methods
11
11
 
12
12
  attr_accessor :b
13
+
14
+ public
15
+
16
+ attr_accessor :length
13
17
  end
14
18
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daff
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.11
4
+ version: 1.1.12
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-09-03 00:00:00.000000000 Z
13
+ date: 2014-10-08 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description: Diff and patch tables
16
16
  email:
@@ -25,7 +25,6 @@ files:
25
25
  - lib/lib/type.rb
26
26
  - lib/lib/lambda.rb
27
27
  - lib/lib/reflect.rb
28
- - lib/lib/imap.rb
29
28
  - lib/lib/rb/boot.rb
30
29
  - lib/lib/rb/ruby_iterator.rb
31
30
  - lib/lib/value_type.rb
@@ -72,8 +71,14 @@ files:
72
71
  - lib/lib/sys/io/file_output.rb
73
72
  - lib/lib/sys/io/file.rb
74
73
  - lib/lib/sys/io/file_handle.rb
74
+ - lib/lib/_list/list_iterator.rb
75
75
  - lib/lib/string_buf.rb
76
+ - lib/lib/haxe/imap.rb
77
+ - lib/lib/haxe/io/bytes_buffer.rb
78
+ - lib/lib/haxe/io/input.rb
76
79
  - lib/lib/haxe/io/eof.rb
80
+ - lib/lib/haxe/io/bytes_input.rb
81
+ - lib/lib/haxe/io/bytes_output.rb
77
82
  - lib/lib/haxe/io/bytes.rb
78
83
  - lib/lib/haxe/io/error.rb
79
84
  - lib/lib/haxe/io/output.rb