www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/30/04:01:56

Message-Id: <9804300758.AA22715@axe.bre.da>
Subject: Re: gotoxy() for UNIX
To: thiagofga AT ambr DOT com DOT br (Thiago F.G. Albuquerque)
Date: Thu, 30 Apr 1998 9:58:08 METDST
Cc: djgpp AT delorie DOT com
In-Reply-To: <3.0.5.32.19980430022205.007b09d0@200.252.238.1>; from "Thiago F.G. Albuquerque" at Apr 30, 98 2:22 am
From: Jens Bischoff <j DOT bischoff AT airbus DOT dasa DOT de>

Hi!

> Is it true that gotoxy() doesn't exist on UNIX environments? And that the
> only way to port my DOS code is to rewrite it using the complicated curses
> library? For Christ's sake, I just want to move the cursor! I don't want to
> create buffered windows! Does anybody have a simpler solution?

Hmm, you might use the xterm-terminal emulator.
It understands some of the ANSI/VT100 escape sequences that can
be used for cursor movements.

An implementation of gotoxy() could look like this:

void gotoxy (int x, int y)
  {
   printf ("\033[%d;%dH", y, x);
  }


Jens


--
|      |      | Jens Bischoff   |   Daimler-Benz Aerospace Airbus |
|   --<O>--   +-----------------+---------------------------------+
|      |      | Aerodynamic Data Department (EFD)                 |
| Dasa Airbus | Huenefeldstrasse 1-5     D-28199 Bremen (Germany) |

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019