help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to detect terminal type?


From: Andy Adler
Subject: Re: How to detect terminal type?
Date: Fri, 10 Jan 2003 14:48:40 -0500 (EST)

On Fri, 10 Jan 2003, Peter Brinkmann wrote:
> So, my new question is, what's the best way to detect whether my code is
> running under *nix or Windows? I guess I could look at the result of
> computer(), but I don't know what kind of result it returns when running
> under Windows. Can I detect Windows by checking whether
>       findstr(computer(),'windows')
> returns a nonzero value, or how should I go about this?

my definition of windows is:
   ~isempty( findstr(computer(),'cygwin') )

Currently, I believe all octave for windows runs on top
of cygwin, so this is reliable.

However, if Paul Kienzle ever finishes his octave on mingw project,
then that way change ...

andy




-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]