Text-Based Windows Library

H

hstagni

Where can I find a library to created text-based windows applications?
Im looking for a library that can make windows and buttons inside
console.. Many old apps were make like this, i guess

____________________________________
| |
| ------------------ |
| | BUTTON | |
| ------------------ |
| |
| |
L_________________ _________________|

I tried to draw a window here, but im looking for something better
than that,,huahua
 
S

SM Ryan

# Where can I find a library to created text-based windows applications?

Possibly....on Unix the library is called curses. If you google
"curses library windows" it will show you some candidate libraries
you can investigate. Using curses will simplify porting to Unix
if you should ever want to.


# Im looking for a library that can make windows and buttons inside
# console.. Many old apps were make like this, i guess
#
# ____________________________________
# | |
# | ------------------ |
# | | BUTTON | |
# | ------------------ |
# | |
# | |
# L_________________ _________________|
#
# I tried to draw a window here, but im looking for something better
# than that,,huahua
#
#
#
 
M

Martin Ambuhl

hstagni said:
Where can I find a library to created text-based windows applications?
Im looking for a library that can make windows and buttons inside
console.. Many old apps were make like this, i guess

There are many implementations of curses (ncurses and pdcurses among
them), and the odds are good that your platform has one available. A
short session with a search engine should help you. However, such
packages are not topical in comp.lang.c. If you have questions or need
help beyond the documentation, you need to check with the maintainers or
such packages, or with technical support, or with a mailing list or
newsgroup where those application packages are discussed.
 
C

Chris Johnson

Where can I find a library to created text-based windows applications?
Im looking for a library that can make windows and buttons inside
console.. Many old apps were make like this, i guess

____________________________________
| |
| ------------------ |
| | BUTTON | |
| ------------------ |
| |
| |
L_________________ _________________|

I tried to draw a window here, but im looking for something better
than that,,huahua

If I remember properly (not programming Windows, myself), the conio.h
header is the Windows equivalent of curses.
 
U

user923005

Where can I find a library to created text-based windows applications?
Im looking for a library that can make windows and buttons inside
console.. Many old apps were make like this, i guess

____________________________________
| |
| ------------------ |
| | BUTTON | |
| ------------------ |
| |
| |
L_________________ _________________|

I tried to draw a window here, but im looking for something better
than that,,huahua

DDJ had a project for a character based user interface a few years ago
called D-flat.
ftp://ftp.mv.com/pub/ddj/packages/dflt20.zip
 
T

Tak-Shing Chan

DDJ had a project for a character based user interface a few years ago
called D-flat.
ftp://ftp.mv.com/pub/ddj/packages/dflt20.zip

[OT] Isn't D-flat the same as C-sharp? I hope Microsoft
wouldn't sue them for trademark infringement. <g,d&r>

Tak-Shing
 
C

Clever Monkey

Tak-Shing Chan said:
DDJ had a project for a character based user interface a few years ago
called D-flat.
ftp://ftp.mv.com/pub/ddj/packages/dflt20.zip

[OT] Isn't D-flat the same as C-sharp? I hope Microsoft
wouldn't sue them for trademark infringement. <g,d&r>
[So very OT]

It depends on where you start counting the intervals.
 
C

Charlton Wilbur

>> [OT] Isn't D-flat the same as C-sharp? I hope Microsoft
>> wouldn't sue them for trademark infringement. <g,d&r>

CM> [So very OT]
CM> It depends on where you start counting the intervals.

[While we're OT]

Actually, it depends on what your tuning system is. In equal
temperament, for instance, they're the same pitch, and which one you
use is a matter of semantics to convey the meaning you want it to
have. In just intonation, they're different pitches.

Charlton
 
T

Tak-Shing Chan

Tak-Shing Chan said:
Where can I find a library to created text-based windows applications?
Im looking for a library that can make windows and buttons inside
console.. Many old apps were make like this, i guess

____________________________________
| |
| ------------------ |
| | BUTTON | |
| ------------------ |
| |
| |
L_________________ _________________|

I tried to draw a window here, but im looking for something better
than that,,huahua

DDJ had a project for a character based user interface a few years ago
called D-flat.
ftp://ftp.mv.com/pub/ddj/packages/dflt20.zip

[OT] Isn't D-flat the same as C-sharp? I hope Microsoft
wouldn't sue them for trademark infringement. <g,d&r>
[So very OT]

It depends on where you start counting the intervals.

[OT] Why should Microsoft care about theory? As far as
MIDI is concerned, D-flat == C-sharp (mod 12). ;-)

