[SCM] Packaging for mathgl branch, master, updated. debian/1.11.0.1-9-9-g228f525

Dimitrios Eftaxiopoulos eftaxi12 at otenet.gr
Tue Apr 26 23:24:08 UTC 2011


The following commit has been merged in the master branch:
commit 39730a055560e74ec1ab9aaf799267454205d5e8
Merge: eca9ca5dc2752368aebeb1f49d429a7be3923e11 2c0d414d79d4f478335a51842f486f704818b901
Author: Dimitrios Eftaxiopoulos <eftaxi12 at otenet.gr>
Date:   Tue Apr 26 02:30:55 2011 +0300

    Merge commit 'upstream/1.11.1.1'
    
    Conflicts:
    	ChangeLog.txt
    	TODO
    	configure
    	debian/changelog
    	debian/control
    	debian/copyright
    	debian/libmgl-fltk5.install
    	debian/libmgl5.install
    	debian/mathgl.install
    	debian/mgl2cpp.1
    	debian/mgl2eps.1
    	debian/mgl2gif.1
    	debian/mgl2png.1
    	debian/mgl2svg.1
    	debian/mglview.1
    	debian/patches/dircategory-and-direntry-mathgl-en-texi.patch
    	debian/patches/series
    	debian/python-mathgl.install
    	debian/rules
    	examples/full_test.cpp
    	include/mgl/mgl.h
    	include/mgl/mgl_ab.h
    	include/mgl/mgl_define.h
    	mgl/Makefile.in
    	mgl/mgl_ab.cpp
    	mgl/mgl_crust.cpp
    	mgl/mgl_data_io.cpp
    	mgl/mgl_exec.cpp
    	mgl/mgl_zb.cpp
    	mgl/mgl_zb2.cpp
    	texinfo/Makefile.am
    	texinfo/Makefile.in
    	texinfo/mgl_en.texi
    	texinfo/mgl_ru.texi

diff --combined .directory
index 458b98e,0000000..912f489
mode 100644,000000..100644
--- a/.directory
+++ b/.directory
@@@ -1,6 -1,0 +1,3 @@@
 +[Dolphin]
- Timestamp=2011,4,26,1,58,58
++Timestamp=2011,4,26,2,6,20
 +Version=2
- 
- [Settings]
- ShowDotFiles=true
diff --combined ChangeLog.txt
index a4ae6e1,5cbe2fa..954fe79
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@@ -1,3 -1,7 +1,10 @@@
++<<<<<<< HEAD
++=======
+ 1.11.1 Released 18 March 2011
+ 	- Improve IDTF export
+ 	- Minor changes and bugfixes
+ 
++>>>>>>> upstream/1.11.1.1
  1.11.0.1 Released 15 November 2010
  	- Bugfix for reading textual data files (mostly under win32).
  	- Docs update.
diff --combined TODO
index c41c6e3,b599d10..b013975
--- a/TODO
+++ b/TODO
@@@ -4,12 -4,23 +4,26 @@@
  1. Colorbar: print more digits for manual arrays ... but avoid overlapping ???
  2. Miss MAJOR labels or decrease its fontsize if labels too close.
  	Also check that enough digits is printed to distingush the labels
- 	Also allow "time"-labels
+ 	Also allow "time"-labels -- like "%d/%m/%Y %H:%M:%S"
  	Also allow rotate labels if they too dense
  3. Legend in OpenGL mode
  4. Add plot Circle() as Error() but with marks instead of error boxes (default 'o') + alpha-transpared if filled
  5. Export to LaTeX formats - (pgf/tikz) or metapost if possible (like EPS).
  6. Use '~' for old style textual arguments!!!
++<<<<<<< HEAD
++=======
+ 7. Pipes in mgl2png, mgl2eps, ... (stdin, stdout)
+ 8. Multithreading
+ 9. Number of proc from get_nprocs_conf() (#include <sys/sysinfo.h>)
+ 10.Arbitrary line/curve coordinates if z=nan
+ 11.Add apperture for light (partially is done)
+ 12.Add diffusive light (no dependence of normale but have direction)
+ 13. утилиты (mgl2png и пр.) вылетают, если в коментариях русские буквы
+ 14. Last ' isn't send as call argument!!!
+ 15. MGL docs -- text what formulas are applicable for scalars too.
+ 16. Manual labels in string with '\n' separator
+ 17. Venn() diagram-like -- transparent circles with manual colors and sizes -- may be a variant of Mark()???
++>>>>>>> upstream/1.11.1.1
  
  11. Update STIX fonts (new release) + create PWT fonts
  12. Problem with \calB and so on (\calH, ...) -- they are present only in italic font :(.
@@@ -25,7 -36,7 +39,11 @@@
  29. Multithreading by "subplots" -- for parser first of all !!!
  
  30. Sample about pthread using.
++<<<<<<< HEAD
 +
++=======
+ 31. Add help about cmake and GIF/JPEG to the "Installation and using"
++>>>>>>> upstream/1.11.1.1
  32. Regroup pictures in WWW by big classes + combo plots
  
  =========================
diff --combined configure
index 8245fcd,fa5d32b..01ccd69
--- a/configure
+++ b/configure
@@@ -1,6 -1,6 +1,10 @@@
  #! /bin/sh
  # Guess values for system-dependent variables and create Makefiles.
++<<<<<<< HEAD
 +# Generated by GNU Autoconf 2.67 for mathgl 1.10.
++=======
+ # Generated by GNU Autoconf 2.67 for mathgl 1.11.
++>>>>>>> upstream/1.11.1.1
  #
  # Report bugs to <mathgl.abalakin at gmail.com>.
  #
@@@ -761,8 -761,8 +765,8 @@@ MAKEFLAGS
  # Identity of this package.
  PACKAGE_NAME='mathgl'
  PACKAGE_TARNAME='mathgl'
- PACKAGE_VERSION='1.10'
- PACKAGE_STRING='mathgl 1.10'
+ PACKAGE_VERSION='1.11'
+ PACKAGE_STRING='mathgl 1.11'
  PACKAGE_BUGREPORT='mathgl.abalakin at gmail.com'
  PACKAGE_URL=''
  
@@@ -856,6 -856,11 +860,11 @@@ USE_FLTK_FALS
  USE_FLTK_TRUE
  FLTK_LIBS
  FLTK_FLAGS
+ USE_U3D_FALSE
+ USE_U3D_TRUE
+ U3D_LIBS
+ USE_PDF_FALSE
+ USE_PDF_TRUE
  USE_JPEG_FALSE
  USE_JPEG_TRUE
  JPEG_LIBS
@@@ -1025,6 -1030,8 +1034,8 @@@ enable_hdf5_1
  enable_hdf4
  enable_gif
  enable_jpeg
+ enable_u3d
+ enable_pdf
  enable_fltk
  enable_wx
  enable_qt
@@@ -1590,7 -1597,7 +1601,7 @@@ if test "$ac_init_help" = "long"; the
    # Omit some internal or obsolete options to make the list less imposing.
    # This message is too long to be a string in the A/UX 3.1 sh.
    cat <<_ACEOF
- \`configure' configures mathgl 1.10 to adapt to many kinds of systems.
+ \`configure' configures mathgl 1.11 to adapt to many kinds of systems.
  
  Usage: $0 [OPTION]... [VAR=VALUE]...
  
@@@ -1660,7 -1667,7 +1671,7 @@@ f
  
  if test -n "$ac_init_help"; then
    case $ac_init_help in
-      short | recursive ) echo "Configuration of mathgl 1.10:";;
+      short | recursive ) echo "Configuration of mathgl 1.11:";;
     esac
    cat <<\_ACEOF
  
@@@ -1686,6 -1693,8 +1697,8 @@@ Optional Features
    --enable-hdf4    Turn on hdf4
    --enable-gif    Turn on gif
    --enable-jpeg    Turn on jpeg
+   --enable-u3d    Turn on u3d functions
+   --enable-pdf    Turn on u3d and pdf functions
    --enable-fltk    Turn on fltk
    --enable-wx    Turn on wxWidget
    --enable-qt    Turn on Qt
@@@ -1782,7 -1791,7 +1795,11 @@@ f
  test -n "$ac_init_help" && exit $ac_status
  if $ac_init_version; then
    cat <<\_ACEOF
++<<<<<<< HEAD
 +mathgl configure 1.10
++=======
+ mathgl configure 1.11
++>>>>>>> upstream/1.11.1.1
  generated by GNU Autoconf 2.67
  
  Copyright (C) 2010 Free Software Foundation, Inc.
@@@ -2178,12 -2187,12 +2195,12 @@@ f
  
  } # ac_fn_cxx_try_link
  
- # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
- # -------------------------------------------------------
+ # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
+ # ---------------------------------------------------------
  # Tests whether HEADER exists, giving a warning if it cannot be compiled using
  # the include files in INCLUDES and setting the cache variable VAR
  # accordingly.
- ac_fn_c_check_header_mongrel ()
+ ac_fn_cxx_check_header_mongrel ()
  {
    as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
    if eval "test \"\${$3+set}\"" = set; then :
@@@ -2204,7 -2213,7 +2221,7 @@@ cat confdefs.h - <<_ACEOF >conftest.$ac
  $4
  #include <$2>
  _ACEOF
- if ac_fn_c_try_compile "$LINENO"; then :
+ if ac_fn_cxx_try_compile "$LINENO"; then :
    ac_header_compiler=yes
  else
    ac_header_compiler=no
@@@ -2220,7 -2229,7 +2237,7 @@@ cat confdefs.h - <<_ACEOF >conftest.$ac
  /* end confdefs.h.  */
  #include <$2>
  _ACEOF
- if ac_fn_c_try_cpp "$LINENO"; then :
+ if ac_fn_cxx_try_cpp "$LINENO"; then :
    ac_header_preproc=yes
  else
    ac_header_preproc=no
@@@ -2230,7 -2239,7 +2247,7 @@@ rm -f conftest.err conftest.i conftest.
  $as_echo "$ac_header_preproc" >&6; }
  
  # So?  What about this header?
- case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+ case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
    yes:no: )
      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
  $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
@@@ -2267,12 -2276,12 +2284,16 @@@ $as_echo "$ac_res" >&6; 
  fi
    eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
  
- } # ac_fn_c_check_header_mongrel
+ } # ac_fn_cxx_check_header_mongrel
  cat >config.log <<_ACEOF
  This file contains any messages produced by compilers while
  running configure, to aid debugging if configure makes a mistake.
  
++<<<<<<< HEAD
 +It was created by mathgl $as_me 1.10, which was
++=======
+ It was created by mathgl $as_me 1.11, which was
++>>>>>>> upstream/1.11.1.1
  generated by GNU Autoconf 2.67.  Invocation command line was
  
    $ $0 $@
@@@ -2621,7 -2630,7 +2642,11 @@@ ac_compiler_gnu=$ac_cv_c_compiler_gn
  
  
  
++<<<<<<< HEAD
 +MGL_RELEASE=1.10
++=======
+ MGL_RELEASE=1.11
++>>>>>>> upstream/1.11.1.1
  
  
  
@@@ -2657,6 -2666,12 +2682,12 @@@ ac_configure="$SHELL $ac_aux_dir/config
  
  ac_config_headers="$ac_config_headers include/mgl/config.h"
  
+ ac_ext=cpp
+ ac_cpp='$CXXCPP $CPPFLAGS'
+ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+ 
  
  #MGL_RELEASE=1.4
  #AC_SUBST(MGL_RELEASE)
@@@ -3110,7 -3125,7 +3141,7 @@@ f
  
  # Define the identity of the package.
   PACKAGE='mathgl'
-  VERSION='1.10'
+  VERSION='1.11'
  
  
  cat >>confdefs.h <<_ACEOF
@@@ -3935,11 -3950,11 +3966,11 @@@ if test "x$ac_cv_prog_cc_c89" != xno; t
  
  fi
  
- ac_ext=c
- ac_cpp='$CPP $CPPFLAGS'
- ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
- ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ ac_ext=cpp
+ ac_cpp='$CXXCPP $CPPFLAGS'
+ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  DEPDIR="${am__leading_dot}deps"
  
  ac_config_commands="$ac_config_commands depfiles"
@@@ -4381,11 -4396,11 +4412,11 @@@ els
      CXXFLAGS=
    fi
  fi
- ac_ext=c
- ac_cpp='$CPP $CPPFLAGS'
- ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
- ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ ac_ext=cpp
+ ac_cpp='$CXXCPP $CPPFLAGS'
+ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  
  depcc="$CXX"  am_compiler_list=
  
@@@ -5503,13 -5518,13 +5534,23 @@@ if test "${lt_cv_nm_interface+set}" = s
  else
    lt_cv_nm_interface="BSD nm"
    echo "int some_variable = 0;" > conftest.$ac_ext
++<<<<<<< HEAD
 +  (eval echo "\"\$as_me:5506: $ac_compile\"" >&5)
 +  (eval "$ac_compile" 2>conftest.err)
 +  cat conftest.err >&5
 +  (eval echo "\"\$as_me:5509: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
 +  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
 +  cat conftest.err >&5
 +  (eval echo "\"\$as_me:5512: output\"" >&5)
++=======
+   (eval echo "\"\$as_me:5521: $ac_compile\"" >&5)
+   (eval "$ac_compile" 2>conftest.err)
+   cat conftest.err >&5
+   (eval echo "\"\$as_me:5524: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+   cat conftest.err >&5
+   (eval echo "\"\$as_me:5527: output\"" >&5)
++>>>>>>> upstream/1.11.1.1
    cat conftest.out >&5
    if $GREP 'External.*some_variable' conftest.out > /dev/null; then
      lt_cv_nm_interface="MS dumpbin"
@@@ -6712,7 -6727,7 +6753,11 @@@ ia64-*-hpux*
    ;;
  *-*-irix6*)
    # Find out which ABI we are using.
++<<<<<<< HEAD
 +  echo '#line 6715 "configure"' > conftest.$ac_ext
++=======
+   echo '#line 6730 "configure"' > conftest.$ac_ext
++>>>>>>> upstream/1.11.1.1
    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
    (eval $ac_compile) 2>&5
    ac_status=$?
@@@ -7992,11 -8007,11 +8037,11 @@@ els
      CXXFLAGS=
    fi
  fi
- ac_ext=c
- ac_cpp='$CPP $CPPFLAGS'
- ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
- ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ ac_ext=cpp
+ ac_cpp='$CXXCPP $CPPFLAGS'
+ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  
  depcc="$CXX"  am_compiler_list=
  
@@@ -8254,11 -8269,11 +8299,11 @@@ $as_echo "$as_me: error: in \`$ac_pwd':
  _lt_caught_CXX_error=yes; }
  fi
  
- ac_ext=c
- ac_cpp='$CPP $CPPFLAGS'
- ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
- ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ ac_ext=cpp
+ ac_cpp='$CXXCPP $CPPFLAGS'
+ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  
  else
    _lt_caught_CXX_error=yes
@@@ -8760,11 -8775,11 +8805,19 @@@ els
     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
     -e 's:$: $lt_compiler_flag:'`
++<<<<<<< HEAD
 +   (eval echo "\"\$as_me:8763: $lt_compile\"" >&5)
 +   (eval "$lt_compile" 2>conftest.err)
 +   ac_status=$?
 +   cat conftest.err >&5
 +   echo "$as_me:8767: \$? = $ac_status" >&5
++=======
+    (eval echo "\"\$as_me:8778: $lt_compile\"" >&5)
+    (eval "$lt_compile" 2>conftest.err)
+    ac_status=$?
+    cat conftest.err >&5
+    echo "$as_me:8782: \$? = $ac_status" >&5
++>>>>>>> upstream/1.11.1.1
     if (exit $ac_status) && test -s "$ac_outfile"; then
       # The compiler can only warn and ignore the option if not recognized
       # So say no if there are warnings other than the usual output.
@@@ -9099,11 -9114,11 +9152,19 @@@ els
     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
     -e 's:$: $lt_compiler_flag:'`
++<<<<<<< HEAD
 +   (eval echo "\"\$as_me:9102: $lt_compile\"" >&5)
 +   (eval "$lt_compile" 2>conftest.err)
 +   ac_status=$?
 +   cat conftest.err >&5
 +   echo "$as_me:9106: \$? = $ac_status" >&5
++=======
+    (eval echo "\"\$as_me:9117: $lt_compile\"" >&5)
+    (eval "$lt_compile" 2>conftest.err)
+    ac_status=$?
+    cat conftest.err >&5
+    echo "$as_me:9121: \$? = $ac_status" >&5
++>>>>>>> upstream/1.11.1.1
     if (exit $ac_status) && test -s "$ac_outfile"; then
       # The compiler can only warn and ignore the option if not recognized
       # So say no if there are warnings other than the usual output.
@@@ -9204,11 -9219,11 +9265,19 @@@ els
     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
     -e 's:$: $lt_compiler_flag:'`
++<<<<<<< HEAD
 +   (eval echo "\"\$as_me:9207: $lt_compile\"" >&5)
 +   (eval "$lt_compile" 2>out/conftest.err)
 +   ac_status=$?
 +   cat out/conftest.err >&5
 +   echo "$as_me:9211: \$? = $ac_status" >&5
++=======
+    (eval echo "\"\$as_me:9222: $lt_compile\"" >&5)
+    (eval "$lt_compile" 2>out/conftest.err)
+    ac_status=$?
+    cat out/conftest.err >&5
+    echo "$as_me:9226: \$? = $ac_status" >&5
++>>>>>>> upstream/1.11.1.1
     if (exit $ac_status) && test -s out/conftest2.$ac_objext
     then
       # The compiler can only warn and ignore the option if not recognized
@@@ -9259,11 -9274,11 +9328,19 @@@ els
     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
     -e 's:$: $lt_compiler_flag:'`
++<<<<<<< HEAD
 +   (eval echo "\"\$as_me:9262: $lt_compile\"" >&5)
 +   (eval "$lt_compile" 2>out/conftest.err)
 +   ac_status=$?
 +   cat out/conftest.err >&5
 +   echo "$as_me:9266: \$? = $ac_status" >&5
++=======
+    (eval echo "\"\$as_me:9277: $lt_compile\"" >&5)
+    (eval "$lt_compile" 2>out/conftest.err)
+    ac_status=$?
+    cat out/conftest.err >&5
+    echo "$as_me:9281: \$? = $ac_status" >&5
++>>>>>>> upstream/1.11.1.1
     if (exit $ac_status) && test -s out/conftest2.$ac_objext
     then
       # The compiler can only warn and ignore the option if not recognized
@@@ -11643,7 -11658,7 +11720,11 @@@ els
    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    lt_status=$lt_dlunknown
    cat > conftest.$ac_ext <<_LT_EOF
++<<<<<<< HEAD
 +#line 11646 "configure"
++=======
+ #line 11661 "configure"
++>>>>>>> upstream/1.11.1.1
  #include "confdefs.h"
  
  #if HAVE_DLFCN_H
@@@ -11739,7 -11754,7 +11820,11 @@@ els
    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    lt_status=$lt_dlunknown
    cat > conftest.$ac_ext <<_LT_EOF
++<<<<<<< HEAD
 +#line 11742 "configure"
++=======
+ #line 11757 "configure"
++>>>>>>> upstream/1.11.1.1
  #include "confdefs.h"
  
  #if HAVE_DLFCN_H
@@@ -11938,11 -11953,11 +12023,11 @@@ $as_echo "$enable_static" >&6; 
  
  
  fi
- ac_ext=c
- ac_cpp='$CPP $CPPFLAGS'
- ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
- ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ ac_ext=cpp
+ ac_cpp='$CXXCPP $CPPFLAGS'
+ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  
  CC="$lt_save_CC"
  
@@@ -13695,11 -13710,11 +13780,19 @@@ els
     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
     -e 's:$: $lt_compiler_flag:'`
++<<<<<<< HEAD
 +   (eval echo "\"\$as_me:13698: $lt_compile\"" >&5)
 +   (eval "$lt_compile" 2>conftest.err)
 +   ac_status=$?
 +   cat conftest.err >&5
 +   echo "$as_me:13702: \$? = $ac_status" >&5
++=======
+    (eval echo "\"\$as_me:13713: $lt_compile\"" >&5)
+    (eval "$lt_compile" 2>conftest.err)
+    ac_status=$?
+    cat conftest.err >&5
+    echo "$as_me:13717: \$? = $ac_status" >&5
++>>>>>>> upstream/1.11.1.1
     if (exit $ac_status) && test -s "$ac_outfile"; then
       # The compiler can only warn and ignore the option if not recognized
       # So say no if there are warnings other than the usual output.
@@@ -13794,11 -13809,11 +13887,19 @@@ els
     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
     -e 's:$: $lt_compiler_flag:'`
++<<<<<<< HEAD
 +   (eval echo "\"\$as_me:13797: $lt_compile\"" >&5)
 +   (eval "$lt_compile" 2>out/conftest.err)
 +   ac_status=$?
 +   cat out/conftest.err >&5
 +   echo "$as_me:13801: \$? = $ac_status" >&5
++=======
+    (eval echo "\"\$as_me:13812: $lt_compile\"" >&5)
+    (eval "$lt_compile" 2>out/conftest.err)
+    ac_status=$?
+    cat out/conftest.err >&5
+    echo "$as_me:13816: \$? = $ac_status" >&5
++>>>>>>> upstream/1.11.1.1
     if (exit $ac_status) && test -s out/conftest2.$ac_objext
     then
       # The compiler can only warn and ignore the option if not recognized
@@@ -13846,11 -13861,11 +13947,19 @@@ els
     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
     -e 's:$: $lt_compiler_flag:'`
++<<<<<<< HEAD
 +   (eval echo "\"\$as_me:13849: $lt_compile\"" >&5)
 +   (eval "$lt_compile" 2>out/conftest.err)
 +   ac_status=$?
 +   cat out/conftest.err >&5
 +   echo "$as_me:13853: \$? = $ac_status" >&5
++=======
+    (eval echo "\"\$as_me:13864: $lt_compile\"" >&5)
+    (eval "$lt_compile" 2>out/conftest.err)
+    ac_status=$?
+    cat out/conftest.err >&5
+    echo "$as_me:13868: \$? = $ac_status" >&5
++>>>>>>> upstream/1.11.1.1
     if (exit $ac_status) && test -s out/conftest2.$ac_objext
     then
       # The compiler can only warn and ignore the option if not recognized
@@@ -14787,11 -14802,11 +14896,11 @@@ f
    lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  fi # test "$_lt_caught_CXX_error" != yes
  
- ac_ext=c
- ac_cpp='$CPP $CPPFLAGS'
- ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
- ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ ac_ext=cpp
+ ac_cpp='$CXXCPP $CPPFLAGS'
+ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  
  
  
@@@ -14871,7 -14886,8 +14980,8 @@@ els
    pthread=true
  fi
  
- ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
+ 
+ ac_fn_cxx_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
  if test "x$ac_cv_header_pthread_h" = x""yes; then :
    (test x$all = xtrue || test x$pthread = xtrue) && PTHREAD_FLAGS=-DHAVE_PTHREAD
  else
@@@ -14899,7 -14915,7 +15009,7 @@@ return main ()
    return 0;
  }
  _ACEOF
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_cxx_try_link "$LINENO"; then :
    ac_cv_lib_pthread_main=yes
  else
    ac_cv_lib_pthread_main=no
@@@ -15057,7 -15073,7 +15167,7 @@@ case "${host}" i
  
    *w32*)
  	GL_LIBS=opengl32
