comp.lang.ada
 help / color / mirror / Atom feed
* Dump screen content into file....
@ 1996-12-09  0:00 BAMBA ISMAEL 19320
  1996-12-09  0:00 ` john schneider
  1996-12-09  0:00 ` Larry Kilgallen
  0 siblings, 2 replies; 8+ messages in thread
From: BAMBA ISMAEL 19320 @ 1996-12-09  0:00 UTC (permalink / raw)



Hi all!

Does anybody knows how to save a rs232 terminal screen( standard output)
into a file and conversely (dump a given file into memory)?

Than you for help!

P.S:If Robert Dewar is to answer,please let him be a little bit humble
and stop speculating about what ones in his mind fails to understand or
not.I indeed need some hints.but this in no way makes me stupid.let
M.Dewar know i might not know Ada but i do know some other languages.in
addition to this, i do not feel like arguing about the "turbo" features
of pascal...


someone once said:" if i had to choose between betraying my friends or
betraying my country, i pray i'll have the guts to betray my country!"
  forgot the author.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Dump screen content into file....
  1996-12-09  0:00 Dump screen content into file BAMBA ISMAEL 19320
@ 1996-12-09  0:00 ` john schneider
  1996-12-09  0:00 ` Larry Kilgallen
  1 sibling, 0 replies; 8+ messages in thread
From: john schneider @ 1996-12-09  0:00 UTC (permalink / raw)



BAMBA ISMAEL 19320 wrote:
> 
> Hi all!
> 
> Does anybody knows how to save a rs232 terminal screen( standard output)
> into a file and conversely (dump a given file into memory)?
> 
> Than you for help!
> 
> P.S:If Robert Dewar is to answer,please let him be a little bit humble
> and stop speculating about what ones in his mind fails to understand or
> not.I indeed need some hints.but this in no way makes me stupid.let
> M.Dewar know i might not know Ada but i do know some other languages.in
> addition to this, i do not feel like arguing about the "turbo" features
> of pascal...
> 
> someone once said:" if i had to choose between betraying my friends or
> betraying my country, i pray i'll have the guts to betray my country!"
>   forgot the author.

I assume, from the reference to "standard output", that you're talking
about a Unix-based machine.  If this is the case, you can pipe the
output of your program through the Unix "tee" command which can
write/append the data to a file and also send it to your terminal.
For example:

   command | tee log.txt

will store the output from "command" in a file called "log.txt" and
also display it on your screen.

There ARE some limitations to this, especially if you are doing
some sort of terminal input between your outputs, but if your
program is just dumping out some data, it will work fine.


John Schneider
j-schneider@ti.com
972-575-3736

My opinions are my own -- but you are welcome to share them.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Dump screen content into file....
  1996-12-09  0:00 Dump screen content into file BAMBA ISMAEL 19320
  1996-12-09  0:00 ` john schneider
@ 1996-12-09  0:00 ` Larry Kilgallen
  1996-12-10  0:00   ` BAMBA ISMAEL 19320
                     ` (2 more replies)
  1 sibling, 3 replies; 8+ messages in thread
From: Larry Kilgallen @ 1996-12-09  0:00 UTC (permalink / raw)



In article <32AC4A25.41C6@cnam.fr>, BAMBA ISMAEL 19320 <bamba_i@cnam.fr> writes:

> Does anybody knows how to save a rs232 terminal screen( standard output)
> into a file and conversely (dump a given file into memory)?

> P.S:If Robert Dewar is to answer,please let him be a little bit humble
> and stop speculating about what ones in his mind fails to understand or
> not.I indeed need some hints.but this in no way makes me stupid.let
> M.Dewar know i might not know Ada but i do know some other languages.in
> addition to this, i do not feel like arguing about the "turbo" features
> of pascal...

Regardless of what the other language is with which you might be
familiar, the process of reading characters from an RS232 device
into memory and writing them to disk will be much the same in
Ada.  You need a manual for the device to determine whether it
is able to answer inquiries regarding the characters on screen
(most are not).

