On 04/08/18 21:59, Antonio Scuri wrote:
Hi,
This code belongs to the MathGL library used by IUP. I usually don't
patch third party libraries.
Unfortunately our MathGL version is outdated from the official release,
maybe they fixed that already.
Best,
Scuri
G'day Scuri,
They have indeed. I've just downloaded the latest, 2.4.2.1, released
at the end of March. The file exec looks to be split into two or
three pieces (I haven't looked closely); the nearest direct comparison
I found was src/exec_set.cpp versus IUP's src/exec.cpp.
The code (LGPL) from that file has the changes exactly as I specified
in my proposed patch; in fact, they had deliberately disabled
-Wmisleading-indentation, but, as you can see from the excerpt below,
they have now explicitly embraced it, (Separately, it also seems that
at least some of the functions have been reordered into alphabetical
order.) The first few lines of the latest version are:
[....]
* exec_set.cpp is part of Math Graphic Library
* Copyright (C) 2007-2016 Alexey Balakin <mathgl.abala...@gmail.ru>
*
[License details in original sources...]
[...]
#include "mgl2/base.h"
#include "mgl2/parser.h"
//#pragma GCC diagnostic ignored "-Wmisleading-indentation"
wchar_t *mgl_str_copy(const char *s);
//-----------------------------------------------------------------------------
int static mgls_addlegend(mglGraph *gr, long , mglArg *a, const char
*k, const char *)
{
int res=0;
if(!strcmp(k,"ss")) gr->AddLegend(a[0].s.w,a[1].s.s);
else res = 1;
return res;
}
//-----------------------------------------------------------------------------
int static mgls_addsymbol(mglGraph *gr, long , mglArg *a, const char
*k, const char *)
{
int res=0;
if(!strcmp(k,"sdd"))
gr->DefineSymbol(a[0].s[0],*(a[1].d),*(a[2].d));
else res = 1;
return res;
}
//-----------------------------------------------------------------------------
int static mgls_adjust(mglGraph *gr, long , mglArg *a, const char *k,
const char *)
{
int res=0;
if(k[0]==0) gr->Adjust();
else if(!strcmp(k,"s")) gr->Adjust(a[0].s.s);
else res = 1;
return res;
}
//-----------------------------------------------------------------------------
int static mgls_alpha(mglGraph *gr, long , mglArg *a, const char *k,
const char *)
{
int res=0;
if(k[0]==0) gr->Alpha(true);
else if(!strcmp(k,"n")) gr->Alpha(a[0].v!=0);
else res = 1;
return res;
}
[...]
--------------------------------------------------------------
At least under Gentoo, slightly-older versions of mathgl are available
(but masked as testing, not stable):
$ eix mathgl
* sci-libs/mathgl
Available versions: ~2.3.4-r1(0/7.4.1) ~2.4.1(0/7.5.0) {doc fltk gif glut gsl hdf hdf5 jpeg
lua mpi octave opengl openmp pdf png python qt5 static-libs threads wxwidgets zlib
L10N="ru" PYTHON_TARGETS="python2_7"}
Homepage: http://mathgl.sourceforge.net/
Description: Math Graphics Library
$
Linux Mint (18.3) lists two packages for mathgl, but one is listed as
a "utilities and examples", and "mathgl-python" provides the Python
module for mathgl. The second seems to be the "main" release; the
description states that interfaces to "a set of languages, such as,
C, Fortran, Pascal, Forth, Python, Octave" are supported. However, the
"stable" listed packages are "2.3.3+svn1216-1build", whereas IUP
VERSION is listed as "2.3.5.1".
There is a major Ubuntu LTS (5 years) release due by the end of April;
judging by past timelines, a new series of Linux Mint versions (17.x)
based on this LTS baseline may be released in late May or perhaps June,
also with a 5-year support timeline.
So, I'll try to use the kit as it is now, will try to share the
(somewhat klunky) tools I've built to streamline the GNU/Linux work,
and will continue to report weaknesses/warnings/bugs as I go.
My hope is that, in the longer term, the amount of third-party library
code in the Tecgraf suite (IM/CD/IUP) can decrease over time, to
be replaced with references to OS-installed libraries (perhaps starting
with the libraries that are well-supported under all POSIX OSes,
including GNU/Linux, SunOX/Solaris, IRIX, *BSDs, Windows(R), ...;
and then, in a second pass, old libraries can be updated. Zlib is one
example where this has happened already.
cheers,
sur-behoffski (Brenton Hoff)
programmer, Grouse Software
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users