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



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Need to serach if a new line character exists on the last line in a file sunilbm78 UNIX for Dummies Questions & Answers 10 02-29-2008 02:15 PM
how to add new line character ravi.sadani19 Shell Programming and Scripting 3 11-23-2007 03:26 AM
delete a line based on first character of the line borncrazy UNIX for Dummies Questions & Answers 2 12-06-2005 03:27 PM
Drawing abrd600 Shell Programming and Scripting 3 08-23-2005 11:38 AM
end of the line character zomboo Shell Programming and Scripting 5 12-30-2004 05:30 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-07-2002
zecoj zecoj is offline
Registered User
  
 

Join Date: Mar 2002
Posts: 3
Angry Line-drawing character!

Hi guys,
I'm trying to make my program to print out tables usings line-drawing character (alternate char. set) with Curses Library. However, it always prints out control characters (^@) instead of the correct ones.

code example:
mvwaddch(my_window, 23, 12, ACS_RTEE);

appreciate your help, i'm new here
  #2 (permalink)  
Old 03-08-2002
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
Well this was a new one on me. I didn't know that curses had this capability. But I've been looking over the documentation and I'll make a couple of guesses.

First, are you sure that your terminal can draw lines this way? Almost no one actually uses a true vt-100. Instead you may have a terminal that is emulating a vt-100 or you may be using a program like xterm that emulates a vt-100. xterm can only do what the font can do. My xterm cannot draw lines. But I'm not going to try any different fonts to see what I can do. So the first thing I would try is to write a non-curses program that sends the correct character string to the terminal and verify that it is possible.

If the terminal can really draw lines, the next thing to worry about is the terminfo entry. You may need to write a new one. I have seen several cases where complex curses stuff did not work because the OS came with a poor terminfo entry. I think that the manufacters simply ensure that the terminfo entry can run vi. They can't be testing it much beyond that from what I've seen.
  #3 (permalink)  
Old 03-08-2002
zecoj zecoj is offline
Registered User
  
 

Join Date: Mar 2002
Posts: 3
actually, I've looked over all possiblities. And I'm sure that my can display line-drawing chars. If you want, you could try this on your terminal:
"tput smacs", type some stuff and "tput rmacs". You'll see what's going on.

i have a binary in my directory and it also uses curses (ncurses, perhaps), guess what, it display all the line-drawing chars correctly, one by one. But I couldn't contact the author. so bad...
thanks for your help
  #4 (permalink)  
Old 03-08-2002
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
Quote:
Originally posted by zecoj
actually, I've looked over all possiblities. And I'm sure that my can display line-drawing chars. If you want, you could try this on your terminal:
"tput smacs", type some stuff and "tput rmacs". You'll see what's going on.
I just tried, no dice. What OS are you using? What terminal? It doesn't work for me on either SunOS nor HP-UX. I am using an NCD xterminal and my xterms are using:
-bitstream-terminal-medium-r-normal--18-140-100-100-c-110-iso8859-1 for the font.
  #5 (permalink)  
Old 03-08-2002
zecoj zecoj is offline
Registered User
  
 

Join Date: Mar 2002
Posts: 3
i'm using sun, and gnome-terminal. did you try to man?
  #6 (permalink)  
Old 03-10-2002
AtleRamsli AtleRamsli is offline
Registered User
  
 

Join Date: Feb 2002
Location: Brabant, Belgium
Posts: 65
This brings back faint memories. Here is what you might call 'line-drawing-characters' (seriously):

+-------------------+
| 1. Make backup |
| 2. Scripsit |
| 3. Profile-16 |
| |
+-------------------+

This was as far as my old Multitech terminals would go.

You probably need to get a 'real' terminal and see what happens, and to what extent the line-drawing capabilities are supported.
There must be piles of VT-52's in the attics of the world (I have one, but no keyboard!).

Then, you must look for a way to unite all those soft-terms. I have 4 PC's and 1 workstation, and the terminals are called 'ansi', 'vt-100', 'cons25', 'dtterm', ... all trying to do the same thing (emulate a DEC VT-100).
You must probably settle on the least common denominator, or do as suggested, write a new termcap entry, which must be part of your application. BEWARE: Your termcap entry can quickly become two, three, etc.

Atle
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:36 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0