Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 (Tek) 9/26/83; site azure.UUCP Path: utzoo!watmath!clyde!floyd!harpo!seismo!hao!hplabs!tektronix!teklds!azure!keithr From: keithr@azure.UUCP (Keith Rule) Newsgroups: net.micro.cpm Subject: Re: Aztec CII I/O Redirection (Reposted with new info) Message-ID: <2640@azure.UUCP> Date: Mon, 26-Mar-84 12:28:26 EST Article-I.D.: azure.2640 Posted: Mon Mar 26 12:28:26 1984 Date-Received: Wed, 28-Mar-84 01:13:35 EST Organization: Tektronix, Beaverton OR Lines: 104 (Reposting) The problem of slow redirected I/O in Aztec C is caused by I/O being unbuffered. This causes each byte of output that is redirected to a file to be written seperately (Read sec- tor, place byte, write sector). No wonder is so slow. The solution I've been using is simply changing the unbuf- fered I/O into buffered I/O. I've also added a few exten- tions which are "2>" (redirect stderr), "2>>" (append stderr) and ">>" (append stdout). To implement the fix find the file called "CROOT.C" in the source to your library. It contains a function call "Croot()". Replace the while loop that starts with "while (Argc < MAXARGS)" with the following-- while (Argc < MAXARGS) { while (*cp == ' ' || *cp == '') ++cp; if (*cp == NULL) break; k = -1; switch (*cp) { case '>': if (*(cp+1)=='>') { ++cp; k = 1; } else k = 1; break; case '<': k = 0; break; case '2': if (*(cp+1)) == '>') { ++cp; if (*(cp+1) == '>') { ++cp; k = 5; } else k = 2; }