- 	ac_fn_c_check_header_mongrel "$LINENO" "GL/gl.h" "ac_cv_header_GL_gl_h" "$ac_includes_default"
+ 	ac_fn_cxx_check_header_mongrel "$LINENO" "GL/gl.h" "ac_cv_header_GL_gl_h" "$ac_includes_default"
  if test "x$ac_cv_header_GL_gl_h" = x""yes; then :
  
  else
@@@ -15085,7 -15101,7 +15195,7 @@@ return main ()
    return 0;
  }
  _ACEOF
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_cxx_try_link "$LINENO"; then :
    eval "$as_ac_Lib=yes"
  else
    eval "$as_ac_Lib=no"
@@@ -15104,7 -15120,7 +15214,7 @@@ els
  fi
  
  	GLUT_LIBS=glut32
- 	ac_fn_c_check_header_mongrel "$LINENO" "GL/glut.h" "ac_cv_header_GL_glut_h" "$ac_includes_default"
+ 	ac_fn_cxx_check_header_mongrel "$LINENO" "GL/glut.h" "ac_cv_header_GL_glut_h" "$ac_includes_default"
  if test "x$ac_cv_header_GL_glut_h" = x""yes; then :
    (test x$all = xtrue || test x$glut = xtrue) && GLUT_FLAGS=-DHAVE_GLUT
  else
@@@ -15132,7 -15148,7 +15242,7 @@@ return main ()
    return 0;
  }
  _ACEOF
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_cxx_try_link "$LINENO"; then :
    eval "$as_ac_Lib=yes"
  else
    eval "$as_ac_Lib=no"
@@@ -15154,7 -15170,7 +15264,7 @@@ f
  
         *)
  	GL_LIBS=GL
- 	ac_fn_c_check_header_mongrel "$LINENO" "GL/gl.h" "ac_cv_header_GL_gl_h" "$ac_includes_default"
+ 	ac_fn_cxx_check_header_mongrel "$LINENO" "GL/gl.h" "ac_cv_header_GL_gl_h" "$ac_includes_default"
  if test "x$ac_cv_header_GL_gl_h" = x""yes; then :
  
  else
@@@ -15182,7 -15198,7 +15292,7 @@@ return main ()
    return 0;
  }
  _ACEOF
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_cxx_try_link "$LINENO"; then :
    eval "$as_ac_Lib=yes"
  else
    eval "$as_ac_Lib=no"
@@@ -15201,7 -15217,7 +15311,7 @@@ els
  fi
  
  	GLUT_LIBS=glut
- 	ac_fn_c_check_header_mongrel "$LINENO" "GL/glut.h" "ac_cv_header_GL_glut_h" "$ac_includes_default"
+ 	ac_fn_cxx_check_header_mongrel "$LINENO" "GL/glut.h" "ac_cv_header_GL_glut_h" "$ac_includes_default"
  if test "x$ac_cv_header_GL_glut_h" = x""yes; then :
    (test x$all = xtrue || test x$glut = xtrue) && GLUT_FLAGS=-DHAVE_GLUT
  else
@@@ -15229,7 -15245,7 +15339,7 @@@ return main ()
    return 0;
  }
  _ACEOF
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_cxx_try_link "$LINENO"; then :
    eval "$as_ac_Lib=yes"
  else
    eval "$as_ac_Lib=no"
@@@ -15291,7 -15307,7 +15401,7 @@@ els
  fi
  
  #AC_CHECK_HEADER(hdf5.h,[(test x$all = xtrue || test x$hdf5 = xtrue || test x$hdf5_18 = xtrue) && HDF5_FLAGS=-DHAVE_HDF5 AC_SUBST(HDF5_FLAGS)],
- ac_fn_c_check_header_mongrel "$LINENO" "hdf5.h" "ac_cv_header_hdf5_h" "$ac_includes_default"
+ ac_fn_cxx_check_header_mongrel "$LINENO" "hdf5.h" "ac_cv_header_hdf5_h" "$ac_includes_default"
  if test "x$ac_cv_header_hdf5_h" = x""yes; then :
    (test x$all = xtrue || test x$hdf5 = xtrue || test x$hdf5_18 = xtrue) && HDF5_FLAGS=-DHAVE_HDF5
  else
@@@ -15322,7 -15338,7 +15432,7 @@@ return main ()
    return 0;
  }
  _ACEOF
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_cxx_try_link "$LINENO"; then :
    ac_cv_lib_hdf5_main=yes
  else
    ac_cv_lib_hdf5_main=no
@@@ -15360,7 -15376,7 +15470,11 @@@ els
    hdf4=false
  fi
  
++<<<<<<< HEAD
 +ac_fn_c_check_header_mongrel "$LINENO" "hdf/mfhdf.h" "ac_cv_header_hdf_mfhdf_h" "$ac_includes_default"
++=======
+ ac_fn_cxx_check_header_mongrel "$LINENO" "hdf/mfhdf.h" "ac_cv_header_hdf_mfhdf_h" "$ac_includes_default"
++>>>>>>> upstream/1.11.1.1
  if test "x$ac_cv_header_hdf_mfhdf_h" = x""yes; then :
    (test x$all = xtrue || test x$hdf4 = xtrue) && HDF4_FLAGS=-DHAVE_HDF4
  else
@@@ -15388,7 -15404,7 +15502,11 @@@ return main ()
    return 0;
  }
  _ACEOF
++<<<<<<< HEAD
 +if ac_fn_c_try_link "$LINENO"; then :
++=======
+ if ac_fn_cxx_try_link "$LINENO"; then :
++>>>>>>> upstream/1.11.1.1
    ac_cv_lib_df_main=yes
  else
    ac_cv_lib_df_main=no
@@@ -15425,7 -15441,7 +15543,7 @@@ els
    gif=false
  fi
  
- ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
+ ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
  if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
    (test x$all = xtrue || test x$gif = xtrue) && GIF_FLAGS=-DHAVE_GIF
  else
@@@ -15453,7 -15469,7 +15571,7 @@@ return main ()
    return 0;
  }
  _ACEOF
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_cxx_try_link "$LINENO"; then :
    ac_cv_lib_gif_main=yes
  else
    ac_cv_lib_gif_main=no
@@@ -15479,7 -15495,7 +15597,7 @@@ els
  fi
  
  
- ac_fn_c_check_header_mongrel "$LINENO" "png.h" "ac_cv_header_png_h" "$ac_includes_default"
+ ac_fn_cxx_check_header_mongrel "$LINENO" "png.h" "ac_cv_header_png_h" "$ac_includes_default"
  if test "x$ac_cv_header_png_h" = x""yes; then :
  
  else
@@@ -15507,7 -15523,7 +15625,7 @@@ return main ()
    return 0;
  }
  _ACEOF
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_cxx_try_link "$LINENO"; then :
    ac_cv_lib_png_main=yes
  else
    ac_cv_lib_png_main=no
@@@ -15536,7 -15552,7 +15654,7 @@@ els
    jpeg=false
  fi
  
- ac_fn_c_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
+ ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
  if test "x$ac_cv_header_jpeglib_h" = x""yes; then :
    (test x$all = xtrue || test x$jpeg = xtrue) && JPEG_FLAGS=-DHAVE_JPEG
  else
@@@ -15564,7 -15580,7 +15682,7 @@@ return main ()
    return 0;
  }
  _ACEOF
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_cxx_try_link "$LINENO"; then :
    ac_cv_lib_jpeg_main=yes
  else
    ac_cv_lib_jpeg_main=no
@@@ -15590,6 -15606,179 +15708,179 @@@ els
  fi
  
  
