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: Rik
Subject: [Octave-bug-tracker] [bug #47320] new function devnull
Date: Wed, 02 Mar 2016 18:50:44 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Follow-up Comment #5, bug #47320 (project octave):

Yes, "NUL" is the "/dev/null" equivalent for Windows.

The question for me is whether it would be used frequently enough to justify
its existence.  In the core scripts, "NUL" is only used twice in print.m which
doesn't seem sufficient.


if (dos_shell)
  ## FIXME: Is this the right thing to do for DOS?
  cmd = sprintf ("%s -L %s 2> NUL", opts.fig2dev_binary, devopt);
else
  cmd = sprintf ("%s -L %s 2> /dev/null", opts.fig2dev_binary, devopt);
endif


In libinterp, it is used only three times in the dldfcn directory for
__delaunayn__.cc, __voronoi__.cc, convhulln.cc.  In C++ you would probably
still use ifdefs rather than an external function to get this information.  


  // Replace the outfile pointer with stdout for debugging information.
#if defined (OCTAVE_HAVE_WINDOWS_FILESYSTEM) && ! defined
(OCTAVE_HAVE_POSIX_FILESYSTEM)
  FILE *outfile = gnulib::fopen ("NUL", "w");
#else
  FILE *outfile = gnulib::fopen ("/dev/null", "w");
#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]