Tak-Shing
 
T

Tak-Shing Chan

CM> Tak-Shing Chan said:
[OT] Isn't D-flat the same as C-sharp? I hope Microsoft
wouldn't sue them for trademark infringement. <g,d&r>

CM> [So very OT]
CM> It depends on where you start counting the intervals.

[While we're OT]

Actually, it depends on what your tuning system is. In equal
temperament, for instance, they're the same pitch, and which one you
use is a matter of semantics to convey the meaning you want it to
have. In just intonation, they're different pitches.

[OT] If Microsoft do early music, they'll probably patent the
concept of tuning systems (before putting it in the latest
version of Windows Media Player)...

Tak-Shing
 
R

Richard Bos

If I remember properly (not programming Windows, myself), the conio.h
header is the Windows equivalent of curses.

You don't remember properly. Also, for those implementations where it
is, large parts of it it aren't. IOW, don't expect to replace curses
with conio without a lot of work; and ask for help with it in a group
where conio is on-topic. Something like comp.os.msdos.programmer,
perhaps?

Richard
 
R

Richard Bos

Tak-Shing Chan said:
Tak-Shing Chan said:
On Thu, 12 Apr 2007, user923005 wrote:

Where can I find a library to created text-based windows applications?
Im looking for a library that can make windows and buttons inside
console.. Many old apps were make like this, i guess

____________________________________
| |
| ------------------ |
| | BUTTON | |
| ------------------ |
| |
| |
L_________________ _________________|

I tried to draw a window here, but im looking for something better
than that,,huahua

DDJ had a project for a character based user interface a few years ago
called D-flat.
ftp://ftp.mv.com/pub/ddj/packages/dflt20.zip

[OT] Isn't D-flat the same as C-sharp? I hope Microsoft
wouldn't sue them for trademark infringement. <g,d&r>
[So very OT]

It depends on where you start counting the intervals.

[OT] Why should Microsoft care about theory? As far as
MIDI is concerned, D-flat == C-sharp (mod 12). ;-)

Yes, but MIDI is an industry-wide Standard. Where M$ is concerned,
industry-wide Standards exist to be broken, by preference in the most
irritating and egregious manner possible.

Richard
 
C

Clem Clarke

Some 20 years ago, it became clear that C strings were not as safe, nor
as fast, as strings in PL/I, Assembler or Pascal.

The primary reasons are that one needs to find the current length of a
string before or during a copy process - this is very time consuming.

Secondly, there is no way of determining the maximum length of a string,
and therefore when copying to a string, it is easy to over-write
adjacent storage with often disastrous consequences, including the
deliberate introduction of viruses.


Decades have passed and the C string problem continues. Buffer
over-runs are just part of the story, and the bugs that can be
introduced - the safety problem is still with us all and it has come
back to bite all of us on the lower part of our anatomy, over and over
again.

I have spent some years studying this problem and have developed some
User friendly C macros that solve the problem.

These solutions do enhance the speed and safety aspects of all "C"
programs - these benefits of speed and safety can be passed on to your
users.

The main benefits are:

* Increased speed (up to 20 times for some string handling)
* More reliability (strings cannot overwrite adjacent storage)
* Easier coding and debugging (consistent set of macros)
* Easier external variables

Here is a very short example:

dcl (op,charvar,253," ",ext); // Variable 'op' is defined
// as an External variable - Max length of 253 characters.
dcl (symbolic,charfixed,8," ",ext); // Fixed length of 8

cpylit(op, "This is a 30 character string ");
cat(op,op); /* Concatenate variable op with it self. Now 60
characters */

cpy(symbolic,op); /* Truncates it to 8 characters */

cpy(op,symbolic); /* Copy it back. */

I invite you download the macros and code at
http://members.ozemail.com.au/~oscarptyltd/fastsafe.html where a fuller
discussion can be found.



Clement Clarke



,-._|\ Clement V. Clarke - Author Jol, EASYPANEL, OSCAR, 370TO486
/ Oz \ Web: www.ozemail.com.au/~oscarptyltd
\_,--.x/ 38 Kings Park Road, West Perth, AUSTRALIA, 6005.
v Tel (61)-8-9324-1119, Mob 0401-054-155.
 
R

