From: Stephen Leake <stephen.a.leake.1@gsfc.nasa.gov>
Subject: Re: Fill string with multiple lines from standard_input
Date: 20 Aug 2002 11:01:08 -0400
Date: 2002-08-20T15:10:26+00:00 [thread overview]
Message-ID: <uznvh1snf.fsf@gsfc.nasa.gov> (raw)
In-Reply-To: ajrisv$lc9$03$1@news.t-online.com
"Vincent Smeets" <No@Spam.org> writes:
> I am working on a remote site and I want all my e-mail to be encrypted and
> forwarded. I am writing a program that will create a new mail with an
> attachment that contains the encrypted mail (with PGP).
Ok, that makes sense. Most likely a stream-based approach will be
best; just leave everything in stream buffers.
> <snip description of mail processing system>
> As a second release, I want to rewrite my program to work line by line. This
> way, I will need to preserve more state in between the processing of the
> lines, but this will too need the <CR>s as they are in the input stream!
What is the advantage of working "line by line"? If it is to reduce
the memory usage, then a better approach is to define a stream buffer
size, and handle the end-of-buffer condition appropriately. "lines"
don't mean much in this kind of application; in fact, as you have
seen, using Ada.Text_IO to read lines actually breaks the application.
--
-- Stephe
next prev parent reply other threads:[~2002-08-20 15:01 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-14 19:34 Fill string with multiple lines from standard_input Vincent Smeets
2002-08-14 20:37 ` Stephen Leake
2002-08-15 17:57 ` Vincent Smeets
2002-08-15 20:47 ` Stephen Leake
2002-08-19 19:39 ` Vincent Smeets
2002-08-20 15:01 ` Stephen Leake [this message]
2002-08-20 18:26 ` Vincent Smeets
2002-08-20 19:46 ` tmoran
2002-08-21 12:50 ` Jean-Pierre Rosen
2002-08-21 19:19 ` Randy Brukardt
2002-08-25 0:34 ` AG
2002-08-21 14:37 ` Kevin Cline
2002-08-21 19:47 ` Robert Dewar
2002-08-22 7:40 ` Kevin Cline
2002-08-23 19:49 ` Peter Richtmyer
2002-08-22 20:36 ` Kevin Cline
2002-08-25 0:45 ` AG
2002-08-26 0:47 ` Kevin Cline
2002-08-15 2:30 ` SteveD
2002-08-15 18:02 ` Vincent Smeets
2002-08-16 0:25 ` Robert Dewar
2002-08-15 19:07 ` Vincent Smeets
2002-08-15 21:49 ` chris.danx
2002-08-16 19:30 ` Ted Dennison
2002-08-17 2:26 ` Randy Brukardt
2002-08-17 10:24 ` Robert Dewar
2002-08-19 13:40 ` Ted Dennison
2002-08-20 0:03 ` Robert Dewar
2002-08-16 17:33 ` Alexei Polkhanov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox