equal command for gotoxy() in uinx | Unix Linux Forums | Programming

  Go Back    


Programming Post questions about C, C++, Java, SQL, and other programming languages here.

equal command for gotoxy() in uinx

Programming


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 10-03-2003
g_s_r_c g_s_r_c is offline
Registered User
 
Join Date: Aug 2003
Last Activity: 21 December 2005, 7:28 AM EST
Location: india
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
equal command for gotoxy() in uinx

hello

i am new user to this site.
i want to know about equal command for gotoxy() which is used in dos operating system and also equal hedder file for conio.h?
please give me responce to me if anybudy know about that.
Sponsored Links
    #2  
Old 10-03-2003
kowrip kowrip is offline
Registered User
 
Join Date: Sep 2003
Last Activity: 12 December 2003, 1:17 PM EST
Location: New Jersey
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
I'm not familiar with the conio.h header file. However, I did a quick search on it. It seems to define a lot of screen-based functions. You may want to look into the curses library on UNIX systems (libcurses.a or libncurses.a). They provide similar functionality. Go to a search engine like "google.com" and do a search on "Curses Library Functions" or something similar to that.
Sponsored Links
    #3  
Old 11-23-2003
g_s_r_c g_s_r_c is offline
Registered User
 
Join Date: Aug 2003
Last Activity: 21 December 2005, 7:28 AM EST
Location: india
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
hai

i got on command which is equalent to gotoxy() is "tput cup" which is used command promt for that it can used in programs also as system("tput cup 10 20");i think there is some disadvantages in that so if any budy know about it's equalent can replay me.
    #4  
Old 11-23-2003
kduffin's Avatar
kduffin kduffin is offline Forum Advisor  
UN1X
 
Join Date: Nov 2003
Last Activity: 21 January 2014, 4:03 PM EST
Location: Belize
Posts: 484
Thanks: 0
Thanked 3 Times in 2 Posts
tput can be used to reset terms, position cursor placement and other terminfo functions. Keep in mind that the forum that you posted to is for "C Programming", tput would be used in shell/CLI (command line interface) programming. If you are wanting to write a program that can run menus etc. on any terminal type, UNIX Curses is what you would use. A 'man curses' would give you more information. There are numerous examples on the web:

http://heather.cs.ucdavis.edu/~matlo...age/Curses.pdf

Such things as move(x,y) let's you move the cursor to the point of the screen you need to. It is important to remember to get the capabilities of your screen with such things as getmaxyx().

While at motorola, we used curses based programs with great success to minimize the technology on the production floor - much easier to replace a dumb terminal hanging off a term server than a pc or UNIX system.

Cheers,

Keith
Sponsored Links
    #5  
Old 11-29-2003
g_s_r_c g_s_r_c is offline
Registered User
 
Join Date: Aug 2003
Last Activity: 21 December 2005, 7:28 AM EST
Location: india
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
what is "tput". what is the use of it. but in curses we have "move" but it is not working.
Sponsored Links
    #6  
Old 12-25-2003
acqy acqy is offline
Registered User
 
Join Date: Dec 2003
Last Activity: 16 December 2007, 8:24 PM EST
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Lightbulb

Hello, I've seen your question, you can use ncurses library to solve your problem. Maybe "mvprintw" function will help you, but do note that when you compile your project, please add "-lcurses" option to your compiler, that is :
g++ -lcurses my.cpp

By the way, you can also use newt library.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Finding difference in two comma separated files in UINX mymoto Shell Programming and Scripting 2 07-07-2011 05:02 AM
while [ $x -ge 50 ] + and equal to zero ; then losh Shell Programming and Scripting 1 06-10-2010 06:11 AM
Setting array equal to command response pattywac Shell Programming and Scripting 4 07-20-2008 09:15 AM
gotoxy(x,y) in UNIX Orbix UNIX for Dummies Questions & Answers 3 12-24-2007 05:02 AM
Command to list Files less than or equal to 2k size bache_gowda UNIX for Advanced & Expert Users 3 12-26-2003 11:02 AM



All times are GMT -4. The time now is 04:00 AM.