&get_char_attribute
&get_chars_matching
&get_chars_containing
- &get_chars_matching
&get_chars_for
&de_er
&ids_argc
# Preloaded methods go here.
my $DB_HOME="";
-if(-e '/usr/local/lib/chise/char-db'){
- $DB_HOME='/usr/local/lib/chise/char-db';
-}elsif(-e '/usr/local/lib/xemacs-21.4.11/i686-pc-linux/char-db'){
- $DB_HOME='/usr/local/lib/xemacs-21.4.11/i686-pc-linux/char-db';
-}elsif(-e '/usr/local/lib/xemacs-21.4.11/powerpc-apple-darwin6.4/char-db'){
- $DB_HOME='/usr/local/lib/xemacs-21.4.11/powerpc-apple-darwin6.4/char-db';
-}elsif(-e '/usr/local/xemacs-utf2000/lib/xemacs-21.4.11/powerpc-apple-darwin6.4/char-db'){
- $DB_HOME='/usr/local/xemacs-utf2000/lib/xemacs-21.4.11/powerpc-apple-darwin6.4/char-db';
-}elsif(-e '/usr/local/lib/xemacs-21.4.10/i686-pc-linux/char-db'){
- $DB_HOME='/usr/local/lib/xemacs-21.4.10/i686-pc-linux/char-db';
-}elsif(-e '/usr/local/lib/xemacs-21.4.10/powerpc-apple-darwin6.4/char-db'){
- $DB_HOME='/usr/local/lib/xemacs-21.4.10/powerpc-apple-darwin6.4/char-db';
-}elsif(-e '/usr/local/xemacs-utf2000/lib/xemacs-21.4.10/powerpc-apple-darwin6.4/char-db'){
- $DB_HOME='/usr/local/xemacs-utf2000/lib/xemacs-21.4.10/powerpc-apple-darwin6.4/char-db';
-}elsif(-e 'd:/work/chise/char-db'){
- $DB_HOME='d:/work/chise/char-db';
-}else{
- print STDERR "No database found.\n";
- print STDERR "Pleas set \$DB_HOME to Chise_utils.pm.\n";
- exit 1;
+unless($DB_HOME){
+ if(-e '/usr/local/lib/chise/db'){
+ $DB_HOME='/usr/local/lib/chise/db';
+ }elsif(-e '/usr/lib/chise/db'){
+ $DB_HOME='/usr/lib/chise/db';
+ }elsif(-e '/sw/lib/chise/db'){
+ $DB_HOME='/sw/lib/chise/db';
+ }elsif(-e '/usr/local/lib/chise/char-db'){
+ $DB_HOME='/usr/local/lib/chise/char-db';
+ }elsif(-e 'd:/work/chise/char-db'){
+ $DB_HOME='d:/work/chise/char-db';
+ }else{
+ print STDERR "No database found.\n";
+ print STDERR "Pleas set \$DB_HOME to Chise_utils.pm.\n";
+ exit 1;
+ }
}
$idc="\x{2ff0}-\x{2fff}";
'M','ideograph-daikanwa',
);
-for (glob "$DB_HOME/system-char-id/*"){
- next if(/\.txt$/);
- $atr=$_;
- $atr=~s!$DB_HOME/system-char-id/!!;
- $db{$atr}=$_;
-}
-
-for (glob "$DB_HOME/*"){
- next if(/\.txt$/ or /system-char-id/);
- $atr=$_;
- $atr=~s!$DB_HOME/!!;
- $reverse_db{$atr}=$_."/system-char-id";
+if(-d "$DB_HOME/character"){
+ for (glob "$DB_HOME/character/feature/*"){
+ next if(/\.txt$/);
+ $atr=$_;
+ $atr=~s!$DB_HOME/character/feature/!!;
+ $db{$atr}=$_;
+ }
+ for (glob "$DB_HOME/character/by-feature/*"){
+ next if(/\.txt$/);
+ $atr=$_;
+ $atr=~s!$DB_HOME/character/feature/!!;
+ $reverse_db{$atr}=$_;
+ }
+}elsif(-d "$DB_HOME/system-char-id"){
+ for (glob "$DB_HOME/system-char-id/*"){
+ next if(/\.txt$/);
+ $atr=$_;
+ $atr=~s!$DB_HOME/system-char-id/!!;
+ $db{$atr}=$_;
+ }
+ for (glob "$DB_HOME/*"){
+ next if(/\.txt$/ or /system-char-id/);
+ $atr=$_;
+ $atr=~s!$DB_HOME/!!;
+ $reverse_db{$atr}=$_."/system-char-id";
+ }
+}else{
+ print STDERR "No database found.\n";
+ print STDERR "Pleas set \$DB_HOME to Chise_utils.pm correctly.\n";
+ exit 1;
}
sub get_db{