+ # Check whether --enable-u3d was given.
+ if test "${enable_u3d+set}" = set; then :
+   enableval=$enable_u3d; case "${enableval}" in
+   yes) u3d=true ;;
+   no)  u3d=false ;;
+   *) as_fn_error $? "bad value ${enableval} for --enable-u3d" "$LINENO" 5  ;;
+ esac
+ else
+   u3d=false
+ fi
+ 
+ # Check whether --enable-pdf was given.
+ if test "${enable_pdf+set}" = set; then :
+   enableval=$enable_pdf; case "${enableval}" in
+   yes) pdf=true; u3d=true ;;
+   no)  pdf=false ;;
+   *) as_fn_error $? "bad value ${enableval} for --enable-pdf" "$LINENO" 5  ;;
+ esac
+ else
+   pdf=false
+ fi
+ 
+ if test "x$pdf" == xtrue; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lhpdf" >&5
+ $as_echo_n "checking for main in -lhpdf... " >&6; }
+ if test "${ac_cv_lib_hpdf_main+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lhpdf  $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ 
+ int
+ main ()
+ {
+ return main ();
+   ;
+   return 0;
+ }
+ _ACEOF
+ if ac_fn_cxx_try_link "$LINENO"; then :
+   ac_cv_lib_hpdf_main=yes
+ else
+   ac_cv_lib_hpdf_main=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+     conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hpdf_main" >&5
+ $as_echo "$ac_cv_lib_hpdf_main" >&6; }
+ if test "x$ac_cv_lib_hpdf_main" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBHPDF 1
+ _ACEOF
+ 
+   LIBS="-lhpdf $LIBS"
+ 
+ else
+   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ as_fn_error $? "--enable-pdf was given, but test for libharu failed
+ See \`config.log' for more details" "$LINENO" 5 ; }
+ 
+ fi
+ 
+ fi
+ if test "x$pdf" == xtrue; then :
+   for ac_header in hpdf.h
+ do :
+   ac_fn_cxx_check_header_mongrel "$LINENO" "hpdf.h" "ac_cv_header_hpdf_h" "$ac_includes_default"
+ if test "x$ac_cv_header_hpdf_h" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_HPDF_H 1
+ _ACEOF
+ 
+ else
+   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ as_fn_error $? "--enable-pdf was given, but test for headers failed
+ See \`config.log' for more details" "$LINENO" 5 ; }
+ 
+ fi
+ 
+ done
+ 
+ fi
+  if test x$pdf = xtrue; then
+   USE_PDF_TRUE=
+   USE_PDF_FALSE='#'
+ else
+   USE_PDF_TRUE='#'
+   USE_PDF_FALSE=
+ fi
+ 
+ 
+ if test "x$u3d" == xtrue; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lIDTF" >&5
+ $as_echo_n "checking for main in -lIDTF... " >&6; }
+ if test "${ac_cv_lib_IDTF_main+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lIDTF -lm -ldl $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ 
+ int
+ main ()
+ {
+ return main ();
+   ;
+   return 0;
+ }
+ _ACEOF
+ if ac_fn_cxx_try_link "$LINENO"; then :
+   ac_cv_lib_IDTF_main=yes
+ else
+   ac_cv_lib_IDTF_main=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+     conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_IDTF_main" >&5
+ $as_echo "$ac_cv_lib_IDTF_main" >&6; }
+ if test "x$ac_cv_lib_IDTF_main" = x""yes; then :
+   U3D_LIBS="-lIDTF -lm -ldl"
+ 
+ 
+ $as_echo "#define HAVE_U3D 1" >>confdefs.h
+ 
+ 
+ else
+   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ as_fn_error $? "--enable-u3d was given, but test for libIDTF failed
+ See \`config.log' for more details" "$LINENO" 5 ; }
+ fi
+ 
+ fi
+ if test "x$u3d" == xtrue; then :
+   for ac_header in u3d/SceneConverterLib.h
+ do :
+   ac_fn_cxx_check_header_mongrel "$LINENO" "u3d/SceneConverterLib.h" "ac_cv_header_u3d_SceneConverterLib_h" "$ac_includes_default"
+ if test "x$ac_cv_header_u3d_SceneConverterLib_h" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_U3D_SCENECONVERTERLIB_H 1
+ _ACEOF
+ 
+ else
+   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ as_fn_error $? "--enable-u3d was given, but test for headers failed
+ See \`config.log' for more details" "$LINENO" 5 ; }
+ 
+ fi
+ 
+ done
+ 
+ fi
+  if test x$u3d = xtrue; then
+   USE_U3D_TRUE=
+   USE_U3D_FALSE='#'
+ else
+   USE_U3D_TRUE='#'
+   USE_U3D_FALSE=
+ fi
+ 
+ 
  # Check whether --enable-fltk was given.
  if test "${enable_fltk+set}" = set; then :
    enableval=$enable_fltk; case "${enableval}" in
@@@ -16974,7 -17163,7 +17265,7 @@@ els
  fi
  
  
- AM_CXXFLAGS="-Wall $GSL_FLAGS"
+ AM_CXXFLAGS="$AM_CXXFLAGS -Wall $GSL_FLAGS"
  
  
  ac_config_files="$ac_config_files Makefile mgl/Makefile examples/Makefile include/Makefile lang/Makefile utils/Makefile widgets/Makefile"
@@@ -17127,6 -17316,14 +17418,17 @@@ Usually this means the macro was only i
  fi
  if test -z "${USE_JPEG_TRUE}" && test -z "${USE_JPEG_FALSE}"; then
    as_fn_error $? "conditional \"USE_JPEG\" was never defined.
++<<<<<<< HEAD
++=======
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
+ if test -z "${USE_PDF_TRUE}" && test -z "${USE_PDF_FALSE}"; then
+   as_fn_error $? "conditional \"USE_PDF\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
+ if test -z "${USE_U3D_TRUE}" && test -z "${USE_U3D_FALSE}"; then
+   as_fn_error $? "conditional \"USE_U3D\" was never defined.
++>>>>>>> upstream/1.11.1.1
  Usually this means the macro was only invoked conditionally." "$LINENO" 5
  fi
  if test -z "${USE_FLTK_TRUE}" && test -z "${USE_FLTK_FALSE}"; then
@@@ -17565,7 -17762,7 +17867,11 @@@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wr
  # report actual input values of CONFIG_FILES etc. instead of their
  # values after options handling.
  ac_log="
++<<<<<<< HEAD
 +This file was extended by mathgl $as_me 1.10, which was
++=======
+ This file was extended by mathgl $as_me 1.11, which was
++>>>>>>> upstream/1.11.1.1
  generated by GNU Autoconf 2.67.  Invocation command line was
  
    CONFIG_FILES    = $CONFIG_FILES
@@@ -17631,7 -17828,7 +17937,11 @@@ _ACEO
  cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
  ac_cs_version="\\
++<<<<<<< HEAD
 +mathgl config.status 1.10
++=======
+ mathgl config.status 1.11
++>>>>>>> upstream/1.11.1.1
  configured by $0, generated by GNU Autoconf 2.67,
    with options \\"\$ac_cs_config\\"
  
diff --combined configure.ac
index b4afae5,fc44305..1354803
--- a/configure.ac
+++ b/configure.ac
@@@ -1,12 -1,13 +1,16 @@@
- AC_INIT([mathgl], [1.10], [mathgl.abalakin at gmail.com])
+ AC_INIT([mathgl], [1.11], [mathgl.abalakin at gmail.com])
+ 
+ MGL_RELEASE=1.11
+ AC_SUBST(MGL_RELEASE)
  
 +MGL_RELEASE=1.10
 +AC_SUBST(MGL_RELEASE)
 +
  AC_CONFIG_MACRO_DIR([config])
  AC_CONFIG_AUX_DIR(config)
  AC_CONFIG_SRCDIR(mgl)
  AC_CONFIG_HEADER(include/mgl/config.h)
+ AC_LANG([C++])
  
  #MGL_RELEASE=1.4
  #AC_SUBST(MGL_RELEASE)
@@@ -228,6 -229,49 +232,49 @@@ AC_CHECK_LIB([jpeg], [main], [(test x$a
      [(test x$all = xtrue || test x$jpeg = xtrue) && echo "Please install jpeg library" && exit])
  AM_CONDITIONAL(USE_JPEG, (test x$all = xtrue || test x$jpeg = xtrue))
  
+ AC_ARG_ENABLE(u3d,
+ [  --enable-u3d    Turn on u3d functions],
+ [case "${enableval}" in
+   yes) u3d=true ;;
+   no)  u3d=false ;;
+   *) AC_MSG_ERROR(bad value ${enableval} for --enable-u3d) ;;
+ esac],[u3d=false])
+ AC_ARG_ENABLE(pdf,
+ [  --enable-pdf    Turn on u3d and pdf functions],
+ [case "${enableval}" in
+   yes) pdf=true; u3d=true ;;
+   no)  pdf=false ;;
+   *) AC_MSG_ERROR(bad value ${enableval} for --enable-pdf) ;;
+ esac],[pdf=false])
+ AS_IF([test "x$pdf" == xtrue],
+   [AC_CHECK_LIB([hpdf], [main],
+    [],
+    [AC_MSG_FAILURE(
+    [--enable-pdf was given, but test for libharu failed])]
+   )])
+ AS_IF([test "x$pdf" == xtrue],
+   [AC_CHECK_HEADERS([hpdf.h], [],
+   [AC_MSG_FAILURE(
+   [--enable-pdf was given, but test for headers failed])]
+   )])
+ AM_CONDITIONAL(USE_PDF, test x$pdf = xtrue)
+ 
+ AS_IF([test "x$u3d" == xtrue],
+   [AC_CHECK_LIB([IDTF], [main],
+   [AC_SUBST([U3D_LIBS], ["-lIDTF -lm -ldl"])
+   AC_DEFINE([HAVE_U3D], [1],
+   [Define if you have libIDTF])
+   ],
+   [AC_MSG_FAILURE(
+   [--enable-u3d was given, but test for libIDTF failed])],
+   [-lm -ldl])])
+ AS_IF([test "x$u3d" == xtrue],
+   [AC_CHECK_HEADERS([u3d/SceneConverterLib.h], [],
+   [AC_MSG_FAILURE(
+   [--enable-u3d was given, but test for headers failed])]
+   )])
+ AM_CONDITIONAL(USE_U3D, test x$u3d = xtrue)
+ 
  AC_ARG_ENABLE(fltk,
  [  --enable-fltk    Turn on fltk],
  [case "${enableval}" in
@@@ -346,7 -390,7 +393,7 @@@ if (test x$docs = xtrue || test x$all 
  fi
  AM_CONDITIONAL(USE_DOCS, (test x$docs = xtrue || test x$all = xtrue) )
  
- AM_CXXFLAGS="-Wall $GSL_FLAGS"
+ AM_CXXFLAGS="$AM_CXXFLAGS -Wall $GSL_FLAGS"
  AC_SUBST(AM_CXXFLAGS)
  
  AC_CONFIG_FILES([
diff --combined examples/full_test.cpp
index df3af66,0827244..41a8d98
--- a/examples/full_test.cpp
+++ b/examples/full_test.cpp
@@@ -91,6 -91,8 +91,8 @@@ static struct option longopts[] 
  	{ "gif",			no_argument,	&type,		6 },
  	{ "none",			no_argument,	&type,		7 },
  	{ "bps",			no_argument,	&type,		8 },
+ 	{ "u3d",			no_argument,	&type,		9 },
+ 	{ "pdf",			no_argument,	&type,		10 },
  	{ "help",			no_argument,	NULL,		'?' },
  	{ NULL,				0,				NULL,		0 }
  };
@@@ -104,6 -106,8 +106,8 @@@ void usage(
  		"-mini			- png picture is 200x133\n"		\
  		"-big			- png picture is 1200x800\n"	\
  		"-idtf			- output idtf\n"				\
+ 		"-u3d			- output u3d\n"				\
+ 		"-pdf			- output pdf\n"				\
  		"-eps			- output EPS\n"					\
  		"-jpeg			- output JPEG\n"				\
  		"-solid			- output solid PNG\n"			\
@@@ -149,6 -153,12 +153,12 @@@ void save(mglGraph *gr,const char *name
  			sprintf(buf,"%s%s.png",name,suf);
  			gr->WritePNG(buf,0,false);
  			break;
+ 		case 9:	// U3D
+ 			sprintf(buf,"%s%s.u3d",name,suf);
+ 			gr->WriteU3D(buf);	break;
+ 		case 10:	// PDF
+ 			sprintf(buf,"%s%s.pdf",name,suf);
+ 			gr->WritePDF(buf);	break;
  		default:// PNG (no alpha)
  			sprintf(buf,"%s%s.png",name,suf);
  			gr->WritePNG(buf,0,false);	break;
@@@ -183,6 -193,9 +193,9 @@@ void smgl_fonts(mglGraph *gr)	// ticks 
  //-----------------------------------------------------------------------------
  void smgl_stick(mglGraph *gr)	// column plot
  {
+ 	if(type==5 || type==9 || type==10)	
+ 		gr->Puts(mglPoint(0,0),"Does not work in 3D\\n for reasons I do not care to investigate till 2.0");
+ 
  	gr->SetRanges(-1, 1, -1, 1, 0, 1);	gr->Light(true);
  	gr->StickPlot(3, 0, 40, 30);		gr->Axis("xyz_");
  	gr->Surf("exp(-10*y^2-6*x^2)");
@@@ -354,7 -367,7 +367,7 @@@ void smgl_pde(mglGraph *gr)	// PDE and 
  	a.Transpose("yxz");
  	gr->CAxis(0, 1);
  	gr->Dens(a,"wyrRk");
- 	gr->Plot("-x", "k|", type==5?0.01:NAN);
+ 	gr->Plot("-x", "k|", (type==5 || type==9 || type==10)?0.01:NAN);
  	gr->Puts(mglPoint(0, 0.85), "absorption: (x+z)/2 for x+z>0");
  	gr->Title("Equation: ik_0\\partial_zu + \\Delta u + x\\cdot u + i \\frac{x+z}{2}\\cdot u = 0", "C", -float(width)/height);
  	gr->Compression(false);  //put setting back
@@@ -467,6 -480,7 +480,7 @@@ void smgl_samplec(mglGraph *gr)	// erro
  	for(int i=0;i<10;i++)
  		gr->Error(mglPoint(mgl_rnd()-0.5,mgl_rnd()-0.5,mgl_rnd()-0.5), mglPoint(0.1,0.1,0.1),"bo");
  	gr->Axis();
+ 	gr->Rotate(0,0); // for unrotate in IDTF
  }
  //-----------------------------------------------------------------------------
  void smgl_sampleb(mglGraph *gr)	// Gaussian beam
@@@ -561,6 -575,8 +575,8 @@@ void smgl_sample8(mglGraph *gr)	// 1d p
  
  	gr->SubPlot(2,2,3);	gr->Rotate(60,40);
  	gr->Bars(x,y0,z,"ri");		gr->Box();
+ 	
+ 	gr->Rotate(0,0); // for unrotate in IDTF
  }
  //-----------------------------------------------------------------------------
  void smgl_sample7(mglGraph *gr)	// smoothing
@@@ -600,7 -616,7 +616,11 @@@ void smgl_sample6(mglGraph *gr)	// diff
  //-----------------------------------------------------------------------------
  void smgl_sample5(mglGraph *gr)	// pen styles
  {
++<<<<<<< HEAD
 +	if(type==5)	gr->Puts(mglPoint(0,1.2),"line styles not supported","rL");
++=======
+ 	if(type==5 || type==9 || type==10)	gr->Puts(mglPoint(0,1.2),"line styles not supported","rL");
++>>>>>>> upstream/1.11.1.1
  	mreal d,x1,x2,x0,y=0.95;
  	d=0.3, x0=0.2, x1=0.5, x2=0.6;
  	gr->Line(mglPoint(x0,1-0*d),mglPoint(x1,1-0*d),"k-");	gr->Puts(mglPoint(x2,y-0*d),"Solid '-'","rL");
@@@ -732,6 -748,8 +752,8 @@@ void smgl_sample2(mglGraph *gr)	// axi
  	gr->Label('z',"Z axis",0);
  	gr->Puts(mglPoint(0,0,1.5),"Remove X axis, and");
  	gr->Puts(mglPoint(0,0,1.2),"decrease number of ticks");
+ 	
+ 	gr->Rotate(0,0); // for unrotate in IDTF
  }
  //-----------------------------------------------------------------------------
  void smgl_sample1(mglGraph *gr)	// transformation
@@@ -757,6 -775,7 +779,7 @@@
  	gr->Aspect(1,2,2);
  	gr->Box();
  	gr->Text(mglPoint(0,0,1.5),"Aspect in other direction");
+ 	gr->Rotate(0,0); // for unrotate in IDTF
  }
  //-----------------------------------------------------------------------------
  void mgls_prepare1d(mglData *y, mglData *y1=0, mglData *y2=0, mglData *x1=0, mglData *x2=0)
@@@ -1021,6 -1040,7 +1044,10 @@@ void smgl_stereo(mglGraph *gr
  	gr->Box();	gr->Surf(a);
  	gr->SubPlot(2,1,1);	gr->Rotate(40,60-3);
  	gr->Box();	gr->Surf(a);
++<<<<<<< HEAD
++=======
+ 	gr->Rotate(0,0); // for unrotate in IDTF
++>>>>>>> upstream/1.11.1.1
  }
  //-----------------------------------------------------------------------------
  void smgl_tile(mglGraph *gr)
@@@ -1083,7 -1103,7 +1110,7 @@@ void smgl_surf_fog(mglGraph *gr
  {
  	mglData a;	mgls_prepare2d(&a);
  	gr->Light(true);	gr->Rotate(40,60);	gr->Fog(1);	gr->Box();
- 	type==5?gr->Text(mglPoint(),"Fog not supported") : gr->Surf(a);
+ 	(type==5 || type==9 || type==10)?gr->Text(mglPoint(),"Fog not supported") : gr->Surf(a);
  	gr->Fog(0);
  }
  //-----------------------------------------------------------------------------
@@@ -1205,7 -1225,7 +1232,7 @@@ void smgl_cloudp(mglGraph *gr
  	mglData c;	mgls_prepare3d(&c);
  	gr->Rotate(40,60);	gr->Alpha(true);	gr->VertexColor(false);
  	gr->Box();
- 	if(type==5)	gr->Text(mglPoint(0,0,0),"Point clouds not supported");
+ 	if(type==5 || type==9 || type==10)	gr->Text(mglPoint(0,0,0),"Point clouds not supported");
  	else		gr->CloudP(c,"wyrRk");
  }
  //-----------------------------------------------------------------------------
@@@ -1361,14 -1381,14 +1388,14 @@@ void smgl_legend(mglGraph *gr
  	}
  	gr->Axis(mglPoint(0), mglPoint(1));
  	gr->Box();	gr->Plot(f);	gr->Axis("xy");
- 	if(type==5)	gr->LegendBox = false;
+ 	if(type==5 || type==9 || type==10)	gr->LegendBox = false;
  	gr->AddLegend("sin(\\pi {x^2})","b");	gr->AddLegend("sin(\\pi x)","g*");
  	gr->AddLegend("sin(\\pi \\sqrt{x})","r+");	gr->Legend();
  }
  //-----------------------------------------------------------------------------
  void smgl_type0(mglGraph *gr)	// TranspType = 0
  {
- 	if(type==5)	return;
+ 	if(type==5 || type==9 || type==10)	return;
  	gr->Alpha(true);	gr->Light(true);	gr->Light(0,mglPoint(0,0,1));
  	mglData a;	mgls_prepare2d(&a);
  	gr->TranspType = 0;	gr->Clf();
@@@ -1380,7 -1400,7 +1407,7 @@@
  //-----------------------------------------------------------------------------
  void smgl_type1(mglGraph *gr)	// TranspType = 1
  {
- 	if(type==5)	return;
+ 	if(type==5 || type==9 || type==10)	return;
  	gr->Alpha(true);	gr->Light(true);	gr->Light(0,mglPoint(0,0,1));
  	mglData a;	mgls_prepare2d(&a);
  	gr->TranspType = 1;	gr->Clf();
@@@ -1392,7 -1412,7 +1419,7 @@@
  //-----------------------------------------------------------------------------
  void smgl_type2(mglGraph *gr)	// TranspType = 2
  {
- 	if(type==5)	return;
+ 	if(type==5 || type==9 || type==10)	return;
  	gr->Alpha(true);	gr->Light(true);	gr->Light(0,mglPoint(0,0,1));
  	mglData a;	mgls_prepare2d(&a);
  	gr->TranspType = 2;	gr->Clf();
@@@ -1624,7 -1644,7 +1651,7 @@@ void smgl_flow_dens(mglGraph *gr)	// fl
  {
  	mglData a,b,d;	mgls_prepare2v(&a,&b);	d = a;
  	for(int i=0;i<a.nx*a.ny;i++)	d.a[i] = hypot(a.a[i],b.a[i]);
- 	gr->Flow(a,b,"br",5,true,type==5?-0.99:NAN);
+ 	gr->Flow(a,b,"br",5,true,(type==5 || type==9 || type==10)?-0.99:NAN);
  	gr->Dens(d,"BbcyrR");	gr->Box();
  }
  //-----------------------------------------------------------------------------
@@@ -1756,9 -1776,17 +1783,17 @@@ int main(int argc,char **argv
  			default:	usage();	return 0;
  		}
  
- 	if(type==5)			gr = &u3d;
- 	else if(type==1 || type==2 || type==8)	gr = &ps;
+ 	if(type==5 || type==9 || type==10)
+ 	{
+ 		u3d.unrotate_flag = true;
+ 		gr = &u3d;
+ 	}
+ 	else 
+ 	{
+ 		if(type==1 || type==2 || type==8)	gr = &ps;
  	else				gr = &zb;
+ 	}
+ 
  	if(mini)		{	gr->SetSize(200,133);	suf = "_sm";	}
  	else if(big)
  	{	gr->SetSize(1200,800);	suf = "_lg";	gr->BaseLineWidth = 2;	}
diff --combined include/mgl/mgl.h
index b9aa8a4,5ebe75d..28eb3fc
--- a/include/mgl/mgl.h
+++ b/include/mgl/mgl.h
@@@ -177,6 -177,10 +177,10 @@@ public
  	virtual void WriteSVG(const char *fname,const char *descr=0);
  	/// Write the frame in file using IDTF format
  	virtual void WriteIDTF(const char *fname,const char *descr=0);
+ 	/// Write the frame in file using U3D format
+ 	virtual void WriteU3D(const char *fname,const char *descr=0);
+ 	/// Write the frame in file using PDF format
+ 	virtual void WritePDF(const char *fname,const char *descr=0);
  	/// Write the frame in file using GIF format (only for current frame!)
  	virtual void WriteGIF(const char *fname,const char *descr=0);
  	/// Write the frame in file (depending extension, write current frame if fname is empty)
@@@ -215,11 -219,11 +219,11 @@@
  	/// Switch on/off the specified light source.
  	virtual void Light(int n, bool enable); //=0
  	/// Add a light source.
- 	void Light(int n,mglPoint p, char c='w', mreal bright=0.5, bool infty=true);
+ 	void Light(int n,mglPoint p, char c='w', mreal bright=0.5, bool infty=true, mreal ap=0);
  	inline void AddLight(int n, mreal x, mreal y, mreal z, char col='w')
  	{	Light(n, mglPoint(x,y,z), col);	};
  	/// Add a light source.
- 	virtual void Light(int n,mglPoint p, mglColor c, mreal bright=0.5, bool infty=true); //=0
+ 	virtual void Light(int n,mglPoint p, mglColor c, mreal bright=0.5, bool infty=true, mreal ap=0); //=0
  	/// Set ambient light brightness
  	virtual void Ambient(mreal bright=0.5);
  	/// Set relative width of rectangles in Bars, Barh, BoxPlot
@@@ -294,7 -298,7 +298,11 @@@
  	/// Set angle of view indepently from mglGraph::Rotate().
  	virtual void View(mreal tetx,mreal tetz,mreal tety=0);
  	inline int GetWarn()	{	return WarnCode;	};
++<<<<<<< HEAD
 +	void DefaultPlotParam();	///< Set default parameter for plotting
++=======
+ 	virtual void DefaultPlotParam();	///< Set default parameter for plotting
++>>>>>>> upstream/1.11.1.1
  	/// Zoom in or zoom out (if Zoom(0, 0, 1, 1)) a part of picture
  	void Zoom(mreal x1, mreal y1, mreal x2, mreal y2);
  	/// Clear transformation matrix.
@@@ -317,7 -321,7 +325,7 @@@
  	/// Set aspect ratio for further plotting.
  	virtual void Aspect(mreal Ax,mreal Ay,mreal Az)=0;
  	/// Rotate a further plotting.
- 	void Rotate(mreal TetX,mreal TetZ,mreal TetY=0);
+ 	virtual void Rotate(mreal TetX,mreal TetZ,mreal TetY=0);
  	/// Rotate a further plotting around vector {x,y,z}.
  	virtual void RotateN(mreal Tet,mreal x,mreal y,mreal z)=0;
  	/// Set perspective (in range [0,1)) for plot. Set to zero for switching off.
diff --combined include/mgl/mgl_ab.h
index 862f52a,9b29346..c24cf34
--- a/include/mgl/mgl_ab.h
+++ b/include/mgl/mgl_ab.h
@@@ -52,9 -52,11 +52,15 @@@ using mglGraph::Legend
  	bool Alpha(bool enable);
  	bool Light(bool enable);
  	void Light(int n, bool enable);
- 	void Light(int n,mglPoint p, mglColor c=WC, mreal br=0.5, bool infty=true);
+ 	void Light(int n,mglPoint p, mglColor c=WC, mreal br=0.5, bool infty=true, mreal ap=0);
  
++<<<<<<< HEAD
 +	void InPlot(mreal x1,mreal x2,mreal y1,mreal y2, bool rel=false);
++=======
+ 	virtual void InPlot(mreal x1,mreal x2,mreal y1,mreal y2, bool rel=false);
+ 	virtual void DefaultPlotParam();	///< Set default parameter for plotting
+ 	virtual void Rotate(mreal TetX,mreal TetZ,mreal TetY=0);
++>>>>>>> upstream/1.11.1.1
  	void StickPlot(int num, int i, mreal tet, mreal phi);
  	void Aspect(mreal Ax,mreal Ay,mreal Az);
  	void RotateN(mreal Tet,mreal x,mreal y,mreal z);
diff --combined include/mgl/mgl_define.h
index 6c85c13,fdba9fd..c73a394
--- a/include/mgl/mgl_define.h
+++ b/include/mgl/mgl_define.h
@@@ -31,6 -31,7 +31,10 @@@
  
  //#ifdef WIN32
  #ifdef _MSC_VER
++<<<<<<< HEAD
++=======
+ #define chdir	_chdir // BORLAND has chdir
++>>>>>>> upstream/1.11.1.1
  #include <float.h>
  const unsigned long mgl_nan[2] = {0xffffffff, 0x7fffffff};
  #define NANd	(*(double*)mgl_nan)
@@@ -39,9 -40,6 +43,12 @@@
  #define NAN		NANd
  #else
  #define NAN		NANd
++<<<<<<< HEAD
 +#endif
 +#ifdef _MSC_VER
 +#define chdir	_chdir // BORLAND has chdir
++=======
++>>>>>>> upstream/1.11.1.1
  #endif
  #endif
  
diff --combined mgl/Makefile.in
index 899e46b,877f8aa..6106989
--- a/mgl/Makefile.in
+++ b/mgl/Makefile.in
@@@ -44,6 -44,7 +44,10 @@@ host_triplet = @host
  @USE_HDF5_TRUE at am__append_8 = $(HDF5_LIBS)
  @USE_GIF_TRUE at am__append_9 = $(GIF_LIBS)
  @USE_JPEG_TRUE at am__append_10 = $(JPEG_LIBS)
++<<<<<<< HEAD
++=======
+ @USE_U3D_TRUE at am__append_11 = $(U3D_LIBS)
++>>>>>>> upstream/1.11.1.1
  subdir = mgl
  DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@@ -85,10 -86,12 +89,19 @@@ am__DEPENDENCIES_1 
  @USE_HDF5_TRUE at am__DEPENDENCIES_5 = $(am__DEPENDENCIES_1)
  @USE_GIF_TRUE at am__DEPENDENCIES_6 = $(am__DEPENDENCIES_1)
  @USE_JPEG_TRUE at am__DEPENDENCIES_7 = $(am__DEPENDENCIES_1)
++<<<<<<< HEAD
 +libmgl_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 +	$(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \
 +	$(am__DEPENDENCIES_4) $(am__DEPENDENCIES_5) \
 +	$(am__DEPENDENCIES_6) $(am__DEPENDENCIES_7)
++=======
+ @USE_U3D_TRUE at am__DEPENDENCIES_8 = $(am__DEPENDENCIES_1)
+ libmgl_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ 	$(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \
+ 	$(am__DEPENDENCIES_4) $(am__DEPENDENCIES_5) \
+ 	$(am__DEPENDENCIES_6) $(am__DEPENDENCIES_7) \
+ 	$(am__DEPENDENCIES_8)
++>>>>>>> upstream/1.11.1.1
  am_libmgl_la_OBJECTS = libmgl_la-mgl_data_cf.lo libmgl_la-mgl_axis.lo \
  	libmgl_la-mgl_data_png.lo libmgl_la-mgl_zb2.lo \
  	libmgl_la-mgl_c.lo libmgl_la-mgl_eps.lo libmgl_la-mgl_font.lo \
@@@ -240,6 -243,7 +253,7 @@@ SET_MAKE = @SET_MAKE
  SHELL = @SHELL@
  STRIP = @STRIP@
  TMPDIR = @TMPDIR@
+ U3D_LIBS = @U3D_LIBS@
  UIC = @UIC@
  VERSION = @VERSION@
  WX_FLAGS = @WX_FLAGS@
@@@ -306,7 -310,7 +320,11 @@@ WIDGETS = $(am__append_1) $(am__append_
  	$(am__append_4)
  libmgl_la_LIBADD = $(PNG_LIBS) $(GL_LIBS) $(LOPENMP) $(am__append_5) \
  	$(am__append_6) $(am__append_7) $(am__append_8) \
++<<<<<<< HEAD
 +	$(am__append_9) $(am__append_10)
++=======
+ 	$(am__append_9) $(am__append_10) $(am__append_11)
++>>>>>>> upstream/1.11.1.1
  libmgl_la_LDFLAGS = -no-undefined -version-info $(MGL_CURRENT):$(MGL_REVISION):$(MGL_AGE)
  libmgl_la_CXXFLAGS = $(WIDGETS) -DMGL_FONT_PATH=\"$(datadir)/$(PACKAGE)/fonts/\" \
      -DMOD_LIB_DIR=\"$(libdir)/mgl/\" $(HDF5_FLAGS) $(HDF4_FLAGS) $(GIF_FLAGS) $(JPEG_FLAGS) \
diff --combined mgl/mgl_ab.cpp
index 53dba12,072df2f..5b69427
--- a/mgl/mgl_ab.cpp
+++ b/mgl/mgl_ab.cpp
@@@ -2,24 -2,24 +2,24 @@@
   * mgl_ab.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.             *
-  ***************************************************************************/
+  *   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 <time.h>
 -#include <wchar.h>
 +#include <wchar.h>
  
  #include "mgl/mgl_ab.h"
  #define imax(a,b)	(a)>(b) ? (a) : (b)
@@@ -45,6 -45,16 +45,19 @@@ mglGraphAB::mglGraphAB(int w,int h) : m
  //-----------------------------------------------------------------------------
  mglGraphAB::~mglGraphAB()
  {	if(G)	{	delete []G;	delete []G4;	delete []OI;	}	}
++<<<<<<< HEAD
++=======
+ //-----------------------------------------------------------------------------
+ void mglGraphAB::DefaultPlotParam()
+ {
+ 	mglGraph::DefaultPlotParam();
+ }
+ //-----------------------------------------------------------------------------
+ void mglGraphAB::Rotate(mreal TetX,mreal TetZ,mreal TetY)
+ {
+ 	mglGraph::Rotate( TetX,TetZ,TetY );
+ }
++>>>>>>> upstream/1.11.1.1
  //-----------------------------------------------------------------------------
  void mglGraphAB::Pop()
  {
@@@ -126,7 -136,7 +139,7 @@@ void mglGraphAB::RotateN(mreal Tet,mrea
  	{
  		mreal m=(fabs(B[3])+fabs(B[4])+fabs(B[5]))/inH;
  		mreal n=(fabs(B[0])+fabs(B[1])+fabs(B[2]))/inW;
- 		PlotFactor = 1.55+0.6147*(m<n ? (n-1):(m-1));
+ 		PlotFactor = 1.55+0.6147*(m<n ? (n-1):(m-1));
  	}
  }
  //-----------------------------------------------------------------------------
@@@ -154,7 -164,7 +167,7 @@@ void mglGraphAB::InPlot(mreal x1,mreal 
  		B[8] = sqrt(B[0]*B[4]);
  		B1[11]= zPos = (1.f-B[8]/(2*Depth))*Depth;
  		memcpy(B1,B,9*sizeof(mreal));
- 	}
+ 	}
  	inW = B[0];	inH=B[4];
  	font_factor = B[0] < B[4] ? B[0] : B[4];
  	if(AutoPlotFactor) PlotFactor = 1.55;	// Automatically change plot factor !!!
@@@ -173,21 -183,21 +186,21 @@@ void mglGraphAB::Aspect(mreal Ax,mreal 
  }
  //-----------------------------------------------------------------------------
  void mglGraphAB::StickPlot(int num, int id, mreal tet, mreal phi)
- {
- 	mreal dx,dy,w0,h0, p[6]={-1,0,0,1,0,0};
- 	InPlot(0,1,0,1,true);	Rotate(tet, phi);	PostScale(p,2);
- 	w0=1/(1+(num-1)*fabs(p[3]-p[0])/inW);		dx=(p[3]-p[0])*w0/inW;
- 	h0=1/(1+(num-1)*fabs(p[4]-p[1])/inH);		dy=(p[4]-p[1])*h0/inH;
- 
- 	p[0]=-1;	p[3]=1;		p[1]=p[2]=p[4]=p[5]=0;	// extra widening
- 	InPlot(dx>0?0:1-w0, dx>0?w0:1, dy>0?0:1-h0, dy>0?h0:1, true);
- 	Rotate(tet,phi);	PostScale(p,2);
- 	w0=1/(1+(num-1)*fabs(p[3]-p[0])/inW);		dx=(p[3]-p[0])*w0/inW;
- 	h0=1/(1+(num-1)*fabs(p[4]-p[1])/inH);		dy=(p[4]-p[1])*h0/inH;
- 
- 	mreal x1=dx>0?dx*id:1-w0+dx*id, x2=dx>0?w0+dx*id:1+dx*id;
- 	mreal y1=dy>0?dy*id:1-h0+dy*id, y2=dy>0?h0+dy*id:1+dy*id;
- 	InPlot(x1, x2, y1, y2, true);	Rotate(tet,phi);
+ {
+ 	mreal dx,dy,w0,h0, p[6]={-1,0,0,1,0,0};
+ 	InPlot(0,1,0,1,true);	Rotate(tet, phi);	PostScale(p,2);
+ 	w0=1/(1+(num-1)*fabs(p[3]-p[0])/inW);		dx=(p[3]-p[0])*w0/inW;
+ 	h0=1/(1+(num-1)*fabs(p[4]-p[1])/inH);		dy=(p[4]-p[1])*h0/inH;
+ 
+ 	p[0]=-1;	p[3]=1;		p[1]=p[2]=p[4]=p[5]=0;	// extra widening
+ 	InPlot(dx>0?0:1-w0, dx>0?w0:1, dy>0?0:1-h0, dy>0?h0:1, true);
+ 	Rotate(tet,phi);	PostScale(p,2);
+ 	w0=1/(1+(num-1)*fabs(p[3]-p[0])/inW);		dx=(p[3]-p[0])*w0/inW;
+ 	h0=1/(1+(num-1)*fabs(p[4]-p[1])/inH);		dy=(p[4]-p[1])*h0/inH;
+ 
+ 	mreal x1=dx>0?dx*id:1-w0+dx*id, x2=dx>0?w0+dx*id:1+dx*id;
+ 	mreal y1=dy>0?dy*id:1-h0+dy*id, y2=dy>0?h0+dy*id:1+dy*id;
+ 	InPlot(x1, x2, y1, y2, true);	Rotate(tet,phi);
  }
  //-----------------------------------------------------------------------------
  void mglGraphAB::NormScale(mreal *p,long n)
@@@ -256,18 -266,18 +269,18 @@@ mglPoint mglGraphAB::CalcXYZ(int xs, in
  					Min.y + (Max.y-Min.y)*(y+1)/2,
  					Min.z + (Max.z-Min.z)*(z+1)/2);
  	return LastMousePos;
- }
- //-----------------------------------------------------------------------------
- void mglGraphAB::CalcScr(mglPoint p, int *xs, int *ys)
- {
- 	mreal pp[3]={p.x,p.y,p.z};
- 	ScalePoint(pp[0],pp[1],pp[2]);
- 	PostScale (pp,1);
- 	if(xs)	*xs=int(pp[0]);
- 	if(ys)	*ys=int(pp[1]);
- }
- //-----------------------------------------------------------------------------
- mglPoint mglGraphAB::CalcScr(mglPoint p)
+ }
+ //-----------------------------------------------------------------------------
+ void mglGraphAB::CalcScr(mglPoint p, int *xs, int *ys)
+ {
+ 	mreal pp[3]={p.x,p.y,p.z};
+ 	ScalePoint(pp[0],pp[1],pp[2]);
+ 	PostScale (pp,1);
+ 	if(xs)	*xs=int(pp[0]);
+ 	if(ys)	*ys=int(pp[1]);
+ }
+ //-----------------------------------------------------------------------------
+ mglPoint mglGraphAB::CalcScr(mglPoint p)
  {	int x,y;	CalcScr(p,&x,&y);	return mglPoint(x,y);	}
  //-----------------------------------------------------------------------------
  void mglGraphAB::LightScale()
@@@ -293,10 -303,11 +306,11 @@@ void mglGraphAB::Light(int n, bool enab
  	nLight[n] = enable;
  }
  //-----------------------------------------------------------------------------
- void mglGraphAB::Light(int n, mglPoint p, mglColor c, mreal br, bool inf)
+ void mglGraphAB::Light(int n, mglPoint p, mglColor c, mreal br, bool inf, mreal ap)
  {
  	if(n<0 || n>9)	{	SetWarn(mglWarnLId);	return;	}
- 	nLight[n] = true;	aLight[n] = 3;	bLight[n] = br;	iLight[n] = inf;
+ 	nLight[n] = true;	aLight[n] = ap>0?ap*ap:3;
+ 	bLight[n] = br;		iLight[n] = inf;
  	rLight[3*n] = p.x;	rLight[3*n+1] = p.y;	rLight[3*n+2] = p.z;
  	cLight[3*n] = c.r;	cLight[3*n+1] = c.g;	cLight[3*n+2] = c.b;
  }
@@@ -351,27 -362,27 +365,47 @@@ mreal mglGraphAB::Putsw(mglPoint p,mglP
  }
  //-----------------------------------------------------------------------------
  void mglGraphAB::Putsw(mglPoint p, const wchar_t *wcs, const char *font, mreal size, char dir, mreal sh)
- {
+ {
  	static int nl_shift = 0;
- 	static int cgid=1;	StartGroup("Putsw",cgid++);
+ 	static int cgid=1;	StartGroup("Putsw",cgid++);
  	if(font && strchr(font, 'A'))	{	Labelw(p.x, p.y, wcs,font,size,false);	return;	}
++<<<<<<< HEAD
 +	if(font && strchr(font, 'a'))	{	Labelw(p.x, p.y, wcs,font,size,true);	return;	}
 +
 +	wchar_t *wcl;
 +	unsigned wn=0;
 +	const wchar_t *wnl=0;
 +	for(wn=0;wn<wcslen(wcs);wn++)
 +		if(wcs[wn]=='\n' || (wcs[wn]=='\\' && wcs[wn+1]=='n' && strchr(" \t,.{[]1234567890",wcs[wn+2])))
 +		{	wnl = wcs+wn;	break;	}
 +	if(wnl)
 +	{
 +		wcl = new wchar_t[wn+1];	memcpy(wcl,wcs,wn*sizeof(wchar_t));
 +		wcl[wn]=0;	Putsw(p, wcl, font, size, dir, sh);
 +		wnl = wcs[wn]=='\n'?wnl+1:wnl+2;
 +		if(*wnl<=' ')	wnl++;
 +		nl_shift++;	Putsw(p, wnl, font, size, dir, sh);	nl_shift--;
 +		return;
 +	}
++=======
+ 	if(font && strchr(font, 'a'))	{	Labelw(p.x, p.y, wcs,font,size,true);	return;	}
+ 
+ 	wchar_t *wcl;
+ 	unsigned wn=0;
+ 	const wchar_t *wnl=0;
+ 	for(wn=0;wn<wcslen(wcs);wn++)
+ 		if(wcs[wn]=='\n' || (wcs[wn]=='\\' && wcs[wn+1]=='n' && strchr(" \t,.{[]1234567890",wcs[wn+2])))
+ 		{	wnl = wcs+wn;	break;	}
+ 	if(wnl)
+ 	{
+ 		wcl = new wchar_t[wn+1];	memcpy(wcl,wcs,wn*sizeof(wchar_t));
+ 		wcl[wn]=0;	Putsw(p, wcl, font, size, dir, sh);
+ 		wnl = wcs[wn]=='\n'?wnl+1:wnl+2;
+ 		if(*wnl<=' ')	wnl++;
+ 		nl_shift++;	Putsw(p, wnl, font, size, dir, sh);	nl_shift--;
+ 		return;
+ 	}
++>>>>>>> upstream/1.11.1.1
  
  	bool upside = ( (((_sx==-1) ^ (Org.y==Max.y || Org.z==Max.z)) && (dir=='x' || dir=='X')) ||
  					(((_sy==-1) ^ (Org.x==Max.x || Org.z==Max.z)) && (dir=='y' || dir=='Y')) ||
@@@ -448,7 -459,7 +482,7 @@@
  		mreal ss = (pp[3]>pp[0] || tet==-90) ? 1 : -1;
  		xPos = pp[0]+shift*ss*(pp[4]-pp[1])/sqrt(ll) - B[1]*0.02f;
  		yPos = pp[1]-shift*ss*(pp[3]-pp[0])/sqrt(ll) - B[4]*0.02f;
- 		zPos = pp[2];
+ 		zPos = pp[2];
  	}
  	else
  	{
@@@ -473,7 -484,7 +507,11 @@@
  			strcat(font1,ch);
  		}
  	}
++<<<<<<< HEAD
 +	zoomx1=x1;	zoomx2=x2;	zoomy1=y1;	zoomy2=y2;
++=======
+ 	zoomx1=x1;	zoomx2=x2;	zoomy1=y1;	zoomy2=y2;
++>>>>>>> upstream/1.11.1.1
  	yPos -= nl_shift*0.11/PlotFactor*fsize;
  	fnt->Puts(wcs,font1,col);
  	Pop();	delete []font1;	EndGroup();
@@@ -488,7 -499,7 +526,11 @@@ void mglGraphAB::Legend(int n, wchar_t 
  	static int cgid=1;	StartGroup("Legend",cgid++);
  	mreal pp[15], r=GetRatio(), rh, rw, s3=PlotFactor;
  	if(size<=0)	size = -size*FontSize;
++<<<<<<< HEAD
 +	if(!font || !(*font))	font="L";
++=======
+ 	if(!font || !(*font))	font="L";
++>>>>>>> upstream/1.11.1.1
  	char *pA, *ff = new char[strlen(font)+1];	strcpy(ff,font);
  	llen *= 1.5;
  
@@@ -503,12 -514,12 +545,21 @@@
  		w = w>j ? w:j;
  	}
  	w = (w + llen*1.1f);	// add space for lines
++<<<<<<< HEAD
 +
 +	bool rel = true;
 +	if((pA=strchr(ff,'A')))
 +	{
 +		*pA = 'L';
 +		rel = false;
++=======
+ 
+ 	bool rel = true;
+ 	if((pA=strchr(ff,'A')))
+ 	{
+ 		*pA = 'L';
+ 		rel = false;
++>>>>>>> upstream/1.11.1.1
  	}
  	Push();	Identity(rel);	//	memcpy(B,B1,9*sizeof(mreal));
  	if(LegendBox)	// draw bounding box
@@@ -536,12 -547,12 +587,21 @@@
  //		ScalePoint(pp[0],pp[1],pp[2]);	ScalePoint(pp[3],pp[4],pp[5]);	ScalePoint(pp[6],pp[7],pp[8]);
  
  		pPos=0;	curv_plot(2,pp,0);
++<<<<<<< HEAD
 +		if(m)	for(int j=0;j<LegendMarks;j++)
 +		{
 +			pp[8] = s3;	pp[7] = y+i*h+0.45f*h;
 +			pp[6] = x+0.1f*llen + (j+1)*0.8f*llen/(1.+LegendMarks);
 +//			ScalePoint(pp[6],pp[7],pp[8]);
 +			Mark(pp[6],pp[7],pp[8],m);
++=======
+ 		if(m)	for(int j=0;j<LegendMarks;j++)
+ 		{
+ 			pp[8] = s3;	pp[7] = y+i*h+0.45f*h;
+ 			pp[6] = x+0.1f*llen + (j+1)*0.8f*llen/(1.+LegendMarks);
+ //			ScalePoint(pp[6],pp[7],pp[8]);
+ 			Mark(pp[6],pp[7],pp[8],m);
++>>>>>>> upstream/1.11.1.1
  		}
  		SelectPen(TranspType!=2 ? "k-1":"w-1");
  		Putsw(mglPoint(x+(style[i][0]!=0?llen:0), y+i*h+0.3f*h, s3), text[i], ff, size);
@@@ -613,16 -624,16 +673,16 @@@ void mglGraphAB::colorbar(const mglDat
  		if(d<4)	m = 1+int(2*d+0.5);
  		else	m = 1+int(d+0.5);
  		if(m<5)	m = 5;
- 	}*/
- 	if(dc<0) m=int(0.5-dc);
- 	if(dc>0) m=int(0.5+(Cmax-Cmin)/dc);
- 	if(dc==0 && Cmax*Cmin>0)	m = 1+int(0.5+fabs(log10(Cmax/Cmin)));
- 	if(m<2)	m=2;
+ 	}*/
+ 	if(dc<0) m=int(0.5-dc);
+ 	if(dc>0) m=int(0.5+(Cmax-Cmin)/dc);
+ 	if(dc==0 && Cmax*Cmin>0)	m = 1+int(0.5+fabs(log10(Cmax/Cmin)));
+ 	if(m<2)	m=2;
  	if(m>n)	m=n;
  
  	mreal dv=(vv.Maximal()-v1)/m;
  	for(i=0;i<m;i++)
- 	{
+ 	{
  		t = vv.a[(n-1)*i/(m-1)];	d = GetA(t);	p.z = s3+1;
  		p.x = (ss*d+s3)*w+x*s3;
  		p.y = (ss*d+s3)*h+y*s3;
@@@ -633,15 -644,15 +693,15 @@@
  			case 3:	p.y = (y+0.13*h)*s3;	break;
  			default:p.x = (x-0.13*w)*s3;	break;
  		}
- 		if(ctt[0])	mglprintf(str, 64, ctt, t);
- 		else if(dc==0)
- 		{
- 			long kk=int(floor(0.1+log10(fabs(t))));
- 			mglprintf(str,64,L"%.2g\\cdot 10^{%d}",t/pow(10,kk), kk);
+ 		if(ctt[0])	mglprintf(str, 64, ctt, t);
+ 		else if(dc==0)
+ 		{
+ 			long kk=int(floor(0.1+log10(fabs(t))));
+ 			mglprintf(str,64,L"%.2g\\cdot 10^{%d}",t/pow(10,kk), kk);
  		}
  		else	_mgl_tick_text(t,v1,dv/100,v,kind,str);
  		wcstrim_mgl(str);	Putsw(p,str,a,FontSize);
- 		// draw "grid" lines
+ 		// draw "grid" lines
  		pp[0] = pp[3] = (ss*d+s3)*w+x*s3;
  		pp[1] = pp[4] = (ss*d+s3)*h+y*s3;
  		pp[2] = pp[5] = s3+1;
@@@ -651,9 -662,9 +711,9 @@@
  			case 2:	pp[1]= (y-0.1*h)*s3;	pp[4] = y*s3;	break;
  			case 3:	pp[1]= y*s3;	pp[4] = (y+0.1*h)*s3;	break;
  			default:pp[0]  = (x-0.1*w)*s3;	pp[3] = x*s3;	break;
- 		}
- 		memset(cc,0,6*sizeof(mreal));	PostScale (pp,2);
- 		line_plot(pp,pp+3,cc,cc+3,true);
+ 		}
+ 		memset(cc,0,6*sizeof(mreal));	PostScale (pp,2);
+ 		line_plot(pp,pp+3,cc,cc+3,true);
  	}
  	switch(where)
  	{
@@@ -675,7 -686,7 +735,7 @@@ void mglGraphAB::SetSize(int w,int h
  	zPos = 0;//long(2*Depth*sqrt(3.));
  	if(G)	{	delete []G;	delete []G4;	delete []OI;	}
  	G = new unsigned char[w*h*3];
- 	G4= new unsigned char[w*h*4];
+ 	G4= new unsigned char[w*h*4];
  	OI= new int[w*h];
  	Clf();
  	InPlot(0,1,0,1);	SetDrawReg(1,1,0);	Persp = 0;
@@@ -793,8 -804,9 +853,9 @@@ unsigned char **mglGraphAB::GetRGBLines
  	return p;
  }
  //-----------------------------------------------------------------------------
+ /* for 72pdi, FontSize=6 --> 26pt */
  void mglGraphAB::SetFontSizePT(mreal pt, int dpi)
- {	FontSize = pt*Height*0.0675/dpi;	}
+ {	FontSize = 16.6154*pt/dpi;	}
  //-----------------------------------------------------------------------------
  void mglGraphAB::FindOptOrg(mreal ax[3], mreal ay[3], mreal az[3])
  {
@@@ -925,14 -937,14 +986,14 @@@ void mglGraphAB::DrawTick(mreal *pp,boo
  	ScalePoint(pp[0],pp[1],pp[2]);
  	ScalePoint(pp[3],pp[4],pp[5]);
  	ScalePoint(pp[6],pp[7],pp[8]);
- 	PostScale(pp,3);
- 	double dx,dy,dz,dd,ll=TickLen*(B1[0]<B1[4] ? B1[0]:B1[4])/3.5;
- 	if(sub)	ll/=sqrt(1.+st_t);
- 	dx=pp[0]-pp[3];	dy=pp[1]-pp[4];	dz=pp[2]-pp[5];
- 	dd=sqrt(dx*dx+dy*dy+dz*dz);	if(dd)	dd = ll/dd;
- 	pp[0]=pp[3]+dd*dx;	pp[1]=pp[4]+dd*dy;	pp[2]=pp[5]+dd*dz;
- 	dx=pp[6]-pp[3];	dy=pp[7]-pp[4];	dz=pp[8]-pp[5];
- 	dd=sqrt(dx*dx+dy*dy+dz*dz);	if(dd)	dd = ll/dd;
+ 	PostScale(pp,3);
+ 	double dx,dy,dz,dd,ll=TickLen*(B1[0]<B1[4] ? B1[0]:B1[4])/3.5;
+ 	if(sub)	ll/=sqrt(1.+st_t);
+ 	dx=pp[0]-pp[3];	dy=pp[1]-pp[4];	dz=pp[2]-pp[5];
+ 	dd=sqrt(dx*dx+dy*dy+dz*dz);	if(dd)	dd = ll/dd;
+ 	pp[0]=pp[3]+dd*dx;	pp[1]=pp[4]+dd*dy;	pp[2]=pp[5]+dd*dz;
+ 	dx=pp[6]-pp[3];	dy=pp[7]-pp[4];	dz=pp[8]-pp[5];
+ 	dd=sqrt(dx*dx+dy*dy+dz*dz);	if(dd)	dd = ll/dd;
  	pp[6]=pp[3]+dd*dx;	pp[7]=pp[4]+dd*dy;	pp[8]=pp[5]+dd*dz;
  	line_plot(pp,pp+3,CDef,CDef);
  	line_plot(pp+3,pp+6,CDef,CDef);
diff --combined mgl/mgl_crust.cpp
index d25fd25,ff87b8c..41d770f
--- a/mgl/mgl_crust.cpp
+++ b/mgl/mgl_crust.cpp
@@@ -81,33 -81,20 +81,49 @@@ void mglGraph::TriPlot(const mglData &n
  void mglGraph::tricont_line(mreal val, long i, long k1, long k2, long k3, const mglData &x, const mglData &y, 
  					const mglData &z, const mglData &a, mreal zVal)
  {
++<<<<<<< HEAD
 +	mreal d1,d2,p1[3],p2[3],c1[4],c2[4];
++=======
+ 	mreal d1,d2,pp[6];
++>>>>>>> upstream/1.11.1.1
  	mglColor q1,q2,q3;
  	d1 = _d(val,z.a[k1],z.a[k2]);
  	d2 = _d(val,z.a[k1],z.a[k3]);
  	if(d1<0 || d1>1 || d2<0 || d2>1)	return;
++<<<<<<< HEAD
 +	p1[2] = p2[2] = zVal;
 +
 +	p1[0] = x.a[k1]*(1-d1)+x.a[k2]*d1;
 +	p1[1] = y.a[k1]*(1-d1)+y.a[k2]*d1;
 +	if(!ScalePoint(p1[0],p1[1],p1[2]))	return;
 +	p2[0] = x.a[k1]*(1-d2)+x.a[k3]*d2;
 +	p2[1] = y.a[k1]*(1-d2)+y.a[k3]*d2;
 +	if(!ScalePoint(p1[0],p1[1],p1[2]))	return;
 +	if(a.nx==x.nx)
 +	{
 +		q1 = GetC(a.a[k1]);	q2 = GetC(a.a[k2]);	q3 = GetC(a.a[k3]);
 +		c1[0] = q1.r*(1-d1)+q2.r*d1;	c2[0] = q1.r*(1-d2)+q3.r*d2;
 +		c1[2] = q1.g*(1-d1)+q2.g*d1;	c2[2] = q1.g*(1-d2)+q3.g*d2;
 +		c1[3] = q1.b*(1-d1)+q2.b*d1;	c2[3] = q1.b*(1-d2)+q3.b*d2;
 +		c1[3]=c2[3]=1;
 +	}
 +	else
 +	{
 +		q1 = GetC(a.a[i]);	c1[0]=q1.r;	c1[1]=q1.g;	c1[2]=q1.b;	c1[3]=1;
 +		memcpy(c2,c1,4*sizeof(mreal));
 +	}
 +	line_plot(p1,p2,c1,c2);
++=======
+ 	pp[2] = pp[5] = zVal;
+ 
+ 	pp[0] = x.a[k1]*(1-d1)+x.a[k2]*d1;
+ 	pp[1] = y.a[k1]*(1-d1)+y.a[k2]*d1;
+ 	if(!ScalePoint(pp[0],pp[1],pp[2]))	return;
+ 	pp[3] = x.a[k1]*(1-d2)+x.a[k3]*d2;
+ 	pp[4] = y.a[k1]*(1-d2)+y.a[k3]*d2;
+ 	if(!ScalePoint(pp[3],pp[4],pp[5]))	return;
+ 	curv_plot(2,pp,0);
++>>>>>>> upstream/1.11.1.1
  }
  //-----------------------------------------------------------------------------
  void mglGraph::TriContV(const mglData &v, const mglData &nums, const mglData &x, const mglData &y, const mglData &z, const mglData &a, const char *sch,mreal zVal)
@@@ -126,6 -113,7 +142,10 @@@
  		k2 = long(nums.a[3*i+1]+0.1);	if(k2<0 || k2>=n)	continue;
  		k3 = long(nums.a[3*i+2]+0.1);	if(k3<0 || k3>=n)	continue;
  		val = isnan(zVal) ? v.a[k] : zVal;
++<<<<<<< HEAD
++=======
+ 		DefColor(GetC(v.a[k]));
++>>>>>>> upstream/1.11.1.1
  		tricont_line(v.a[k], i,k1,k2,k3,x,y,z,a,val);
  		tricont_line(v.a[k], i,k2,k1,k3,x,y,z,a,val);
  		tricont_line(v.a[k], i,k3,k2,k1,x,y,z,a,val);
@@@ -133,7 -121,7 +153,11 @@@
  }
  //-----------------------------------------------------------------------------
  void mglGraph::TriCont(const mglData &nums, const mglData &x, const mglData &y, const mglData &z, const mglData &a, const char *sch, int Num, mreal zVal)
++<<<<<<< HEAD
 +{
++=======
+ {
++>>>>>>> upstream/1.11.1.1
  	if(Num<1)	{	SetWarn(mglWarnCnt,"Cont");	return;	}
  	mglData v(Num);
  	for(long i=0;i<Num;i++)	v.a[i] = Cmin + (Cmax-Cmin)*mreal(i+1)/(Num+1);
@@@ -240,40 -228,48 +264,48 @@@ void mglGraph::Dots(const mglData &tr, 
  		AVertex(tr.a[m*i], tr.a[m*i+1], tr.a[m*i+2], tr.a[m*i+3], 1);
  	EndGroup();
  }
- //-----------------------------------------------------------------------------
- //
- //	Crust series
+ //-----------------------------------------------------------------------------
+ //
+ //	mglTriangulation
  //
  //-----------------------------------------------------------------------------
+ long mgl_crust_new(long n,const mreal *pp,long **nn,mreal ff);
  long mgl_crust(long n,mreal *pp,long **nn,mreal rs);
- void mglGraph::Crust(const mglData &x, const mglData &y, const mglData &z, const char *sch,mreal er)
+ mglData mglTriangulation(const mglData &x, const mglData &y, const mglData &z, mreal er)
  {
+ 	mglData nums;
  	long n = x.nx, m;
- 	if(y.nx!=n || z.nx!=n)	{	SetWarn(mglWarnDim,"Crust");	return;	}
- 	static int cgid=1;	StartGroup("Crust",cgid++);
+ 	if(y.nx!=n || z.nx!=n)	return nums;
  	register long i;
  	mreal *pp = new mreal[3*n];
  	long *nn=0;
  	for(i=0;i<n;i++)
  	{	pp[3*i] = x.a[i];	pp[3*i+1] = y.a[i];	pp[3*i+2] = z.a[i];	}
- 
- 	m = mgl_crust(n,pp,&nn,er);
- 	if(m<=0)	{	delete []pp;	if(nn)	free(nn);	return;	}
- 
- 	SetScheme(sch);
- 	mglColor c;
- 	mreal *cc = new mreal[4*n];
- 	bool *tt = new bool[n];
- 	for(i=0;i<n;i++)
- 	{
- 		c = GetC(pp[3*i],pp[3*i+1],pp[3*i+2]);
- 		cc[4*i] = c.r;		cc[4*i+1] = c.g;
- 		cc[4*i+2] = c.b;	cc[4*i+3] = 1;
- 		tt[i] = ScalePoint(pp[3*i],pp[3*i+1],pp[3*i+2]);
- 	}
- 	trigs_plot(m,nn,n,pp,cc,tt,sch && strchr(sch,'#'));
- 	EndGroup();
- 	delete []tt;	delete []cc;	delete []pp;	free(nn);
+ 	m = mgl_crust(n,pp,&nn,er);
+ 
+ 	if(m>0)
+ 	{
+ 		nums.Create(3,m);
+ 		for(i=0;i<3*m;i++)	nums.a[i]=nn[i];
+ 	}
+ 	delete []pp;	free(nn);	return nums;
+ }
+ //-----------------------------------------------------------------------------
+ mglData mglTriangulation(const mglData &x, const mglData &y, mreal er)
+ {
+ 	mglData z(x.nx);
+ 	return mglTriangulation(x,y,z,er);
+ }
+ //-----------------------------------------------------------------------------
+ //
+ //	Crust series
+ //
+ //-----------------------------------------------------------------------------
+ void mglGraph::Crust(const mglData &x, const mglData &y, const mglData &z, const char *sch,mreal er)
+ {
+ 	if(y.nx!=x.nx || z.nx!=x.nx)	{	SetWarn(mglWarnDim,"Crust");	return;	}
+ 	mglData nums=mglTriangulation(x,y,z,er);
+ 	TriPlot(nums,x,y,z,sch);
  }
  //-----------------------------------------------------------------------------
  void mglGraph::Crust(const mglData &tr, const char *sch,mreal er)
@@@ -282,11 -278,11 +314,11 @@@
  	Crust(tr.SubData(0), tr.SubData(1), tr.SubData(2),sch,er);
  }
  //-----------------------------------------------------------------------------
- mreal mgl_dist(mreal *p1, mreal *p2)
+ mreal mgl_dist(const mreal *p1, const mreal *p2)
  {
  	return (p1[0]-p2[0])*(p1[0]-p2[0])+(p1[1]-p2[1])*(p1[1]-p2[1])+(p1[2]-p2[2])*(p1[2]-p2[2]);
  }
- mreal mgl_mult(mreal *p1, mreal *p2, mreal *p0)
+ mreal mgl_mult(const mreal *p1, const mreal *p2, const mreal *p0)
  {
  	return (p1[0]-p0[0])*(p2[0]-p0[0])+(p1[1]-p0[1])*(p2[1]-p0[1])+(p1[2]-p0[2])*(p2[2]-p0[2]);
  }
@@@ -384,6 -380,96 +416,96 @@@ long mgl_crust(long n,mreal *pp,long **
  	}
  	return m;
  }
+ //-----------------------------------------------------------------------------
+ //-----------------------------------------------------------------------------
+ //-----------------------------------------------------------------------------
+ //-----------------------------------------------------------------------------
+ //-----------------------------------------------------------------------------
+ #define sqr(a) (a)*(a)
+ void mgl_add_trig(long i1,long i2,long n,const mreal *pp,long **nn,long *c,long *m,mreal ff,char *tt)
+ {
+ 	register long i,im=-1,ii=-1;
+ 	register mreal cm=2,c2=2,co,fm,f,g=0;
+ 	const mreal *p1=pp+3*i1,*p2=pp+3*i2,*pi;
+ 	fm =(sqr(p2[0]-p1[0])+sqr(p2[1]-p1[1])+sqr(p2[2]-p1[2]));	fm*=4*fm*ff;
+ 	for(i=0;i<n;i++)
+ 	{
+ 		if(tt[i]>1 || i==i1 || i==i2)	continue;	// this is other surface
+ 		pi = pp+3*i;
+ 		co=(pi[0]-p1[0])*(pi[0]-p2[0])+(pi[1]-p1[1])*(pi[1]-p2[1])+(pi[2]-p1[2])*(pi[2]-p2[2]);
+ 		f = (sqr(pi[0]-p1[0])+sqr(pi[1]-p1[1])+sqr(pi[2]-p1[2])) *
+ 			(sqr(pi[0]-p2[0])+sqr(pi[1]-p2[1])+sqr(pi[2]-p2[2]));
+ 		co /= sqrt(f);
+ 		if(co<cm && f<fm && tt[i]==0)	{	g=f;	cm=co;	im=i;	}
+ 		if(co<c2 && f<fm && tt[i]==1)	{	g=f;	c2=co;	ii=i;	}
+ //		if(co<cm && f<fm)	{	cm=co;	im=i;	}
+ 	}
+ 	bool ok=(im>0);	// try best variant
+ 	register long k[3]={i1,i2,im};
+ 	if(i2<i1)		{k[0]=i2;	k[1]=i1;}	// sort vertexes
+ 	if(im<k[0])		{k[2]=k[1];	k[0]=im;}
+ 	if(k[2]<k[1])	{i=k[1];	k[1]=k[2];	k[2]=i;	}
+ 	for(i=0;i<*c;i++)	// check if already exist
+ 		if(!memcmp(nn+3*i,k,3*sizeof(long)))
+ 		{	ok = false;	break;	}
+ printf("B(%g,%g,%d):%ld,%ld,%ld -- %ld of %ld\n",g,fm,ok,i1,i2,im,*c,n);
+ 
+ 	if(!ok)			// try worse variant
+ 	{
+ 		im=ii;		ok=(im>0);
+ 		register long k[3]={i1,i2,im};
+ 		if(i2<i1)		{k[0]=i2;	k[1]=i1;}	// sort vertexes
+ 		if(im<k[0])		{k[2]=k[1];	k[0]=im;}
+ 		if(k[2]<k[1])	{i=k[1];	k[1]=k[2];	k[2]=i;	}
+ 		for(i=0;i<*c;i++)	// check if already exist
+ 			if(!memcmp(nn+3*i,k,3*sizeof(long)))
+ 			{	ok = false;	break;	}
+ 	}
+ printf("B(%g,%g,%d):%ld,%ld,%ld -- %ld of %ld\n",g,fm,ok,i1,i2,im,*c,n);
+ 	if(!ok)	return;
+ 	
+ 	if(*c>=*m)			// trig is OK -- add it
+ 	{
+ 		*m+=n;
+ 		*nn=(long*)realloc(*nn,(*m)*sizeof(long));
+ 	}
+ 	memcpy(nn+3*(*c),k,3*sizeof(long));	*c+=1;	tt[im]=1;
+ printf("Add %ld,%ld,%ld -- %ld of %ld\n",i1,i2,im,*c,n);
+ 	mgl_add_trig(i1,im,n,pp,nn,c,m,ff,tt);	// parse bound
+ 	mgl_add_trig(i2,im,n,pp,nn,c,m,ff,tt);	// NOTE: it may require HUGE stack!!!
+ }
+ long mgl_crust_new(long n,const mreal *pp,long **nn,mreal ff)
+ {
+ 	register long i,j,k=0;
+ 	register mreal r,rm;
+ 	if(ff==0)	ff=1;
+ 	char *tt=new char[n],ok=1;	memset(tt,0,n*sizeof(char));
+ 	long c=0,m=n;
+ 	*nn = (long*)malloc(m*sizeof(long));
+ 
+ 	while(ok)
+ 	{
+ 		j=-1;
+ 		for(rm=FLT_MAX,i=0;i<n;i++)	// find closest
+ 		{
+ 			r = mgl_dist(pp+3*i,pp);
+ 			if(rm>r && !tt[i] && i!=k)	{	j=i;	rm = r;	}
+ 		}
+ printf("closest -- %ld-%ld of %g\n",k,j,rm);
+ 		if(j>0)
+ 		{
+ 			tt[0]=tt[j]=1;
+ 			mgl_add_trig(k,j,n,pp,nn,&c,&m,ff,tt);
+ 		}
+ printf("first iteration done -- %ld of %ld\n",m,n);
+ 		ok = 0;
+ 		for(i=0;i<n;i++)	// check if one more surface is existed
+ 			if(tt[k])	tt[k]=2;
+ 			else	{	ok=1;	k=i;	}
+ 	}
+ 	delete []tt;
+ 	return c;
+ }
  //-----------------------------------------------------------------------------
  /// Draw triangle mesh for points in arrays \a x, \a y, \a z.
  void mgl_triplot_xyzc(HMGL gr, const HMDT nums, const HMDT x, const HMDT y, const HMDT z, const HMDT c, const char *sch)
diff --combined mgl/mgl_data_io.cpp
index efcd0a4,2344175..f16d97a
--- a/mgl/mgl_data_io.cpp
+++ b/mgl/mgl_data_io.cpp
@@@ -2,33 -2,33 +2,43 @@@
   * 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.             *
 - ***************************************************************************/
 + *   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>
++<<<<<<< HEAD
 +#include <zlib.h>
++=======
+ #include <zlib.h>
++>>>>>>> upstream/1.11.1.1
  #ifdef HAVE_HDF5
  #include <hdf5.h>
  #endif
  #ifdef HAVE_HDF4
++<<<<<<< HEAD
 +#define intf hdf4_intf
 +#include <hdf/mfhdf.h>
 +#undef intf
++=======
+ #define intf hdf4_intf
+ #include <hdf/mfhdf.h>
+ #undef intf
++>>>>>>> upstream/1.11.1.1
  #endif
  
  #ifndef WIN32
@@@ -302,42 -302,42 +312,62 @@@ void mglData::Save(const char *fname,in
  	}
  	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;
+ }
  //-----------------------------------------------------------------------------
 +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;
  	}
++<<<<<<< HEAD
 +	char *buf = mgl_read_gz(fp);
++=======
+ 	char *buf = mgl_read_gz(fp);
++>>>>>>> upstream/1.11.1.1
  	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
+ 	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;
++<<<<<<< HEAD
 +		if(first && (ch==' ' || ch=='\t') && buf[i+1]>' ') k++;
++=======
+ 		if(first && (ch==' ' || ch=='\t') && buf[i+1]>' ') k++;
++>>>>>>> upstream/1.11.1.1
  	}
  	first = false;
  	for(i=0;i<nb-1;i++)					// determine ny
@@@ -362,7 -362,7 +392,11 @@@
  		}
  	}
  	else	for(i=0;i<nb-1;i++)	if(buf[i]=='\f')	l++;
++<<<<<<< HEAD
 +	free(buf);
++=======
+ 	free(buf);
++>>>>>>> upstream/1.11.1.1
  	return Read(fname,k,m,l);
  }
  //-----------------------------------------------------------------------------
@@@ -382,7 -382,7 +416,11 @@@ bool mglData::Read(const char *fname,in
  	gzFile fp = gzopen(fname,"r");
  	if(!fp)	return false;
  	Create(mx,my,mz);
++<<<<<<< HEAD
 +	char *buf = mgl_read_gz(fp);
++=======
+ 	char *buf = mgl_read_gz(fp);
++>>>>>>> upstream/1.11.1.1
  	long nb = strlen(buf);	gzclose(fp);
  
  	register long i=0, j=0, k=0;
@@@ -408,8 -408,8 +446,13 @@@
  		char *s=buf+j;
  		while(buf[j]>' ' && j<nb)	j++;
  		buf[j]=0;
++<<<<<<< HEAD
 +		a[i] = atof(s);
 +		i++;	if(i>=nx*ny*nz)	break;
++=======
+ 		a[i] = atof(s);
+ 		i++;	if(i>=nx*ny*nz)	break;
++>>>>>>> upstream/1.11.1.1
  	}
  	free(buf);
  	return true;
@@@ -421,7 -421,7 +464,11 @@@ bool mglData::ReadMat(const char *fname
  	gzFile fp = gzopen(fname,"r");
  	if(!fp)	return false;
  	nx = ny = nz = 1;	NewId();
++<<<<<<< HEAD
 +	char *buf = mgl_read_gz(fp);
++=======
+ 	char *buf = mgl_read_gz(fp);
++>>>>>>> upstream/1.11.1.1
  	long nb = strlen(buf);	gzclose(fp);
  
  	register long i=0,j=0;
@@@ -692,10 -692,10 +739,10 @@@ void mglData::Modify(const char *eq,in
  	{
  		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++)
 +			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]);
  		}
  	}
@@@ -703,10 -703,10 +750,10 @@@
  	{
  		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(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]);
  		}
  	}
@@@ -771,10 -771,10 +818,10 @@@ void mglData::Squeeze(int rx,int ry,in
  		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;
 +		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)];
 +			s += a[i1+nx*(j1+ny*k1)];
  		b[i+kx*(j+ky*k)] = s/dx*dy*dz;
  	}
  	delete []a;	a=b;
@@@ -912,42 -912,42 +959,81 @@@ void mglData::Fill(const char *eq, mglP
  }
  //-----------------------------------------------------------------------------
  void mglData::ReadHDF4(const char *fname,const char *data)
++<<<<<<< HEAD
 +{
 +#ifdef HAVE_HDF4
 +	int32 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++)
 +	{
 +		int32 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_HDF4
+ 	int32 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++)
+ 	{
+ 		int32 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
++>>>>>>> upstream/1.11.1.1
  }
  //-----------------------------------------------------------------------------
  #ifdef HAVE_HDF5
@@@ -991,14 -991,14 +1077,22 @@@ void mglData::ReadHDF(const char *fname
  {
  	hid_t hf,hd,hs;
  	hsize_t dims[3];
++<<<<<<< HEAD
 +	long rank, res = H5Fis_hdf5(fname);
++=======
+ 	long rank, res = H5Fis_hdf5(fname);
++>>>>>>> upstream/1.11.1.1
  	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);
++<<<<<<< HEAD
 +#endif
++=======
+ #endif
++>>>>>>> upstream/1.11.1.1
  	if(hd<0)	return;
  	hs = H5Dget_space(hd);
  	rank = H5Sget_simple_extent_ndims(hs);
@@@ -1115,7 -1115,7 +1209,7 @@@ bool mglData::ReadAll(const char *templ
  	for(;i<res.gl_pathc;i++)
  	{
  		if(d.Read(res.gl_pathv[i]))
 -			if(!mgl_add_file(kx,ky,kz,b,d,as_slice))
 +			if(!mgl_add_file(kx,ky,kz,b,d,as_slice))
  			{	delete []fname;		return false;	}
  	}
  	Set(b,kx,ky,kz);
diff --combined mgl/mgl_exec.cpp
index f0b9c4c,9c9a0a6..e8d02bb
--- a/mgl/mgl_exec.cpp
+++ b/mgl/mgl_exec.cpp
@@@ -1139,13 -1139,13 +1139,23 @@@ int mgls_grad(mglGraph *gr, long , mglA
  void mglc_grad(wchar_t out[1024], long , mglArg *a, int k[10])
  {
  	if(k[0]==1 && k[1]==1 && k[2]==1 && k[3]==1)
++<<<<<<< HEAD
 +		mglprintf(out,1024,L"gr->Grad(%s, %s, %s, %s, \"%s\", %d, %g);", 
 +			a[0].s, a[1].s, a[2].s, a[3].s, k[4]==2?a[4].s:"", k[5]==3?iint(a[5].v):5);
 +	else if(k[0]==1 && k[1]==1 && k[2]==1)
 +		mglprintf(out,1024,L"gr->Grad(%s, %s, %s, \"%s\", %d, %g);", 
 +			a[0].s, a[1].s, a[2].s, k[3]==2?a[3].s:"", k[4]==3?iint(a[4].v):5, k[5]==3?a[5].v:NAN);
 +	else if(k[0]==1)
 +		mglprintf(out,1024,L"gr->Grad(%s, \"%s\", %d, %g);", 
++=======
+ 		mglprintf(out,1024,L"gr->Grad(%s, %s, %s, %s, \"%s\", %d, %g);",
+ 			a[0].s, a[1].s, a[2].s, a[3].s, k[4]==2?a[4].s:"", k[5]==3?iint(a[5].v):5);
+ 	else if(k[0]==1 && k[1]==1 && k[2]==1)
+ 		mglprintf(out,1024,L"gr->Grad(%s, %s, %s, \"%s\", %d, %g);",
+ 			a[0].s, a[1].s, a[2].s, k[3]==2?a[3].s:"", k[4]==3?iint(a[4].v):5, k[5]==3?a[5].v:NAN);
+ 	else if(k[0]==1)
+ 		mglprintf(out,1024,L"gr->Grad(%s, \"%s\", %d, %g);",
++>>>>>>> upstream/1.11.1.1
  			a[0].s, k[1]==2?a[1].s:"", k[2]==3?iint(a[2].v):5, k[3]==3?a[3].v:NAN);
  }
  //-----------------------------------------------------------------------------
@@@ -1166,7 -1166,7 +1176,11 @@@ void mglc_fill(wchar_t out[1024], long 
  		mglprintf(out,1024,L"%s.Fill(%g, %g, '%c');", a[0].s, a[1].v,a[2].v, k[3]==2?a[3].s[0]:'x');
  }
  //-----------------------------------------------------------------------------
++<<<<<<< HEAD
 +int mgls_fillsample(mglGraph *gr, long , mglArg *a, int k[10])
++=======
+ int mgls_fillsample(mglGraph *, long , mglArg *a, int k[10])
++>>>>>>> upstream/1.11.1.1
  {
  	if(k[0]==1 && k[1]==3 && k[2]==2)	a[0].d->FillSample(iint(a[1].v), a[2].s);
  	else	return 1;
@@@ -1289,7 -1289,7 +1303,11 @@@ int mgls_light(mglGraph *gr, long , mgl
  	else if(k[1]!=3)	gr->Light(a[0].v!=0);
  	else if(k[2]==3 && k[3]==3)
  		gr->Light(iint(a[0].v),mglPoint(a[1].v,a[2].v,a[3].v),
++<<<<<<< HEAD
 +			k[4]==2?a[4].s[0]:'w',k[5]==3?a[5].v:0.5,true);
++=======
+ 			k[4]==2?a[4].s[0]:'w',k[5]==3?a[5].v:0.5,true,k[6]==3?a[6].v:0);
++>>>>>>> upstream/1.11.1.1
  	else	gr->Light(iint(a[0].v),a[1].v!=0);
  	return 0;
  }
@@@ -1299,7 -1299,8 +1317,12 @@@ void mglc_light(wchar_t out[1024], lon
  	else if(k[0]!=3)	return;
  	else if(k[1]!=3)	mglprintf(out,1024,L"gr->Light(%s);", a[0].v!=0 ? "true":"false");
  	else if(k[2]==3 && k[3]==3)
++<<<<<<< HEAD
 +		mglprintf(out,1024,L"gr->Light(%d, mglPoint(%g, %g, %g), '%c', %g, true);", iint(a[0].v), a[1].v, a[2].v, a[3].v, k[4]==2?a[4].s[0]:'w', k[5]==3?a[5].v:0.5);
++=======
+ 		mglprintf(out,1024,L"gr->Light(%d, mglPoint(%g, %g, %g), '%c', %g, true, %g);",
+ 		iint(a[0].v), a[1].v, a[2].v, a[3].v, k[4]==2?a[4].s[0]:'w', k[5]==3?a[5].v:0.5, k[6]==3?a[6].v:0);
++>>>>>>> upstream/1.11.1.1
  	else	mglprintf(out,1024,L"gr->Light(%d, %s);", iint(a[0].v), a[1].v!=0 ? "true":"false");
  }
  //-----------------------------------------------------------------------------
@@@ -1833,7 -1834,7 +1856,11 @@@ int mgls_squeeze(mglGraph *, long , mgl
  void mglc_squeeze(wchar_t out[1024], long , mglArg *a, int k[10])
  {
  	if(k[0]==1 && k[1]==3)
++<<<<<<< HEAD
 +		mglprintf(out,1024,L"%s.Squeeze(%d, %d, %d, %s);", a[0].s, iint(a[1].v), 
++=======
+ 		mglprintf(out,1024,L"%s.Squeeze(%d, %d, %d, %s);", a[0].s, iint(a[1].v),
++>>>>>>> upstream/1.11.1.1
  			k[2]==3?iint(a[2].v):1, k[3]==3?iint(a[3].v):1, k[4]==3 && a[4].v>0 ? "true":"false");
  }
  //-----------------------------------------------------------------------------
@@@ -2273,8 -2274,8 +2300,13 @@@ int mgls_tricont(mglGraph *gr, long , m
  		gr->TriContV(*(a[0].d),*(a[1].d),*(a[2].d),*(a[3].d),*(a[4].d),*(a[5].d),k[6]==2?a[6].s:0,k[7]==3?a[7].v:NAN);
  	else if(k[0]==1 && k[1]==1 && k[2]==1 && k[3]==1 && k[4]==1)
  		gr->TriContV(*(a[0].d),*(a[1].d),*(a[2].d),*(a[3].d),*(a[4].d),k[5]==2?a[5].s:0,k[6]==3?a[6].v:NAN);
++<<<<<<< HEAD
 +	else if(k[0]==1 && k[1]==1 && k[2]==1 && k[5]==1)
 +		gr->TriCont(*(a[0].d),*(a[1].d),*(a[2].d),*(a[3].d),k[4]==2?a[4].s:0,k[5]==3?a[5].v:NAN);
++=======
+ 	else if(k[0]==1 && k[1]==1 && k[2]==1 && k[3]==1)
+ 		gr->TriCont(*(a[0].d),*(a[1].d),*(a[2].d),*(a[3].d),k[4]==2?a[4].s:0,7,k[5]==3?a[5].v:NAN);
++>>>>>>> upstream/1.11.1.1
  	else	return 1;
  	return 0;
  }
@@@ -2287,7 -2288,7 +2319,11 @@@ void mglc_tricont(wchar_t out[1024], lo
  		mglprintf(out,1024,L"gr->TriContV(%s, %s, %s, %s, %s, \"%s\", %g);",
  			a[0].s, a[1].s, a[2].s, a[3].s, a[4].s, k[5]==2?a[5].s:"",k[6]==3?a[6].v:NAN);
  	else if(k[0]==1 && k[1]==1 && k[2]==1 && k[3]==1)
++<<<<<<< HEAD
 +		mglprintf(out,1024,L"gr->TriCont(%s, %s, %s, %s, \"%s\", %g);",
++=======
+ 		mglprintf(out,1024,L"gr->TriCont(%s, %s, %s, %s, \"%s\", 7, %g);",
++>>>>>>> upstream/1.11.1.1
  			a[0].s, a[1].s, a[2].s, a[3].s, k[4]==2?a[4].s:"", k[5]==3?a[5].v:NAN);
  }
  //-----------------------------------------------------------------------------
@@@ -3489,6 -3490,23 +3525,26 @@@ void mglc_roll(wchar_t out[1024], long 
  	    a[0].s, a[1].s[0], iint(a[2].v));
  }
  //-----------------------------------------------------------------------------
++<<<<<<< HEAD
++=======
+ int mgls_triangulate(mglGraph *, long , mglArg *a, int k[10])
+ {
+ 	if(k[0]==1 && k[1]==1 && k[2]==1 && k[3]==1)
+ 		*(a[0].d) = mglTriangulation(*(a[1].d), *(a[2].d), *(a[3].d), k[4]==3?a[4].v:0);
+ 	else if(k[0]==1 && k[1]==1 && k[2]==1)
+ 		*(a[0].d) = mglTriangulation(*(a[1].d), *(a[2].d), k[3]==3?a[3].v:0);
+ 	else	return 1;
+ 	return 0;
+ }
+ void mglc_triangulate(wchar_t out[1024], long , mglArg *a, int k[10])
+ {
+ 	if(k[0]==1 && k[1]==1 && k[2]==1 && k[3]==1)
+ 		mglprintf(out,1024,L"%s = mglTriangulation(%s, %s, %s, %g);",a[0].s, a[1].s, a[2].s, a[3].s, k[4]==3?a[4].v:0);
+ 	else if(k[0]==1 && k[1]==1 && k[2]==1)
+ 		mglprintf(out,1024,L"%s = mglTriangulation(%s, %s, %g);",a[0].s, a[1].s, a[2].s, k[3]==3?a[3].v:0);
+ }
+ //-----------------------------------------------------------------------------
++>>>>>>> upstream/1.11.1.1
  mglCommand mgls_base_cmd[] = {
  	{L"addlegend",L"Add legend entry",L"addlegend 'txt' 'fmt'", mgls_addlegend, mglc_addlegend, false, 2},
  	{L"addto",L"Add data or number",L"addto Var Dat|Var num", mgls_addto, mglc_addto, false, 3},
@@@ -3680,6 -3698,7 +3736,10 @@@
  	{L"transparent",L"Switch off transparency",L"transparent val", mgls_transparent, mglc_transparent, false, 2}, //!!! OLD !!!
  	{L"transpose",L"Transpose data array",L"transpose Dat ['dir']", mgls_transpose, mglc_transpose, false, 3},
  	{L"transptype",L"Set type transparency",L"transptype val", mgls_transptype, mglc_transptype, false, 2},
++<<<<<<< HEAD
++=======
+ 	{L"triangulate",L"Find triangles of randomly placed points",L"triangulate Res Xdat Ydat [er]|Res Xdat Ydat Zdat [er]", mgls_triangulate, mglc_triangulate, true, 3},
++>>>>>>> upstream/1.11.1.1
  	{L"tricont",L"Draw contour lines for surface of triangles",L"tricont Vdat Idat Xdat Ydat ['fmt']|Vdat Idat Xdat Ydat Zdat ['fmt']|Vdat Idat Xdat Ydat Zdat Cdat ['fmt'] ", mgls_tricont, mglc_tricont, false, 0},
  	{L"triplot",L"Draw surface of triangles",L"triplot Idat Xdat Ydat ['fmt']|Idat Xdat Ydat Zdat ['fmt']|Idat Xdat Ydat Zdat Cdat ['fmt'] ", mgls_triplot, mglc_triplot, false, 0},
  	{L"tube",L"Draw curve by tube",L"tube Ydat Rdat ['fmt' zval]|Ydat rval ['fmt' zval]|Xdat Ydat Rdat ['fmt' zval]|Xdat Ydat rval ['fmt' zval]|Xdat Ydat Zdat Rdat ['fmt']|Xdat Ydat Zdat rval ['fmt']", mgls_tube, mglc_tube, false, 0},
diff --combined mgl/mgl_zb.cpp
index c152739,1fdbd96..2029083
--- a/mgl/mgl_zb.cpp
+++ b/mgl/mgl_zb.cpp
@@@ -366,6 -366,7 +366,7 @@@ unsigned char* mglGraphAB::col2int(mrea
  void mglGraphAB::quad_plot(mreal *pp0,mreal *pp1,mreal *pp2,mreal *pp3,
  					mreal *cc0,mreal *cc1,mreal *cc2,mreal *cc3)
  {
+ 	Finished = false;
  	unsigned char r[4];
  	long y1,x1,y2,x2;
  	mreal d1[3],d2[3],d3[3],c1[4],c2[4],c3[4];
@@@ -446,6 -447,7 +447,7 @@@ void mglGraphAB::quad_plot_n(mreal *pp0
  					mreal *cc0,mreal *cc1,mreal *cc2,mreal *cc3,
  					mreal *nn0,mreal *nn1,mreal *nn2,mreal *nn3)
  {
+ 	Finished = false;
  	unsigned char r[4];
  	long y1,x1,y2,x2;
  	mreal d1[3],d2[3],d3[3],c1[4],c2[4],c3[4],n1[3],n2[3],n3[3];
@@@ -528,6 -530,7 +530,7 @@@
  void mglGraphAB::quad_plot_a(mreal *pp0,mreal *pp1,mreal *pp2,mreal *pp3,
  					mreal aa0,mreal aa1,mreal aa2,mreal aa3, mreal alpha)
  {
+ 	Finished = false;
  	unsigned char r[4];
  	long y1,x1,y2,x2;
  	mreal d1[3],d2[3],d3[3],a1,a2,a3;
@@@ -593,6 -596,7 +596,7 @@@
  void mglGraphAB::trig_plot(mreal *pp0,mreal *pp1,mreal *pp2,
  					mreal *cc0,mreal *cc1,mreal *cc2)
  {
+ 	Finished = false;
  	unsigned char r[4];
  	long y1,x1,y2,x2;
  	mreal d1[3],d2[3],c1[4],c2[4];
@@@ -643,6 -647,7 +647,7 @@@
  void mglGraphAB::trig_plot_n(mreal *pp0,mreal *pp1,mreal *pp2,
  					mreal *cc0,mreal *cc1,mreal *cc2,
mreal *nn0,mreal *nn1,mreal *nn2)
  {
+ 	Finished = false;
  	unsigned char r[4];
  	long y1,x1,y2,x2;
  	mreal d1[3],d2[3],c1[4],c2[4],n1[3],n2[3];
@@@ -722,6 -727,7 +727,7 @@@
  void mglGraphAB::line_plot(mreal *pp0,mreal *pp1,mreal *cc0,mreal *cc1,bool all)
  {
  //	if(!DrawFace && FastNoFace)	{	line_plot_s(pp0,pp1,cc0,cc1,all);	return;	}
+ 	Finished = false;
  	unsigned char r[4];
  	long y1,x1,y2,x2;
  	mreal dxu,dxv,dyu,dyv,dd,pw = fabs(PenWidth);
@@@ -837,46 -843,46 +843,66 @@@ void mglGraphAB::mark_plot(mreal *pp, c
  		{
  		case 'P':
  			p[0] = pp[0]-ss;	p[1] = pp[1]-ss;	p[3] = pp[0]+ss;	p[4] = pp[1]-ss;
++<<<<<<< HEAD
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
 +			p[0] = pp[0]-ss;	p[1] = pp[1]-ss;	p[3] = pp[0]-ss;	p[4] = pp[1]+ss;
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
 +			p[0] = pp[0]-ss;	p[1] = pp[1]+ss;	p[3] = pp[0]+ss;	p[4] = pp[1]+ss;
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
 +			p[0] = pp[0]+ss;	p[1] = pp[1]-ss;	p[3] = pp[0]+ss;	p[4] = pp[1]+ss;
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
++=======
+ 			line_plot(p,p+3,CDef,CDef);
+ 			p[0] = pp[0]-ss;	p[1] = pp[1]-ss;	p[3] = pp[0]-ss;	p[4] = pp[1]+ss;
+ 			line_plot(p,p+3,CDef,CDef);
+ 			p[0] = pp[0]-ss;	p[1] = pp[1]+ss;	p[3] = pp[0]+ss;	p[4] = pp[1]+ss;
+ 			line_plot(p,p+3,CDef,CDef);
+ 			p[0] = pp[0]+ss;	p[1] = pp[1]-ss;	p[3] = pp[0]+ss;	p[4] = pp[1]+ss;
+ 			line_plot(p,p+3,CDef,CDef);
++>>>>>>> upstream/1.11.1.1
  		case '+':
  			p[0] = pp[0]-ss;	p[1] = pp[1];	p[3] = pp[0]+ss;	p[4] = pp[1];
 -			line_plot(p,p+3,CDef,CDef);
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
  			p[0] = pp[0];	p[1] = pp[1]-ss;	p[3] = pp[0];	p[4] = pp[1]+ss;
 -			line_plot(p,p+3,CDef,CDef);
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
  			break;
  		case 'X':
  			p[0] = pp[0]-ss;	p[1] = pp[1]-ss;	p[3] = pp[0]+ss;	p[4] = pp[1]-ss;
++<<<<<<< HEAD
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
 +			p[0] = pp[0]-ss;	p[1] = pp[1]-ss;	p[3] = pp[0]-ss;	p[4] = pp[1]+ss;
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
 +			p[0] = pp[0]-ss;	p[1] = pp[1]+ss;	p[3] = pp[0]+ss;	p[4] = pp[1]+ss;
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
 +			p[0] = pp[0]+ss;	p[1] = pp[1]-ss;	p[3] = pp[0]+ss;	p[4] = pp[1]+ss;
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
++=======
+ 			line_plot(p,p+3,CDef,CDef);
+ 			p[0] = pp[0]-ss;	p[1] = pp[1]-ss;	p[3] = pp[0]-ss;	p[4] = pp[1]+ss;
+ 			line_plot(p,p+3,CDef,CDef);
+ 			p[0] = pp[0]-ss;	p[1] = pp[1]+ss;	p[3] = pp[0]+ss;	p[4] = pp[1]+ss;
+ 			line_plot(p,p+3,CDef,CDef);
+ 			p[0] = pp[0]+ss;	p[1] = pp[1]-ss;	p[3] = pp[0]+ss;	p[4] = pp[1]+ss;
+ 			line_plot(p,p+3,CDef,CDef);
++>>>>>>> upstream/1.11.1.1
  		case 'x':
  			p[0] = pp[0]-ss;	p[1] = pp[1]-ss;	p[3] = pp[0]+ss;	p[4] = pp[1]+ss;
 -			line_plot(p,p+3,CDef,CDef);
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
  			p[0] = pp[0]+ss;	p[1] = pp[1]-ss;	p[3] = pp[0]-ss;	p[4] = pp[1]+ss;
 -			line_plot(p,p+3,CDef,CDef);
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
  			break;
  		case 'S':
  			for(i=long(-ss-1);i<=long(ss+1);i++)	for(j=long(-ss-1);j<=long(ss+1);j++)
  				pnt_plot(long(pp[0])+i,long(pp[1])+j,zv,cs);
  		case 's':
  			p[0] = pp[0]-ss;	p[1] = pp[1]-ss;	p[3] = pp[0]+ss;	p[4] = pp[1]-ss;
 -			line_plot(p,p+3,CDef,CDef);
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
  			p[0] = pp[0]+ss;	p[1] = pp[1]-ss;	p[3] = pp[0]+ss;	p[4] = pp[1]+ss;
 -			line_plot(p,p+3,CDef,CDef);
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
  			p[0] = pp[0]+ss;	p[1] = pp[1]+ss;	p[3] = pp[0]-ss;	p[4] = pp[1]+ss;
 -			line_plot(p,p+3,CDef,CDef);
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
  			p[0] = pp[0]-ss;	p[1] = pp[1]+ss;	p[3] = pp[0]-ss;	p[4] = pp[1]-ss;
 -			line_plot(p,p+3,CDef,CDef);
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
  			break;
  		case 'D':
  			for(i=long(-ss-1);i<=long(ss+1);i++)	for(j=long(-ss-1);j<=long(ss+1);j++)
@@@ -884,29 -890,29 +910,37 @@@
  					pnt_plot(long(pp[0])+i,long(pp[1])+j,zv,cs);
  		case 'd':
  			p[0] = pp[0];	p[1] = pp[1]-ss;	p[3] = pp[0]+ss;	p[4] = pp[1];
 -			line_plot(p,p+3,CDef,CDef);
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
  			p[0] = pp[0]+ss;	p[1] = pp[1];	p[3] = pp[0];	p[4] = pp[1]+ss;
 -			line_plot(p,p+3,CDef,CDef);
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
  			p[0] = pp[0];	p[1] = pp[1]+ss;	p[3] = pp[0]-ss;	p[4] = pp[1];
 -			line_plot(p,p+3,CDef,CDef);
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
  			p[0] = pp[0]-ss;	p[1] = pp[1];	p[3] = pp[0];	p[4] = pp[1]-ss;
 -			line_plot(p,p+3,CDef,CDef);
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
 +			break;
 +		case 'Y':
 +			p[0] = pp[0];	p[1] = pp[1]-ss;	p[3] = pp[0];	p[4] = pp[1];
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
 +			p[0] = pp[0]-0.8*ss;	p[1] = pp[1]+0.6*ss;	p[3] = pp[0];	p[4] = pp[1];
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
 +			p[0] = pp[0]+0.8*ss;	p[1] = pp[1]+0.6*ss;	p[3] = pp[0];	p[4] = pp[1];
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
  			break;
+ 		case 'Y':
+ 			p[0] = pp[0];	p[1] = pp[1]-ss;	p[3] = pp[0];	p[4] = pp[1];
+ 			line_plot(p,p+3,CDef,CDef);
+ 			p[0] = pp[0]-0.8*ss;	p[1] = pp[1]+0.6*ss;	p[3] = pp[0];	p[4] = pp[1];
+ 			line_plot(p,p+3,CDef,CDef);
+ 			p[0] = pp[0]+0.8*ss;	p[1] = pp[1]+0.6*ss;	p[3] = pp[0];	p[4] = pp[1];
+ 			line_plot(p,p+3,CDef,CDef);
+ 			break;
  		case '*':
  			p[0] = pp[0]-ss;	p[1] = pp[1];	p[3] = pp[0]+ss;	p[4] = pp[1];
 -			line_plot(p,p+3,CDef,CDef);
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
  			p[0] = pp[0]-0.6*ss;	p[1] = pp[1]-0.8*ss;	p[3] = pp[0]+0.6*ss;	p[4] = pp[1]+0.8*ss;
 -			line_plot(p,p+3,CDef,CDef);
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
  			p[0] = pp[0]-0.6*ss;	p[1] = pp[1]+0.8*ss;	p[3] = pp[0]+0.6*ss;	p[4] = pp[1]-0.8*ss;
 -			line_plot(p,p+3,CDef,CDef);
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
  			break;
  		case 'T':
  			for(i=long(-ss-1);i<=long(ss+1);i++)	for(j=long(-ss/2-1);j<=long(ss+1);j++)
@@@ -914,11 -920,11 +948,11 @@@
  					pnt_plot(long(pp[0])+i,long(pp[1])+j,zv,cs);
  		case '^':
  			p[0] = pp[0]-ss;	p[1] = pp[1]-ss/2;	p[3] = pp[0];	p[4] = pp[1]+ss;
 -			line_plot(p,p+3,CDef,CDef);
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
  			p[0] = pp[0]-ss;	p[1] = pp[1]-ss/2;	p[3] = pp[0]+ss;	p[4] = pp[1]-ss/2;
 -			line_plot(p,p+3,CDef,CDef);
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
  			p[0] = pp[0]+ss;	p[1] = pp[1]-ss/2;	p[3] = pp[0];	p[4] = pp[1]+ss;
 -			line_plot(p,p+3,CDef,CDef);
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
  			break;
  		case 'V':
  			for(i=long(-ss-1);i<=long(ss+1);i++)	for(j=long(-ss-1);j<=long(ss/2+1);j++)
@@@ -926,11 -932,11 +960,11 @@@
  					pnt_plot(long(pp[0])+i,long(pp[1])+j,zv,cs);
  		case 'v':
  			p[0] = pp[0]-ss;	p[1] = pp[1]+ss/2;	p[3] = pp[0];	p[4] = pp[1]-ss;
 -			line_plot(p,p+3,CDef,CDef);
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
  			p[0] = pp[0]-ss;	p[1] = pp[1]+ss/2;	p[3] = pp[0]+ss;	p[4] = pp[1]+ss/2;
 -			line_plot(p,p+3,CDef,CDef);
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
  			p[0] = pp[0]+ss;	p[1] = pp[1]+ss/2;	p[3] = pp[0];	p[4] = pp[1]-ss;
 -			line_plot(p,p+3,CDef,CDef);
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
  			break;
  		case 'L':
  			for(i=long(-ss-1);i<=long(ss+1);i++)	for(j=long(-ss-1);j<=long(ss/2+1);j++)
@@@ -938,11 -944,11 +972,19 @@@
  					pnt_plot(long(pp[0])+j,long(pp[1])+i,zv,cs);
  		case '<':
  			p[0] = pp[0]+ss/2;	p[1] = pp[1]-ss;	p[3] = pp[0]-ss;	p[4] = pp[1];
++<<<<<<< HEAD
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
 +			p[0] = pp[0]+ss/2;	p[1] = pp[1]+ss;	p[3] = pp[0]-ss;	p[4] = pp[1];
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
 +			p[0] = p[3] = pp[0]+ss/2;	p[1] = pp[1]-ss;	p[4] = pp[1]+ss;
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
++=======
+ 			line_plot(p,p+3,CDef,CDef);
+ 			p[0] = pp[0]+ss/2;	p[1] = pp[1]+ss;	p[3] = pp[0]-ss;	p[4] = pp[1];
+ 			line_plot(p,p+3,CDef,CDef);
+ 			p[0] = p[3] = pp[0]+ss/2;	p[1] = pp[1]-ss;	p[4] = pp[1]+ss;
+ 			line_plot(p,p+3,CDef,CDef);
++>>>>>>> upstream/1.11.1.1
  			break;
  		case 'R':
  			for(i=long(-ss-1);i<=long(ss+1);i++)	for(j=long(-ss/2-1);j<=long(ss+1);j++)
@@@ -950,11 -956,11 +992,19 @@@
  					pnt_plot(long(pp[0])+j,long(pp[1])+i,zv,cs);
  		case '>':
  			p[0] = pp[0]-ss/2;	p[1] = pp[1]-ss;	p[3] = pp[0]+ss;	p[4] = pp[1];
++<<<<<<< HEAD
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
 +			p[0] = pp[0]-ss/2;	p[1] = pp[1]+ss;	p[3] = pp[0]+ss;	p[4] = pp[1];
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
 +			p[0] = p[3] = pp[0]-ss/2;	p[1] = pp[1]-ss;	p[4] = pp[1]+ss;
 +			mglGraphAB::line_plot(p,p+3,CDef,CDef);
++=======
+ 			line_plot(p,p+3,CDef,CDef);
+ 			p[0] = pp[0]-ss/2;	p[1] = pp[1]+ss;	p[3] = pp[0]+ss;	p[4] = pp[1];
+ 			line_plot(p,p+3,CDef,CDef);
+ 			p[0] = p[3] = pp[0]-ss/2;	p[1] = pp[1]-ss;	p[4] = pp[1]+ss;
+ 			line_plot(p,p+3,CDef,CDef);
++>>>>>>> upstream/1.11.1.1
  			break;
  		case 'O':
  			for(i=long(-ss);i<=long(ss);i++)	for(j=long(-ss);j<=long(ss);j++)
@@@ -972,5 -978,5 +1022,5 @@@
  	}
  }
  //-----------------------------------------------------------------------------
- void mglGraphAB::pnt_plot(long x,long y,mreal z,unsigned char c[4]){}
+ void mglGraphAB::pnt_plot(long,long,mreal,unsigned char [4]){}
  //-----------------------------------------------------------------------------
diff --combined mgl/mgl_zb2.cpp
index 1c2f7a0,10c192d..51547c4
--- a/mgl/mgl_zb2.cpp
+++ b/mgl/mgl_zb2.cpp
@@@ -728,7 -728,7 +728,11 @@@ void mglGraphAB::glyph_fill(mreal x,mre
  		PostScale(p,3);
  		p[2]+=pw;	p[5]+=pw;	p[8]+=pw;
  		bool ul=UseLight;	UseLight=false;
++<<<<<<< HEAD
 +		mglGraphAB::trig_plot(p,p+3,p+6,c,c,c);
++=======
+ 		mglGraphAB::trig_plot(p,p+3,p+6,c,c,c);
++>>>>>>> upstream/1.11.1.1
  		UseLight=ul;
  	}
  }
@@@ -780,9 -780,9 +784,9 @@@ void mglGraphAB::glyph_line(mreal x,mre
  	}
  	else
  	{
- 		mglGraphAB::line_plot(p,p+3,c,c);
+ 		mglGraphAB::line_plot(p,p+3,c,c);
  		mglGraphAB::line_plot(p+9,p+3,c,c);
- 		mglGraphAB::line_plot(p,p+6,c,c);
+ 		mglGraphAB::line_plot(p,p+6,c,c);
  		mglGraphAB::line_plot(p+9,p+6,c,c);
  	}
  	PDef = pdef;	PenWidth=opw;
diff --combined texinfo/Makefile.am
index 82ec329,d35c1b3..6cefa14
--- a/texinfo/Makefile.am
+++ b/texinfo/Makefile.am
@@@ -1,8 -1,7 +1,12 @@@
  SUBDIRS				= png .
  
  CLEANFILES = mathgl_en.info mathgl_en.info-1 mathgl_en.info-2 mathgl_en.info-3 mgl_en.info \
++<<<<<<< HEAD
 +mathgl_ru.info mathgl_ru.info-1 mathgl_ru.info-2 mathgl_ru.info-3 mathgl_ru.info-4 mgl_ru.info \
 +mgl_ru.info-*
++=======
+ mathgl_ru.info mathgl_ru.info-1 mathgl_ru.info-2 mathgl_ru.info-3 mathgl_ru.info-4 mgl_ru.info
++>>>>>>> upstream/1.11.1.1
  
  MAKEINFOHTML		= texi2html
  TEXI2PDF			= texi2pdf
diff --combined texinfo/Makefile.in
index 96b3257,38515ef..f4f0762
--- a/texinfo/Makefile.in
+++ b/texinfo/Makefile.in
@@@ -233,6 -233,7 +233,7 @@@ SET_MAKE = @SET_MAKE
  SHELL = @SHELL@
  STRIP = @STRIP@
  TMPDIR = @TMPDIR@
+ U3D_LIBS = @U3D_LIBS@
  UIC = @UIC@
  VERSION = @VERSION@
  WX_FLAGS = @WX_FLAGS@
@@@ -296,8 -297,7 +297,12 @@@ 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 \
++<<<<<<< HEAD
 +mathgl_ru.info mathgl_ru.info-1 mathgl_ru.info-2 mathgl_ru.info-3 mathgl_ru.info-4 mgl_ru.info \
 +mgl_ru.info-*
++=======
+ mathgl_ru.info mathgl_ru.info-1 mathgl_ru.info-2 mathgl_ru.info-3 mathgl_ru.info-4 mgl_ru.info
++>>>>>>> upstream/1.11.1.1
  
  MAKEINFOHTML = texi2html
  TEXI2PDF = texi2pdf
diff --combined texinfo/mgl_en.texi
index 68d7c34,66c5f81..63878e4
--- a/texinfo/mgl_en.texi
+++ b/texinfo/mgl_en.texi
@@@ -25,10 -25,10 +25,17 @@@ supports it in developing GNU and promo
  @end quotation
  @end copying
  
++<<<<<<< HEAD
 + at dircategory MathGL documentation system
 + at direntry
 +* MathGL: (mathgl). The library for scientific graphics.
 + at end direntry
++=======
+ @c @dircategory MathGL documentation system
+ @c @direntry
+ @c * MathGL: (mathgl). The library for scientific graphics.
+ @c @end direntry
++>>>>>>> upstream/1.11.1.1
  
  @titlepage
  @title MGL script language
diff --combined texinfo/mgl_ru.texi
index 7a6b702,cee1571..2746e2e
--- a/texinfo/mgl_ru.texi
+++ b/texinfo/mgl_ru.texi
@@@ -27,10 -27,10 +27,17 @@@ supports it in developing GNU and promo
  @end quotation
  @end copying
  
++<<<<<<< HEAD
 + at dircategory MathGL documentation system
 + at direntry
 +* MathGL: (mathgl). The library for scientific graphics.
 + at end direntry
++=======
+ @c @dircategory MathGL documentation system
+ @c @direntry
+ @c * MathGL: (mathgl). The library for scientific graphics.
+ @c @end direntry
++>>>>>>> upstream/1.11.1.1
  
  @titlepage
  @title Язык MGL

-- 
Packaging for mathgl



More information about the debian-science-commits mailing list