Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Scott Worley <sworley <at> chkno.net>
Subject: Files and pipes only?
Newsgroups: gmane.comp.graphics.gnuplot.devel
Date: Friday 15th February 2008 23:54:34 UTC (over 9 years ago)
Why are data files required to be regular files or pipes?

There's a S_ISREG or S_ISFIFO check performed in src/datafile.c around 
line 1303.

I often use bash's <() process substitution syntax to generate data to 
plot.  This works great in GNU/Linux, and worked in FreeBSD, OpenBSD, 
and NetBSD with bash versions less than 3.2.  Starting with bash 3.2.0, 
bash uses /dev/fd/63 and similar for these substitutions.  In Linux, 
these "devices" are pipes -- they are S_ISFIFO.  In *BSD, they are 
character devices -- S_ISCHR.

What is the S_ISREG or S_ISFIFO test for, anyway?  It's been in gnuplot 
since the sourceforge cvs import (rev 1.1, 1999), so there's no commit 
log there to explain the reason for adding it.  Also, the test is simply 
skipped ifndef HAVE_SYS_STAT_H.


Removing the test from gnuplot allowed my graphing scripts to work in 
*BSD again.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gnuplot-beta mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
 
CD: 56ms