refine code.
authorimiyazaki <imiyazaki>
Tue, 28 Oct 2003 13:43:59 +0000 (13:43 +0000)
committerimiyazaki <imiyazaki>
Tue, 28 Oct 2003 13:43:59 +0000 (13:43 +0000)
add_adobecid.pl

index 1d5ac81..38f9546 100644 (file)
@@ -33,9 +33,9 @@ if($^O=~/darwin/){
 
 my $usage=<<EOF;
 Usage: perl $0 <CMAP file> <CHISE DB dir>
-    <CMAP file> UniJIS-UCS2-H, etc. available in Adobe Reader Directory.
+    <CMAP file> UniJIS-UTF16-H etc. available in Adobe Reader Directory.
     <CHISE DB dir> is directory to store BDB data,
-      typically /usr/local/lib/chise/db.
+      typically /usr/local/lib/chise/chise-db.
 EOF
 
 #my $db_home="/usr/local/lib/chise/char-db";
@@ -50,6 +50,9 @@ if(@ARGV==2){
        $db_home=$db_home."/character/feature";
     }elsif(-d "$db_home/system-char-id"){
        $db_home=$db_home."/system-char-id";
+    }else{
+       print STDERR $usage;
+       exit 1;
     }
 
     ($ciddb_filename=$cmapfile)=~s!^.*/(.*)$!"vnd-adobe-cid-".lc($1)!e;
@@ -59,7 +62,7 @@ if(@ARGV==2){
 unless(defined($cmapfile) and -f $cmapfile
        and $encoding=~/^=ucs\@(cns|gb|jis|ks)$/
        and -d $db_home){
-    print $usage;
+    print STDERR $usage;
     exit 1;
 }