Sponsored Content
Top Forums Programming How to render solid borders in NCURSES windows Post 302330260 by tetsujin on Tuesday 30th of June 2009 04:21:08 PM
Old 06-30-2009
Quote:
Originally Posted by ku@ntum
Anyone please.

I really need to know how can I make my ncurses to draw solid lines.

Kashif
What is the code you're using to try to draw the solid lines? Are you using the ACS constants defined by NCurses, or are you just writing out extended-ASCII character codes?

You might want to check out some existing source code that does this - for instance, the "menuconfig" code in the Linux kernel (/usr/src/linux/scripts/kconfig/lxdialog/) - grep for ACS and you can find where it is done.

Using the ACS constants from the ncurses header is the portable solution, it will work correctly or fail gracefully on different types of terminals as long as they're set up correctly.

If you really find using ACS constants too complicated, there's an alternate option: there's a character attribute constant defined in ncurses.h called "A_ALTCHARSET". When this attribute is active, it will allow you to write out characters from the whole PC character set range - including those glyphs associated with control characters and those in the upper half of the character set. This solution is not portable, however - it's only for text consoles on PCs.

Now, I don't know if this information will solve your problem. I haven't tested this stuff. If you want me to help you further, try this stuff out. If it still doesn't work then you can provide more information about what your code is doing, and maybe I can help you out.

Last edited by tetsujin; 06-30-2009 at 05:43 PM..
 

4 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

batch render

I'm interested in getting unix in my pc, can someone tell me where and how can I get it. I'm a complete virgin about unix, I work in 3d animation and i need unix to make batch rendering work in Maya. Another question is: how do I know what hardware is compatible with unix and do I need any drivers... (1 Reply)
Discussion started by: Vitor
1 Replies

2. Shell Programming and Scripting

Tables and borders

when i do this: cat HITS i get the following displayed: sport.hits:87.114.172.31 Thu Sep 28 22:45:12 GMT 2006 how do i put this information into a bordered table? so it will output like this: ...........File /... (9 Replies)
Discussion started by: amatuer_lee_3
9 Replies

3. Shell Programming and Scripting

Help needed in sending file content with colors and borders

HI i am running a shell script in cron and storing the output of that script in a file say test.then i am copying the content of test to test1 and i will send the output of test to some email ids using mutt. Next time when the script executes i am comparing the contents of test and test1 and... (3 Replies)
Discussion started by: venkitesh
3 Replies

4. What is on Your Mind?

On ResearchGate: Researchers render cyberspace like a 3D video game ... by Katherine Lindemann

FYI. On ResearchGate: Researchers render cyberspace like a 3D video game to make identifying threats easier 24th July 2017 by Katherine Lindemann Cybersecurity analysts may soon be able to travel through cyberspace like outer space and see attacks with the naked eye. On ResearchGate:... (3 Replies)
Discussion started by: Neo
3 Replies
VLOCK(1)						      General Commands Manual							  VLOCK(1)

NAME
vlock - Virtual Console lock program SYNOPSIS
vlock vlock [ -a,--all ] [ -c,--current ] [ -h,--help ] [ -v,--version ] DESCRIPTION
vlock is a program to lock one or more sessions on the Linux console. This is especially useful for Linux machines which have multiple users with access to the console. One user may lock his or her session(s) while still allowing other users to use the system on other vir- tual consoles. If desired, the entire console may be locked and virtual console switching disabled. By default, only the current VC (virtual console) is locked. With the -a,-all option all VCs are locked. The locked VCs cannot be unlocked without the invoker's password or the root password. The root password will always be able to unlock any or all sessions. And, for the paranoid, vlock makes it a trying experience for those attempting to guess the password, so unauthorized access to session(s) is highly unlikely. Please note that it is entirely possible to completely lock yourself out of the console with the -a,--all option if you cannot remember your password! Unless you are able to kill vlock by logging in remotely via a serial terminal or network, a hard reset is the only method of ``unlocking'' the display. vlock works for console sessions primarily. However, there is support for trying to lock non-console sessions as well, but that support has not been well tested. OPTIONS
-a,--all Lock all console sessions and disable VC switching. -c,--current Lock the current session (this is the default). -h,--help Print a brief help message. -v,--version Print the version number of vlock. AUTHOR
Michael K. Johnson <johnsonm@redhat.com> Linux User's Manual 16 May 1996 VLOCK(1)
All times are GMT -4. The time now is 08:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy