Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Nov 15th, 2004, 7:50 AM   #1
CaveSnow
Newbie
 
Join Date: Nov 2004
Posts: 3
Rep Power: 0 CaveSnow is on a distinguished road
People!

I'm making a proggie under LInux...
I want to be able to do something like pseudo-graphics (text graphics);
In DOS I would use functions defined in conio.h (clrscr(), gotoxy() etc.);
Is there anything similar under LInux?

P.S. I'm using RH 7.2
CaveSnow is offline   Reply With Quote
Old Nov 15th, 2004, 9:47 AM   #2
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
I know for sure there are libs for that in linux, however i don't know what they are since i have never used em. Have you tried the functions that you talked about? who knows, they could be the same name as under DOS. I am sure sombody else around here knows what the header files that you are looking for are called.
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!
Pizentios is offline   Reply With Quote
Old Nov 17th, 2004, 3:54 PM   #3
Eggbert
Professional Programmer
 
Eggbert's Avatar
 
Join Date: Nov 2004
Posts: 250
Rep Power: 5 Eggbert is on a distinguished road
>In DOS I would use functions defined in conio.h (clrscr(), gotoxy() etc.);
conio.h is a Borland creation. Linux compilers don't support it. However, if you're willing to do a little more work, you can use the curses library. Do a
$ man curses
For more details.
Eggbert is offline   Reply With Quote
Old Nov 17th, 2004, 5:30 PM   #4
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 6 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
Or you could copy conio.h from the include dir of your windows compiler and place it in your linux compiler's include directory... just a thought.
__________________

tempest is offline   Reply With Quote
Old Nov 17th, 2004, 5:38 PM   #5
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
I believe it's Win32-optimized. And it has some code in it that ensures you cannot do just that:

#if   !defined(_WIN32)
#error ERROR: Only Win32 target supported!
#endif

It might work if you pull that out, but it's highly unlikely. A search for "conio" on SourceForge found a few bits though.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Nov 18th, 2004, 10:38 AM   #6
Eggbert
Professional Programmer
 
Eggbert's Avatar
 
Join Date: Nov 2004
Posts: 250
Rep Power: 5 Eggbert is on a distinguished road
>Or you could copy conio.h from the include dir of your windows
>compiler and place it in your linux compiler's include directory...
That wouldn't work. Headers only contain declarations, so even if the compiler dependent code in conio.h didn't cause compilation errors on Linux, the program would fail to link without the necessary library files. The only way to get nonstandard functions to work with a compiler that doesn't support them is to write them yourself using features that the compiler does support, or use a third party library that basically does the same thing.
Eggbert is offline   Reply With Quote
Old Nov 18th, 2004, 11:38 PM   #7
erebus
Programmer
 
erebus's Avatar
 
Join Date: Aug 2004
Location: /dev/null
Posts: 65
Rep Power: 5 erebus is on a distinguished road
Send a message via AIM to erebus
I'm not sure if curses is the precursor to ncurses(which is used on software such as VIM and BitchX ... and maybe a few OS installers), but ncurses.h generally works for mapping pixels and frames at the CLI. ESR wrote a howto on ncurses a while back. Google might be able to pick it up with "google+"esr".
__________________
<span style='font-size:14pt;line-height:100%'><span style='color:red'>&quot;Political power grows out of the barrel of a gun&quot; - Mao Tse-Tung</span></span>
erebus is offline   Reply With Quote
Old Nov 19th, 2004, 9:54 AM   #8
Eggbert
Professional Programmer
 
Eggbert's Avatar
 
Join Date: Nov 2004
Posts: 250
Rep Power: 5 Eggbert is on a distinguished road
>I'm not sure if curses is the precursor to ncurses
curses, ncurses, pdcurses, it makes no difference if you do a "man -k curses" or "apropos curses". You'll find something worth looking at.
Eggbert is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 9:44 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC