Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site ut-sally.UUCP
Path: utzoo!watmath!clyde!burl!hou3c!hocda!houxm!houxz!vax135!floyd!cmcl2!seismo!ut-sally!shdanfor
From: shdanfor@ut-sally.UUCP (Scott Danforth)
Newsgroups: net.micro.pc
Subject: strange stdin behavior
Message-ID: <2258@ut-sally.UUCP>
Date: Wed, 13-Jun-84 13:04:08 EDT
Article-I.D.: ut-sally.2258
Posted: Wed Jun 13 13:04:08 1984
Date-Received: Thu, 14-Jun-84 01:17:14 EDT
Organization: U. Texas CS Dept., Austin, Texas
Lines: 14

I'm using Microsoft C on a COMPAQ.

Can anybody tell me why the following C program to copy stdin to stdout
doesn't work.  (If I do "cpstd < file", each line of file is printed twice.)


#include 
main()
{
    int c;
    while ((c = getc(stdin)) != EOF)
	putc(c,stdout);
}