Recent Entries
Archives
Search


Links
Powered by
Movable Type 2.64

2008年05月01日

エスケープシーケンスそしてputty

某N社COBOLからOpenCOBOLからの印刷を検討していて(;´Д`)
印刷時のフォントの取扱いとか、罫線レイアウトの取扱いとかどうするべ?って考えているうちに指が自然と cat /etc/termcap してしまう今日この頃。


# FONTS: The UNIX PC also has a strange interpretation of "alternate
# character set". Rather than the VT100 graphics you might expect, it allows
# up to 8 custom fonts to be loaded at any given time. This means that
# programs expecting VT100 graphics will usually be disappointed. For this
# reason I have disabled the smacs/rmacs sequences, but they could easily be
# re-enabled. Here are the relevant control sequences (from the ESCAPE(7)
# manpage), should you wish to do so:
#
# SGR10 - Select font 0 - ESC [ 10 m or SO
# SGR11 - Select font 1 - ESC [ 11 m or SI
# SGR12 - Select font 2 - ESC [ 12 m
# ... (etc.)
# SGR17 - Select font 7 - ESC [ 17 m

まあフォント種の切り替えはこれで良いかな。または手作業での変換が楽になるようにフォント名指定可能にして ^[["FONTNAME"SF ^[["FONTNAME"DF とか。COLUMNは必要なら "^[[数字H"でやるとしてレイアウトファイルの読み込みはどうするかな。^[["filename"L (とかにしとくか(いい加減)。改ページは\f吐いてくるようなのでこれを処理すればいいかな。(;´Д`)とか

 今回は通信量は問題じゃないし、速度も気にしなくていいので結構冗長でも可動性が良ければOKOK。コード中のフォント指定やカラム指定のコードの代わりに FILLER部分に入れるんだし。

で termcap見てて気づいたんだけどTERMに teratermとか puttyとか指定できるのね。今度試しみるかな。puttyつかってるときの動作がxtermよりもputtyの方が落ち着いてるかもしれんから。

参考:http://bjh21.me.uk/all-escapes/all-escapes.txt

Posted by minemaz at 2008年05月01日 16:08
トラックバック
このエントリーのトラックバックURL:
http://www.lancard.com/mt/mt-tb.cgi/437

Comments
Post a comment









Remember personal info?