Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!hp4nl!cwi.nl!dik From: dik@cwi.nl (Dik T. Winter) Newsgroups: comp.binaries.ibm.pc.d Subject: Re: ALED goes to the wastebasket here in Iceland Message-ID: <3744@charon.cwi.nl> Date: 19 Jun 91 23:28:42 GMT References: <3269@krafla.rhi.hi.is> <1991Jun19.075229.3021@rci.dk> Sender: news@cwi.nl Organization: CWI, Amsterdam Lines: 19 In article a_rubin@dsg4.dse.beckman.com (Arthur Rubin) writes: > In <1991Jun19.075229.3021@rci.dk> ej@rci.dk (Erik W. Jeppesen) writes: > >> c = getchar(); /* notice this, no masking of the > >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. And also: if ((unsigned) c < 32) { ... -- dik t. winter, cwi, amsterdam, nederland dik@cwi.nl