home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!elroy.jpl.nasa.gov!usc!rpi!bu.edu!dartvax!coos.dartmouth.edu!platt
- From: platt@coos.dartmouth.edu (The Crouton Man)
- Newsgroups: comp.os.linux
- Subject: Re: Can you access a virtual console directly?
- Message-ID: <1992Sep16.010315.29093@dartvax.dartmouth.edu>
- Date: 16 Sep 92 01:03:15 GMT
- References: <1992Sep14.164729.28907@mits.mdata.fi> <1992Sep14.220800.12868@klaava.Helsinki.FI> <1992Sep15.164930.11353@mits.mdata.fi>
- Sender: news@dartvax.dartmouth.edu (The News Manager)
- Organization: Dartmouth College, Hanover, NH
- Lines: 49
-
- In article <1992Sep15.164930.11353@mits.mdata.fi> kennu@mits.mdata.fi (Kenneth Falck) writes:
- :In article <1992Sep14.220800.12868@klaava.Helsinki.FI> wirzeniu@klaava.Helsinki.FI (Lars Wirzenius) writes:
- :
- :>kennu@mits.mdata.fi (Kenneth Falck) writes:
- :>>It feels a bit dumb to use termcap-codes to handle the local output, if
- :>>you know you'll be using this terminal from the virtual consoles only.
- :
- :>[stuff deleted...]
- :>[ Does anybody else get tired of MS-DOS programmers whose first (and
- :>often enough only) thought is: ``How do I write directly to video
- :>memory?'' Perhaps we'll see requests for adding TSR support into Linux
- :>next. Urgh. ]
- :
- [stuff deleted ]
-
- :int main (void)
- :{
- : int curvt;
- : int cols, rows;
- : unsigned char *vtbuf;
- :
- : cols = vt_get_columns ();
- : rows = vt_get_rows ();
- : curvt = vt_get_current ();
- : vtbuf = vt_get_address (curvt);
- : vtbuf [0] = 'L'; vtbuf [1] = 0x07;
- : vtbuf [2] = 'i'; vtbuf [3] = 0x07;
- : vtbuf [4] = 'n'; vtbuf [5] = 0x07;
- : vtbuf [6] = 'u'; vtbuf [7] = 0x07;
- : vtbuf [8] = 'x'; vtbuf [9] = 0x07;
- : vt_update_buffers (curvt);
- : return 0;
- :}
-
- you can already do this for all terminals at once.
-
- int main()
- {
- ...
- initscr();
- standout()
- printw("Linux");
- standend();
- refresh();
- }
-
- man 3 curses
-
- croutons.
-