Richard Heathfield

Clem Clarke said:
Some 20 years ago, it became clear that C strings were not as safe,
nor
as fast, as strings in PL/I, Assembler or Pascal.

C strings are perfectly safe. Some people, however, should not be let
anywhere near a text editor.
The primary reasons are that one needs to find the current length of a
string before or during a copy process - this is very time consuming.

If you need to know it so often that calculating it is a bottleneck,
remember it. And if you don't, don't bother. Hardly difficult.

Secondly, there is no way of determining the maximum length of a
string,

Yes, there is. When you allocate its storage, you know how much you
allocated. Don't Forget.
Decades have passed and the C string problem continues.

What problem?

I have spent some years studying this problem and have developed some
User friendly C macros that solve the problem.

Aha! We're getting to your point...

I invite you download the macros and code at
http://members.ozemail.com.au/~oscarptyltd/fastsafe.html where a
fuller discussion can be found.

Convince me that it's worth my time.
 
R

Richard Bos

[ The old, old bollocks about C being unsafe, and would we please use
his magic bullet ]

And what, pray, does this have to do with the post you replied to?

Richard
 
B

Barry Schwarz

Some 20 years ago, it became clear that C strings were not as safe, nor
as fast, as strings in PL/I, Assembler or Pascal.

I wonder why you posted it to comp.lang.asm370.
The primary reasons are that one needs to find the current length of a
string before or during a copy process - this is very time consuming.

Secondly, there is no way of determining the maximum length of a string,
and therefore when copying to a string, it is easy to over-write
adjacent storage with often disastrous consequences, including the
deliberate introduction of viruses.


Decades have passed and the C string problem continues. Buffer
over-runs are just part of the story, and the bugs that can be
introduced - the safety problem is still with us all and it has come
back to bite all of us on the lower part of our anatomy, over and over
again.

I have spent some years studying this problem and have developed some
User friendly C macros that solve the problem.

Except they use non-portable pragmas, C99 unique comments, and invade
the implementation namespace.
These solutions do enhance the speed and safety aspects of all "C"
programs - these benefits of speed and safety can be passed on to your
users.

The main benefits are:

* Increased speed (up to 20 times for some string handling)
* More reliability (strings cannot overwrite adjacent storage)
* Easier coding and debugging (consistent set of macros)
* Easier external variables

Here is a very short example:

dcl (op,charvar,253," ",ext); // Variable 'op' is defined
// as an External variable - Max length of 253 characters.
dcl (symbolic,charfixed,8," ",ext); // Fixed length of 8

cpylit(op, "This is a 30 character string ");
cat(op,op); /* Concatenate variable op with it self. Now 60
characters */

cpy(symbolic,op); /* Truncates it to 8 characters */

cpy(op,symbolic); /* Copy it back. */

Yes, with enough macros you can pass PL/I code to the C compiler.


Remove del for email
 
A

Army1987

[OT] Isn't D-flat the same as C-sharp? I hope Microsoft
wouldn't sue them for trademark infringement. <g,d&r>
[So very OT]

It depends on where you start counting the intervals.

[OT] Why should Microsoft care about theory? As far as
MIDI is concerned, D-flat == C-sharp (mod 12). ;-)

In equal temperament, which long predates MIDI and Microsoft, Db and C# are
the same pitch class, and pitch classes are always defined as notes mod 12.

(Anyway, they are used differently as far as harmony is concerned. And also
in dodecaphonic music, usually one uses sharps when rising and flats when
falling.)
 
D

Default User

Clem Clarke wrote:

I invite you download the macros and code at


I figure if a guy can't even use his newsreader properly (this message
was posted as a non-sequitur reply to another thread) then I have grave
doubts about any software he wrote.

Couple that with ludicrous strawman arguments about C-strings, well
safe to say I won't bother.






Brian
 
B

Barry

Barry Schwarz said:
I wonder why you posted it to comp.lang.asm370.


Except they use non-portable pragmas, C99 unique comments, and invade
the implementation namespace.


Yes, with enough macros you can pass PL/I code to the C compiler.

I did a little real work with some PL/I to C translated code and the
translator (a commercial product) either didn't know PL/I or didn't
know C. It was quite a task to debug, as I had no access to the
translator, just the output.
 

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

Forum statistics

Threads
474,161
Messages
2,570,891
Members
47,423
Latest member
henerygril

Latest Threads

Top