From owner-freebsd-hackers Thu Mar 23 1:45:52 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.rpi.edu (mail.rpi.edu [128.113.100.7]) by hub.freebsd.org (Postfix) with ESMTP id B753737C3C5 for ; Thu, 23 Mar 2000 01:45:49 -0800 (PST) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.acs.rpi.edu [128.113.24.47]) by mail.rpi.edu (8.9.3/8.9.3) with ESMTP id EAA399264; Thu, 23 Mar 2000 04:45:46 -0500 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: References: Date: Thu, 23 Mar 2000 04:46:27 -0500 To: hackers@FreeBSD.ORG From: Garance A Drosihn Subject: Re: Handling maximum values in C (was: MAX_UID) Cc: Bruce Evans , Peter Dufault , Ed Hall Content-Type: text/plain; charset="us-ascii" ; format="flowed" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG At 3:04 AM -0500 3/23/00, I (Garance A Drosihn) wrote: >Once I found the messages, >it took me another 30 seconds to realize the above is only for >UNSIGNED types. For signed types, all of the above just result in a >"max value" of -1... (so imagine the fun if some arbitrary type is >changed from 'signed short' to 'unsigned int'...) That last part was SUPPOSED to be "imagine the fun if some arbitrary type is changed from 'unsigned short' (were these tricks work) to 'signed int' (where the tricks would result in a "max" value of -1). time for me to get some sleep, I guess... --- Garance Alistair Drosehn = gad@eclipse.acs.rpi.edu Senior Systems Programmer or drosih@rpi.edu Rensselaer Polytechnic Institute To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message