The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #7 (permalink)  
Old 06-30-2009
tetsujin tetsujin is offline
Registered User
  
 

Join Date: Apr 2009
Posts: 4
Quote:
Originally Posted by ku@ntum View Post
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 04:43 PM..