Xterm终端和调整大小代码 [英] Xterm terminal and resize code

查看:265
本文介绍了Xterm终端和调整大小代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在转换一个非常老的25岁以上的应用程序。

I am in progress of converting a really old 25+ year old application .

它发送一个转义序列以使屏幕132个字符宽...

但是它没有用,我把XTERM均衡器似乎

It sends an escape sequence to make the SCREEN 132 characters wide...
However it didnt work and i put the XTERM equilivment that seems to work in most cases..

这是

"\x1B[8;50;132t"

尽管屏幕调整成功,但是还是有问题
这是COBOL程序用来执行命令的代码

Although the screen resizes with success there is an issue Here is the code that the COBOL program uses to execute the command

   pg -f FILETOSHOW

使用通过内容DS-REC使用呼叫系统

,其中DS-REC是上述命令。...

using CALL "SYSTEM" USING BY CONTENT DS-REC
where DS-REC is the above command....

问题是,尽管屏幕调整大小数据是使用先前的设置进行打印的,但是...再次调用该程序解决了问题并可以正确打印...

没有人知道我是否也应该发送另一个转义代码吗?

The problem is that although screen resizes data are printed with the previous settings... Calling again the program solves the issue and prints correctly...
Doesnt anybody knows whether i should send another escape code also?

推荐答案

请勿依赖这些转义码。 xterm不会将自身设置为大于屏幕的大小。因此,如果用户具有足够大的字体和/或很小的屏幕,则他将不会自动获得其132x50终端,而自动调整大小的用户将更少。
(例如lucida控制台,在1024x600上的15pt位置上减去任务栏,WM装饰为我提供了85x28个单元的空间。)

Do not rely on these escape codes. xterm will not set itself to a size greater than the screen. So given the user has a large-enough font and/or a small-enough screen, he will not get his 132x50 terminal automatically, much less will the automatic sizing do it. (E.g. lucida console at 15pt on 1024x600 minus a taskbar and WM deco gives me room for 85x28 cells.)

如果您的程序需要如此笨拙的vt大小的尺寸为132x50,则要求用户提出要求。或者只是让您的程序实际上以任何可变大小运行。

If your program requires such an awkward vt size of 132x50, request it of the user as a prerequisite. Or just make your program actually run on any variable size.

这篇关于Xterm终端和调整大小代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