X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_65,J_CHICKENPOX_66,J_CHICKENPOX_75 X-Spam-Check-By: sourceware.org Message-ID: <49CAE639.3080200@kleckner.net> Date: Wed, 25 Mar 2009 19:19:37 -0700 From: Jim Kleckner User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: [ANNOUNCEMENT] Updated: gnuplot-4.2.4-1 - A command-line driven interactive function plotting utility. References: <49CAADD8 DOT 5060604 AT kleckner DOT net> In-Reply-To: <49CAADD8.5060604@kleckner.net> Content-Type: multipart/mixed; boundary="------------010005080003040207060002" Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com --------------010005080003040207060002 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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. --------------010005080003040207060002 Content-Type: text/plain; name="gnuplot-4.2.4-2.src.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="gnuplot-4.2.4-2.src.patch" --- 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 --------------010005080003040207060002 Content-Type: text/plain; charset=us-ascii -- 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/ --------------010005080003040207060002--