Curses for win32 with VT100/ANSI support

C

Chris Hills

Andrew said:
That curses is a screen display, or that you need a screen to use a
screen display?

Yes. However that screen or terminal my not be connected to the system
all the time.

I have set up things like routes using a terminal connected to the
engineers rs232 port. When I worked on comms equipment there was always
a serial port for local initialisation etc. Usually a VT100 to VT52
terminal emulation was used. Curses would have been used for that.

Not everything has a web server built into it. Particularly as they are
not universal. A Vt100 or VT52 only needs a 40 col 25 line mono screen.
Please give an example, because if a system never communicates, it is
for all intents and purposes a rock.

Toys, microwave ovens, fridges, dish washers, washing machines, bombs,
batteries.... the list is endless.

Very many embedded systems do not need to communicate outside their own
system. Many systems after they are switched on are automatic.
Something similar to stdio.h, I suppose. Or an extension of stdio.

FILE *sh = fopen("192.168.0.100", "n");
fprintf(sh, "Hello, other machine!\n");

That already exists

However most safety critical or high integrity systems are not likely to
use stdio anyway.

Besides fprintf is of little use for fieldbus, CAN Lin etc.
You might suggest that not all networks use IP,

Not by a VERY long way. Automotive systems use CAN and LIN The busses
for all these systems and in fact all field-bus, control systems and
non-PC networks have their own standards....

So your new "standard" will be ignored by the embedded and controll
systems world to start with which are the majority of the C users these
days. On the desk top the majority have moved to C++, C#, Java etc
apart from the mob that never left COBOL and Fotran :)

but not all systems
use the same filesystem (and indeed there is much more diversity
there),
Correct.

and yet fopen for files is standardized.

No it's not.... it depends on they system you are using. Many systems
have their own methods.
My first
statement is just as portable as fopen("/etc/hosts", "r").

but not much use. Why do you thing that in many systems printf is the
first to be banned. It is large and generic.
Refuting the credibility of the C standard on clc is not a very good
idea. ;-)

Why? Other members of the ISO C panel have also said much the same. And
if those of use who are on the ISO C panel say it who are you to say
otherwise? c.l.c is not the authority on ISO C

The truthhood of a statement is binary; either a person is very
limited or they are not.

When you are young life is black and white. With experience you find
that life has only one absolute. -273.15 :) Everything else is relative
and shades of gray. There are no absolutes.

Re knowledge. on exams whilst there is a pass fail you also find that
are a ranges or grades of both pass and fail so knowledge is graduated
not a binary thing.

Broadly some have a good knowledge of others limited and some very
limited. There are very few binary answers.
While your second statement is true,
the first ("No.") is not logically connected to it.

:)
 
J

Jordan Abel

Yes. However that screen or terminal my not be connected to the system
all the time.

I have set up things like routes using a terminal connected to the
engineers rs232 port.

For a more mundane example, the terminal may be another system which is
occasionally connected to the system on which curses is running via an
IP-based protocol such as Telnet, SECSH, or RLOGIN.
When I worked on comms equipment there was always
a serial port for local initialisation etc. Usually a VT100 to VT52
terminal emulation was used. Curses would have been used for that.

Not everything has a web server built into it. Particularly as they are
not universal. A Vt100 or VT52 only needs a 40 col 25 line mono screen.

I thought there were 80 columns, or in the case of a VT100, a choice of
80 or 132.
Toys, microwave ovens, fridges, dish washers, washing machines, bombs,
batteries.... the list is endless.

Very many embedded systems do not need to communicate outside their own
system. Many systems after they are switched on are automatic.

Microwave ovens often have a button pad and some seven-segment LCDs.

A bomb does communicate with the outside world. It makes quite a loud
report for anyone who's listening of its status when its sensors reach
whatever state they were monitoring for, or when its internal timer
elapses.

What kind of stuff is in a battery that makes it an embedded system? I'm
sure anything that would qualify would also be communicating with the
charger and/or device.
 
C

Chris Hills

Jordan Abel said:
For a more mundane example, the terminal may be another system which is
occasionally connected to the system on which curses is running via an
IP-based protocol such as Telnet, SECSH, or RLOGIN.

