473,382 Members | 1,396 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Boxline in curses ( Linux )

hai all,
I need a help from you. I 'm working in a project using "curses.h" in
Linux using 'C'. I have some doughts regarding menus and line.
1. I used to draw box in window using ACS_HLINE,ACS_VLINE. But what
happened is, the line is not a straight line. Instead of that it look
continus hypen ( - ) for HLINE and continuous ( | ) for VLINE.
I'm using curses version : 5.3.20030118 came along with RedHat 9.0 .
Please tellme how to draw straight line. ( It is working correctly
in version : 5.2.20020406 come along with RedHat 7.3 )

thanks,
Senthil kumar.M
Nov 14 '05 #1
7 2838
On 20 Feb 2004 22:03:02 -0800, ms*********@rediffmail.com (M.Senthil
Kumar) wrote in comp.lang.c:
hai all,
I need a help from you. I 'm working in a project using "curses.h" in
Linux using 'C'. I have some doughts regarding menus and line.
1. I used to draw box in window using ACS_HLINE,ACS_VLINE. But what
happened is, the line is not a straight line. Instead of that it look
continus hypen ( - ) for HLINE and continuous ( | ) for VLINE.
I'm using curses version : 5.3.20030118 came along with RedHat 9.0 .
Please tellme how to draw straight line. ( It is working correctly
in version : 5.2.20020406 come along with RedHat 7.3 )

thanks,
Senthil kumar.M


This group discusses the standard C language, which does not include
third party libraries and extensions like curses.

For Linux programming, ask in news:comp.os.linux.development.apps.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Nov 14 '05 #2
nrk
M.Senthil Kumar wrote:
hai all,
I need a help from you. I 'm working in a project using "curses.h" in
Linux using 'C'. I have some doughts regarding menus and line.
1. I used to draw box in window using ACS_HLINE,ACS_VLINE. But what
happened is, the line is not a straight line. Instead of that it look
continus hypen ( - ) for HLINE and continuous ( | ) for VLINE.
I'm using curses version : 5.3.20030118 came along with RedHat 9.0 .
Please tellme how to draw straight line. ( It is working correctly
in version : 5.2.20020406 come along with RedHat 7.3 )

thanks,
Senthil kumar.M


Your question is not topical in this group as we primarily discuss the C
language as described in the ANSI/ISO standards. Here are some groups
where you might find better guidance:

comp.unix.programmer
comp.os.linux.development.apps
comp.os.linux.development

Please do read their FAQs before posting though. You can find the FAQ for
comp.lang.c at:
http://www.eskimo.com/~scs/C-faq/top.html

-nrk
--
Remove devnull for email
Nov 14 '05 #3
# 1. I used to draw box in window using ACS_HLINE,ACS_VLINE. But what
# happened is, the line is not a straight line. Instead of that it look
# continus hypen ( - ) for HLINE and continuous ( | ) for VLINE.

An inherent aspect of curses is that it is intended to draw only ASCII
character on a rectangular grid on a terminal or terminal emulator. If
you want fancier graphics, you're going to need X-Windows or OpenGL.
X-Windows should be available on most Linux installs.

--
Derk Gwen http://derkgwen.250free.com/html/index.html
Death is the worry of the living. The dead, like myself,
only worry about decay and necrophiliacs.
Nov 14 '05 #4

"Derk Gwen" <de******@HotPOP.com> wrote in message
An inherent aspect of curses is that it is intended to draw only ASCII
character on a rectangular grid on a terminal or terminal emulator. If
you want fancier graphics, you're going to need X-Windows or
OpenGL.
X-Windows should be available on most Linux installs.

ASCII characters are basically Latin alphanumerics, a bit of punctuation,
and a few non-printed controls. However most terminals have an extended
8-bit character set, the ANSI set, which includes characters designed for
simple boxes and menus and the like. I would be surprised if curses doesn't
support these.
Nov 14 '05 #5
Malcolm wrote:
"Derk Gwen" <de******@HotPOP.com> wrote in message
An inherent aspect of curses is that it is intended to draw only ASCII
character on a rectangular grid on a terminal or terminal emulator. If
you want fancier graphics, you're going to need X-Windows or
OpenGL.
X-Windows should be available on most Linux installs.


ASCII characters are basically Latin alphanumerics, a bit of punctuation,
and a few non-printed controls. However most terminals have an extended
8-bit character set, the ANSI set, which includes characters designed for
simple boxes and menus and the like. I would be surprised if curses doesn't
support these.