So you want to send various control functions to the terminal,
and you do that using Ada IO capabilities as you would the
IO capabilities of the other languages you use.  Or perhaps
on some operating systems (like VMS) you might want to use
OS-specific calls to obtain larger buffers or asynchrouous
input from a single read, or read-with-prompt semantics.

The process of reading characters from a terminal screen
really has much more to do with the model of terminal
than with the programming language, so you might consider
a hardware-specific newsgroup.

Larry Kilgallen




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Dump screen content into file....
  1996-12-09  0:00 ` Larry Kilgallen
@ 1996-12-10  0:00   ` BAMBA ISMAEL 19320
  1996-12-10  0:00     ` Larry Kilgallen
  1996-12-10  0:00   ` Jon S Anthony
  1996-12-11  0:00   ` Jon S Anthony
  2 siblings, 1 reply; 8+ messages in thread
From: BAMBA ISMAEL 19320 @ 1996-12-10  0:00 UTC (permalink / raw)



Hi all !
Thanks to Larry Kilgallen and John Schneider for answering my posted
question! 8^}

> In article <32AC4A25.41C6@cnam.fr>, BAMBA ISMAEL 19320 <bamba_i@cnam.fr> writes:
> 
> > Does anybody knows how to save a rs232 terminal screen( standard output)
> > into a file and conversely (dump a given file into memory)?
> 

Larry Kilgallen wrote:
> 
>........... 
>  Or perhaps on some operating systems (like VMS) you might want to use
> OS-specific calls to obtain larger buffers or asynchrouous
> input from a single read, or read-with-prompt semantics.
>
Im using the VMS operating system on a VAX machine.do you or anybody
know of those OS-specific calls?
 
> The process of reading characters from a terminal screen
> really has much more to do with the model of terminal
> than with the programming language, so you might consider
> a hardware-specific newsgroup.

Actually,what im trying to do is alternatively dump screen to file and
file to screen from inside a Ada program .I know how to do it in a
memory mapped terminal like a Pc( you know the video buffer's address)
but the thing seems to be hasrsher on a  RS232 terminal.i'll flip
through hardware-specific newsgroups.But please if anyone has the
slightest idea,PLEASE e-mail me or post !


to John: Thank you for your Unix-oriented hint! do you know of any Vax
thing that could as well?

Rgds to all you guys who patiently take a piece of you time to answer
question.

> Larry Kilgallen
> John  schneider


Isnael.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Dump screen content into file....
  1996-12-10  0:00   ` BAMBA ISMAEL 19320
@ 1996-12-10  0:00     ` Larry Kilgallen
  0 siblings, 0 replies; 8+ messages in thread
From: Larry Kilgallen @ 1996-12-10  0:00 UTC (permalink / raw)



In article <32AD301A.41C6@cnam.fr>, BAMBA ISMAEL 19320 <bamba_i@cnam.fr> writes:

> Larry Kilgallen wrote:
>> 
>>........... 
>>  Or perhaps on some operating systems (like VMS) you might want to use
>> OS-specific calls to obtain larger buffers or asynchrouous
>> input from a single read, or read-with-prompt semantics.
>>
> Im using the VMS operating system on a VAX machine.do you or anybody
> know of those OS-specific calls?

For VMS you will find information about the calls in the I/O User's
Reference Manual, in particular the chapter on the Terminal Driver.
DEC writers have done a superb job of reducing that to less than
125 pages, so I am certainly not able to summarize it in a newsgroup
posting (pause for sigh of relief from the c.l.a. folk who care
about Ada but not VMS).  For the Ada bindings to all VMS System
Services, use the package Starlet which comes with DEC Ada.

>> The process of reading characters from a terminal screen
>> really has much more to do with the model of terminal
>> than with the programming language, so you might consider
>> a hardware-specific newsgroup.
> 
> Actually,what im trying to do is alternatively dump screen to file and
> file to screen from inside a Ada program .I know how to do it in a
> memory mapped terminal like a Pc( you know the video buffer's address)
> but the thing seems to be hasrsher on a  RS232 terminal.i'll flip
> through hardware-specific newsgroups.But please if anyone has the
> slightest idea,PLEASE e-mail me or post !

My "slightest idea" is that in general it is not possible because
terminal hardware is entirely different from bitmapped graphics
hardware.

That is why I suggested hardware groups.  There is no aspect of
this problem which seems to be dependent on Ada.  When you figure
out how you need to poke the hardware, Ada provides a reliable
basis for writing programs to do that. But like other languages,
Ada gives no assistance at all in narrowing down the problem
in the first place.

Larry Kilgallen




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Dump screen content into file....
  1996-12-09  0:00 ` Larry Kilgallen
  1996-12-10  0:00   ` BAMBA ISMAEL 19320
@ 1996-12-10  0:00   ` Jon S Anthony
  1996-12-11  0:00     ` Fergus Henderson
  1996-12-11  0:00   ` Jon S Anthony
  2 siblings, 1 reply; 8+ messages in thread
