- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- 'C' printf - Highlight, Reverse Video
Operating System - HP-UX
1755703
Members
3701
Online
108837
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-04-2002 06:49 AM
тАО04-04-2002 06:49 AM
I'm using 'C' and the printf command to do text output to a VT220. Is it possible to turn on highlighting or reverse video in this mode?
If so, can someone point me to some documentation?
TIA!
Tom
If so, can someone point me to some documentation?
TIA!
Tom
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-04-2002 06:57 AM
тАО04-04-2002 06:57 AM
Solution
Hi Tom:
Yes, it is possible but you are really going about it in the wrong way. You should be using the 'curses' package so that the video functions do not rely on hard-coded sequences. If you use curses, the the reverse video, cursor positioning, underlining, graphics, ... are all determined at run-time by reading the terminfo database that are in turn determined by the setting of the TERM environment variable. The beauty of this method is that this will work with any defined terminal and you don't have to change a line of code. Man curses for details.
Regards, Clay
Yes, it is possible but you are really going about it in the wrong way. You should be using the 'curses' package so that the video functions do not rely on hard-coded sequences. If you use curses, the the reverse video, cursor positioning, underlining, graphics, ... are all determined at run-time by reading the terminfo database that are in turn determined by the setting of the TERM environment variable. The beauty of this method is that this will work with any defined terminal and you don't have to change a line of code. Man curses for details.
Regards, Clay
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-04-2002 07:01 AM
тАО04-04-2002 07:01 AM
Re: 'C' printf - Highlight, Reverse Video
You should probably have a look at using curses library routines for this task. See the curses_intro(3x) and curses(5) man pages for further details.
If you want to do it yourself, the following page contains the vt220 escape sequences:
http://www.fastlane.net/~generic9/vt220.html
Regards,
Steve
If you want to do it yourself, the following page contains the vt220 escape sequences:
http://www.fastlane.net/~generic9/vt220.html
Regards,
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-04-2002 07:15 AM
тАО04-04-2002 07:15 AM
Re: 'C' printf - Highlight, Reverse Video
If you dont like to do a full implementation of curses, you can do a little trick:
BOLD=`tput bold`
UND=`tput smul`
END_UND=`tput sgr0`
use getenv in your c source and use it:
char *bold;
bold=getenv("BOLD"):
printf (" %s, bold \n", bold);
I guess c code is write ( it so long to me...).
BOLD=`tput bold`
UND=`tput smul`
END_UND=`tput sgr0`
use getenv in your c source and use it:
char *bold;
bold=getenv("BOLD"):
printf (" %s, bold \n", bold);
I guess c code is write ( it so long to me...).
unsupported
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP