Screen Editing

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tak-Shing Chan

    #16
    Re: Screen Editing

    On Thu, 17 Aug 2006, Thomas Dickey wrote:
    Tak-Shing Chan <t.chan@gold.ac .ukwrote:
    >On Thu, 17 Aug 2006, Thomas Dickey wrote:
    >
    >>Andrew Smallshaw <andrews@sdf.lo nestar.orgwrote :
    >>>
    >>>Most terminals, particularly modern ones, will clear the screen if
    >>>you simply send them a formfeed. It's not guaranteed, but it's a
    >>>
    >>you're confused. Whether you've observed a particular terminal driver,
    >>or a user application is probably irrelevant.
    >
    > I don't think Andrew is confused. I think you are.
    >
    hmm. I have a list in mind. Which "modern" one clears the screen
    when you send a form-feed to it?
    Andrew wrote: ``it's not guaranteed''. Which part of ``it's
    not guaranteed'' you don't understand?

    Tak-Shing

    Comment

    • Tak-Shing Chan

      #17
      Re: Screen Editing

      On Thu, 17 Aug 2006, Thomas Dickey wrote:
      Thomas Dickey <dickey@saltmin e.radix.netwrot e:
      >Tak-Shing Chan <t.chan@gold.ac .ukwrote:
      >>On Thu, 17 Aug 2006, Thomas Dickey wrote:
      >
      >>>Andrew Smallshaw <andrews@sdf.lo nestar.orgwrote :
      >>>>
      >>>>Most terminals, particularly modern ones, will clear the screen if
      >>>>you simply send them a formfeed. It's not guaranteed, but it's a
      >>>>
      >>>you're confused. Whether you've observed a particular terminal driver,
      >>>or a user application is probably irrelevant.
      >
      >> I don't think Andrew is confused. I think you are.
      >
      >hmm. I have a list in mind. Which "modern" one clears the screen
      >when you send a form-feed to it?
      >
      It occurs to me that you don't know
      (googling to get a sense of your background makes that apparent).
      >
      A quick check shows putty doing this. vt100/etc don't. putty, of course,
      is not a vt100 emulator (or xterm, etc). xterm and anything that emulates
      vt100 will simply move the cursor to the next line.
      >
      There's some useful information on vt100.net which you might read before
      wasting more bandwidth.
      All irrelevant to my point. By the way, PuTTY is more
      "modern" than vt100, but I suppose you are not aware of this
      (judging from what you wrote above).

      Tak-Shing

      Comment

      • Thomas Dickey

        #18
        Re: Screen Editing

        Tak-Shing Chan <t.chan@gold.ac .ukwrote:
        On Thu, 17 Aug 2006, Thomas Dickey wrote:
        >Tak-Shing Chan <t.chan@gold.ac .ukwrote:
        >>On Thu, 17 Aug 2006, Thomas Dickey wrote:
        >>
        >>>Andrew Smallshaw <andrews@sdf.lo nestar.orgwrote :
        >>>>
        >>>>Most terminals, particularly modern ones, will clear the screen if
        >>>>you simply send them a formfeed. It's not guaranteed, but it's a
        >>>>
        >>>you're confused. Whether you've observed a particular terminal driver,
        >>>or a user application is probably irrelevant.
        >>
        >> I don't think Andrew is confused. I think you are.
        >>
        >hmm. I have a list in mind. Which "modern" one clears the screen
        >when you send a form-feed to it?
        Andrew wrote: ``it's not guaranteed''. Which part of ``it's
        not guaranteed'' you don't understand?
        Indeed. You don't know the answer to my question, so you're attempting
        to justify it by changing the question.

        --
        Thomas E. Dickey
        Thomas Dickey develops/maintains widely-used tools and libraries for software development (diffstat, yacc, mawk) and terminals (ncurses, lynx, xterm)

        ftp://invisible-island.net

        Comment

        • Tak-Shing Chan

          #19
          Re: Screen Editing

          On Thu, 17 Aug 2006, Thomas Dickey wrote:
          Tak-Shing Chan <t.chan@gold.ac .ukwrote:
          >On Thu, 17 Aug 2006, Thomas Dickey wrote:
          >
          >>Tak-Shing Chan <t.chan@gold.ac .ukwrote:
          >>>On Thu, 17 Aug 2006, Thomas Dickey wrote:
          >>>
          >>>>Andrew Smallshaw <andrews@sdf.lo nestar.orgwrote :
          >>>>>
          >>>>>Most terminals, particularly modern ones, will clear the screen if
          >>>>>you simply send them a formfeed. It's not guaranteed, but it's a
          >>>>>
          >>>>you're confused. Whether you've observed a particular terminal driver,
          >>>>or a user application is probably irrelevant.
          >>>
          >>> I don't think Andrew is confused. I think you are.
          >>>
          >>hmm. I have a list in mind. Which "modern" one clears the screen
          >>when you send a form-feed to it?
          >
          > Andrew wrote: ``it's not guaranteed''. Which part of ``it's
          >not guaranteed'' you don't understand?
          >
          Indeed. You don't know the answer to my question, so you're attempting
          to justify it by changing the question.
          I don't need to know the answer, since Steve Summit's C-FAQ
          19.4 covered this (``for clearing the screen, a halfway portable
          solution is to print a form-feed character ('\f'), which will
          cause some displays to clear''). Presumably, those displays that
          would clear are still in use.

          Tak-Shing

          Comment

          • Thomas Dickey

            #20
            Re: Screen Editing

            Tak-Shing Chan <t.chan@gold.ac .ukwrote:
            On Thu, 17 Aug 2006, Thomas Dickey wrote:
            >Thomas Dickey <dickey@saltmin e.radix.netwrot e:
            >>Tak-Shing Chan <t.chan@gold.ac .ukwrote:
            >>>On Thu, 17 Aug 2006, Thomas Dickey wrote:
            >>
            >>>>Andrew Smallshaw <andrews@sdf.lo nestar.orgwrote :
            >>>>>
            >>>>>Most terminals, particularly modern ones, will clear the screen if
            >>>>>you simply send them a formfeed. It's not guaranteed, but it's a
            >>>>>
            >>>>you're confused. Whether you've observed a particular terminal driver,
            >>>>or a user application is probably irrelevant.
            >>
            >>> I don't think Andrew is confused. I think you are.
            >>
            >>hmm. I have a list in mind. Which "modern" one clears the screen
            >>when you send a form-feed to it?
            >>
            >It occurs to me that you don't know
            >(googling to get a sense of your background makes that apparent).
            >>
            >A quick check shows putty doing this. vt100/etc don't. putty, of course,
            >is not a vt100 emulator (or xterm, etc). xterm and anything that emulates
            >vt100 will simply move the cursor to the next line.
            >>
            >There's some useful information on vt100.net which you might read before
            >wasting more bandwidth.
            All irrelevant to my point. By the way, PuTTY is more
            "modern" than vt100, but I suppose you are not aware of this
            (judging from what you wrote above).
            not at all. The statement was that

            "most terminals, particularly modern ones",

            fall into this category. Offhand, I know that xterm, gnome-terminal,
            konsole, mlterm, rxvt (and kindred) all emulate this feature of vt100.
            Even Linux console, now that I think of it.

            Now again - where's your list?

            I'll give a hint: one is smaller than six (even lumping together rxvt,
            Eterm, aterm, wterm, mterm and rxvt-unicode). There are of course
            other terminal emulators running only in Windows - but most of those
            emulate vt100 reasonably well (and it's unlikely that many of them would
            have such an easily observed defect). Still, you're welcome to make a
            list, and (for the edification of _your_ peers), convince them that
            a list of one item makes a general case.

            bye

            --
            Thomas E. Dickey
            Thomas Dickey develops/maintains widely-used tools and libraries for software development (diffstat, yacc, mawk) and terminals (ncurses, lynx, xterm)

            ftp://invisible-island.net

            Comment

            • Thomas Dickey

              #21
              Re: Screen Editing

              Tak-Shing Chan <t.chan@gold.ac .ukwrote:
              I don't need to know the answer, since Steve Summit's C-FAQ
              rofl...
              19.4 covered this (``for clearing the screen, a halfway portable
              solution is to print a form-feed character ('\f'), which will
              cause some displays to clear''). Presumably, those displays that
              would clear are still in use.
              The faq does contain some archaisms (and outright errors).

              p.s: appeals to authority are generally regarded as inferior to direct
              observation - something to consider if you choose to pursue a
              technical career ;-)

              --
              Thomas E. Dickey
              Thomas Dickey develops/maintains widely-used tools and libraries for software development (diffstat, yacc, mawk) and terminals (ncurses, lynx, xterm)

              ftp://invisible-island.net

              Comment

              • Tak-Shing Chan

                #22
                Re: Screen Editing

                On Thu, 17 Aug 2006, Thomas Dickey wrote:
                Tak-Shing Chan <t.chan@gold.ac .ukwrote:
                >
                > I don't need to know the answer, since Steve Summit's C-FAQ
                >
                rofl...
                >
                >19.4 covered this (``for clearing the screen, a halfway portable
                >solution is to print a form-feed character ('\f'), which will
                >cause some displays to clear''). Presumably, those displays that
                >would clear are still in use.
                >
                The faq does contain some archaisms (and outright errors).
                >
                p.s: appeals to authority are generally regarded as inferior to direct
                observation - something to consider if you choose to pursue a
                technical career ;-)
                Direct observations aren't always statistically significant.

                Tak-Shing

                Comment

                • Thomas Dickey

                  #23
                  Re: Screen Editing

                  Tak-Shing Chan <t.chan@gold.ac .ukwrote:
                  On Thu, 17 Aug 2006, Thomas Dickey wrote:
                  >The faq does contain some archaisms (and outright errors).
                  >>
                  >p.s: appeals to authority are generally regarded as inferior to direct
                  > observation - something to consider if you choose to pursue a
                  > technical career ;-)
                  Direct observations aren't always statistically significant.
                  You forgot to cite an authority for that claim.

                  --
                  Thomas E. Dickey
                  Thomas Dickey develops/maintains widely-used tools and libraries for software development (diffstat, yacc, mawk) and terminals (ncurses, lynx, xterm)

                  ftp://invisible-island.net

                  Comment

                  • Mark McIntyre

                    #24
                    Re: Screen Editing

                    On Thu, 17 Aug 2006 22:40:44 +0100, in comp.lang.c , Tak-Shing Chan
                    <t.chan@gold.ac .ukwrote:

                    (stuff to some guy called Dickey).

                    Chan, given that my kill filters automatically picked this guy up, I
                    suspect "Dickey" is a sock puppet for an existing troll. I suggest you
                    killfile him.
                    --
                    Mark McIntyre

                    "Debugging is twice as hard as writing the code in the first place.
                    Therefore, if you write the code as cleverly as possible, you are,
                    by definition, not smart enough to debug it."
                    --Brian Kernighan

                    Comment

                    • Thomas Dickey

                      #25
                      Re: Screen Editing

                      Mark McIntyre <markmcintyre@s pamcop.netwrote :
                      On Thu, 17 Aug 2006 22:40:44 +0100, in comp.lang.c , Tak-Shing Chan
                      <t.chan@gold.ac .ukwrote:
                      (stuff to some guy called Dickey).
                      hmm - this seems to be your usual level, so I won't follow your lead.
                      Chan, given that my kill filters automatically picked this guy up, I
                      suspect "Dickey" is a sock puppet for an existing troll. I suggest you
                      killfile him.
                      not at all.
                      Unlike present company, I happen to know what I'm talking about.

                      --
                      Thomas E. Dickey

                      ftp://invisible-island.net

                      Comment

                      • Keith Thompson

                        #26
                        Re: Screen Editing

                        "Ancient_Hacker " <grg2@comcast.n etwrites:
                        [...]
                        and it's not clear terminal control falls under the baliwick of the C
                        language or th standard C libraries..
                        In fact, it's perfectly clear that terminal control does *not* fall
                        under the bailiwick of the standard C language and library.
                        The most portable way is dorky, but works most every place I can think
                        of:
                        >
                        >
                        for( i=1; i <= 66 + 24 /* for those TALL full page displays,plus
                        lagniappe */; i++ )
                        puts( "\n" );
                        There's no reason to assume that the terminal window is no taller than
                        66 rows. I'm typing this in a 65-row window, and I could easily
                        expand it.

                        Also, depending on what kind of terminal or emulator you're using, the
                        "erased" lines can just be scrolled off the top of the screen/window,
                        where they can be recovered. If I clear the screen, it's often
                        because I want to erase some sensitive information, and scrolling it
                        out of sight isn't good enough.

                        And, of course, it leaves the cursor at the bottom of the window.

                        Clearing the screen, or, more generally, controlling cursor position,
                        is one of those things that can *almost* be done in standard C with
                        some really ugly tricks, but there's almost always a much cleaner
                        system-specific solution. Don't waste your time trying to do it
                        portably.

                        --
                        Keith Thompson (The_Other_Keit h) kst-u@mib.org <http://www.ghoti.net/~kst>
                        San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
                        We must do something. This is something. Therefore, we must do this.

                        Comment

                        • Keith Thompson

                          #27
                          Re: Screen Editing

                          Andrew Smallshaw <andrews@sdf.lo nestar.orgwrite s:
                          [...]
                          Most terminals, particularly modern ones, will clear the screen if
                          you simply send them a formfeed. It's not guaranteed, but it's a
                          similar kind of assumption to backspace will move the cursor left
                          which seems pretty much standard these days.
                          I haven't found that to be the case for any of the terminal emulators
                          I use. I've just tried xterm, dtterm, gnome-terminal, a Windows
                          command window, the GNU "screen" program, and rxvt; none of them clear
                          the screen in response to a formfeed character.

                          --
                          Keith Thompson (The_Other_Keit h) kst-u@mib.org <http://www.ghoti.net/~kst>
                          San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
                          We must do something. This is something. Therefore, we must do this.

                          Comment

                          • Tak-Shing Chan

                            #28
                            Re: Screen Editing

                            On Thu, 17 Aug 2006, Thomas Dickey wrote:
                            Mark McIntyre <markmcintyre@s pamcop.netwrote :
                            >On Thu, 17 Aug 2006 22:40:44 +0100, in comp.lang.c , Tak-Shing Chan
                            ><t.chan@gold.a c.ukwrote:
                            >
                            >(stuff to some guy called Dickey).
                            >
                            hmm - this seems to be your usual level, so I won't follow your lead.
                            >
                            >Chan, given that my kill filters automatically picked this guy up, I
                            >suspect "Dickey" is a sock puppet for an existing troll. I suggest you
                            >killfile him.
                            >
                            not at all.
                            Unlike present company, I happen to know what I'm talking about.
                            Really? Do you know anything about these 120 terminals?
                            According to my termcap (yes, appealing to authority again), they
                            all respond to form feeds by clearing the screen:

                            glasstty|classi c glass tty interpreting ASCII control characters:\
                            pmcons|pmconsol e|PMAX console:\
                            ibmpcx|xenix|ib mx|IBM PC xenix console display:\
                            ofcons:\
                            rcons|BSD rasterconsole:\
                            rcons-color|BSD rasterconsole with ANSI color:\
                            bsdos-sparc|Sun SPARC BSD/OS Console:\
                            mterm|mouse-sun|Der Mouse term:\
                            mgr|Bellcore MGR (non X) window system terminal emulation:\
                            mgr-sun|Mgr window with Sun keyboard:\
                            mgr-linux|Mgr window with Linux keyboard:\
                            oldsun|Sun Microsystems Workstation console:\
                            sun-il|Sun Microsystems console with working insert-line:\
                            sun-cgsix|sun-ss5|Sun SparcStation 5 console:\
                            sun|sun1|sun2|S un Microsystems Inc. workstation console:\
                            sun-s|Sun Microsystems Workstation window with status line:\
                            sun-e-s|sun-s-e|Sun Microsystems Workstation with status hacked for emacs:\
                            sun-48|Sun 48-line window:\
                            sun-34|Sun 34-line window:\
                            sun-24|Sun 24-line window:\
                            sun-17|Sun 17-line window:\
                            sun-12|Sun 12-line window:\
                            sun-1|Sun 1-line window for sysline:\
                            sun-e|sun-nic|sune|Sun Microsystems Workstation without insert character:\
                            sun-c|sun-cmd|Sun Microsystems Workstation console with scrollable history:\
                            sun-type4|Sun Workstation console with type 4 keyboard:\
                            psterm|psterm-basic|NeWS psterm-80x34:\
                            psterm-96x48|NeWS psterm 96x48:\
                            psterm-90x28|NeWS psterm 90x28:\
                            psterm-80x24|NeWS psterm 80x24:\
                            psterm-fast|NeWS psterm fast version (flaky ctrl chars):\
                            next|NeXT console:\
                            wyse-vp|Wyse 50 in ADDS Viewpoint emulation mode with "enhance" on:\
                            rbcomm|IBM PC with RBcomm and EMACS keybindings:\
                            rbcomm-nam|IBM PC with RBcomm without autowrap:\
                            rbcomm-w|IBM PC with RBcomm in 132 column mode:\
                            att5620-s|tty5620-s|layer|vitty|5 620 S layer:\
                            aas1901|Ann Arbor K4080 w/S1901 mod:\
                            regent|Adds Regent Series:\
                            regent100|Adds Regent 100:\
                            regent20|Adds Regent 20:\
                            regent25|Adds Regent 25:\
                            regent40|Adds Regent 40:\
                            regent40+|Adds Regent 40+:\
                            regent60|regent 200|Adds Regent 60:\
                            viewpoint|addsv iewpoint|adds viewpoint:\
                            screwpoint|adds viewpoint with ^O bug:\
                            vp60|viewpoint6 0|addsvp60|adds viewpoint60:\
                            cdc721|CDC Viking:\
                            cdc721ll|CDC Vikingll:\
                            cdc721-esc|Control Data 721:\
                            dg-generic|Generic Data General terminal in DG mode:\
                            dg200|data general dasher 200:\
                            dg211|Data General d211:\
                            dg450|dg6134|da ta general 6134:\
                            dg6053-old|dg100|data general 6053:\
                            dg6053|6053|605 3-dg|dg605x|605x| 605x-dg|d2|d2-dg|Data General DASHER 6053:\
                            d200|d200-dg|Data General DASHER D200:\
                            d210-dg|d214-dg|Data General DASHER D210 series in DG mode:\
                            d211-dg|d215-dg|Data General DASHER D211 series in DG mode:\
                            d216-dg|d216e-dg|d216+dg|d216 e+dg|d217-dg|Data General DASHER D216 series in DG mode:\
                            d220-dg|Data General DASHER D220 color terminal in DG mode:\
                            d230c-dg|d230-dg|Data General DASHER D230C in DG mode:\
                            d400|d400-dg|d450|d450-dg|Data General DASHER D400/D450 series:\
                            d410-dg|d460-dg|d411-dg|d461-dg|Data General DASHER D410/D460 series in DG mode:\
                            d412-dg|d462-dg|d462e-dg|d412+dg|d462 +dg|d413-dg|d463-dg|Data General DASHER D412/D462 series in DG mode:\
                            d430c-dg|d430-dg|Data General D430C in DG mode:\
                            d430c-dg-ccc|d430-dg-ccc|Data General D430C in DG mode with configurable colors:\
                            d470c-dg|d470-dg|Data General DASHER D470C in DG mode:\
                            d555-dg|Data General DASHER D555 series in DG mode:\
                            d577-dg|d578-dg|Data General DASHER D577/D578 series in DG mode:\
                            dm1520|dm1521|d atamedia 1520:\
                            dt80-sas|Datamedia DT803/DTX for SAS usage:\
                            hz1000|hazeltin e 1000:\
                            ibm-apl|apl|IBM apl terminal simulator:\
                            i100|gt100|gt10 0a|General Terminal 100A (formerly Infoton 100):\
                            addrinfo:\
                            infoton:\
                            prism9|p9|P9|MD C Prism-9 in ANSII mode:\
                            prism9-w|p9-w|P9-W|MDC Prism-9 in 132 column mode:\
                            prism12|p12|P12 |MDC Prism-12 in ANSI mode:\
                            prism12-w|p12-w|P12-W|MDC Prism-12 in 132 column mode:\
                            prism14|p14|P14 |MDC Prism-14 in ANSII mode:\
                            prism14-w|p14-w|P14-W|MDC Prism-14 in 132 column mode:\
                            p8gl|prism8gl|M cDonnell-Douglas Prism-8 alternate definition:\
                            mime314|mm314|m ime 314:\
                            ncr7900i|ncr790 0|ncr 7900 model 1:\
                            ncr7900iv|ncr 7900 model 4:\
                            ncr7901|ncr 7901 model:\
                            uts30|sperry uts30 with cp/m@1R1:\
                            vc415|volker-craig 415:\
                            ibm-pc|ibm5051|5051 |IBM Personal Computer (no ANSI.SYS):\
                            appleIIgs|apple IIe|appleIIc|Ap ple 80 column firmware interface:\
                            apple-ae|ASCII Express:\
                            appleII|apple ii plus:\
                            apple-uterm-vb|Videx Ultraterm for Apple micros with Visible Bell:\
                            apple-uterm|Ultraterm for Apple micros:\
                            lisa|apple lisa console display (black on white):\
                            liswb|apple lisa console display (white on black):\
                            mac|macintosh|M acintosh with MacTerminal:\
                            mac-w|macterminal-w|Apple Macintosh with Macterminal in 132 column mode:\
                            trs2|trsII|trs8 0II|Radio Shack Model II using P&T CP/M:\
                            trs16|trs-80 model 16 console:\
                            minitel1|minite l 1:\
                            minitel1b|minit el 1-bistandard (in 40cols mode):\
                            blit|jerq|blit running teletype rom:\
                            cbblit|fixterm| blit running columbus code:\
                            oblit|ojerq|fir st version of blit rom:\
                            cg7900|chromati cs|chromatics 7900:\
                            intertube|inter tec|Intertec InterTube:\
                            intertube2|inte rtec data systems intertube 2:\
                            rca|rca vp3301/vp3501:\
                            swtp|ct82|south west technical products ct82:\
                            t3700|dumb teleray 3700:\
                            t3800|teleray 3800 series:\
                            apollo|apollo console:\
                            aws|Convergent Technologies AWS workstation under UTX and Xenix:\
                            awsc|Convergent Technologies AWS workstation under CTOS:\
                            aj510|Anderson-Jacobson model 510:\
                            d132|datagraphi x|datagraphix 132a:\
                            teletec|Teletec Datascreen:\

                            Tak-Shing

                            Comment

                            • Tak-Shing Chan

                              #29
                              Re: Screen Editing

                              On Thu, 17 Aug 2006, Keith Thompson wrote:
                              Andrew Smallshaw <andrews@sdf.lo nestar.orgwrite s:
                              [...]
                              >Most terminals, particularly modern ones, will clear the screen if
                              >you simply send them a formfeed. It's not guaranteed, but it's a
                              >similar kind of assumption to backspace will move the cursor left
                              >which seems pretty much standard these days.
                              >
                              I haven't found that to be the case for any of the terminal emulators
                              I use. I've just tried xterm, dtterm, gnome-terminal, a Windows
                              command window, the GNU "screen" program, and rxvt; none of them clear
                              the screen in response to a formfeed character.
                              I have just posted a long list elsethread.

                              Tak-Shing

                              Comment

                              • Steve Summit

                                #30
                                Re: Screen Editing

                                Keith Thompson writes:
                                >Andrew Smallshaw <andrews@sdf.lo nestar.orgwrite s:
                                >Most terminals, particularly modern ones, will clear the screen if
                                >you simply send them a formfeed. It's not guaranteed, but...
                                >
                                I haven't found that to be the case for any of the terminal emulators
                                I use. I've just tried xterm, dtterm, gnome-terminal, a Windows
                                command window, the GNU "screen" program, and rxvt; none of them clear
                                the screen in response to a formfeed character.
                                I had no idea that \f had fallen into disuse.
                                I'm updating FAQ 19.4 accordingly.
                                --
                                Steve Summit
                                scs@eskimo.com

                                Comment

                                Working...