File: migemo-index.rb

package info (click to toggle)
migemo 0.40-7.2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 4,208 kB
  • ctags: 123
  • sloc: ruby: 892; sh: 555; makefile: 119
file content (23 lines) | stat: -rw-r--r-- 537 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#
# Ruby/Migemo - a library for Japanese incremental search.
#
# Copyright (C) 2001 Satoru Takabayashi <satoru@namazu.org>
#     All rights reserved.
#     This is free software with ABSOLUTELY NO WARRANTY.
#
# You can redistribute it and/or modify it under the terms of 
# the GNU General Public License version 2.
#
# NOTE: Ruby/Migemo can work only with EUC_JP encoding. ($KCODE="e")
#

#
# Index Migemo's dictionary.
#
offset = 0
while line = gets
  unless line =~ /^;/
    print [offset].pack("N")
  end
  offset += line.length
end