This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ANNOUNCEMENT] Updated: gnuplot-4.2.4-1 - A command-line driven interactive function plotting utility.


Jim Kleckner wrote:
Dr. Volker Zell wrote:
Hi

A new version of 'gnuplot' has been uploaded to a server near you.

[snip]


Would you mind to consider including the patch documented here:
http://article.gmane.org/gmane.os.cygwin.applications/17023
and here:
http://cygwin.com/ml/cygwin-apps/2008-06/msg00102.html

Is that list the correct place to submit those kind of patches?

My recent upgrade caused me to rediscover this performance patch.
I didn't re-measure the effects, but it seems like much more than 2X speedup now.

Attached is a combined patch file.
--- origsrc/gnuplot-4.2.4/src/plot.c	2007-06-07 09:26:32.000000000 -0700
+++ src/gnuplot-4.2.4/src/plot.c	2009-03-25 15:44:20.237288000 -0700
@@ -433,8 +433,15 @@
      * Failing this, I propose we just make the call and
      * ignore the return : its probably not a big deal
      */
+#ifdef __CYGWIN__
+    if (isatty(fileno(stdin))) {
+        if (setvbuf(stdout, (char *) NULL, _IOLBF, (size_t) 1024) != 0)
+            (void) fputs("Could not linebuffer stdout\n", stderr);
+    }
+#else
     if (setvbuf(stdout, (char *) NULL, _IOLBF, (size_t) 1024) != 0)
 	(void) fputs("Could not linebuffer stdout\n", stderr);
+#endif
 
 #ifdef X11
     /* This call used to be in x11.trm, with the following comment:
@@ -448,8 +455,14 @@
      * Do any non-X platforms suffer from the same problem?
      * EAM - Jan 2004.
      */
+#ifdef __CYGWIN__
+    if (isatty(fileno(stdin))) {
+        setvbuf(stdin, (char *) NULL, _IONBF, 0);
+    }
+#else
     setvbuf(stdin, (char *) NULL, _IONBF, 0);
 #endif
+#endif
 
 #endif
 
--- origsrc/gnuplot-4.2.4/src/readline.c	2008-08-09 17:50:29.000000000 -0700
+++ src/gnuplot-4.2.4/src/readline.c	2009-03-25 15:45:28.775841600 -0700
@@ -1020,7 +1020,13 @@
 #   endif			/* TERMIOS */
 #  endif			/* not SGTTY */
 # else				/* OSK */
+#ifdef __CYGWIN__
+        if (isatty(fileno(stdin))) {
+            setbuf(stdin, (char *) 0);	/* Make stdin and stdout unbuffered */
+        }
+#else
 	setbuf(stdin, (char *) 0);	/* Make stdin and stdout unbuffered */
+#endif
 	setbuf(stderr, (char *) 0);
 	_gs_opt(STDIN, &new_settings);
 # endif				/* OSK */
--- origsrc/gnuplot-4.2.4/src/variable.c	2006-06-26 19:36:30.000000000 -0700
+++ src/gnuplot-4.2.4/src/variable.c	2009-03-25 15:33:20.198198400 -0700
@@ -262,6 +262,11 @@
     { "$`kpsexpand '$TEXMFMAIN'`/fonts/type1!" },
     { "$`kpsexpand '$TEXMFDIST'`/fonts/type1!" },
 #endif
+#ifdef __CYGWIN__
+    /* teTeX in the cygwin distribution */
+    { "/usr/local/share/texmf/fonts/type1!" },
+    { "/usr/share/texmf/fonts/type1!" },
+#endif
     /* Linux paths */
     { "/usr/X11R6/lib/X11/fonts/Type1" },
     { "/usr/X11R6/lib/X11/fonts/truetype" },
@@ -270,6 +275,11 @@
     /* Ghostscript */
     { "/usr/share/ghostscript/fonts" },
     { "/usr/local/share/ghostscript/fonts" },
+#ifdef __CYGWIN__
+    /* Misc. fonts */
+    { "/usr/local/share/fonts!" },
+    { "/usr/share/fonts!" },
+#endif
     { NULL }
 };
 #endif

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]