From: Jon S Anthony @ 1996-12-10  0:00 UTC (permalink / raw)



In article <32AD301A.41C6@cnam.fr> BAMBA ISMAEL 19320 <bamba_i@cnam.fr> writes:

> 
> to John: Thank you for your Unix-oriented hint! do you know of any Vax
> thing that could as well?
> 
> Rgds to all you guys who patiently take a piece of you time to answer
> question.
> 
> > Larry Kilgallen
> > John  schneider

Does this "tee" command exist in POSIX?  If so, the VMS POSIX
subsystem should have the same capability.

/Jon
-- 
Jon Anthony
Organon Motives, Inc.
Belmont, MA 02178
617.484.3383
jsa@organon.com





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Dump screen content into file....
  1996-12-09  0:00 ` Larry Kilgallen
  1996-12-10  0:00   ` BAMBA ISMAEL 19320
  1996-12-10  0:00   ` Jon S Anthony
@ 1996-12-11  0:00   ` Jon S Anthony
  2 siblings, 0 replies; 8+ messages in thread
From: Jon S Anthony @ 1996-12-11  0:00 UTC (permalink / raw)



In article <58kvni$eai@mulga.cs.mu.OZ.AU> fjh@mundook.cs.mu.OZ.AU (Fergus Henderson) writes:

> jsa@alexandria (Jon S Anthony) writes:
> 
> >Does this "tee" command exist in POSIX?  If so, the VMS POSIX
> >subsystem should have the same capability.
> 
> Even if "tee" doesn't exist in POSIX, it would be trivial to implement
> yourself.

Sure.  But it is even more trivial to just use it, if it does exist.

/Jon
-- 
Jon Anthony
Organon Motives, Inc.
Belmont, MA 02178
617.484.3383
jsa@organon.com





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Dump screen content into file....
  1996-12-10  0:00   ` Jon S Anthony
@ 1996-12-11  0:00     ` Fergus Henderson
  0 siblings, 0 replies; 8+ messages in thread
From: Fergus Henderson @ 1996-12-11  0:00 UTC (permalink / raw)



jsa@alexandria (Jon S Anthony) writes:

>Does this "tee" command exist in POSIX?  If so, the VMS POSIX
>subsystem should have the same capability.

Even if "tee" doesn't exist in POSIX, it would be trivial to implement
yourself.

--
Fergus Henderson <fjh@cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3         |     -- the last words of T. S. Garp.




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~1996-12-11  0:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-12-09  0:00 Dump screen content into file BAMBA ISMAEL 19320
1996-12-09  0:00 ` john schneider
1996-12-09  0:00 ` Larry Kilgallen
1996-12-10  0:00   ` BAMBA ISMAEL 19320
1996-12-10  0:00     ` Larry Kilgallen
1996-12-10  0:00   ` Jon S Anthony
1996-12-11  0:00     ` Fergus Henderson
1996-12-11  0:00   ` Jon S Anthony

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox