Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
06-20-2006, 01:59 PM
|
#1
|
LQ Newbie
Registered: Jun 2006
Posts: 7
Rep:
|
gcc programming manual
In transferring C progams written in Borland C++ to Linux v6.0 I find that getch(), curon(), and curoff() functions are not recognized by gcc. Do these functions actually exist in gcc? If so, what is the header file name? If not, any suggestions on how to add them to gcc?
I have tried inline assembly which didn't work for the following reason....I get an error msg when the command 'int x010' executes. I have tried changing the argument to $10,$32,$16. The error msg when one stepping through the program in gdb is always:
'program received signal SIGSEGV, segmentation fault'
and the program terminates. Any suggestions?
Last edited by Alfred James Monroe; 06-21-2006 at 05:43 PM.
|
|
|
06-20-2006, 02:20 PM
|
#2
|
Member
Registered: Oct 2005
Location: Knoxville, Tn (USA)
Distribution: OpenSUSE, Ubuntu
Posts: 250
Rep:
|
getch is in curses.h (try "man getch")
I can't seem to find much reference to the curon and curoff functions. Tell me what these functions do. Maybe even provide some documentation on them if you have it.
~Justin
|
|
|
06-21-2006, 10:28 AM
|
#3
|
LQ Newbie
Registered: Jun 2006
Posts: 7
Original Poster
Rep:
|
Thanks for your reply, Justin. Here is the info you requested.
curoff() turns the cursor off
curon() turns the cursor on
getch() gets a character from the keyboard without echo and returns immediately without waiting for a \r. It differs from getchar() in these two respects; no echo, no wait for \r
Use of these functions in Borland C++ requires conio.h which does not exist in gcc. Use of these functions is described in the manual provide in the C starter kit from Sams Publishing 'Teach Yourself C in 21 Days', authors Aiken & Jones.
I tried man getch; got no such entry msg. I'm using RedHat LINUX v6.0. I do not find curses.h in the /usr/include/ directory.
|
|
|
06-21-2006, 12:30 PM
|
#4
|
Member
Registered: Oct 2005
Location: Knoxville, Tn (USA)
Distribution: OpenSUSE, Ubuntu
Posts: 250
Rep:
|
curses.h is included in the ncurses library. I'm not sure about the other two functions, but you might look at curs_set.
Here is a good look at curses.h.
Good Luck,
~Justin
|
|
|
06-21-2006, 12:59 PM
|
#5
|
LQ Newbie
Registered: Jun 2006
Posts: 7
Original Poster
Rep:
|
Thanks Justin,
I will try ncurses and let you know if I have success!
|
|
|
06-21-2006, 01:03 PM
|
#6
|
LQ Addict
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464
Rep: 
|
For info, functions are provided by libraries (e.g. the aforementioned ncurses library) and not by the compiler itself.
|
|
|
All times are GMT -5. The time now is 12:54 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|