Re: Q: Line Counting, K&R sec. 1.5.3 on OS X
From: Mo Geffer (spinonhoney_at_optonline.net)
Date: 05/22/04
- Next message: Keith Thompson: "Re: Rand() with base"
- Previous message: Darrell Grainger: "Re: Q: Line Counting, K&R sec. 1.5.3 on OS X"
- In reply to: Kieran Simkin: "Re: Q: Line Counting, K&R sec. 1.5.3 on OS X"
- Next in thread: Darklight: "Re: Q: Line Counting, K&R sec. 1.5.3 on OS X"
- Reply: Darklight: "Re: Q: Line Counting, K&R sec. 1.5.3 on OS X"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 22 May 2004 02:41:20 GMT
In article <nozrc.1047$c94.729@newsfe4-gui>,
"Kieran Simkin" <kieran@digital-crocus.com> wrote:
> As mentioned by Barry, this problem is not actually a problem, your terminal
> will echo ^D as the character for control+D. Although this behaviour is
> operating system specific, it's not confined to BSD. You should probably not
> attempt to fix this "problem" as that would require mutilating your termcap
> or some other such nasty hack. Either way, this is off-topic. The best
> solution is to add a "\n" before printing anything after receiving an EOF,
> resulting in the ^D being placed on a line on its own and not interfering
> with your result output. I was actually under the impression UNIX did this
> for you, but it appears I'm just used to other people's code doing it. I've
> learned something by lurking :)
>
> --
>
>
> ~Kieran Simkin
> Digital Crocus
> http://digital-crocus.com/
>
> "Mo Geffer" <spinonhoney@optonline.net> wrote in message
> news:spinonhoney-63EBE3.21071921052004@news.easynews.com...
> > In article <barmar-569017.19373121052004@comcast.dca.giganews.com>,
> > Barry Margolin <barmar@alum.mit.edu> wrote:
> >
> > > In article <spinonhoney-B6276B.18295921052004@news.easynews.com>,
> > > Mo Geffer <spinonhoney@optonline.net> wrote:
> > >
> > > > Greetings:
> > > >
> > > > I have a question about the output of the sample program in section
> > > > 1.5.3 Line Counting of K&R, Second Edition.
<snip>
Okay, I went with Kieran's solution. At least my output makes sense now.
Thanks all!!
- Next message: Keith Thompson: "Re: Rand() with base"
- Previous message: Darrell Grainger: "Re: Q: Line Counting, K&R sec. 1.5.3 on OS X"
- In reply to: Kieran Simkin: "Re: Q: Line Counting, K&R sec. 1.5.3 on OS X"
- Next in thread: Darklight: "Re: Q: Line Counting, K&R sec. 1.5.3 on OS X"
- Reply: Darklight: "Re: Q: Line Counting, K&R sec. 1.5.3 on OS X"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|