siriz / leptonica

Automatically exported from code.google.com/p/leptonica
0 stars 0 forks source link

gplot.c doesn't work under Windows #26

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run histotest

What is the expected output? What do you see instead?
I expect to see a histogram displayed.
Instead nothing is displayed.

What version of the product are you using? On what operating system?
leptonlib-1.63.
Microsoft Visual Studio 2008 SP1 with latest updates also applied.
Windows XP Pro SP3.

Please provide any additional information below.
The gnuplot for windows executable is called wgnuplot.exe. Also, the
standard gp426win32.zip distribution does not have an X11 terminal. I
presume that the gp426win32x11.zip distribution does but I didn't try that
because it assumes you have a X11 server running.

gplot.c needs the following changes:

gplotMakeOutput() changes:

#ifndef COMPILER_MSVC
    if (gplot->outformat != GPLOT_X11)
        snprintf(buf, L_BUF_SIZE, "gnuplot %s &", gplot->cmdname);
    else
        snprintf(buf, L_BUF_SIZE,
                 "gnuplot -persist -geometry +10+10 %s &", gplot->cmdname);
#else
    if (gplot->outformat != GPLOT_X11)
        snprintf(buf, L_BUF_SIZE, "wgnuplot %s", gplot->cmdname);
    else
        snprintf(buf, L_BUF_SIZE,
            "wgnuplot -persist %s", gplot->cmdname);
#endif

gplotGenCommandFile() changes:

    else  /* gplot->outformat == GPLOT_X11 */
#ifndef COMPILER_MSVC
        snprintf(buf, L_BUF_SIZE, "set terminal x11");
#else
        snprintf(buf, L_BUF_SIZE, "set terminal windows");
#endif

Original issue reported on code.google.com by tomp2...@gmail.com on 6 Dec 2009 at 5:46

GoogleCodeExporter commented 9 years ago
Thanks for the fix.  The repaired file is attached,
and will go out with 1.64.

Original comment by dan.bloo...@gmail.com on 6 Dec 2009 at 6:59

Attachments:

GoogleCodeExporter commented 9 years ago
fixed in 1.64

Original comment by dan.bloo...@gmail.com on 3 Jan 2010 at 11:42