Re: Question about write a simple shell : how to output resoult to tty correctly
- From: "key9" <iamkey9@xxxxxxx>
- Date: Wed, 17 May 2006 04:20:06 +0800
thank you for your reply;
Are you trying to write a shell in C++?something like that
why you should resort to ncurses or anything other than std::cin and
std::cout to do your command I/O.
If you are trying to implement some
kind of command line editing, then you might want to set the tty into
"raw" mode to allow you to override the built-in editing. If you are
not trying to implement command line editing, then why not just stick
with stdio?
May be the story beginning from my self educated roadmap of how
rogramming -- 2 year ,a reversed way:
"OO design ; C++ ; STD; design patterns ; ACE ; UNIX/LINUX BASIC(fd thread
process mutex...);UNIX SOCKET ; UNIX IO, gnu clib...)
(no C experience,start from little/almost no programming experience)
So my application is design/running on my mind for 2 years.
before coding ,I don't think I/O is a problem until I met I must scan "a
keypress" to make my parser to determine action. std::cin have no this
function(getch()),
also I want my app(actually it can be called a Library) can running on
other OS . either GUI and CLI , so there must be a adapter layer.(use
"string" to link them)
I found I have to design an other lib to adapter UNIX I/O,
and may be due to greed, I want lib have "ERR , DEBUG , COUT_..."belong to
itself , they can display on same screen or sparated, or dump to file ,so
it's may be need a window manager.
........
.......
.......
finally I lost my mind , my pool knowledge about ui design drive me crazy.
reinvent the big wheel?
so I found "ncurses" and pin my hope on it , and after serval day's trying ,
almost there , but still have problem --- telnet can not display it
correctly.... crazy again. ^_^
.......
As you see I am a "dabbler" now ,especially no experience on C :-) . may
be afraid , may be just too lazy to study "tty" it self.
now I am reading "Joe's Own Editor" , I hope after another serval days , I
can master it.
ps: I didn't found there's a c++ lib can do such things -----(pure code) a
chartype window manager ,support sub window ,with string to as display ,can
adapter with basic IO . etc...
to wrote it is too expensive for me , if you know one , please tell me.
.
- References:
- Prev by Date: Re: How to write make file
- Next by Date: Re: reading stdin with SELECT?
- Previous by thread: Re: Question about write a simple shell : how to output resoult to tty correctly
- Next by thread: reading stdin with SELECT?
- Index(es):
Relevant Pages
|