Date: Mon, 10 Mar 1997 11:59:27 +0000 From: Gareth McCaughan <gjm11@dpmms.cam.ac.uk> To: " steve howe" <un_x@hotmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: profile/alias Message-ID: <E0w43jj-0000Dx-00@g.pet.cam.ac.uk> In-Reply-To: Your message of "Sat, 08 Mar 1997 20:53:02 PST." <199703090453.UAA19011@f29.hotmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E0w43jj-0000Dx-00>