However many items have an rs232 port on them for initial set up on
first power-up etc. Also for doing some things that are not permitted
remotely.

I thought there were 80 columns, or in the case of a VT100, a choice of
80 or 132.

yes... 80 cols as per a punched card.
Microwave ovens often have a button pad and some seven-segment LCDs.

but NOT a network.
A bomb does communicate with the outside world. It makes quite a loud
report for anyone who's listening of its status when its sensors reach
whatever state they were monitoring for, or when its internal timer
elapses.

:)

What kind of stuff is in a battery that makes it an embedded system? I'm
sure anything that would qualify would also be communicating with the
charger and/or device.

Some batteries have MCU in them to control them I am reliably informed
by three of my customers..... These are not the sort of batteries you
buy in Tescos or Kwik Fit :)


The battery in my PowerBook has a series of LED's to show how charged it
is. I assume that for a lot of these special batteries the charging
circuit is in the battery unit itself.

This idea of a standard networking library is about as much use as the
standard graphics library some one suggested a few months back. These
"new" standard libraries are usually suggested by people with little
experience of the industry. In both cases there are many specialised
systems already in use and performing well. The horse has long gone so
there is no point in bolting the stable door.

The only people whop could do such a library are MS as they have such a
large part of the industry using their compilers. They have done this
with the safe, safer, secure, bounded C library as a TR which will never
make it into the main standard or be used by anyone not on an MS
platform. A network library would go the same way.
 
R

Richard Bos

Andrew Poelstra said:
Not a lot of systems have a screen. I've programmed routers with which I
communicated with entirely by FTPing log files around. Curses would just
be an unneccessary pain for compiler writers.

The only addition to the library that I think is feasable would be some
decent networking functions; all systems have networks, with the exception
of embedded systems,

This, too, is not even true. I have used several systems over the last
couple of years which did not have networks. More if you count those
whose only network is a dial-up line (my home machine, for example), and
even more if you count those whose network is not TCP/IP and hard to
mung into the usual POSIX requirements.

Richard
 
A

Andrew Poelstra

Yes. However that screen or terminal my not be connected to the system
all the time.

I have set up things like routes using a terminal connected to the
engineers rs232 port. When I worked on comms equipment there was always
a serial port for local initialisation etc. Usually a VT100 to VT52
terminal emulation was used. Curses would have been used for that.
I suppose. But wouldn't a basic command prompt be easier to maintain?
Not everything has a web server built into it. Particularly as they are
not universal. A Vt100 or VT52 only needs a 40 col 25 line mono screen.
Neither of us mentioned anything about a web server. I mentioned that I
communicated with a router via ftp and telnet (sans curses), and it works
fine.
Toys, microwave ovens, fridges, dish washers, washing machines, bombs,
batteries.... the list is endless.
If a toy outputs nothing, it could have been made just as well without
electronics. Microwave ovens always have inputs to control heat, as do
washing machines and fridges for similar reasons. A battery is not a
system.

Bombs, well, hmm.
Very many embedded systems do not need to communicate outside their own
system. Many systems after they are switched on are automatic.
Agreed.


That already exists
Where?

However most safety critical or high integrity systems are not likely to
use stdio anyway.

Besides fprintf is of little use for fieldbus, CAN Lin etc.


Not by a VERY long way. Automotive systems use CAN and LIN The busses
for all these systems and in fact all field-bus, control systems and
non-PC networks have their own standards....

So your new "standard" will be ignored by the embedded and controll
systems world to start with which are the majority of the C users these
days. On the desk top the majority have moved to C++, C#, Java etc
apart from the mob that never left COBOL and Fotran :)
Not a "new" standard. Please don't make me into a Jacob Navia here. ;-)
I merely suggested a new feature because the guys at comp.std.c scare me
and the negative reception here suggests that I shouldn't pursue this.
No it's not.... it depends on they system you are using. Many systems
have their own methods.
Yes, it is. It is extensible, but standardized.
but not much use. Why do you thing that in many systems printf is the
first to be banned. It is large and generic.
I don't think that. However, if you are very concerned about space,
eliminating headers such as stdio or stdlib which contain large
functions (if you know the entire system, it's easy to replace
malloc) is a good idea.
Why? Other members of the ISO C panel have also said much the same. And
if those of use who are on the ISO C panel say it who are you to say
otherwise? c.l.c is not the authority on ISO C
By "current C standard" did you mean C99? If so, I apologise.
When you are young life is black and white. With experience you find
that life has only one absolute. -273.15 :) Everything else is relative
and shades of gray. There are no absolutes.
Not even. That's why I don't like physics. Pure mathematics is so much
cleaner. :)

