[SCM] Packaging for mathgl branch, master, updated. debian/1.11.0.1-7-3-g636e74d

Sylvestre Ledru sylvestre.ledru at scilab.org
Tue Mar 15 14:20:15 UTC 2011


The following commit has been merged in the master branch:
commit 636e74df10f87f3f36c93da9304d3876f28ce204
Author: Sylvestre Ledru <sylvestre.ledru at scilab.org>
Date:   Tue Mar 15 15:19:56 2011 +0100

    Temporary files

diff --git a/.pc/.quilt_patches b/.pc/.quilt_patches
deleted file mode 100644
index 6857a8d..0000000
--- a/.pc/.quilt_patches
+++ /dev/null
@@ -1 +0,0 @@
-debian/patches
diff --git a/.pc/.quilt_series b/.pc/.quilt_series
deleted file mode 100644
index c206706..0000000
--- a/.pc/.quilt_series
+++ /dev/null
@@ -1 +0,0 @@
-series
diff --git a/.pc/.version b/.pc/.version
deleted file mode 100644
index 0cfbf08..0000000
--- a/.pc/.version
+++ /dev/null
@@ -1 +0,0 @@
-2
diff --git a/.pc/applied-patches b/.pc/applied-patches
deleted file mode 100644
index 67ca6b1..0000000
--- a/.pc/applied-patches
+++ /dev/null
@@ -1,7 +0,0 @@
-dircategory-and-direntry-mathgl-en-texi.patch
-dircategory-and-direntry-mathgl-ru-texi.patch
-dircategory-and-direntry-mgl-ru-texi.patch
-dircategory-and-direntry-mgl-en-texi.patch
-correct-spelling-error-in-nympy-i.patch
-mgl-mgl_data_io_cpp.patch
-texinfo-Makefile.patch
diff --git a/.pc/correct-spelling-error-in-nympy-i.patch/.timestamp b/.pc/correct-spelling-error-in-nympy-i.patch/.timestamp
deleted file mode 100644
index e69de29..0000000
diff --git a/.pc/correct-spelling-error-in-nympy-i.patch/lang/numpy.i b/.pc/correct-spelling-error-in-nympy-i.patch/lang/numpy.i
deleted file mode 100644
index 72fc4f9..0000000
--- a/.pc/correct-spelling-error-in-nympy-i.patch/lang/numpy.i
+++ /dev/null
@@ -1,1634 +0,0 @@
-/* -*- C -*-  (not really, but good for syntax highlighting) */
-#ifdef SWIGPYTHON
-
-%{
-#ifndef SWIG_FILE_WITH_INIT
-#  define NO_IMPORT_ARRAY
-#endif
-#include "stdio.h"
-#include <numpy/arrayobject.h>
-%}
-
-/**********************************************************************/
-
-%fragment("NumPy_Backward_Compatibility", "header")
-{
-/* Support older NumPy data type names
-*/
-%#if NDARRAY_VERSION < 0x01000000
-%#define NPY_BOOL          PyArray_BOOL
-%#define NPY_BYTE          PyArray_BYTE
-%#define NPY_UBYTE         PyArray_UBYTE
-%#define NPY_SHORT         PyArray_SHORT
-%#define NPY_USHORT        PyArray_USHORT
-%#define NPY_INT           PyArray_INT
-%#define NPY_UINT          PyArray_UINT
-%#define NPY_LONG          PyArray_LONG
-%#define NPY_ULONG         PyArray_ULONG
-%#define NPY_LONGLONG      PyArray_LONGLONG
-%#define NPY_ULONGLONG     PyArray_ULONGLONG
-%#define NPY_FLOAT         PyArray_FLOAT
-%#define NPY_DOUBLE        PyArray_DOUBLE
-%#define NPY_LONGDOUBLE    PyArray_LONGDOUBLE
-%#define NPY_CFLOAT        PyArray_CFLOAT
-%#define NPY_CDOUBLE       PyArray_CDOUBLE
-%#define NPY_CLONGDOUBLE   PyArray_CLONGDOUBLE
-%#define NPY_OBJECT        PyArray_OBJECT
-%#define NPY_STRING        PyArray_STRING
-%#define NPY_UNICODE       PyArray_UNICODE
-%#define NPY_VOID          PyArray_VOID
-%#define NPY_NTYPES        PyArray_NTYPES
-%#define NPY_NOTYPE        PyArray_NOTYPE
-%#define NPY_CHAR          PyArray_CHAR
-%#define NPY_USERDEF       PyArray_USERDEF
-%#define npy_intp          intp
-
-%#define NPY_MAX_BYTE      MAX_BYTE
-%#define NPY_MIN_BYTE      MIN_BYTE
-%#define NPY_MAX_UBYTE     MAX_UBYTE
-%#define NPY_MAX_SHORT     MAX_SHORT
-%#define NPY_MIN_SHORT     MIN_SHORT
-%#define NPY_MAX_USHORT    MAX_USHORT
-%#define NPY_MAX_INT       MAX_INT
-%#define NPY_MIN_INT       MIN_INT
-%#define NPY_MAX_UINT      MAX_UINT
-%#define NPY_MAX_LONG      MAX_LONG
-%#define NPY_MIN_LONG      MIN_LONG
-%#define NPY_MAX_ULONG     MAX_ULONG
-%#define NPY_MAX_LONGLONG  MAX_LONGLONG
-%#define NPY_MIN_LONGLONG  MIN_LONGLONG
-%#define NPY_MAX_ULONGLONG MAX_ULONGLONG
-%#define NPY_MAX_INTP      MAX_INTP
-%#define NPY_MIN_INTP      MIN_INTP
-
-%#define NPY_FARRAY        FARRAY
-%#define NPY_F_CONTIGUOUS  F_CONTIGUOUS
-%#endif
-}
-
-/**********************************************************************/
-
-/* The following code originally appeared in
- * enthought/kiva/agg/src/numeric.i written by Eric Jones.  It was
- * translated from C++ to C by John Hunter.  Bill Spotz has modified
- * it to fix some minor bugs, upgrade from Numeric to numpy (all
- * versions), add some comments and functionality, and convert from
- * direct code insertion to SWIG fragments.
- */
-
-%fragment("NumPy_Macros", "header")
-{
-/* Macros to extract array attributes.
- */
-%#define is_array(a)            ((a) && PyArray_Check((PyArrayObject *)a))
-%#define array_type(a)          (int)(PyArray_TYPE(a))
-%#define array_numdims(a)       (((PyArrayObject *)a)->nd)
-%#define array_dimensions(a)    (((PyArrayObject *)a)->dimensions)
-%#define array_size(a,i)        (((PyArrayObject *)a)->dimensions[i])
-%#define array_data(a)          (((PyArrayObject *)a)->data)
-%#define array_is_contiguous(a) (PyArray_ISCONTIGUOUS(a))
-%#define array_is_native(a)     (PyArray_ISNOTSWAPPED(a))
-%#define array_is_fortran(a)    (PyArray_ISFORTRAN(a))
-}
-
-/**********************************************************************/
-
-%fragment("NumPy_Utilities", "header")
-{
-  /* Given a PyObject, return a string describing its type.
-   */
-  char* pytype_string(PyObject* py_obj) {
-    if (py_obj == NULL          ) return "C NULL value";
-    if (py_obj == Py_None       ) return "Python None" ;
-    if (PyCallable_Check(py_obj)) return "callable"    ;
-    if (PyString_Check(  py_obj)) return "string"      ;
-    if (PyInt_Check(     py_obj)) return "int"         ;
-    if (PyFloat_Check(   py_obj)) return "float"       ;
-    if (PyDict_Check(    py_obj)) return "dict"        ;
-    if (PyList_Check(    py_obj)) return "list"        ;
-    if (PyTuple_Check(   py_obj)) return "tuple"       ;
-    if (PyFile_Check(    py_obj)) return "file"        ;
-    if (PyModule_Check(  py_obj)) return "module"      ;
-    if (PyInstance_Check(py_obj)) return "instance"    ;
-
-    return "unkown type";
-  }
-
-  /* Given a NumPy typecode, return a string describing the type.
-   */
-  char* typecode_string(int typecode) {
-    static char* type_names[25] = {"bool", "byte", "unsigned byte",
-                                   "short", "unsigned short", "int",
-                                   "unsigned int", "long", "unsigned long",
-                                   "long long", "unsigned long long",
-                                   "float", "double", "long double",
-                                   "complex float", "complex double",
-                                   "complex long double", "object",
-                                   "string", "unicode", "void", "ntypes",
-                                   "notype", "char", "unknown"};
-    return typecode < 24 ? type_names[typecode] : type_names[24];
-  }
-
-  /* Make sure input has correct numpy type.  Allow character and byte
-   * to match.  Also allow int and long to match.  This is deprecated.
-   * You should use PyArray_EquivTypenums() instead.
-   */
-  int type_match(int actual_type, int desired_type) {
-    return PyArray_EquivTypenums(actual_type, desired_type);
-  }
-}
-
-/**********************************************************************/
-
-%fragment("NumPy_Object_to_Array", "header",
-          fragment="NumPy_Backward_Compatibility",
-          fragment="NumPy_Macros",
-          fragment="NumPy_Utilities")
-{
-  /* Given a PyObject pointer, cast it to a PyArrayObject pointer if
-   * legal.  If not, set the python error string appropriately and
-   * return NULL.
-   */
-  PyArrayObject* obj_to_array_no_conversion(PyObject* input, int typecode)
-  {
-    PyArrayObject* ary = NULL;
-    if (is_array(input) && (typecode == NPY_NOTYPE ||
-                            PyArray_EquivTypenums(array_type(input), typecode)))
-    {
-      ary = (PyArrayObject*) input;
-    }
-    else if is_array(input)
-    {
-      char* desired_type = typecode_string(typecode);
-      char* actual_type  = typecode_string(array_type(input));
-      PyErr_Format(PyExc_TypeError,
-                   "Array of type '%s' required.  Array of type '%s' given",
-                   desired_type, actual_type);
-      ary = NULL;
-    }
-    else
-    {
-      char * desired_type = typecode_string(typecode);
-      char * actual_type  = pytype_string(input);
-      PyErr_Format(PyExc_TypeError,
-                   "Array of type '%s' required.  A '%s' was given",
-                   desired_type, actual_type);
-      ary = NULL;
-    }
-    return ary;
-  }
-
-  /* Convert the given PyObject to a NumPy array with the given
-   * typecode.  On success, return a valid PyArrayObject* with the
-   * correct type.  On failure, the python error string will be set and
-   * the routine returns NULL.
-   */
-  PyArrayObject* obj_to_array_allow_conversion(PyObject* input, int typecode,
-                                               int* is_new_object)
-  {
-    PyArrayObject* ary = NULL;
-    PyObject* py_obj;
-    if (is_array(input) && (typecode == NPY_NOTYPE ||
-                            PyArray_EquivTypenums(array_type(input),typecode)))
-    {
-      ary = (PyArrayObject*) input;
-      *is_new_object = 0;
-    }
-    else
-    {
-      py_obj = PyArray_FROMANY(input, typecode, 0, 0, NPY_DEFAULT);
-      /* If NULL, PyArray_FromObject will have set python error value.*/
-      ary = (PyArrayObject*) py_obj;
-      *is_new_object = 1;
-    }
-    return ary;
-  }
-
-  /* Given a PyArrayObject, check to see if it is contiguous.  If so,
-   * return the input pointer and flag it as not a new object.  If it is
-   * not contiguous, create a new PyArrayObject using the original data,
-   * flag it as a new object and return the pointer.
-   */
-  PyArrayObject* make_contiguous(PyArrayObject* ary, int* is_new_object,
-                                 int min_dims, int max_dims)
-  {
-    PyArrayObject* result;
-    if (array_is_contiguous(ary))
-    {
-      result = ary;
-      *is_new_object = 0;
-    }
-    else
-    {
-      result = (PyArrayObject*) PyArray_ContiguousFromObject((PyObject*)ary,
-                                                             array_type(ary),
-                                                             min_dims,
-                                                             max_dims);
-      *is_new_object = 1;
-    }
-    return result;
-  }
-
-  /* Given a PyArrayObject, check to see if it is Fortran-contiguous.
-   * If so, return the input pointer, but do not flag it as not a new
-   * object.  If it is not Fortran-contiguous, create a new
-   * PyArrayObject using the original data, flag it as a new object
-   * and return the pointer.
-   */
-  PyArrayObject* make_fortran(PyArrayObject* ary, int* is_new_object,
-                              int min_dims, int max_dims)
-  {
-    PyArrayObject* result;
-    if (array_is_fortran(ary))
-    {
-      result = ary;
-      *is_new_object = 0;
-    }
-    else
-    {
-      Py_INCREF(ary->descr);
-      result = (PyArrayObject*) PyArray_FromArray(ary, ary->descr, NPY_FORTRAN);
-      *is_new_object = 1;
-    }
-    return result;
-  }
-
-  /* Convert a given PyObject to a contiguous PyArrayObject of the
-   * specified type.  If the input object is not a contiguous
-   * PyArrayObject, a new one will be created and the new object flag
-   * will be set.
-   */
-  PyArrayObject* obj_to_array_contiguous_allow_conversion(PyObject* input,
-                                                          int typecode,
-                                                          int* is_new_object)
-  {
-    int is_new1 = 0;
-    int is_new2 = 0;
-    PyArrayObject* ary2;
-    PyArrayObject* ary1 = obj_to_array_allow_conversion(input, typecode,
-                                                        &is_new1);
-    if (ary1)
-    {
-      ary2 = make_contiguous(ary1, &is_new2, 0, 0);
-      if ( is_new1 && is_new2)
-      {
-        Py_DECREF(ary1);
-      }
-      ary1 = ary2;
-    }
-    *is_new_object = is_new1 || is_new2;
-    return ary1;
-  }
-
-  /* Convert a given PyObject to a Fortran-ordered PyArrayObject of the
-   * specified type.  If the input object is not a Fortran-ordered
-   * PyArrayObject, a new one will be created and the new object flag
-   * will be set.
-   */
-  PyArrayObject* obj_to_array_fortran_allow_conversion(PyObject* input,
-                                                       int typecode,
-                                                       int* is_new_object)
-  {
-    int is_new1 = 0;
-    int is_new2 = 0;
-    PyArrayObject* ary2;
-    PyArrayObject* ary1 = obj_to_array_allow_conversion(input, typecode,
-                                                        &is_new1);
-    if (ary1)
-    {
-      ary2 = make_fortran(ary1, &is_new2, 0, 0);
-      if (is_new1 && is_new2)
-      {
-        Py_DECREF(ary1);
-      }
-      ary1 = ary2;
-    }
-    *is_new_object = is_new1 || is_new2;
-    return ary1;
-  }
-
-} /* end fragment */
-
-
-/**********************************************************************/
-
-%fragment("NumPy_Array_Requirements", "header",
-          fragment="NumPy_Backward_Compatibility",
-          fragment="NumPy_Macros")
-{
-  /* Test whether a python object is contiguous.  If array is
-   * contiguous, return 1.  Otherwise, set the python error string and
-   * return 0.
-   */
-  int require_contiguous(PyArrayObject* ary)
-  {
-    int contiguous = 1;
-    if (!array_is_contiguous(ary))
-    {
-      PyErr_SetString(PyExc_TypeError,
-                      "Array must be contiguous.  A non-contiguous array was given");
-      contiguous = 0;
-    }
-    return contiguous;
-  }
-
-  /* Require that a numpy array is not byte-swapped.  If the array is
-   * not byte-swapped, return 1.  Otherwise, set the python error string
-   * and return 0.
-   */
-  int require_native(PyArrayObject* ary)
-  {
-    int native = 1;
-    if (!array_is_native(ary))
-    {
-      PyErr_SetString(PyExc_TypeError,
-                      "Array must have native byteorder.  "
-                      "A byte-swapped array was given");
-      native = 0;
-    }
-    return native;
-  }
-
-  /* Require the given PyArrayObject to have a specified number of
-   * dimensions.  If the array has the specified number of dimensions,
-   * return 1.  Otherwise, set the python error string and return 0.
-   */
-  int require_dimensions(PyArrayObject* ary, int exact_dimensions)
-  {
-    int success = 1;
-    if (array_numdims(ary) != exact_dimensions)
-    {
-      PyErr_Format(PyExc_TypeError,
-                   "Array must have %d dimensions.  Given array has %d dimensions",
-                   exact_dimensions, array_numdims(ary));
-      success = 0;
-    }
-    return success;
-  }
-
-  /* Require the given PyArrayObject to have one of a list of specified
-   * number of dimensions.  If the array has one of the specified number
-   * of dimensions, return 1.  Otherwise, set the python error string
-   * and return 0.
-   */
-  int require_dimensions_n(PyArrayObject* ary, int* exact_dimensions, int n)
-  {
-    int success = 0;
-    int i;
-    char dims_str[255] = "";
-    char s[255];
-    for (i = 0; i < n && !success; i++)
-    {
-      if (array_numdims(ary) == exact_dimensions[i])
-      {
-        success = 1;
-      }
-    }
-    if (!success)
-    {
-      for (i = 0; i < n-1; i++)
-      {
-        sprintf(s, "%d, ", exact_dimensions[i]);
-        strcat(dims_str,s);
-      }
-      sprintf(s, " or %d", exact_dimensions[n-1]);
-      strcat(dims_str,s);
-      PyErr_Format(PyExc_TypeError,
-                   "Array must have %s dimensions.  Given array has %d dimensions",
-                   dims_str, array_numdims(ary));
-    }
-    return success;
-  }
-
-  /* Require the given PyArrayObject to have a specified shape.  If the
-   * array has the specified shape, return 1.  Otherwise, set the python
-   * error string and return 0.
-   */
-  int require_size(PyArrayObject* ary, npy_intp* size, int n)
-  {
-    int i;
-    int success = 1;
-    int len;
-    char desired_dims[255] = "[";
-    char s[255];
-    char actual_dims[255] = "[";
-    for(i=0; i < n;i++)
-    {
-      if (size[i] != -1 &&  size[i] != array_size(ary,i))
-      {
-        success = 0;
-      }
-    }
-    if (!success)
-    {
-      for (i = 0; i < n; i++)
-      {
-        if (size[i] == -1)
-        {
-          sprintf(s, "*,");
-        }
-        else
-        {
-          sprintf(s, "%ld,", (long int)size[i]);
-        }
-        strcat(desired_dims,s);
-      }
-      len = strlen(desired_dims);
-      desired_dims[len-1] = ']';
-      for (i = 0; i < n; i++)
-      {
-        sprintf(s, "%ld,", (long int)array_size(ary,i));
-        strcat(actual_dims,s);
-      }
-      len = strlen(actual_dims);
-      actual_dims[len-1] = ']';
-      PyErr_Format(PyExc_TypeError,
-                   "Array must have shape of %s.  Given array has shape of %s",
-                   desired_dims, actual_dims);
-    }
-    return success;
-  }
-
-  /* Require the given PyArrayObject to to be FORTRAN ordered.  If the
-   * the PyArrayObject is already FORTRAN ordered, do nothing.  Else,
-   * set the FORTRAN ordering flag and recompute the strides.
-   */
-  int require_fortran(PyArrayObject* ary)
-  {
-    int success = 1;
-    int nd = array_numdims(ary);
-    int i;
-    if (array_is_fortran(ary)) return success;
-    /* Set the FORTRAN ordered flag */
-    ary->flags = NPY_FARRAY;
-    /* Recompute the strides */
-    ary->strides[0] = ary->strides[nd-1];
-    for (i=1; i < nd; ++i)
-      ary->strides[i] = ary->strides[i-1] * array_size(ary,i-1);
-    return success;
-  }
-}
-
-/* Combine all NumPy fragments into one for convenience */
-%fragment("NumPy_Fragments", "header",
-          fragment="NumPy_Backward_Compatibility",
-          fragment="NumPy_Macros",
-          fragment="NumPy_Utilities",
-          fragment="NumPy_Object_to_Array",
-          fragment="NumPy_Array_Requirements") { }
-
-/* End John Hunter translation (with modifications by Bill Spotz)
- */
-
-/* %numpy_typemaps() macro
- *
- * This macro defines a family of 41 typemaps that allow C arguments
- * of the form
- *
- *     (DATA_TYPE IN_ARRAY1[ANY])
- *     (DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1)
- *     (DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1)
- *
- *     (DATA_TYPE IN_ARRAY2[ANY][ANY])
- *     (DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2)
- *     (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2)
- *     (DATA_TYPE* IN_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2)
- *     (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_FARRAY2)
- *
- *     (DATA_TYPE IN_ARRAY3[ANY][ANY][ANY])
- *     (DATA_TYPE* IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3)
- *     (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_ARRAY3)
- *     (DATA_TYPE* IN_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3)
- *     (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_FARRAY3)
- *
- *     (DATA_TYPE INPLACE_ARRAY1[ANY])
- *     (DATA_TYPE* INPLACE_ARRAY1, DIM_TYPE DIM1)
- *     (DIM_TYPE DIM1, DATA_TYPE* INPLACE_ARRAY1)
- *
- *     (DATA_TYPE INPLACE_ARRAY2[ANY][ANY])
- *     (DATA_TYPE* INPLACE_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2)
- *     (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_ARRAY2)
- *     (DATA_TYPE* INPLACE_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2)
- *     (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_FARRAY2)
- *
- *     (DATA_TYPE INPLACE_ARRAY3[ANY][ANY][ANY])
- *     (DATA_TYPE* INPLACE_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3)
- *     (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* INPLACE_ARRAY3)
- *     (DATA_TYPE* INPLACE_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3)
- *     (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* INPLACE_FARRAY3)
- *
- *     (DATA_TYPE ARGOUT_ARRAY1[ANY])
- *     (DATA_TYPE* ARGOUT_ARRAY1, DIM_TYPE DIM1)
- *     (DIM_TYPE DIM1, DATA_TYPE* ARGOUT_ARRAY1)
- *
- *     (DATA_TYPE ARGOUT_ARRAY2[ANY][ANY])
- *
- *     (DATA_TYPE ARGOUT_ARRAY3[ANY][ANY][ANY])
- *
- *     (DATA_TYPE** ARGOUTVIEW_ARRAY1, DIM_TYPE* DIM1)
- *     (DIM_TYPE* DIM1, DATA_TYPE** ARGOUTVIEW_ARRAY1)
- *
- *     (DATA_TYPE** ARGOUTVIEW_ARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2)
- *     (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_ARRAY2)
- *     (DATA_TYPE** ARGOUTVIEW_FARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2)
- *     (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_FARRAY2)
- *
- *     (DATA_TYPE** ARGOUTVIEW_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3)
- *     (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_ARRAY3)
- *     (DATA_TYPE** ARGOUTVIEW_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3)
- *     (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_FARRAY3)
- *
- * where "DATA_TYPE" is any type supported by the NumPy module, and
- * "DIM_TYPE" is any int-like type suitable for specifying dimensions.
- * The difference between "ARRAY" typemaps and "FARRAY" typemaps is
- * that the "FARRAY" typemaps expect FORTRAN ordering of
- * multidimensional arrays.  In python, the dimensions will not need
- * to be specified (except for the "DATA_TYPE* ARGOUT_ARRAY1"
- * typemaps).  The IN_ARRAYs can be a numpy array or any sequence that
- * can be converted to a numpy array of the specified type.  The
- * INPLACE_ARRAYs must be numpy arrays of the appropriate type.  The
- * ARGOUT_ARRAYs will be returned as new numpy arrays of the
- * appropriate type.
- *
- * These typemaps can be applied to existing functions using the
- * %apply directive.  For example:
- *
- *     %apply (double* IN_ARRAY1, int DIM1) {(double* series, int length)};
- *     double prod(double* series, int length);
- *
- *     %apply (int DIM1, int DIM2, double* INPLACE_ARRAY2)
- *           {(int rows, int cols, double* matrix        )};
- *     void floor(int rows, int cols, double* matrix, double f);
- *
- *     %apply (double IN_ARRAY3[ANY][ANY][ANY])
- *           {(double tensor[2][2][2]         )};
- *     %apply (double ARGOUT_ARRAY3[ANY][ANY][ANY])
- *           {(double low[2][2][2]                )};
- *     %apply (double ARGOUT_ARRAY3[ANY][ANY][ANY])
- *           {(double upp[2][2][2]                )};
- *     void luSplit(double tensor[2][2][2],
- *                  double low[2][2][2],
- *                  double upp[2][2][2]    );
- *
- * or directly with
- *
- *     double prod(double* IN_ARRAY1, int DIM1);
- *
- *     void floor(int DIM1, int DIM2, double* INPLACE_ARRAY2, double f);
- *
- *     void luSplit(double IN_ARRAY3[ANY][ANY][ANY],
- *                  double ARGOUT_ARRAY3[ANY][ANY][ANY],
- *                  double ARGOUT_ARRAY3[ANY][ANY][ANY]);
- */
-
-%define %numpy_typemaps(DATA_TYPE, DATA_TYPECODE, DIM_TYPE)
-
-/************************/
-/* Input Array Typemaps */
-/************************/
-
-/* Typemap suite for (DATA_TYPE IN_ARRAY1[ANY])
- */
-%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY,
-           fragment="NumPy_Macros")
-  (DATA_TYPE IN_ARRAY1[ANY])
-{
-  $1 = is_array($input) || PySequence_Check($input);
-}
-%typemap(in,
-         fragment="NumPy_Fragments")
-  (DATA_TYPE IN_ARRAY1[ANY])
-  (PyArrayObject* array=NULL, int is_new_object=0)
-{
-  npy_intp size[1] = { $1_dim0 };
-  array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE,
-                                                   &is_new_object);
-  if (!array || !require_dimensions(array, 1) ||
-      !require_size(array, size, 1)) SWIG_fail;
-  $1 = ($1_ltype) array_data(array);
-}
-%typemap(freearg)
-  (DATA_TYPE IN_ARRAY1[ANY])
-{
-  if (is_new_object$argnum && array$argnum)
-    { Py_DECREF(array$argnum); }
-}
-
-/* Typemap suite for (DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1)
- */
-%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY,
-           fragment="NumPy_Macros")
-  (DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1)
-{
-  $1 = is_array($input) || PySequence_Check($input);
-}
-%typemap(in,
-         fragment="NumPy_Fragments")
-  (DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1)
-  (PyArrayObject* array=NULL, int is_new_object=0)
-{
-  npy_intp size[1] = { -1 };
-  array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE,
-                                                   &is_new_object);
-  if (!array || !require_dimensions(array, 1) ||
-      !require_size(array, size, 1)) SWIG_fail;
-  $1 = (DATA_TYPE*) array_data(array);
-  $2 = (DIM_TYPE) array_size(array,0);
-}
-%typemap(freearg)
-  (DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1)
-{
-  if (is_new_object$argnum && array$argnum)
-    { Py_DECREF(array$argnum); }
-}
-
-/* Typemap suite for (DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1)
- */
-%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY,
-           fragment="NumPy_Macros")
-  (DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1)
-{
-  $1 = is_array($input) || PySequence_Check($input);
-}
-%typemap(in,
-         fragment="NumPy_Fragments")
-  (DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1)
-  (PyArrayObject* array=NULL, int is_new_object=0)
-{
-  npy_intp size[1] = {-1};
-  array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE,
-                                                   &is_new_object);
-  if (!array || !require_dimensions(array, 1) ||
-      !require_size(array, size, 1)) SWIG_fail;
-  $1 = (DIM_TYPE) array_size(array,0);
-  $2 = (DATA_TYPE*) array_data(array);
-}
-%typemap(freearg)
-  (DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1)
-{
-  if (is_new_object$argnum && array$argnum)
-    { Py_DECREF(array$argnum); }
-}
-
-/* Typemap suite for (DATA_TYPE IN_ARRAY2[ANY][ANY])
- */
-%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY,
-           fragment="NumPy_Macros")
-  (DATA_TYPE IN_ARRAY2[ANY][ANY])
-{
-  $1 = is_array($input) || PySequence_Check($input);
-}
-%typemap(in,
-         fragment="NumPy_Fragments")
-  (DATA_TYPE IN_ARRAY2[ANY][ANY])
-  (PyArrayObject* array=NULL, int is_new_object=0)
-{
-  npy_intp size[2] = { $1_dim0, $1_dim1 };
-  array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE,
-                                                   &is_new_object);
-  if (!array || !require_dimensions(array, 2) ||
-      !require_size(array, size, 2)) SWIG_fail;
-  $1 = ($1_ltype) array_data(array);
-}
-%typemap(freearg)
-  (DATA_TYPE IN_ARRAY2[ANY][ANY])
-{
-  if (is_new_object$argnum && array$argnum)
-    { Py_DECREF(array$argnum); }
-}
-
-/* Typemap suite for (DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2)
- */
-%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY,
-           fragment="NumPy_Macros")
-  (DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2)
-{
-  $1 = is_array($input) || PySequence_Check($input);
-}
-%typemap(in,
-         fragment="NumPy_Fragments")
-  (DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2)
-  (PyArrayObject* array=NULL, int is_new_object=0)
-{
-  npy_intp size[2] = { -1, -1 };
-  array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE,
-                                                   &is_new_object);
-  if (!array || !require_dimensions(array, 2) ||
-      !require_size(array, size, 2)) SWIG_fail;
-  $1 = (DATA_TYPE*) array_data(array);
-  $2 = (DIM_TYPE) array_size(array,0);
-  $3 = (DIM_TYPE) array_size(array,1);
-}
-%typemap(freearg)
-  (DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2)
-{
-  if (is_new_object$argnum && array$argnum)
-    { Py_DECREF(array$argnum); }
-}
-
-/* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2)
- */
-%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY,
-           fragment="NumPy_Macros")
-  (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2)
-{
-  $1 = is_array($input) || PySequence_Check($input);
-}
-%typemap(in,
-         fragment="NumPy_Fragments")
-  (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2)
-  (PyArrayObject* array=NULL, int is_new_object=0)
-{
-  npy_intp size[2] = { -1, -1 };
-  array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE,
-                                                   &is_new_object);
-  if (!array || !require_dimensions(array, 2) ||
-      !require_size(array, size, 2)) SWIG_fail;
-  $1 = (DIM_TYPE) array_size(array,0);
-  $2 = (DIM_TYPE) array_size(array,1);
-  $3 = (DATA_TYPE*) array_data(array);
-}
-%typemap(freearg)
-  (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2)
-{
-  if (is_new_object$argnum && array$argnum)
-    { Py_DECREF(array$argnum); }
-}
-
-/* Typemap suite for (DATA_TYPE* IN_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2)
- */
-%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY,
-           fragment="NumPy_Macros")
-  (DATA_TYPE* IN_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2)
-{
-  $1 = is_array($input) || PySequence_Check($input);
-}
-%typemap(in,
-         fragment="NumPy_Fragments")
-  (DATA_TYPE* IN_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2)
-  (PyArrayObject* array=NULL, int is_new_object=0)
-{
-  npy_intp size[2] = { -1, -1 };
-  array = obj_to_array_fortran_allow_conversion($input, DATA_TYPECODE,
-                                                &is_new_object);
-  if (!array || !require_dimensions(array, 2) ||
-      !require_size(array, size, 2) || !require_fortran(array)) SWIG_fail;
-  $1 = (DATA_TYPE*) array_data(array);
-  $2 = (DIM_TYPE) array_size(array,0);
-  $3 = (DIM_TYPE) array_size(array,1);
-}
-%typemap(freearg)
-  (DATA_TYPE* IN_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2)
-{
-  if (is_new_object$argnum && array$argnum)
-    { Py_DECREF(array$argnum); }
-}
-
-/* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_FARRAY2)
- */
-%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY,
-           fragment="NumPy_Macros")
-  (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_FARRAY2)
-{
-  $1 = is_array($input) || PySequence_Check($input);
-}
-%typemap(in,
-         fragment="NumPy_Fragments")
-  (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_FARRAY2)
-  (PyArrayObject* array=NULL, int is_new_object=0)
-{
-  npy_intp size[2] = { -1, -1 };
-  array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE,
-                                                   &is_new_object);
-  if (!array || !require_dimensions(array, 2) ||
-      !require_size(array, size, 2) || !require_fortran(array)) SWIG_fail;
-  $1 = (DIM_TYPE) array_size(array,0);
-  $2 = (DIM_TYPE) array_size(array,1);
-  $3 = (DATA_TYPE*) array_data(array);
-}
-%typemap(freearg)
-  (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_FARRAY2)
-{
-  if (is_new_object$argnum && array$argnum)
-    { Py_DECREF(array$argnum); }
-}
-
-/* Typemap suite for (DATA_TYPE IN_ARRAY3[ANY][ANY][ANY])
- */
-%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY,
-           fragment="NumPy_Macros")
-  (DATA_TYPE IN_ARRAY3[ANY][ANY][ANY])
-{
-  $1 = is_array($input) || PySequence_Check($input);
-}
-%typemap(in,
-         fragment="NumPy_Fragments")
-  (DATA_TYPE IN_ARRAY3[ANY][ANY][ANY])
-  (PyArrayObject* array=NULL, int is_new_object=0)
-{
-  npy_intp size[3] = { $1_dim0, $1_dim1, $1_dim2 };
-  array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE,
-                                                   &is_new_object);
-  if (!array || !require_dimensions(array, 3) ||
-      !require_size(array, size, 3)) SWIG_fail;
-  $1 = ($1_ltype) array_data(array);
-}
-%typemap(freearg)
-  (DATA_TYPE IN_ARRAY3[ANY][ANY][ANY])
-{
-  if (is_new_object$argnum && array$argnum)
-    { Py_DECREF(array$argnum); }
-}
-
-/* Typemap suite for (DATA_TYPE* IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2,
- *                    DIM_TYPE DIM3)
- */
-%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY,
-           fragment="NumPy_Macros")
-  (DATA_TYPE* IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3)
-{
-  $1 = is_array($input) || PySequence_Check($input);
-}
-%typemap(in,
-         fragment="NumPy_Fragments")
-  (DATA_TYPE* IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3)
-  (PyArrayObject* array=NULL, int is_new_object=0)
-{
-  npy_intp size[3] = { -1, -1, -1 };
-  array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE,
-                                                   &is_new_object);
-  if (!array || !require_dimensions(array, 3) ||
-      !require_size(array, size, 3)) SWIG_fail;
-  $1 = (DATA_TYPE*) array_data(array);
-  $2 = (DIM_TYPE) array_size(array,0);
-  $3 = (DIM_TYPE) array_size(array,1);
-  $4 = (DIM_TYPE) array_size(array,2);
-}
-%typemap(freearg)
-  (DATA_TYPE* IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3)
-{
-  if (is_new_object$argnum && array$argnum)
-    { Py_DECREF(array$argnum); }
-}
-
-/* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3,
- *                    DATA_TYPE* IN_ARRAY3)
- */
-%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY,
-           fragment="NumPy_Macros")
-  (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_ARRAY3)
-{
-  $1 = is_array($input) || PySequence_Check($input);
-}
-%typemap(in,
-         fragment="NumPy_Fragments")
-  (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_ARRAY3)
-  (PyArrayObject* array=NULL, int is_new_object=0)
-{
-  npy_intp size[3] = { -1, -1, -1 };
-  array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE,
-                                                   &is_new_object);
-  if (!array || !require_dimensions(array, 3) ||
-      !require_size(array, size, 3)) SWIG_fail;
-  $1 = (DIM_TYPE) array_size(array,0);
-  $2 = (DIM_TYPE) array_size(array,1);
-  $3 = (DIM_TYPE) array_size(array,2);
-  $4 = (DATA_TYPE*) array_data(array);
-}
-%typemap(freearg)
-  (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_ARRAY3)
-{
-  if (is_new_object$argnum && array$argnum)
-    { Py_DECREF(array$argnum); }
-}
-
-/* Typemap suite for (DATA_TYPE* IN_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2,
- *                    DIM_TYPE DIM3)
- */
-%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY,
-           fragment="NumPy_Macros")
-  (DATA_TYPE* IN_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3)
-{
-  $1 = is_array($input) || PySequence_Check($input);
-}
-%typemap(in,
-         fragment="NumPy_Fragments")
-  (DATA_TYPE* IN_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3)
-  (PyArrayObject* array=NULL, int is_new_object=0)
-{
-  npy_intp size[3] = { -1, -1, -1 };
-  array = obj_to_array_fortran_allow_conversion($input, DATA_TYPECODE,
-                                                &is_new_object);
-  if (!array || !require_dimensions(array, 3) ||
-      !require_size(array, size, 3) | !require_fortran(array)) SWIG_fail;
-  $1 = (DATA_TYPE*) array_data(array);
-  $2 = (DIM_TYPE) array_size(array,0);
-  $3 = (DIM_TYPE) array_size(array,1);
-  $4 = (DIM_TYPE) array_size(array,2);
-}
-%typemap(freearg)
-  (DATA_TYPE* IN_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3)
-{
-  if (is_new_object$argnum && array$argnum)
-    { Py_DECREF(array$argnum); }
-}
-
-/* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3,
- *                    DATA_TYPE* IN_FARRAY3)
- */
-%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY,
-           fragment="NumPy_Macros")
-  (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_FARRAY3)
-{
-  $1 = is_array($input) || PySequence_Check($input);
-}
-%typemap(in,
-         fragment="NumPy_Fragments")
-  (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_FARRAY3)
-  (PyArrayObject* array=NULL, int is_new_object=0)
-{
-  npy_intp size[3] = { -1, -1, -1 };
-  array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE,
-                                                   &is_new_object);
-  if (!array || !require_dimensions(array, 3) ||
-      !require_size(array, size, 3) || !require_fortran(array)) SWIG_fail;
-  $1 = (DIM_TYPE) array_size(array,0);
-  $2 = (DIM_TYPE) array_size(array,1);
-  $3 = (DIM_TYPE) array_size(array,2);
-  $4 = (DATA_TYPE*) array_data(array);
-}
-%typemap(freearg)
-  (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_FARRAY3)
-{
-  if (is_new_object$argnum && array$argnum)
-    { Py_DECREF(array$argnum); }
-}
-
-/***************************/
-/* In-Place Array Typemaps */
-/***************************/
-
-/* Typemap suite for (DATA_TYPE INPLACE_ARRAY1[ANY])
- */
-%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY,
-           fragment="NumPy_Macros")
-  (DATA_TYPE INPLACE_ARRAY1[ANY])
-{
-  $1 = is_array($input) && PyArray_EquivTypenums(array_type($input),
-                                                 DATA_TYPECODE);
-}
-%typemap(in,
-         fragment="NumPy_Fragments")
-  (DATA_TYPE INPLACE_ARRAY1[ANY])
-  (PyArrayObject* array=NULL)
-{
-  npy_intp size[1] = { $1_dim0 };
-  array = obj_to_array_no_conversion($input, DATA_TYPECODE);
-  if (!array || !require_dimensions(array,1) || !require_size(array, size, 1) ||
-      !require_contiguous(array) || !require_native(array)) SWIG_fail;
-  $1 = ($1_ltype) array_data(array);
-}
-
-/* Typemap suite for (DATA_TYPE* INPLACE_ARRAY1, DIM_TYPE DIM1)
- */
-%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY,
-           fragment="NumPy_Macros")
-  (DATA_TYPE* INPLACE_ARRAY1, DIM_TYPE DIM1)
-{
-  $1 = is_array($input) && PyArray_EquivTypenums(array_type($input),
-                                                 DATA_TYPECODE);
-}
-%typemap(in,
-         fragment="NumPy_Fragments")
-  (DATA_TYPE* INPLACE_ARRAY1, DIM_TYPE DIM1)
-  (PyArrayObject* array=NULL, int i=1)
-{
-  array = obj_to_array_no_conversion($input, DATA_TYPECODE);
-  if (!array || !require_dimensions(array,1) || !require_contiguous(array)
-      || !require_native(array)) SWIG_fail;
-  $1 = (DATA_TYPE*) array_data(array);
-  $2 = 1;
-  for (i=0; i < array_numdims(array); ++i) $2 *= array_size(array,i);
-}
-
-/* Typemap suite for (DIM_TYPE DIM1, DATA_TYPE* INPLACE_ARRAY1)
- */
-%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY,
-           fragment="NumPy_Macros")
-  (DIM_TYPE DIM1, DATA_TYPE* INPLACE_ARRAY1)
-{
-  $1 = is_array($input) && PyArray_EquivTypenums(array_type($input),
-                                                 DATA_TYPECODE);
-}
-%typemap(in,
-         fragment="NumPy_Fragments")
-  (DIM_TYPE DIM1, DATA_TYPE* INPLACE_ARRAY1)
-  (PyArrayObject* array=NULL, int i=0)
-{
-  array = obj_to_array_no_conversion($input, DATA_TYPECODE);
-  if (!array || !require_dimensions(array,1) || !require_contiguous(array)
-      || !require_native(array)) SWIG_fail;
-  $1 = 1;
-  for (i=0; i < array_numdims(array); ++i) $1 *= array_size(array,i);
-  $2 = (DATA_TYPE*) array_data(array);
-}
-
-/* Typemap suite for (DATA_TYPE INPLACE_ARRAY2[ANY][ANY])
- */
-%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY,
-           fragment="NumPy_Macros")
-  (DATA_TYPE INPLACE_ARRAY2[ANY][ANY])
-{
-  $1 = is_array($input) && PyArray_EquivTypenums(array_type($input),
-                                                 DATA_TYPECODE);
-}
-%typemap(in,
-         fragment="NumPy_Fragments")
-  (DATA_TYPE INPLACE_ARRAY2[ANY][ANY])
-  (PyArrayObject* array=NULL)
-{
-  npy_intp size[2] = { $1_dim0, $1_dim1 };
-  array = obj_to_array_no_conversion($input, DATA_TYPECODE);
-  if (!array || !require_dimensions(array,2) || !require_size(array, size, 2) ||
-      !require_contiguous(array) || !require_native(array)) SWIG_fail;
-  $1 = ($1_ltype) array_data(array);
-}
-
-/* Typemap suite for (DATA_TYPE* INPLACE_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2)
- */
-%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY,
-           fragment="NumPy_Macros")
-  (DATA_TYPE* INPLACE_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2)
-{
-  $1 = is_array($input) && PyArray_EquivTypenums(array_type($input),
-                                                 DATA_TYPECODE);
-}
-%typemap(in,
-         fragment="NumPy_Fragments")
-  (DATA_TYPE* INPLACE_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2)
-  (PyArrayObject* array=NULL)
-{
-  array = obj_to_array_no_conversion($input, DATA_TYPECODE);
-  if (!array || !require_dimensions(array,2) || !require_contiguous(array)
-      || !require_native(array)) SWIG_fail;
-  $1 = (DATA_TYPE*) array_data(array);
-  $2 = (DIM_TYPE) array_size(array,0);
-  $3 = (DIM_TYPE) array_size(array,1);
-}
-
-/* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_ARRAY2)
- */
-%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY,
-           fragment="NumPy_Macros")
-  (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_ARRAY2)
-{
-  $1 = is_array($input) && PyArray_EquivTypenums(array_type($input),
-                                                 DATA_TYPECODE);
-}
-%typemap(in,
-         fragment="NumPy_Fragments")
-  (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_ARRAY2)
-  (PyArrayObject* array=NULL)
-{
-  array = obj_to_array_no_conversion($input, DATA_TYPECODE);
-  if (!array || !require_dimensions(array,2) || !require_contiguous(array) ||
-      !require_native(array)) SWIG_fail;
-  $1 = (DIM_TYPE) array_size(array,0);
-  $2 = (DIM_TYPE) array_size(array,1);
-  $3 = (DATA_TYPE*) array_data(array);
-}
-
-/* Typemap suite for (DATA_TYPE* INPLACE_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2)
- */
-%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY,
-           fragment="NumPy_Macros")
-  (DATA_TYPE* INPLACE_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2)
-{
-  $1 = is_array($input) && PyArray_EquivTypenums(array_type($input),
-                                                 DATA_TYPECODE);
-}
-%typemap(in,
-         fragment="NumPy_Fragments")
-  (DATA_TYPE* INPLACE_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2)
-  (PyArrayObject* array=NULL)
-{
-  array = obj_to_array_no_conversion($input, DATA_TYPECODE);
-  if (!array || !require_dimensions(array,2) || !require_contiguous(array)
-      || !require_native(array) || !require_fortran(array)) SWIG_fail;
-  $1 = (DATA_TYPE*) array_data(array);
-  $2 = (DIM_TYPE) array_size(array,0);
-  $3 = (DIM_TYPE) array_size(array,1);
-}
-
-/* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_FARRAY2)
- */
-%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY,
-           fragment="NumPy_Macros")
-  (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_FARRAY2)
-{
-  $1 = is_array($input) && PyArray_EquivTypenums(array_type($input),
-                                                 DATA_TYPECODE);
-}
-%typemap(in,
-         fragment="NumPy_Fragments")
-  (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_FARRAY2)
-  (PyArrayObject* array=NULL)
-{
-  array = obj_to_array_no_conversion($input, DATA_TYPECODE);
-  if (!array || !require_dimensions(array,2) || !require_contiguous(array) ||
-      !require_native(array) || !require_fortran(array)) SWIG_fail;
-  $1 = (DIM_TYPE) array_size(array,0);
-  $2 = (DIM_TYPE) array_size(array,1);
-  $3 = (DATA_TYPE*) array_data(array);
-}
-
-/* Typemap suite for (DATA_TYPE INPLACE_ARRAY3[ANY][ANY][ANY])
- */
-%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY,
-           fragment="NumPy_Macros")
-  (DATA_TYPE INPLACE_ARRAY3[ANY][ANY][ANY])
-{
-  $1 = is_array($input) && PyArray_EquivTypenums(array_type($input),
-                                                 DATA_TYPECODE);
-}
-%typemap(in,
-         fragment="NumPy_Fragments")
-  (DATA_TYPE INPLACE_ARRAY3[ANY][ANY][ANY])
-  (PyArrayObject* array=NULL)
-{
-  npy_intp size[3] = { $1_dim0, $1_dim1, $1_dim2 };
-  array = obj_to_array_no_conversion($input, DATA_TYPECODE);
-  if (!array || !require_dimensions(array,3) || !require_size(array, size, 3) ||
-      !require_contiguous(array) || !require_native(array)) SWIG_fail;
-  $1 = ($1_ltype) array_data(array);
-}
-
-/* Typemap suite for (DATA_TYPE* INPLACE_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2,
- *                    DIM_TYPE DIM3)
- */
-%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY,
-           fragment="NumPy_Macros")
-  (DATA_TYPE* INPLACE_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3)
-{
-  $1 = is_array($input) && PyArray_EquivTypenums(array_type($input),
-                                                 DATA_TYPECODE);
-}
-%typemap(in,
-         fragment="NumPy_Fragments")
-  (DATA_TYPE* INPLACE_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3)
-  (PyArrayObject* array=NULL)
-{
-  array = obj_to_array_no_conversion($input, DATA_TYPECODE);
-  if (!array || !require_dimensions(array,3) || !require_contiguous(array) ||
-      !require_native(array)) SWIG_fail;
-  $1 = (DATA_TYPE*) array_data(array);
-  $2 = (DIM_TYPE) array_size(array,0);
-  $3 = (DIM_TYPE) array_size(array,1);
-  $4 = (DIM_TYPE) array_size(array,2);
-}
-
-/* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3,
- *                    DATA_TYPE* INPLACE_ARRAY3)
- */
-%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY,
-           fragment="NumPy_Macros")
-  (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* INPLACE_ARRAY3)
-{
-  $1 = is_array($input) && PyArray_EquivTypenums(array_type($input),
-                                                 DATA_TYPECODE);
-}
-%typemap(in,
-         fragment="NumPy_Fragments")
-  (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* INPLACE_ARRAY3)
-  (PyArrayObject* array=NULL)
-{
-  array = obj_to_array_no_conversion($input, DATA_TYPECODE);
-  if (!array || !require_dimensions(array,3) || !require_contiguous(array)
-      || !require_native(array)) SWIG_fail;
-  $1 = (DIM_TYPE) array_size(array,0);
-  $2 = (DIM_TYPE) array_size(array,1);
-  $3 = (DIM_TYPE) array_size(array,2);
-  $4 = (DATA_TYPE*) array_data(array);
-}
-
-/* Typemap suite for (DATA_TYPE* INPLACE_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2,
- *                    DIM_TYPE DIM3)
- */
-%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY,
-           fragment="NumPy_Macros")
-  (DATA_TYPE* INPLACE_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3)
-{
-  $1 = is_array($input) && PyArray_EquivTypenums(array_type($input),
-                                                 DATA_TYPECODE);
-}
-%typemap(in,
-         fragment="NumPy_Fragments")
-  (DATA_TYPE* INPLACE_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3)
-  (PyArrayObject* array=NULL)
-{
-  array = obj_to_array_no_conversion($input, DATA_TYPECODE);
-  if (!array || !require_dimensions(array,3) || !require_contiguous(array) ||
-      !require_native(array) || !require_fortran(array)) SWIG_fail;
-  $1 = (DATA_TYPE*) array_data(array);
-  $2 = (DIM_TYPE) array_size(array,0);
-  $3 = (DIM_TYPE) array_size(array,1);
-  $4 = (DIM_TYPE) array_size(array,2);
-}
-
-/* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3,
- *                    DATA_TYPE* INPLACE_FARRAY3)
- */
-%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY,
-           fragment="NumPy_Macros")
-  (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* INPLACE_FARRAY3)
-{
-  $1 = is_array($input) && PyArray_EquivTypenums(array_type($input),
-                                                 DATA_TYPECODE);
-}
-%typemap(in,
-         fragment="NumPy_Fragments")
-  (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* INPLACE_FARRAY3)
-  (PyArrayObject* array=NULL)
-{
-  array = obj_to_array_no_conversion($input, DATA_TYPECODE);
-  if (!array || !require_dimensions(array,3) || !require_contiguous(array)
-      || !require_native(array) || !require_fortran(array)) SWIG_fail;
-  $1 = (DIM_TYPE) array_size(array,0);
-  $2 = (DIM_TYPE) array_size(array,1);
-  $3 = (DIM_TYPE) array_size(array,2);
-  $4 = (DATA_TYPE*) array_data(array);
-}
-
-/*************************/
-/* Argout Array Typemaps */
-/*************************/
-
-/* Typemap suite for (DATA_TYPE ARGOUT_ARRAY1[ANY])
- */
-%typemap(in,numinputs=0,
-         fragment="NumPy_Backward_Compatibility,NumPy_Macros")
-  (DATA_TYPE ARGOUT_ARRAY1[ANY])
-  (PyObject * array = NULL)
-{
-  npy_intp dims[1] = { $1_dim0 };
-  array = PyArray_SimpleNew(1, dims, DATA_TYPECODE);
-  if (!array) SWIG_fail;
-  $1 = ($1_ltype) array_data(array);
-}
-%typemap(argout)
-  (DATA_TYPE ARGOUT_ARRAY1[ANY])
-{
-  $result = SWIG_Python_AppendOutput($result,array$argnum);
-}
-
-/* Typemap suite for (DATA_TYPE* ARGOUT_ARRAY1, DIM_TYPE DIM1)
- */
-%typemap(in,numinputs=1,
-         fragment="NumPy_Fragments")
-  (DATA_TYPE* ARGOUT_ARRAY1, DIM_TYPE DIM1)
-  (PyObject * array = NULL)
-{
-  npy_intp dims[1];
-  if (!PyInt_Check($input))
-  {
-    char* typestring = pytype_string($input);
-    PyErr_Format(PyExc_TypeError,
-                 "Int dimension expected.  '%s' given.",
-                 typestring);
-    SWIG_fail;
-  }
-  $2 = (DIM_TYPE) PyInt_AsLong($input);
-  dims[0] = (npy_intp) $2;
-  array = PyArray_SimpleNew(1, dims, DATA_TYPECODE);
-  if (!array) SWIG_fail;
-  $1 = (DATA_TYPE*) array_data(array);
-}
-%typemap(argout)
-  (DATA_TYPE* ARGOUT_ARRAY1, DIM_TYPE DIM1)
-{
-  $result = SWIG_Python_AppendOutput($result,array$argnum);
-}
-
-/* Typemap suite for (DIM_TYPE DIM1, DATA_TYPE* ARGOUT_ARRAY1)
- */
-%typemap(in,numinputs=1,
-         fragment="NumPy_Fragments")
-  (DIM_TYPE DIM1, DATA_TYPE* ARGOUT_ARRAY1)
-  (PyObject * array = NULL)
-{
-  npy_intp dims[1];
-  if (!PyInt_Check($input))
-  {
-    char* typestring = pytype_string($input);
-    PyErr_Format(PyExc_TypeError,
-                 "Int dimension expected.  '%s' given.",
-                 typestring);
-    SWIG_fail;
-  }
-  $1 = (DIM_TYPE) PyInt_AsLong($input);
-  dims[0] = (npy_intp) $1;
-  array = PyArray_SimpleNew(1, dims, DATA_TYPECODE);
-  if (!array) SWIG_fail;
-  $2 = (DATA_TYPE*) array_data(array);
-}
-%typemap(argout)
-  (DIM_TYPE DIM1, DATA_TYPE* ARGOUT_ARRAY1)
-{
-  $result = SWIG_Python_AppendOutput($result,array$argnum);
-}
-
-/* Typemap suite for (DATA_TYPE ARGOUT_ARRAY2[ANY][ANY])
- */
-%typemap(in,numinputs=0,
-         fragment="NumPy_Backward_Compatibility,NumPy_Macros")
-  (DATA_TYPE ARGOUT_ARRAY2[ANY][ANY])
-  (PyObject * array = NULL)
-{
-  npy_intp dims[2] = { $1_dim0, $1_dim1 };
-  array = PyArray_SimpleNew(2, dims, DATA_TYPECODE);
-  if (!array) SWIG_fail;
-  $1 = ($1_ltype) array_data(array);
-}
-%typemap(argout)
-  (DATA_TYPE ARGOUT_ARRAY2[ANY][ANY])
-{
-  $result = SWIG_Python_AppendOutput($result,array$argnum);
-}
-
-/* Typemap suite for (DATA_TYPE ARGOUT_ARRAY3[ANY][ANY][ANY])
- */
-%typemap(in,numinputs=0,
-         fragment="NumPy_Backward_Compatibility,NumPy_Macros")
-  (DATA_TYPE ARGOUT_ARRAY3[ANY][ANY][ANY])
-  (PyObject * array = NULL)
-{
-  npy_intp dims[3] = { $1_dim0, $1_dim1, $1_dim2 };
-  array = PyArray_SimpleNew(3, dims, DATA_TYPECODE);
-  if (!array) SWIG_fail;
-  $1 = ($1_ltype) array_data(array);
-}
-%typemap(argout)
-  (DATA_TYPE ARGOUT_ARRAY3[ANY][ANY][ANY])
-{
-  $result = SWIG_Python_AppendOutput($result,array$argnum);
-}
-
-/*****************************/
-/* Argoutview Array Typemaps */
-/*****************************/
-
-/* Typemap suite for (DATA_TYPE** ARGOUTVIEW_ARRAY1, DIM_TYPE* DIM1)
- */
-%typemap(in,numinputs=0)
-  (DATA_TYPE** ARGOUTVIEW_ARRAY1, DIM_TYPE* DIM1    )
-  (DATA_TYPE*  data_temp        , DIM_TYPE  dim_temp)
-{
-  $1 = &data_temp;
-  $2 = &dim_temp;
-}
-%typemap(argout,
-         fragment="NumPy_Backward_Compatibility")
-  (DATA_TYPE** ARGOUTVIEW_ARRAY1, DIM_TYPE* DIM1)
-{
-  npy_intp dims[1] = { *$2 };
-  PyObject * array = PyArray_SimpleNewFromData(1, dims, DATA_TYPECODE, (void*)(*$1));
-  if (!array) SWIG_fail;
-  $result = SWIG_Python_AppendOutput($result,array);
-}
-
-/* Typemap suite for (DIM_TYPE* DIM1, DATA_TYPE** ARGOUTVIEW_ARRAY1)
- */
-%typemap(in,numinputs=0)
-  (DIM_TYPE* DIM1    , DATA_TYPE** ARGOUTVIEW_ARRAY1)
-  (DIM_TYPE  dim_temp, DATA_TYPE*  data_temp        )
-{
-  $1 = &dim_temp;
-  $2 = &data_temp;
-}
-%typemap(argout,
-         fragment="NumPy_Backward_Compatibility")
-  (DIM_TYPE* DIM1, DATA_TYPE** ARGOUTVIEW_ARRAY1)
-{
-  npy_intp dims[1] = { *$1 };
-  PyObject * array = PyArray_SimpleNewFromData(1, dims, DATA_TYPECODE, (void*)(*$2));
-  if (!array) SWIG_fail;
-  $result = SWIG_Python_AppendOutput($result,array);
-}
-
-/* Typemap suite for (DATA_TYPE** ARGOUTVIEW_ARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2)
- */
-%typemap(in,numinputs=0)
-  (DATA_TYPE** ARGOUTVIEW_ARRAY2, DIM_TYPE* DIM1     , DIM_TYPE* DIM2     )
-  (DATA_TYPE*  data_temp        , DIM_TYPE  dim1_temp, DIM_TYPE  dim2_temp)
-{
-  $1 = &data_temp;
-  $2 = &dim1_temp;
-  $3 = &dim2_temp;
-}
-%typemap(argout,
-         fragment="NumPy_Backward_Compatibility")
-  (DATA_TYPE** ARGOUTVIEW_ARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2)
-{
-  npy_intp dims[2] = { *$2, *$3 };
-  PyObject * array = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$1));
-  if (!array) SWIG_fail;
-  $result = SWIG_Python_AppendOutput($result,array);
-}
-
-/* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_ARRAY2)
- */
-%typemap(in,numinputs=0)
-  (DIM_TYPE* DIM1     , DIM_TYPE* DIM2     , DATA_TYPE** ARGOUTVIEW_ARRAY2)
-  (DIM_TYPE  dim1_temp, DIM_TYPE  dim2_temp, DATA_TYPE*  data_temp        )
-{
-  $1 = &dim1_temp;
-  $2 = &dim2_temp;
-  $3 = &data_temp;
-}
-%typemap(argout,
-         fragment="NumPy_Backward_Compatibility")
-  (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_ARRAY2)
-{
-  npy_intp dims[2] = { *$1, *$2 };
-  PyObject * array = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$3));
-  if (!array) SWIG_fail;
-  $result = SWIG_Python_AppendOutput($result,array);
-}
-
-/* Typemap suite for (DATA_TYPE** ARGOUTVIEW_FARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2)
- */
-%typemap(in,numinputs=0)
-  (DATA_TYPE** ARGOUTVIEW_FARRAY2, DIM_TYPE* DIM1     , DIM_TYPE* DIM2     )
-  (DATA_TYPE*  data_temp        , DIM_TYPE  dim1_temp, DIM_TYPE  dim2_temp)
-{
-  $1 = &data_temp;
-  $2 = &dim1_temp;
-  $3 = &dim2_temp;
-}
-%typemap(argout,
-         fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements")
-  (DATA_TYPE** ARGOUTVIEW_FARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2)
-{
-  npy_intp dims[2] = { *$2, *$3 };
-  PyObject * obj = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$1));
-  PyArrayObject * array = (PyArrayObject*) obj;
-  if (!array || !require_fortran(array)) SWIG_fail;
-  $result = SWIG_Python_AppendOutput($result,obj);
-}
-
-/* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_FARRAY2)
- */
-%typemap(in,numinputs=0)
-  (DIM_TYPE* DIM1     , DIM_TYPE* DIM2     , DATA_TYPE** ARGOUTVIEW_FARRAY2)
-  (DIM_TYPE  dim1_temp, DIM_TYPE  dim2_temp, DATA_TYPE*  data_temp        )
-{
-  $1 = &dim1_temp;
-  $2 = &dim2_temp;
-  $3 = &data_temp;
-}
-%typemap(argout,
-         fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements")
-  (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_FARRAY2)
-{
-  npy_intp dims[2] = { *$1, *$2 };
-  PyObject * obj = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$3));
-  PyArrayObject * array = (PyArrayObject*) obj;
-  if (!array || !require_fortran(array)) SWIG_fail;
-  $result = SWIG_Python_AppendOutput($result,obj);
-}
-
-/* Typemap suite for (DATA_TYPE** ARGOUTVIEW_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2,
-                      DIM_TYPE* DIM3)
- */
-%typemap(in,numinputs=0)
-  (DATA_TYPE** ARGOUTVIEW_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3)
-  (DATA_TYPE* data_temp, DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp)
-{
-  $1 = &data_temp;
-  $2 = &dim1_temp;
-  $3 = &dim2_temp;
-  $4 = &dim3_temp;
-}
-%typemap(argout,
-         fragment="NumPy_Backward_Compatibility")
-  (DATA_TYPE** ARGOUTVIEW_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3)
-{
-  npy_intp dims[3] = { *$2, *$3, *$4 };
-  PyObject * array = PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$1));
-  if (!array) SWIG_fail;
-  $result = SWIG_Python_AppendOutput($result,array);
-}
-
-/* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3,
-                      DATA_TYPE** ARGOUTVIEW_ARRAY3)
- */
-%typemap(in,numinputs=0)
-  (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_ARRAY3)
-  (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DATA_TYPE* data_temp)
-{
-  $1 = &dim1_temp;
-  $2 = &dim2_temp;
-  $3 = &dim3_temp;
-  $4 = &data_temp;
-}
-%typemap(argout,
-         fragment="NumPy_Backward_Compatibility")
-  (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_ARRAY3)
-{
-  npy_intp dims[3] = { *$1, *$2, *$3 };
-  PyObject * array = PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$3));
-  if (!array) SWIG_fail;
-  $result = SWIG_Python_AppendOutput($result,array);
-}
-
-/* Typemap suite for (DATA_TYPE** ARGOUTVIEW_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2,
-                      DIM_TYPE* DIM3)
- */
-%typemap(in,numinputs=0)
-  (DATA_TYPE** ARGOUTVIEW_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3)
-  (DATA_TYPE* data_temp, DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp)
-{
-  $1 = &data_temp;
-  $2 = &dim1_temp;
-  $3 = &dim2_temp;
-  $4 = &dim3_temp;
-}
-%typemap(argout,
-         fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements")
-  (DATA_TYPE** ARGOUTVIEW_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3)
-{
-  npy_intp dims[3] = { *$2, *$3, *$4 };
-  PyObject * obj = PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$1));
-  PyArrayObject * array = (PyArrayObject*) obj;
-  if (!array || require_fortran(array)) SWIG_fail;
-  $result = SWIG_Python_AppendOutput($result,obj);
-}
-
-/* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3,
-                      DATA_TYPE** ARGOUTVIEW_FARRAY3)
- */
-%typemap(in,numinputs=0)
-  (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_FARRAY3)
-  (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DATA_TYPE* data_temp)
-{
-  $1 = &dim1_temp;
-  $2 = &dim2_temp;
-  $3 = &dim3_temp;
-  $4 = &data_temp;
-}
-%typemap(argout,
-         fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements")
-  (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_FARRAY3)
-{
-  npy_intp dims[3] = { *$1, *$2, *$3 };
-  PyObject * obj = PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$3));
-  PyArrayObject * array = (PyArrayObject*) obj;
-  if (!array || require_fortran(array)) SWIG_fail;
-  $result = SWIG_Python_AppendOutput($result,obj);
-}
-
-%enddef    /* %numpy_typemaps() macro */
-/* *************************************************************** */
-
-/* Concrete instances of the %numpy_typemaps() macro: Each invocation
- * below applies all of the typemaps above to the specified data type.
- */
-%numpy_typemaps(signed char       , NPY_BYTE     , int)
-%numpy_typemaps(unsigned char     , NPY_UBYTE    , int)
-%numpy_typemaps(short             , NPY_SHORT    , int)
-%numpy_typemaps(unsigned short    , NPY_USHORT   , int)
-%numpy_typemaps(int               , NPY_INT      , int)
-%numpy_typemaps(unsigned int      , NPY_UINT     , int)
-%numpy_typemaps(long              , NPY_LONG     , int)
-%numpy_typemaps(unsigned long     , NPY_ULONG    , int)
-%numpy_typemaps(long long         , NPY_LONGLONG , int)
-%numpy_typemaps(unsigned long long, NPY_ULONGLONG, int)
-%numpy_typemaps(float             , NPY_FLOAT    , int)
-%numpy_typemaps(double            , NPY_DOUBLE   , int)
-
-/* ***************************************************************
- * The follow macro expansion does not work, because C++ bool is 4
- * bytes and NPY_BOOL is 1 byte
- *
- *    %numpy_typemaps(bool, NPY_BOOL, int)
- */
-
-/* ***************************************************************
- * On my Mac, I get the following warning for this macro expansion:
- * 'swig/python detected a memory leak of type 'long double *', no destructor found.'
- *
- *    %numpy_typemaps(long double, NPY_LONGDOUBLE, int)
- */
-
-/* ***************************************************************
- * Swig complains about a syntax error for the following macro
- * expansions:
- *
- *    %numpy_typemaps(complex float,  NPY_CFLOAT , int)
- *
- *    %numpy_typemaps(complex double, NPY_CDOUBLE, int)
- *
- *    %numpy_typemaps(complex long double, NPY_CLONGDOUBLE, int)
- */
-
-#endif /* SWIGPYTHON */
diff --git a/.pc/dircategory-and-direntry-mathgl-en-texi.patch/.timestamp b/.pc/dircategory-and-direntry-mathgl-en-texi.patch/.timestamp
deleted file mode 100644
index e69de29..0000000
diff --git a/.pc/dircategory-and-direntry-mathgl-en-texi.patch/texinfo/mathgl_en.texi b/.pc/dircategory-and-direntry-mathgl-en-texi.patch/texinfo/mathgl_en.texi
deleted file mode 100644
index dce0911..0000000
--- a/.pc/dircategory-and-direntry-mathgl-en-texi.patch/texinfo/mathgl_en.texi
+++ /dev/null
@@ -1,134 +0,0 @@
-\input texinfo
- at setfilename mathgl_en.info
- at set VERSION 1.11
- at settitle MathGL @value{VERSION}
- at syncodeindex pg cp
- at comment %**end of header
-
- at copying
-This manual is for MathGL (version @value{VERSION}), a collection of classes and routines for scientific plotting. Please report any errors in this manual to @email{mathgl.abalakin@@gmail.org}.
-
-Copyright @copyright{} 2008 Alexey Balakin.
-
- at quotation
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2 or
-any later version published by the Free Software Foundation; with no
-Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
-and with the Back-Cover Texts as in (a) below.  A copy of the
-license is included in the section entitled ``GNU Free Documentation
-License.''
-
-(a) The FSF's Back-Cover Text is: ``You have the freedom to
-copy and modify this GNU manual.  Buying copies from the FSF
-supports it in developing GNU and promoting software freedom.''
- at end quotation
- at end copying
-
- at c @dircategory MathGL documentation system
- at c @direntry
- at c * MathGL: (mathgl). The library for scientific graphics.
- at c @end direntry
-
- at titlepage
- at title MathGL
- at subtitle for version @value{VERSION}
- at author A.A. Balakin (@uref{http://mathgl.sourceforge.net/})
- at page
- at vskip 0pt plus 1filll
- at insertcopying
- at end titlepage
-
- at contents
-
- at ifnottex
- at node Top
- at top MathGL
-
-This file documents the Mathematical Graphic Library (MathGL), a collection of classes and routines for scientific plotting. It corresponds to release @value{VERSION} of the library. Please report any errors in this manual to @email{mathgl.abalakin@@gmail.org}. More information about MathGL can be found at the project homepage, @uref{http://mathgl.sourceforge.net/}.
-
-Copyright @copyright{} 2008 Alexey A. Balakin. 
-
- at quotation
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2 or
-any later version published by the Free Software Foundation; with no
-Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
-and with the Back-Cover Texts as in (a) below.  A copy of the
-license is included in the section entitled ``GNU Free Documentation
-License.''
-
-(a) The FSF's Back-Cover Text is: ``You have the freedom to
-copy and modify this GNU manual.  Buying copies from the FSF
-supports it in developing GNU and promoting software freedom.''
- at end quotation
-
- at end ifnottex
-
- at menu
-* Overview::
-* Examples::
-* MathGL core::
-* Plotter classes::
-* Widget classes::
-* mglData class::
-* Other classes::
-* MGL interface::
-* Samples::
-* TeX-like symbols::
-* Copying This Manual::
-* Index::
- at end menu
-
- at rmacro sref {arg}
- at xref{\arg\}, for sample code and picture.
- at end rmacro
- at macro tdref{nam}
- at uref{http://mathgl.sourceforge.net/pdf_u3d/\nam\.pdf, 3D pdf}
- at end macro
- at macro MGL
-(MGL)
- at end macro
-
-
- at node Overview, Examples, , Top
- at include overview_en.texi
-
- at node Examples, MathGL core, Overview, Top
- at include example_en.texi
-
- at node MathGL core, Plotter classes, Examples, Top
- at include core_en.texi
-
- at node Plotter classes, Widget classes, MathGL core, Top
- at include class_en.texi
-
- at node Widget classes, mglData class, Plotter classes, Top
- at include widget_en.texi
-
- at node mglData class, Other classes, Widget classes, Top
- at include data_en.texi
-
- at node Other classes, MGL interface, mglData class, Top
- at include other_en.texi
-
- at node MGL interface, Samples, Other classes, Top
- at include mgl_cmd_en.texi
-
- at node Samples, TeX-like symbols, MGL interface, Top
- at include samples_en.texi
-
- at node TeX-like symbols, Copying This Manual, Samples, Top
- at appendix TeX-like symbols
- at include appendix_en.texi
-
- at node Copying This Manual, Index, TeX-like symbols, Top
- at appendix GNU Free Documentation License
- at include fdl.texi
-
- at node Index, , Copying This Manual, Top
- at unnumbered Index
-
- at printindex cp
-
- at bye
diff --git a/.pc/dircategory-and-direntry-mathgl-ru-texi.patch/.timestamp b/.pc/dircategory-and-direntry-mathgl-ru-texi.patch/.timestamp
deleted file mode 100644
index e69de29..0000000
diff --git a/.pc/dircategory-and-direntry-mathgl-ru-texi.patch/texinfo/mathgl_ru.texi b/.pc/dircategory-and-direntry-mathgl-ru-texi.patch/texinfo/mathgl_ru.texi
deleted file mode 100644
index ea267fb..0000000
--- a/.pc/dircategory-and-direntry-mathgl-ru-texi.patch/texinfo/mathgl_ru.texi
+++ /dev/null
@@ -1,135 +0,0 @@
-\input texinfo
- at setfilename mathgl_ru.info
- at c @documentlanguage ru
- at documentencoding UTF-8
- at set VERSION 1.11
- at settitle MathGL @value{VERSION}
- at syncodeindex pg cp
- at comment %**end of header
-
- at copying
-Это документация для MathGL (версии @value{VERSION}) -- библиотеки классов и функций для построения научной графики. Пожалуйста сообщайте о любых ошибках в этом руководстве на @email{mathgl.abalakin@@gmail.org}.
-
-Copyright @copyright{} 2009 Алексей Балакин.
-
- at quotation
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2 or
-any later version published by the Free Software Foundation; with no
-Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
-and with the Back-Cover Texts as in (a) below.  A copy of the
-license is included in the section entitled ``GNU Free Documentation
-License.''
-
-(a) The FSF's Back-Cover Text is: ``You have the freedom to
-copy and modify this GNU manual.  Buying copies from the FSF
-supports it in developing GNU and promoting software freedom.''
- at end quotation
- at end copying
-
- at c @dircategory MathGL documentation system
- at c @direntry
- at c * MathGL: (mathgl). The library for scientific graphics.
- at c @end direntry
-
- at titlepage
- at title MathGL
- at subtitle версия @value{VERSION}
- at author А.А. Балакин (@uref{http://mathgl.sourceforge.net/})
- at page
- at vskip 0pt plus 1filll
- at insertcopying
- at end titlepage
-
- at contents
-
- at ifnottex
- at node Top
- at top MathGL
-
-Это документация для MathGL (версии @value{VERSION}) -- библиотеки классов и функций для построения научной графики. Пожалуйста сообщайте о любых ошибках в этом руководстве на @email{mathgl.abalakin@@gmail.org}. Дополнительную информацию о MathGL можно найти на домашней странице проекта @uref{http://mathgl.sourceforge.net/}.
-
-Copyright @copyright{} 2009 Алексей Балакин. 
-
- at quotation
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2 or
-any later version published by the Free Software Foundation; with no
-Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
-and with the Back-Cover Texts as in (a) below.  A copy of the
-license is included in the section entitled ``GNU Free Documentation
-License.''
-
-(a) The FSF's Back-Cover Text is: ``You have the freedom to
-copy and modify this GNU manual.  Buying copies from the FSF
-supports it in developing GNU and promoting software freedom.''
- at end quotation
-
- at end ifnottex
-
- at menu
-* Overview::
-* Examples::
-* MathGL core::
-* Plotter classes::
-* Widget classes::
-* mglData class::
-* Other classes::
-* MGL interface::
-* Samples::
-* TeX-like symbols::
-* Copying This Manual::
-* Index::
- at end menu
-
- at rmacro sref {arg}
-См. раздел @ref{\arg\}, для примеров кода и графика.
- at end rmacro
- at macro tdref{nam}
- at uref{http://mathgl.sourceforge.net/pdf_u3d/\nam\.pdf, 3D pdf}
- at end macro
- at macro MGL
-(MGL)
- at end macro
-
- at node Overview, Examples, , Top
- at include overview_ru.texi
-
- at node Examples, MathGL core, Overview, Top
- at include example_ru.texi
-
- at node MathGL core, Plotter classes, Examples, Top
- at include core_ru.texi
-
- at node Plotter classes, Widget classes, MathGL core, Top
- at include class_ru.texi
-
- at node Widget classes, mglData class, Plotter classes, Top
- at include widget_ru.texi
-
- at node mglData class, Other classes, Widget classes, Top
- at include data_ru.texi
-
- at node Other classes, MGL interface, mglData class, Top
- at include other_ru.texi
-
- at node MGL interface, Samples, Other classes, Top
- at include mgl_cmd_ru.texi
-
- at node Samples, TeX-like symbols, MGL interface, Top
- at include samples_ru.texi
-
- at node TeX-like symbols, Copying This Manual, Samples, Top
- at appendix Символы TeX
- at include appendix_ru.texi
-
- at node Copying This Manual, Index, TeX-like symbols, Top
- at appendix GNU Free Documentation License
- at include fdl.texi
-
- at node Index, , Copying This Manual, Top
- at unnumbered Индекс
-
- at printindex cp
-
- at bye
diff --git a/.pc/dircategory-and-direntry-mgl-en-texi.patch/.timestamp b/.pc/dircategory-and-direntry-mgl-en-texi.patch/.timestamp
deleted file mode 100644
index e69de29..0000000
diff --git a/.pc/dircategory-and-direntry-mgl-en-texi.patch/texinfo/mgl_en.texi b/.pc/dircategory-and-direntry-mgl-en-texi.patch/texinfo/mgl_en.texi
deleted file mode 100644
index 66c5f81..0000000
--- a/.pc/dircategory-and-direntry-mgl-en-texi.patch/texinfo/mgl_en.texi
+++ /dev/null
@@ -1,104 +0,0 @@
-\input texinfo
- at setfilename mgl_en.info
- at set VERSION 1.11
- at settitle MGL script language for version @value{VERSION}
- at syncodeindex pg cp
- at comment %**end of header
-
- at copying
-This manual is for MathGL (version @value{VERSION}), a collection of classes and routines for scientific plotting. Please report any errors in this manual to @email{mathgl.abalakin@@gmail.org}.
-
-Copyright @copyright{} 2008 Alexey Balakin.
-
- at quotation
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2 or
-any later version published by the Free Software Foundation; with no
-Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
-and with the Back-Cover Texts as in (a) below.  A copy of the
-license is included in the section entitled ``GNU Free Documentation
-License.''
-
-(a) The FSF's Back-Cover Text is: ``You have the freedom to
-copy and modify this GNU manual.  Buying copies from the FSF
-supports it in developing GNU and promoting software freedom.''
- at end quotation
- at end copying
-
- at c @dircategory MathGL documentation system
- at c @direntry
- at c * MathGL: (mathgl). The library for scientific graphics.
- at c @end direntry
-
- at titlepage
- at title MGL script language
- at subtitle for version @value{VERSION}
- at author A.A. Balakin (@uref{http://mathgl.sourceforge.net/})
- at page
- at vskip 0pt plus 1filll
- at insertcopying
- at end titlepage
-
- at contents
-
- at ifnottex
- at node Top
- at top MGL script language
-
-This file documents the MGL script language. It corresponds to release @value{VERSION} of the MathGL library. Please report any errors in this manual to @email{mathgl.abalakin@@gmail.org}. More information about MGL and MathGL can be found at the project homepage, @uref{http://mathgl.sourceforge.net/}.
-
-Copyright @copyright{} 2008 Alexey A. Balakin. 
-
- at quotation
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2 or
-any later version published by the Free Software Foundation; with no
-Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
-and with the Back-Cover Texts as in (a) below.  A copy of the
-license is included in the section entitled ``GNU Free Documentation
-License.''
-
-(a) The FSF's Back-Cover Text is: ``You have the freedom to
-copy and modify this GNU manual.  Buying copies from the FSF
-supports it in developing GNU and promoting software freedom.''
- at end quotation
-
- at end ifnottex
-
- at menu
-* MGL interface::
-* Examples::
-* Samples::
-* Copying This Manual::
-* Index::
- at end menu
-
- at rmacro sref {arg}
- at xref{\arg\}, for sample code and picture.
- at end rmacro
- at macro tdref{nam}
- at uref{http://mathgl.sourceforge.net/pdf_u3d/\nam\.pdf, 3D pdf}
- at end macro
- at macro MGL
- at end macro
- at set UDAV
-
- at node MGL interface, Examples, , Top
- at include mgl_cmd_en.texi
-
- at node Examples, Samples, MGL interface, Top
- at include ex_mgl_en.texi
-
- at node Samples,Copying This Manual, Examples, Top
- at include samples_en.texi
-
- at node Copying This Manual, Index, Samples, Top
- at appendix GNU Free Documentation License
- at include fdl.texi
-
- at node Index, , Copying This Manual, Top
- at unnumbered Index
-
- at printindex cp
-
- at bye
diff --git a/.pc/dircategory-and-direntry-mgl-ru-texi.patch/.timestamp b/.pc/dircategory-and-direntry-mgl-ru-texi.patch/.timestamp
deleted file mode 100644
index e69de29..0000000
diff --git a/.pc/dircategory-and-direntry-mgl-ru-texi.patch/texinfo/mgl_ru.texi b/.pc/dircategory-and-direntry-mgl-ru-texi.patch/texinfo/mgl_ru.texi
deleted file mode 100644
index cee1571..0000000
--- a/.pc/dircategory-and-direntry-mgl-ru-texi.patch/texinfo/mgl_ru.texi
+++ /dev/null
@@ -1,106 +0,0 @@
-\input texinfo
- at setfilename mgl_ru.info
- at c @documentlanguage ru
- at documentencoding UTF-8
- at set VERSION 1.11
- at settitle Язык MGL для версии @value{VERSION}
- at syncodeindex pg cp
- at comment %**end of header
-
- at copying
-Это документация для MathGL (версии @value{VERSION}) -- библиотеки классов и функций для построения научной графики. Пожалуйста сообщайте о любых ошибках в этом руководстве на @email{mathgl.abalakin@@gmail.org}.
-
-Copyright @copyright{} 2009 Алексей Балакин.
-
- at quotation
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2 or
-any later version published by the Free Software Foundation; with no
-Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
-and with the Back-Cover Texts as in (a) below.  A copy of the
-license is included in the section entitled ``GNU Free Documentation
-License.''
-
-(a) The FSF's Back-Cover Text is: ``You have the freedom to
-copy and modify this GNU manual.  Buying copies from the FSF
-supports it in developing GNU and promoting software freedom.''
- at end quotation
- at end copying
-
- at c @dircategory MathGL documentation system
- at c @direntry
- at c * MathGL: (mathgl). The library for scientific graphics.
- at c @end direntry
-
- at titlepage
- at title Язык MGL
- at subtitle версия @value{VERSION}
- at author А.А. Балакин (@uref{http://mathgl.sourceforge.net/})
- at page
- at vskip 0pt plus 1filll
- at insertcopying
- at end titlepage
-
- at contents
-
- at ifnottex
- at node Top
- at top Язык MGL
-
-Это документация для языка MGL (версии @value{VERSION}). Пожалуйста сообщайте о любых ошибках в этом руководстве на @email{mathgl.abalakin@@gmail.org}. Дополнительную информацию о MGL и MathGL можно найти на домашней странице проекта @uref{http://mathgl.sourceforge.net/}.
-
-Copyright @copyright{} 2010 Алексей Балакин. 
-
- at quotation
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2 or
-any later version published by the Free Software Foundation; with no
-Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
-and with the Back-Cover Texts as in (a) below.  A copy of the
-license is included in the section entitled ``GNU Free Documentation
-License.''
-
-(a) The FSF's Back-Cover Text is: ``You have the freedom to
-copy and modify this GNU manual.  Buying copies from the FSF
-supports it in developing GNU and promoting software freedom.''
- at end quotation
-
- at end ifnottex
-
- at menu
-* MGL interface::
-* Examples::
-* Samples::
-* Copying This Manual::
-* Index::
- at end menu
-
- at rmacro sref {arg}
-См. раздел @ref{\arg\}, для примеров кода и графика.
- at end rmacro
- at macro tdref{nam}
- at uref{http://mathgl.sourceforge.net/pdf_u3d/\nam\.pdf, 3D pdf}
- at end macro
- at macro MGL
- at end macro
- at set UDAV
-
- at node MGL interface, Examples, , Top
- at include mgl_cmd_ru.texi
-
- at node Examples, Samples, MGL interface, Top
- at include ex_mgl_ru.texi
-
- at node Samples,Copying This Manual, Examples, Top
- at include samples_ru.texi
-
- at node Copying This Manual, Index, Samples, Top
- at appendix GNU Free Documentation License
- at include fdl.texi
-
- at node Index, , Copying This Manual, Top
- at unnumbered Индекс
-
- at printindex cp
-
- at bye
diff --git a/.pc/mgl-mgl_data_io_cpp.patch/.timestamp b/.pc/mgl-mgl_data_io_cpp.patch/.timestamp
deleted file mode 100644
index e69de29..0000000
diff --git a/.pc/mgl-mgl_data_io_cpp.patch/mgl/mgl_data_io.cpp b/.pc/mgl-mgl_data_io_cpp.patch/mgl/mgl_data_io.cpp
deleted file mode 100644
index caf525c..0000000
--- a/.pc/mgl-mgl_data_io_cpp.patch/mgl/mgl_data_io.cpp
+++ /dev/null
@@ -1,1165 +0,0 @@
-/***************************************************************************
- * mgl_data_io.cpp is part of Math Graphic Library
- * Copyright (C) 2007 Alexey Balakin <balakin at appl.sci-nnov.ru>            *
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU Library General Public License as       *
- *   published by the Free Software Foundation; either version 3 of the    *
- *   License, or (at your option) any later version.                       *
- *                                                                         *
- *   This program is distributed in the hope that it will be useful,       *
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
- *   GNU General Public License for more details.                          *
- *                                                                         *
- *   You should have received a copy of the GNU Library General Public     *
- *   License along with this program; if not, write to the                 *
- *   Free Software Foundation, Inc.,                                       *
- *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
- ***************************************************************************/
-#include <stdlib.h>
-#include <ctype.h>
-#include <math.h>
-#include <string.h>
-#include <zlib.h>
-#ifdef HAVE_HDF5
-#include <hdf5.h>
-#endif
-#ifdef HAVE_HDF4
-#define intf hdf4_intf
-#include <hdf/mfhdf.h>
-#undef intf
-#endif
-
-#ifndef WIN32
-#include <glob.h>
-#endif
-
-#include "mgl/mgl_eval.h"
-#include "mgl/mgl_data.h"
-
-//#define isn(ch)		((ch)<' ' && (ch)!='\t')
-#define isn(ch)		((ch)=='\n')
-//-----------------------------------------------------------------------------
-void mglData::Set(const char *v,int NX,int NY,int NZ)
-{
-	if(NX<1 || NY <1 || NZ<1)	return;
-	register int i,j=0,m=NX*NY*NZ;
-	mreal *b = new mreal[m];	memset(b,0,m*sizeof(mreal));
-	for(i=0;i<m;i++)
-	{
-		while(isspace(v[j]) && v[j])	j++;
-		if(v[j]==0)	break;
-		b[i] = atof(v+j);
-		while(!isspace(v[j])&& v[j])	j++;
-	}
-	delete []a;
-	a=b;	nx=NX;	ny=NY;	nz=NZ;	NewId();
-}
-//-----------------------------------------------------------------------------
-void mglData::Set(gsl_vector *v)
-{
-#ifndef NO_GSL
-	if(!v || v->size<1)	return;
-	Create(v->size);
-	for(long i=0;i<nx;i++)	a[i] = v->data[i*v->stride];
-#endif
-}
-//-----------------------------------------------------------------------------
-void mglData::Set(gsl_matrix *m)
-{
-#ifndef NO_GSL
-	if(!m || m->size1<1 || m->size2<1)	return;
-	Create(m->size1,m->size2);
-	register long i,j;
-	for(i=0;i<nx;i++)	for(j=0;j<ny;j++)
-		a[i+j*nx] = m->data[i * m->tda + j];
-#endif
-}
-//-----------------------------------------------------------------------------
-void mglData::Set(const float *A,int NX,int NY,int NZ)
-{
-	if(NX<=0 || NY<=0 || NZ<=0)	return;
-	Create(NX,NY,NZ);
-#if(MGL_USE_DOUBLE==1)
-	for(long i=0;i<NX*NY*NZ;i++)	a[i] = A[i];
-#else
-	memcpy(a,A,NX*NY*NZ*sizeof(float));
-#endif
-}
-//-----------------------------------------------------------------------------
-void mglData::Set(const double *A,int NX,int NY,int NZ)
-{
-	if(NX<=0 || NY<=0 || NZ<=0)	return;
-	Create(NX,NY,NZ);
-#if(MGL_USE_DOUBLE==1)
-	memcpy(a,A,NX*NY*NZ*sizeof(double));
-#else
-	for(long i=0;i<NX*NY*NZ;i++)	a[i] = A[i];
-#endif
-}
-//-----------------------------------------------------------------------------
-void mglData::Set(const float **A,int N1,int N2)
-{
-	if(N1<=0 || N2<=0)	return;
-	Create(N2,N1);
-#if(MGL_USE_DOUBLE==1)
-	for(long i=0;i<N1;i++)	for(long j=0;j<N2;j++)	a[j+i*N2] = A[i][j];
-#else
-	for(long i=0;i<N1;i++)
-		memcpy(a+i*N2,A[i],N2*sizeof(float));
-#endif
-}
-//-----------------------------------------------------------------------------
-void mglData::Set(const double **A,int N1,int N2)
-{
-	if(N1<=0 || N2<=0)	return;
-	Create(N2,N1);
-#if(MGL_USE_DOUBLE==1)
-	for(long i=0;i<N1;i++)
-		memcpy(a+i*N2,A[i],N2*sizeof(double));
-#else
-	for(long i=0;i<N1;i++)	for(long j=0;j<N2;j++)	a[j+i*N2] = A[i][j];
-#endif
-}
-//-----------------------------------------------------------------------------
-void mglData::Set(const float ***A,int N1,int N2,int N3)
-{
-	if(N1<=0 || N2<=0 || N3<=0)	return;
-	Create(N3,N2,N1);
-#if(MGL_USE_DOUBLE==1)
-	for(long i=0;i<N1;i++)	for(long j=0;j<N2;j++)	for(long k=0;k<N3;k++)
-		a[k+N3*(j+i*N2)] = A[i][j][k];
-#else
-	for(long i=0;i<N1;i++)	for(long j=0;j<N2;j++)
-		memcpy(a+N3*(j+i*N2),A[i][j],N3*sizeof(float));
-#endif
-}
-//-----------------------------------------------------------------------------
-void mglData::Set(const double ***A,int N1,int N2,int N3)
-{
-	if(N1<=0 || N2<=0 || N3<=0)	return;
-	Create(N3,N2,N1);
-#if(MGL_USE_DOUBLE==1)
-	for(long i=0;i<N1;i++)	for(long j=0;j<N2;j++)
-		memcpy(a+N3*(j+i*N2),A[i][j],N3*sizeof(double));
-#else
-	for(long i=0;i<N1;i++)	for(long j=0;j<N2;j++)	for(long k=0;k<N3;k++)
-		a[k+N3*(j+i*N2)] = A[i][j][k];
-#endif
-}
-//-----------------------------------------------------------------------------
-mglData mglData::Trace() const
-{
-	mglData r(nx);
-	register long i;
-	if(ny>=nx && nz>=nx)	for(i=0;i<nx;i++)	r.a[i] = a[i+nx*(i+ny*i)];
-	else if(ny>=nx)		for(i=0;i<nx;i++)	r.a[i] = a[i+nx*i];
-	else	memcpy(r.a,a,nx*sizeof(mreal));
-	return r;
-}
-//-----------------------------------------------------------------------------
-mglData mglData::SubData(const mglData &xx, const mglData &yy, const mglData &zz) const
-{
-	long n=0,m=0,l=0,i,j,k,i0,x,y,z;
-	mglData d;
-	bool ix=false, iy=false, iz=false;
-	if(xx.nz>1)	// 3d data
-	{
-		n = xx.nx;	m = xx.ny;	l = xx.nz;
-		j = yy.nx*yy.ny*yy.nz;	if(j>1 && j!=n*m*l)	return d;	// wrong sizes
-		k = zz.nx*zz.ny*zz.nz;	if(k>1 && k!=n*m*l)	return d;	// wrong sizes
-		ix = true;	iy = j>1;	iz = k>1;
-	}
-	else if(yy.nz>1)
-	{
-		n = yy.nx;	m = yy.ny;	l = yy.nz;
-		j = xx.nx*xx.ny*xx.nz;	if(j>1 && j!=n*m*l)	return d;	// wrong sizes
-		k = zz.nx*zz.ny*zz.nz;	if(k>1 && k!=n*m*l)	return d;	// wrong sizes
-		iy = true;	ix = j>1;	iz = k>1;
-	}
-	else if(zz.nz>1)
-	{
-		n = zz.nx;	m = zz.ny;	l = zz.nz;
-		j = yy.nx*yy.ny*yy.nz;	if(j>1 && j!=n*m*l)	return d;	// wrong sizes
-		k = xx.nx*xx.ny*xx.nz;	if(k>1 && k!=n*m*l)	return d;	// wrong sizes
-		iz = true;	iy = j>1;	ix = k>1;
-	}
-	else if(xx.ny>1)	// 2d data
-	{
-		n = xx.nx;	m = xx.ny;	l = 1;
-		j = yy.nx*yy.ny;	if(j>1 && j!=n*m)	return d;	// wrong sizes
-		k = zz.nx*zz.ny;	if(k>1 && k!=n*m)	return d;	// wrong sizes
-		ix = true;	iy = j>1;	iz = k>1;
-	}
-	else if(yy.ny>1)
-	{
-		n = yy.nx;	m = yy.ny;	l = 1;
-		j = xx.nx*xx.ny;	if(j>1 && j!=n*m)	return d;	// wrong sizes
-		k = zz.nx*zz.ny;	if(k>1 && k!=n*m)	return d;	// wrong sizes
-		iy = true;	ix = j>1;	iz = k>1;
-	}
-	else if(zz.ny>1)
-	{
-		n = zz.nx;	m = zz.ny;	l = 1;
-		j = yy.nx*yy.ny;	if(j>1 && j!=n*m)	return d;	// wrong sizes
-		k = xx.nx*xx.ny;	if(k>1 && k!=n*m)	return d;	// wrong sizes
-		iz = true;	iy = j>1;	ix = k>1;
-	}
-	if(n*m*l>1)	// this is 2d or 3d data
-	{
-		d.Create(n,m,l);
-		for(i0=0;i0<n*m*l;i0++)
-		{
-			i = int((ix?xx.a[i0]:xx.a[0])+0.5);	if(i<0)i=0;	if(i>=nx)i=nx-1;
-			j = int((iy?yy.a[i0]:yy.a[0])+0.5);	if(j<0)j=0;	if(j>=ny)j=ny-1;
-			k = int((iz?zz.a[i0]:zz.a[0])+0.5);	if(k<0)k=0;	if(k>=nz)k=nz-1;
-			d.a[i0] = a[i+nx*(j+ny*k)];
-		}
-		return d;
-	}
-	// this is 1d data -> try as normal SubData()
-	if(xx.nx>1 || xx.a[0]>=0)	{	n=xx.nx;	ix=true;	}
-	else	{	n=nx;	ix=false;	}
-	if(yy.nx>1 || yy.a[0]>=0)	{	m=yy.nx;	iy=true;	}
-	else	{	m=ny;	iy=false;	}
-	if(zz.nx>1 || zz.a[0]>=0)	{	l=zz.nx;	iz=true;	}
-	else	{	l=nz;	iz=false;	}
-	d.Create(n,m,l);
-	for(i=0;i<n;i++)	for(j=0;j<m;j++)	for(k=0;k<l;k++)
-	{
-		x = ix?int(xx.a[i]+0.5):i;	if(x<0)x=0;	if(x>=nx)x=nx-1;
-		y = iy?int(yy.a[j]+0.5):j;	if(y<0)y=0;	if(y>=ny)y=ny-1;
-		z = iz?int(zz.a[k]+0.5):k;	if(z<0)z=0;	if(z>=nz)z=nz-1;
-		d.a[i+n*(j+m*k)] = a[x+nx*(y+ny*z)];
-	}
-	if(m==1)	{	d.ny=d.nz;	d.nz=1;	}// "squeeze" dimensions
-	if(n==1)	{	d.nx=d.ny;	d.ny=d.nz;	d.nz=1;	d.NewId();}
-	return d;
-}
-//-----------------------------------------------------------------------------
-mglData mglData::SubData(int xx,int yy,int zz) const
-{
-	mglData x,y,z;
-	x.a[0]=xx;	y.a[0]=yy;	z.a[0]=zz;
-	return SubData(x,y,z);
-}
-//-----------------------------------------------------------------------------
-mglData mglData::Column(const char *eq)
-{
-	mglFormula f(eq);
-	mglData d;
-	d.Create(ny,nz);
-	mreal var[MGL_VS];
-	memset(var,0,('z'-'a')*sizeof(mreal));
-	register long i,j;
-	for(i=0;i<ny*nz;i++)
-	{
-		for(j=0;j<nx;j++)
-			if(id[j]>='a' && id[j]<='z')
-				var[id[j]-'a'] = a[j+nx*i];
-		d.a[i] = f.Calc(var);
-	}
-	return d;
-}
-//-----------------------------------------------------------------------------
-void mglData::SetColumnId(const char *ids)
-{
-	NewId();	// clearing + be sure about correct length
-	if(ids)	for(long i=0;i<nx && ids[i]!=0;i++)	id[i]=ids[i];
-}
-//-----------------------------------------------------------------------------
-void mglData::Save(const char *fname,int ns) const
-{
-	FILE *fp;
-	fp = fopen(fname,"w");
-	if(ns<0 || (ns>=nz && nz>1))	for(long k=0;k<nz;k++)
-	{	// ñîõðàíÿåì âñå äàííûå
-		for(long i=0;i<ny;i++)
-		{
-			for(long j=0;j<nx;j++)
-				fprintf(fp,"%g\t",a[j+nx*(i+ny*k)]);
-			fprintf(fp,"\n");
-		}
-		fprintf(fp,"\n");
-	}
-	else
-	{	// ñîõðàíÿåì òîëüêî ñðåç
-		if(nz>1)		// äëÿ 3D -- ïëîñêîñòü
-		{
-			for(long i=0;i<ny;i++)
-			{
-				for(long j=0;j<nx;j++)
-					fprintf(fp,"%g\t",a[j+nx*(i+ny*ns)]);
-				fprintf(fp,"\n");
-			}
-		}
-		else if(ns<ny)	// äëÿ 2D -- ëèíèÿ
-		{
-			for(long j=0;j<nx;j++)
-				fprintf(fp,"%g\t",a[j+nx*ns]);
-		}
-	}
-	fclose(fp);
-}
-//-----------------------------------------------------------------------------
-char *mgl_read_gz(gzFile fp)
-{
-	long size=1024,n=0,m;
-	char *buf=(char*)malloc(size);
-	while((m=gzread(fp,buf+size*n,size))>0)
-	{
-		if(m<size)	{	buf[size*n+m]=0;	break;	}
-		n++;		buf=(char*)realloc(buf,size*(n+1));
-	}
-	return buf;
-}
-//-----------------------------------------------------------------------------
-bool mglData::Read(const char *fname)
-{
-	long l=1,m=1,k=1;
-	long nb,i;
-	gzFile fp = gzopen(fname,"r");
-	if(!fp)
-	{
-		if(!a)	Create(1,1,1);
-		return	false;
-	}
-	char *buf = mgl_read_gz(fp);
-	nb = strlen(buf);	gzclose(fp);
-
-	bool first=false,com=false;
-	register char ch;
-	for(i=nb-1;i>=0;i--)	if(buf[i]>' ')	break;
-	buf[i+1]=0;	nb = i;		// remove tailing spaces
-	for(i=0;i<nb-1 && !isn(buf[i]);i++)	// determine nx
-	{
-		if(buf[i]=='#')		while(!isn(buf[i]) && i<nb)	i++;
-		ch = buf[i];
-		if(ch>' ' && !first)	first=true;
-		if(first && (ch==' ' || ch=='\t') && buf[i+1]>' ') k++;
-	}
-	first = false;
-	for(i=0;i<nb-1;i++)					// determine ny
-	{
-		ch = buf[i];
-		if(ch=='#')	while(!isn(buf[i]) && i<nb)	i++;
-		if(isn(ch))
-		{
-			if(isn(buf[i+1]))	{first=true;	break;	}
-			m++;
-		}
-		if(ch=='\f')	break;
-	}
-	if(first)	for(i=0;i<nb-1;i++)		// determine nz
-	{
-		ch = buf[i];
-		if(ch=='#')	com = true;	// comment
-		if(isn(ch))
-		{
-			if(com)	{	com=false;	continue;	}
-			if(isn(buf[i+1]))	l++;
-		}
-	}
-	else	for(i=0;i<nb-1;i++)	if(buf[i]=='\f')	l++;
-	free(buf);
-	return Read(fname,k,m,l);
-}
-//-----------------------------------------------------------------------------
-void mglData::Create(int mx,int my,int mz)
-{
-	nx = mx>0 ? mx:1;	ny = my>0 ? my:1;	nz = mz>0 ? mz:1;
-	if(a)	{	delete []a;	delete []id;	}
-	a = new mreal[nx*ny*nz];
-	id = new char[nx];
-	memset(a,0,nx*ny*nz*sizeof(mreal));
-	memset(id,0,nx*sizeof(char));
-}
-//-----------------------------------------------------------------------------
-bool mglData::Read(const char *fname,int mx,int my,int mz)
-{
-	if(mx<=0 || my<=0 || mz<=0)	return false;
-	gzFile fp = gzopen(fname,"r");
-	if(!fp)	return false;
-	Create(mx,my,mz);
-	char *buf = mgl_read_gz(fp);
-	long nb = strlen(buf);	gzclose(fp);
-
-	register long i=0, j=0, k=0;
-	while(j<nb)
-	{
-		while(buf[j]<=' ' && j<nb)	j++;
-		while(buf[j]=='#')		// skip comment
-		{
-			if(i>0 || buf[j+1]!='#')	// this is columns id
-				while(!isn(buf[j]) && j<nb)	j++;
-			else
-			{
-				while(!isn(buf[j]) && j<nb)
-				{
-					if(buf[j]>='a' && buf[j]<='z')
-						id[k++] = buf[j];
-					j++;
-				}
-			}
-//			while(buf[j]!='\n' && j<nb)	j++;
-			while(buf[j]<=' ' && j<nb)	j++;
-		}
-		char *s=buf+j;
-		while(buf[j]>' ' && j<nb)	j++;
-		buf[j]=0;
-		a[i] = atof(s);
-		i++;	if(i>=nx*ny*nz)	break;
-	}
-	free(buf);
-	return true;
-}
-//-----------------------------------------------------------------------------
-bool mglData::ReadMat(const char *fname,int dim)
-{
-	if(dim<=0 || dim>3)	return false;
-	gzFile fp = gzopen(fname,"r");
-	if(!fp)	return false;
-	nx = ny = nz = 1;	NewId();
-	char *buf = mgl_read_gz(fp);
-	long nb = strlen(buf);	gzclose(fp);
-
-	register long i=0,j=0;
-	while(j<nb)
-	{
-		if(buf[j]=='#')	while(!isn(buf[j]))	j++;	// skip comment
-		while(buf[j]<=' ' && j<nb)	j++;
-		break;
-	}
-	if(dim==1)
-	{
-		sscanf(buf+j,"%ld",&nx);
-		while(buf[j]>' ')	j++;
-	}
-	else if(dim==2)
-	{
-		sscanf(buf+j,"%ld%ld",&nx,&ny);
-		while(buf[j]>' ' && j<nb)	j++;
-		while(buf[j]<=' ' && j<nb)	j++;
-		while(buf[j]>' ' && j<nb)	j++;
-	}
-	else if(dim==3)
-	{
-		sscanf(buf+j,"%ld%ld%ld",&nx,&ny,&nz);
-		while(buf[j]>' ' && j<nb)	j++;
-		while(buf[j]<=' ' && j<nb)	j++;
-		while(buf[j]>' ' && j<nb)	j++;
-		while(buf[j]<=' ' && j<nb)	j++;
-		while(buf[j]>' ' && j<nb)	j++;
-	}
-	Create(nx,ny,nz);
-	while(j<nb)
-	{
-		while(buf[j]<=' ' && j<nb)	j++;
-		while(buf[j]=='#')		// skip comment
-		{
-			while(!isn(buf[j]) && j<nb)	j++;
-			while(buf[j]<=' ' && j<nb)	j++;
-		}
-		a[i] = atof(buf+j);	i++;
-		if(i>=nx*ny*nz)	break;
-		while(buf[j]>' ' && j<nb)	j++;
-	}
-	free(buf);
-	return true;
-}
-//-----------------------------------------------------------------------------
-mreal mglData::v(int i,int j,int k) const
-{
-	bool not_ok = i<0 || i>=nx || j<0 || j>=ny || k<0 || k>=nz;
-	if(not_ok)	return 0;
-	return a[i+nx*(j+ny*k)];
-}
-//-----------------------------------------------------------------------------
-mglData mglData::Resize(int mx, int my, int mz, mreal x1, mreal x2,
-	mreal y1, mreal y2, mreal z1, mreal z2) const
-{
-	register long i,j,k;
-	mglData d;
-	mx = mx<1 ? 1:mx;	my = my<1 ? 1:my;	mz = mz<1 ? 1:mz;
-	d.Create(mx,my,mz);
-	mreal dx, dy, dz;
-	dx = mx>1 ? (x2-x1)/(mx-1):0;
-	dy = my>1 ? (y2-y1)/(my-1):0;
-	dz = mz>1 ? (z2-z1)/(mz-1):0;
-	for(i=0;i<mx;i++)	for(j=0;j<my;j++)	for(k=0;k<mz;k++)
-		d.a[i+mx*(j+my*k)] = Spline1(x1+i*dx, y1+j*dy, z1+k*dz);
-	return d;
-}
-//-----------------------------------------------------------------------------
-void mglData::operator*=(const mglData &d)
-{
-	register long i,j;
-	if(d.nz==1 && d.ny==1 && nx==d.nx)
-	{
-		for(j=0;j<ny*nz;j++)	for(i=0;i<nx;i++)	a[i+nx*j] *= d.a[i];
-	}
-	else if(d.nz==1 && ny==d.ny && nx==d.nx)
-	{
-		for(j=0;j<nz;j++)	for(i=0;i<ny*nx;i++)	a[i+nx*ny*j] *= d.a[i];
-	}
-	else if(nz==d.nz && d.ny==ny && nx==d.nx)
-	{
-		for(i=0;i<ny*nz*nx;i++)		a[i] *= d.a[i];
-	}
-}
-//-----------------------------------------------------------------------------
-void mglData::operator/=(const mglData &d)
-{
-	register long i,j;
-	if(d.nz==1 && d.ny==1 && nx==d.nx)
-	{
-		for(j=0;j<ny*nz;j++)	for(i=0;i<nx;i++)
-			a[i+nx*j] = d.a[i] ? a[i+nx*j]/d.a[i] : 0;
-	}
-	else if(d.nz==1 && ny==d.ny && nx==d.nx)
-	{
-		for(j=0;j<nz;j++)	for(i=0;i<ny*nx;i++)
-			a[i+nx*ny*j] = d.a[i] ? a[i+nx*ny*j]/d.a[i] : 0;
-	}
-	else if(nz==d.nz && d.ny==ny && nx==d.nx)
-	{
-		for(i=0;i<ny*nz*nx;i++)
-			a[i] = d.a[i] ? a[i]/d.a[i] : 0;
-	}
-}
-//-----------------------------------------------------------------------------
-void mglData::operator+=(const mglData &d)
-{
-	register long i,j;
-	if(d.nz==1 && d.ny==1 && nx==d.nx)
-	{
-		for(j=0;j<ny*nz;j++)	for(i=0;i<nx;i++)
-			a[i+nx*j] += d.a[i];
-	}
-	else if(d.nz==1 && ny==d.ny && nx==d.nx)
-	{
-		for(j=0;j<nz;j++)	for(i=0;i<ny*nx;i++)
-			a[i+nx*ny*j] += d.a[i];
-	}
-	else if(nz==d.nz && d.ny==ny && nx==d.nx)
-	{
-		for(i=0;i<ny*nz*nx;i++)
-			a[i] += d.a[i];
-	}
-}
-//-----------------------------------------------------------------------------
-void mglData::operator-=(const mglData &d)
-{
-	register long i,j;
-	if(d.nz==1 && d.ny==1 && nx==d.nx)
-	{
-		for(j=0;j<ny*nz;j++)	for(i=0;i<nx;i++)
-			a[i+nx*j] -= d.a[i];
-	}
-	else if(d.nz==1 && ny==d.ny && nx==d.nx)
-	{
-		for(j=0;j<nz;j++)	for(i=0;i<ny*nx;i++)
-			a[i+nx*ny*j] -= d.a[i];
-	}
-	else if(nz==d.nz && d.ny==ny && nx==d.nx)
-	{
-		for(i=0;i<ny*nz*nx;i++)
-			a[i] -= d.a[i];
-	}
-}
-//-----------------------------------------------------------------------------
-void mglData::operator-=(mreal d)
-{
-	for(long i=0;i<ny*nz*nx;i++)	a[i] -= d;
-}
-//-----------------------------------------------------------------------------
-void mglData::operator+=(mreal d)
-{
-	for(long i=0;i<ny*nz*nx;i++)	a[i] += d;
-}
-//-----------------------------------------------------------------------------
-void mglData::operator*=(mreal d)
-{
-	for(long i=0;i<ny*nz*nx;i++)	a[i] *= d;
-}
-//-----------------------------------------------------------------------------
-void mglData::operator/=(mreal d)
-{
-	for(long i=0;i<ny*nz*nx;i++)	a[i] = d ? a[i]/d : 0;
-}
-//-----------------------------------------------------------------------------
-mreal mglData::Maximal() const
-{
-	register mreal m=-1e10;
-	for(long i=0;i<nx*ny*nz;i++)
-		m = m>a[i] ? m : a[i];
-	return m;
-}
-//-----------------------------------------------------------------------------
-mreal mglData::Minimal() const
-{
-	register mreal m=1e10;
-	for(long i=0;i<nx*ny*nz;i++)
-		m = m<a[i] ? m : a[i];
-	return m;
-}
-//-----------------------------------------------------------------------------
-mreal mglData::Maximal(int &im,int &jm,int &km) const
-{
-	register mreal m=-1e10;
-	for(long i=0;i<nx*ny*nz;i++)
-		if(!isnan(a[i]) && m<a[i])
-		{	m=a[i];	im=i%nx;	jm=(i/nx)%ny;	km=i/(nx*ny);   }
-	return m;
-}
-//-----------------------------------------------------------------------------
-mreal mglData::Minimal(int &im,int &jm,int &km) const
-{
-	register mreal m=1e10;
-	for(long i=0;i<nx*ny*nz;i++)
-		if(!isnan(a[i]) && m>a[i])
-		{	m=a[i];	im=i%nx;	jm=(i/nx)%ny;	km=i/(nx*ny);   }
-	return m;
-}
-//-----------------------------------------------------------------------------
-mreal mglData::Maximal(mreal &x,mreal &y,mreal &z) const
-{
-	int im=-1,jm=-1,km=-1;
-	register long tm,i;
-	mreal m=Maximal(im,jm,km);
-	x=im;	y=jm;	z=km;
-
-	if(nx>2)
-	{
-		if(im==0)	im=1;
-		if(im==nx-1)im=nx-2;
-		x = (a[im+1]+a[im-1]-2*a[im])==0 ? im : im+(a[im+1]-a[im-1])/(a[im+1]+a[im-1]-2*a[im])/2;
-	}
-	if(ny>2)
-	{
-		if(jm==0)	jm=1;
-		if(jm==ny-1)jm=ny-2;
-		i=nx;		tm = jm*nx;
-		y = (a[tm+i]+a[tm-i]-2*a[tm])==0? jm : jm+(a[tm+i]-a[tm-i])/(a[tm+i]+a[tm-i]-2*a[tm])/2;
-	}
-	if(nz>2)
-	{
-		if(km==0)	km=1;
-		if(km==nz-1)km=nz-2;
-		i=nx*ny;	tm = km*i;
-		z = (a[tm+i]+a[tm-i]-2*a[tm])==0? km : km+(a[tm+i]-a[tm-i])/(a[tm+i]+a[tm-i]-2*a[tm])/2;
-	}
-	return m;
-}
-//-----------------------------------------------------------------------------
-mreal mglData::Minimal(mreal &x,mreal &y,mreal &z) const
-{
-	int im=-1,jm=-1,km=-1;
-	register long tm,i;
-	mreal m=Minimal(im,jm,km);
-	x=im;	y=jm;	z=km;
-	if(nx>2)
-	{
-		if(im==0)	im=1;
-		if(im==nx-1)im=nx-2;
-		x = im+(a[im+1]-a[im-1])/(a[im+1]+a[im-1]-2*a[im])/2;
-	}
-	if(ny>2)
-	{
-		if(jm==0)	jm=1;
-		if(jm==ny-1)jm=ny-2;
-		i=nx;		tm = jm*nx;
-		y = jm+(a[tm+i]-a[tm-i])/(a[tm+i]+a[tm-i]-2*a[tm])/2;
-	}
-	if(nz>2)
-	{
-		if(km==0)	km=1;
-		if(km==nz-1)km=nz-2;
-		i=nx*ny;	tm = km*i;
-		z = km+(a[tm+i]-a[tm-i])/(a[tm+i]+a[tm-i]-2*a[tm])/2;
-	}
-	return m;
-}
-//-----------------------------------------------------------------------------
-void mglData::Modify(const char *eq,int dim)
-{
-	long i,j,k;
-	mreal y,z,dx=nx>1?1/(nx-1.):0,dy=ny>1?1/(ny-1.):0, *aa;
-	mglFormula eqs(eq);
-	if(dim<0)	dim=0;
-	if(nz>1)	// 3D array
-	{
-		for(k=dim;k<nz;k++)
-		{
-			z = (nz>dim+1) ? (k-dim)/(nz-dim-1.) : 0;
-			aa = a+nx*ny*k;
-//#pragma omp parallel for
-			for(i=0;i<nx*ny;i++)
-				aa[i] = eqs.Calc(dx*(i%nx),dy*(i/nx),z,aa[i]);
-		}
-	}
-	else		// 2D or 1D array
-	{
-		if(ny==1)	dim = 0;
-		dy = ny>dim+1 ? 1/(ny-dim-1.) : 0;
-		for(j=dim;j<ny;j++)
-		{
-			y = dy*(j-dim);		aa = a+nx*j;
-//#pragma omp parallel for
-			for(i=0;i<nx;i++)	aa[i] = eqs.Calc(dx*i,y,0,aa[i]);
-		}
-	}
-}
-//-----------------------------------------------------------------------------
-void mglData::Fill(mreal x1,mreal x2,char dir)
-{
-	long i,j,k;
-	register mreal x;
-	if(isnan(x2))	x2=x1;
-	if(dir<'x' || dir>'z')	dir='x';
-	for(k=0;k<nz;k++)	for(j=0;j<ny;j++)	for(i=0;i<nx;i++)
-	{
-		x = nx>1 ? i/(nx-1.):0;
-		if(dir=='y')	x = ny>1 ? j/(ny-1.):0;
-		if(dir=='z')	x = nz>1 ? k/(nz-1.):0;
-		a[i+nx*(j+ny*k)] = x1+(x2-x1)*x;
-	}
-}
-//-----------------------------------------------------------------------------
-void mglData::Norm(mreal v1,mreal v2,bool sym,int dim)
-{
-	long i,s,nn=nx*ny*nz;
-	mreal a1=1e20,a2=-1e20,v;
-	if(nz>1)	s = dim*nx*ny;
-	else		s = dim*ny;
-	for(i=s;i<nn;i++)	// determines borders of existing data
-	{
-		if(isnan(a[i]))	continue;
-		a1 = (a1<a[i] ? a1 : a[i]);	a2 = (a2>a[i] ? a2 : a[i]);
-	}
-	if(a1==a2)  {  if(a1!=0)	a1=0.;  else a2=1;  }
-	if(v1>v2)	{	v=v1;	v1=v2;	v2=v;	}	// swap if uncorrect
-	if(sym)				// use symmetric
-	{
-		v2 = -v1>v2 ? -v1:v2;	v1 = -v2;
-		a2 = -a1>a2 ? -a1:a2;	a1 = -a2;
-	}
-	for(i=s;i<nn;i++)	// normalize
-	{
-		a[i] = v1 + (v2-v1)*(a[i]-a1)/(a2-a1);
-	}
-
-}
-//-----------------------------------------------------------------------------
-void mglData::Squeeze(int rx,int ry,int rz,bool smooth)
-{
-	long kx,ky,kz,i,j,k;
-	mreal *b;
-
-	// simple checking
-	if(rx>=nx)	rx=nx-1;	if(rx<1)	rx=1;
-	if(ry>=ny)	ry=ny-1;	if(ry<1)	ry=1;
-	if(rz>=nz)	rz=nz-1;	if(rz<1)	rz=1;
-	// new sizes
-	kx = 1+(nx-1)/rx;	ky = 1+(ny-1)/ry;	kz = 1+(nz-1)/rz;
-	b = new mreal[kx*ky*kz];
-	if(!smooth)	for(i=0;i<kx;i++)  for(j=0;j<ky;j++)  for(k=0;k<kz;k++)
-		b[i+kx*(j+ky*k)] = a[i*rx+nx*(j*ry+ny*rz*k)];
-	else		for(i=0;i<kx;i++)  for(j=0;j<ky;j++)  for(k=0;k<kz;k++)
-	{
-		long dx,dy,dz,i1,j1,k1;
-		dx = (i+1)*rx<=nx ? rx : nx-i*rx;
-		dy = (j+1)*ry<=ny ? ry : ny-j*ry;
-		dz = (k+1)*rz<=nz ? rz : nz-k*rz;
-		mreal s = 0;
-		for(i1=i*rx;i1<i*rx+dx;i1++)	for(j1=j*ry;j1<j*ry+dz;j1++)	for(k1=k*rz;k1<k*rz+dz;k1++)
-			s += a[i1+nx*(j1+ny*k1)];
-		b[i+kx*(j+ky*k)] = s/dx*dy*dz;
-	}
-	delete []a;	a=b;
-	nx = kx;  ny = ky;  nz = kz;	NewId();
-}
-//-----------------------------------------------------------------------------
-mglData mglData::Combine(const mglData &b) const
-{
-	mglData d;
-	d.Create(1,1,1);
-	if(nz>1 || (ny>1 && b.ny>1) || b.nz>1)	return d;
-	long n1=ny,n2=b.nx;
-	bool dim2=true;
-	if(ny==1)	{	n1 = b.nx;	n2 = b.ny;	dim2 = false;	}
-	d.Create(nx,n1,n2);
-	register long i,j;
-	if(dim2)	n1=nx*ny;	else	{	n1=nx;	n2=b.nx*b.ny;	}
-	for(i=0;i<n1;i++)	for(j=0;j<n2;j++)	d.a[i+n1*j] = a[i]*b.a[j];
-	return d;
-}
-//-----------------------------------------------------------------------------
-void mglData::Extend(int n1, int n2)
-{
-	if(nz>2 || n1==0)	return;
-	long mx,my,mz;
-	mreal *b=0;
-	register long i,j;
-	if(n1>0) // extend to higher dimension(s)
-	{
-		n2 = n2>0 ? n2:1;
-		mx = nx;	my = ny>1?ny:n1;	mz = ny>1 ? n1 : n2;
-		b = new mreal[mx*my*mz];
-		if(ny>1)	for(i=0;i<n1;i++)
-			memcpy(b+i*nx*ny, a, nx*ny*sizeof(mreal));
-		else		for(i=0;i<n1*n2;i++)
-			memcpy(b+i*nx, a, nx*sizeof(mreal));
-	}
-	else
-	{
-		mx = -n1;	my = n2<0 ? -n2 : nx;	mz = n2<0 ? nx : ny;
-		if(n2>0 && ny==1)	mz = n2;
-		b = new mreal[mx*my*mz];
-		if(n2<0)	for(i=0;i<mx*my;i++)	for(j=0;j<nx;j++)
-			b[i+mx*my*j] = a[j];
-		else		for(i=0;i<mx;i++)		for(j=0;j<nx*ny;j++)
-			b[i+mx*j] = a[j];
-		if(n2>0 && ny==1)	for(i=0;i<n2;i++)
-			memcpy(b+i*mx*my, a, mx*my*sizeof(mreal));
-	}
-	if(b)	{	delete []a;	a=b;	nx=mx;	ny=my;	nz=mz;	NewId();	}
-}
-//-----------------------------------------------------------------------------
-void mglData::Transpose(const char *dim)
-{
-	mreal *b=new mreal[nx*ny*nz];
-	register long i,j,k,n;
-	if(!strcmp(dim,"xyz"))	memcpy(b,a,nx*ny*nz*sizeof(mreal));
-	else if(!strcmp(dim,"xzy") || !strcmp(dim,"zy"))
-	{
-		for(i=0;i<nx;i++)	for(j=0;j<ny;j++)	for(k=0;k<nz;k++)
-			b[i+nx*(k+nz*j)] = a[i+nx*(j+ny*k)];
-		n=nz;	nz=ny;	ny=n;
-	}
-	else if(!strcmp(dim,"yxz") || !strcmp(dim,"yx"))
-	{
-		for(i=0;i<nx;i++)	for(j=0;j<ny;j++)	for(k=0;k<nz;k++)
-			b[j+ny*(i+nx*k)] = a[i+nx*(j+ny*k)];
-		n=nx;	nx=ny;	ny=n;	NewId();
-	}
-	else if(!strcmp(dim,"yzx"))
-	{
-		for(i=0;i<nx;i++)	for(j=0;j<ny;j++)	for(k=0;k<nz;k++)
-			b[j+ny*(k+nz*i)] = a[i+nx*(j+ny*k)];
-		n=nx;	nx=ny;	ny=nz;	nz=n;	NewId();
-	}
-	else if(!strcmp(dim,"zxy"))
-	{
-		for(i=0;i<nx;i++)	for(j=0;j<ny;j++)	for(k=0;k<nz;k++)
-			b[k+nz*(i+nx*j)] = a[i+nx*(j+ny*k)];
-		n=nx;	nx=nz;	nz=ny;	ny=n;	NewId();
-	}
-	else if(!strcmp(dim,"zyx") || !strcmp(dim,"zx"))
-	{
-		for(i=0;i<nx;i++)	for(j=0;j<ny;j++)	for(k=0;k<nz;k++)
-			b[k+nz*(j+ny*i)] = a[i+nx*(j+ny*k)];
-		n=nz;	nz=nx;	nx=n;	NewId();
-	}
-	delete []a;		a = b;
-}
-//-----------------------------------------------------------------------------
-void mglData::Modify(const char *eq, const mglData &v, const mglData &w)
-{
-	if(v.nx*v.ny*v.nz!=nx*ny*nz || w.nx*w.ny*w.nz!=nx*ny*nz)
-		return;
-	long i,j,k,i0;
-	mreal x,y,z,dx=nx>1?1/(nx-1.):0,dy=ny>1?1/(ny-1.):0,dz=nz>1?1/(nz-1.):0;
-	mglFormula eqs(eq);
-	for(k=0;k<nz;k++)	for(j=0;j<ny;j++)	for(i=0;i<nx;i++)
-	{
-		x = dx*i;	y = dy*j;	z = dz*k;
-		i0 = i+nx*(j+ny*k);
-		a[i0] = eqs.Calc(x,y,z,a[i0],v.a[i0],w.a[i0]);
-	}
-}
-//-----------------------------------------------------------------------------
-void mglData::Modify(const char *eq, const mglData &v)
-{
-	if(v.nx*v.ny*v.nz!=nx*ny*nz)	return;
-	long i,j,k,i0;
-	mreal x,y,z,dx=nx>1?1/(nx-1.):0,dy=ny>1?1/(ny-1.):0,dz=nz>1?1/(nz-1.):0;
-	mglFormula eqs(eq);
-	for(k=0;k<nz;k++)	for(j=0;j<ny;j++)	for(i=0;i<nx;i++)
-	{
-		x = dx*i;	y = dy*j;	z = dz*k;
-		i0 = i+nx*(j+ny*k);
-		a[i0] = eqs.Calc(x,y,z,a[i0],v.a[i0],0);
-	}
-}
-//-----------------------------------------------------------------------------
-void mglData::Fill(const char *eq, mglPoint r1, mglPoint r2, const mglData *v, const mglData *w)
-{
-	if(v && v->nx*v->ny*v->nz!=nx*ny*nz)	return;
-	if(w && w->nx*w->ny*w->nz!=nx*ny*nz)	return;
-	long i,j,k,i0;
-	mreal x,y,z,dx=nx>1?(r2.x-r1.x)/(nx-1.):0;
-	mreal dy=ny>1?(r2.y-r1.y)/(ny-1.):0;
-	mreal dz=nz>1?(r2.z-r1.z)/(nz-1.):0;
-	mglFormula eqs(eq);
-	for(k=0;k<nz;k++)	for(j=0;j<ny;j++)	for(i=0;i<nx;i++)
-	{
-		x = r1.x+dx*i;	y = r1.y+dy*j;	z = r1.z+dz*k;
-		i0 = i+nx*(j+ny*k);
-		a[i0] = eqs.Calc(x,y,z,a[i0], v?v->a[i0]:0, w?w->a[i0]:0);
-	}
-}
-//-----------------------------------------------------------------------------
-void mglData::ReadHDF4(const char *fname,const char *data)
-{
-#ifdef HAVE_HDF4
-	int sd = SDstart(fname,DFACC_READ), nn, i;
-	if(sd==-1)	return;	// is not a HDF4 file
-	char name[64];
-	SDfileinfo(sd,&nn,&i);
-	for(i=0;i<nn;i++)
-	{
-		int sds, rank, dims[32], type, attr, in[2]={0,0};
-		sds = SDselect(sd,i);
-		SDgetinfo(sds,name,&rank,dims,&type,&attr);
-		if(!strcmp(name,data))	// as I understand there are possible many datas with the same name
-		{
-			if(rank==1)			Create(dims[0]);
-			else if(rank==2)	Create(dims[1],dims[0]);
-			else if(rank==3)	Create(dims[3],dims[1],dims[0]);
-			else	continue;
-			if(type==DFNT_FLOAT32)
-			{
-				float *b = new float[nx*ny*nz];
-				SDreaddata(sds,in,0,dims,b);
-				for(long j=0;j<nx*ny*nz;j++)	a[j]=b[j];
-				delete []b;
-			}
-			if(type==DFNT_FLOAT64)
-			{
-				double *b = new double[nx*ny*nz];
-				SDreaddata(sds,in,0,dims,b);
-				for(long j=0;j<nx*ny*nz;j++)	a[j]=b[j];
-				delete []b;
-			}
-		}
-		SDendaccess(sds);
-	}
-	SDend(sd);
-#endif
-}
-//-----------------------------------------------------------------------------
-#ifdef HAVE_HDF5
-void mglData::SaveHDF(const char *fname,const char *data,bool rewrite) const
-{
-	hid_t hf,hd,hs;
-	hsize_t dims[3];
-	long rank = 3, res;
-#ifndef H5_USE_16_API
-	H5Eset_auto(H5E_DEFAULT,0,0);
-#else
-	H5Eset_auto(0,0);
-#endif
-	res=H5Fis_hdf5(fname);
-	if(res>0 && !rewrite)	hf = H5Fopen(fname, H5F_ACC_RDWR, H5P_DEFAULT);
-	else	hf = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
-	if(hf<0)	return;
-	if(nz==1 && ny == 1)	{	rank = 1;	dims[0] = nx;	}
-	else if(nz==1)	{	rank = 2;	dims[0] = ny;	dims[1] = nx;	}
-	else	{	rank = 3;	dims[0] = nz;	dims[1] = ny;	dims[2] = nx;	}
-	hs = H5Screate_simple(rank, dims, 0);
-#if(MGL_USE_DOUBLE==1)
-#ifndef H5_USE_16_API
-	hd = H5Dcreate(hf, data, H5T_NATIVE_DOUBLE, hs, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
-#else  /* ! HAVE_HDF5_18 */
-	hd = H5Dcreate(hf, data, H5T_NATIVE_DOUBLE, hs, H5P_DEFAULT);
-#endif /* HAVE_HDF5_18 */
-	H5Dwrite(hd, H5T_NATIVE_DOUBLE, hs, hs, H5P_DEFAULT, a);
-#else
-#ifndef H5_USE_16_API
-	hd = H5Dcreate(hf, data, H5T_NATIVE_FLOAT, hs, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
-#else  /* ! HAVE_HDF5_18 */
-	hd = H5Dcreate(hf, data, H5T_NATIVE_FLOAT, hs, H5P_DEFAULT);
-#endif /* HAVE_HDF5_18 */
-	H5Dwrite(hd, H5T_NATIVE_FLOAT, hs, hs, H5P_DEFAULT, a);
-#endif
-	H5Dclose(hd);	H5Sclose(hs);	H5Fclose(hf);
-}
-//-----------------------------------------------------------------------------
-void mglData::ReadHDF(const char *fname,const char *data)
-{
-	hid_t hf,hd,hs;
-	hsize_t dims[3];
-	long rank, res = H5Fis_hdf5(fname);
-	if(res<=0)	{	ReadHDF4(fname,data);	return;	}
-	hf = H5Fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT);	if(hf<0)	return;
-#ifndef H5_USE_16_API
-	hd = H5Dopen(hf,data,H5P_DEFAULT);
-#else
-	hd = H5Dopen(hf,data);
-#endif
-	if(hd<0)	return;
-	hs = H5Dget_space(hd);
-	rank = H5Sget_simple_extent_ndims(hs);
-	if(rank>0 && rank<=3)
-	{
-		H5Sget_simple_extent_dims(hs,dims,0);
-		nx = ny = nz = 1;
-		switch(rank)
-		{
-		case 1:	nx = dims[0];	break;
-		case 2:	nx = dims[1];	ny = dims[0];	break;
-		case 3:	nx = dims[2];	ny = dims[1];	nz = dims[0];	break;
-		}
-		delete []a;		a = new mreal[nx*ny*nz];	NewId();
-#if(MGL_USE_DOUBLE==1)
-		H5Dread(hd, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, a);
-#else
-		H5Dread(hd, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, a);
-#endif
-	}
-	H5Dclose(hd);	H5Sclose(hs);	H5Fclose(hf);
-}
-#else
-void mglData::SaveHDF(const char *,const char *,bool ) const {}
-void mglData::ReadHDF(const char *,const char *)	{}
-#endif
-//-----------------------------------------------------------------------------
-bool mgl_add_file(long &kx,long &ky, long &kz, mreal *&b, mglData &d,bool as_slice)
-{
-	if(as_slice && d.nz==1)
-	{
-		if(kx==d.nx && d.ny==1)
-		{
-			b = (mreal *)realloc(b,kx*(ky+1)*sizeof(mreal));
-			memcpy(b+kx*ky,d.a,kx*sizeof(mreal));		ky++;
-		}
-		else if(kx==d.nx && ky==d.ny)
-		{
-			b = (mreal *)realloc(b,kx*ky*(kz+1)*sizeof(mreal));
-			memcpy(b+kx*ky*kz,d.a,kx*ky*sizeof(mreal));	kz++;
-		}
-		else	return false;
-	}
-	else
-	{
-		if(d.ny*d.nz==1 && ky*kz==1)
-		{
-			b = (mreal *)realloc(b,(kx+d.nx)*sizeof(mreal));
-			memcpy(b+kx,d.a,d.nx*sizeof(mreal));	kx+=d.nx;
-		}
-		else if(kx==d.nx && kz==1 && d.nz==1)
-		{
-			b = (mreal *)realloc(b,kx*(ky+d.ny)*sizeof(mreal));
-			memcpy(b+kx*ky,d.a,kx*d.ny*sizeof(mreal));	ky+=d.ny;
-		}
-		else if(kx==d.nx && ky==d.ny)
-		{
-			b = (mreal *)realloc(b,kx*kx*(kz+d.nz)*sizeof(mreal));
-			memcpy(b+kx*ky*kz,d.a,kx*ky*d.nz*sizeof(mreal));	kz+=d.nz;
-		}
-		else	return false;
-	}
-	return true;
-}
-//-----------------------------------------------------------------------------
-bool mglData::ReadRange(const char *templ, mreal from, mreal to, mreal step, bool as_slice)
-{
-	mglData d;
-	mreal t = from, *b;
-	long kx,ky,kz;
-	char *fname = new char[strlen(templ)+20];
-
-	//read first file
-	do{	sprintf(fname,templ,t);	t+= step;	} while(!d.Read(fname) && t<=to);
-
-	if(t>to)	return false;
-	kx = d.nx;	ky = d.ny;	kz = d.nz;
-	b = (mreal *)malloc(kx*ky*kz*sizeof(mreal));
-	memcpy(b,d.a,kx*ky*kz*sizeof(mreal));
-
-	// read other files
-	for(;t<=to;t+=step)
-	{
-		sprintf(fname,templ,t);
-		if(d.Read(fname))
-			if(!mgl_add_file(kx,ky,kz,b,d,as_slice))
-				return false;
-	}
-	Set(b,kx,ky,kz);
-	delete []fname;		free(b);
-	return true;
-}
-//-----------------------------------------------------------------------------
-bool mglData::ReadAll(const char *templ, bool as_slice)
-{
-#ifndef WIN32
-	mglData d;
-	glob_t res;
-	unsigned long i;
-	mreal *b;
-	long kx,ky,kz;
-	char *fname = new char[256];
-	glob (templ, GLOB_TILDE, NULL, &res);
-
-	//read first file
-	for(i=0;i<res.gl_pathc;i++)
-		if(d.Read(res.gl_pathv[i]))	break;
-
-	if(i>=res.gl_pathc)	{	delete []fname;	return false;	}
-	kx = d.nx;	ky = d.ny;	kz = d.nz;
-	b = (mreal *)malloc(kx*ky*kz*sizeof(mreal));
-	memcpy(b,d.a,kx*ky*kz*sizeof(mreal));
-
-	for(;i<res.gl_pathc;i++)
-	{
-		if(d.Read(res.gl_pathv[i]))
-			if(!mgl_add_file(kx,ky,kz,b,d,as_slice))
-			{	delete []fname;		return false;	}
-	}
-	Set(b,kx,ky,kz);
-
-	globfree (&res);
-	delete []fname;		free(b);
-	return true;
-#else
-	return false;
-#endif
-}
-//-----------------------------------------------------------------------------
-mglData operator*(const mglData &b, const mglData &d)
-{	mglData a(b);	a*=d;	return a;	}
-mglData operator*(mreal b, const mglData &d)
-{	mglData a(d);	a*=b;	return a;	}
-mglData operator*(const mglData &d, mreal b)
-{	mglData a(d);	a*=b;	return a;	}
-mglData operator-(const mglData &b, const mglData &d)
-{	mglData a(b);	a-=d;	return a;	}
-mglData operator-(mreal b, const mglData &d)
-{	mglData a(d);	a-=b;	return a;	}
-mglData operator-(const mglData &d, mreal b)
-{	mglData a(d);	a-=b;	return a;	}
-mglData operator+(const mglData &b, const mglData &d)
-{	mglData a(b);	a+=d;	return a;	}
-mglData operator+(mreal b, const mglData &d)
-{	mglData a(d);	a+=b;	return a;	}
-mglData operator+(const mglData &d, mreal b)
-{	mglData a(d);	a+=b;	return a;	}
-mglData operator/(const mglData &b, const mglData &d)
-{	mglData a(b);	a/=d;	return a;	}
-mglData operator/(const mglData &d, mreal b)
-{	mglData a(d);	a/=b;	return a;	}
-void mglData::operator=(mreal v)
-{	for(long i=0;i<nx*ny*nz;i++)	a[i]=v;	}
-//-----------------------------------------------------------------------------
-void mglData::Set(const std::vector<int> &d)
-{	Create(d.size());	for(long i=0;i<nx;i++)	a[i] = d[i];	}
-void mglData::Set(const std::vector<float> &d)
-{	Create(d.size());	for(long i=0;i<nx;i++)	a[i] = d[i];	}
-void mglData::Set(const std::vector<double> &d)
-{	Create(d.size());	for(long i=0;i<nx;i++)	a[i] = d[i];	}
-//-----------------------------------------------------------------------------
-void mglData::NewId()
-{	delete []id;	id=new char[nx];	memset(id,0,nx*sizeof(char));	}
-//-----------------------------------------------------------------------------
diff --git a/.pc/texinfo-Makefile.patch/.timestamp b/.pc/texinfo-Makefile.patch/.timestamp
deleted file mode 100644
index e69de29..0000000
diff --git a/.pc/texinfo-Makefile.patch/texinfo/Makefile.am b/.pc/texinfo-Makefile.patch/texinfo/Makefile.am
deleted file mode 100644
index d35c1b3..0000000
--- a/.pc/texinfo-Makefile.patch/texinfo/Makefile.am
+++ /dev/null
@@ -1,42 +0,0 @@
-SUBDIRS				= png .
-
-CLEANFILES = mathgl_en.info mathgl_en.info-1 mathgl_en.info-2 mathgl_en.info-3 mgl_en.info \
-mathgl_ru.info mathgl_ru.info-1 mathgl_ru.info-2 mathgl_ru.info-3 mathgl_ru.info-4 mgl_ru.info
-
-MAKEINFOHTML		= texi2html
-TEXI2PDF			= texi2pdf
-
-AM_MAKEINFOHTMLFLAGS	= --split=chapter
-AM_MAKEINFOFLAGS	= --no-validate
-
-info_TEXINFOS		= mathgl_en.texi
-mathgl_en_TEXINFOS	= \
-overview_en.texi example_en.texi core_en.texi class_en.texi widget_en.texi \
-data_en.texi other_en.texi mgl_cmd_en.texi samples_en.texi appendix_en.texi fdl.texi
-
-
-info_TEXINFOS		+= mathgl_ru.texi
-mathgl_ru_TEXINFOS	= \
-overview_ru.texi example_ru.texi core_ru.texi class_ru.texi widget_ru.texi \
-data_ru.texi other_ru.texi mgl_cmd_ru.texi samples_ru.texi appendix_ru.texi fdl.texi
-
-info_TEXINFOS		+= mgl_en.texi
-mgl_en_TEXINFOS	= \
-mgl_cmd_en.texi samples_en.texi ex_mgl_en.texi concept_en.texi fdl.texi
-
-info_TEXINFOS		+= mgl_ru.texi
-mgl_ru_TEXINFOS	= \
-mgl_cmd_ru.texi samples_ru.texi ex_mgl_ru.texi concept_ru.texi fdl.texi
-
-#mglpng=$(DESTDIR)$(docdir)/png_static
-
-#install-data-local: install-html install-pdf
-install-data-local: 
-#	mkdir -p $(mglpng)
-#	cp -r $(top_srcdir)/texinfo/png_static/*.png $(mglpng)
-uninstall-local:
-#	rm -rf $(mglpng)
-
-#all-local: html pdf
-all-local: html
-	./filter.py
diff --git a/.pc/texinfo-Makefile.patch/texinfo/Makefile.in b/.pc/texinfo-Makefile.patch/texinfo/Makefile.in
deleted file mode 100644
index da79aba..0000000
--- a/.pc/texinfo-Makefile.patch/texinfo/Makefile.in
+++ /dev/null
@@ -1,1054 +0,0 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = texinfo
-DIST_COMMON = $(mathgl_en_TEXINFOS) $(mathgl_ru_TEXINFOS) \
-	$(mgl_en_TEXINFOS) $(mgl_ru_TEXINFOS) $(srcdir)/Makefile.am \
-	$(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/autotroll.m4 \
-	$(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/include/mgl/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-SOURCES =
-DIST_SOURCES =
-INFO_DEPS = mathgl_en.info mathgl_ru.info mgl_en.info mgl_ru.info
-TEXINFO_TEX = $(top_srcdir)/config/texinfo.tex
-am__TEXINFO_TEX_DIR = $(top_srcdir)/config
-DVIS = mathgl_en.dvi mathgl_ru.dvi mgl_en.dvi mgl_ru.dvi
-PDFS = mathgl_en.pdf mathgl_ru.pdf mgl_en.pdf mgl_ru.pdf
-PSS = mathgl_en.ps mathgl_ru.ps mgl_en.ps mgl_ru.ps
-HTMLS = mathgl_en.html mathgl_ru.html mgl_en.html mgl_ru.html
-TEXINFOS = mathgl_en.texi mathgl_ru.texi mgl_en.texi mgl_ru.texi
-TEXI2DVI = texi2dvi
-DVIPS = dvips
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-	html-recursive info-recursive install-data-recursive \
-	install-dvi-recursive install-exec-recursive \
-	install-html-recursive install-info-recursive \
-	install-pdf-recursive install-ps-recursive install-recursive \
-	installcheck-recursive installdirs-recursive pdf-recursive \
-	ps-recursive uninstall-recursive
-am__installdirs = "$(DESTDIR)$(infodir)"
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
-  distclean-recursive maintainer-clean-recursive
-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
-	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
-	distdir
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-am__relativize = \
-  dir0=`pwd`; \
-  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
-  sed_rest='s,^[^/]*/*,,'; \
-  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
-  sed_butlast='s,/*[^/]*$$,,'; \
-  while test -n "$$dir1"; do \
-    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
-    if test "$$first" != "."; then \
-      if test "$$first" = ".."; then \
-        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
-        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
-      else \
-        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
-        if test "$$first2" = "$$first"; then \
-          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
-        else \
-          dir2="../$$dir2"; \
-        fi; \
-        dir0="$$dir0"/"$$first"; \
-      fi; \
-    fi; \
-    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
-  done; \
-  reldir="$$dir2"
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AM_CXXFLAGS = @AM_CXXFLAGS@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-FLTK_FLAGS = @FLTK_FLAGS@
-FLTK_LIBS = @FLTK_LIBS@
-GIF_FLAGS = @GIF_FLAGS@
-GIF_LIBS = @GIF_LIBS@
-GLUT_FLAGS = @GLUT_FLAGS@
-GLUT_LIBS = @GLUT_LIBS@
-GL_LIBS = @GL_LIBS@
-GREP = @GREP@
-GSL_FLAGS = @GSL_FLAGS@
-GSL_LIBS = @GSL_LIBS@
-HAVE_SWIG = @HAVE_SWIG@
-HDF4_FLAGS = @HDF4_FLAGS@
-HDF4_LIBS = @HDF4_LIBS@
-HDF5_FLAGS = @HDF5_FLAGS@
-HDF5_LIBS = @HDF5_LIBS@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-JPEG_FLAGS = @JPEG_FLAGS@
-JPEG_LIBS = @JPEG_LIBS@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-MGL_AGE = @MGL_AGE@
-MGL_CURRENT = @MGL_CURRENT@
-MGL_RELEASE = @MGL_RELEASE@
-MGL_REVISION = @MGL_REVISION@
-MKDIR_P = @MKDIR_P@
-MOC = @MOC@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OCTAVE = @OCTAVE@
-OCTAVE_ARCH = @OCTAVE_ARCH@
-OCTAVE_INCFLAGS = @OCTAVE_INCFLAGS@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PNG_LIBS = @PNG_LIBS@
-PTHREAD_FLAGS = @PTHREAD_FLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@
-PYTHON = @PYTHON@
-PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
-PYTHON_HEADERS = @PYTHON_HEADERS@
-PYTHON_PLATFORM = @PYTHON_PLATFORM@
-PYTHON_PREFIX = @PYTHON_PREFIX@
-PYTHON_VERSION = @PYTHON_VERSION@
-QMAKE = @QMAKE@
-QT_CFLAGS = @QT_CFLAGS@
-QT_CPPFLAGS = @QT_CPPFLAGS@
-QT_CXXFLAGS = @QT_CXXFLAGS@
-QT_DEFINES = @QT_DEFINES@
-QT_INCPATH = @QT_INCPATH@
-QT_LDFLAGS = @QT_LDFLAGS@
-QT_LFLAGS = @QT_LFLAGS@
-QT_LIBS = @QT_LIBS@
-QT_PATH = @QT_PATH@
-QT_VERSION = @QT_VERSION@
-QT_VERSION_MAJOR = @QT_VERSION_MAJOR@
-RANLIB = @RANLIB@
-RCC = @RCC@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-TMPDIR = @TMPDIR@
-UIC = @UIC@
-VERSION = @VERSION@
-WX_FLAGS = @WX_FLAGS@
-WX_LIBS = @WX_LIBS@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-pkgpyexecdir = @pkgpyexecdir@
-pkgpythondir = @pkgpythondir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-pyexecdir = @pyexecdir@
-pythondir = @pythondir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-SUBDIRS = png .
-CLEANFILES = mathgl_en.info mathgl_en.info-1 mathgl_en.info-2 mathgl_en.info-3 mgl_en.info \
-mathgl_ru.info mathgl_ru.info-1 mathgl_ru.info-2 mathgl_ru.info-3 mathgl_ru.info-4 mgl_ru.info
-
-MAKEINFOHTML = texi2html
-TEXI2PDF = texi2pdf
-AM_MAKEINFOHTMLFLAGS = --split=chapter
-AM_MAKEINFOFLAGS = --no-validate
-info_TEXINFOS = mathgl_en.texi mathgl_ru.texi mgl_en.texi mgl_ru.texi
-mathgl_en_TEXINFOS = \
-overview_en.texi example_en.texi core_en.texi class_en.texi widget_en.texi \
-data_en.texi other_en.texi mgl_cmd_en.texi samples_en.texi appendix_en.texi fdl.texi
-
-mathgl_ru_TEXINFOS = \
-overview_ru.texi example_ru.texi core_ru.texi class_ru.texi widget_ru.texi \
-data_ru.texi other_ru.texi mgl_cmd_ru.texi samples_ru.texi appendix_ru.texi fdl.texi
-
-mgl_en_TEXINFOS = \
-mgl_cmd_en.texi samples_en.texi ex_mgl_en.texi concept_en.texi fdl.texi
-
-mgl_ru_TEXINFOS = \
-mgl_cmd_ru.texi samples_ru.texi ex_mgl_ru.texi concept_ru.texi fdl.texi
-
-all: all-recursive
-
-.SUFFIXES:
-.SUFFIXES: .dvi .ps
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu texinfo/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu texinfo/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-
-mathgl_en.info: mathgl_en.texi $(mathgl_en_TEXINFOS)
-	restore=: && backupdir="$(am__leading_dot)am$$$$" && \
-	rm -rf $$backupdir && mkdir $$backupdir && \
-	if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
-	  for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
-	    if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
-	  done; \
-	else :; fi && \
-	if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
-	 -o $@ `test -f 'mathgl_en.texi' || echo '$(srcdir)/'`mathgl_en.texi; \
-	then \
-	  rc=0; \
-	else \
-	  rc=$$?; \
-	  $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
-	fi; \
-	rm -rf $$backupdir; exit $$rc
-
-mathgl_en.dvi: mathgl_en.texi $(mathgl_en_TEXINFOS) 
-	TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
-	MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
-	$(TEXI2DVI) -o $@ `test -f 'mathgl_en.texi' || echo '$(srcdir)/'`mathgl_en.texi
-
-mathgl_en.pdf: mathgl_en.texi $(mathgl_en_TEXINFOS) 
-	TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
-	MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
-	$(TEXI2PDF) -o $@ `test -f 'mathgl_en.texi' || echo '$(srcdir)/'`mathgl_en.texi
-
-mathgl_en.html: mathgl_en.texi $(mathgl_en_TEXINFOS) 
-	rm -rf $(@:.html=.htp)
-	if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
-	 -o $(@:.html=.htp) `test -f 'mathgl_en.texi' || echo '$(srcdir)/'`mathgl_en.texi; \
-	then \
-	  rm -rf $@; \
-	  if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
-	    mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
-	else \
-	  if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
-	    rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
-	  exit 1; \
-	fi
-
-mathgl_ru.info: mathgl_ru.texi $(mathgl_ru_TEXINFOS)
-	restore=: && backupdir="$(am__leading_dot)am$$$$" && \
-	rm -rf $$backupdir && mkdir $$backupdir && \
-	if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
-	  for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
-	    if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
-	  done; \
-	else :; fi && \
-	if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
-	 -o $@ `test -f 'mathgl_ru.texi' || echo '$(srcdir)/'`mathgl_ru.texi; \
-	then \
-	  rc=0; \
-	else \
-	  rc=$$?; \
-	  $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
-	fi; \
-	rm -rf $$backupdir; exit $$rc
-
-mathgl_ru.dvi: mathgl_ru.texi $(mathgl_ru_TEXINFOS) 
-	TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
-	MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
-	$(TEXI2DVI) -o $@ `test -f 'mathgl_ru.texi' || echo '$(srcdir)/'`mathgl_ru.texi
-
-mathgl_ru.pdf: mathgl_ru.texi $(mathgl_ru_TEXINFOS) 
-	TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
-	MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
-	$(TEXI2PDF) -o $@ `test -f 'mathgl_ru.texi' || echo '$(srcdir)/'`mathgl_ru.texi
-
-mathgl_ru.html: mathgl_ru.texi $(mathgl_ru_TEXINFOS) 
-	rm -rf $(@:.html=.htp)
-	if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
-	 -o $(@:.html=.htp) `test -f 'mathgl_ru.texi' || echo '$(srcdir)/'`mathgl_ru.texi; \
-	then \
-	  rm -rf $@; \
-	  if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
-	    mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
-	else \
-	  if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
-	    rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
-	  exit 1; \
-	fi
-
-mgl_en.info: mgl_en.texi $(mgl_en_TEXINFOS)
-	restore=: && backupdir="$(am__leading_dot)am$$$$" && \
-	rm -rf $$backupdir && mkdir $$backupdir && \
-	if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
-	  for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
-	    if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
-	  done; \
-	else :; fi && \
-	if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
-	 -o $@ `test -f 'mgl_en.texi' || echo '$(srcdir)/'`mgl_en.texi; \
-	then \
-	  rc=0; \
-	else \
-	  rc=$$?; \
-	  $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
-	fi; \
-	rm -rf $$backupdir; exit $$rc
-
-mgl_en.dvi: mgl_en.texi $(mgl_en_TEXINFOS) 
-	TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
-	MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
-	$(TEXI2DVI) -o $@ `test -f 'mgl_en.texi' || echo '$(srcdir)/'`mgl_en.texi
-
-mgl_en.pdf: mgl_en.texi $(mgl_en_TEXINFOS) 
-	TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
-	MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
-	$(TEXI2PDF) -o $@ `test -f 'mgl_en.texi' || echo '$(srcdir)/'`mgl_en.texi
-
-mgl_en.html: mgl_en.texi $(mgl_en_TEXINFOS) 
-	rm -rf $(@:.html=.htp)
-	if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
-	 -o $(@:.html=.htp) `test -f 'mgl_en.texi' || echo '$(srcdir)/'`mgl_en.texi; \
-	then \
-	  rm -rf $@; \
-	  if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
-	    mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
-	else \
-	  if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
-	    rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
-	  exit 1; \
-	fi
-
-mgl_ru.info: mgl_ru.texi $(mgl_ru_TEXINFOS)
-	restore=: && backupdir="$(am__leading_dot)am$$$$" && \
-	rm -rf $$backupdir && mkdir $$backupdir && \
-	if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
-	  for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
-	    if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
-	  done; \
-	else :; fi && \
-	if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
-	 -o $@ `test -f 'mgl_ru.texi' || echo '$(srcdir)/'`mgl_ru.texi; \
-	then \
-	  rc=0; \
-	else \
-	  rc=$$?; \
-	  $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
-	fi; \
-	rm -rf $$backupdir; exit $$rc
-
-mgl_ru.dvi: mgl_ru.texi $(mgl_ru_TEXINFOS) 
-	TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
-	MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
-	$(TEXI2DVI) -o $@ `test -f 'mgl_ru.texi' || echo '$(srcdir)/'`mgl_ru.texi
-
-mgl_ru.pdf: mgl_ru.texi $(mgl_ru_TEXINFOS) 
-	TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
-	MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
-	$(TEXI2PDF) -o $@ `test -f 'mgl_ru.texi' || echo '$(srcdir)/'`mgl_ru.texi
-
-mgl_ru.html: mgl_ru.texi $(mgl_ru_TEXINFOS) 
-	rm -rf $(@:.html=.htp)
-	if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
-	 -o $(@:.html=.htp) `test -f 'mgl_ru.texi' || echo '$(srcdir)/'`mgl_ru.texi; \
-	then \
-	  rm -rf $@; \
-	  if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
-	    mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
-	else \
-	  if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
-	    rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
-	  exit 1; \
-	fi
-.dvi.ps:
-	TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
-	$(DVIPS) -o $@ $<
-
-uninstall-dvi-am:
-	@$(NORMAL_UNINSTALL)
-	@list='$(DVIS)'; test -n "$(dvidir)" || list=; \
-	for p in $$list; do \
-	  $(am__strip_dir) \
-	  echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \
-	  rm -f "$(DESTDIR)$(dvidir)/$$f"; \
-	done
-
-uninstall-html-am:
-	@$(NORMAL_UNINSTALL)
-	@list='$(HTMLS)'; test -n "$(htmldir)" || list=; \
-	for p in $$list; do \
-	  $(am__strip_dir) \
-	  echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
-	  rm -rf "$(DESTDIR)$(htmldir)/$$f"; \
-	done
-
-uninstall-info-am:
-	@$(PRE_UNINSTALL)
-	@if test -d '$(DESTDIR)$(infodir)' && \
-	    (install-info --version && \
-	     install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
-	  list='$(INFO_DEPS)'; \
-	  for file in $$list; do \
-	    relfile=`echo "$$file" | sed 's|^.*/||'`; \
-	    echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
-	    if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
-	    then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \
-	  done; \
-	else :; fi
-	@$(NORMAL_UNINSTALL)
-	@list='$(INFO_DEPS)'; \
-	for file in $$list; do \
-	  relfile=`echo "$$file" | sed 's|^.*/||'`; \
-	  relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
-	  (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \
-	     echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
-	     rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
-	   else :; fi); \
-	done
-
-uninstall-pdf-am:
-	@$(NORMAL_UNINSTALL)
-	@list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
-	for p in $$list; do \
-	  $(am__strip_dir) \
-	  echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \
-	  rm -f "$(DESTDIR)$(pdfdir)/$$f"; \
-	done
-
-uninstall-ps-am:
-	@$(NORMAL_UNINSTALL)
-	@list='$(PSS)'; test -n "$(psdir)" || list=; \
-	for p in $$list; do \
-	  $(am__strip_dir) \
-	  echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \
-	  rm -f "$(DESTDIR)$(psdir)/$$f"; \
-	done
-
-dist-info: $(INFO_DEPS)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	list='$(INFO_DEPS)'; \
-	for base in $$list; do \
-	  case $$base in \
-	    $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
-	  esac; \
-	  if test -f $$base; then d=.; else d=$(srcdir); fi; \
-	  base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \
-	  for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \
-	    if test -f $$file; then \
-	      relfile=`expr "$$file" : "$$d/\(.*\)"`; \
-	      test -f "$(distdir)/$$relfile" || \
-		cp -p $$file "$(distdir)/$$relfile"; \
-	    else :; fi; \
-	  done; \
-	done
-
-mostlyclean-aminfo:
-	-rm -rf mathgl_en.aux mathgl_en.cp mathgl_en.cps mathgl_en.fn mathgl_en.fns \
-	  mathgl_en.ky mathgl_en.kys mathgl_en.log mathgl_en.pg \
-	  mathgl_en.tmp mathgl_en.toc mathgl_en.tp mathgl_en.tps \
-	  mathgl_en.vr mathgl_en.vrs mathgl_ru.aux mathgl_ru.cp \
-	  mathgl_ru.cps mathgl_ru.fn mathgl_ru.fns mathgl_ru.ky \
-	  mathgl_ru.kys mathgl_ru.log mathgl_ru.pg mathgl_ru.tmp \
-	  mathgl_ru.toc mathgl_ru.tp mathgl_ru.tps mathgl_ru.vr \
-	  mathgl_ru.vrs mgl_en.aux mgl_en.cp mgl_en.cps mgl_en.fn \
-	  mgl_en.fns mgl_en.ky mgl_en.kys mgl_en.log mgl_en.pg \
-	  mgl_en.tmp mgl_en.toc mgl_en.tp mgl_en.tps mgl_en.vr \
-	  mgl_en.vrs mgl_ru.aux mgl_ru.cp mgl_ru.cps mgl_ru.fn \
-	  mgl_ru.fns mgl_ru.ky mgl_ru.kys mgl_ru.log mgl_ru.pg \
-	  mgl_ru.tmp mgl_ru.toc mgl_ru.tp mgl_ru.tps mgl_ru.vr \
-	  mgl_ru.vrs
-
-clean-aminfo:
-	-test -z "mathgl_en.dvi mathgl_en.pdf mathgl_en.ps mathgl_en.html mathgl_ru.dvi \
-	  mathgl_ru.pdf mathgl_ru.ps mathgl_ru.html mgl_en.dvi \
-	  mgl_en.pdf mgl_en.ps mgl_en.html mgl_ru.dvi mgl_ru.pdf \
-	  mgl_ru.ps mgl_ru.html" \
-	|| rm -rf mathgl_en.dvi mathgl_en.pdf mathgl_en.ps mathgl_en.html mathgl_ru.dvi \
-	  mathgl_ru.pdf mathgl_ru.ps mathgl_ru.html mgl_en.dvi \
-	  mgl_en.pdf mgl_en.ps mgl_en.html mgl_ru.dvi mgl_ru.pdf \
-	  mgl_ru.ps mgl_ru.html
-
-maintainer-clean-aminfo:
-	@list='$(INFO_DEPS)'; for i in $$list; do \
-	  i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
-	  echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
-	  rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
-	done
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-	@fail= failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	target=`echo $@ | sed s/-recursive//`; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    dot_seen=yes; \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done; \
-	if test "$$dot_seen" = "no"; then \
-	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
-	fi; test -z "$$fail"
-
-$(RECURSIVE_CLEAN_TARGETS):
-	@fail= failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	case "$@" in \
-	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-	  *) list='$(SUBDIRS)' ;; \
-	esac; \
-	rev=''; for subdir in $$list; do \
-	  if test "$$subdir" = "."; then :; else \
-	    rev="$$subdir $$rev"; \
-	  fi; \
-	done; \
-	rev="$$rev ."; \
-	target=`echo $@ | sed s/-recursive//`; \
-	for subdir in $$rev; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done && test -z "$$fail"
-tags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-	done
-ctags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-	done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	set x; \
-	here=`pwd`; \
-	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
-	  include_option=--etags-include; \
-	  empty_fix=.; \
-	else \
-	  include_option=--include; \
-	  empty_fix=; \
-	fi; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test ! -f $$subdir/TAGS || \
-	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
-	  fi; \
-	done; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	shift; \
-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  if test $$# -gt 0; then \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      "$$@" $$unique; \
-	  else \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      $$unique; \
-	  fi; \
-	fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	test -z "$(CTAGS_ARGS)$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && $(am__cd) $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test -d "$(distdir)/$$subdir" \
-	    || $(MKDIR_P) "$(distdir)/$$subdir" \
-	    || exit 1; \
-	  fi; \
-	done
-	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
-	    $(am__relativize); \
-	    new_distdir=$$reldir; \
-	    dir1=$$subdir; dir2="$(top_distdir)"; \
-	    $(am__relativize); \
-	    new_top_distdir=$$reldir; \
-	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
-	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
-	    ($(am__cd) $$subdir && \
-	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$$new_top_distdir" \
-	        distdir="$$new_distdir" \
-		am__remove_distdir=: \
-		am__skip_length_check=: \
-		am__skip_mode_fix=: \
-	        distdir) \
-	      || exit 1; \
-	  fi; \
-	done
-	$(MAKE) $(AM_MAKEFLAGS) \
-	  top_distdir="$(top_distdir)" distdir="$(distdir)" \
-	  dist-info
-check-am: all-am
-check: check-recursive
-all-am: Makefile $(INFO_DEPS) all-local
-installdirs: installdirs-recursive
-installdirs-am:
-	for dir in "$(DESTDIR)$(infodir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-aminfo clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-recursive
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am: $(DVIS)
-
-html: html-recursive
-
-html-am: $(HTMLS)
-
-info: info-recursive
-
-info-am: $(INFO_DEPS)
-
-install-data-am: install-data-local install-info-am
-
-install-dvi: install-dvi-recursive
-
-install-dvi-am: $(DVIS)
-	@$(NORMAL_INSTALL)
-	test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)"
-	@list='$(DVIS)'; test -n "$(dvidir)" || list=; \
-	for p in $$list; do \
-	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  echo "$$d$$p"; \
-	done | $(am__base_list) | \
-	while read files; do \
-	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \
-	  $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \
-	done
-install-exec-am:
-
-install-html: install-html-recursive
-
-install-html-am: $(HTMLS)
-	@$(NORMAL_INSTALL)
-	test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
-	@list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
-	for p in $$list; do \
-	  if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  $(am__strip_dir) \
-	  if test -d "$$d$$p"; then \
-	    echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
-	    $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
-	    echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
-	    $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
-	  else \
-	    list2="$$list2 $$d$$p"; \
-	  fi; \
-	done; \
-	test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \
-	while read files; do \
-	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
-	  $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
-	done; }
-install-info: install-info-recursive
-
-install-info-am: $(INFO_DEPS)
-	@$(NORMAL_INSTALL)
-	test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)"
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
-	for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	  esac; \
-	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
-	  file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
-	  for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
-	               $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
-	    if test -f $$ifile; then \
-	      echo "$$ifile"; \
-	    else : ; fi; \
-	  done; \
-	done | $(am__base_list) | \
-	while read files; do \
-	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
-	  $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
-	@$(POST_INSTALL)
-	@if (install-info --version && \
-	     install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
-	  list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
-	  for file in $$list; do \
-	    relfile=`echo "$$file" | sed 's|^.*/||'`; \
-	    echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
-	    install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
-	  done; \
-	else : ; fi
-install-man:
-
-install-pdf: install-pdf-recursive
-
-install-pdf-am: $(PDFS)
-	@$(NORMAL_INSTALL)
-	test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)"
-	@list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
-	for p in $$list; do \
-	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  echo "$$d$$p"; \
-	done | $(am__base_list) | \
-	while read files; do \
-	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \
-	  $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done
-install-ps: install-ps-recursive
-
-install-ps-am: $(PSS)
-	@$(NORMAL_INSTALL)
-	test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)"
-	@list='$(PSS)'; test -n "$(psdir)" || list=; \
-	for p in $$list; do \
-	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  echo "$$d$$p"; \
-	done | $(am__base_list) | \
-	while read files; do \
-	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \
-	  $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-aminfo \
-	maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \
-	mostlyclean-libtool
-
-pdf: pdf-recursive
-
-pdf-am: $(PDFS)
-
-ps: ps-recursive
-
-ps-am: $(PSS)
-
-uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \
-	uninstall-local uninstall-pdf-am uninstall-ps-am
-
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
-	install-am install-strip tags-recursive
-
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
-	all all-am all-local check check-am clean clean-aminfo \
-	clean-generic clean-libtool ctags ctags-recursive dist-info \
-	distclean distclean-generic distclean-libtool distclean-tags \
-	distdir dvi dvi-am html html-am info info-am install \
-	install-am install-data install-data-am install-data-local \
-	install-dvi install-dvi-am install-exec install-exec-am \
-	install-html install-html-am install-info install-info-am \
-	install-man install-pdf install-pdf-am install-ps \
-	install-ps-am install-strip installcheck installcheck-am \
-	installdirs installdirs-am maintainer-clean \
-	maintainer-clean-aminfo maintainer-clean-generic mostlyclean \
-	mostlyclean-aminfo mostlyclean-generic mostlyclean-libtool pdf \
-	pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
-	uninstall-dvi-am uninstall-html-am uninstall-info-am \
-	uninstall-local uninstall-pdf-am uninstall-ps-am
-
-
-#mglpng=$(DESTDIR)$(docdir)/png_static
-
-#install-data-local: install-html install-pdf
-install-data-local: 
-#	mkdir -p $(mglpng)
-#	cp -r $(top_srcdir)/texinfo/png_static/*.png $(mglpng)
-uninstall-local:
-#	rm -rf $(mglpng)
-
-#all-local: html pdf
-all-local: html
-	./filter.py
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:

-- 
Packaging for mathgl



More information about the debian-science-commits mailing list