Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!xanth!nic.MR.NET!hal!ncoast!allbery From: allbery@ncoast.ORG (Brandon S. Allbery) Newsgroups: comp.databases Subject: Re: INFORMIX 4GL screen print Message-ID: <13518@ncoast.ORG> Date: 30 Mar 89 22:29:32 GMT References: <1031@uel.uel.co.uk> Reply-To: allbery@ncoast.UUCP (Brandon S. Allbery) Followup-To: comp.databases Organization: Cleveland Public Access UN*X, Cleveland, Oh Lines: 40 As quoted from <1031@uel.uel.co.uk> by vvk@uel.uel.co.uk (Vijayakumar Vijayaratnam): +--------------- | Firstly thanks for the responses to the original question about the subject | of extracting a hard copy of a INFORMIX screen , What I did fail to mention | was that I want to achieve this from a INFORMIX 4GL environment. +--------------- Informix (all versions from the old non-SQL version on) uses a modified curses called "rdsterm". You should have an include file called "rdsterm.h" in the informix include directory. Most portable: save current position, use inch() to fetch characters from the screen, restore cursor. Only problem is, I don't think rdsterm includes the curses inch() function. If it does, any curses manual will give you the details. Less portable: scrdump() { int x, y; for (y = 0; y < LINES; y++) for (x = 0; x < COLS: x++) do_something_with(stdscr->_y[y][x]); } The problem with this is that it uses an internal structure (_y). Also, if you lack rdsterm.h, you can't do it. DO NOT TRY TO USE /usr/include/curses.h FOR THIS!!! Rdsterm uses a slightly different internal format for the WINDOW structure. I don't know of any other way to accomplish it. ++Brandon -- Brandon S. Allbery, moderator of comp.sources.misc allbery@ncoast.org uunet!hal.cwru.edu!ncoast!allbery ncoast!allbery@hal.cwru.edu Send comp.sources.misc submissions to comp-sources-misc@ NCoast Public Access UN*X - (216) 781-6201, 300/1200/2400 baud, login: makeuser