MuTerminal communication command and library

About 'mt_set' command

'mt_set' command changes character code under MuTerminal. If you use it within shell script, you can use any character code without fail.

How to use 'mt_set'

'mt_set' has following options.

-a Get all information from MuTerminal.
-c Get character code from MuTerminal.
-h Show help.
-s code Set code to MuTerminal
-v Check terminal whether MuTerminal.

Sample shell script:

#!/bin/sh
#
# At first, check this terminal whether MuTerminal.
# 'mt_set -v' is return code zero that execute on MuTerminal.

mt_set -v && {

#
# Save now character code on $NOW_CODE
#
NOW_CODE=`mt_set -c`
#
# Set character code to MuTerminal, and export TTYPE.
#
mt_set -s SJIS
export TTYPE=SJIS
echo set coding is [$NOW_CODE]

# execute command. (host 'r2.niftyserve.or.jp' supports
# Shift-JIS code only.
telnet r2.niftyserve.or.jp

#
# Restore code.
#
export TTYPE=$NOW_CODE
mt_set -s $NOW_CODE
echo restore coding is [$TTYPE]

}
#end of script

MuTerminal communication library 'libmuterm.a'

"libmuterm.a" is a library that communicate to MuTerminal process, and set/get MuTerminal's current character code from your applications. 'mt_set' command uses this library too.

libmuterm.a has following functions.

int check_muterm (void) Check terminal whether MuTerminal. If terminal is MuTerminal, this function return zero, else return -1.
int get_coding (void) Get character code from MuTerminal.
int set_coding (int32 coding) Set coding to MuTerminal.

If you want this library, including "muterm.h" file, and add "-lmuterm" option to linker.





MuTerminal Help File : mtset.html,v
Last modified : 1999/10/02 15:10:38