Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!usc!orion.oac.uci.edu!beckman.com!dn71!a_rubin From: a_rubin@dsg4.dse.beckman.com (Arthur Rubin) Newsgroups: comp.binaries.ibm.pc.d Subject: Re: ALED goes to the wastebasket here in Iceland Message-ID: Date: 19 Jun 91 16:13:48 GMT References: <27098@as0c.sei.cmu.edu> <3253@krafla.rhi.hi.is> <7326@vela.acs.oakland.edu> <3269@krafla.rhi.hi.is> <1991Jun19.075229.3021@rci.dk> Lines: 32 Nntp-Posting-Host: dn71.dse.beckman.com In <1991Jun19.075229.3021@rci.dk> ej@rci.dk (Erik W. Jeppesen) writes: >einari@rhi.hi.is (Einar Indridason) writes: >>Instead I would like to see more code in this lines: >> .... >> c = getchar(); /* notice this, no masking of the >> 8th bit */ >> .... >And remember: > unsigned char c; >to avoid problems with code like the following: > if (c < 32) { > /* control character */ > ... > } Actually, it should be: int c; as getchar can return EOF, which is usually -1. -- 2165888@mcimail.com 70707.453@compuserve.com arthur@pnet01.cts.com (personal) a_rubin@dsg4.dse.beckman.com (work) My opinions are my own, and do not represent those of my employer.