octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #47320] new function devnull


From: Carnë Draug
Subject: [Octave-bug-tracker] [bug #47320] new function devnull
Date: Wed, 02 Mar 2016 14:06:47 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.6.1

URL:
  <http://savannah.gnu.org/bugs/?47320>

                 Summary: new function devnull
                 Project: GNU Octave
            Submitted by: carandraug
            Submitted on: Wed 02 Mar 2016 14:06:46 GMT
                Category: Octave Function
                Severity: 1 - Wish
                Priority: 5 - Normal
              Item Group: Feature Request
                  Status: None
             Assigned to: carandraug
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

Python has os.devnull which:

> The file path of the null device. For example: '/dev/null' for POSIX, 'nul'
for Windows.

We could have devnull() in Octave too. I would place this in
libinterp/corefcn/file-io.cc next to stdout, stdin, and stderr.  But those
return file handles since they are already open.  For devnull that's not
necessarily true. Any opinions?

I looked into libgnu and they do:


#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
  if (strcmp (filename, "/dev/null") == 0)
    filename = "NUL";
#endif





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?47320>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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