From owner-freebsd-hackers Mon Mar 10 04:00:08 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id EAA14869 for hackers-outgoing; Mon, 10 Mar 1997 04:00:08 -0800 (PST) Received: from mauve.csi.cam.ac.uk (mauve.csi.cam.ac.uk [131.111.8.38]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id DAA14797 for ; Mon, 10 Mar 1997 03:59:58 -0800 (PST) Received: from g.pet.cam.ac.uk [131.111.209.233] by mauve.csi.cam.ac.uk with smtp (Exim 1.58 #1) id 0w43jT-00023E-00; Mon, 10 Mar 1997 11:59:11 +0000 Received: from g.pet.cam.ac.uk [127.0.0.1] by g.pet.cam.ac.uk with esmtp (Exim 1.59 #1) id 0w43jj-0000Dx-00; Mon, 10 Mar 1997 11:59:27 +0000 To: " steve howe" Cc: freebsd-hackers@freebsd.org Subject: Re: profile/alias In-reply-to: Your message of "Sat, 08 Mar 1997 20:53:02 PST." <199703090453.UAA19011@f29.hotmail.com> Date: Mon, 10 Mar 1997 11:59:27 +0000 From: Gareth McCaughan Message-Id: Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk With the .profile you quoted !#/bin/sh # ~/.profile alias qrstuv="echo hey!" echo ~/.profile ENV=~/.shinit; export ENV I don't get the alias problem you report. Either you're doing something else funny (though I can't think what), or the problem was there in 2.1.5 and has been fixed in 2.2 . Incidentally, you mean #! not !#. Your problem with the mathematical functions is because you aren't linking with the math libraries. This is a well-known Unix gotcha; you need to put "-lm" at the end of whatever compilation command is doing the linking. I don't understand why we don't do longer long doubles; the underlying hardware understands IEEE extended precision, after all. Or has that not always been the case? (If not, it might be a compatibility thing.) There may well be closer-to-the-hardware approaches to the kbhit() thing, but what I've described is likely to be more portable. Not that it will be *very* portable, but better than any sort of poking around with hardware can be. I don't understand what you mean by "it does seems slightly problematic though to have to always DEPEND on a stream when your code could be doing more useful things - instead of waiting."; the code *won't* be waiting. That's the whole point. If you make I/O on a given fd non-blocking then it *doesn't* wait when there is no data available; it just returns with an error, which you can detect. Er, and there's a big difference between streams (as used by fread() etc) and file descriptors (as used by read() etc), which is of some relevance if you're wondering about the overhead involved here. -- Gareth McCaughan Dept. of Pure Mathematics & Mathematical Statistics, gjm11@dpmms.cam.ac.uk Cambridge University, England.