/usr/lib/gauche-0.9/0.9.1/x86_64-pc-linux-gnu/gauche-cesconv is in gauche 0.9.1-5.
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 | #!/usr/bin/gosh
;;;
;;; gauche-cesconv - a simple Gauche script to convert CESes
;;;
;; iconv-like script. useful to have during make process.
(use gauche.charconv)
(use gauche.parseopt)
(use file.filter)
(define (usage)
(print "Usage: gauche-cesconv [options] inputfile")
(print " -f, --from-code=encoding : input ces. can be '*jp' to guess.")
(print " -t, --to-code=encoding : output ces.")
(print " -o, --output=file : output file (instead of stdout)")
(print "When inputfile is omitted, input is taken from stdin.")
(print "when input/output ces is omitted, Gauche's native CES is used.")
(exit 0))
(define (process iport oport ices oces)
(copy-port (wrap-with-input-conversion iport ices)
(wrap-with-output-conversion oport oces)
:unit 'char))
(define (main args)
(let-args (cdr args) ((ices "f|from-code=s" (gauche-character-encoding))
(oces "t|to-code=s" (gauche-character-encoding))
(outfile "o|output=s" #f)
(#f "h|help" => (cut usage))
. files)
(file-filter (lambda (in out)
(let ((inp (wrap-with-input-conversion in ices))
(outp (wrap-with-output-conversion out oces)))
(copy-port inp outp :unit 'char)
(close-input-port inp)
(close-output-port outp)))
:input (or (and (pair? files) (car files))
(current-input-port))
:output (or outfile (current-output-port))
)
0))
;; Local variables:
;; mode: scheme
;; end:
|