#! /usr/local/bin/scm \ %0 %1 %2 %3 %4 %5 %6 %7 %8 %9 - !# (define (go-script) (define args (list-tail *argv* *optind*)) (cond ((not *script*)) ((<= 1 (length args) 2) (print (apply jtype args))) (else (display "\ \ Usage: jtype input-file [c-length] \ Categorizes the Japanese coding system used in INPUT-FILE. JTYPE prints jis, eucj, or sjis, bin, or ascii. If optional C-LENGTH argument is given, up to C-LENGTH characters are checked (default is 5000). http://swissnet.ai.mit.edu/~jaffer/jfilter " (current-error-port)) (exit #f)))) (require 'jfilter) (define (jtype input-file . c-length) (if (null? c-length) (judge-file input-file) (judge-file input-file (string->number (car c-length))))) (go-script) ;;; Local Variables: ;;; mode:scheme ;;; End: