473,769 Members | 6,597 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_V LINE. 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 2861
On 20 Feb 2004 22:03:02 -0800, ms*********@red iffmail.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_V LINE. 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.li nux.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.l earn.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_V LINE. 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.progr ammer
comp.os.linux.d evelopment.apps
comp.os.linux.d evelopment

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_V LINE. 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******@HotPO P.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******@HotPO P.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.u k> wrote:
#
# "Derk Gwen" <de******@HotPO P.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******@HotPO P.com> wrote:
"Malcolm" <ma*****@55bank .freeserve.co.u k> wrote:
#
# "Derk Gwen" <de******@HotPO P.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
2380
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 it should be portable. Now what would you prefer as UI-library? I'm searching for a highlevel library with buttons, text boxes, dialog boxes, progress bars, ...
1
1535
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 of the Python package) on my Linux distro (SUSE Linux 9.1 Special Edition) either. Well what should I do? The app is supposed to work on Windows and Linux at least (more platforms would be nice). TIA, copx
0
1876
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', brightyellow, blue) The module would automatically interpret the above as curses.init_pair(i, curses.COLOR_YELLOW, curses.COLOR_BLUE)
2
3957
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 use of the curses package for writing a Python script with curses?
0
2401
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 sys
1
3696
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 # # Brick & Ball in Python # by Jerry Fleming <jerryfleming@etang.com>
3
7960
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
5244
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. I would appreciate if somone suggests me proven solution to this. thanks in advance Sankar
3
1430
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 identically under Linux and Windows. Nothing fancy - just clear the screen, print a string at an arbitrary xy position and detect a keystroke. I've googled around this newsgroup and elsewhere, and come across various suggestions (and even posted my own...
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9996
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8872
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7410
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5304
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3963
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3563
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.