ANSI characters can be drawn, but once you set the high bit you lose
portability to systems that don't support ANSI. The DOS terminals come
to mind, as they still have graphical characters in the `extended ASCII'
codepoints. Which is a fairly dumb idea in this day and age, but, then,
so's DOS.

--
My address is yvoregnevna gjragl-guerr gjb-gubhfnaq guerr ng lnubb qbg pbz
Note: Rot13 and convert spelled-out numbers to numerical equivalents.
Nov 14 '05 #6
"Malcolm" <ma*****@55bank.freeserve.co.uk> wrote:
#
# "Derk Gwen" <de******@HotPOP.com> wrote in message
# > An inherent aspect of curses is that it is intended to draw only ASCII
# > character on a rectangular grid on a terminal or terminal emulator. If
# > you want fancier graphics, you're going to need X-Windows or
# > OpenGL.
# > X-Windows should be available on most Linux installs.
# >
# ASCII characters are basically Latin alphanumerics, a bit of punctuation,
# and a few non-printed controls. However most terminals have an extended
# 8-bit character set, the ANSI set, which includes characters designed for
# simple boxes and menus and the like. I would be surprised if curses doesn't
# support these.

curses was originally written when signedness of C char was subject to
speculation; only codes 0 through 127 could be used portably; and those
were the only available codes on the terminals then targetted. Programs
like vi did (do?) use the extra bit for other purposes. I don't know how
curses has evolved: I wouldn't trust it with codes 128 through 255 without
clear documentation that it could handle those.

Also codes 128 through 255 have wildly different interpretations on
different machines, a chaos slowly being colonised with Unicode.

--
Derk Gwen http://derkgwen.250free.com/html/index.html
OOOOOOOOOO! NAVY SEALS!
Nov 14 '05 #7
Derk Gwen <de******@HotPOP.com> wrote:
"Malcolm" <ma*****@55bank.freeserve.co.uk> wrote:
#
# "Derk Gwen" <de******@HotPOP.com> wrote in message
# > An inherent aspect of curses is that it is intended to draw only ASCII
# > character on a rectangular grid on a terminal or terminal emulator. If
# > you want fancier graphics, you're going to need X-Windows or
# > OpenGL.
# > X-Windows should be available on most Linux installs.
# >
# ASCII characters are basically Latin alphanumerics, a bit of punctuation,
# and a few non-printed controls. However most terminals have an extended
# 8-bit character set, the ANSI set, which includes characters designed for
# simple boxes and menus and the like. I would be surprised if curses doesn't
# support these.

curses was originally written when signedness of C char was subject to
speculation; only codes 0 through 127 could be used portably;


This is still true. Plain char may be either signed or unsigned. OTOH,
on the systems where curses is available, it's likely to be signed.

Richard
Nov 14 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Chris Burkert | last post by:
Hi I want to write a little application for the shell with a userinterface that is not line based. Think of the UI of mc for example. And I want to use Python on different Operating Systems. So...
1
by: copx | last post by:
Hi, I want to write a console/terminal app in Python that requires curses-like functionality. Problem: the python curses module doesn't seem to work on Windows. In fact it doesn't work (isn't part...
0
by: Matt Garman | last post by:
I'd like to write a class or module in python that allows me to do on-the-fly color changing in the curses module. I'm thinking about something along the lines of this: addstr(y, x, 'hello',...
2
by: Konrad Koller | last post by:
import curses produces the ImportError: No module named _curses ("from _curses import *" in line 15 in __init__.py) Of course imp.find_module ("_curses") reports the same error. How can I make...
0
by: Brano Zarnovican | last post by:
Hi ! I'd like to init curses and still have working Python interactive command line. I found that you can replace stdin/stdout/stderr like this: #!/usr/bin/python -i import curses import...
1
by: Jerry Fleming | last post by:
Hi, I have wrote a game with python curses. The problem is that I want to confirm before quitting, while my implementation doesn't seem to work. Anyone can help me? #!/usr/bin/python # #...
3
by: Jia,Lu | last post by:
Hi all I write a program to detect key press,but , why there is a *space* before the character I typed.?? #!/usr/bin/env python import sys import tty import termios
5
by: Sankar | last post by:
Dear all, In my programming snippet compiled in Linux 2.6, I have a getch() , but the program when executed does not wait for my input.. fflush(stdin), fflush(stdout) - All these did not help. ...
3
by: peter | last post by:
I've been wrestling on and off with this problem for over a year now, without success. Basically, I am looking for a simple set of screen and keyboard manipulation commands that will run...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.