/usr/share/skktools/dbm/makedbmdic5 is in skktools 1.3.2-2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | #!/usr/bin/perl
#########################################################
# makedbmdic(perl5) version 5.0 1995.10.17
#
# This software is placed in the public domain.
#
# Written by Masaaki Sato <msatoh@mrit.mei.co.jp>
# Matsushita Research Institute Tokyo, Inc.
# Human Interface Research Laboratry
# Tel 044-911-6351
# Fax 044-911-8760
#########################################################
# Author: Masaaki Sato <msatoh@mrit.mei.co.jp>
# Maintainer: Mikio Nakajima <minakaji@osaka.email.ne.jp>
# Version: $Id: makedbmdic5,v 1.1.1.1 2000/03/12 12:17:49 minakaji Exp $
# Keywords: jisyo, dbm, gdbm, perl
# Last Modified: $Date: 2000/03/12 12:17:49 $
use Getopt::Std;
getopts('BG');
our($opt_B, $opt_G);
if (defined $opt_B){
use DB_File;
use Fcntl;
}elsif (defined $opt_G){
use GDBM_File;
}
$dot=20;
$line=$dot * 50;
($dicname) = @ARGV;
die "Usage: makedbmdic [-B|G] dict-file-name\n" unless $dicname;
open(DIC,$dicname);
if (defined $opt_B){
tie %dbm_dic, DB_File, "$dicname.db", O_RDWR|O_CREAT, 0644, $DB_HASH ;
}elsif (defined $opt_G){
tie %dbm_dic, GDBM_File, "$dicname.gdbm", GDBM_NEWDB|GDBM_FAST, 0644, 0 ;
}else{
dbmopen(%dbm_dic,$dicname,0644);
}
print "\nmakedbmdic by msatoh\@mrit.mei.co.jp\n";
print "Make dbm format dic from SKK dic.\n";
print "The numbers mean how many lines have processed.\n";
print "A dot mean $dot lines, as you see.\n\n";
$|=1;
$max=0;
while(<DIC>){
$max++;
}
seek(DIC,0,0);
$count=0;
while(<DIC>){
($key,$cont)=m#^(.+)\s(/.+/)$#;
$dbm_dic{$key} = $cont;
$count++;
print "." if ($count % $dot) == 0;
if (($count % $line) == 0){
$per = $count*100/$max;
printf("%d[%5.2f%%]\n",$count,$per);
}
}
if (defined $opt_B || defined $opt_G){
untie(%dbm_dic);
}else{
dbmclose(%dbm_dic);
}
print " done.\n";
# end of makedbmdic5
|