lexical for terminal attributes? - VMS

This is a discussion on lexical for terminal attributes? - VMS ; Hi, Something like F$GETJPI("", "TT_TERMCOLS")? Or do I have to parse SHOW TERM/BRIEF ? -- Ron Johnson, Jr. Jefferson LA USA Give a man a fish, and he eats for a day. Hit him with a fish, and he goes ...

+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 20 of 24

Thread: lexical for terminal attributes?

  1. lexical for terminal attributes?

    Hi,

    Something like F$GETJPI("", "TT_TERMCOLS")?

    Or do I have to parse SHOW TERM/BRIEF ?

    --
    Ron Johnson, Jr.
    Jefferson LA USA

    Give a man a fish, and he eats for a day.
    Hit him with a fish, and he goes away for good!

  2. Re: lexical for terminal attributes?

    On 9/28/07, Ron Johnson wrote:
    > Hi,
    >
    > Something like F$GETJPI("", "TT_TERMCOLS")?
    >
    > Or do I have to parse SHOW TERM/BRIEF ?


    To get the width of a terminal, use

    f$getd("tt","devbufsiz")

    as in

    $ write sys$output f$getd("tt","devbufsiz")

    Ken

  3. Re: lexical for terminal attributes?

    On 09/28/07 08:07, Ken Robinson wrote:
    > On 9/28/07, Ron Johnson wrote:
    >> Hi,
    >>
    >> Something like F$GETJPI("", "TT_TERMCOLS")?
    >>
    >> Or do I have to parse SHOW TERM/BRIEF ?

    >
    > To get the width of a terminal, use
    >
    > f$getd("tt","devbufsiz")
    >
    > as in
    >
    > $ write sys$output f$getd("tt","devbufsiz")


    Thanks.

    --
    Ron Johnson, Jr.
    Jefferson LA USA

    Give a man a fish, and he eats for a day.
    Hit him with a fish, and he goes away for good!

  4. Re: lexical for terminal attributes?

    In article <4701A2B9.D2084B51@spam.comcast.net>, David J Dachtera writes:
    > I note, also, that this happens on Telnet sessions; however, when connected via
    > the COM port to the serial console, changing the screen width locally does not
    > produce a difference before/after in SHOW TERMINAL.


    With a Telnet session, there is a metadata stream flowing between client
    and server along with the character data stream.

    See RFC 1073 (Telnet window size option).

    Window size negotiation is part of the Telnet protocol. See RFC 1073
    (Telnet window size option).

    There is an escape convention that the client can use to inject a window
    size modification into the TCP data stream. Note that this is within the
    TCP stream, not within the character data stream. Telnet multiplexes
    a character data steam (delivered with perfect binary fidelity)
    and a metadata stream through a single TCP connection.

    For instance, to change window size to 84 by 24 you would put this
    binary sequence in the TCP stream.

    FF FA 1F 00 54 00 18
    ^^ ^^ ^^ ^^^^^ ^^^^^
    || || || ||||| 24 lines
    || || || 84 columns
    || || NAWS (window size negotiation)
    IAC SB

    (Decode based on cursory reading of protocol -- I don't do telnet
    at this level as a usual thing).


    When you're plugged directly into the console port from your workstation's
    COM1, you don't have any out-of-band data path. All you're passing is
    the character data. And window size isn't carried in the character data
    stream.

  5. Re: lexical for terminal attributes?

    briggs@encompasserve.org wrote:
    > [snip]
    > When you're plugged directly into the console port from your workstation's
    > COM1, you don't have any out-of-band data path. All you're passing is
    > the character data. And window size isn't carried in the character data
    > stream.


    Figgered (Fingered) as much... ;-)

    --
    David J Dachtera
    dba DJE Systems
    http://www.djesys.com/

    Unofficial OpenVMS Marketing Home Page
    http://www.djesys.com/vms/market/

    Unofficial Affordable OpenVMS Home Page:
    http://www.djesys.com/vms/soho/

    Unofficial OpenVMS-IA32 Home Page:
    http://www.djesys.com/vms/ia32/

    Unofficial OpenVMS Hobbyist Support Page:
    http://www.djesys.com/vms/support/

  6. Re: lexical for terminal attributes?

    Bob Koehler wrote:
    > In article <1191031786.524350.276810@g4g2000hsf.googlegroups.c om>, AEF writes:
    >> When is it not? Sometimes the terminal may different from the SET
    >> TERMINAL width, but the defbufsiz always gives the latter, no?

    >
    > I have seen the defbufsiz vary from the actual width, which matched
    > the width reported by "show terminal". I don't know under what
    > circumstances this occurs, I just remember seeing it and realizing I
    > could not rely on defbufsiz in sylogin.


    A couple of decades ago it could happen if one changed the VT terminal
    from 80 to 132 or the other way around in the terminal config.

    In that case VMS did not know that the width has changed.

    $ SET TERM/WID=n

    both send the proper escape sequence to the terminal to get it to
    change and update VMS.

    Arne

  7. Re: lexical for terminal attributes?

    Arne Vajh°j wrote:
    > Bob Koehler wrote:
    >> In article <1191031786.524350.276810@g4g2000hsf.googlegroups.c om>,
    >> AEF writes:
    >>> When is it not? Sometimes the terminal may different from the SET
    >>> TERMINAL width, but the defbufsiz always gives the latter, no?

    >>
    >> I have seen the defbufsiz vary from the actual width, which matched
    >> the width reported by "show terminal". I don't know under what
    >> circumstances this occurs, I just remember seeing it and realizing I
    >> could not rely on defbufsiz in sylogin.

    >
    > A couple of decades ago it could happen if one changed the VT terminal
    > from 80 to 132 or the other way around in the terminal config.
    >
    > In that case VMS did not know that the width has changed.
    >
    > $ SET TERM/WID=n
    >
    > both send the proper escape sequence to the terminal to get it to
    > change and update VMS.


    I do not think you can get the real terminal width from a lexical.

    But a program can ask the terminal for the info.

    See code below.

    Arne

    PS: That code require a damn good terminal emulator to work !

    ================================================== =========

    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include

    int main()
    {
    short int chan,iosb[4];
    int h,w;
    char inq[]="\x1B[\"v";
    char buf[80];
    char *p1,*p2,*p3;
    $DESCRIPTOR(ttdesc,"TT:");
    sys$assign(&ttdesc,&chan,0,0);
    sys$qiow(0,chan,IO$_WRITEVBLK,0,0,0,inq,strlen(inq ),0,0,0,0);
    sys$qiow(0,chan,IO$_READVBLK|IO$M_NOECHO|IO$M_TIME D,iosb,0,0,
    &buf,sizeof(buf),2,0,0,0);
    sys$qiow(0,chan,IO$_READVBLK|IO$M_NOECHO|IO$M_TIME D,iosb,0,0,
    &buf,sizeof(buf),2,0,0,0);
    buf[iosb[1]]='\0';
    sys$dassgn(chan);
    p1=buf;
    while(!isdigit(*p1)) p1++;
    p2=strchr(buf,';');
    p3=strchr(p1+1,';');
    *p2='\0';
    *p3='\0';
    h=atoi(p1);
    w=atoi(p2+1);
    printf("Terminal display %d x %d\n",h,w);
    return SS$_NORMAL;
    }

  8. Re: lexical for terminal attributes?

    Arne Vajh°j wrote:
    > PS: That code require a damn good terminal emulator to work !


    ....particularly since it is using a feature which is not documented:

    \E["v


    --
    Thomas E. Dickey
    http://invisible-island.net
    ftp://invisible-island.net

  9. Re: lexical for terminal attributes?

    On Oct 26, 7:06 am, Thomas Dickey wrote:
    > Arne Vajh°j wrote:
    > > PS: That code require a damn good terminal emulator to work !

    >
    > ...particularly since it is using a feature which is not documented:
    >
    > \E["v
    >
    > --
    > Thomas E. Dickeyhttp://invisible-island.netftp://invisible-island.net


    Yeah I seem to recall many a screen manager (FMS, DECforms?) to get
    the width by telling the terminal to place the cursor a far lower
    right corner (99,999) and then ask for a cursor report.

    fwiw,
    Hein.


  10. Re: lexical for terminal attributes?

    Hein RMS van den Heuvel wrote:
    > On Oct 26, 7:06 am, Thomas Dickey wrote:
    >> Arne Vajh?j wrote:
    >> > PS: That code require a damn good terminal emulator to work !

    >>
    >> ...particularly since it is using a feature which is not documented:
    >>
    >> \E["v


    > Yeah I seem to recall many a screen manager (FMS, DECforms?) to get
    > the width by telling the terminal to place the cursor a far lower
    > right corner (99,999) and then ask for a cursor report.


    That's documented (it's using the VT100 device status report,
    which is used by xterm's "resize" utility).

    But I don't recall seeing the other - perhaps some feature of VT300 or
    later.

    --
    Thomas E. Dickey
    http://invisible-island.net
    ftp://invisible-island.net

  11. Re: lexical for terminal attributes?

    Thomas Dickey wrote:
    > Arne Vajh°j wrote:
    >> PS: That code require a damn good terminal emulator to work !

    >
    > ...particularly since it is using a feature which is not documented:
    >
    > \E["v


    It is documented.

    Try Google for DECRQDE.

    Arne

  12. Re: lexical for terminal attributes?

    Thomas Dickey wrote:
    > But I don't recall seeing the other - perhaps some feature of VT300 or
    > later.


    VT400 I think.

    But then the VT400 is not exactly brand new. Wikipedia claims 1990.

    I am sure that your terminal emulator is newer than that.

    But I will not guarantee that it has implemented that sequence. Not
    exactly a top of the list feature.

    Arne

  13. Re: lexical for terminal attributes?

    Arne Vajh°j wrote:
    > Thomas Dickey wrote:
    >> Arne Vajh°j wrote:
    >>> PS: That code require a damn good terminal emulator to work !

    >>
    >> ...particularly since it is using a feature which is not documented:
    >>
    >> \E["v


    > It is documented.


    > Try Google for DECRQDE.


    sure (recall that I suggested that it was for a vt300+, since it was
    not for a vt100 or vt220). google shows it for a vt520.

    Just to point out that your example should have had the caveat that
    it was able to ask _some_ terminal for the width - not that it has
    anything to do with how good the emulator is.

    --
    Thomas E. Dickey
    http://invisible-island.net
    ftp://invisible-island.net

  14. Re: lexical for terminal attributes?

    Thomas Dickey wrote:
    > Arne Vajh°j wrote:
    >> Thomas Dickey wrote:
    >>> Arne Vajh°j wrote:
    >>>> PS: That code require a damn good terminal emulator to work !
    >>> ...particularly since it is using a feature which is not documented:
    >>>
    >>> \E["v

    >
    >> It is documented.

    >
    >> Try Google for DECRQDE.

    >
    > sure (recall that I suggested that it was for a vt300+, since it was
    > not for a vt100 or vt220). google shows it for a vt520.
    >
    > Just to point out that your example should have had the caveat that
    > it was able to ask _some_ terminal for the width - not that it has
    > anything to do with how good the emulator is.


    It is in VT400 series as well.

    I find it much more likely that people have a terminal emulator
    that are missing obscure features than one that only supports
    VT300 series.

    Arne

  15. Re: lexical for terminal attributes?

    Arne Vajh°j wrote:

    > I find it much more likely that people have a terminal emulator
    > that are missing obscure features than one that only supports
    > VT300 series.


    oh. You forgot to tell us which terminal emulators you're using.
    (it has to be more than one, given your postings in this thread).

    --
    Thomas E. Dickey
    http://invisible-island.net
    ftp://invisible-island.net

  16. Re: lexical for terminal attributes?

    Thomas Dickey wrote:
    > Arne Vajh°j wrote:
    >> I find it much more likely that people have a terminal emulator
    >> that are missing obscure features than one that only supports
    >> VT300 series.

    >
    > oh. You forgot to tell us which terminal emulators you're using.
    > (it has to be more than one, given your postings in this thread).


    I tried with Reflection and Putty, if you think it is relevant.

    Arne

  17. Re: lexical for terminal attributes?

    Arne Vajh°j wrote:
    > Thomas Dickey wrote:
    >> Arne Vajh°j wrote:
    >>> I find it much more likely that people have a terminal emulator
    >>> that are missing obscure features than one that only supports
    >>> VT300 series.

    >>
    >> oh. You forgot to tell us which terminal emulators you're using.
    >> (it has to be more than one, given your postings in this thread).


    > I tried with Reflection and Putty, if you think it is relevant.


    I see. Reading PuTTY's source code, it appears that it doesn't support
    the control sequence we were discussing. I took it for granted the
    Reflection does, but your comments would only make sense if there
    was a second example that you had at hand.

    --
    Thomas E. Dickey
    http://invisible-island.net
    ftp://invisible-island.net

  18. Re: lexical for terminal attributes?

    Thomas Dickey wrote:
    > Arne Vajh°j wrote:
    >> Thomas Dickey wrote:
    >>> Arne Vajh°j wrote:
    >>>> I find it much more likely that people have a terminal emulator
    >>>> that are missing obscure features than one that only supports
    >>>> VT300 series.
    >>> oh. You forgot to tell us which terminal emulators you're using.
    >>> (it has to be more than one, given your postings in this thread).

    >
    >> I tried with Reflection and Putty, if you think it is relevant.

    >
    > I see. Reading PuTTY's source code, it appears that it doesn't support
    > the control sequence we were discussing. I took it for granted the
    > Reflection does, but your comments would only make sense if there
    > was a second example that you had at hand.


    My comments was more based on general experience with "not widely
    used features of VT terminals".

    Another good candidate for not working in a terminal emulator
    is loading soft character sets.

    Arne

  19. Re: lexical for terminal attributes?

    In article <47523574$0$90262$14726298@news.sunsite.dk>, =?ISO-8859-1?Q?Arne_Vajh=F8j?= writes:
    >{...snip...}
    >My comments was more based on general experience with "not widely
    >used features of VT terminals".


    I'm presently supporting/maintaining a product that relies upon faithful
    VT escape sequence reproduction. The PeeCee terminal emulators are pale
    in comparison to a real VT. This caused many problems for me at a major
    pharmaceutical company who was using both real VT terminals in their dis-
    section labs and PeeCee emulators in other labs. The resultant displays
    were so disparate that they never purchased the software. A problem with
    my product? No! But, thanks to half-baked VT emulation, this product is
    not in use there now. I've been on the back of this particular emulator
    group since the days when they used to hawk it at the DECUS trade shows.
    It's still quite lacking in VT functionality, IMHO, despite its popular-
    ity.

    I have used the VT-TEST suite (which I believe has been published on one
    or more of the VMS Freeware CDs) against real VTs I have here and sever-
    al of the more often touted PeeCee terminal emulators. The basic escape
    sequences are often fine, but nest several and the results are worlds a-
    part from the real VT.

    I have augmented the VT-TEST with my own suite of additional tests. The
    results are even more dramatic and pronounced.

    I also have one application that makes use of SMG menu features. It does
    what is expected on a VT but on a PeeCee with Reflections, it falls flat
    on its face. It's a very simple nested menu scheme and it shouldn't fall
    to pieces under Reflections but it does.



    >Another good candidate for not working in a terminal emulator
    >is loading soft character sets.


    Yup. Are there any that support it? I don't believe so. I know of one
    company in Europe that would *LOVE* to have soft character sets function
    with the terminal emulators in use.

    --
    VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)COM

    "Well my son, life is like a beanstalk, isn't it?"

    http://tmesis.com/drat.html

  20. Re: lexical for terminal attributes?

    VAXman- @SendSpamHere.ORG wrote:
    > In article <47523574$0$90262$14726298@news.sunsite.dk>, =?ISO-8859-1?Q?Arne_Vajh=F8j?= writes:
    >> Another good candidate for not working in a terminal emulator
    >> is loading soft character sets.

    >
    > Yup. Are there any that support it? I don't believe so. I know of one
    > company in Europe that would *LOVE* to have soft character sets function
    > with the terminal emulators in use.


    It seems to work with Reflection.

    I have two soft fonts and they are displayed on Reflection. I do not
    have a real VT anymore, so I can not compare the visual. But they
    look similar to how I remember them.

    Arne

+ Reply to Thread
Page 1 of 2 1 2 LastLast