From owner-freebsd-hackers Mon Oct 16 08:18:58 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id IAA11118 for hackers-outgoing; Mon, 16 Oct 1995 08:18:58 -0700 Received: from sequent.kiae.su (sequent.kiae.su [144.206.136.6]) by freefall.freebsd.org (8.6.12/8.6.6) with SMTP id IAA11098 for ; Mon, 16 Oct 1995 08:18:40 -0700 Received: by sequent.kiae.su id AA09804 (5.65.kiae-2 ); Mon, 16 Oct 1995 19:08:54 +0400 Received: by sequent.KIAE.su (UUMAIL/2.0); Mon, 16 Oct 95 19:08:54 +0300 Received: (from ache@localhost) by ache.dialup.demos.ru (8.6.11/8.6.9) id SAA07637; Mon, 16 Oct 1995 18:06:04 +0300 To: Bruce Evans , phk@critter.tfs.com Cc: hackers@freefall.freebsd.org, j@uriah.heep.sax.de, kaleb@x.org References: <199510161408.AAA30026@godzilla.zeta.org.au> In-Reply-To: <199510161408.AAA30026@godzilla.zeta.org.au>; from Bruce Evans at Tue, 17 Oct 1995 00:08:44 +1000 Message-Id: Organization: Olahm Ha-Yetzirah Date: Mon, 16 Oct 1995 18:06:04 +0300 (MSK) X-Mailer: Mail/@ [v2.40 FreeBSD] From: =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= (aka Andrey A. Chernov, Black Mage) X-Class: Fast Subject: Re: A couple problems in FreeBSD 2.1.0-950922-SNAP Lines: 42 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Length: 1730 Sender: owner-hackers@FreeBSD.org Precedence: bulk In message <199510161408.AAA30026@godzilla.zeta.org.au> Bruce Evans writes: >>running it on sbin: >>100% use ctype!!! >>So my suspection was right. >This mainly proves that the library modules are even more excessively >interdependent than at first appearance. I investigated why /sbin/dset >references ctype: >1) dset references mkstemp() for some reason. mkstemp() uses only > isdigit() from among the ctype functions. isdigit() isn't dependent > on the locale, but it drags in locale stuff anyway. Yes, mkstemp is one of rare functions which is pure-ASCII. I think direct test for '0' >= x =< '9' is preferred for pure-ASCII functions than ctype usage. >2) dset references vfprintf() which references __dtoa(). __dtoa() doesn't > reference ny ctype functions, but it is implemented in the same module > as strtod() which does. strtod() references only isspace() among the > ctype functions (it uses comparisons with '0' and '9' instead of > isdigit()). isspace() is purity killer. >Almost everything references printf so 2) applies to almost everything. >Thus we have about 55 * 20K of bloat in [s]bin mainly for the stupid >reason that a function that is almost never called (strtod()) needs to >know what a space is. vfprintf module calls too many functions besides dtoa, they are fflush, swsetup, sfvwrite, abort, etc. I am not shure that any of them not calls ctype functions indirectly additionly. -- Andrey A. Chernov : And I rest so composedly, /Now, in my bed, ache@astral.msk.su : That any beholder /Might fancy me dead - FidoNet: 2:5020/230.3 : Might start at beholding me, /Thinking me dead. RELCOM Team,FreeBSD Team : E.A.Poe From "For Annie" 1849