別にこのバージョンに限りませんが、次の要件を満たせば大丈夫と思います。
/tmp/calc1-3861167bPR )
(defvar calc-gnuplot-tempfile "/tmp/calc")
/*
* pgnuplot.c -- pipe stdin to wgnuplot
*
* Version 0.3 -- 30 Jun 1999
*
* This program is based on pgnuplot.c Copyright (C) 1999 Hans-Bernhard Broeker
* with substantial modifications Copyright (C) 1999 Craig R. Schardt.
*
* The code is released to the public domain.
*
*/
(このソースファイルは gnuplot-3.7.1 の配布にも含まれているようです。)
不思議なことに、同じサイトの圧縮ファイル
* For the record, I usually use MinGW32 to compile this, with a * command line looking like this: * * gcc -o pgnuplot.exe pgnuplot.c -luser32 -s * * Note that if you're using Cygwin GCC, you'll want to add the option * -mno-cygwin to that command line to avoid getting a pgnuplot.exe * that depends on their GPL'ed cygwin1.dll. */ ・・・中略・・・ This program has been compiled using Microsoft Visual C++ 4.0 with the following command line: cl /O2 pgnuplot.c /link user32.lib The resulting program has been tested on WinNT and Win98 both by calling it directly from the command line with and without redirected input. The program also works on WinNT with a modified version of Gnuplot.py (a script for interactive control of Gnuplot from Python).
(defvar calc-gnuplot-name C:/usr/local/gnuplot/gnuplot-3.7.1/pgnuplot.exe)
1469a1475,1486 > (insert ; by JA5QAZ on 2002/04/02 > "G N U P L O T\nMS-Windows 32 bit version 3.7\n" > "patchlevel 1\nlast modified Fri Oct 22 18:00:00 BST 1999\n\n" > "Copyright(C) 1986 - 1993, 1998, 1999\n" > "Thomas Williams, Colin Kelley and many others\n\n" > "Type `help` to access the on-line reference manual\n" > "The gnuplot FAQ is available from\n" > "<http://www.ucc.ie/gnuplot/gnuplot-faq.html>\n\n" > "Send comments and requests for help to <info-gnuplot@dartmouth.edu>\n" > "Send bugs, suggestions and mods to <bug-gnuplot@dartmouth.edu>\n\n\n" > "Terminal type set to 'windows'\n" > "gnuplot> ")Calc は gnuplot の標準出力を Emacs のバッファにコピーして、 「G N U P L O T」という文字列の後に来るバージョン番号を読み取ります。 そして「gnuplot> 」というプロンプトを検出して起動が完了したことを知ります。 wgnuplot では標準出力が見えないので、予定の文字をここで書きこんでやろうと言うわけです。 必要なのは下線部だけなのですが、ワルノリで全部入れています。
もしあなたのGNUPLOTがこれと異なるバージョン番号を表示するときは、そちらに合わせる必要があります。
1418c1422,1423 < calc-gnuplot-process)) --- > ;;; calc-gnuplot-process)) > calc-gnuplot-process) nil 1000) ; by JA5QAZ 2002/4/2
351,352c353,356 < (if (>= calc-gnuplot-version 3) < "dumb" "postscript"))))) --- > (if (eq window-system 'w32) "windows" ; by JA5QAZ on 2002/4/2 > (if (>= calc-gnuplot-version 3) > "dumb" "postscript"))))) > ) ; by JA5QAZ on 2002/4/2
212,217c212,219 < (calc-graph-set-styles < (or (and (Math-num-integerp lstyle) (math-trunc lstyle)) < 0) < (or (and (Math-num-integerp pstyle) (math-trunc pstyle)) < (if (eq (car-safe (calc-var-value (nth 2 ydata))) 'vec) < 0 -1))))) --- > (let ((calc-graph-no-auto-view t)) ; by JA5QAZ on 2002/4/8 > (calc-graph-set-styles > (or (and (Math-num-integerp lstyle) (math-trunc lstyle)) > 0) > (or (and (Math-num-integerp pstyle) (math-trunc pstyle)) > (if (eq (car-safe (calc-var-value (nth 2 ydata))) 'vec) > 0 -1))))) > ) ; by JA5QAZ on 2002/4/8