Now, this has become horribly OT, and you've given me some good reasons
for why my idea will not work. Therefore, as far as I'm concerned, this
thread is over. (Or this subset of this thread; I don't remember what
the OP said).
 
C

Chris Hills

Andrew said:
I suppose. But wouldn't a basic command prompt be easier to maintain?

You mean a VT100 terminal? A "command prompt" is a terminal window...
If you have that then curses will run on it.
Neither of us mentioned anything about a web server. I mentioned that I
communicated with a router via ftp and telnet (sans curses), and it works
fine.

Many systems these days have a web interface rather than a terminal.
Though over a serial line to "something" a VT100 or VT52 terminal sill
can't be beaten.
If a toy outputs nothing, it could have been made just as well without
electronics. Microwave ovens always have inputs to control heat, as do
washing machines and fridges for similar reasons. A battery is not a
system.

Bombs, well, hmm.

Of course. Many bombs have electronics in them. In fact it is hard to
find any air launched ordinance that does not these days. Start with a
cruise missile and work down...... naval bombs and mines also have lots
of electronics.

Not a "new" standard. Please don't make me into a Jacob Navia here. ;-)
I merely suggested a new feature because the guys at comp.std.c scare me

Why? We are usually friendly.
and the negative reception here suggests that I shouldn't pursue this.

Try it on comp.std.c all they can do is shout at you but you might learn
why not.
I don't think that. However, if you are very concerned about space,
eliminating headers such as stdio or stdlib which contain large
functions (if you know the entire system, it's easy to replace
malloc) is a good idea.

Don't use malloc either for obvious reasons.
By "current C standard" did you mean C99? If so, I apologise.

Of course I mean ISO 9899:1999 that is the standard. All the others are
Obsolete officially though in practice the de-facto standard is C95/6

Not even. That's why I don't like physics. Pure mathematics is so much
cleaner. :)

But Physics is reality. Maths does not exist in reality which is why you
need applied maths.
Now, this has become horribly OT, and you've given me some good reasons
for why my idea will not work. Therefore, as far as I'm concerned, this
thread is over. (Or this subset of this thread; I don't remember what
the OP said).

Search on google for fieldbus, profi-bus, CAN etc to see what some of
the other common busses are.
 
R

Rod Pemberton

Keith Thompson said:
We certainly do have a say in the matter; we just don't have an
effective enforcement mechanism.

I have two responses to that.

Logical rational:
"An effective enforcement mechanism" an easy to obtain goal. This newsgroup
has enough messages to support four newsgroups including one entirely
dedicated to exactly what you want (Hurray!). So what are you waiting for?

Angry, but truthful:
Why do you keep whining about this? It only shows that you're a complete
failure at obtaining what you claim to want: power and control over a
newsgroup. That is, unless you really have some other agenda. Perhaps,
you're just masochistic and truly enjoy drama and the pain you feel from
repeated confrontations over this issue. Or perhaps, you're sadistic and
truly enjoy the pain you attempt to inflict on others regarding this. You
have no control here. If you want it, go somewhere else.


Rod Pemberton
 
D

Dave Thompson

On 2006-05-24, Chris Hills <[email protected]> wrote:

I thought there were 80 columns, or in the case of a VT100, a choice of
80 or 132.
VT52 was 24 x 80, but IIRC had double-wide characters available.

VT100 was 24 x (80 or 132) but had double-wide and double-size (2wide
2high) (top and bottom) characters available. IIRC VT220 the same.

Some other (folks') terminals had at least part of a 25th line usable,
though not as part of the normal display, but AFAICR no DECs.

- David.Thompson1 at worldnet.att.net
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top