From owner-freebsd-hackers Mon Jan 16 21:04:03 1995 Return-Path: hackers-owner Received: (from root@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id VAA29005 for hackers-outgoing; Mon, 16 Jan 1995 21:04:03 -0800 Received: from UUCP-GW.CC.UH.EDU (root@UUCP-GW.CC.UH.EDU [129.7.1.11]) by freefall.cdrom.com (8.6.9/8.6.6) with SMTP id VAA28999 for ; Mon, 16 Jan 1995 21:03:54 -0800 Received: from Taronga.COM by UUCP-GW.CC.UH.EDU with UUCP id AA23785 (5.67a/IDA-1.5); Mon, 16 Jan 1995 23:00:22 -0600 Received: by bonkers.taronga.com (smail2.5p) id AA10315; 16 Jan 95 22:58:53 CST (Mon) Received: (from peter@localhost) by bonkers.taronga.com (8.6.8/8.6.6) id WAA10312; Mon, 16 Jan 1995 22:58:52 -0600 From: Peter da Silva Message-Id: <199501170458.WAA10312@bonkers.taronga.com> Subject: Re: CVS stuff To: terry@cs.weber.edu (Terry Lambert) Date: Mon, 16 Jan 1995 22:58:52 -0600 (CST) Cc: ache@astral.msk.su, phk@ref.tfs.com, dgy@seagull.rtd.com, freebsd-hackers@freefall.cdrom.com, roberto@blaise.ibp.fr In-Reply-To: <9501161740.AA23380@cs.weber.edu> from "Terry Lambert" at Jan 16, 95 10:40:44 am X-Mailer: ELM [version 2.4 PL23] Content-Type: text Content-Length: 764 Sender: hackers-owner@FreeBSD.org Precedence: bulk > Any code that uses a signed character as an lvalue for a getch/getc, and > then checks for -1. That code is broken whether or not you're considering localization, simply from portability reasons. There are compilers that accept most legal ANSI C code but do not support the "signed" keyword (or even silently ignore it!). (see, deansi.c) Yes, these compilers are broken... but they exist. Writing code that breaks as badly as this will (can you say infinite loop on EOF) when it's so easy to do it right and the correct type for getchar() has been so heavily advertised is just plain stupid. > Most code is, by definition, poorly equipped for localization. It's a > question of where you draw your line in the sand. I draw my line on the portability front.